File manager - Edit - /home/autoph/public_html/voc/home/CL_ADMIN_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']; ?> <!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 () { $('.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> <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 language="javascript" type="text/javascript"> $(document).ready(function(){ $(document).ajaxStart(function(){ $("#wait").css("display", "block"); }); $(document).ajaxComplete(function(){ $("#wait").css("display", "none"); }); //============================================================================================================================================ //============================================================================================================================================ $("#DeleteAdminAccess").click(function(){ var selectedAdminID = $("#selectedAdminID").val(); var addCompID = $("#addCompID").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_ADMIN.php", type: "POST", async: false, data: { "addCompID": addCompID, "selectedAdminID": selectedAdminID, "done": 1 }, success: function(d){ //invShowAssignMsg(); $("#templateContent").html(d); //invHideAssignMsg(); //$('#searchText').val(''); } }) } }); //============================================================================================================================================ //============================================================================================================================================ $("#goSearchEmployee").click(function(){ var SearchEmployees = $("#SearchEmployees").val(); var addCompID = $("#addCompID").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 falise; } //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_ADMIN_ACCESS.php", type: "POST", async: false, data: { "addCompID": addCompID, "SearchEmployees": SearchEmployees, "done": 1 }, success: function(d){ //invShowAssignMsg(); $("#SearchResult").html(d); //invHideAssignMsg(); //$('#searchText').val(''); } }) //} }); //============================================================================================================================================ //============================================================================================================================================ $("#goAddNewAdmin").click(function(){ var selectedEmpID = $("#selectedEmpID").val(); var addCompID = $("#addCompID").val(); if(selectedEmpID == ""){ alert('No record has been selected.'); return falise; } //if(confirm("WARNING: \n\nARE YOU SURE YOU WANT TO DELETE THIS RECORD? \n\n Press 'OK' button to proceed...")){ $.ajax({ url: "CL_ADD_NEW_ADMIN_ACCESS.php", type: "POST", async: false, data: { "selectedEmpID": selectedEmpID, "addCompID": addCompID, "done": 1 }, success: function(d){ $("#templateContent").html(d); hideAdminForm(); } }) //} }); //============================================================================================================================================ //============================================================================================================================================ }); function hideAdminForm(){ $("#FORMAddNewAdmin").fadeOut(500); }; function showAdminForm(){ $("#FORMAddNewAdmin").fadeIn(500); }; function showAdminAccess(row) { var x=row.cells; document.getElementById("selectedAdminID").value = x[0].innerHTML; document.getElementById("activeRecord").value = "SELECTED RECORD: " + x[3].innerHTML + " TEMPLATE " + " (Record # " + x[0].innerHTML +")"; document.getElementById("rank").value = x[3].innerHTML; } </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"> <!--===================================================== --> <!--===========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="selectedAdminID"> <input type="hidden" id="rank"> <!--===================================================== --> <!--===========ADD NEW ADMIN======================== --> <div id="FORMAddNewAdmin" 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='hideAdminForm()' 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:10px;font-family:Calibri;font-size:16px;color:black;font-weight:bold"> <div id="SearchResult" style="width:100%;height:220px;background:f3f79d;margin-top:10px;border:1px solid #fcb022;overflow:auto"> <?php $lookUp = mysql_query("SELECT `u_id`, `u_fname`, `u_lname`, `u_position` FROM `vts_users` WHERE `u_lname` LIKE '%$SearchEmployees%' AND `company`='$comID' || `u_fname` LIKE '%$SearchEmployees%' AND `company`='$comID'"); 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 "</thead>"; while($row=mysql_fetch_array($lookUp)){ $count = $count + 1; ?><tr onclick="javascript:showSelectedRearch(this);"><?php echo "<td style='cursor:pointer;border:0px solid white'>".$row['u_id']."</td>"; echo "<td style='cursor:pointer;border:0px solid white'>".strtoupper($row['u_lname'])."</td>"; echo "<td style='cursor:pointer;border:0px solid white'>".strtoupper($row['u_fname'])."</td>"; echo "<td style='cursor:pointer;border:0px solid white'>".strtoupper($row['u_position'])."</td>"; echo "</tr>"; } echo "</table>"; ?> </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="goAddNewAdmin" value="✚ ADD ADMIN ACCESS" style=";margin:10px;margin-top:15px;width:250px;padding:10px;font-family:Calibri;font-size:16px;color:black;font-weight:bold"></center> </div> </div> <!--===================================================== --> <!--===================================================== --> <!--===========CONFIRM DELETE BOX======================== --> <div id="deleteBoxYesNo" style="display:none;width:500px;height:350px;background:white;border:1px solid black;position:absolute;top:150px;left:300px;"> </div> <!--===================================================== --> <!--===================================================== --> <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"><p class="menuTitle" style="border-radius:20px;float:right;width:100%;padding:5px;height:40px">☸ ADMIN ACCESS MANAGEMENT</p></div>; <div style="margin-top:2px;float:left;width:100%;height:40px;padding:8px;border:0px solid #3cd408" class="grayBG"> <b id="AddAdminAccess" class="pageMenu" onclick="showAdminForm()">✚ ADD ADMIN</b> <b id="DeleteAdminAccess" class="pageMenu">✘ REMOVE ADMIN</b> </div> <div id="templateContent" style="float:left;width:100%;padding:0px;border-top:0px solid orange;border-bottom:0px solid orange;margin-top:0px;max-height:500px;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 "</thead>"; $getApproverList = mysql_query("SELECT `u_id`, `u_fname`, `u_lname`, `u_position` FROM `vts_users` WHERE `CL_ADM`=1 AND `company`='$comID' ORDER BY `u_lname` ASC"); while($row=mysql_fetch_array($getApproverList)){ $count = $count + 1; ?><tr onclick="javascript:showAdminAccess(this);"><?php echo "<td style='cursor:pointer;border:0px solid white'>".$row['u_id']."</td>"; echo "<td style='cursor:pointer;border:0px solid white'>".strtoupper($row['u_lname'])."</td>"; echo "<td style='cursor:pointer;border:0px solid white'>".strtoupper($row['u_fname'])."</td>"; echo "<td style='cursor:pointer;border:0px solid white'>".strtoupper($row['u_position'])."</td>"; echo "</tr>"; } echo "</table>"; ?> </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