File manager - Edit - /home/autoph/public_html/connect/home/CL_approving_officers_view.php
Back
<?php ob_start(); include 'core/init.php'; error_reporting(0); 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']; ?> <!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 () { $('.showMenu').click(function () { $('.DivToHide').show(); }); $('.showMenu').click(function () { $('.DivToHide').hide(); }); }); function ShowUploadBar() { var div = document.getElementById("loadBaraData"); if (div.style.display == 'none') { div.style.display = ''; } else { div.style.display = 'none' } } </script> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> <!--<div id="wait" style="display:none;width:400px;height:100px;border:0px solid red;position:absolute;top:50%;left:45%;padding:2px;z-index:999999999999999999"> <img src='images/demo_wait.gif' width="64" height="64" /><br>Loading...</div>--> <!-- add jquery --> <script type="text/javascript" src="http://code.jquery.com/jquery-1.9.1.js"></script> <script type="text/javascript"> $(document).ready(function(){ /* $(document).ajaxStart(function(){ $("#wait").css("display", "block"); }); $(document).ajaxComplete(function(){ $("#wait").css("display", "none"); }); */ //============================================================================================================================================ //============================================================================================================================================ $("#deleteTemplate").click(function(){ var selectedApprovingID = $("#selectedApprovingID").val(); if(confirm("WARNING: \n\nARE YOU SURE YOU WANT TO DELETE THIS RECORD? \n\n Press 'OK' button to proceed...")){ $.ajax({ url: "CL_DELETE_SELECTED_APPROVER.php", type: "POST", async: false, data: { "selectedApprovingID": selectedApprovingID, "done": 1 }, success: function(d){ //invShowAssignMsg(); $("#templateContent").html(d); //invHideAssignMsg(); //$('#searchText').val(''); } }) } }); //============================================================================================================================================ //============================================================================================================================================ $("#goSearchEmployee").click(function(){ var SearchEmployees = $("#SearchEmployees").val(); if(SearchEmployees==""){ //alert('Invalid Entry'); $('#SearchEmployees').focus(); $('#SearchEmployees').css({'border':'1px solid red'}); $('#SearchEmployees').css({'color':'red'}); $('#SearchEmployees').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_EMPLOYEE.php", type: "POST", async: false, data: { "SearchEmployees": SearchEmployees, "done": 1 }, success: function(d){ ShowUploadBar(); $("#SearchResult").html(d); //invHideAssignMsg(); //$('#searchText').val(''); } }) //} }); //============================================================================================================================================ //============================================================================================================================================ $("#goSearchRecord").click(function(){ var SearchText = $("#SearchText").val(); 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 falise; } 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_APPROVER_DATA.php", type: "POST", async: false, data: { "SearchEmployees": SearchText, "done": 1 }, success: function(d){ ShowUploadBar(); $("#approvingOfficerList").html(d); //invHideAssignMsg(); //$('#searchText').val(''); . } }) //} }); //============================================================================================================================================ //============================================================================================================================================ $("#goAddApprover").click(function(){ var selectedEmpID = $("#selectedEmpID").val(); if(selectedEmpID==""){ alert('No record has been selected.'); return falise; } ShowUploadBar(); //if(confirm("WARNING: \n\nARE YOU SURE YOU WANT TO DELETE THIS RECORD? \n\n Press 'OK' button to proceed...")){ $.ajax({ url: "CL_INSERT_NEW_APPROVER.php", type: "POST", async: false, data: { "selectedEmpID": selectedEmpID, "done": 1 }, success: function(d){ ShowUploadBar(); $("#approvingOfficerList").html(d); //invHideAssignMsg(); //$('#searchText').val(''); hideAddNewForm() } }) //} }); //============================================================================================================================================ //============================================================================================================================================ }); function hideAddNewForm(){ $("#FORMAddNewApprover").fadeOut(500); }; function showAddNewForm(){ $("#FORMAddNewApprover").fadeIn(500); }; function showSelectedRearch(row) { var x=row.cells; document.getElementById("selectedEmpID").value = x[0].innerHTML; document.getElementById("selectedName").value = x[1].innerHTML + ", " + x[2].innerHTML + " - " + x[3].innerHTML; } function showOfficer(row) { var x=row.cells; document.getElementById("selectedApprovingID").value = x[0].innerHTML; document.getElementById("activeRecord").value = "ACTIVE RECORD: " + x[1].innerHTML + ", " + x[2].innerHTML + " | RECORD ID. " + x[0].innerHTML; } function showAddNewFormXX(){ var diva=document.getElementById("FORMAddNewApprover"); if (diva.style.display == 'none') { diva.style.display = ''; } else { diva.style.display = 'none'; } } //============================================================================================================================================ //============================================================================================================================================ </script> <style> p{ font-Family:Calibri; font-size:20px; font-weight:bold; color:black; padding:10px; padding-top:0px; margin:10px; 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"> <input type="hidden" id="addByUID" value="<?php echo $userID;?>"> <input type="hidden" id="addCompID" value="<?php echo $comID;?>"> <input type="hidden" id="selectedApprovingID"> <!--===================================================== --> <!--#########################################################################--> <div id="loadBaraData" style="display:none;position:absolute;top:50%;left:35%;width:30%;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>Loading...<center></div> </div> <!--#########################################################################--> <!--===========ADD NEW APPROVER FORM======================== --> <div id="FORMAddNewApprover" style="display:none;width:600px;height:450px;background:white;border:1px 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:normal;color:#043062;text-align:left;'> ☶ SEARCH EMPLOYEE RECORDS: <div style='float:right;font-family:Calibri;font-size:18px;'> <a href='#' onclick='hideAddNewForm()' style='font-weight:bold'> ✕ </a> </div> </div> <!--BODY--> <div style="padding:10px;width:100%;height:420px;margin:0px;border;1px solid black;background:white;border-bottom:1px solid gray"> <input type="text" id="SearchEmployees" placeholder="☶ Search Employee Record..." style="margin:0px;width:300px;padding:10px;font-family:Calibri;font-size:16px;color:blue"> <input type="submit" id="goSearchEmployee" value=" 🏸 SEARCH" style="margin:0px;width:180px;padding:5px;font-family:Calibri;font-size:16px;color:black;font-weight:bold;height:35px"> <div id="SearchResult" style="width:100%;height:220px;background:f3f79d;margin-top:10px;border:1px solid #fcb022;overflow:auto"> </div> <div style="width:100%;height:50px;background: #f9f486 ;margin-top:10px"> <input type='text' id='selectedEmpID' style='padding:5px;float:left;background:transparent;border:1px solid #f9f486 ;font-family:Calibri;font-size:18px;font-weight:bold;color:blue;width:50px' readonly> <input type='text' id='selectedName' style='padding:5px;float:left;background:transparent;border:1px solid #f9f486 ;font-family:Calibri;font-size:18px;font-weight:bols;color:blue;width:500px' readonly> </div> <center><input type="submit" id="goAddApprover" value="✚ ADD RECORD" style=";margin:10px;margin-top:15px;width:250px;padding:3px;height:35px;font-family:Calibri;font-size:16px;color:black;font-weight:bold"></center> </div> </div> <!--===================================================== --> <!--===========ADD NEW APPROVER FORM======================== --> <div class="formSearch" style="width:50%"> <input type="text" id="SearchText" placeholder="☶ Search Record..." style="margin:2px;width:55%;padding:10px;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:10px;font-family:Calibri;font-size:16px;color:black;font-weight:bold;height:40px;float:left;"> </div> <div class="formSearch" style="float:right;text-align:center;border-radius:20px;"><p class="menuTitle" style="border-radius:20px;float:right;width:100%;padding:5px;height:40px">☸ APPROVING OFFICER MODULE</p></div> <div style="margin-top:2px;float:left;width:100%;height:40px;padding:8px;border:0px solid #3cd408" class="grayBG"> <!--<a href="#" id="createTemplate" onclick='showAddNewForm()' class="pageMenu">✚ ADD NEW APPROVER</a> <a href="#" id="deleteTemplate" class="pageMenu">✘ DELETE RECORD </a> --> <button id='deleteTemplate' style="border-radius:0px; border:0px solid white;display:block;margin:0px;width:200px;padding:2px;height:28px;font-family:Calibri;font-size:16px;float:right;border-left:1px solid gray">✘ DELETE RECORD</button> <button id='createTemplate' onclick="showAddNewForm()" style="border-radius:0px; border:0px solid white;display:block;margin:0px;width:200px;padding:2px;height:28px;font-family:Calibri;font-size:16px;float:right;border-left:1px solid gray">✚ ADD NEW APPROVER</button> </div> <div id="templateContent" style="float:left;width:100%;padding:0px;border-top:1px solid orange;border-bottom:0px solid red;margin-top:0px;max-height:560px;min-height:400px;"> <div id="approvingOfficerList" style="float:left;width:100%;padding:0px;border-top:1px solid orange;border:0px solid red;margin-top:0px;max-height:550px;overflow:auto"> <?php echo "<table>"; echo "<thead>"; echo "<th style='width:50px;border:0px solid white'>REC.ID.</th>"; echo "<th style='width:200px;border:0px solid white'>LAST NAME</th>"; echo "<th style='width:200px;border:0px solid white'>FIRST NAME</th>"; echo "<th style='width:200px;border:0px solid white'>POSITION</th>"; echo "<th style='width:200px;border:0px solid white'>COMPANY</th>"; echo "</thead>"; $getApproverList = mysql_query("SELECT `u_id`, `u_fname`, `u_lname`, `u_position` FROM `vts_users` WHERE `approver`=1 ORDER BY `u_lname` ASC"); while($row=mysql_fetch_array($getApproverList)){ $uID = $row['u_id']; $getCompID = mysql_result(mysql_query("SELECT `company` FROM `vts_users` WHERE `u_id`='$uID'"),0); $getCompName = mysql_result(mysql_query("SELECT `comp_name` FROM `vts_company` WHERE `comp_id`='$getCompID'"),0); $count = $count + 1; ?><tr onclick="javascript:showOfficer(this);"><?php echo "<td style=';border:0px solid white;cursor:pointer;color:#5b5b58'>".$row['u_id']."</td>"; echo "<td style=';border:0px solid white;cursor:pointer;color:#5b5b58'>".strtoupper($row['u_lname'])."</td>"; echo "<td style=';border:0px solid white;cursor:pointer;color:#5b5b58'>".strtoupper($row['u_fname'])."</td>"; echo "<td style=';border:0px solid white;cursor:pointer;color:#5b5b58'>".strtoupper($row['u_position'])."</td>"; echo "<td style=';border:0px solid white;cursor:pointer;color:#5b5b58'>".strtoupper($getCompName)."</td>"; echo "</tr>"; } echo "</table>"; ?> </div> </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"> </body> </html>
| ver. 1.4 |
.
| PHP 7.3.33 | Generation time: 0 |
proxy
|
phpinfo
|
Settings