Exemple #1
0
<div class="form_main">
<div id="task_area" class="small_text">


<?php 
echo $task->GetTaskForProjectProfile('', '', '', '', '', '', '', 1, 'TBL_CONTACT', $em->GetContactID());
if ($_POST['save_edit'] == 'Save') {
    $task->EditTask('server', $_POST['task_id'], 'task', $em->GetContactID());
}
?>
</div>
</div>

<div class="data_box">
<?php 
echo $em->GetContactProfile($em->GetContactID());
?>
</div>

<?php 
if ($open_task == "yes") {
    ?>
<script type="text/javascript">
document.getElementById('task_form').style.display='';
document.getElementById('task_link').style.display='none';
</script>
<?php 
}
?>
<div id="div_contacts_in_company" class="data_box form_main">
<?php 
Exemple #2
0
    function EditResume($runat, $contact_id)
    {
        $this->cont_id = $contact_id;
        $this->contact_id = $contact_id;
        $FormName = 'editresume';
        switch ($runat) {
            case 'local':
                $sql_contact = "select * from " . TBL_CONTACT . " where contact_id='" . $this->cont_id . "'";
                $result_contact = $this->db->query($sql_contact, __FILE__, __LINE__);
                $row_contact = $this->db->fetch_array($result_contact);
                $sql_app_general = "select * from " . EM_APPLICATION_GENERAL . " where contact_id='" . $this->cont_id . "'";
                $result_app_general = $this->db->query($sql_app_general, __FILE__, __LINE__);
                $row_app_general = $this->db->fetch_array($result_app_general);
                if ($this->db->num_rows($result_app_general) <= 0) {
                    $insert_sql_array = array();
                    $insert_sql_array[contact_id] = $this->cont_id;
                    $this->db->insert(EM_APPLICATION_GENERAL, $insert_sql_array);
                }
                $sql_address = "select * from " . CONTACT_ADDRESS . " where contact_id='" . $this->cont_id . "'";
                $result_address = $this->db->query($sql_address, __FILE__, __LINE__);
                $row_address = $this->db->fetch_array($result_address);
                $sql_education_hs = "select * from " . EM_APPLICATION_EDUCATION . " where contact_id='" . $this->cont_id . "' and title='High School'";
                $result_education_hs = $this->db->query($sql_education_hs, __FILE__, __LINE__);
                $row_education_hs = $this->db->fetch_array($result_education_hs);
                if ($this->db->num_rows($result_education_hs) <= 0) {
                    $insert_sql_array = array();
                    $insert_sql_array[contact_id] = $this->cont_id;
                    $this->db->insert(EM_APPLICATION_EDUCATION, $insert_sql_array);
                }
                $sql_education_col = "select * from " . EM_APPLICATION_EDUCATION . " where contact_id='" . $this->cont_id . "' and title='College'";
                $result_education_col = $this->db->query($sql_education_col, __FILE__, __LINE__);
                $row_education_col = $this->db->fetch_array($result_education_col);
                $sql_education_othr = "select * from " . EM_APPLICATION_EDUCATION . " where contact_id='" . $this->cont_id . "' and title='Other'";
                $result_education_othr = $this->db->query($sql_education_othr, __FILE__, __LINE__);
                $row_education_othr = $this->db->fetch_array($result_education_othr);
                $sql_references = "select * from " . EM_APPLICATION_REFERENCES . " where contact_id='" . $this->cont_id . "'";
                $result_references = $this->db->query($sql_references, __FILE__, __LINE__);
                if ($this->db->num_rows($result_references) <= 0) {
                    $insert_sql_array = array();
                    $insert_sql_array[contact_id] = $this->cont_id;
                    $this->db->insert(EM_APPLICATION_REFERENCES, $insert_sql_array);
                }
                $sql_prev_employment = "select * from " . EM_APPLICATION_PREVIOUS_EMPLOYMENT . " where contact_id='" . $this->cont_id . "'";
                $result_prev_employment = $this->db->query($sql_prev_employment, __FILE__, __LINE__);
                if ($this->db->num_rows($result_prev_employment) <= 0) {
                    $insert_sql_array = array();
                    $insert_sql_array[contact_id] = $this->cont_id;
                    $this->db->insert(EM_APPLICATION_PREVIOUS_EMPLOYMENT, $insert_sql_array);
                }
                $sql_military = "select * from " . EM_APPLICATION_MILITARY_SERVICE . " where contact_id='" . $this->cont_id . "'";
                $result_military = $this->db->query($sql_military, __FILE__, __LINE__);
                $row_military = $this->db->fetch_array($result_military);
                if ($this->db->num_rows($result_military) <= 0) {
                    $insert_sql_array = array();
                    $insert_sql_array[contact_id] = $this->cont_id;
                    $this->db->insert(EM_APPLICATION_MILITARY_SERVICE, $insert_sql_array);
                }
                //create client side validation
                $formName = 'frmRegistration';
                $ControlNames = array("first_name" => array('first_name', "''", "Required !!", "spanfirst_name"), "last_name" => array('last_name', "''", "Required !!", "spanlast_name"), "street_address" => array('street_address', "''", "Required !!", "spanstreet_address"), "city" => array('city', "''", "Required !!", "spancity"), "zip" => array('zip', "''", "Required !!", "spanzip"), "position_applied" => array('position_applied', "''", "Required !!", "spanposition_applied"), "signature" => array('signature', "''", "Required !!", "spansignature"));
                $this->ValidationFunctionName = "frmRegistration_CheckValidity";
                $JsCodeForFormValidation = $this->Validity->ShowJSFormValidationCode($formName, $ControlNames, $this->ValidationFunctionName, $SameFields, $ErrorMsgForSameFields);
                echo $JsCodeForFormValidation;
                ?>
		

<form action="<?php 
                echo $_SERVER['PHP_SELF'];
                ?>
?contact_id=<?php 
                echo $this->cont_id;
                ?>
&index=Edit" method="post" name="frmRegistration" id="frmRegistration" >
								<input type="hidden" name="setform" value="set"/>
								<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
									<tr>
									<td><?php 
                $em = new Event_Contacts();
                ?>
										<div class="data_box">
										<?php 
                echo $em->GetContactProfile($this->cont_id);
                ?>
										</div>
										</td>
									</tr>
									
									<tr>
										<td align="left" valign="top"><?php 
                if ($error) {
                    $this->Form->ErrorString .= $error;
                    echo $this->Form->ErrtxtPrefix . $this->Form->ErrorString . $this->Form->ErrtxtSufix;
                }
                ?>
</td>
									</tr>
									<tr>
										<td align="left" valign="top">
											<table width="100%" border="0" cellspacing="0" cellpadding="0" class="border1">
												<tr>
													<td height="25" align="left" valign="middle" class="login">APPLICANT INFORMATION</td>
												</tr>
												<tr>
													<td align="left" valign="top">&nbsp;</td>
												</tr>
												<tr>
													<td align="left" valign="top">
														<table width="100%" border="0" cellspacing="0" cellpadding="0">
															<tr>
																<td  align="left" valign="top">
																	<table width="100%" border="0" cellspacing="0" cellpadding="0">
																		<tr>
																			<td  height="30" align="left" valign="top" class="text1">Last Name </td>
																			<td  align="left" valign="top">
																				<input name="last_name" id="last_name" value="<?php 
                echo $row_contact['last_name'];
                ?>
" type="text" class="textbox1" />
																				&nbsp;<span id="spanlast_name" class="normal">&nbsp;</span>														</td>
																		</tr>
																	</table>											</td>
																<td  align="left" valign="top">
																	<table width="100%" border="0" cellspacing="0" cellpadding="0">
																		<tr>
																			<td  height="30" align="left" valign="top" class="text1">First Name </td>
																			<td  align="left" valign="top">
																				<input name="first_name" id="first_name" value="<?php 
                echo $row_contact['first_name'];
                ?>
" type="text" class="textbox1" />
																				&nbsp;<span id="spanfirst_name" class="normal">&nbsp;</span>														</td>
																		</tr>
																	</table>											</td>
																<td  align="left" valign="top" class="text1">M. I.</td>
																<td  align="left" valign="top">
																<input type="text" name="middle_name" id="middle_name" value="<?php 
                echo $row_app_general['mi'];
                ?>
" class="textbox2" /></td>
																<td  align="left" valign="top" class="text1">
																<table width="100%" border="0" cellspacing="0" cellpadding="0">
																  <tr>
																	<td valign="top">Date&nbsp;<input type="text" name="date_posted" id="date_posted" class="date" readonly="readonly" value="<?php 
                echo $row_app_general['date'];
                ?>
" /></td>
																	<td><img src="../images/b_calendar.png" id='button1' onMouseOver="javascript:document.body.style.cursor='hand';" onMouseOut="javascript:document.body.style.cursor='default';">&nbsp;<span id="spandate_posted" class="normal">&nbsp;</span></td>
																  </tr>
																</table>					
																
																
																<script language="javascript" type="text/javascript">
																	var startDate;
																	var endDate;
														
																	function resetDates() {
																		startDate = endDate = null;
																	}
															
																	function filterDates1(cal) {
																		startDate = new Date(cal.date)
																		startDate.setHours(0,0,0,0)	// used for compares without TIME
																		
																		if (endDate == null) { 
																			Zapatec.Calendar.setup({
																				inputField     :    "date_posted",
																				button         :    "button1",  // What will trigger the popup of the calendar
																				ifFormat       :    "%m-%d-%Y",
																				date           :     cal.date,
																				showsTime      :     false,          //no time
																				dateStatusFunc :    disallowDateBefore, //the function to call
																				onUpdate       :    filterDates2
																			});
																		}
																	}
					
																	function filterDates2(cal) {
																		var date = cal.date;
																		endDate = new Date(cal.date)
																		endDate.setHours(0,0,0,0)	// used for compares without TIME
																	}
						
																	
																	function disallowDateBefore(dateCheckOut) {
																		dateCheckOut.setHours(0,0,0,0)
																		if ((startDate != null) && startDate > dateCheckOut)
																			// startDate is defined, make sure cal date is NOT before start date
																			return true; 
																		
																		var now = new Date()
																		now.setHours(0,0,0,0)
																		if (dateCheckOut < now) 
																			// check out date can not be befor today if startDate NOT defined
																			return true;
															
																		return false;
																	}
										
																	
																	function disallowDateAfter(dateCheckIn) {
																		dateCheckIn.setHours(0,0,0,0)
																		if ((endDate != null) && dateCheckIn > endDate)
																			// endDate defined, calendar date can NOT be after endDate
																			return true;
															
																		var now = new Date()
																		now.setHours(0,0,0,0)
															
																		if (dateCheckIn < now)
																			// endDate NOT defined, calendar date can not be before today
																			return true;
															
																		return false;
																	}
									
																	// end hiding contents from old browsers  -->
																</script>
															
																<script type="text/javascript">
																	var cal = new Zapatec.Calendar.setup({
																								
																	 inputField     :    "date_posted",   // id of the input field
																	 button         :    "button1",  // What will trigger the popup of the calendar
																	 ifFormat       :    "%m-%d-%Y",       // format of the input field: Mar 18, 2005
																	 showsTime      :     false,          //no time
																	 dateStatusFunc :    disallowDateAfter, //the function to call
																	 onUpdate       :    filterDates1
															
																	});
															
																</script>											</td>
															</tr>
														</table>								</td>
												</tr>
												<tr>
													<td align="left" valign="top">
														<table width="100%" border="0" cellspacing="0" cellpadding="0">
															<tr>
																<td  align="left" valign="middle">
																	<table width="100%" border="0" cellspacing="0" cellpadding="0">
																		<tr>
																			<td  height="30" align="left" valign="top" class="text1">Street Address </td>
																			<td  align="left" valign="top">
																				<input name="street_address" id="street_address" value="<?php 
                echo $row_address['street_address'];
                ?>
" type="text" class="textbox4" />
																				&nbsp;<span id="spanstreet_address" class="normal">&nbsp;</span>														</td>
																		</tr>
																	</table>											</td>
																<td align="left" valign="top" class="text1">Apartment/Unit #&nbsp;&nbsp;<input type="text" name="apartment_no" id="apartment_no" value="<?php 
                echo $row_app_general['apartment'];
                ?>
" class="textbox3" />&nbsp;<span id="spanapartment_no" class="normal">&nbsp;</span></td>
															</tr>
														</table>								</td>
												</tr>
												<tr>
													<td align="left" valign="top">
														<table width="100%" border="0" cellspacing="0" cellpadding="0">
															<tr>
																<td  align="left" valign="top">
																	<table width="100%" border="0" cellspacing="0" cellpadding="0">
																		<tr>
																			<td  height="30" align="left" valign="top" class="text1">City</td>
																			<td  align="left" valign="top">
																				<input name="city" id="city" value="<?php 
                echo $row_address['city'];
                ?>
" type="text" class="textbox1" />
																				&nbsp;<span id="spancity" class="normal">&nbsp;</span>																			</td>
																		</tr>
																	</table>																</td>
																<td  align="left" valign="middle">
																	<table width="100%" border="0" cellspacing="0" cellpadding="0">
																		<tr>
																			<td width="100" height="30" align="left" valign="top" class="text1">State</td>
																			<td width="200" align="left" valign="top">
																				<select style="width:auto" name="state" id="state" class="dropdownlist1">
																					<option value="">Select State</option>
																					<?php 
                $state = file("state_us.inc");
                foreach ($state as $val) {
                    $state = trim($val);
                    ?>
																					<option <?php 
                    if ($row_address['state'] == $state) {
                        echo 'selected="selected"';
                    }
                    ?>
 value="<?php 
                    echo $state;
                    ?>
"><?php 
                    echo $state;
                    ?>
</option>
																					<?php 
                }
                ?>
																				</select>
																				
																				&nbsp;<span id="spanstate" class="normal">&nbsp;</span>																			</td>
																		</tr>
																	</table>																</td>
																<td  align="left" valign="top" class="text1">Zip Code&nbsp;&nbsp;<input name="zip" id="zip" value="<?php 
                echo $row_address['zip'];
                ?>
" type="text" class="textbox5" /> <br />
																&nbsp;<span id="spanzip" class="normal">&nbsp;</span></td>
																<td  align="left" valign="middle">&nbsp;</td>
															</tr>
														</table>													</td>
												</tr>
												<tr>
												<td>&nbsp;
												<!--<table class="table">-->
												<?php 
                //$this->contact->contact_id = $this->cont_id;
                //$this->contact->EditContactPhone('local');
                ?>
												<?php 
                //$this->contact->EditContactEmail('local');
                ?>
												<?php 
                ///$this->contact->EditContactIm('local');
                ?>
												<?php 
                //$this->contact->EditContactWebsite('local');
                ?>
												<?php 
                //$this->contact->EditContactTwitter('local');
                ?>
												<!--</table>--></td></tr>
												<tr>
													<td align="left" valign="top">
														<table width="100%" border="0" cellspacing="0" cellpadding="0">
															<tr>
																<td  align="left" valign="top">
																	<table  border="0" cellspacing="0" cellpadding="0">
																		<tr>
																			<td  height="30" align="left" valign="middle" class="text1"></td>
																			<td  align="left" valign="middle">
																				
																				&nbsp;<span id="spanphone" class="normal">&nbsp;</span>																			</td>
																		</tr>
																</table>																</td>
																<td  align="left" valign="top">
																	<table width="100%" border="0" cellspacing="0" cellpadding="0">
																		<tr>
																			<td  height="30" align="left" valign="middle" class="text1"></td>
																			<td  align="left" valign="middle">
																				
																				&nbsp;<span id="spanemail" class="normal">&nbsp;</span>																			</td>
																		</tr>
																	</table>																</td>
															</tr>
														</table>													</td>
												</tr>
												
												<tr>
													<td align="left" valign="top">
														<table width="100%" border="0" cellspacing="0" cellpadding="0">
															<tr>
																<td  align="left" valign="top">
																	<table width="100%" border="0" cellspacing="0" cellpadding="0">
																		<tr>
																			<td  height="30" align="left" valign="middle" class="text1">Date Available</td>
																			<td  align="left" valign="middle">
																				<input name="date_available" id="date_available" type="text" value="<?php 
                echo $row_app_general['date_available'];
                ?>
" class="date_available" readonly="readonly" />&nbsp;<img src="../images/b_calendar.png" id='button2' onMouseOver="javascript:document.body.style.cursor='hand';" onMouseOut="javascript:document.body.style.cursor='default';">&nbsp;<span id="spandate_available" class="normal">&nbsp;</span>
																				<script language="javascript" type="text/javascript">
																					var startDate;
																					var endDate;
																		
																					function resetDates() {
																						startDate = endDate = null;
																					}
																			
																					function filterDates1(cal) {
																						startDate = new Date(cal.date)
																						startDate.setHours(0,0,0,0)	// used for compares without TIME
																						
																						if (endDate == null) { 
																							Zapatec.Calendar.setup({
																								inputField     :    "date_available",
																								button         :    "button2",  // What will trigger the popup of the calendar
																								ifFormat       :    "%m-%d-%Y",
																								date           :     cal.date,
																								showsTime      :     false,          //no time
																								dateStatusFunc :    disallowDateBefore, //the function to call
																								onUpdate       :    filterDates2
																							});
																						}
																					}
									
																					function filterDates2(cal) {
																						var date = cal.date;
																						endDate = new Date(cal.date)
																						endDate.setHours(0,0,0,0)	// used for compares without TIME
																					}
										
																					
																					function disallowDateBefore(dateCheckOut) {
																						dateCheckOut.setHours(0,0,0,0)
																						if ((startDate != null) && startDate > dateCheckOut)
																							// startDate is defined, make sure cal date is NOT before start date
																							return true; 
																						
																						var now = new Date()
																						now.setHours(0,0,0,0)
																						if (dateCheckOut < now) 
																							// check out date can not be befor today if startDate NOT defined
																							return true;
																			
																						return false;
																					}
														
																					
																					function disallowDateAfter(dateCheckIn) {
																						dateCheckIn.setHours(0,0,0,0)
																						if ((endDate != null) && dateCheckIn > endDate)
																							// endDate defined, calendar date can NOT be after endDate
																							return true;
																			
																						var now = new Date()
																						now.setHours(0,0,0,0)
																			
																						if (dateCheckIn < now)
																							// endDate NOT defined, calendar date can not be before today
																							return true;
																			
																						return false;
																					}
									
																				// end hiding contents from old browsers  -->
																		</script>
															
																		<script type="text/javascript">
																			var cal = new Zapatec.Calendar.setup({
																										
																			 inputField     :    "date_available",   // id of the input field
																			 button         :    "button2",  // What will trigger the popup of the calendar
																			 ifFormat       :    "%m-%d-%Y",       // format of the input field: Mar 18, 2005
																			 showsTime      :     false,          //no time
																			 dateStatusFunc :    disallowDateAfter, //the function to call
																			 onUpdate       :    filterDates1
																	
																			});
																	
																		</script>														</td>
																		</tr>
																	</table>											</td>
																<td  align="left" valign="top">
																	<table width="100%" border="0" cellspacing="0" cellpadding="0">
																		<tr>
																			<td   align="left" valign="top" class="text1"><?
																			if( $global["feature"]["social_security_number"] == true ){
																				echo "Social Security No.";
																			}
																			?></td>
																			<td  align="left" valign="middle">
																			<?
																			if( $global["feature"]["social_security_number"] == true ){
																			echo '
																				<input name="social_security_number" id="social_security_number" value="' . $_POST['social_security_number'] . '" type="text" class="textbox1" />
																				&nbsp;<span id="spansocial_security_number" class="normal">&nbsp;</span>														';
																				} else { echo "&nbsp;"; } 
																			?>																				</td>
																		</tr>
																	</table>											</td>
																<td align="left" valign="top">
																	<table width="100%" border="0" cellspacing="0" cellpadding="0">
																		<tr>
																			<td  height="30" align="left" valign="top" class="text1">Desired Salary $</td>
																			<td  align="left" valign="top">
																				<input onFocus="preventOpp('desired_salary');" name="desired_salary" id="desired_salary" value="<?php 
                echo $row_app_general['desired_salary'];
                ?>
" type="text" class="textbox7" />
																		  &nbsp;<span id="spandesired_salary" class="normal">&nbsp;</span>														</td>
																		</tr>
																	</table>											</td>
															</tr>
														</table>								</td>
												</tr>
												<tr>
													<td align="left" valign="top">
														<table width="100%" border="0" cellspacing="0" cellpadding="0">
															<tr>
																<td  height="30" align="left" valign="middle" class="text1">Position Applied for</td>
																<td  align="left" valign="middle">
																	<select name="position_applied" id="position_applied" class="dropdownlist1">
																		<option value="">---- Select Position For ----</option>
																		<option value="Dentist" <?php 
                if ($row_app_general['position_applied'] == "Dentist") {
                    echo 'selected="selected"';
                }
                ?>
>Dentist</option>
																		<option value="Dental Professionals" <?php 
                if ($row_app_general['position_applied'] == "Dental Professionals") {
                    echo 'selected="selected"';
                }
                ?>
>Dental Professionals</option>
																		<option value="Team Lead" <?php 
                if ($row_app_general['position_applied'] == "Team Lead") {
                    echo 'selected="selected"';
                }
                ?>
>Team Lead</option>
																		<option value="Other">Other</option>
																	</select>
																	&nbsp;<span id="spanposition_applied" class="normal">&nbsp;</span>											</td>
															</tr>
														</table>								</td>
												</tr>
												<tr>
													<td align="left" valign="top">
														<table width="100%" border="0" cellspacing="0" cellpadding="0">
															<tr>
																<td  height="30" align="left" valign="middle" class="text1">Have you ever applied with this company before?&nbsp;&nbsp;&nbsp;Yes&nbsp;<input  value="yes" name="before_applied" id="before_applied_yes" type="radio" <?php 
                if ($row_app_general['before_applied'] == "yes" || $row_app_general['before_applied'] == "Yes") {
                    echo 'checked="checked"';
                }
                ?>
/>&nbsp;&nbsp;NO&nbsp;<input  value="no" name="before_applied" id="before_applied_no" type="radio" <?php 
                if ($row_app_general['before_applied'] == "no" || $row_app_general['before_applied'] == "No") {
                    echo 'checked="checked"';
                }
                ?>
  />
																&nbsp;<span id="spanbefore_applied" class="normal">&nbsp;</span>											</td>
																<td  align="left" valign="middle" class="text1">If so , When?&nbsp;&nbsp;&nbsp;<input value="<?php 
                echo $row_app_general['when_before_applied'];
                ?>
" name="before_applied_when" id="before_applied_when" type="text" class="textbox5" />&nbsp;<span id="spanbefore_applied_when" class="normal">&nbsp;</span></td>
															</tr>
														</table>								</td>
												</tr>
												<tr>
													<td align="left" valign="top">
														<table width="100%" border="0" cellspacing="0" cellpadding="0">
															<tr>
																<td  height="30" align="left" valign="middle" class="text1">Have you ever worked for this company?&nbsp;&nbsp;&nbsp;Yes&nbsp;
																<input name="ever_worked" id="ever_worked_yes" type="radio" value="yes" <?php 
                if ($row_app_general['ever_worked'] == "yes" || $row_app_general['ever_worked'] == "Yes") {
                    echo 'checked="checked"';
                }
                ?>
/>
																&nbsp;&nbsp;NO&nbsp;
																<input name="ever_worked" id="ever_worked_no" type="radio" value="no" <?php 
                if ($row_app_general['ever_worked'] == "no" || $row_app_general['ever_worked'] == "No") {
                    echo 'checked="checked"';
                }
                ?>
/>&nbsp;<span id="spanever_worked" class="normal">&nbsp;</span></td>
																<td  align="left" valign="middle" class="text1">If so , When?&nbsp;&nbsp;&nbsp;
																<input name="ever_worked_when" id="ever_worked_when" type="text" class="textbox5" value="<?php 
                echo $row_app_general['when_ever_worked'];
                ?>
" />&nbsp;<span id="spanever_worked_when" class="normal">&nbsp;</span>											</td>
															</tr>
														</table>								</td>
												</tr>
												<tr>
													<td align="left" valign="top">
														<table width="100%" border="0" cellspacing="0" cellpadding="0">
															<tr>
																<td   align="left" valign="middle" class="text1">Have you ever been convicted of a felony ?&nbsp;&nbsp;&nbsp;Yes&nbsp;
																<input name="felony" id="felony_yes" type="radio" value="yes"  <?php 
                if ($row_app_general['felony'] == "yes" || $row_app_general['felony'] == "Yes") {
                    echo 'checked="checked"';
                }
                ?>
/>
																&nbsp;&nbsp;NO&nbsp;
																<input name="felony" id="felony_no" type="radio" value="no"  <?php 
                if ($row_app_general['felony'] == "no" || $row_app_general['felony'] == "No") {
                    echo 'checked="checked"';
                }
                ?>
/>
																&nbsp;<span id="spanfelony" class="normal">&nbsp;</span>											</td>
																<td  align="left" valign="middle" class="text1">If so , When?&nbsp;&nbsp;&nbsp;
																<input name="felony_when" id="felony_when" type="text" class="textbox5" value="<?php 
                echo $row_app_general['when_felony'];
                ?>
" /></td>
															</tr>
														</table>								</td>
												</tr>
											<tr>
											<td align="left" valign="top">&nbsp;</td>
											</tr>
											</table>					</td>
									</tr>
									<tr>
										<td align="left" valign="top">&nbsp;</td>
									</tr>
									<tr>
										<td align="left" valign="top">
											<table width="100%" border="0" cellspacing="0" cellpadding="0" class="border1">
												<tr>
													<td height="25" align="left" valign="middle" class="login">EDUCATION</td>
												</tr>
												<tr>
													<td align="left" valign="top"><table><?php 
                $this->EditApplicationEducation('local', $this->cont_id);
                ?>
</table></td>
												</tr>
											</table>					</td>
									</tr>
									<tr>
										<td align="left" valign="top">&nbsp;</td>
									</tr>
									<tr>
										<td align="left" valign="top">
											<table width="100%" border="0" cellspacing="0" cellpadding="0" class="border1">
												<tr>
													<td  align="left" valign="middle" class="login">REFERENCES</td>
												</tr>
												<tr>
													<td  align="left" valign="middle" class="text2">Please list three professional references.</td>
												</tr>
												<tr>
													<td align="left" valign="top"><table><?php 
                $this->EditApplicationReference('local', $this->cont_id);
                ?>
</table></td>
												</tr>
											</table>					</td>
									</tr>
									<tr>
										<td align="left" valign="top">&nbsp;</td>
									</tr>
									<tr>
										<td align="left" valign="top">
											<table width="100%" border="0" cellspacing="0" cellpadding="0" class="border1">
												<tr>
													<td  align="left" valign="middle" class="login">PREVIOUS EMPLOYMENT - BEGINNING WITH YOUR MOST RECENT EMPLOYER</td>
												</tr>
												<tr>
													<td align="left" valign="middle">&nbsp;</td>
												</tr>
											<tr>
												<td align="left" valign="top"><table><?php 
                $this->EditApplicationEmployment('local', $this->cont_id);
                ?>
</table></td>
											</tr>
										</table>				</td>
									</tr>
									<tr>
									  <td align="left" valign="top">&nbsp;</td>
									</tr>									
								  <tr>
									<td align="left" valign="top">&nbsp;</td>
								</tr>
								<tr>
									<td align="left" valign="top">
										<table width="100%" border="0" cellspacing="0" cellpadding="0" class="border1">
											<tr>
												<td height="25" align="left" valign="middle" class="login">MILITARY SERVICE</td>
											</tr>
											<tr>
												<td align="left" valign="middle">&nbsp;</td>
											</tr>
											<tr>
												<td align="left" valign="top">
													<table width="100%" border="0" cellspacing="0" cellpadding="0">
														<tr>
															<td  align="left" valign="top">
																<table width="100%" border="0" cellspacing="0" cellpadding="0">
																	<tr>
																		<td  height="30" align="left" valign="middle" class="text1">Branch</td>
																		<td  align="left" valign="middle">
																			<input name="military_branch" id="military_branch" value="<?php 
                echo $row_military['military_branch'];
                ?>
" type="text" class="textbox9" />													</td>
																	</tr>
																</table>										</td>
															<td  align="left" valign="top">
																<table width="100%" border="0" cellspacing="0" cellpadding="0">
																	<tr>
																		<td  height="30" align="left" valign="middle" class="text1">From</td>
																		<td  align="left" valign="middle">
																			<table width="100%" border="0" cellspacing="0" cellpadding="0">
																			  <tr>
																				<td  align="left"><input value="<?php 
                echo $row_military['military_from'];
                ?>
" name="military_from" id="military_from" readonly="readonly" type="text" class="date" /></td>
																				<td w align="left">&nbsp;<img src="../images/b_calendar.png" id='button18' onMouseOver="javascript:document.body.style.cursor='hand';" onMouseOut="javascript:document.body.style.cursor='default';"></td>
																			  </tr>
																			  <script type="text/javascript">
																					var cal = new Zapatec.Calendar.setup({
																					
																					inputField:"military_from",
																					ifFormat:"%m-%d-%Y",
																					button:"button18",
																					showsTime:false
																			
																					});
																					
																			</script>
																			</table>																		</td>
																		<td  align="left" valign="middle" class="text1">To</td>
																		<td  align="left" valign="middle">
																			<table width="100%" border="0" cellspacing="0" cellpadding="0">
																			  <tr>
																				<td align="left"><input value="<?php 
                echo $row_military['military_to'];
                ?>
" name="military_to" id="military_to" readonly="readonly" type="text" class="date" /></td>
																				<td align="left"><img src="../images/b_calendar.png" id='button19' onMouseOver="javascript:document.body.style.cursor='hand';" onMouseOut="javascript:document.body.style.cursor='default';"></td>
																			  </tr>
																			  <script type="text/javascript">
																					var cal = new Zapatec.Calendar.setup({
																					
																					inputField:"military_to",
																					ifFormat:"%m-%d-%Y",
																					button:"button19",
																					showsTime:false
																			
																					});
																					
																			</script>
																			</table>																		</td>
																	</tr>
																</table>															</td>
														</tr>
													</table>												</td>
											</tr>
											<tr>
												<td align="left" valign="top">
													<table width="100%" border="0" cellspacing="0" cellpadding="0">
														<tr>
															<td  align="left" valign="top">
																<table width="100%" border="0" cellspacing="0" cellpadding="0">
																	<tr>
																		<td  height="30" align="left" valign="middle" class="text1">Rank at Discharge</td>
																		<td  align="left" valign="middle"><input name="rank_at_discharge" id="rank_at_discharge" value="<?php 
                echo $row_military['rank_at_discharge'];
                ?>
" type="text" class="textbox9" /></td>
																	</tr>
																</table>										</td>
															<td  align="left" valign="top">
																<table width="100%" border="0" cellspacing="0" cellpadding="0">
																	<tr>
																		<td  height="30" align="left" valign="middle" class="text1">Type of Discharge</td>
																		<td  align="left" valign="middle"><input name="type_of_discharge" id="type_of_discharge" value="<?php 
                echo $row_military['type_of_discharge'];
                ?>
" type="text" class="textbox9" /></td>
																	</tr>
																</table>										</td>
														</tr>
													</table>							</td>
											</tr>
											<tr>
												<td align="left" valign="top">
													<table width="100%" border="0" cellspacing="0" cellpadding="0">
														<tr>
															<td width="27%" height="30" align="left" valign="middle" class="text1">If other than honorable, explain</td>
															<td width="600" align="left" valign="middle"><input name="honorable" id="honorable" value="<?php 
                echo $row_military['honorable'];
                ?>
" type="text" class="textbox14" /></td>
														</tr>
													</table>							</td>
											</tr>
											<tr>
												<td align="left" valign="top">&nbsp;</td>
											</tr>
										</table></td>
								</tr>
								<tr>
									<td align="center" valign="top">
										<input type="submit" name="btnRegistration" value="Update"   id="btnRegistration" onClick="return <?php 
                echo $this->ValidationFunctionName;
                ?>
();" /></td>
								</tr>
								<tr>
									<td align="left" valign="top">&nbsp;</td>
								</tr>
								<tr>
									<td align="left" valign="top">&nbsp;</td>
								</tr>
								</table>
</form>

			
	<?php 
                break;
            case 'server':
                $this->cont_id = $contact_id;
                extract($_POST);
                $return = true;
                if ($this->Form->ValidField($first_name, 'empty', 'Please Enter Your First Name') == false) {
                    $return = false;
                }
                if ($this->Form->ValidField($last_name, 'empty', 'Please Enter Your Last') == false) {
                    $return = false;
                }
                if ($this->Form->ValidField($street_address, 'empty', 'Please Enter Street Address') == false) {
                    $return = false;
                }
                if ($this->Form->ValidField($city, 'empty', 'Please Enter City') == false) {
                    $return = false;
                }
                /*if($this->Form->ValidField($state,'empty','Please Enter State')==false)
                		$return =false;*/
                if ($this->Form->ValidField($zip, 'empty', 'Please Enter Zip Code') == false) {
                    $return = false;
                }
                /*if($this->Form->ValidField($phone,'empty','Please Enter Phone Number')==false)
                			$return =false;
                		if($this->Form->ValidField($email,'empty','Please Enter Email-Id')==false)
                			$return =false;	*/
                if ($this->Form->ValidField($position_applied, 'empty', 'Please Enter Position Applied For') == false) {
                    $return = false;
                }
                if ($return) {
                    if (true) {
                        /***************************** insert as contact ***************************************/
                        $update_sql_array = array();
                        $update_sql_array['first_name'] = $_POST[first_name];
                        $update_sql_array['type'] = 'People';
                        $update_sql_array['user_id'] = $user_id;
                        $update_sql_array['last_name'] = $_POST[last_name];
                        $this->db->update(TBL_CONTACT, $update_sql_array, "contact_id", $this->cont_id);
                        $this->contact->contact_id = $this->cont_id;
                        /*$this->contact->EditContactPhone('server');
                        		$this->contact->EditContactEmail('server');
                        		$this->contact->EditContactIm('server');
                        		$this->contact->EditContactWebsite('server');
                        		$this->contact->EditContactTwitter('server');*/
                        /*$insert_sql_array = array();
                        		$insert_sql_array['contact_id'] = $this->contact_id;
                        		$insert_sql_array['number'] = $_POST[phone];
                        		$insert_sql_array['type'] = 'Home';
                        		$this->db->insert(CONTACT_PHONE,$insert_sql_array);
                        		
                        		$insert_sql_array = array();
                        		$insert_sql_array['contact_id'] = $this->contact_id;
                        		$insert_sql_array['email'] = $_POST[email];
                        		$insert_sql_array['type'] = 'Home';
                        		$this->db->insert(CONTACT_EMAIL,$insert_sql_array);*/
                        /*$contact_info = array();
                        			
                        			$contact_info['user_id'] = $user_id;
                        			$contact_info['name'] = $_POST[first_name];
                        			$contact_info['lname'] = $_POST[last_name];
                        			$contact_info['type'] = 'People';
                        			$contact_info['phone'] = $_POST[phone];
                        			$contact_info['email'] = $_POST[email];
                        	
                        			$this->contact_id = $this->contact->Addcontact_On_Fly($contact_info,'',true);*/
                        /*****************************************insert address in contact*******************/
                        $update_sql_array = array();
                        $update_sql_array['street_address'] = $_POST['street_address'];
                        $update_sql_array['city'] = $_POST['city'];
                        $update_sql_array['state'] = $_POST['state'];
                        $update_sql_array['zip'] = $_POST['zip'];
                        $update_sql_array['type'] = 'Home';
                        $this->db->update(CONTACT_ADDRESS, $update_sql_array, "contact_id", $this->cont_id);
                        /**************************************************************************************/
                        //////security setting /////////////////
                        /*	$this->security->SetModule_name($this->module);
                        			$this->security->SetModule_id($this->cont_id);
                        			$this->security->Add_Rule_Webform('server');*/
                        ///////////////////////////////////////
                        /*************************************************************************************/
                        /*$sql="delete from ".EM_WEB_APP_INFO." where contact_id='$this->cont_id'";
                        	    $this->db->query($sql,__FILE__,__LINE__);
                        		$insert_sql_array = array();
                        		$insert_sql_array['contact_id'] = $this->cont_id;
                        		$this->db->insert(EM_WEB_APP_INFO,$insert_sql_array);*/
                        /*****************************************************************************************/
                        $update_sql_array = array();
                        $update_sql_array['date_available'] = $_POST['date_available'];
                        $update_sql_array['desired_salary'] = $_POST['desired_salary'];
                        $update_sql_array['position_applied'] = $_POST['position_applied'];
                        $update_sql_array['before_applied'] = $_POST['before_applied'];
                        $update_sql_array['felony'] = $_POST['felony'];
                        $update_sql_array['ever_worked'] = $_POST['ever_worked'];
                        $update_sql_array['mi'] = $_POST['middle_name'];
                        $update_sql_array['apartment'] = $_POST['apartment_no'];
                        $update_sql_array['date'] = $_POST['date_posted'];
                        $update_sql_array['when_felony'] = $_POST['felony_when'];
                        $update_sql_array['when_ever_worked'] = $_POST['ever_worked_when'];
                        $update_sql_array['when_before_applied'] = $_POST['before_applied_when'];
                        //$insert_sql_array['sign'] = $_POST['signature'];
                        $this->db->update(EM_APPLICATION_GENERAL, $update_sql_array, "contact_id", $this->cont_id);
                        /*********************************************************************************************/
                        $this->EditApplicationEducation('server', $this->cont_id);
                        /*if($_POST['high_school']) {
                        			$insert_sql_array = array();
                        			$insert_sql_array['contact_id'] = $this->cont_id;
                        			$insert_sql_array['education_id'] = $_POST['high_school'];
                        			$insert_sql_array['title'] = $_POST['title_hs'];
                        			$insert_sql_array['address'] = $_POST['address_high_school'];
                        			$insert_sql_array['education_from'] = $_POST['high_school_from'];
                        			$insert_sql_array['education_to'] = $_POST['high_school_to'];
                        			$insert_sql_array['graduate'] = $_POST['graduate'];
                        			$insert_sql_array['graduate_degree'] = $_POST['graduate_degree'];
                        			$this->db->insert(EM_APPLICATION_EDUCATION,$insert_sql_array);
                        		}
                        		
                        		if($_POST['college']) {
                        			$insert_sql_array = array();
                        			$insert_sql_array['contact_id'] = $this->cont_id;
                        			$insert_sql_array['education_id'] = $_POST['college'];
                        			$insert_sql_array['title'] = $_POST['title_cg'];
                        			$insert_sql_array['address'] = $_POST['college_address'];
                        			$insert_sql_array['education_from'] = $_POST['college_from'];
                        			$insert_sql_array['education_to'] = $_POST['college_to'];
                        			$insert_sql_array['graduate'] = $_POST['college_graduate'];
                        			$insert_sql_array['graduate_degree'] = $_POST['college_graduate_degree'];
                        			$this->db->insert(EM_APPLICATION_EDUCATION,$insert_sql_array);
                        		}
                        		
                        		if($_POST['other_degree']) {
                        			$insert_sql_array = array();
                        			$insert_sql_array['contact_id'] = $this->cont_id;
                        			$insert_sql_array['education_id'] = $_POST['other_degree'];
                        			$insert_sql_array['title'] = $_POST['title_ot'];
                        			$insert_sql_array['address'] = $_POST['other_education_address'];
                        			$insert_sql_array['education_from'] = $_POST['other_degree_from'];
                        			$insert_sql_array['education_to'] = $_POST['other_degree_to'];
                        			$insert_sql_array['graduate'] = $_POST['other_graduate'];
                        			$insert_sql_array['graduate_degree'] = $_POST['other_degree_details'];
                        			$this->db->insert(EM_APPLICATION_EDUCATION,$insert_sql_array);
                        		}*/
                        /*********************************************************************************************/
                        $this->EditApplicationReference('server', $this->cont_id);
                        /*$i;
                        		for($i=1; $i<4; $i+=1){
                        			if($_POST['reference_name'.$i]) {
                        				$insert_sql_array = array();
                        				$insert_sql_array['contact_id'] = $this->cont_id;
                        				$insert_sql_array['reference_name'] = $_POST['reference_name'.$i];
                        				$insert_sql_array['reference_relation'] = $_POST['reference_relation'.$i];
                        				$insert_sql_array['reference_company'] = $_POST['reference_company'.$i];
                        				$insert_sql_array['reference_phone'] = $_POST['reference_phone'.$i];
                        				$insert_sql_array['reference_address'] = $_POST['reference_address'.$i];					
                        				$this->db->insert(EM_APPLICATION_REFERENCES,$insert_sql_array);
                        			}				
                        		}*/
                        /*********************************************************************************************/
                        $this->EditApplicationEmployment('server', $this->cont_id);
                        /*for($i=1; $i<4; $i+=1){
                        			if($_POST['previous_company'.$i]) {
                        				$insert_sql_array = array();
                        				$insert_sql_array['contact_id'] = $this->cont_id;
                        				$insert_sql_array['previous_company'] = $_POST['previous_company'.$i];
                        				$insert_sql_array['previous_company_phone'] = $_POST['previous_company_phone'.$i];
                        				$insert_sql_array['previous_company_address'] = $_POST['previous_company_address'.$i];
                        				$insert_sql_array['previous_company_supervisor'] = $_POST['previous_company_supervisor'.$i];
                        				$insert_sql_array['previous_job_title'] = $_POST['previous_job_title'.$i];
                        				$insert_sql_array['previous_starting_salary'] = $_POST['previous_starting_salary'.$i];
                        				$insert_sql_array['previous_ending_salary'] = $_POST['previous_ending_salary'.$i];
                        				$insert_sql_array['responsibility'] = $_POST['previous_responsibilities'.$i];
                        				$insert_sql_array['from'] = $_POST['previous_from'.$i];
                        				$insert_sql_array['to'] = $_POST['previous_to'.$i];
                        				$insert_sql_array['reason'] = $_POST['previous_reason_for_leaving'.$i];
                        				$insert_sql_array['may_contact_supervisor'] = $_POST['previous_supervisor'.$i];					
                        				$this->db->insert(EM_APPLICATION_PREVIOUS_EMPLOYMENT,$insert_sql_array);
                        			}				
                        		}*/
                        /*********************************************************************************************/
                        $update_sql_array = array();
                        $update_sql_array['military_branch'] = $_POST['military_branch'];
                        $update_sql_array['military_from'] = $_POST['military_from'];
                        $update_sql_array['military_to'] = $_POST['military_to'];
                        $update_sql_array['rank_at_discharge'] = $_POST['rank_at_discharge'];
                        $update_sql_array['type_of_discharge'] = $_POST['type_of_discharge'];
                        $update_sql_array['honorable'] = $_POST['honorable'];
                        $this->db->update(EM_APPLICATION_MILITARY_SERVICE, $update_sql_array, "contact_id", $this->cont_id);
                        /*******************************************************************************************/
                        $_SESSION[msg] = 'Contact Details has been Updated';
                        ?>
				<script type="text/javascript">
				window.location = '<?php 
                        echo $_SERVER['PHP_SELF'];
                        ?>
?contact_id=<?php 
                        echo $this->cont_id;
                        ?>
'
				</script>
				<?php 
                    }
                } else {
                    echo $this->Form->ErrtxtPrefix . $this->Form->ErrorString . $this->Form->ErrtxtSufix;
                    $this->EditResume('local', $this->cont_id);
                }
                break;
            default:
                echo 'Wrong Paramemter passed';
        }
    }