Preview: employeeform_edit7-2-15.php
Size: 48.56 KB
/home/jambtst2015/public_html/giraffeng.com/admin/employeeform_edit7-2-15.php
<?php include("includes/head.php"); ?>
<?php include("includes/header.php"); ?>
<?php
/*---For Add---*/
if(empty($_POST['submit'])){ $_POST['submit']=''; }
if($_POST['submit'] == 'Save'){
$error = '';
/*----check email----*/
$chksql_email = "select `user_id` from `sat_staff` where `pemail`='".$_POST['pemail']."' and `staff_id`!='".$_POST['userId']."'";
$chkqry_email = mysql_query($chksql_email);
$getRowemail = mysql_num_rows($chkqry_email);
/*----end email check-*/
if($getRowemail > 0){
$error = 'This email address already exists.';
}
else{
if($_POST['firstname'] == ''){
$error = 'Please enter first name.';
}
elseif($_POST['lastname'] == ''){
$error = 'Please enter last name.';
}
elseif($_POST['pemail'] == ''){
$error = 'Please enter email address.';
}
else if(!isEmail($_POST['pemail'])){
$error = 'Invalid email address. Please enter valid email address.';
}
elseif($_POST['associate_type'] == ''){
$error = 'Please enter associate type.';
}
elseif($_POST['pemail'] == $_POST['aemail']){
$error = 'Primary email and Alternative email must not be same.';
}
else{
$cell_phone = $_POST['cell_phone1']."-".$_POST['cell_phone2']."-".$_POST['cell_phone3'];
$home_phone = $_POST['home_phone1']."-".$_POST['home_phone2']."-".$_POST['home_phone3'];
$work_phone = $_POST['work_phone_no1']."-".$_POST['work_phone_no2']."-".$_POST['work_phone_no3'];
$upSql = "update `sat_staff` set ";
$upSql .= "firstname='".mysql_real_escape_string($_POST['firstname'])."', ";
$upSql .= "lastname='".mysql_real_escape_string($_POST['lastname'])."', ";
$upSql .= "hphone='".mysql_real_escape_string($home_phone)."', ";
$upSql .= "cphone='".mysql_real_escape_string($cell_phone)."', ";
$upSql .= "add_date=now(), ";
$upSql .= "address='".mysql_real_escape_string($_POST['address'])."', ";
$upSql .= "pemail='".mysql_real_escape_string($_POST['pemail'])."', ";
$upSql .= "aemail='".mysql_real_escape_string($_POST['aemail'])."', ";
$upSql .= "dob='".$_POST['month']."/".$_POST['day']."', ";
$upSql .= "associate_type='".mysql_real_escape_string($_POST['associate_type'])."', ";
$upSql .= "visa_status='".mysql_real_escape_string($_POST['visa_status'])."', ";
$upSql .= "billing_client_name='".mysql_real_escape_string($_POST['billing_client_name'])."', ";
$upSql .= "end_client_name='".mysql_real_escape_string($_POST['end_client_name'])."', ";
$upSql .= "worksite_street='".mysql_real_escape_string($_POST['worksite_street'])."', ";
$upSql .= "worksite_city='".mysql_real_escape_string($_POST['worksite_city'])."', ";
$upSql .= "worksite_state='".mysql_real_escape_string($_POST['worksite_state'])."', ";
$upSql .= "worksite_zipcode='".mysql_real_escape_string($_POST['worksite_zipcode'])."', ";
$upSql .= "work_phone_no='".mysql_real_escape_string($work_phone)."', ";
$upSql .= "work_email='".mysql_real_escape_string($_POST['work_email'])."', ";
$upSql .= "client_payment_terms='".mysql_real_escape_string($_POST['client_payment_terms'])."', ";
$upSql .= "client_contact_name='".mysql_real_escape_string($_POST['client_contact_name'])."', ";
$upSql .= "client_contact_email='".mysql_real_escape_string($_POST['client_contact_email'])."', ";
$upSql .= "client_contact_phone='".mysql_real_escape_string($_POST['client_contact_phone'])."', ";
$upSql .= "on_psa='".mysql_real_escape_string($_POST['on_psa'])."', ";
$upSql .= "psa_effective_date='".change_dateformat($_POST['psa_effective_date'])."', ";
$upSql .= "psa_deal_details='".mysql_real_escape_string($_POST['psa_deal_details'])."', ";
$upSql .= "insurance_coverage='".mysql_real_escape_string($_POST['insurance_coverage'])."', ";
$upSql .= "hire_date='".change_dateformat($_POST['hire_date'])."', ";
$upSql .= "starting_date='".change_dateformat($_POST['starting_date'])."', ";
$upSql .= "ending_date='".change_dateformat($_POST['ending_date'])."', ";
$upSql .= "vendor_name='".mysql_real_escape_string($_POST['vendor_name'])."', ";
$upSql .= "vendor_contact_name='".mysql_real_escape_string($_POST['vendor_contact_name'])."', ";
$upSql .= "vendor_conatct_phone='".mysql_real_escape_string($_POST['vendor_conatct_phone'])."', ";
$upSql .= "vendor_contact_email='".mysql_real_escape_string($_POST['vendor_contact_email'])."', ";
$upSql .= "account_manager='".mysql_real_escape_string($_POST['account_manager'])."', ";
$upSql .= "hr_manager='".mysql_real_escape_string($_POST['hr_manager'])."', ";
$upSql .= "sales_manager='".mysql_real_escape_string($_POST['sales_manager'])."', ";
$upSql .= "source='".mysql_real_escape_string($_POST['source'])."', ";
$upSql .= "notes_comments='".mysql_real_escape_string($_POST['notes_comments'])."', ";
$upSql .= "username='".strtolower($_POST['username'])."', ";
$upSql .= "timesheet_flag='".$_POST['timesheet_flag']."', ";
$upSql .= "current_associate_status='".mysql_real_escape_string($_POST['current_associate_status'])."' ,";
$upSql .= "factor='".mysql_real_escape_string($_POST['factor'])."' ,";
$upSql .= "po_flag='".$_POST['po_flag']."' ,";
$upSql .= "purchase_order='".mysql_real_escape_string($_POST['purchase_order'])."', ";
$upSql .= "begining_vacation_balance='".$_POST['begining_vacation_balance']."'";
$upSql .= " where staff_id='".$_POST['userId']."'";
//echo $upSql;exit;
mysql_query($upSql);
//include("mailuser.php");
$sql_personal = mysql_query("UPDATE staff_personal SET vacation = '".$_POST['begining_vacation_balance']."' WHERE staff_id='".$_POST['userId']."'");
header('location:employee.php?success=2&userid='.$_POST['userId'].'&page='.$_REQUEST['page'].'&name='.$_REQUEST['src_name'].'&email='.$_REQUEST['src_email'].'&associate_type='.$_REQUEST['src_associate_type'].'&visa_status='.$_REQUEST['src_visa_status'].'&account_manager='.$_REQUEST['src_account_manager'].'&hr_manager='.$_REQUEST['src_hr_manager'].'&sales_manager='.$_REQUEST['src_sales_manager'].'&hotlist='.$_REQUEST['src_hotlist'].'&blacklisted='.$_REQUEST['src_blacklisted'].'&send_emails='.$_REQUEST['src_send_emails'].'&relocation='.$_REQUEST['src_relocation'].'&record_status='.$_REQUEST['src_record_status'].'&submit2='.$_REQUEST['src_submit2'].'&state='.$_REQUEST['src_state'].'&city='.$_REQUEST['src_city'].'&primary_skills_src='.$_REQUEST['primary_skills_src'].'&secondary_skills_src='.$_REQUEST['secondary_skills_src'].'&first='.$_REQUEST['first'].'&last='.$_REQUEST['last']);
exit();
}
}
}
else{
$_POST['name']='';
$_POST['street']='';
$_POST['city']='';
$_POST['state']='';
$_POST['zip']='';
$_POST['industry']='';
$_POST['phone']='';
$_POST['contact_name']='';
$_POST['contact_phone']='';
$_POST['client_type']='';
$_POST['add_date']='';
$_POST['email']='';
$_POST['web_address']='';
$_POST['ac_mgr']='';
$_POST['open_reqs']='';
$_POST['close_reqs']='';
$_POST['send_emails']='';
$_POST['added_user']='';
$_POST['notes']='';
$_POST['change_authority']='';
$_POST['blacklisted']='';
$_POST['record_status']='';
}
/*---End Add---*/
?>
<script>
jQuery.noConflict();
(function($) {jQuery(document).ready(function(){
// binds form submission and fields to the validation engine
jQuery("#formID").validationEngine();
});})(jQuery);
function addSkills(catid)
{
window.open('addSkill.php?catid='+catid,'Add Skill','height=250, width=600, resizable=yes, scrollbars=yes');
}
function addSkillsse(catid)
{
window.open('addSkillsecond.php?catid='+catid,'Add Skill','height=250, width=600, resizable=yes, scrollbars=yes');
}
function addVendors()
{
window.open('addVendor.php','Add Skill','height=250, width=600, resizable=yes, scrollbars=yes');
}
</script>
<script type="text/javascript">
function checkMessenger(themail)
{
var tomatch = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
if (!tomatch.test(themail))
{
window.alert('This is not a valid email id');
return false;
}
return true;
}
function check_username(){
//var uname = $('#username').val();
//alert(uname);
$.ajax({
url : 'check_username_edit.php',
type : 'POST',
//data : 'uname ='+uname,
data : $("#formID").serialize(),
//dataType : 'json',
beforeSend : function(jqXHR, settings ){
//alert(url);
},
success : function(data, textStatus, jqXHR){
//alert(data);
var new_data = data.trim();
if(new_data == 'success'){
$("#success_msg_div").html('<p style="color:#090; float:left; font-family:Verdana, Geneva, sans-serif; font-size:13px; text-align:left;">Available</p>');
$('#sub_btm').attr('disabled', false);
}else{
$("#success_msg_div").html('<p style="color:#f00; float:left; font-family:Verdana, Geneva, sans-serif; font-size:13px; text-align:left;">Not Available</p>');
$('#sub_btm').attr('disabled', true);
}
//$('#market_div').html(data);
},
/*complete : function(jqXHR, textStatus){
alert(3);
},*/
error : function(jqXHR, textStatus, errorThrown){
}
});
}
function disallow_change(val,default_val)
{
if(default_val == "W2H")
{
alert("Please Create a New Staff instead of changing Associate Type.");
$("#associate_type").val(default_val);
}
}
function disallow_active(val,default_val,status)
{
if(default_val == "W2S" && status == "Inactive")
{
alert("You cannot Active any Inactive W2 Salary Staff. Please create a new one.");
$("#current_associate_status").val(status);
}
}
function validecan(){
var name = document.myfrm.name.value;
var email1 = document.myfrm.email1.value;
var email2 = document.myfrm.email2.value;
var candidate_type = document.myfrm.candidate_type.value;
var visa_type = document.myfrm.visa_type.value;
var main_skills = document.myfrm.main_skills.value;
var city = document.myfrm.city.value;
var state = document.myfrm.state.value;
var hotlist = document.getElementById('');
var send_emails = document.myfrm.send_emails;
var notes = document.myfrm.notes;
var relocation = document.myfrm.relocation;
if(name == ''){
alert("Please enter name.");
document.myfrm.name.focus();
return false;
}
if(email1 == ''){
alert("Please enter email.");
document.myfrm.email1.focus();
return false;
}
if((email1!="") && (checkMessenger(email1)==false))
{
document.myfrm.email1.value="";
document.myfrm.email1.focus();
return false;
}
if((email2!="") && (checkMessenger(email2)==false))
{
document.myfrm.email2.value="";
document.myfrm.email2.focus();
return false;
}
if(candidate_type == ''){
alert("Please select candidate type.");
document.myfrm.candidate_type.focus();
return false;
}
/*if(candidate_type == 'other' && document.myfrm.candidate_type_other.value==''){
alert("Please enter candidate type other.");
document.myfrm.candidate_type_other.focus();
return false;
}*/
if(visa_type == ''){
alert("Please select visa type.");
document.myfrm.visa_type.focus();
return false;
}
if(main_skills == ''){
alert("Please select main skills.");
document.myfrm.main_skills.focus();
return false;
}
if(city == ''){
alert("Please enter city.");
document.myfrm.city.focus();
return false;
}
if(state == ''){
alert("Please select state.");
document.myfrm.state.focus();
return false;
}
if(document.getElementById('hotlist1').checked == false && document.getElementById('hotlist2').checked == false){
alert("Please select hotlist.");
//document.myfrm.hotlist.focus();
return false;
}
if(document.getElementById('send_emails1').checked == false && document.getElementById('send_emails2').checked == false){
alert("Please select send emails.");
//document.myfrm.send_emails.focus();
return false;
}
if(document.getElementById('notes').checked == false && document.getElementById('notes1').checked == false){
alert("Please select notes.");
//document.myfrm.notes.focus();
return false;
}
if(document.getElementById('notes').checked == true && document.myfrm.notes_desc.value==''){
alert("Please enter notes.");
document.myfrm.notes_desc.focus();
return false;
}
if(document.getElementById('relocation1').checked == false && document.getElementById('relocation2').checked == false){
alert("Please select relocation.");
//document.myfrm.relocation.focus();
return false;
}
return true;
}
</script>
<script type="text/javascript">
function getkey(e)
{
if (window.event)
return window.event.keyCode;
else if (e)
return e.which;
else
return null;
}
function goodchars(e, goods)
{
var key, keychar;
key = getkey(e);
if (key == null) return true;
keychar = String.fromCharCode(key);
keychar = keychar.toLowerCase();
goods = goods.toLowerCase();
if (goods.indexOf(keychar) != -1)
return true;
if ( key==null || key==0 || key==8 || key==9 || key==13 || key==27 )
return true;
return false;
}
function open_notes()
{
if(document.getElementById('notes').checked==true)
{
document.getElementById('notes_div').style.display='block';
}
if(document.getElementById('notes1').checked==true)
{
document.getElementById('notes_desc').value='';
document.getElementById('notes_div').style.display='none';
}
}
function open_blacklisted()
{
if(document.getElementById('blacklisted1').checked==true)
{
document.getElementById('blacklisted_div').style.display='block';
}
if(document.getElementById('blacklisted2').checked==true)
{
document.getElementById('blacklisted_desc').value='';
document.getElementById('blacklisted_div').style.display='none';
}
}
function candidatetypeother(val){
if(val == 'other'){
document.getElementById('candidatetype_other').style.display='block';
}
else{
document.getElementById('candidate_type_other').value='';
document.getElementById('candidatetype_other').style.display='none';
}
}
</script>
<script language="javascript">
function ChangeFocuszip(cur,nex)
{
var value=document.getElementById(cur).value;
if(value.length==5)
{
document.getElementById(nex).focus();
}
}
function ChangeFocus1(cur,nex)
{
var value=document.getElementById(cur).value;
if(value.length==3)
{
document.getElementById(nex).focus();
}
}
function ChangeFocus(cur,nex)
{
var value=document.getElementById(cur).value;
if(value.length==3)
{
document.getElementById(nex).focus();
}
}
function ChangeFocus1(cur,nex)
{
var value=document.getElementById(cur).value;
if(value.length==2)
{
document.getElementById(nex).focus();
}
}
</script>
<!--%%%%%%%%%%%%%%%%%%%%%%Multiple Resume Start%%%%%%%%%%%%%%%%%%%%%%%-->
<?php /*?><script src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js" type="text/javascript"></script><?php */?>
<script type="text/javascript">
$(document).ready(function(){
$("#addZone").click(function(){
var hidadd = $("#hidadd").val();
var hidcount = parseInt(hidadd)+parseInt(1);
//alert(hidadd);
$("#AddNewFile").hide();
$('#div'+hidadd).after('<div id="div'+hidcount+'"><input type="file" name="cv_file[]" id="cv_file_'+hidcount+'" style="margin:10px 0; width:168px !important; font-size:12px;" onchange="addnewfile();" /><a href="javascript:deldiv('+hidcount+');" name="" id="'+hidcount+'"><img src="images/delete.png" alt="Delete" title="Delete" border="0" style="margin:5px 0 0 0;" /></a></div>');
$("#hidadd").val(hidcount);
});
});
function deldiv(val){
if(confirm("Are you sure you want to delete this row?")){
var hidadd = $("#hidadd").val();
var hidcount = parseInt(hidadd)-parseInt(1);
$('#div'+val).remove();
$("#hidadd").val(hidcount);
$("#AddNewFile").show("slow");
}
}
function disable_po(val)
{
if(val == "No")
{
$("#purchase_order").attr('disabled', true);
$("#purchase_order").removeClass('validate[required]');
$("#purchase_order").val('');
$("#po").html('');
}
else
{
$("#purchase_order").attr('disabled', false);
$("#purchase_order").addClass('validate[required]');
$("#po").html('<font color="#FF0000">*</font>');
}
}
function check_factor(val)
{
if(val == "W2S")
{
$("#factor").addClass('validate[required]');
$("#factor_span").html('<font color="#FF0000">*</font>');
}
else
{
$("#factor").removeClass('validate[required]');
$("#factor_span").html('');
}
}
</script>
<!--%%%%%%%%%%%%%%%%%%%%%%Multiple Resume End%%%%%%%%%%%%%%%%%%%%%%%-->
<div class="container_bottom_section tbl_cls_new">
<?php
$userId = $_REQUEST['userid'];
$result=mysql_fetch_array(mysql_query("select * from sat_staff where staff_id='".$userId."'"));
?>
<form name="myfrm" action="" method="post" id="formID" enctype="multipart/form-data" <?php /*?>onsubmit="return validecan();"<?php */?>>
<input type="hidden" value="<?php echo $userId; ?>" name="userId" />
<input type="hidden" value="<?php echo $_REQUEST['page']; ?>" name="page" />
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="col3-tbl">
<?php if(empty($error)){$error='';}
if($error!=''){
?>
<tr>
<td colspan="7">
<div class="error"><?php echo $error; ?></div>
</td>
</tr>
<?php } ?>
<!-- ========================my Sec Start================================================= -->
<tr>
<td valign="top">
<div class="section-tbl">
<p class="client_table">
<i class="fa fa-info-circle"></i> Personal Information
</p>
<script>
$(document).ready(function(){
$("#name").change(function(){
if( $(this).val() == ''){
//alert(000);
}else{
//window.open('view_candidate.php?userid='+userid,'news view','height=600, width=1000, resizable=yes, scrollbars=yes');
var name = $(this).val();
$.ajax({
url : 'same_candidate.php',
type : 'POST',
data : 'name=' + name,
//dataType : 'json',
beforeSend : function(jqXHR, settings ){
//alert(1);
},
success : function( data, textStatus, jqXHR){
//alert(data);
if(data=='No'){
//alert(11);
}else{
window.open('same_candidate.php?name='+name,'Same candidates view','height=100%, width=1127, resizable=yes, scrollbars=yes');
}
},
error : function( jqXHR, textStatus, errorThrown){
}
});
}
});
});
</script>
<script type="text/javascript">
$(function(){
$('#pemail').keyup(function() {
//alert('Handler for .keyup() called.');
var mailval = $('#pemail').val();
$.ajax({
url : 'check.php',
type : 'POST',
data : 'val=' + mailval + '&type=empemail',
//dataType : 'json',
beforeSend : function(jqXHR, settings ){
//alert(1);
},
success : function( data, textStatus, jqXHR){
//alert(data);
$('#mailchk').show("slow");
$('#mail_view').html(data);
},
//complete : function( jqXHR, textStatus){
//alert(3);
//},
error : function( jqXHR, textStatus, errorThrown){
}
});
});
});
</script>
<table width="300" border="0" cellspacing="0" cellpadding="0" class="center-tbl new-tbl frm00">
<tr>
<td align="right" valign="top"><font color="#FF0000">*</font>First Name</td>
<td><input name="firstname" type="text" id="firstname" class="validate[required] textfield require_field" value="<?php echo $result['firstname']; ?>" /></td>
</tr>
<tr>
<td align="right" valign="top"><font color="#FF0000">*</font>Last Name</td>
<td><input name="lastname" type="text" id="lastname" class="validate[required] textfield require_field" value="<?php echo $result['lastname']; ?>" /></td>
</tr>
<tr>
<td align="right" valign="top"><font color="#FF0000">*</font>Username</td>
<td><input name="username" type="text" id="username" class="validate[required] textfield require_field" value="<?php echo $result['username']; ?>" onkeyup="check_username();" autocomplete="off" />
<div id="success_msg_div"></div>
<input type="hidden" name="staff_id_hid" id="staff_id_hid" value="<?php echo $_REQUEST['userid']; ?>" />
</td>
</tr>
<tr>
<td align="right" valign="top">Home Phone</td>
<td valign="top"><?php /*?><input name="home_phone" type="text" class="textfield" value="<?php echo $result['home_phone']?>" /><?php */?>
<?php
$home_phone = $result['hphone'];
$arrayhome_phone = explode('-', $home_phone);
?>
<input name="home_phone1" id="home_phone1" type="text" maxlength="3" value="<?php echo $arrayhome_phone[0]; ?>" onkeypress="return goodchars(event,'1234567890');" onkeyup="javascript:ChangeFocus('home_phone1','home_phone2');" class="textfield validate[minSize[3],maxSize[3]]" style="width:45px; border:#7F9DB9 1px solid !important; " />
-
<input name="home_phone2" type="text" maxlength="3" id="home_phone2" value="<?php echo $arrayhome_phone[1]; ?>" onkeypress="return goodchars(event,'1234567890');" onkeyup="javascript:ChangeFocus('home_phone2','home_phone3');" style="width:45px; border:#7F9DB9 1px solid !important; " class="textfield validate[minSize[3],maxSize[3]]" />
-
<input name="home_phone3" type="text" maxlength="4" id="home_phone3" value="<?php echo $arrayhome_phone[2]; ?>" onkeypress="return goodchars(event,'1234567890');" style="width:54px; border:#7F9DB9 1px solid !important; " class="textfield validate[minSize[4],maxSize[4]]" /></td>
</tr>
<tr>
<td align="right" valign="top">Cell Phone</td>
<td valign="top"><?php /*?><input name="cell_phone" type="text" class="textfield" value="<?php echo $result['cell_phone']?>" /><?php */?>
<?php
$cell_phone = $result['cphone'];
$arraycell_phone = explode('-', $cell_phone);
?>
<input name="cell_phone1" id="cell_phone1" type="text" maxlength="3" value="<?php echo $arraycell_phone[0]; ?>" onkeypress="return goodchars(event,'1234567890');" onkeyup="javascript:ChangeFocus('cell_phone1','cell_phone2');" class="textfield validate[minSize[3],maxSize[3]]" style="width:45px; border:#7F9DB9 1px solid !important; " />
-
<input name="cell_phone2" type="text" maxlength="3" id="cell_phone2" value="<?php echo $arraycell_phone[1]; ?>" onkeypress="return goodchars(event,'1234567890');" onkeyup="javascript:ChangeFocus('cell_phone2','cell_phone3');" style="width:45px; border:#7F9DB9 1px solid !important; " class="textfield validate[minSize[3],maxSize[3]]" />
-
<input name="cell_phone3" type="text" maxlength="4" id="cell_phone3" value="<?php echo $arraycell_phone[2]; ?>" onkeypress="return goodchars(event,'1234567890');" style="width:54px; border:#7F9DB9 1px solid !important; " class="textfield validate[minSize[4],maxSize[4]]" /></td>
</tr>
<tr>
<td align="right" valign="top">Address</td>
<td>
<textarea name="address" id="address" class="textarea"><?php echo $result['address']; ?></textarea>
</td>
</tr>
<tr>
<td align="right" valign="top"><font color="#FF0000">*</font>Primary Email</td>
<td><input name="pemail" id="pemail" type="text" class="validate[required,custom[email]] textfield require_field" value="<?php echo $result['pemail']?>" /></td>
</tr>
<tr id="mailchk" style="display:none;">
<td align="right" valign="top"> </td>
<td><div id="mail_view" style="padding:5px 0 7px 3px;"></div></td>
</tr>
<tr>
<td align="right" valign="top">Alternate Email</td>
<td><input name="aemail" type="text" class="validate[custom[email]] textfield require_field" value="<?php echo $result['aemail']?>" /></td>
</tr>
<tr>
<td align="right" valign="top">Date Of Birth</td>
<?php
$date_of_birth=explode('/',$result['dob']);
?>
<td valign="top"><select name="month" id="month" class="textfield require_field" style="width:90px;">
<option value="">--MM---</option>
<?php for($j=1;$j<=12;$j++){
if($j<10){
$j="0".$j;
}?>
<option value="<?php echo $j ?>" <?php if($j==$date_of_birth[0]){ ?>selected="selected"<?php } ?> > <?php $monthName = date("F", mktime(0, 0, 0, $j, 10));
echo $monthName; ?>
<?php
}
?>
</option>
</select>
<select name="day" id="day" class="textfield require_field" style="width:90px;">
<option value="">--DD---</option>
<?php for($k=1;$k<=31;$k++){
if($k<10){
$k="0".$k;
}
?>
<option value="<?php echo $k ?>" <?php if($k==$date_of_birth[1]){ ?>selected="selected"<?php } ?> > <?php echo $k ?>
<?php
}
?>
</option>
</select>
</td>
</tr>
<tr>
<td align="right" valign="top"><font color="#FF0000">*</font>Associate Type</td>
<td><select name="associate_type" class="validate[required] selectfield require_select" id="associate_type" onchange="disallow_change(this.value,'<?php echo $result['associate_type'];?>');check_factor(this.value);" <?php /*?>onchange="candidatetypeother(this.value);"<?php */?>>
<option value="">-- Select --</option>
<?php /*?><option value="W2" <?php if($result['associate_type']=="W2"){?> selected="selected"<?php }?>>W2</option><?php */?>
<option value="W2S" <?php if($result['associate_type']=="W2S"){?> selected="selected"<?php }?>>W2S</option>
<option value="W2H" <?php if($result['associate_type']=="W2H"){?> selected="selected"<?php }?>>W2H</option>
<option value="1099" <?php if($result['associate_type']=="1099"){?> selected="selected" <?php }?>>1099</option>
<option value="C2C" <?php if($result['associate_type']=="C2C"){?> selected="selected" <?php } ?>>C2C</option>
<option value="Future H1B" <?php if($result['associate_type']=="Future H1B"){?> selected="selected" <?php } ?>>Future H1B</option>
<option value="Prospect" <?php if($result['associate_type']=="Prospect"){?> selected="selected" <?php } ?>>Prospect</option>
<option value="EX" <?php if($result['associate_type']=="EX"){?> selected="selected" <?php } ?>>EX</option>
</select></td>
</tr>
<tr>
<td align="right" valign="top"><font color="#FF0000">*</font>Visa Status</td>
<td><select class="validate[required] selectfield require_select" id="visa_status" name="visa_status">
<option value="">Select</option>
<option value="H1B" <?php if($result['visa_status']=="H1B"){?> selected="selected"<?php }?>>H1B</option>
<option value="US Citizen" <?php if($result['visa_status']=="US Citizen"){?> selected="selected"<?php }?>>US Citizen</option>
<option value="GC" <?php if($result['visa_status']=="GC"){?> selected="selected"<?php }?>>GC</option>
<option value="EAD" <?php if($result['visa_status']=="EAD"){?> selected="selected"<?php }?>>EAD</option>
<option value="OPT" <?php if($result['visa_status']=="OPT"){?> selected="selected"<?php }?>>OPT</option>
<option value="TN" <?php if($result['visa_status']=="TN"){?> selected="selected"<?php }?>>TN</option>
</select>
<?php /*?><select class="validate[required] selectfield require_select" id="visa_status" name="visa_status" onchange="disallow_change(this.value,'<?php echo $result['visa_status'];?>');">
<option value="">Select</option>
<option value="W2 Salary" <?php if($result['visa_status']=="W2 Salary"){?> selected="selected"<?php }?>>W2 Salary</option>
<option value="W2 Hourly" <?php if($result['visa_status']=="W2 Hourly"){?> selected="selected"<?php }?>>W2 Hourly</option>
</select><?php */?>
</td>
</tr>
<tr>
<td align="right" valign="top">Billing Client Name</td>
<td><input name="billing_client_name" id="billing_client_name" type="text" class="textfield require_field" value="<?php if($result['billing_client_name']!='') { echo $result['billing_client_name']; }?>" />
<script>
$(function() {
$( "#visa_validity" ).datepicker({
dateFormat:"<?php echo $dateFormat; ?>"
});
});
</script>
</td>
</tr>
<tr>
<td align="right" valign="top">End Client Name</td>
<td>
<input name="end_client_name" id="end_client_name" type="text" class="textfield require_field" value="<?php if($result['end_client_name']!='') { echo $result['end_client_name']; }?>" />
</td>
</tr>
</table>
</div>
</td> <!-- End fst -->
<td width="26%" valign="top">
<table width="332" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="59%"> </td>
<td width="41%"> </td>
</tr>
<tr>
<td align="right" valign="top">Worksite Street</td>
<td id="main_skills"><input name="worksite_street" id="worksite_street" type="text" class="textfield require_field" value="<?php if($result['worksite_street']!='') { echo $result['worksite_street']; }?>" />
</td>
</tr>
<tr>
<td align="right" valign="top">Worksite City</td>
<td id="primary_skills"><input name="worksite_city" id="worksite_city" type="text" class="textfield require_field" value="<?php if($result['worksite_city']!='') { echo $result['worksite_city']; }?>" />
</td>
</tr>
<tr>
<td align="right" valign="top">Worksite State</td>
<td id="secondary_skills"><input name="worksite_state" id="worksite_state" type="text" class="textfield require_field" value="<?php if($result['worksite_state']!='') { echo $result['worksite_state']; }?>" />
</td>
</tr>
<tr>
<td align="right" valign="top">Worksite Zipcode</td>
<td><input name="worksite_zipcode" id="worksite_zipcode" type="text" class="validate[custom[integer]] textfield require_field" value="<?php if($result['worksite_zipcode']!='') { echo $result['worksite_zipcode']; }?>" /></td>
</tr>
<tr>
<?php
$work_phone_view = explode("-",$result['work_phone_no']);
?>
<td align="right" valign="top">Work Phone No.</td>
<td>
<input name="work_phone_no1" id="work_phone_no1" type="text" maxlength="3" value="<?php echo $work_phone_view[0]; ?>" onkeypress="return goodchars(event,'1234567890');" onkeyup="javascript:ChangeFocus('work_phone_no1','work_phone_no2');" class="textfield require_field validate[minSize[3],maxSize[3]]" style="width:43px;margin-right: 0 !important; " />
-
<input name="work_phone_no2" type="text" maxlength="3" id="work_phone_no2" value="<?php echo $work_phone_view[1]; ?>" onkeypress="return goodchars(event,'1234567890');" onkeyup="javascript:ChangeFocus('work_phone_no2','work_phone_no3');" style="width:43px; margin-right: 0 !important;" class="textfield require_field validate[minSize[3],maxSize[3]]" />
-
<input name="work_phone_no3" type="text" maxlength="4" id="work_phone_no3" value="<?php echo $work_phone_view[2]; ?>" onkeypress="return goodchars(event,'1234567890');" style="width:54px; margin-right: 0 !important;" class="textfield require_field validate[minSize[4],maxSize[4]]" />
</td>
</tr>
<tr>
<td align="right" valign="top">Work Email</td>
<td>
<input name="work_email" type="text" class="validate[custom[email]] textfield require_field" id="work_email" value="<?php echo $result['work_email']?>" />
</td>
</tr>
<tr>
<td align="right" valign="top">Client Payment Terms</td>
<td>
<textarea name="client_payment_terms" class="textarea" id="client_payment_terms"><?php echo $result['client_payment_terms']; ?></textarea>
</td>
</tr>
<tr>
<td align="right" valign="top">Client A/P Contact Name</td>
<td><input name="client_contact_name" type="text" id="client_contact_name" class="textfield require_field" value="<?php echo $result['client_contact_name']?>" />
</td>
</tr>
<tr>
<td align="right" valign="top">Client A/P Contact Email</td>
<td>
<script>
$(function() {
$( "#avail_date" ).datepicker({
dateFormat:"<?php echo $dateFormat; ?>"
});
//$( "#post_date" ).datepicker( "dd-mm-yy", "dateFormat" );
});
</script>
<input name="client_contact_email" id="client_contact_email" type="text" class="validate[custom[email]] textfield require_field" value="<?php if($result['client_contact_email']!='') { echo $result['client_contact_email']; }?>" />
</td>
</tr>
<tr>
<td align="right" valign="top" style="padding-top:13px;">Client A/P Contact Phone</td>
<td>
<input name="client_contact_phone" id="client_contact_phone" type="text" class="validate[custom[integer]] textfield require_field" value="<?php if($result['client_contact_phone']!='') { echo $result['client_contact_phone']; }?>" />
</td>
</tr>
<tr>
<td align="right" valign="top"><font color="#FF0000">*</font>Timesheet Status</td>
<td><select name="timesheet_flag" id="timesheet_flag" class="validate[required] selectfield require_select">
<option value="Y" <?php if($result['timesheet_flag']=='Y') { ?>selected="selected"<?php } ?>>YES</option>
<option value="N" <?php if($result['timesheet_flag']=='N') { ?>selected="selected"<?php } ?>>NO</option>
</select></td>
</tr>
<tr>
<td align="right" valign="top"><span id="factor_span"><?php if($result['factor']!='') {?> <font color="#FF0000">*</font> <?php } ?></span>Factor</td>
<td><input name="factor" id="factor" type="text" class="textfield require_field <?php if($result['factor']!='') {?> validate[required] <?php } ?>" value="<?php if($result['factor']!='') { echo $result['factor']; }?>" onkeypress="return goodchars(event,'1234567890.');" /></td>
</tr>
<tr>
<td align="right" valign="top"><font color="#FF0000">*</font>Purchase Order Status</td>
<td><select name="po_flag" id="po_flag" class="validate[required] selectfield require_select" onchange="disable_po(this.value);">
<option value="Yes" <?php if($result['po_flag']=='Yes') { ?>selected="selected"<?php } ?>>YES</option>
<option value="No" <?php if($result['po_flag']=='No') { ?>selected="selected"<?php } ?>>NO</option>
</select></td>
</tr>
<tr>
<td align="right" valign="top"><span id="po"><?php if($result['po_flag']=='Yes') { ?><font color="#FF0000">*</font><?php } ?></span>Purchase Order</td>
<td><input name="purchase_order" id="purchase_order" type="text" class="<?php if($result['po_flag']=='Yes') { ?>validate[required] <?php } ?>textfield require_field" value="<?php if($result['purchase_order']!='') { echo $result['purchase_order']; }?>" onkeypress="return goodchars(event,'1234567890');" <?php if($result['po_flag']=='No') { ?> disabled="disabled" <?php } ?> /></td>
</tr>
<tr>
<td align="right" valign="top"><span id="po"><font color="#FF0000">*</font></span>Beginning Vacation Balance</td>
<td><input name="begining_vacation_balance" id="begining_vacation_balance" type="text" class="textfield require_field validate[required]" value="<?php if($result['begining_vacation_balance']!='') { echo $result['begining_vacation_balance']; }?>" onkeypress="return goodchars(event,'1234567890.');" /></td>
</tr>
</table>
</td>
<td width="0%" valign="top"> </td>
<td width="30%" valign="top">
<table width="350" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="36%"> </td>
<td width="64%"> </td>
</tr>
<script>
function psa(val){
if(val=='YES'){
$('#psa_effective_date').prop("disabled", false);
$('#psa_deal_details').prop("disabled", false);
}else{
$('#psa_effective_date').prop("disabled", true);
$('#psa_deal_details').prop("disabled", true);
}
}
</script>
<tr>
<td align="right" valign="top" style="padding-top:13px;">On PSA</td>
<td><select name="on_psa" class=" selectfield require_select" onchange="psa(this.value);">
<option value="NO" <?php if($result['on_psa']=='NO') { ?>selected="selected"<?php } ?>>NO</option>
<option value="YES" <?php if($result['on_psa']=='YES') { ?>selected="selected"<?php } ?>>YES</option>
</select></td>
</tr>
<tr>
<td align="right" valign="top" style="padding-top:13px;">PSA Effective Date</td>
<td>
<script>
$(function() {
$( "#psa_effective_date" ).datepicker({
dateFormat:"<?php echo $dateFormat; ?>"
});
//$( "#post_date" ).datepicker( "dd-mm-yy", "dateFormat" );
});
</script>
<input name="psa_effective_date" id="psa_effective_date" type="text" class="textfield require_field" value="<?php if($result['psa_effective_date']!='0000-00-00') { echo change_dateformat_reverse($result['psa_effective_date']); } ?>" disabled="disabled" />
</td>
</tr>
<tr>
<td align="right" valign="top" style="padding-top:13px;">PSA Deal Details</td>
<td>
<textarea name="psa_deal_details" id="psa_deal_details" class="textarea" disabled="disabled"><?php echo $result['psa_deal_details']; ?></textarea>
</td>
</tr>
<script>
function coverage(val){
if(val=='YES'){
$('#hire_date').prop("disabled", false);
$('#starting_date').prop("disabled", false);
$('#ending_date').prop("disabled", false);
}else{
$('#hire_date').prop("disabled", true);
$('#starting_date').prop("disabled", true);
$('#ending_date').prop("disabled", true);
}
}
</script>
<tr>
<td align="right" valign="top">Insurance Coverage</td>
<td><select name="insurance_coverage" class=" selectfield require_select" >
<option value="NO" <?php if($result['insurance_coverage']=='NO') { ?>selected="selected"<?php } ?>>NO</option>
<option value="YES" <?php if($result['insurance_coverage']=='YES') { ?>selected="selected"<?php } ?>>YES</option>
</select></td>
</tr>
<tr>
<td align="right" valign="top">Hire Date</td>
<td>
<script>
$(function() {
$( "#hire_date" ).datepicker({
dateFormat:"<?php echo $dateFormat; ?>"
});
//$( "#post_date" ).datepicker( "dd-mm-yy", "dateFormat" );
});
</script>
<input name="hire_date" id="hire_date" type="text" class="textfield require_field" value="<?php if($result['hire_date']!='0000-00-00') { echo change_dateformat_reverse($result['hire_date']); } ?>" />
</td>
</tr>
<tr>
<td align="right" valign="top">Starting Date</td>
<td>
<script>
$(function()
//{
// $( "#start_date" ).datepicker({
// dateFormat:"mm/dd/yy"
// });
{
$('#starting_date').datepicker({
// minDate: 0,
onSelect: function(dateStr) {
dateFormat:"mm/dd/yy"
var date = $(this).datepicker('getDate');
if (date) {
date.setDate(date.getDate());
}
$('#ending_date').datepicker('option', 'minDate', date);
}
});
$('#ending_date').datepicker({
// minDate: 0,
onSelect: function (selectedDate) {
var date = $(this).datepicker('getDate');
if (date) {
date.setDate(date.getDate());
}
$('#starting_date').datepicker('option', 'maxDate', date || 0);
}
});
});
</script>
<input name="starting_date" id="starting_date" type="text" class="textfield require_field" value="<?php if($result['starting_date']!='0000-00-00') { echo change_dateformat_reverse($result['starting_date']); } ?>" />
</td>
</tr>
<tr>
<td align="right" valign="top">Ending Date</td>
<td>
<script>
$(function() {
$( "#ending_date" ).datepicker({
dateFormat:"<?php echo $dateFormat; ?>"
});
//$( "#post_date" ).datepicker( "dd-mm-yy", "dateFormat" );
});
</script>
<input name="ending_date" id="ending_date" type="text" class="textfield require_field" value="<?php if($result['ending_date']!='0000-00-00') { echo change_dateformat_reverse($result['ending_date']); } ?>" />
</td>
</tr>
<tr>
<td align="right" valign="top">Vendor(Enter ABSI for emplyees)</td>
<td><input name="vendor_name" id="vendor_name" type="text" class="textfield require_field" value="<?php if($result['vendor_name']!='') { echo $result['vendor_name']; }?>" /></td>
</tr>
<tr>
<td align="right" valign="top">Vendor Contact Name</td>
<td><input type="text" name="vendor_contact_name" id="vendor_contact_name" value="<?php if($result['vendor_contact_name']!='') { echo $result['vendor_contact_name']; }?>" class="textfield require_field" /></td>
</tr>
<tr>
<td align="right" valign="top">Vendor Conatct Phone</td>
<td><input type="text" name="vendor_conatct_phone" id="vendor_conatct_phone" class="validate[custom[integer]] textfield require_field" value="<?php if($result['vendor_conatct_phone']!='') { echo $result['vendor_conatct_phone']; }?>" /></td>
</tr>
</table>
</td>
<td width="1%" valign="top"> </td>
<td width="13%" valign="top">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="222"> </td>
</tr>
<?php /*?><tr>
<td height="35" colspan="4" align="left">Notes</td>
</tr>
<tr>
<td align="left" valign="middle"><?php if(empty($result['notes'])){ $result['notes']=''; } ?>
Yes
</td>
<td align="left" valign="middle"><input name="notes" id="notes" type="radio" value="Y" class="validate[required] radiobutton" <?php if($result['notes']=='Y') { ?>checked="checked"<?php } ?> onclick="open_notes(this.value);" /></td>
<td align="left" valign="middle"><span class="text1">No</span></td>
<td align="left" valign="middle"><input name="notes" id="notes1" type="radio" value="N" class="validate[required] radiobutton" <?php if($result['notes']=='N') { ?>checked="checked"<?php }else{ ?>checked="checked"<?php } ?> onclick="open_notes(this.value);"/></td>
</tr><?php */?>
<tr ><td align="left">
<div id="blacklisted_div" style="display:none;">
<table width="100%" >
<tr>
<td height="29" align="left" style="text-align:left;">Write Notes</td>
</tr>
<tr>
<td align="right" style="text-align:right;"><textarea name="blacklisted_desc" id="blacklisted_desc" class="validate[required] textarea" style="width:124px;"><?php echo $result['blacklisted_desc']; ?></textarea></td>
</tr>
</table></div>
</td></tr>
<tr>
<td height="29" align="left">Vendor Contact Email</td>
</tr>
<tr>
<td align="left">
<input name="vendor_contact_email" id="vendor_contact_email" type="text" class="validate[custom[email]] textfield require_field" value="<?php if($result['vendor_contact_email']!='') { echo $result['vendor_contact_email']; }?>"style="width:136px;" />
</td>
</tr>
<tr>
<td height="29" align="left">Account Manager</td>
</tr>
<tr>
<td align="left">
<select name="account_manager" id="account_manager" class="selectfield2">
<option value="">-- Select --</option>
<?php
$sql_product=sprintf("select user_id,firstname from sat_users where status='Active' order by firstname");
$query_product=mysql_query($sql_product);
while($array_product=mysql_fetch_array($query_product)){
?>
<option value="<?php echo $array_product['user_id']; ?>" <?php if($result['account_manager']==$array_product['user_id']) echo "selected"; ?>>
<?php echo $array_product['firstname']?>
</option>
<?php
}
?>
</select>
</td>
</tr>
<tr>
<td height="29" align="left">HR Manager</td>
</tr>
<tr>
<td align="left">
<select name="hr_manager" class="selectfield2">
<option value="">-- Select --</option>
<?php
$sql_product=sprintf("select user_id,firstname from sat_users where status='Active' order by firstname");
$query_product=mysql_query($sql_product);
while($array_product=mysql_fetch_array($query_product)){
?>
<option value="<?php echo $array_product['user_id']; ?>" <?php if($result['hr_manager']==$array_product['user_id']) echo "selected"; ?>>
<?php echo $array_product['firstname']?>
</option>
<?php
}
?>
</select>
</td>
</tr>
<tr>
<td height="29" align="left">Sales Manager</td>
</tr>
<tr>
<td align="left">
<select name="sales_manager" class="selectfield2">
<option value="">-- Select --</option>
<?php
$sql_product=sprintf("select user_id,firstname from sat_users where status='Active' order by firstname");
$query_product=mysql_query($sql_product);
while($array_product=mysql_fetch_array($query_product)){
?>
<option value="<?php echo $array_product['user_id']; ?>" <?php if($result['sales_manager']==$array_product['user_id']) echo "selected"; ?>>
<?php echo $array_product['firstname']?>
</option>
<?php
}
?>
</select>
</td>
</tr>
<tr>
<td height="29" align="left">Source</td>
</tr>
<tr>
<td align="left">
<input name="source" id="source" type="text"style="width:136px;" class="textfield require_field" value="<?php if($result['source']!='') { echo $result['source']; }?>" />
</td>
</tr>
<tr>
<td height="29" align="left">Notes/Comments</td>
</tr>
<tr>
<td align="left">
<textarea id="notes_comments" name="notes_comments" class="textarea" style="width:136px;"><?php if($result['notes_comments']!='') { echo $result['notes_comments']; }?></textarea>
</td>
</tr>
<tr>
<td height="29" align="left">Current Associate Status</td>
</tr>
<tr>
<td align="left">
<select name="current_associate_status" id="current_associate_status" class="selectfield2" onchange="disallow_active(this.value,'<?php echo $result['visa_status'];?>','<?php echo $result['current_associate_status']; ?>');">
<option value="Active" <?php if($result['current_associate_status']=='Active') { ?>selected="selected"<?php } ?>>Active</option>
<option value="Inactive" <?php if($result['current_associate_status']=='Inactive') { ?>selected="selected"<?php } ?>>Inactive</option>
</select>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="7" align="center"><input name="submit" id="sub_btm" type="submit" value="Save" class="submit" style=" margin-bottom:10px;" />
<input type="button" name="back" id="back" class="submit" value="Cancel" style=" margin-bottom:10px;" onclick="window.history.back();" />
</td>
</tr>
</table>
<div class="clear"></div>
</form>
</div>
<?php include("includes/footer.php"); ?>
Directory Contents
Dirs: 17 × Files: 180