File manager - Edit - /home/autoph/public_html/connect/home/CL_FINAL_PAY_VIEW.php
Back
<?php ob_start(); include 'core/init.php'; protected_page(); $comID=$user_data['company']; if(isset($_GET['company'])){ $comName=$_GET['company'];//mysql_result(mysql_query("SELECT `comp_code` FROM `vts_company` WHERE `comp_id`='$comID'"),0); }else{ $comName = mysql_result(mysql_query("SELECT `comp_code` FROM `vts_company` WHERE `comp_id`='$comID'"),0); } $userID=$user_data['u_id']; $dataCount =0; ?> <!DOCTYPE html> <html> <head> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <link rel="stylesheet" href="css/style_menu.css"> <link rel="stylesheet" href="css/style.css"> <!--- LOCALIZED COPY OF JAVASCRIPT --> <!--- LOCALIZED COPY OF JAVASCRIPT --> <script src="https://code.jquery.com/jquery-3.2.1.min.js"></script> <!--- LOCALIZED COPY OF JAVASCRIPT --> <!--- LOCALIZED COPY OF JAVASCRIPT --> <script type="text/javascript"> function ShowUploadBar() { var div = document.getElementById("loadBaraData"); if (div.style.display == 'none') { div.style.display = ''; } else { div.style.display = 'none' } } $(function () { $('.showMenu').click(function () { $('.DivToHide').show(); }); $('.showMenu').click(function () { $('.DivToHide').hide(); }); }); $(function () { $('.showMenu').click(function () { $('.DivToHide').show(); }); $('.showMenu').click(function () { $('.DivToHide').hide(); }); }); function confirmDeleteBox(){ var diva=document.getElementById("deleteBoxYesNo"); if (diva.style.display == 'none') { diva.style.display = ''; } else { diva.style.display = 'none'; } } function showAddNewForm(){ var diva=document.getElementById("AddNewInventoryForm"); if (diva.style.display == 'none') { diva.style.display = ''; } else { diva.style.display = 'none'; } } function showAddNewAdminForm(){ var diva=document.getElementById("FORMAddNewAdmin"); if (diva.style.display == 'none') { diva.style.display = ''; } else { diva.style.display = 'none'; } } function hideAssignMsg(){ $("#saveMessage").fadeOut(3000); }; function showAssignMsg(){ $("#saveMessage").fadeIn(); }; function invHideAssignMsg(){ $("#invMessage").fadeOut(3000); }; function invShowAssignMsg(){ $("#invMessage").fadeIn(); }; </script> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> <!-- add jquery --> <script type="text/javascript" src="http://code.jquery.com/jquery-1.9.1.js"></script> <script language="javascript" type="text/javascript"> $(document).ready(function(){ //START OF FUNCTION========SAVE FINAL PAY FILE==================================================================== //START OF FUNCTION========SAVE FINAL PAY FILE==================================================================== $("#nothingToCompute").click(function(){ var clearanceID = $("#clearanceID").val(); if(clearanceID==''){ alert('No record has been selected. ERROR: File upload failed.'); return false; } if(confirm("WARNING: \n\n Are you sure you want to route this clearance to HR without attachment? \n\n Press 'OK' button to proceed...")){ ShowUploadBar(); $.ajax({ url: "CL_UPDATE_NOTHING_TO_COMPUTE.php", type: "POST", async: true, data: { "clearanceID" : clearanceID, "done" : 0 }, success: function(d){ UpdateFinalPay(); hideOptionForm(); UpdateHRDLastPayApproval(); $("#templateContent").html(d); ShowUploadBar(); } }) } }); //START OF FUNCTION========SAVE FINAL PAY FILE==================================================================== //START OF FUNCTION========SAVE FINAL PAY FILE==================================================================== $('#uploadFinalPayFile').on('change', function() { var clearanceID = $("#clearanceID").val(); var addCompID = $("#addCompID").val(); var file_data = $('#uploadFinalPayFile').prop('files')[0]; var form_data = new FormData(); // Create a FormData object form_data.append('file', file_data); // Append all element in FormData object form_data.append('clearanceID', clearanceID); form_data.append('addCompID', addCompID); if(clearanceID==''){ alert('No record has been selected. ERROR: File upload failed.'); return false; } ShowUploadBar(); $.ajax({ url : 'CL_UPLOAD_FINAL_PAY.php', // point to server-side PHP script dataType : 'text', // what to expect back from the PHP script, if anything cache : false, contentType : false, processData : false, data : form_data, type : 'post', async : true, success : function(output){ UpdateFinalPay(); UpdateHRDLastPayApproval(); hideFinalPayUpload(); ShowUploadBar(); $("#templateContent").html(output); } }); $('#uploadFinalPayFile').val(''); /* Clear the file container */ }); //END OF FUNCTION========SAVE FINAL PAY FILE==================================================================== //END OF FUNCTION========SAVE FINAL PAY FILE==================================================================== //============================================================================================================================================ //=====================================================================returnedToPayroll approvedByHR======================================================================= $("#ViewHRNotes").click(function(){ var recordID = $("#recordID").val(); if(recordID==""){ alert('No record or clearance has been selected'); return false; } ShowUploadBar(); //if(confirm("WARNING: \n\nARE YOU SURE YOU WANT TO DELETE THIS RECORD? \n\n Press 'OK' button to proceed...")){ $.ajax({ url: "CL_LOAD_ACTION_SLIP_PAYROLL_DATA.php", type: "POST", async: true, data: { "recordID": recordID, "done": 1 }, success: function(d){ showHRDLastPayNotesForm(); $("#showLastPayNotes").html(d); hideOptionForm(); ShowUploadBar(); } }) //} }); //============================================================================================================================================ //============================================================================================================================================ $("#goSearchRecord").click(function(){ var SearchText = $("#SearchText").val(); //alert(SearchText); //return false; if(SearchText==""){ //alert('Invalid Entry'); $('#SearchText').focus(); $('#SearchText').css({'border':'1px solid red'}); $('#SearchText').css({'color':'red'}); $('#SearchText').attr("placeholder","Enter something to search..."); return false; } ShowUploadBar(); //if(confirm("WARNING: \n\nARE YOU SURE YOU WANT TO DELETE THIS RECORD? \n\n Press 'OK' button to proceed...")){ $.ajax({ url: "CL_SEARCH_CL_LIST_HEADER.php", type: "POST", async: true, data: { "SearchText": SearchText, "done": 1 }, success: function(d){ //invShowAssignMsg(); $("#templateContent").html(d); //invHideAssignMsg(); //$('#searchText').val(''); . ShowUploadBar(); } }) //} }); //update dashboard count function UpdateFinalPay() { $.ajax({ url: "CL_UPDATE_FINAL_PAY_COUNT.php", type: "get", dataType: "text", success: function(data){ $('#FinalPay').html(data); } }); } //update dashboard count function UpdateHRDLastPayApproval() { $.ajax({ url: "CL_UPDATE_HRD_FINAL_PAY_APPROVAL_COUNT.php", type: "get", dataType: "text", success: function(data){ $('#hrdFinalPayApproval').html(data); } }); } //============================================================================================================================================ //============================================================================================================================================ }); function showOptionForm(){ $("#showOptionAction").fadeIn(400); }; function hideOptionForm(){ $("#showOptionAction").fadeOut(); }; function hideHRDLastPayNotesForm(){ $("#hrdLastPayNotesForm").fadeOut(1000); }; function showHRDLastPayNotesForm(){ $("#hrdLastPayNotesForm").fadeIn(); }; function hideFinalPayUpload(){ $("#finalePayUploadForm").fadeOut(1000); }; function showFinalPayUpload(){ $("#finalePayUploadForm").fadeIn(); hideOptionForm(); }; function hideAdminForm(){ $("#FORMAddNewAdmin").fadeOut(500); }; function showAdminForm(){ $("#FORMAddNewAdmin").fadeIn(500); }; function hideAdminFormEdit(){ $("#FORMAddNewAdminEdit").fadeOut(500); }; function showAdminFormEdit(){ $("#FORMAddNewAdminEdit").fadeIn(500); }; function showAdminAccess(row) { var x=row.cells; document.getElementById("recordID").value = x[0].innerHTML; //endaya document.getElementById("clearanceID").value = x[0].innerHTML; document.getElementById("activeRecord").value = "SELECTED RECORD: " + x[3].innerHTML + " (Record # " + x[2].innerHTML +")"; document.getElementById("rank").value = x[3].innerHTML; document.getElementById("selectedEmpName").value = "SELECTED RECORD: " + x[3].innerHTML; showOptionForm(); } </script> <style> p{ font-Family:Calibri; font-size:20px; font-weight:bold; color:black; padding:11px; padding-top:0px; margin:11px; margin-top:0px; margin-left:0px; } select { -webkit-appearance: button; -moz-appearance: button; -webkit-user-select: none; -moz-user-select: none; -webkit-padding-end: 20px; -moz-padding-end: 20px; -webkit-padding-start: 2px; -moz-padding-start: 2px; background-color: #d9dad8 ; /* Fallback color if gradients are not supported */ background-image: url(images/select-arrow.png), -webkit-linear-gradient(top, #E5E5E5, #F4F4F4); /* For Chrome and Safari */ background-image: url(images/select-arrow.png), -moz-linear-gradient(top, #E5E5E5, #F4F4F4); /* For old Firefox (3.6 to 15) */ background-image: url(images/select-arrow.png), -ms-linear-gradient(top, #E5E5E5, #F4F4F4); /* For pre-releases of Internet Explorer 10*/ background-image: url(images/select-arrow.png), -o-linear-gradient(top, #E5E5E5, #F4F4F4); /* For old Opera (11.1 to 12.0) */ background-image: url(images/select-arrow.png), linear-gradient(to bottom, #E5E5E5, #F4F4F4); /* Standard syntax; must be last */ background-position: center right; background-repeat: no-repeat; border: 1px solid #AAA; border-radius: 2px; box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.1); color: #555; font-size: 14px; margin: 0px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-right:5px; } .bgColorBlk{ background: -webkit-linear-gradient(left top,#000000, #646462,#e3e3da); /* For Safari 5.1 to 6.0 */ background: -o-linear-gradient(bottom right, #000000, #646462,#e3e3da); /* For Opera 11.1 to 12.0 */ background: -moz-linear-gradient(bottom top, #000000, #646462,#e3e3da); /* For Firefox 3.6 to 15 */ background: linear-gradient(to bottom right, #000000, #646462,#e3e3da); /* Standard syntax */ } input, text, date { -webkit-appearance: button; -moz-appearance: button; -webkit-user-select: none; -moz-user-select: none; -webkit-padding-end: 20px; -moz-padding-end: 20px; -webkit-padding-start: 2px; -moz-padding-start: 2px; background-color: #d9dad8 ; /* Fallback color if gradients are not supported */ background-image: url(images/pen.png), -webkit-linear-gradient(top, #E5E5E5, #F4F4F4); /* For Chrome and Safari */ background-image: url(images/pen.png), -moz-linear-gradient(top, #E5E5E5, #F4F4F4); /* For old Firefox (3.6 to 15) */ background-image: url(images/pen.png), -ms-linear-gradient(top, #E5E5E5, #F4F4F4); /* For pre-releases of Internet Explorer 10*/ background-image: url(images/pen.png), -o-linear-gradient(top, #E5E5E5, #F4F4F4); /* For old Opera (11.1 to 12.0) */ background-image: url(images/pen.png), linear-gradient(to bottom, #E5E5E5, #F4F4F4); /* Standard syntax; must be last */ background-position: center left; background-repeat: no-repeat; border: 1px solid #AAA; border-radius: 2px; box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.1); color: #555; font-size: 14px; margin: 0px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-left:5px; height:30px; margin-top:0px; text-align:center; } textarea { -webkit-appearance: button; -moz-appearance: button; -webkit-user-select: none; -moz-user-select: none; -webkit-padding-end: 20px; -moz-padding-end: 20px; -webkit-padding-start: 2px; -moz-padding-start: 2px; background-color: #d9dad8 ; /* Fallback color if gradients are not supported */ background-image: url(images/pen.png), -webkit-linear-gradient(top, #E5E5E5, #F4F4F4); /* For Chrome and Safari */ background-image: url(images/pen.png), -moz-linear-gradient(top, #E5E5E5, #F4F4F4); /* For old Firefox (3.6 to 15) */ background-image: url(images/pen.png), -ms-linear-gradient(top, #E5E5E5, #F4F4F4); /* For pre-releases of Internet Explorer 10*/ background-image: url(images/pen.png), -o-linear-gradient(top, #E5E5E5, #F4F4F4); /* For old Opera (11.1 to 12.0) */ background-image: url(images/pen.png), linear-gradient(to bottom, #E5E5E5, #F4F4F4); /* Standard syntax; must be last */ background-position: center right; background-repeat: no-repeat; border: 1px solid #AAA; border-radius: 2px; box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.1); color: #555; font-size: 14px; margin: 0px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; height:30px; margin-top:0px; padding:2px; } table{ border-collapse:collapse; width:100%; } th{ padding:8px; font-family:Verdana; color: #c4cac3 ; font-size:12px; font-weight:normal; border:1px solid gray; text-align:left; background:#2c3e29; } .tableMenu{ display:block;padding:3px;font-weight:normal;color:blue;border:1px solid gray;;width:70px;float:left;margin-right:15px; } .tableMenu:hover{ display:block;padding:3px;font-weight:bold;color:red;cursor: pointer;border:1px solid red;width:70px;background:#f4fcb6;float:left;;margin-right:15px; } </style> </head> <body style="font-family:Verdana;color:#aaaaaa;background:white"> <!--===================================================== --> <!--===========OPEN TEMPLATE FOR VIEW======================== --> <input type="hidden" id="addByUID" value="<?php echo $userID;?>"> <input type="hidden" id="addCompID" value="<?php echo $comID;?>"> <input type="hidden" id="recordID"> <input type="hidden" id="rank"> <!--===================================================== --> <!--===========EDIT NEW CLEARANCE HEADER======================== --> <div id="FORMAddNewAdminEdit" style="display:none;width:1000px;height:484px;background:#fce4a4;border:2px solid black;position:absolute;top:150px;left:300px;"> <div class='bgColor' style='vertical-align:top;height:30px;margin:0px;width:100%;border-bottom:1px solid gray;padding:5px;font-family:Verdana;font-size:16px;font-weight:bold;color:#e5320a;text-align:left;'> ☶ EDIT CLEARANCE FORM: <div style='float:right;font-family:Calibri;font-size:18px;'> <a href='#' onclick='hideAdminFormEdit()' style='font-weight:bold'> ✕ </a> </div> </div> <!--BODY--> <div style="padding:11px;width:100%;height:450px;margin:0px;border;1px solid black;background:white;border-bottom:1px solid gray"> <p style="border-radius:0px;float:right;width:100%;padding:11px;padding-top:5px;height:40px">❖ EDIT MODE </p> <div id="EditResult" style="width:100%;height:320px;background: #fce4a4 ;margin-top:11px;border:2px solid red;overflow:auto"> </div> <input type="submit" id="saveNewClearanceEdit" value="✛ UPDATE CLEARANCE FORM" STYLE="padding:11px;height:50px;width:250px;float:right;margin-right:0px"> <button type="submit" onclick='hideAdminFormEdit()'STYLE="padding:11px;height:50px;width:150px;float:right;margin-right:20px;margin-top:11px">✖ CANCEL </button> <select id='clearanceTemplatee' style='padding:11px;height:50px;width:350px;float:left;margin-right:100px;margin-top:11px;font-size:18px;color:red;borde:2px solid red'> <?php $gePosition = mysql_query("SELECT * FROM `cl_template_name` WHERE `cl_comp_id` = '$comID' ORDER BY `id` ASC"); echo "<option value=''>-- SELECT TEMPLATE --</option>"; while($row=mysql_fetch_array($gePosition)){ echo "<option value='".$row['id']."'>".$row['cl_template_rank']."</option>"; } ?> </select> </div> </div> <!--========FINAL PAY COMPUTATION FILE UPLOAD============ --> <div id='showOptionAction' style='display:none;position:absolute;top:200px;left:300px;height:220px;width:450px;background:white;border:2px solid gray'> <div style='padding:0px;width:100%;float:left;border:0px solid lightgray;background:#fff;height:100%'> <div class='grayBG' style='vertical-align:top;height:30px;margin:0px;width:100%;border-bottom:0px solid gray;padding:5px;font-family:Verdana;font-weight:bold;font-size:14px;color:#043062;text-align:left'>🤑 SELECT ACTION <div style='float:right;font-family:Calibri;font-size:18px;'> <a href='#' onclick='hideOptionForm()' style='font-weight:bold'> ✕ </a> </div> </div> <div style='width:100%;border:0px solid red;height:60px;padding:20px;margin-top:0px'> <button id='AttachedFinalPay' onclick="showFinalPayUpload()" style="border-radius:0px; border:0px solid white;display:block;margin:1px;width:100%;padding:11px;height:48px;font-family:Calibri;font-size:16px;float:right;border-left:1px solid gray;text-align:left">📆 ATTACH COMPUTATION</button> <button id='ViewHRNotes'style="border-radius:0px; border:0px solid white;display:block;margin:1px;width:100%;padding:11px;height:48px;font-family:Calibri;font-size:16px;float:right;border-left:1px solid gray;text-align:left">🤑 VIEW NOTES</button> <button id='nothingToCompute'style="border-radius:0px; border:0px solid white;display:block;margin:1px;width:100%;padding:11px;height:48px;font-family:Calibri;font-size:16px;float:right;border-left:1px solid gray;text-align:left">🤑 NOTHING TO COMPUTE</button> </div> </div> </div> <!--========HR COMPUTATION APPROVAL WITH EMPLOYEE============ --> <!--===================================================== --> <!--========FINAL PAY NOTES FROM HR============ --> <div id='hrdLastPayNotesForm' style='display:none;position:absolute;top:50px;left:20px;height:700px;width:600px;background:white;border:2px solid gray;z-index:9999999999999999'> <div style='padding:0px;width:100%;float:left;border:0px solid lightgray;background:#fff;height:100%'> <div class='grayBG' style='vertical-align:top;height:30px;margin:0px;width:100%;border-bottom:0px solid gray;padding:5px;font-family:Verdana;font-weight:bold;font-size:12px;color:#043062;text-align:left'>☳ LASTPAY NOTES <div style='float:right;font-family:Calibri;font-size:18px;'> <a href='#' onclick='hideHRDLastPayNotesForm()' style='font-weight:bold'> ✕ </a> </div> </div> <input type="hidden" id="clearanceID" style="font-family:Arial;font-size:16px;color:blue;font-weight:bold;margin:2px;padding:2px;border:0px solid white" disabled> <div id='showLastPayNotes' style='margin-top:5px;padding:5px;padding-top:0px;text-align:center;width:100%;float:left;text-align:justify;font-family:Verdana;font-size:12px;border:0px solid red;height:650px;background: #e5e5e2'> </div> </div> </div> <!--========FINAL PAY COMPUTATION FILE UPLOAD============ --> <!--===================================================== --> <div id='finalePayUploadForm' style='display:none;position:absolute;top:100px;left:20px;height:250px;width:600px;background:white;border:2px solid gray'> <div style='padding:0px;width:100%;float:left;border:0px solid lightgray;background:#fff;height:100%'> <div class='grayBG' style='vertical-align:top;height:30px;margin:0px;width:100%;border-bottom:0px solid gray;padding:5px;font-family:Verdana;font-weight:bold;font-size:12px;color:#043062;text-align:left'>☳ PAYROLL: UPLOAD FINAL PAY COMPUTATION (PDF Format) </div> <div style='padding:30px;padding-top:11px;text-align:center;width:100%;float:right;font-family:Verdana;font-size:12px;border:0px solid red;height:100px'> <p style='float:left;font-family:Tahoma;margin-top:20px;font-size:16px;'>Click 'Browse' button and select the file you wish to attach</p> <!--#########################################################################--> <div id="loadBaraData" style="display:none;position:absolute;top:40%;left:0%;width:98%;padding:5px;padding-left:2px;padding-right:2px;height:80px;background:transparent;z-index:9999;border:0px solid gray;z-index:999999999999999999"> <div id="uploadBar" style="font-family:Calibri;font-size:14px;color:red;text-align:center;margin-top:0px;background:white;display:block;width:100%;height:50px;border:0px solid red;position:relative;left:5px;padding:5px;z-index:999999999999999999;border:1px solid orange"> <img src='images/ajaxLoader.gif' width="100%" height="20px" /><br><center>Uploading File...<center></div> </div> <!--#########################################################################--> <form action = "" method="post" enctype="multipart/form-data" style='background:white;border:0px solid gray;text-align:left;font-family:Arial;font-size:12px;color:black;border-bottom:0px solid lightgray;'> <input type="hidden" id="clearanceID" style="font-family:Arial;font-size:16px;color:blue;font-weight:bold;margin:2px;padding:2px;border:0px solid white" disabled> <input type="hidden" id="uploadTitle" style="font-family:Arial;font-size:16px;color:blue;font-weight:bold;margin-bottom:20px;padding:11px;border:0px solid white;background:yellow;border-top:0px solid lightgray;" disabled> <input type="file" value="Upload" id="uploadFinalPayFile" required style='float:left;background:yellow;width:100%;text-align:left;border:0px;float:left;font-family:Calibri;font-size:18px;margin-bottom:5px'> <!--<input type="submit" id="uploadMore" value="Upload Photos" style="margin-right:5px;float:right;padding:1px;width:80px;height:20px;font-family:Calibri;font-size:12px;"> --> <br> </form> </div> <br><br><button onclick="hideFinalPayUpload()" id="closeDiv" style="float:right;width:20%;height:30px;padding:5px;font-family:Arial;font-size:14px;margin:20px;margin-right:40%;margin-top:50px">Close</button> </div> </div> <!--===================================================== --> <!--===================================================== --> <div class="formSearch" style="width:50%"> <input type="text" id="SearchText" placeholder="☶ Search Record..." style="margin:2px;width:55%;padding:11px;font-family:Calibri;font-size:16px;color:blue;height:40px;float:left"> <input type="submit" id="goSearchRecord" value="SEARCH RECORD 🏸" style="margin:2px;width:38%;padding:11px;font-family:Calibri;font-size:16px;color:black;font-weight:bold;height:40px;float:left;"> </div> <div class="formSearch" style="width:40%;float:right;text-align:center"><p class="menuTitle" style="border-radius:20px;float:right;width:100%;padding:5px;height:40px">☸ FOR FINAL PAY COMPUTATION</p></div> <div style="margin-top:2px;float:left;width:100%;height:40px;padding:8px;border:0px solid #3cd408" class="grayBG"> <input type="hidden" id="selectedEmpName" placeholder="SELECTED RECORD:" style='background:yellow;width:500px;border:0px solid white; margin-top:-3px;text-align:left;font-family:Arial;color:black;font-weight:bold' > </div> <div id="templateContent" style="float:left;width:100%;padding:0px;border-top:0px solid orange;border-bottom:0px solid orange;margin-top:0px;height:550px;;min-height:400px;overflow:auto"> <?php echo "<table>"; echo "<thead>"; echo "<th style='font-family:Tahoma;font-size:12px;width:50px;border:0px solid white'>REC ID.</th>"; echo "<th style='font-family:Tahoma;font-size:12px;width:80px;border:0px solid white'>COMPANY</th>"; echo "<th style='font-family:Tahoma;font-size:12px;width:80px;border:0px solid white'>EMP. ID.</th>"; echo "<th style='font-family:Tahoma;font-size:12px;width:180px;border:0px solid white'>EMPLOYEE NAME</th>"; echo "<th style='font-family:Tahoma;font-size:12px;width:100px;border:0px solid white'>POSITION</th>"; echo "<th style='font-family:Tahoma;font-size:12px;width:100px;border:0px solid white'>CLEARANCE DATE</th>"; echo "<th style='font-family:Tahoma;font-size:12px;width:100px;border:0px solid white'>RECEIVED DATE</th>"; echo "<th style='font-family:Tahoma;font-size:12px;width:180px;border:0px solid white'>STATUS</th>"; echo "<th style='font-family:Tahoma;font-size:12px;width:190px;border:0px solid white'>SLA RATING</th>"; echo "<th style='font-family:Tahoma;font-size:12px;width:190px;border:0px solid white'>FINAL PAY PROGRESS</th>"; echo "<th style='font-family:Tahoma;font-size:12px;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' AND `cl_h_hr_approval`!='CLOSED' ORDER BY `search_ref_lname` ASC"); //$getActiveClearance = mysql_query("SELECT * FROM `cl_clearance_header` WHERE `cl_h_hr_approval`='LASTPAY COMPUTATION' AND `cl_h_comp_id` = '$comID' ORDER BY `cl_h_date_created` DESC"); 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 = '#731602 '; } //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='font-family:Tahoma;font-size:11px;border:0px solid white;cursor:pointer;color:$color'>".strtoupper($row['h_id'])."</td>"; echo "<td style='font-family:Tahoma;font-size:11px;border:0px solid white;cursor:pointer;color:$color'>".$userCompanyCode."</td>"; echo "<td style='font-family:Tahoma;font-size:11px;border:0px solid white;cursor:pointer;color:$color'>".strtoupper($uEMPID)."</td>"; echo "<td style='font-family:Tahoma;font-size:11px;border:0px solid white;cursor:pointer;color:$color'>".strtoupper($uLName).", ".strtoupper($uFName)."</td>"; echo "<td style='font-family:Tahoma;font-size:11px;border:0px solid white;cursor:pointer;color:$color'>".strtoupper($uPosition)."</td>"; echo "<td style='font-family:Tahoma;font-size:11px;border:0px solid white;cursor:pointer;color:$color'>".strtoupper($row['cl_h_date_created'])."</td>"; echo "<td style='font-family:Tahoma;font-size:11px;border:0px solid white;cursor:pointer;color:$color'>"; $apprDate = $row['signatory_completion_date']; $exAprDate = explode(" ",$apprDate); echo $exAprDate[0]; echo"</td>"; echo "<td style='font-family:Tahoma;font-size:11px;border:0px solid white;cursor:pointer;color:$color'>".strtoupper($row['cl_h_hr_approval'])."</td>"; echo "<td style='font-family:Tahoma;font-size:11px;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:11px'>".$MyDay."</i> | Rating:(" .$mySLA.")"; echo"</td>"; echo "<td style='font-family:Tahoma;font-size:11px;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:Tahoma;font-size:16px;font-weight:normal;color:black;padding:30px;margin-top:100px;text-align:center'>--No Record Found--</p>"; } ?> </div> <input type="text" id="activeRecord" readonly style="background:#f4fcb6;border:0px solid white;float:left;width:100%;font-family:Calibri;font-size:14px;font-weight:normal;color:black;padding:5px;text-align:left"> </body> </html>
| ver. 1.4 |
.
| PHP 7.3.33 | Generation time: 0 |
proxy
|
phpinfo
|
Settings