/home/mip/public_html_/old-website/apply_online.php
<?
require_once("func_proc.php");
if($action=="check") {
$sql = "Select applicant_id,position_id1 from web_personal where applicant_id='$applicant_id'";
$exists2 = getdata($sql);
$applicant_id = $exists2[1]["applicant_id"];
$table = "web_personal";
$applicant = getdata_one("*", "web_personal", "applicant_id", $applicant_id);
$applicant_id = $applicant["applicant_id"];
$position_id = $exists2[1]["position_id1"];
$position_id1= $applicant["position_id1"];
$position_id2= $applicant["position_id2"];
$what1 = "update_resume";
$whichtb=$tablename;
}
if($action=="update") {
$applicant = getdata_one("*", $table, "applicant_id", $applicant_id);
$applicant_id = $applicant["applicant_id"];
$position_id = $applicant["position_id1"];
$position_id1= $applicant["position_id1"];
$position_id2= $applicant["position_id2"];
$what1 = "update_resume";
}else{
$table="web_personal";
}
if($action=="check_again") {
$birthdate = "$bday_year-$bday_month-$bday_day";
$sql = "Select applicant_id,position_id1 from web_personal where applicant_id='$applicant_id' ";
$exists = getdata($sql);
$sql = "Select applicant_id,position_id1 from personal where applicant_id='$applicant_id' ";
$exists2 = getdata($sql);
$temp_id = $exists[1]["applicant_id"];
$applicant_id = $exists2[1]["applicant_id"];
if($exists){
$table = "web_personal";
$applicant = getdata_one("*", "web_personal", "applicant_id", $temp_id);
$applicant_id = $applicant["applicant_id"];
$position_id = $exists[1]["position_id1"];
$position_id1= $applicant["position_id1"];
$position_id2= $applicant["position_id2"];
$what1 = "update_resume";
$whichtb=$tablename;
}elseif($exists2){
$table = "personal";
$tablename = $table . "personal";
$applicant = getdata_one("*", "personal", "applicant_id", $applicant_id);
$applicant_id = $applicant["applicant_id"];
$position_id = $exists2[1]["position_id1"];
$position_id1= $applicant["position_id1"];
$position_id2= $applicant["position_id2"];
$what1 = "update_resume";
$whichtb="personal";
}else{
header("Location: jobs.php?active1=jobs&msg=Sorry, No records matched your input. Please Try Again.");
exit;
}
}
if($table == "web_"){
$sub_dir = $online_upload;
}else{
$sub_dir = $attachment_dir;
}
do_header("Apply Online: Personal");
do_menu();
@$job1 = getdata_one("*","web_jobs","webjob_id",$webjob_id);
@$position_name = getname($job1['position_id'],"positions","position_id");
if($job1['position_id']) $sqlwithcat = 'and category_id = "'.$job1['category_id'].'"';
$height = array("cm");
$weight = array("kg");
$sex = array("M", "F");
$civilstatus = array("Single", "Married", "Widowed", "Separated");
$category = getdata("select * from job_category where 1 order by name");
$formname="thisonly";
$phpself = basename($PHP_SELF);
if(@getfield("applicant_id","personal","applicant_id",$applicant_id)) {
$atttable = "doc_library";
$fin = "training";
} else {
$atttable = "web_doc_library";
$fin = "web_training";
}
if($applicant_id) {
$applicant = getdata_one("*", $table, "applicant_id", $applicant_id);
$attachments = getdata("select * from $atttable where applicant_id='$applicant_id' order by doc_name");
$num_attachments = count($attachments);
if($resume){
$style = 'display:none;';
$style1 = 'display:block;';
$style2 = 'display:none;';
} else {
$style = 'display:none;';
$style1 = 'display:none;';
$style2 = 'display:block;';
}
/*} if(!$applicant_id) {
$style = 'display:block;';
$style1 = 'display:none;';
$style2 = 'display:none;';
*/
} else {
if(!$whatapply) {
$style = 'display:block;';
$style1 = 'display:none;';
$style2 = 'display:none;';
} else {
if($whatapply=='1') {
$style = 'display:none;';
$style1 = 'display:block;';
$style2 = 'display:none;';
}
if($whatapply=='2') {
$style = 'display:none;';
$style1 = 'display:none;';
$style2 = 'display:block;';
}
}
}
if($applicant['position_id1']) {
if($table=='personal') {
$sqlwithcat = 'and category_id = "'.$applicant['category_id1'].'"';
} else {
$sqlwithcat = 'and category_id = "'.$applicant['category_id'].'"';
}
}
if($job1['position_id'] || $applicant['position_id1']) {
$positions = getdata("select positions.* from positions where 1 $sqlwithcat order by name");
}
$arr_doc_type = getdata("Select * from doc_type order by name");
?>
<script>
function popup(mylink, windowname){
if (! window.focus)return true;
var href;
if (typeof(mylink) == 'string')
href=mylink;
else
href=mylink.href;
window.open(href, windowname, 'width=300,height=300,scrollbars=no');
return false;
}
</script>
<link href="apply.css" rel="stylesheet" type="text/css">
<div id="middle2">
<div id="middletop2">
<div id="middlebottom">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr><td width="100%" height="170" align="right" valign="top">
<table width="100%" height="159" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="100%" height="170" valign="top" style="padding-left:25px; padding-right:20px; padding-top:0px">
<div id="choices" style=" <?=$style?>">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<form method="post" action="#" enctype="MULTIPART/FORM-DATA" name="thisonly9"><!-- showresume showapply -->
<tr><td width="100%" valign="top" align="left">
<p><b>How do you want to submit your Application?</b></p>
<div style="text-indent:25px; padding-bottom:5px;"><input type="radio" name="sino" value="1" onclick="window.location='apply_online.php?webjob_id=<?=$webjob_id?>&whatapply=1'; thisonly9.target='_self';"/> <b>Attach my resume</b></div>
<div style="text-indent:25px; padding-bottom:5px;"><input type="radio" name="sino" value="2" onclick="window.location='apply_online.php?webjob_id=<?=$webjob_id?>&whatapply=2'; thisonly9.target='_self';"/> <b>Encode my resume</b></div>
</td></tr>
</form>
</table>
</div>
<div id="resume" style=" <?=$style1?>">
<div style="padding-top:3px; background-color:#FFFFFF" align="left" class="applyonline"><font size=2 color=maroon><b>Apply Online</b></font> </div>
<? if(!$applicant_id) { ?>
<div style="clear:both; padding-bottom:10px; padding-top:5px; font-size:10px; font-family:verdana, arial; color:#ffffff; font-size:11px; text-decoration:none;" align="left"><a style="cursor:pointer" onclick="window.location='apply_online.php?webjob_id=<?=$webjob_id?>&whatapply=2'">[change to encode my resume]</a></div>
<? } ?>
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="jobs1">
<tr><td width="100%" height="170" align="right" valign="top"><br />
<table width="100%" height="159" border="0" align="center" cellpadding="0" cellspacing="0">
<tr><td width="100%" height="170" align="left">
<? if($applicant_id){ ?>
<form method="post" action="sqlupdate.php?what=personal1" onsubmit="return validate_form1()" enctype="MULTIPART/FORM-DATA" name="thisonly2">
<? } else { ?>
<form method="post" action="sqladd.php?what=web_personal1" onsubmit="return validate_form1()" enctype="MULTIPART/FORM-DATA" name="thisonly2">
<? } ?>
<table width=100% border="0" cellpadding="2" cellspacing="2">
<tr>
<td class="box">Category:</td>
<td class="box" colspan="3">
<div>
<? if($applicant_id) {?>
<select name="category_id" id="category_id" onChange="load_category1();" style="width:300px;">
<option value=""></option>
<?selectcode($category,$applicant[category_id],"category_id","name")?>
</select>
<? } else { ?>
<select name="category_id" id="category_id" onChange="load_category1();" style="width:300px;">
<option value=""></option>
<?selectcode($category,$job1[category_id],"category_id","name")?>
</select>
<? } ?>
<span style="color:#FF0000;"> * </span></div>
<div class=errorMessage id=categoryError2>Required: Please enter Category</div>
</td>
</tr>
<tr>
<td>Position Applying:</td>
<td colspan="2"><div><? if($applicant_id) {?>
<select name="position1" id="position1" style="width:300px;">
<option value=''></option>
<?selectcode($positions,$applicant['position_id1'],"position_id","name")?>
</select>
<? } else { ?>
<select name="position1" id="position1" style="width:300px;">
<option value=''>
<?selectcode($positions,$job1['position_id'],"position_id","name")?>
</select>
<? } ?><span style="color:#FF0000;"> * </span></div><div class=errorMessage id=positionError2>Required: Please enter Position Applying</div>
</td>
</tr>
<tr>
<td>Years of Experience :</td>
<td>Local: <input type="text" name="position1_yrsofexp" value="<?=$applicant[position1_yrsofexp]?>" size=3 onfocus="select()" onkeypress="return isNumberKey(event);" maxlength="2"> years <input type="text" name="position1_mosofexp" value="<?=$applicant[position1_mosofexp]?>" size=3 onfocus="select()" onkeypress="return isNumberKey(event);" maxlength="2"> months </td>
</tr>
<tr>
<td> </td>
<td>Abroad: <input type="text" name="position1_yrsofexp_abroad" value="<?=$applicant[position1_yrsofexp_abroad]?>" size=3 onfocus="select()" onkeypress="return isNumberKey(event);" maxlength="2"> years <input type="text" name="position1_mosofexp_abroad" value="<?=$applicant[position1_mosofexp_abroad]?>" size=3 onfocus="select()" onkeypress="return isNumberKey(event);" maxlength="2"> months </td>
</tr>
<tr>
<td width="200" align="left">Last Name:</td>
<td colspan="2" align="left"><div>
<input type=text name="lname" id="lname" size=35 value="<?=$applicant[lname]?>" onkeypress="return alphaOnly(event);"/>
<span style="color:#FF0000;"> * </span></div>
<div class=errorMessage id=lnameError2>Required: Please enter your last name</div></td>
</tr>
<tr>
<td align="left">First Name:</td>
<td colspan="2" align="left"><div>
<input type=text name="fname" id="fname" size=35 value="<?=$applicant[fname]?>" onkeypress="return alphaOnly(event);"/>
<span style="color:#FF0000;"> * </span></div>
<div class=errorMessage id=fnameError2>Required: Please enter your first name</div></td>
</tr>
<tr>
<td align="left">Middle Name:</td>
<td colspan="2" align="left"><div>
<input type=text name="mname" id="mname" size=25 value="<?=$applicant[mname]?>" onkeypress="return alphaOnly(event);"/>
<span style="color:#FF0000;"> * </span></div>
<div class=errorMessage id=mnameError2>Required: Please enter your middle name and make it complete</div></td>
</tr>
<tr>
<td align="left">Birthdate:</td>
<td colspan="2" align="left"><div>
<? list ($bday_year, $bday_month, $bday_day) = split ('[-]', $applicant[birthdate]); ?>
<?echo dateselect("bday_month","month","$bday_month",0,0);?>
<?echo dateselect("bday_day","day","$bday_day",0,0);?>
<?echo dateselect("bday_year","year","$bday_year",0,0);?> <span style="color:#FF0000;"> * </span></div>
<div class=errorMessage id=bdateError2>Required: Please enter your Birth Date</div></td>
</tr>
<tr>
<td valign="top">Present Address:</td>
<td colspan="2">
<div><textarea name="address1" id="address1" cols="35" rows="3"><?=$applicant[address1]?></textarea><span style="color:#FF0000;"> * </span></div>
<div class=errorMessage id=paddress2>Required: Please enter your Present Address</div>
</td>
</tr>
<tr>
<td>Email Address :</td>
<td colspan="2"><div><input type=text name="email" id="email" size=40 value="<?=$applicant[email]?>"> <span style="color:#FF0000;"> * </span></div><div class=errorMessage id=emailError2>Required: Please enter your email address</div><div class=errorMessage id=emailvalidError2>Error: Please enter valid email address</div></td>
</tr>
<tr>
<td>Cellphone :</td>
<td colspan="2"><div><input type=text name="cellphone" id="cellphone" size=25 value="<?=$applicant[cellphone]?>" onkeypress="return isNumberKey(event);" maxlength="11"> <span style="color:#FF0000; font-size:9px;">* <span style="color:#000000; font-size:9px; background:#ffff00; padding:3px;">example: 09177340642</span></span></div><div class=errorMessage id=cellphoneError2>Required: Please Enter your Cellphone No. & must 11 digit</div></td>
</tr>
<!--<tr>
<td valign="top">Password :</td>
<td colspan="2"><div style="color:#000000; font-size:9px; background:#ffff00; padding:3px;">If you like to edit your resume in the future and view the status of your application, please put a password</div><div style="padding-top:1px;"><input type=password name="password1" id="password1" size=15 value="<?=$applicant[password]?>"> <span style="color:#FF0000;"> *</span></div><div class=errorMessage id=passwordError2>Required: Please enter your password</div><div class=errorMessage id=passwordvalidError2>Error: Password and Re-type Password are not the same</div></td>
</tr>
<tr>
<td>Re-type Password :</td>
<td colspan="2"><div><input type=password name="password2" id="password2" size=15 value=""> <span style="color:#FF0000;"> *</span><span style="color:#000000; font-size:9px; background:#ffff00; padding:3px;">Repeat password</span></div><div class=errorMessage id=password2Error2>Required: Please enter your password</div><div class=errorMessage id=password2validError2>Error: Password and Re-type Password are not the same</div></td>
</tr>-->
<tr>
<td align="left" valign="top" style="padding-bottom:10px;">Resume:<br /><span style="color:#FF0000; font-size:9px;">(max of 200kb)</span></td>
<td colspan="2" align="left" class="data">
<? if($applicant[resumefile]){?>
<input type="hidden" name="hasresume" value="1" />
<a href="<?=$url?><?=$doc_dir?><?=$applicant_id?>/<?=$applicant[resumefile]?>" target="_blank" class="data"><span style="font-size:9px;">[view resume]</span></a> |
<a href="sqldelete.php?what=myresume&applicant_id=<?=$applicant_id?>&table=<?=$table?>&whatapply=<?=$whatapply?>" onclick="return confirm('Are you sure you want to delete this?')" class="data"><span style="font-size:9px;">[delete]</span></a>
<? } else { ?>
<div>
<input name="picture" id="picture" type="file" size="30" class="button" onchange="return CheckExtension(this)">
<span style="color:#FF0000; font-size:9px;">*</span></div>
<div class=errorMessage id=pictureError2>Required: Please upload your resume (.doc or .pdf file only / max of 200kb)</div>
<? } ?>
</td>
</tr>
<tr>
<td align="left" valign="top">Attach additional files (diploma, certificates, etc): <br /><span style="color:#FF0000; font-size:9px;">(max of 200kb/attachment)</span></td>
<td colspan="2" align="left"><div>
<div>
<select name="doc_type1">
<? selectcode($arr_doc_type,$doc1[type_id],"type_id","name");?>
</select>
<INPUT type="file" onchange="document.getElementById('moreUploadsLink').style.display = 'block';" name="file1">
<DIV id=moreUploads style="padding-bottom:5px; font-size:9px;"> </DIV>
<div id="moreUploadsLink" style="display:block; font-size:9px;"><A href="javascript:addFileInput();">[attach another file]</A></div>
</div>
</td>
</tr>
<tr>
<td colspan="3" align="left">
<? if($num_attachments){ ?><br />
<table width=70% border="0" cellpadding="2" cellspacing="2">
<tr>
<td width=2% class="report1"></td>
<td class="report1" width="40%"><b>Doc Type</b></td>
<td class="report1" width="50%"><b>File Name</b></td>
<td class="report1" width="5%"> </td>
</tr>
<? for($i=1; $i<=$num_attachments; $i++){ ?>
<tr>
<td class="report"><?=$i?>.</td>
<td class="data"><a href="<?=$url?><?=$doc_dir?><?=$applicant_id?>/<?=$attachments[$i][doc_file]?>" target="_blank"><?=@getname($attachments[$i][type_id],"doc_type","type_id")?></a></td>
<td class="data"><a href="<?=$url?><?=$doc_dir?><?=$applicant_id?>/<?=$attachments[$i][doc_file]?>" target="_blank"><?=$attachments[$i][doc_file]?></a></td>
<td class="report"><a href="sqldelete.php?what=attachments&atttable=<?=$atttable?>&id=<?=$attachments[$i][id]?>&applicant_id=<?=$applicant_id?>&whatapply=<?=$whatapply?>" onclick="return confirm('Are you sure you want to delete this?')" class="data" title="Delete"><img src="irisonline/images/delete.gif" border="0" alt="Delete" title="Delete" /></a></td>
</tr>
<? } ?>
</table><br />
<? } ?>
</td>
</tr>
<tr>
<td colspan=3 align=center><br />
<input type="hidden" name="webjob_id" value="<?=$webjob_id?>" />
<input type="hidden" name="applicant_id" value="<?=$applicant_id?>" />
<input type="hidden" id="lim" name="limit" value="">
<input type="hidden" id="fin" name="fin" value="<?=$fin?>">
<input type="hidden" id="whatapply" name="whatapply" value="<?=$whatapply?>">
<? if($applicant_id) {
$whatsave = 'Finish Application';
} else {
$whatsave = 'Save';
} ?>
<input type=submit value="<?=$whatsave?>" name="user2" class="button" />
<!--<? if($resume && $applicant_id){ ?>
<input type=submit value="Finish Application" name="user3" class="button" onclick="thisonly2.action='thankyou_apply.php?applicant_id=<?=$applicant_id?>&table=<?=$fin?>'; thisonly2.target='_self';" />
<? } ?>-->
</td>
</tr>
</table>
</form>
<br />
</td></tr>
</table>
</td></tr>
</table>
</div>
<div id="apply" style=" <?=$style2?>">
<div style="padding-top:3px; background-color:#FFFFFF;" align="left" class="applyonline"><font size=2 color=maroon><b>Apply Online</b></font> </div>
<? if(!$applicant_id) { ?>
<div style="clear:both; padding-bottom:10px; padding-top:5px; font-size:10px; font-family:verdana, arial; color:#ffffff; font-size:11px; text-decoration:none;" align="left"><a style="cursor:pointer" onclick="window.location='apply_online.php?webjob_id=<?=$webjob_id?>&whatapply=1'">[change to encode my resume]</a></div>
<? } ?>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="jobs1">
<tr>
<td>
<? if($applicant_id) {
$val=" Next ";
echo "<form action='sqlupdate.php?what=personal&what1=$what1' name='$formname' onsubmit='return validate_form()' enctype='MULTIPART/FORM-DATA' method='post' >";
echo "<input type='hidden' name='table2' value='$table' />";
} else {
$val=" Next ";
echo " <form method='post' action='sqladd.php?what=web_personal' name='$formname' onsubmit='return validate_form()' enctype='MULTIPART/FORM-DATA'> ";
} ?>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<? if($applicant_id) { ?>
<tr><td style="padding-top:10px;" align="center" class="style3"><? if($table=='personal') { ?><a href="apply_online.php?applicant_id=<?=$applicant_id?>&table=personal&action=check_again"><?=($phpself=="apply_online.php")? "<font color='#000000'>" : ""?>Personal</font></a> | <a href="apply_online_education.php?applicant_id=<?=$applicant_id?>&table=education&action=check">Education</a> | <a href="apply_online_employment.php?applicant_id=<?=$applicant_id?>&table=employment&action=check">Work Experience</a> | <a href="apply_online_training.php?applicant_id=<?=$applicant_id?>&table=training&action=check">Trainings/Seminars</a> | <a href="apply_online_doc.php?applicant_id=<?=$applicant_id?>&table=doc_library&action=check">Document Attachment</a>
<? if(getWEcount("employment",$applicant_id) > '0'&& getEDcount("education",$applicant_id) > '0') { ?>
| <a href="jobs.php"> Logout </a>
<? } else { ?>
| <a href="#" onClick="return alertme();"> Logout </a>
<? } } else {?><a href="apply_online.php?applicant_id=<?=$applicant_id?>&table=web_personal&action=check"><?=($phpself=="apply_online.php")? "<font color='#000000'>" : ""?>Personal</font></a> | <a href="apply_online_education.php?applicant_id=<?=$applicant_id?>&table=web_education&action=check">Education</a> | <a href="apply_online_employment.php?applicant_id=<?=$applicant_id?>&table=web_employment&action=check">Work Experience</a> | <a href="apply_online_training.php?applicant_id=<?=$applicant_id?>&table=web_training&action=check"><?=($phpself=="apply_online_training.php")? "<font color='#000000'>" : ""?>Trainings/Seminars</font> </a> | <a href="apply_online_doc.php?applicant_id=<?=$applicant_id?>&table=web_doc_library&action=check">Document Attachment</a>
<? if(getWEcount("web_employment",$applicant_id) > '0' && getEDcount("web_education",$applicant_id) > '0') { ?>
| <a href="thankyou_apply.php?applicant_id=<?=$applicant_id?>&table=web_training"> Finish Application </a>
<? } else { ?>
| <a href="#" onClick="return alertme();"> Finish Application </a><? } } ?></td></tr>
<? } ?>
<tr><td align=right style="padding-top:10px;">Step <b><font color="#0099FF">1</font></b> of 5</td></tr>
<tr><td valign="top" align="left">
<table width=100% border="0" cellpadding="2" cellspacing="2">
<tr>
<td class="box">Category:</td>
<td class="box">
<div>
<? if($applicant_id) {?>
<?
if($table=='personal') {
$catid = $applicant["category_id1"];
} else {
$catid = $applicant["category_id"];
}
?>
<select name="category_id" id="category_id" onChange="load_category2();" style="width:290px;">
<option value=""></option>
<?selectcode($category,$catid,"category_id","name")?>
</select>
<? } else { ?>
<select name="category_id" id="category_id" onChange="load_category2();" style="width:290px;">
<option value=""></option>
<?selectcode($category,$job1[category_id],"category_id","name")?>
</select>
<? } ?>
<span style="color:#FF0000;"> * </span></div>
<div class=errorMessage id=categoryError>Required: Please enter Category</div>
</td>
<td rowspan="3" align="right" valign="top"><a href="<?=$pic_dir.$applicant[picture]?>" rel="lightbox" title="<?=$applicant[applicant_id]?>"><? if ($applicant[picture]){echo resize_pic1(60,60,$pic_dir.$applicant[picture],"","","","1");}?></a></td>
</tr>
<tr>
<td width="140">Position Applying:</td>
<td><div><? if($applicant_id) {?>
<select name="position1" id="position1" style="width:290px;">
<option value=''></option>
<?selectcode($positions,$applicant['position_id1'],"position_id","name")?>
</select>
<? } else { ?>
<select name="position1" id="position1" style="width:290px;">
<option value=''>
<?selectcode($positions,$job1['position_id'],"position_id","name")?>
</select>
<? } ?><span style="color:#FF0000;"> * </span></div><div class=errorMessage id=positionError>Required: Please enter Position Applying</div></td>
</tr>
<tr>
<td>Years of Experience :</td>
<td>Local: <input type="text" name="position1_yrsofexp" value="<?=$applicant[position1_yrsofexp]?>" size=3 onfocus="select()" onkeypress="return isNumberKey(event);" maxlength="2"> years <input type="text" name="position1_mosofexp" value="<?=$applicant[position1_mosofexp]?>" size=3 onfocus="select()" onkeypress="return isNumberKey(event);" maxlength="2"> months </td>
</tr>
<tr>
<td> </td>
<td>Abroad: <input type="text" name="position1_yrsofexp_abroad" value="<?=$applicant[position1_yrsofexp_abroad]?>" size=3 onfocus="select()" onkeypress="return isNumberKey(event);" maxlength="2"> years <input type="text" name="position1_mosofexp_abroad" value="<?=$applicant[position1_mosofexp_abroad]?>" size=3 onfocus="select()" onkeypress="return isNumberKey(event);" maxlength="2"> months </td>
</tr>
<input type="hidden" name="webjob_id" value="<?=$webjob_id?>">
<input type="hidden" name="applicant_id" value="<?=$applicant_id?>">
<input type="hidden" name="table" value="<?=$table?>">
<tr height=5><td colspan=3 class=box></td></tr>
<tr>
<td>Last Name:</td>
<td colspan="2"><div><input type=text name="lname" id="lname" size=35 value="<?=$applicant[lname]?>" onkeypress="return alphaOnly(event);"> <span style="color:#FF0000;"> * </span></div><div class=errorMessage id=lnameError>Required: Please enter your last name</div></td>
</tr>
<tr>
<td>First Name:</td>
<td colspan="2"><div><input type=text name="fname" id="fname" size=35 value="<?=$applicant[fname]?>" onkeypress="return alphaOnly(event);"> <span style="color:#FF0000;"> * </span></div><div class=errorMessage id=fnameError>Required: Please enter your first name</div></td>
</tr>
<tr>
<td>Middle Name:</td>
<td colspan="2"><div><input type=text name="mname" id="mname" size=17 value="<?=$applicant[mname]?>" onkeypress="return alphaOnly(event);"> <span style="color:#FF0000;"> * </span><span style="color:#000000; font-size:9px; background:#ffff00; padding:3px;">(Kindly provide your complete middle name)</span></div><div class=errorMessage id=mnameError>Required: Please enter your middle name and make it complete</div></td>
</tr>
<tr>
<td valign="top">Present Address:</td>
<td colspan="2">
<textarea name="address1" cols="45" rows="3"><?=$applicant[address1]?></textarea></td>
</tr>
<tr>
<td>Tel [Office] :</td>
<td colspan="2"><input type=text name=office_phone size=25 value="<?=$applicant[office_phone]?>"> </td>
</tr>
<tr>
<td>Tel [Home] :</td>
<td colspan="2"><input type=text name=home_phone size=25 value="<?=$applicant[home_phone]?>"> </td>
</tr>
<tr>
<td>Cellphone :</td>
<td colspan="2"><div><input type=text name="cellphone" id="cellphone" size=25 value="<?=$applicant[cellphone]?>" onkeypress="return isNumberKey(event);" maxlength="11"> <span style="color:#FF0000; font-size:9px;">* <span style="color:#000000; font-size:9px; background:#ffff00; padding:3px;">example: 09177340642</span></span></div><div class=errorMessage id=cellphoneError>Required: Please Enter your Cellphone No. & must 11 digit</div></td>
</tr>
<tr>
<td valign="top">Email Address :</td>
<td colspan="2"><span style="color:#000000; font-size:9px; background:#ffff00; padding:3px;">This is your username for the applicant login section</span><div style="padding-top:3px;"><input type=text name="email" id="email" size=30 value="<?=$applicant[email]?>"> <span style="color:#FF0000;"> *</span></div><div class=errorMessage id=emailError>Required: Please enter your email address</div><div class=errorMessage id=emailvalidError>Error: Please enter valid email address</div></td>
</tr>
<!--<tr>
<td valign="top">Password :</td>
<td colspan="2"><div style="color:#000000; font-size:9px; background:#ffff00; padding:3px;">If you like to edit your resume in the future and view the status of your application, please put a password</div><div style="padding-top:1px;"><input type=password name="password1" id="password1" size=15 value="<?=$applicant[password]?>"> <span style="color:#FF0000;"> *</span></div><div class=errorMessage id=passwordError>Required: Please enter your password</div><div class=errorMessage id=passwordvalidError>Error: Password and Re-type Password are not the same</div></td>
</tr>
<tr>
<td>Re-type Password :</td>
<td colspan="2"><div><input type=password name="password2" id="password2" size=15 value=""> <span style="color:#FF0000;"> *</span><span style="color:#000000; font-size:9px; background:#ffff00; padding:3px;">Repeat password</span></div><div class=errorMessage id=password2Error>Required: Please enter your password</div><div class=errorMessage id=password2validError>Error: Password and Re-type Password are not the same</div></td>
</tr>-->
<tr>
<td valign=top colspan=3>Permanent Address:</td>
</tr>
<tr>
<td>No./Bldg. :</b></td>
<td colspan="2"><input type=text name="perm_no" size=25 value="<?=$applicant[perm_no]?>"></td>
</tr>
<tr>
<td>Street/Barangay :</b></td>
<td colspan="2"><input type=text name="perm_st" size=45 value="<?=$applicant[perm_st]?>"> </td>
</tr>
<tr>
<td>Municipality/City :</b></td>
<td colspan="2"><input type=text name="perm_city" size=45 value="<?=$applicant[perm_city]?>"></td> </tr>
<tr><td> Province :</b></td>
<td colspan="2"><input type=text name="perm_prov" size=40 value="<?=$applicant[perm_prov]?>"></td>
</tr>
<tr ><td>Zip Code :</b></td>
<td colspan="2"> <input type=text name=perm_zip size=5 maxlength=5 value="<?=$applicant[perm_zip]?>" onkeypress="return isNumberKey(event);"> </td>
</tr>
<tr>
<td>Birthdate :</td>
<td colspan="2"><div>
<? list ($bday_year, $bday_month, $bday_day) = split ('[-]', $applicant[birthdate]); ?>
<?echo dateselect("bday_month","month","$bday_month",0,0);?>
<?echo dateselect("bday_day","day","$bday_day",0,0);?>
<?echo dateselect("bday_year","year","$bday_year",0,0);?> <span style="color:#FF0000;"> * </span></div><div class=errorMessage id=bdateError>Required: Please enter your Birth Date</div></td>
</tr>
<tr>
<td>Birth Place :</td>
<td colspan="2"><input type=text name=birthplace size=60 value="<?=$applicant[birthplace]?>"> </td>
</tr>
<tr>
<td>Height:</td>
<td colspan="2"><input type=text name=height1 size=6 maxlength=10 value="<?=$applicant[height1]?>" onfocus="select()">
<select name="height2">
<?selectcode2($height,$applicant[height2])?>
</select> <a onclick="return popup(this,'examplea')" href="irisonline/converter.php"><font size="1"><u>Convert from ft. to cm.</u></font></a></td>
</tr>
<tr>
<td>Weight:</td>
<td colspan="2"><input type=text name=weight1 size=6 maxlength=10 value="<?=$applicant[weight1]?>" onfocus="select()">
<select name="weight2">
<?selectcode2($weight,$applicant[weight2])?>
</select> <a onclick="return popup(this,'examplea')" href="irisonline/converter.php"><font size="1"><u>Convert from lbs. to kg.</u></font></a></td>
</tr>
<tr>
<td>Gender :</td>
<td colspan="2">
<? if($applicant_id) { ?>
<?radiocode($sex,$applicant[sex],"sex")?>
<? } else { ?>
<?radiocode($sex,"","sex")?>
<? } ?><span style="color:#FF0000;"> * </span>
</td>
</tr>
<tr>
<td>Civil Status :</td>
<td colspan="2"><select name="civil_status">
<?selectcode2($civilstatus,$applicant[civil_status])?>
</select></td>
</tr>
<tr>
<td>Religion :</td>
<td colspan="2"><input type=text name=religion size=30 value="<?=$applicant[religion]?>"> </td>
</tr>
<tr>
<td>Nationality :</td>
<td colspan="2"><input type=text name="nationality" size=30 value="<?=($applicant[nationality])? $applicant[nationality] : "Filipino"?>" onfocus="select()"> </td>
</tr>
<tr>
<td> </td>
<td colspan="2"><span style="color:#000000; font-size:9px; background:#ffff00; padding:3px;">Click Browse to look for your picture on your computer.</span></td>
</tr>
<tr>
<td align="left" valign="top">Picture :</td>
<td colspan="2" align="left" class="data">
<? if($applicant[picture]) { ?>
<a href="<?=$pic_dir.$applicant[picture]?>" rel="lightbox" title="<?=$applicant[applicant_id]?>">
<?=$pic=basename($applicant[picture]);?></a> <a href="sqldelete.php?what=picture&picture=<?=$applicant[picture]?>&applicant_id=<?=$applicant_id?>&table=<?=$table?>&whatapply=<?=$whatapply?>" onclick="return confirm('Are you sure you want to remove this picture?');"><font size=1>[Remove]</font></a>
<? } else { ?>
<input name="picture" type="file" size="30" class="button"/>
<? } ?>
<input type=hidden name=pic value=<?=$applicant[picture]?>></td>
</tr>
<tr>
<td> </td>
<td colspan="2" class="data">
<div><span style="color:#000000; font-size:9px; background:#ffff00; padding-top:3px; padding-left:3px;"><b>Note:</b> Your picture must have a maximum size of 50KB and </span></div>
<div><span style="color:#000000; font-size:9px; background:#ffff00; padding-bottom:3px; padding-left:3px;">must have a maximum dimension of 150 by 150 pixels.</span></div>
<br /><br />
<span style="color:#000000; font-size:9px; background:#ffff00; padding:3px;">If you need to edit your picture, try these free online editing tools</span>
<div style="padding-top:5px;"></div><a href="http://www.freeonlinephotoeditor.com/" title="http://www.freeonlinephotoeditor.com/"><span style="font-size:9px;">http://www.freeonlinephotoeditor.com/</span></a><br />
<a href="http://pixer.us/" title="http://pixer.us/"><span style="font-size:9px;">http://pixer.us/</span></a>
</td>
</tr>
<tr>
<td colspan=3 align=center><br>
<input type="hidden" id="whatapply" name="whatapply" value="<?=$whatapply?>">
<input type=submit value="<?=$val?>" name="user" class="button">
</form><br /><br /></td>
</tr>
</table>
</td></tr>
</table>
</td></tr>
</table>
</div>
</td></tr>
</table>
</td></tr>
</table>
</div>
</div>
</div>
<?
do_footer();
if($msg) echo "<script>alert('$msg')</script>";
?>