Preview: employeeform.php
Size: 44.86 KB
/home/jambtst2015/public_html/giraffeng.com/admin/employeeform.php
<?php include("includes/head.php"); ?>
<?php include("includes/header.php");
include ("includes/libmail.php"); ?>
<?php
function random_no()
{
$staff_code_rand = rand(10000,99999);
$check = mysql_num_rows(mysql_query("SELECT staff_id FROM sat_staff WHERE staff_code = '".$staff_code_rand."'"));
if($check == 0)
{
return $staff_code_rand;
}
else
{
random_no();
}
}
/*---For Add---*/
if(empty($_POST['submit'])){ $_POST['submit']=''; }
if($_POST['submit'] == 'Save'){
$staff_code = random_no();
$password = rand(10000,99999);
$error = '';
/*----check email----*/
$chksql_email = "select `staff_id` from `sat_staff` where `pemail`='".$_POST['pemail']."'";
$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'];
$insSql = "insert into `sat_staff` set ";
$insSql .= "firstname='".mysql_real_escape_string($_POST['firstname'])."', ";
$insSql .= "lastname='".mysql_real_escape_string($_POST['lastname'])."', ";
$insSql .= "hphone='".mysql_real_escape_string($home_phone)."', ";
$insSql .= "cphone='".mysql_real_escape_string($cell_phone)."', ";
$insSql .= "add_date=now(), ";
$insSql .= "address='".mysql_real_escape_string($_POST['address'])."', ";
$insSql .= "pemail='".mysql_real_escape_string($_POST['pemail'])."', ";
$insSql .= "aemail='".mysql_real_escape_string($_POST['aemail'])."', ";
$insSql .= "dob='".$_POST['month']."/".$_POST['day']."', ";
$insSql .= "associate_type='".mysql_real_escape_string($_POST['associate_type'])."', ";
$insSql .= "visa_status='".mysql_real_escape_string($_POST['visa_status'])."', ";
$insSql .= "billing_client_name='".mysql_real_escape_string($_POST['billing_client_name'])."', ";
$insSql .= "end_client_name='".mysql_real_escape_string($_POST['end_client_name'])."', ";
$insSql .= "worksite_street='".mysql_real_escape_string($_POST['worksite_street'])."', ";
$insSql .= "worksite_city='".mysql_real_escape_string($_POST['worksite_city'])."', ";
$insSql .= "worksite_state='".mysql_real_escape_string($_POST['worksite_state'])."', ";
$insSql .= "worksite_zipcode='".mysql_real_escape_string($_POST['worksite_zipcode'])."', ";
$insSql .= "work_phone_no='".mysql_real_escape_string($work_phone)."', ";
$insSql .= "work_email='".mysql_real_escape_string($_POST['work_email'])."', ";
$insSql .= "client_payment_terms='".mysql_real_escape_string($_POST['client_payment_terms'])."', ";
$insSql .= "client_contact_name='".mysql_real_escape_string($_POST['client_contact_name'])."', ";
$insSql .= "client_contact_email='".mysql_real_escape_string($_POST['client_contact_email'])."', ";
$insSql .= "client_contact_phone='".mysql_real_escape_string($_POST['client_contact_phone'])."', ";
$insSql .= "on_psa='".mysql_real_escape_string($_POST['on_psa'])."', ";
$insSql .= "psa_effective_date='".change_dateformat($_POST['psa_effective_date'])."', ";
$insSql .= "psa_deal_details='".mysql_real_escape_string($_POST['psa_deal_details'])."', ";
$insSql .= "insurance_coverage='".mysql_real_escape_string($_POST['insurance_coverage'])."', ";
$insSql .= "hire_date='".change_dateformat($_POST['hire_date'])."', ";
$insSql .= "starting_date='".change_dateformat($_POST['starting_date'])."', ";
$insSql .= "ending_date='".change_dateformat($_POST['ending_date'])."', ";
$insSql .= "vendor_name='".mysql_real_escape_string($_POST['vendor_name'])."', ";
$insSql .= "vendor_contact_name='".mysql_real_escape_string($_POST['vendor_contact_name'])."', ";
$insSql .= "vendor_conatct_phone='".mysql_real_escape_string($_POST['vendor_conatct_phone'])."', ";
$insSql .= "vendor_contact_email='".mysql_real_escape_string($_POST['vendor_contact_email'])."', ";
$insSql .= "account_manager='".mysql_real_escape_string($_POST['account_manager'])."', ";
$insSql .= "hr_manager='".mysql_real_escape_string($_POST['hr_manager'])."', ";
$insSql .= "sales_manager='".mysql_real_escape_string($_POST['sales_manager'])."', ";
$insSql .= "source='".mysql_real_escape_string($_POST['source'])."', ";
$insSql .= "notes_comments='".mysql_real_escape_string($_POST['notes_comments'])."', ";
$insSql .= "staff_code='".$staff_code."', ";
$insSql .= "username='".strtolower($_POST['username'])."', ";
$insSql .= "password='".md5($password)."', ";
$insSql .= "timesheet_flag='".$_POST['timesheet_flag']."', ";
$insSql .= "factor='".$_POST['factor']."', ";
$insSql .= "po_flag='".$_POST['po_flag']."', ";
$insSql .= "purchase_order='".$_POST['purchase_order']."', ";
$insSql .= "begining_vacation_balance='".$_POST['begining_vacation_balance']."', ";
$insSql .= "current_associate_status='".mysql_real_escape_string($_POST['current_associate_status'])."'";
//echo $insSql;exit;
mysql_query($insSql);
$last_id = mysql_insert_id();
$sql_get_personal = mysql_fetch_array(mysql_query("SELECT * FROM hour_master WHERE 1"));
$sql_personal = mysql_query("INSERT INTO staff_personal SET staff_id = '".$last_id."' , vacation = '".$_POST['begining_vacation_balance']."' , sick = '".$sql_get_personal['sick']."' , holiday = '".$sql_get_personal['holiday']."' , personal = '".$sql_get_personal['personal']."'");
//include("mailuser.php");
$login_link = '<a href="http://' . $_SERVER['HTTP_HOST'].dirname($_SERVER['PHP_SELF']).'/" style=" font-family: Arial,Helvetica,sans-serif; font-size: 12px; text-decoration: none;">www.' . $_SERVER['HTTP_HOST'].dirname($_SERVER['PHP_SELF']).'/</a>';
$getTemplate = check_null_value('body','sat_email_template','id','6');
$getSubject = check_null_value('subject','sat_email_template','id','6');
$templete_body = emailTempalte($getSubject,$getTemplate);
$person_name = $_POST['firstname']." ".$_POST['lastname'];
$templete_body = str_replace("%%name%%",$person_name,$templete_body);
$templete_body = str_replace("%%login_link%%",$login_link,$templete_body);
$templete_body = str_replace("%%username%%",strtolower($_POST['username']),$templete_body);
$templete_body = str_replace("%%password%%",$password,$templete_body);
$to_email = $_POST['pemail'];//"priya@infosolz.com";
$from = "itteam@absi-usa.com";
$to = $to_email;
$sts = new Mail();
$sts->From($from);
$sts->Subject($getSubject);
$sts->Body($templete_body);
$sts->To($to);
$sts->ReplyTo($replyto);
$send = $sts->Send();
header('location:employee.php?success=1');
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>
function formSub(){
//alert(11111111);
document.formID.submit();
return true;
}
jQuery.noConflict();
(function($) {jQuery(document).ready(function(){
// binds form submission and fields to the validation engine
jQuery("#formID").validationEngine('attach', {
onValidationComplete: function(form, status){
//alert("The form status is: " +status+", it will never submit");
if(status == true){
//$('input[type="submit"]').attr('disabled','disabled');
return formSub();
}
}
});
});})(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');
}
function check_username(){
//var uname = $('#username').val();
//alert(uname);
$.ajax({
url : 'check_username.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){
}
});
}
</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");
}
}
</script>
<!--%%%%%%%%%%%%%%%%%%%%%%Multiple Resume End%%%%%%%%%%%%%%%%%%%%%%%-->
<div class="container_bottom_section tbl_cls_new">
<form name="formID" action="employeeform.php" method="post" id="formID" enctype="multipart/form-data" <?php /*?>onsubmit="return validecan();"<?php */?>>
<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){
}
});
});
});
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>
<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 $_POST['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 $_POST['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 $_POST['username']; ?>" onkeyup="check_username();" autocomplete="off" />
<div id="success_msg_div"></div>
</td>
</tr>
<tr>
<td align="right" valign="top">Home Phone</td>
<td>
<input name="home_phone1" id="home_phone1" type="text" maxlength="3" value="<?php echo $_POST['home_phone1']; ?>" onkeypress="return goodchars(event,'1234567890');" onkeyup="javascript:ChangeFocus('home_phone1','home_phone2');" class="textfield require_field validate[minSize[3],maxSize[3]]" style="width:43px;margin-right: 0 !important; " />
-
<input name="home_phone2" type="text" maxlength="3" id="home_phone2" value="<?php echo $_POST['home_phone2']; ?>" onkeypress="return goodchars(event,'1234567890');" onkeyup="javascript:ChangeFocus('home_phone2','home_phone3');" style="width:43px; margin-right: 0 !important;" class="textfield require_field validate[minSize[3],maxSize[3]]" />
-
<input name="home_phone3" type="text" maxlength="4" id="home_phone3" value="<?php echo $_POST['home_phone3']; ?>" 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">Cell Phone</td>
<td><input name="cell_phone1" id="cell_phone1" type="text" maxlength="3" value="<?php echo $_POST['cell_phone1']; ?>" onkeypress="return goodchars(event,'1234567890');" onkeyup="javascript:ChangeFocus('cell_phone1','cell_phone2');" class="textfield require_field validate[minSize[3],maxSize[3]]" style="width:43px;margin-right: 0 !important;" />
-
<input name="cell_phone2" type="text" maxlength="3" id="cell_phone2" value="<?php echo $_POST['cell_phone2']; ?>" onkeypress="return goodchars(event,'1234567890');" onkeyup="javascript:ChangeFocus('cell_phone2','cell_phone3');" style="width:43px;margin-right: 0 !important;" class="textfield require_field validate[minSize[3],maxSize[3]]" />
-
<input name="cell_phone3" type="text" maxlength="4" id="cell_phone3" value="<?php echo $_POST['cell_phone3']; ?>" 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">Address</td>
<td>
<textarea name="address" id="address" class="textarea textarea-require"><?php echo $_POST['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 $_POST['pemail']?>" />
<div id="mailchk" style="display:none;">
<div id="mail_view" style="padding:5px 0 7px 3px;"></div>
</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 $_POST['aemail']?>" /></td>
</tr>
<tr>
<td align="right" valign="top">Date Of Birth</td>
<td width="100%">
<p>
<select name="month" id="month" class="selectfield require_select sm" 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==$_POST['month']){ ?>selected="selected"<?php } ?> > <?php $monthName = date("F", mktime(0, 0, 0, $j, 10));
echo $monthName; ?>
<?php
}
?>
</option>
</select>
<select name="day" id="day" class="selectfield require_select sm" style="width:46%">
<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==$_POST['day']){ ?>selected="selected"<?php } ?> > <?php echo $k ?>
<?php
}
?>
</option>
</select>
</p>
</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="check_factor(this.value);" <?php /*?>onchange="candidatetypeother(this.value);"<?php */?>>
<option value="">-- Select --</option>
<?php /*?><option value="W2" <?php if($_POST['associate_type']=="W2"){?> selected="selected"<?php }?>>W2</option><?php */?>
<option value="W2S" <?php if($_POST['associate_type']=="W2S"){?> selected="selected"<?php }?>>W2S</option>
<option value="W2H" <?php if($_POST['associate_type']=="W2H"){?> selected="selected"<?php }?>>W2H</option>
<option value="1099" <?php if($_POST['associate_type']=="1099"){?> selected="selected" <?php }?>>1099</option>
<option value="C2C" <?php if($_POST['associate_type']=="C2C"){?> selected="selected" <?php } ?>>C2C</option>
<option value="Future H1B" <?php if($_POST['associate_type']=="Future H1B"){?> selected="selected" <?php } ?>>Future H1B</option>
<option value="Prospect" <?php if($_POST['associate_type']=="Prospect"){?> selected="selected" <?php } ?>>Prospect</option>
<option value="EX" <?php if($_POST['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($_POST['visa_status']=="H1B"){?> selected="selected"<?php }?>>H1B</option>
<option value="US Citizen" <?php if($_POST['visa_status']=="US Citizen"){?> selected="selected"<?php }?>>US Citizen</option>
<option value="GC" <?php if($_POST['visa_status']=="GC"){?> selected="selected"<?php }?>>GC</option>
<option value="EAD" <?php if($_POST['visa_status']=="EAD"){?> selected="selected"<?php }?>>EAD</option>
<option value="OPT" <?php if($_POST['visa_status']=="OPT"){?> selected="selected"<?php }?>>OPT</option>
<option value="TN" <?php if($_POST['visa_status']=="TN"){?> selected="selected"<?php }?>>TN</option>
</select>
</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($_POST['billing_client_name']!='') { echo $_POST['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($_POST['end_client_name']!='') { echo $_POST['end_client_name']; }?>" />
</td>
</tr>
</table>
</div> <!--End Section tbl-->
</td>
<!--</tr>
<tr>-->
<td valign="top">
<div class="section-tbl">
<p class="client_table">
<i class="fa fa-info-circle"></i> Work Information
</p>
<table width="300" border="0" cellspacing="0" cellpadding="0" class="center-tbl frm00 new-tbl">
<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($_POST['worksite_street']!='') { echo $_POST['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($_POST['worksite_city']!='') { echo $_POST['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($_POST['worksite_state']!='') { echo $_POST['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($_POST['worksite_zipcode']!='') { echo $_POST['worksite_zipcode']; }?>" /></td>
</tr>
<tr>
<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 $_POST['work_phone_no1']; ?>" 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 $_POST['work_phone_no2']; ?>" 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 $_POST['work_phone_no3']; ?>" 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 $_POST['work_email']?>" />
</td>
</tr>
<tr>
<td align="right" valign="top">Client Payment Terms</td>
<td>
<textarea name="client_payment_terms" id="client_payment_terms" class="textarea textarea-require"><?php echo $_POST['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 $_POST['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($_POST['client_contact_email']!='') { echo $_POST['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($_POST['client_contact_phone']!='') { echo $_POST['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($_POST['timesheet_flag']=='Y') { ?>selected="selected"<?php } ?>>YES</option>
<option value="N" <?php if($_POST['timesheet_flag']=='N') { ?>selected="selected"<?php } ?>>NO</option>
</select></td>
</tr>
<tr>
<td align="right" valign="top"><span id="factor_span"></span>Factor</td>
<td><input name="factor" id="factor" type="text" class="textfield require_field" value="<?php if($_POST['factor']!='') { echo $_POST['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($_POST['po_flag']=='Yes') { ?>selected="selected"<?php } ?>>YES</option>
<option value="No" <?php if($_POST['po_flag']=='No') { ?>selected="selected"<?php } ?>>NO</option>
</select></td>
</tr>
<tr>
<td align="right" valign="top"><span id="po"><font color="#FF0000">*</font></span>Purchase Order</td>
<td><input name="purchase_order" id="purchase_order" type="text" class="textfield require_field validate[required]" value="<?php if($_POST['purchase_order']!='') { echo $_POST['purchase_order']; }?>" onkeypress="return goodchars(event,'1234567890');" /></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($_POST['begining_vacation_balance']!='') { echo $_POST['begining_vacation_balance']; }?>" onkeypress="return goodchars(event,'1234567890.');" /></td>
</tr>
</table>
</div>
</td>
<!--</tr>
<tr>-->
<td valign="top">
<div class="section-tbl">
<p class="client_table">
<i class="fa fa-info-circle"></i> official Information
</p>
<table width="350" border="0" cellspacing="0" cellpadding="0" class="center-tbl frm00 new-tbl">
<tr>
<td align="right" valign="top" style="padding-top:13px;">On PSA</td>
<td>
<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>
<select name="on_psa" class=" selectfield require_select" onchange="psa(this.value);">
<option value="NO" <?php if($_POST['on_psa']=='NO') { ?>selected="selected"<?php } ?>>NO</option>
<option value="YES" <?php if($_POST['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($_POST['psa_effective_date']!='') { echo $_POST['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 textarea-require" disabled="disabled"><?php echo $_POST['psa_deal_details']; ?></textarea>
<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>
</td>
</tr>
<tr>
<td align="right" valign="top">Insurance Coverage</td>
<td>
<select name="insurance_coverage" class=" selectfield require_select" >
<option value="NO" <?php if($_POST['insurance_coverage']=='NO') { ?>selected="selected"<?php } ?>>NO</option>
<option value="YES" <?php if($_POST['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($_POST['hire_date']!='') { echo $_POST['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:"<?php echo $dateFormat; ?>"
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($_POST['starting_date']!='') { echo $_POST['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($_POST['ending_date']!='') { echo $_POST['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($_POST['vendor_name']!='') { echo $_POST['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($_POST['vendor_contact_name']!='') { echo $_POST['vendor_contact_name']; }?>" class="textfield require_field" /></td>
</tr>
<tr>
<td align="right" valign="top">Vendor Conatact Phone</td>
<td><input type="text" name="vendor_conatct_phone" id="vendor_conatct_phone" class="validate[custom[integer]] textfield require_field" value="<?php if($_POST['vendor_conatct_phone']!='') { echo $_POST['vendor_conatct_phone']; }?>" /></td>
</tr>
<!-- </table>
</div>
</td>
</tr>
<tr>
<td>
<div class="section-tbl">-->
<!-- <table width="100%" border="0" cellspacing="0" cellpadding="0" class="center-tbl new-tbl"> -->
<?php /*?><tr>
<td height="35" colspan="4" align="left">Notes</td>
</tr>
<tr>
<td align="left" valign="middle"><?php if(empty($_POST['notes'])){ $_POST['notes']=''; } ?>
Yes
</td>
<td align="left" valign="middle"><input name="notes" id="notes" type="radio" value="Y" class="validate[required] radiobutton" <?php if($_POST['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($_POST['notes']=='N') { ?>checked="checked"<?php }else{ ?>checked="checked"<?php } ?> onclick="open_notes(this.value);"/></td>
</tr><?php */?>
<tr>
<td height="29" align="left">Vendor Contact Email</td>
<td align="left">
<input name="vendor_contact_email" id="vendor_contact_email" type="text" class="validate[custom[email]] textfield require_field" value="<?php if($_POST['vendor_contact_email']!='') { echo $_POST['vendor_contact_email']; }?>" />
</td>
</tr>
<tr>
<td height="29" 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 textarea-require" style="width:124px;"><?php echo $_POST['blacklisted_desc']; ?></textarea></td>
</tr>
</table>
</div>
<!-- ---------------- -->
Account Manager
</td>
<td align="left">
<select name="account_manager" id="account_manager" class=" selectfield require_select">
<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($_POST['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>
<td align="left">
<select name="hr_manager" class=" selectfield require_select">
<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($_POST['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>
<td align="left">
<select name="sales_manager" class=" selectfield require_select">
<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($_POST['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>
<td align="left">
<input name="source" id="source" type="text" class="textfield require_field" value="<?php if($_POST['source']!='') { echo $_POST['source']; }?>" />
</td>
</tr>
<tr>
<td height="29" align="left">Notes/Comments</td>
<td align="left">
<textarea id="notes_comments" name="notes_comments" class="textarea textarea-require" ><?php if($_POST['notes_comments']!='') { echo $_POST['notes_comments']; }?></textarea>
</td>
</tr>
<tr>
<td height="29" align="left">Current Associate Status</td>
<td align="left">
<select name="current_associate_status" class=" selectfield require_select">
<option value="Active" <?php if($_POST['current_associate_status']=='Active') { ?>selected="selected"<?php } ?>>Active</option>
<option value="Inactive" <?php if($_POST['current_associate_status']=='Inactive') { ?>selected="selected"<?php } ?>>Inactive</option>
</select>
</td>
</tr>
</table>
</div>
</td>
</tr>
<!-- --------------------------------------------mY sEcTiOn eNd------------------------------------------------------------------------ -->
<tr>
<td colspan="3"> <br /> </td>
</tr>
<tr>
<td colspan="3" align="center" class="dsdjh" style="">
<input name="submit" type="submit" id="sub_btm" value="Save" class="require org" style=" float: none !important;" />
<input type="button" name="back" id="back" class="require" value="Cancel" style=" float: none !important;" onclick="window.history.back();" />
</td>
</tr>
</table>
<div class="clear"></div>
</form>
</div>
<?php include("includes/footer.php"); ?>
Directory Contents
Dirs: 17 × Files: 180