<?php
session_start();
ob_start();

require("../includes/config.php");
require("../includes/dbcon.php");
if($_SESSION['uid']==""){	
	header("location:index.php");
	exit();
}
$eId=$_REQUEST['eId'];

$enrolleeQuery = mysql_query("select * from enrollee where enrollee_id=".$eId);
$enrolleeValue = mysql_fetch_array($enrolleeQuery);

$enrolleeName=$enrolleeValue['fisrt_name']." ".$enrolleeValue['middle_name']." ".$enrolleeValue['last_name'];

$informationQuery = mysql_query("select * from foundational_info where enrollee_id=".$eId);
$informationVal = mysql_fetch_array($informationQuery);
$ssn=$informationVal['ssn'];
$education=$informationVal['education'];
$mothers_m_name=$informationVal['mothers_m_name'];
$fathers_name=$informationVal['fathers_name'];
$bank_name=$informationVal['bank_name'];
$driver_lic_number=$informationVal['driver_lic_number'];
$passport_number=$informationVal['passport_number'];
$gov_id_number=$informationVal['gov_id_number'];
$gid_issue_date=$informationVal['gid_issue_date'];
$gid_expiry_date=$informationVal['gid_expiry_date'];
$gid_issuing_agency=$informationVal['gid_issuing_agency'];  


$countryQuery = mysql_query("select * from country where country_id=".$informationVal['country_born']);
$countryValue = mysql_fetch_array($countryQuery);
$countryBorn=$countryValue['country_name'];

$countryQuery2 = mysql_query("select * from country where country_id=".$informationVal['gid_issuing_country']);
$countryValue2 = mysql_fetch_array($countryQuery2);
$gidIssuingCountry=$countryValue2['country_name'];



$cCardQuery = mysql_query("select * from city where city_id=".$informationVal['credit_card_id']);
$cCardValue = mysql_fetch_array($cCardQuery);

ob_end_flush();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link href="../style/design.css" rel="stylesheet" type="text/css" />

<style type="text/css">
<!--
.style1 {font-size: 0.8em}
-->
</style>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>:::   User Details Page   :::</title>
</head>
<body>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
	<tr>
		<td align="center" valign="top">
<?php
include_once("includes/header.php");
?>
	<table width="90%" border="0" align="center" cellpadding="0" cellspacing="0">	 
