File manager - Edit - /home/autoph/public_html/voc/home/CL_SEARCH_DEFERRED.php
Back
<?php include 'core/init.php'; //$connect_error = 'Sorry, we\'re experiencing connection problem. Please try again later... Thank you!'; //mysql_connect('localhost','root','aee1024') or die ($connect_error); //mysql_select_db('db_vts') or die($connect_error); //error_reporting(1); $compID= $user_data['company']; $myDate = date_create() ->format("Y-m-d"); $dataCount = 0; if(isset($_POST['done'])){ $SearchText = mysql_escape_string($_POST['SearchText']); //$getActiveClearance = mysql_query("SELECT * FROM `cl_clearance_header` WHERE `cl_h_hr_approval`='CHECK PREPARATION' AND `search_ref_lname` LIKE '%$SearchText%' ORDER BY `search_ref_lname` ASC"); //$getActiveClearance = mysql_query("SELECT * FROM `cl_clearance_header` WHERE `cl_h_hr_approval`='LASTPAY COMPUTATION' AND `search_ref_lname` LIKE '%$SearchText%' ORDER BY `search_ref_lname` ASC"); //$getActiveClearance = mysql_query("SELECT * FROM `cl_clearance_header` WHERE `cl_h_hr_approval`!='Approved' AND `cl_status`='1' AND `cl_h_comp_id` = '$compID' AND `search_ref_lname` LIKE '%$SearchText%' || `cl_h_hr_approval`!='Approved' AND `cl_status`='1' AND `cl_h_comp_id` = '$compID' AND `search_ref_fname` LIKE '%$SearchText%' || `search_ref_emp_id` LIKE '%$SearchText%' ORDER BY `cl_h_date_created` DESC"); echo "<table>"; echo "<thead>"; echo "<th style='width:50px;border:0px solid white'>REC ID.</th>"; echo "<th style='width:80px;border:0px solid white'>COMPANY</th>"; echo "<th style='width:80px;border:0px solid white'>EMP. ID.</th>"; echo "<th style='width:180px;border:0px solid white'>EMPLOYEE NAME</th>"; echo "<th style='width:100px;border:0px solid white'>POSITION</th>"; echo "<th style='width:100px;border:0px solid white'>CLEARANCE DATE</th>"; echo "<th style='width:100px;border:0px solid white'>RECEIVED DATE</th>"; echo "<th style='width:180px;border:0px solid white'>STATUS</th>"; echo "<th style='width:190px;border:0px solid white'>SLA RATING</th>"; echo "<th style='width:190px;border:0px solid white'>FINAL PAY PROGRESS</th>"; echo "<th style='width:50px;border:0px solid white'>ALERT</th>"; echo "</thead>"; //$getActiveClearance = mysql_query("SELECT * FROM `cl_clearance_header` WHERE `cl_h_hr_approval`='LASTPAY COMPUTATION' ORDER BY `search_ref_lname` ASC"); $getActiveClearance = mysql_query("SELECT * FROM `cl_clearance_header` WHERE `cl_h_hr_approval`='DEFERRED' AND `search_ref_lname` LIKE '%$SearchText%' ORDER BY `search_ref_lname` ASC"); while($row=mysql_fetch_array($getActiveClearance)){ $dataCount = $dataCount + 1; $hDI = $row['h_id']; $chkComments = mysql_result(mysql_query("SELECT COUNT(id) FROM `cl_action_slip_data` WHERE `cl_hdr_id`='$hDI'"),0); //$chkComments = mysql_result(mysql_query("SELECT COUNT(f_id) FROM `cl_final_pay_comments` WHERE `cl_id`='$hDI'"),0); $uID = $row['cl_h_emp_id']; $pID = $row['cl_emp_position']; //START OF SLA CODE $olddate = $row['cl_sla_start']; $endDate = $row['cl_sla_end']; if($endDate != ""){ $myEndDate = strtotime($endDate); }else{ $myEndDate = time(); } $your_date = strtotime($olddate); $datediff = $myEndDate - $your_date; $totalCount = round($datediff / (60 * 60 * 24)); if($totalCount == 1){ $MyDay="Day"; }else{ $MyDay="Days"; } if($totalCount < 15 ){ $color = '#06561c'; } if($totalCount > 14 && $totalCount < 25 ){ $color = '#cb5f04'; } if($totalCount > 24 ){ $color = '#f50732 '; } //END OF SLA CODE $uFName=mysql_result(mysql_query("SELECT `u_fname` FROM `vts_users` WHERE `u_id`='$uID'"),0); $uLName=mysql_result(mysql_query("SELECT `u_lname` FROM `vts_users` WHERE `u_id`='$uID'"),0); $uEMPID=mysql_result(mysql_query("SELECT `employee_id` FROM `vts_users` WHERE `u_id`='$uID'"),0); $uPosition=mysql_result(mysql_query("SELECT `position_title` FROM `db_positions` WHERE `pid`='$pID'"),0); $uCompCode=mysql_result(mysql_query("SELECT `company` FROM `vts_users` WHERE `u_id`='$uID'"),0); $userCompanyCode=mysql_result(mysql_query("SELECT `comp_code` FROM `vts_company` WHERE `comp_id`='$uCompCode'"),0); $count = $count + 1; ?><tr onclick="javascript:showAdminAccess(this);"><?php echo "<td style=';border:0px solid white;cursor:pointer;color:$color'>".strtoupper($row['h_id'])."</td>"; echo "<td style=';border:0px solid white;cursor:pointer;color:$color'>".$userCompanyCode."</td>"; echo "<td style=';border:0px solid white;cursor:pointer;color:$color'>".strtoupper($uEMPID)."</td>"; echo "<td style=';border:0px solid white;cursor:pointer;color:$color'>".strtoupper($uLName).", ".strtoupper($uFName)."</td>"; echo "<td style=';border:0px solid white;cursor:pointer;color:$color'>".strtoupper($uPosition)."</td>"; echo "<td style=';border:0px solid white;cursor:pointer;color:$color'>".strtoupper($row['cl_h_date_created'])."</td>"; echo "<td style=';border:0px solid white;cursor:pointer;color:$color'>"; $apprDate = $row['cl_approver_id_timestamp']; $exAprDate = explode(" ",$apprDate); echo $exAprDate[0]; echo"</td>"; echo "<td style=';border:0px solid white;cursor:pointer;color:$color'>".strtoupper($row['cl_second_wave'])."</td>"; echo "<td style=';border:0px solid white;cursor:pointer;color:black'>"; $chkSLA = 30 - $totalCount; if($chkSLA < 0 ){ $consumedSLA = number_format((($chkSLA / 30) * 100),2); if($consumedSLA < -100){ $mySLA = '0.00%'; }else{ $mySLA = (100 + $consumedSLA)."%"; } }else{ $mySLA = '100%'; } echo "<b>".$totalCount ." </b> <i style='font-family:Arial;font-size:10px'>".$MyDay."</i> | Rating:(" .$mySLA.")"; echo"</td>"; echo "<td style=';border:0px solid white;cursor:pointer;color:$color'>"; $snWave = $row['cl_second_wave']; switch($snWave){ case 'LASTPAY COMPUTATION': // echo "<b style='float:left;margin:2px'><abbr title='Waiting for Final Pay'>✅</abbr></b>"; echo "<b style='float:left;margin:2px'><abbr title='PAYROLL: For computation of last pay'>⬜</abbr></b>"; echo "<b style='float:left;margin:2px'><abbr title='HRD: Employee Confirmation'>⬜</abbr></b>"; echo "<b style='float:left;margin:2px'><abbr title='ACCNT: Preparation of Check Request'>⬜</abbr></b>"; echo "<b style='float:left;margin:2px'><abbr title='TREASURY: Preparation of Check'>⬜</abbr></b>"; echo "<b style='float:left;margin:2px'><abbr title='HRD: Preparation of documents'>⬜</abbr></b>"; echo "<b style='float:left;margin:2px'><abbr title='LEGAL: For Scheduling'>⬜</abbr></b>"; echo "<b style='float:left;margin:2px'><abbr title='HRD: Ready for Release'>⬜</abbr></b>"; break; case 'LASTPAY APPROVAL': echo "<b style='float:left;margin:2px'><abbr title='PAYROLL: For computation of last pay'>✅</abbr></b>"; echo "<b style='float:left;margin:2px'><abbr title='HRD: Employee Confirmation'>⬜</abbr></b>"; echo "<b style='float:left;margin:2px'><abbr title='ACCNT: Preparation of Check Request'>⬜</abbr></b>"; echo "<b style='float:left;margin:2px'><abbr title='TREASURY: Preparation of Check'>⬜</abbr></b>"; echo "<b style='float:left;margin:2px'><abbr title='HRD: Preparation of documents'>⬜</abbr></b>"; echo "<b style='float:left;margin:2px'><abbr title='LEGAL: For Scheduling'>⬜</abbr></b>"; echo "<b style='float:left;margin:2px'><abbr title='HRD: Ready for Release'>⬜</abbr></b>"; break; case 'CHECK PREPARATION': echo "<b style='float:left;margin:2px'><abbr title='PAYROLL: For computation of last pay'>✅</abbr></b>"; echo "<b style='float:left;margin:2px'><abbr title='HRD: Employee Confirmation'>✅</abbr></b>"; echo "<b style='float:left;margin:2px'><abbr title='ACCNT: Preparation of Check Request'>⬜</abbr></b>"; echo "<b style='float:left;margin:2px'><abbr title='TREASURY: Preparation of Check'>⬜</abbr></b>"; echo "<b style='float:left;margin:2px'><abbr title='HRD: Preparation of documents'>⬜</abbr></b>"; echo "<b style='float:left;margin:2px'><abbr title='LEGAL: For Scheduling'>⬜</abbr></b>"; echo "<b style='float:left;margin:2px'><abbr title='HRD: Ready for Release'>⬜</abbr></b>"; break; case 'CHECK CREATION': echo "<b style='float:left;margin:2px'><abbr title='PAYROLL: For computation of last pay'>✅</abbr></b>"; echo "<b style='float:left;margin:2px'><abbr title='HRD: Employee Confirmation'>✅</abbr></b>"; echo "<b style='float:left;margin:2px'><abbr title='ACCNT: Preparation of Check Request'>✅</abbr></b>"; echo "<b style='float:left;margin:2px'><abbr title='TREASURY: Preparation of Check'>⬜</abbr></b>"; echo "<b style='float:left;margin:2px'><abbr title='HRD: Preparation of documents'>⬜</abbr></b>"; echo "<b style='float:left;margin:2px'><abbr title='LEGAL: For Scheduling'>⬜</abbr></b>"; echo "<b style='float:left;margin:2px'><abbr title='HRD: Ready for Release'>⬜</abbr></b>"; break; case 'CHECK RELEASING': echo "<b style='float:left;margin:2px'><abbr title='PAYROLL: For computation of last pay'>✅</abbr></b>"; echo "<b style='float:left;margin:2px'><abbr title='HRD: Employee Confirmation'>✅</abbr></b>"; echo "<b style='float:left;margin:2px'><abbr title='ACCNT: Preparation of Check Request'>✅</abbr></b>"; echo "<b style='float:left;margin:2px'><abbr title='TREASURY: Preparation of Check'>⬜</abbr></b>"; echo "<b style='float:left;margin:2px'><abbr title='HRD: Preparation of documents'>⬜</abbr></b>"; echo "<b style='float:left;margin:2px'><abbr title='LEGAL: For Scheduling'>⬜</abbr></b>"; echo "<b style='float:left;margin:2px'><abbr title='HRD: Ready for Release'>⬜</abbr></b>"; break; case 'DOCUMENTS PREPARATION': echo "<b style='float:left;margin:2px'><abbr title='PAYROLL: For computation of last pay'>✅</abbr></b>"; echo "<b style='float:left;margin:2px'><abbr title='HRD: Employee Confirmation'>✅</abbr></b>"; echo "<b style='float:left;margin:2px'><abbr title='ACCNT: Preparation of Check Request'>✅</abbr></b>"; echo "<b style='float:left;margin:2px'><abbr title='TREASURY: Preparation of Check'>✅</abbr></b>"; echo "<b style='float:left;margin:2px'><abbr title='HRD: Preparation of documents'>⬜</abbr></b>"; echo "<b style='float:left;margin:2px'><abbr title='LEGAL: For Scheduling'>⬜</abbr></b>"; echo "<b style='float:left;margin:2px'><abbr title='HRD: Ready for Release'>⬜</abbr></b>"; break; case 'SCHEDULE OF RELEASE': echo "<b style='float:left;margin:2px'><abbr title='PAYROLL: For computation of last pay'>✅</abbr></b>"; echo "<b style='float:left;margin:2px'><abbr title='HRD: Employee Confirmation'>✅</abbr></b>"; echo "<b style='float:left;margin:2px'><abbr title='ACCNT: Preparation of Check Request'>✅</abbr></b>"; echo "<b style='float:left;margin:2px'><abbr title='TREASURY: Preparation of Check'>✅</abbr></b>"; echo "<b style='float:left;margin:2px'><abbr title='HRD: Preparation of documents'>✅</abbr></b>"; echo "<b style='float:left;margin:2px'><abbr title='LEGAL: For Scheduling'>✅</abbr></b>"; echo "<b style='float:left;margin:2px'><abbr title='HRD: Ready for Release'>⬜</abbr></b>"; break; case 'READY FOR RELEASE': echo "<b style='float:left;margin:2px'><abbr title='PAYROLL: For computation of last pay'>✅</abbr></b>"; echo "<b style='float:left;margin:2px'><abbr title='HRD: Employee Confirmation'>✅</abbr></b>"; echo "<b style='float:left;margin:2px'><abbr title='ACCNT: Preparation of Check Request'>✅</abbr></b>"; echo "<b style='float:left;margin:2px'><abbr title='TREASURY: Preparation of Check'>✅</abbr></b>"; echo "<b style='float:left;margin:2px'><abbr title='HRD: Preparation of documents'>✅</abbr></b>"; echo "<b style='float:left;margin:2px'><abbr title='LEGAL: For Scheduling'>✅</abbr></b>"; echo "<b style='float:left;margin:2px'><abbr title='HRD: Ready for Release'>✅</abbr></b>"; break; } echo"</td>"; echo "<td style=';border:0px solid white;cursor:pointer;color:$color'>"; if($chkComments > 0){ echo "<img src='images/notify_on_25.png'></img>"; }else{ echo "<img src='images/notify_off_25.png'></img>"; } echo"</td>"; echo "</tr>"; $compRate=0; } echo "</table>"; if($dataCount == 0){ echo "<p style='font-family:Yu Gothic Light;font-size:16px;font-weight:normal;color:black;padding:30px;margin-top:100px;text-align:center'>--No Record Found--</p>"; } //echo '<script>alert("Record '.$selectedApprovingID.' has been deleted...")</script>';s exit(); } ?>
| ver. 1.4 |
.
| PHP 7.3.33 | Generation time: 0 |
proxy
|
phpinfo
|
Settings