Preview: view_employee.php
Size: 18.63 KB
/home/jambtst2015/public_html/giraffeng.com/admin/view_employee.php
<?php include("includes/head.php"); ?>
<?php include("includes/header.php"); ?>
<?php
//echo $currentFile = $_SERVER["PHP_SELF"]."<br>";
//echo $parts = Explode('/', $currentFile)."<br>";
//echo $pageName = $parts[count($parts) - 1]."<br>";
?>
<script>
function open_src(val){
if(val==''){
$('#excel_open').slideToggle("slow");
}
else{
$('#div_src_req').slideToggle("slow");
}
}
function linK(){
var user_id = document.getElementById("anotheruser1").value;
window.location = "employee_xls_report.php?userid="+user_id;
}
function changeUser(){
var value = document.getElementById("anotheruser").value;
//alert(value);
window.location = "<?php echo 'http://' . $_SERVER['HTTP_HOST'].dirname($_SERVER['PHP_SELF']).'/'; ?>view_employee.php?userid="+value+"&page=<?php echo $_REQUEST['page']; ?>&name=<?=$_REQUEST['name']?>&email=<?=$_REQUEST['email']?>&associate_type=<?=$_REQUEST['associate_type']?>&visa_status=<?=$_REQUEST['visa_status']?>&account_manager=<?=$_REQUEST['account_manager']?>&hr_manager=<?=$_REQUEST['hr_manager']?>&sales_manager=<?=$_REQUEST['sales_manager']?>&hotlist=<?=$_REQUEST['hotlist']?>&blacklisted=<?=$_REQUEST['blacklisted']?>&send_emails=<?=$_REQUEST['send_emails']?>&relocation=<?=$_REQUEST['relocation']?>&record_status=<?=$_REQUEST['record_status']?>&submit2=<?=$_REQUEST['submit2']?>&state=<?=$_REQUEST['state']?>&city=<?=$_REQUEST['city']?>&primary_skills_src=<?=$primary_skills?>&secondary_skills_src=<?=$secondary_skills?>&first=<?=$_REQUEST['first']?>&last=<?=$_REQUEST['last']?>";
}
</script>
<?php
/*---fetch value----*/
//include('lib/conn.php');
//include("functions.php");
$userId = $_REQUEST['userid'];
$userhId = $_REQUEST['userhid'];
if($userId!=''){
$result=mysql_fetch_array(mysql_query("select * from sat_staff where staff_id='".$userId."'"));
}
else{
$result=mysql_fetch_array(mysql_query("select * from abs_candidate_history where id='".$userhId."'"));
}
?>
<body>
<div class="body_section">
<div class="body_container table_container table_container_nw" style="width:100%;">
<div class="container_bottom_section tbl_req_new" style="width:100%;">
<form name="myfrm" action="" method="post" id="formID" enctype="multipart/form-data">
<table width="100%" border="0" cellspacing="0" cellpadding="0" bordercolor="#000000" style="border-collapse:collapse; margin:0 auto;">
<?php
if(empty($_REQUEST['success'])){ $_REQUEST['success']=''; }
if($_REQUEST['success']=='1'){
?>
<tr>
<td colspan="2" class="head_text" style="color:#090; background:none; text-align:left;" align="left">Staff Details Added Successfully</td>
</tr>
<?php
}
if($_REQUEST['success']=='2'){
?>
<tr>
<td colspan="2" class="head_text" style="color:#090; background:none; text-align:left;" align="left">Staff Details Updated Successfully</td>
</tr>
<?php
}
?>
<tr>
<?php
if($_REQUEST['edit']=='no'){
?>
<td colspan="2" style="font-family:Verdana, Geneva, sans-serif; font-size:12px; color:#F00;">
Sorry, you do not have permission to edit this entry.
</td>
<?php } ?></tr> <tr> <td> <p class="client_table mrgn-btm10"><i class="fa fa-file-text-o"></i> Staff Details</p> </td> </tr>
<tr>
<?php if($userId!=''){ ?>
<td colspan="2" class="edit_nw">
<?php //if($user_level==1){
?>
<a href="employeeform_edit.php?userid=<?php echo $result['staff_id'];?>&page=<?php echo $_REQUEST['page']; ?>&name=<?=$_REQUEST['name']?>&email=<?=$_REQUEST['email']?>&associate_type=<?=$_REQUEST['associate_type']?>&visa_status=<?=$_REQUEST['visa_status']?>&account_manager=<?=$_REQUEST['account_manager']?>&hr_manager=<?=$_REQUEST['hr_manager']?>&sales_manager=<?=$_REQUEST['sales_manager']?>&hotlist=<?=$_REQUEST['hotlist']?>&blacklisted=<?=$_REQUEST['blacklisted']?>&send_emails=<?=$_REQUEST['send_emails']?>&relocation=<?=$_REQUEST['relocation']?>&record_status=<?=$_REQUEST['record_status']?>&submit2=<?=$_REQUEST['submit2']?>&state=<?=$_REQUEST['state']?>&city=<?=$_REQUEST['city']?>&primary_skills_src=<?=$primary_skills?>&secondary_skills_src=<?=$secondary_skills?>&first=<?=$_REQUEST['first']?>&last=<?=$_REQUEST['last']?>"><img src="images/edit.png" alt="Edit" title="Edit" /></a>
<a href="employee.php?delete=del&delete_id=<?php echo $result['staff_id'];?>&page=<?=$_REQUEST['page']?>&name=<?=$_REQUEST['name']?>&email=<?=$_REQUEST['email']?>&associate_type=<?=$_REQUEST['associate_type']?>&visa_status=<?=$_REQUEST['visa_status']?>&account_manager=<?=$_REQUEST['account_manager']?>&hr_manager=<?=$_REQUEST['hr_manager']?>&sales_manager=<?=$_REQUEST['sales_manager']?>&hotlist=<?=$_REQUEST['hotlist']?>&blacklisted=<?=$_REQUEST['blacklisted']?>&send_emails=<?=$_REQUEST['send_emails']?>&relocation=<?=$_REQUEST['relocation']?>&record_status=<?=$_REQUEST['record_status']?>&submit2=<?=$_REQUEST['submit2']?>&state=<?=$_REQUEST['state']?>&city=<?=$_REQUEST['city']?>&primary_skills_src=<?=$primary_skills?>&secondary_skills_src=<?=$secondary_skills?>&first=<?=$_REQUEST['first']?>&last=<?=$_REQUEST['last']?>" onClick="return confirm('Are you sure you want to delete this employee?');"><img src="images/1304761651_DeleteRed.png" alt="Delete" title="Delete" border="0" /></a>
<?php
//}
} ?>
<a href="javascript:open_src('');" class="require xs org" style="margin-right:5px; margin-bottom:5px;"><i class="fa fa-external-link"></i> Export to excel </a></td></tr>
<tr>
<td colspan="2">
<p align="center" class="fieldtextnew view_requirement export-left"> Select another consultant: <select name="anotheruser" id="anotheruser" onChange="return changeUser();" class="selectfield require_select"> <?php $ActUsers = mysql_query("SELECT `staff_id` , `firstname` , `lastname` FROM `sat_staff` WHERE `current_associate_status`='Active' order by firstname"); while($ActUsers1 = mysql_fetch_array($ActUsers)) { ?> <option value="<?php echo $ActUsers1['staff_id']; ?>" <?php if($ActUsers1['staff_id']==$_REQUEST['userid']){ ?> selected <?php } ?>><?php echo $ActUsers1['firstname']." ".$ActUsers1['lastname']; ?></option> <?php } ?> </select> </p>
<p id="excel_open" style="display:none" align="center" class="fieldtextnew view_requirement export-right">
Staff Name:<select name="anotheruser1" id="anotheruser1" class="selectfield require_select" >
<?php
$ActUsers = mysql_query("SELECT `staff_id` , `firstname` , `lastname` FROM `sat_staff` WHERE `current_associate_status`='Active'");
while($ActUsers1 = mysql_fetch_array($ActUsers))
{
?>
<option value="<?php echo $ActUsers1['staff_id']; ?>" <?php if($ActUsers1['staff_id']==$_REQUEST['userid']){ ?> selected <?php } ?>><?php echo $ActUsers1['firstname']." ".$ActUsers1['lastname']; ?></option>
<?php } ?>
</select>
<a href="javascript:void(0)" onClick="return linK();" class="require" style="margin: 4px 0px ! important;">Export to excel <i class="fa fa-external-link"></i></a>
</p>
</td>
</tr>
<?php if(empty($error)){$error='';}
if($error!=''){
?>
<tr>
<td colspan="2">
<div class="error"><?php echo $error; ?></div>
</td>
</tr>
<?php } ?>
<tr>
<td>
<table width="100%" cellpadding="0" cellspacing="0" class="table_top2">
<tr>
<td valign="top" width="50%" >
<table class="new-tbl stf-dtl" style="margin: 0 9px !important;">
<tr>
<td width="170" align="left" valign="top" class="fieldtextnew view_requirement">First Name :</td>
<td width="281" valign="top" class="fieldtextnewtext"><?php echo $result['firstname']; ?></td>
</tr>
<tr>
<td width="170" align="left" valign="top" class="fieldtextnew view_requirement">Last Name :</td>
<td width="281" valign="top" class="fieldtextnewtext"><?php echo $result['lastname']?></td>
</tr>
<tr>
<td align="left" valign="top" class="fieldtextnew view_requirement">Home Phone :</td>
<td valign="top" class="fieldtextnewtext"><?php if($result['hphone']!='') { echo $result['hphone']; }else{ echo "N/A"; }?></td>
</tr>
<tr>
<td align="left" valign="top" class="fieldtextnew view_requirement">Cell Phone :</td>
<td valign="top" class="fieldtextnewtext"><?php if($result['cphone']!='') { echo $result['cphone']; }else{ echo "N/A"; } ?></td>
</tr>
<tr>
<td align="left" valign="top" class="fieldtextnew view_requirement">Address :</td>
<td valign="top" class="fieldtextnewtext"><?php if($result['address']!='') { echo $result['address']; }else{ echo "N/A"; } ?></td>
</tr>
<tr>
<td align="left" valign="top" class="fieldtextnew view_requirement">Primary Email :</td>
<td valign="top" class="fieldtextnewtext"><?php if($result['pemail']!='') { echo $result['pemail']; }else{ echo "N/A"; } ?></td>
</tr>
<tr>
<td align="left" valign="top" class="fieldtextnew view_requirement">Alternate Email :</td>
<td valign="top" class="fieldtextnewtext"><?php if($result['aemail']!='') { echo $result['aemail']; }else{ echo "N/A"; } ?></td>
</tr>
<tr>
<td align="left" valign="top" class="fieldtextnew view_requirement">Date Of Birth :</td>
<td valign="top" class="fieldtextnewtext">
<?php
if($result['dob']=='' || $result['dob']=='/') {
echo 'N/A';
}
else{
$dob = $result['dob'];
$dob_expl = explode('/',$result['dob']);
$dob_day = $dob_expl[1];
echo addOrdinalNumberSuffix($dob_day).' ';
$dob_mon = $dob_expl[0];
$monthName = date("F", mktime(0, 0, 0, $dob_mon, 10));
echo $monthName; //output: May
}
?>
</td>
</tr>
<tr>
<td align="left" valign="top" class="fieldtextnew view_requirement">Associate Type :</td>
<td valign="top" class="fieldtextnewtext"><?php if($result['associate_type']!='') { echo $result['associate_type']; }else{ echo "N/A"; } ?></td>
</tr>
<tr>
<td align="left" valign="top" class="fieldtextnew view_requirement">Visa Status :</td>
<td valign="top" class="fieldtextnewtext"><?php if($result['visa_status']!='') { echo $result['visa_status']; }else{ echo "N/A"; } ?></td>
</tr>
<tr>
<td align="left" valign="top" class="fieldtextnew view_requirement">Billing Client Name :</td>
<td valign="top" class="fieldtextnewtext"><?php if($result['billing_client_name']!='') { echo $result['billing_client_name']; }else{ echo "N/A"; } ?></td>
</tr>
<tr>
<td align="left" valign="top" class="fieldtextnew view_requirement">End Client Name :</td>
<td valign="top" class="fieldtextnewtext"><?php if($result['end_client_name']!='') { echo $result['end_client_name']; }else{ echo "N/A"; } ?></td>
</tr>
<tr>
<td align="left" valign="top" class="fieldtextnew view_requirement">Worksite Street :</td>
<td valign="top" class="fieldtextnewtext"><?php if($result['worksite_street']!='') { echo $result['worksite_street']; }else{ echo "N/A"; } ?></td>
</tr>
<tr>
<td align="left" valign="top" class="fieldtextnew view_requirement">Worksite City :</td>
<td valign="top" class="fieldtextnewtext"><?php if($result['worksite_city']!='') { echo $result['worksite_city']; }else{ echo "N/A"; } ?></td>
</tr>
<tr>
<td align="left" valign="top" class="fieldtextnew view_requirement">Worksite State :</td>
<td valign="top" class="fieldtextnewtext"><?php if($result['worksite_state']!='') { echo $result['worksite_state']; }else{ echo "N/A"; } ?></td>
</tr>
<tr>
<td align="left" valign="top" class="fieldtextnew view_requirement">Worksite Zipcode :</td>
<td valign="top" class="fieldtextnewtext"><?php if($result['worksite_zipcode']!='') { echo $result['worksite_zipcode']; }else{ echo "N/A"; } ?></td>
</tr>
<tr>
<td align="left" valign="top" class="fieldtextnew view_requirement">Work Phone No :</td>
<td valign="top" class="fieldtextnewtext"><?php if($result['work_phone_no']!='') { echo $result['work_phone_no']; }else{ echo "N/A"; } ?></td>
</tr>
<tr>
<td align="left" valign="top" class="fieldtextnew view_requirement">Work Email :</td>
<td valign="top" class="fieldtextnewtext"><?php if($result['work_email']!='') { echo $result['work_email']; }else{ echo "N/A"; } ?></td>
</tr>
<tr>
<td align="left" valign="top" class="fieldtextnew view_requirement">Client Payment Terms :</td>
<td valign="top" class="fieldtextnewtext"><?php if($result['client_payment_terms']!='') { echo $result['client_payment_terms']; }else{ echo "N/A"; } ?></td>
</tr>
<tr>
<td align="left" valign="top" class="fieldtextnew view_requirement">Client A/P Contact Name :</td>
<td valign="top" class="fieldtextnewtext"><?php if($result['client_contact_name']!='') { echo $result['client_contact_name']; }else{ echo "N/A"; } ?></td>
</tr>
</table>
</td>
<td valign="top" width="50%" >
<table class="new-tbl stf-dtl" style="margin: 0 9px !important; float:right;">
<tr>
<td width="235" align="left" valign="top" class="fieldtextnew view_requirement">Client A/P Contact Email :</td>
<td width="216" valign="top" class="fieldtextnewtext">
<?php if($result['client_contact_email']!='') { echo $result['client_contact_email']; }else{ echo "N/A"; } ?>
</td>
</tr>
<tr>
<td align="left" valign="top" class="fieldtextnew view_requirement"><span style="padding-top:13px;">Client A/P Contact Phone</span> :</td>
<td valign="top" class="fieldtextnewtext">
<?php if($result['client_contact_phone']!='') { echo $result['client_contact_phone']; }else{ echo "N/A"; } ?>
</td>
</tr>
<tr>
<td align="left" valign="top" class="fieldtextnew view_requirement"><span style="padding-top:13px;">On PSA</span> :</td>
<td valign="top" class="fieldtextnewtext">
<?php if($result['on_psa']!='') { echo $result['on_psa']; }else{ echo "N/A"; } ?>
</td>
</tr>
<tr>
<td align="left" valign="top" class="fieldtextnew view_requirement"><span style="padding-top:13px;">PSA Effective Date</span> :</td>
<td valign="top" class="fieldtextnewtext"><?php if($result['psa_effective_date']!='0000-00-00') { echo change_dateformat_reverse($result['psa_effective_date']); }else{ echo "N/A"; } ?></td>
</tr>
<tr>
<td align="left" valign="top" class="fieldtextnew view_requirement"><span style="padding-top:13px;">PSA Deal Details</span> :</td>
<td valign="top" class="fieldtextnewtext"><?php if($result['psa_deal_details']!='') { echo $result['psa_deal_details']; }else{ echo "N/A"; } ?></td>
</tr>
<tr>
<td align="left" valign="top" class="fieldtextnew view_requirement">Insurance Coverage :</td>
<td valign="top" class="fieldtextnewtext"><?php if($result['insurance_coverage']!='') { echo $result['insurance_coverage']; }else{ echo "N/A"; } ?></td>
</tr>
<tr>
<td align="left" valign="top" class="fieldtextnew view_requirement">Hire Date :</td>
<td valign="top" class="fieldtextnewtext"><?php if($result['hire_date']!='0000-00-00') { echo change_dateformat_reverse($result['hire_date']); }else{ echo "N/A"; } ?></td>
</tr>
<tr>
<td align="left" valign="top" class="fieldtextnew view_requirement">Starting Date :</td>
<td valign="top" class="fieldtextnewtext">
<?php if($result['starting_date']!='0000-00-00') { echo change_dateformat_reverse($result['starting_date']); }else{ echo "N/A"; } ?>
</td>
</tr>
<tr>
<td align="left" valign="top" class="fieldtextnew view_requirement">Ending Date :</td>
<td valign="top" class="fieldtextnewtext"><?php if($result['ending_date']!='0000-00-00') { echo change_dateformat_reverse($result['ending_date']); }else{ echo "N/A"; } ?></td>
</tr>
<tr>
<td align="left" valign="top" class="fieldtextnew view_requirement">Vendor(Enter ABSI for emplyees) :</td>
<td valign="top" class="fieldtextnewtext"><?php if($result['vendor_name']!='') { echo $result['vendor_name']; }else{ echo "N/A"; } ?></td>
</tr>
<tr>
<td align="left" valign="top" class="fieldtextnew view_requirement">Vendor Contact Name :</td>
<td valign="top" class="fieldtextnewtext"><?php if($result['vendor_contact_name']!='') { echo $result['vendor_contact_name']; }else{ echo "N/A"; } ?></td>
</tr>
<tr>
<td align="left" valign="top" class="fieldtextnew view_requirement">Vendor Conatct Phone :</td>
<td valign="top" class="fieldtextnewtext"><?php if($result['vendor_conatct_phone']!='') { echo $result['vendor_conatct_phone']; }else{ echo "N/A"; } ?></td>
</tr>
<tr>
<td align="left" valign="top" class="fieldtextnew view_requirement">Vendor Contact Email :</td>
<td valign="top" class="fieldtextnewtext"><?php if($result['vendor_contact_email']!='') { echo $result['vendor_contact_email']; }else{ echo "N/A"; } ?></td>
</tr>
<tr>
<td align="left" valign="top" class="fieldtextnew view_requirement">Account Manager :</td>
<td valign="top" class="fieldtextnewtext"><?php echo check_null_value('firstname','sat_users','user_id',$result['account_manager']); ?></td>
</tr>
<tr>
<td align="left" valign="top" class="fieldtextnew view_requirement">HR Manager :</td>
<td valign="top" class="fieldtextnewtext"><?php echo check_null_value('firstname','sat_users','user_id',$result['hr_manager']); ?></td>
</tr>
<tr>
<td align="left" valign="top" class="fieldtextnew view_requirement">Sales Manager :</td>
<td valign="top" class="fieldtextnewtext"><?php echo check_null_value('firstname','sat_users','user_id',$result['sales_manager']); ?></td>
</tr>
<tr>
<td align="left" valign="top" class="fieldtextnew view_requirement">Source :</td>
<td valign="top" class="fieldtextnewtext"><?php if($result['source']!='') { echo $result['source']; }else{ echo "N/A"; } ?></td>
</tr>
<tr>
<td align="left" valign="top" class="fieldtextnew view_requirement">Notes/Comments :</td>
<td valign="top" class="fieldtextnewtext"><?php if($result['notes_comments']!='') { echo $result['notes_comments']; }else{ echo "N/A"; } ?></td>
</tr>
<tr>
<td align="left" valign="top" class="fieldtextnew view_requirement">Current Associate Status :</td>
<td valign="top" class="fieldtextnewtext"><?php if($result['current_associate_status']!='') { echo $result['current_associate_status']; }else{ echo "N/A"; } ?></td>
</tr>
</table>
</td>
</tr>
<!--<tr>
<td colspan="2" height="20" bgcolor="#EFEFEF">
</td>
</tr>-->
</table>
</td>
</tr>
<tr>
<td colspan="2" align="center">
<?php if($userId!=''){ ?>
<a href="javascript:window.history.back();">
<input name="cancel" type="button" value="Back" class="submit" style=" margin-bottom:10px;" /></a>
<?php } ?>
</td>
</tr>
</table>
<div class="clear"></div>
</form>
</div>
</div>
</div>
</body>
</html>
<?php include("includes/footer.php"); ?>
Directory Contents
Dirs: 17 × Files: 180