<table width="90%" border="0" align="center" cellpadding="0" cellspacing="0">
				<tr>
					<td width="30%" valign="top"><div class="bodySubHeader"> <span class="bsht03">Personal Details of <?=$enrolleeName?> </span> </div></td>
				</tr>
		</table>
		<table width="90%" border="0" align="center" cellpadding="0" cellspacing="0" class="DarkLightBox">	
	<?php
	if($err_msg)
	{
	?>
	 <tr>
	   <td height="30" align="center" valign="top" colspan="8"><strong><?=$err_msg?></strong></td>	   
	 </tr>
	<?php
	}
	?>
	 <tr>
	   <td width="65%" align="left" valign="top" colspan="8" class="TopMenu2">Foundational Information</td>	  
	 </tr> 
	 <tr>
	   <td align="left" valign="top" colspan="8">&nbsp;</td>	  
	 </tr>
	 <tr>
	   <td height="30" align="left" valign="top" class="browseEventContents">Father's Name:<font color="red"><strong>*</strong></font></td>	   
	   <td height="30" align="left" valign="top"><input name="father_name" value="<?=$fathers_name?>" type="text" class="textField" readonly/></td>
	   <td height="30" align="left" valign="top" width="1%">&nbsp;</td>
	   <td height="30" align="left" valign="top" class="browseEventContents">Mother's Maiden Name:<font color="red"><strong>*</strong></font></td>
	   <td height="30" align="left" valign="top"><input name="mother_m_name" value="<?=$mothers_m_name?>" type="text" class="textField" readonly"/></td>
	   <td height="30" align="left" valign="top" width="1%">&nbsp;</td>
	   <td height="30" align="left" valign="top" class="browseEventContents">SSN:<font color="red"><strong>*</strong></font></td>
	   <td height="30" align="left" valign="top"><input name="ssn" value="<?=$ssn?>" type="text" class="textField" readonly"/></td>
	 </tr>	 
	 <tr>
	   <td height="30" align="left" valign="top" class="browseEventContents">Country Born:<font color="red"><strong>*</strong></font></td>	   
	   <td height="30" align="left" valign="top" colspan="7"><input name="countryBorn" value="<?=$countryBorn?>" type="text" class="textField" readonly"/></td>
	 </tr>
	 <tr>
	   <td height="30" align="left" valign="top" class="browseEventContents">GID Issuing Country:<font color="red"><strong>*</strong></font></td>	   
	   <td height="30" align="left" valign="top" colspan="7"><input name="gidIssuingCountry" value="<?=$gidIssuingCountry?>" type="text" class="textField" readonly"/></td>
	 </tr>
	 <tr>	   
	   <td height="30" align="left" valign="top" class="browseEventContents">Education:<font color="red"><strong>*</strong></font></td>	 
	   <td height="30" align="left" valign="top"><input name="education" value="<?=$education?>" type="text" class="textField" readonly"/></td>
	   <td height="30" align="left" valign="top">&nbsp;</td>
	   <td height="30" align="left" valign="top" class="browseEventContents">Passport Number:<font color="red"><strong>*</strong></font></td>	  
	   <td height="30" align="left" valign="top"><input name="passport" value="<?=$passport_number?>" type="text" class="textField" readonly"/></td>
	   <td height="30" align="left" valign="top">&nbsp;</td>
	   <td height="30" align="left" valign="top" class="browseEventContents">Government ID Number:<font color="red"><strong>*</strong></font></td>	   
	   <td height="30" align="left" valign="top"><input name="governmentIdNumber" value="<?=$gov_id_number?>" type="text" class="textField" readonly"/></td>
	 </tr>	 
	 <tr>
	   <td height="30" align="left" valign="top" class="browseEventContents">Bank Name:<font color="red"><strong>*</strong></font></td>	  
	   <td height="30" align="left" valign="top"><input name="bankName" value="<?=$bank_name?>" type="text" class="textField" readonly"/></td>  
	   <td height="30" align="left" valign="top">&nbsp;</td>
	   <td height="30" align="left" valign="top" class="browseEventContents">Driving Licence Number:<font color="red"><strong>*</strong></font></td>	   
	   <td height="30" align="left" valign="top"><input name="drivingLicenceNumber" value="<?=$driver_lic_number?>" type="text" class="textField" readonly"/></td>
	   <td height="30" align="left" valign="top">&nbsp;</td>
	   <td height="30" align="left" valign="top" class="browseEventContents">&nbsp;</td>	   
	   <td height="30" align="left" valign="top">&nbsp;</td>
	 </tr>
	 <tr>
	   <td height="30" align="left" valign="top" class="browseEventContents">GID Issue Date:<font color="red"><strong>*</strong></font></td>	   
	   <td height="30" align="left" valign="top"><input name="gidIssueDate" value="<?=$gid_issue_date?>" type="text" class="textField" readonly"/></td>
	   <td height="30" align="left" valign="top">&nbsp;</td>
	   <td height="30" align="left" valign="top" class="browseEventContents">GID Expiry Date:<font color="red"><strong>*</strong></font></td>	   
	   <td height="30" align="left" valign="top"><input name="gidExpiryDate" value="<?=$gid_expiry_date?>" type="text" class="textField" readonly"/></td>
	   <td height="30" align="left" valign="top">&nbsp;</td>
	   <td height="30" align="left" valign="top" class="browseEventContents">GID Issuing Agency:<font color="red"><strong>*</strong></font></td>	   
	   <td height="30" align="left" valign="top"><input name="gidIssuingAgency" value="<?=$gid_issuing_agency?>" type="text" class="textField" readonly"/></td>
	 </tr>	
	 <tr>
	   <td height="30" align="left" valign="top" colspan="8">&nbsp;</td> 
	 </tr>		     	     	     	     	     	  
	 <tr>
	   <td height="30" align="left" valign="top" class="browseEventContents">Card Type:</td>	   
	   <td height="30" align="left" valign="top"><input name="cardType" value="<?=$cCardValue['card_type']?>" type="text" class="textField" readonly"/></td>
	   <td height="30" align="left" valign="top">&nbsp;</td>
	   <td height="30" align="left" valign="top" class="browseEventContents">Card Number:</td>	   
	   <td height="30" align="left" valign="top"><input name="cardNumber" value="<?=$cCardValue['card_number']?>" type="text" class="textField" readonly"/></td>
	   <td height="30" align="left" valign="top">&nbsp;</td>
	   <td height="30" align="left" valign="top" class="browseEventContents">Name on Card.:</td>	   
	  <td height="30" align="left" valign="top"><input name="nameOnCard" value="<?=$cCardValue['name_on_card']?>" type="text" class="textField" readonly"/></td>	   
	 </tr>
	 <tr>
	   <td height="30" align="left" valign="top" class="browseEventContents">Expiration Date:</td>	   
	   <td height="30" align="left" valign="top"><input name="expiresionDate" value="<?=$cCardValue['expiresion_date']?>" type="text" class="textField" readonly"/></td>
	   <td height="30" align="left" valign="top">&nbsp;</td>
	   <td height="30" align="left" valign="top" class="browseEventContents">Issuing Bank:</td>	   
	   <td height="30" align="left" valign="top"><input name="issuingBank" value="<?=$cCardValue['issuing_bank']?>" type="text" class="textField" readonly"/></td>
	   <td height="30" align="left" valign="top">&nbsp;</td>
	   <td height="30" align="left" valign="top" class="browseEventContents">Security Code:</td>	   
	   <td height="30" align="left" valign="top"><input name="securityCode" value="<?=$cCardValue['security_code']?>" type="text" class="textField" readonly"/></td>
	 </tr>	 
	 <tr>
	   <td height="30" align="right" valign="top" class="browseEventContents" colspan="8"><a href="qAns.php?eId=<?=$eId?>"><input value="OK" type="submit" /></a></td>
	 </tr>
	</table>
<?php
include_once("../includes/footer.php");
?>
		</td>
	</tr>
</table>
</body>
</html>