File manager - Edit - /home/autoph/public_html/pms_v1/pages/adminPCPSummary.php
Back
<?php session_start(); if(isset($_SESSION['userID'])) { // pmsReport.php => ReportPEFC.php => loadDataReportC.php $uID = $_SESSION['userID']; $userID= $_SESSION['userID']; } include_once("../../../cfg/conn.php"); error_reporting(0); if(isset($_POST['pmsAdmin'])){ //============================================================================================================== //VALIDATE ACCESS ============================================================================================== //============================================================================================================== $roleID = userProfileID($userID); include ("../functions/users.php"); $roleID = userProfileID($uID); $moduleID = 58; $add =checkViewAccessM1024($roleID, $moduleID)[1]; $edit =checkViewAccessM1024($roleID, $moduleID)[2]; $delete =checkViewAccessM1024($roleID, $moduleID)[3]; $print =checkViewAccessM1024($roleID, $moduleID)[4]; $download =checkViewAccessM1024($roleID, $moduleID)[5]; echo "<input type='hidden' id='addAccess' value='$add'>"; echo "<input type='hidden' id='editAccess' value='$edit'>"; echo "<input type='hidden' id='deleteAccess' value='$delete'>"; echo "<input type='hidden' id='printAccess' value='$print'>"; echo "<input type='hidden' id='downloadAccess' value='$download'>"; echo "<input type='hidden' id='userID' value='$uID'>"; if($add == 1){$addButton = '';}else{$addButton='Disabled';} if($edit == 1){$editButton = '';}else{$editButton='Disabled';} if($delete == 1){$deletButton = '';}else{$deletButton='Disabled';} if($print == 1){$printButton = '';}else{$printButton='Disabled';} if($download == 1){$downloadButton = '';}else{$downloadButton='Disabled';} if(checkViewAccessM1024($roleID, $moduleID)[0] == 0){ include '../accessDenied.php'; exit(); } echo "<input type='hidden' id='selectedEmpID'>"; //============================================================================================================== //VALIDATE ACCESS ============================================================================================== //============================================================================================================== ?> <!--########################################################################################--> <!--########################################################################################--> <div class="wrapper mt-2 p-0 shadow-sm float:left bg-light" style='min-height:800px'> <div class="row fluid m-0 w-100 p-0 bg-white h-auto pageBodyMenu"> <div class="float:left text-left col-xs-12 col-md-3 col-lg-3 col-sm-12 p-3 h-auto bg-light" style="background:#fcfcf0"> <!--########################################################################################--> <!--########################################################################################--> <style> .menuItem{ background:none; font-color:blue; font-size:16px; text-decoration:none; } .menuItem:hover{ background:none; color:blue; font-size:16px; text-decoration:underline; } ul, #myUL { list-style-type: none; } #myUL { margin: 0; padding: 0; } .caret { cursor: pointer; -webkit-user-select: none; /* Safari 3.1+ */ -moz-user-select: none; /* Firefox 2+ */ -ms-user-select: none; /* IE 10+ */ user-select: none; font-size:16px; } .caret:hover{ cursor: pointer; -webkit-user-select: none; /* Safari 3.1+ */ -moz-user-select: none; /* Firefox 2+ */ -ms-user-select: none; /* IE 10+ */ user-select: none; color:blue; font-size:16px; text-decoration:underline; } .caret::before { content: "+"; /*"\271A";*/ color: black; display: inline-block; margin-right: 6px; font-weight:bold; font-size:20px } .caret-down::before { content: "-"; /*-ms-transform: rotate(90deg); IE 9 */ /*-webkit-transform: rotate(90deg); /* Safari /*transform: rotate(90deg); */ } .nested { display: none; cursor: pointer; } .active { display: block; } </style> <div style="min-height:800px;overflow:auto;background:#fcfcf0 " class="bg-light p-2"> <div class="form-group"> <h6>Select Company:</h6> <select name='companyAccess' id='companyAccess' class="form-select form-select-lg p-2 w-100 rounded-lg" onchange="showDealershipF(this.value)" style="font-size:12px"> <option selected value="">-- Select Company --</option> <?php $sql = "SELECT * FROM pms_officers WHERE deleted=0 AND `pms_officer_id`='$userID' GROUP BY `comp_id` ORDER BY comp_id ASC"; $getGroup = mysqli_query($conn,$sql); $chkIfExist = mysqli_num_rows($getGroup); if($chkIfExist > 0){ while($row = mysqli_fetch_array($getGroup)){ echo "<option value='".$row['comp_id']."'>".getCompanyNameSub($row['comp_id'])[0]."</option>"; } } ?> </select> </div> <div class="form-group shadow-sm"> <h6>Select Branch/Dealer:</h6> <select name='dealerAccess' id='dealerAccess' class="form-select form-select-lg p-2 w-100 rounded-lg" onchange="showGroup(this.value)" style="font-size:12px"> </select> </div> <div class="form-group shadow-sm"> <h6>Select Group:</h6> <select name='groupAccess' id='groupAccess' class="form-select form-select-lg p-2 w-100 rounded-lg" onchange="showDivision(this.value)" style="font-size:12px"> </select> </div> <div class="form-group shadow-sm"> <h6>Select Division:</h6> <select name='divisionAccess' id='divisionAccess' class="form-select form-select-lg p-2 w-100 rounded-lg" onchange="showDepartment(this.value)" style="font-size:12px"> </select> </div> <div class="form-group shadow-sm"> <h6>Select Department:</h6> <select name='deptAccess' id='deptAccess' class="form-select form-select-lg p-2 w-100 rounded-lg" onchange="loadActiveEmployeeByDepartment(this.value)" style="font-size:12px"> </select> </div> </div> <script> var toggler = document.getElementsByClassName("caret"); var i; for (i = 0; i < toggler.length; i++) { toggler[i].addEventListener("click", function() { this.parentElement.querySelector(".nested").classList.toggle("active"); this.classList.toggle("caret-down"); }); } </script> <!--########################################################################################--> <!--########################################################################################--> </div> <div class="bg-white float:left text-left col-xs-12 col-xs-12 col-md-9 col-lg-9 col-xl-9 col-sm-12 p-0 border" style='overflow:auto;min-height:750px;'> <!--########################################################################################--> <div class="pageSearchHeader bg-white p-1 m-0 w-50"> <h6 class='bg-white text-danger p-2 m-0 font-weight-normal'>ACTIVE EMPLOYEES (PCP View)</h6> </div> <div class="pageSearchHeader bg-white p-1 pt-1 m-0 w-50"> <input class="form-control border p-1" type="search" placeholder="search" id="searchText" style="margin:0px;min-width:250px;width:75%;float:left"> <button type="button" class="btn btn-info" id="goSearchRecord" style="float:rigth;width:24%;margin-left:3px">Search</button> </div> <div id="activeOps" class="col-12 p-1 border" style='overflow:auto;height:800px;'> </div> <!--<div id="activeEmployees" class="bg-light col-12 border" style='overflow:auto;height:300px;'> </div> --> <!--########################################################################################--> </div> </div> </div> <!--MODAL FORM FOR ADDING NEW KRA WITHIN SELECTED AREA--> <!-- The Modal --> <div class="modal fade " id="EmployeePCPForm"> <div class="modal-dialog modal-lg"> <div class="modal-content"> <!-- Modal Header --> <div class="modal-header"> <h4 id='empPCPList' class="modal-title fa-fa-user"></h4> <button type="button" class="close" data-dismiss="modal">×</button> </div> <!-- Modal body --> <div id="myPCPList" class="modal-body" style='height:700px;overflow:auto'> </div> <!-- Modal footer --> <div class="modal-footer"> <button type="button" class="btn btn-danger" data-dismiss="modal"> <span class="btn-label"><i class="fa fa-close"> Close</i></button> </div> </div> </div> </div> <?php } ?> <!--########################## ############################################--> <script type="text/javascript"> $("#goSearchRecord").click(function(){ var searchText = $("#searchText").val(); if(searchText===''){ Swal.fire('Invalid search string', '', 'error'); }else{ loadActiveEmployeeByDepartment(); } }); //SEARCH ENTER KEY PRESS LISTENER // Get the input field var input = document.getElementById("searchText"); // Execute a function when the user presses a key on the keyboard input.addEventListener("keypress", function(event) { // If the user presses the "Enter" key on the keyboard if (event.key === "Enter") { // Cancel the default action, if needed event.preventDefault(); // Trigger the button element with a click document.getElementById("goSearchRecord").click(); } }); </script> <script> function getInfo(row) { //alert('arnel'); var x=row.cells; document.getElementById("selectedEmpID").value = x[0].innerHTML; document.getElementById("empPCPList").innerHTML = x[3].innerHTML; loadEmployeePCP(); } </script> <script language="javascript" type="text/javascript"> function loadEmployeePCP(){ var selectedEmpID = $("#selectedEmpID").val(); var userID = $("#userID").val(); ShowUploadBar(); //alert(selectedEmpID); // return false; $.ajax({ url: "./pcpDocuments/loadEmployeePCPSummary.php", type: "POST", async: true, data: { "selectedEmpID":selectedEmpID, "userID":userID, "pcpList":1 }, success: function(dx){ $("#myPCPList").html(dx); ShowUploadBar(); } }) } function loadActiveOpsByCompany(){ var selCompID = $("#companyAccess").val(); var userID = $("#userID").val(); //alert('Loading PCP'); ShowUploadBar(); $.ajax({ url: "./ajaxCall/loadActiveOpsByCompany.php", method: 'POST', dataType: 'text', async:true, data: { active: 1, userID: userID, "report":0, selCompID:selCompID }, success: function(d){ $("#activeOps").html(d); ShowUploadBar(); } }); } function loadActiveOpsByDealer(){ var pmsDealID = $("#dealerAccess").val(); var userID = $("#userID").val(); //alert('Loading PCP'); ShowUploadBar(); $.ajax({ url: "./ajaxCall/loadActiveOpsByDealer.php", method: 'POST', dataType: 'text', async:true, data: { active: 1, userID: userID, pmsDealID:pmsDealID }, success: function(d){ $("#activeOps").html(d); ShowUploadBar(); } }); } function loadActiveOpsByMainDivision(){ var pmsGroupID = $("#groupAccess").val(); var userID = $("#userID").val(); //alert('Loading PCP'); ShowUploadBar(); $.ajax({ url: "./ajaxCall/loadActiveOpsByGroup.php", method: 'POST', dataType: 'text', async:true, data: { active: 1, userID: userID, pmsGroupID:pmsGroupID }, success: function(d){ $("#activeOps").html(d); ShowUploadBar(); } }); } function loadActiveOpsBySubDivision(){ var pmsDivID = $("#divisionAccess").val(); var userID = $("#userID").val(); //alert('Loading PCP'); ShowUploadBar(); $.ajax({ url: "./ajaxCall/loadActiveOpsByGroup.php", method: 'POST', dataType: 'text', async:true, data: { active: 1, userID: userID, pmsDivID:pmsDivID }, success: function(d){ $("#activeOps").html(d); ShowUploadBar(); } }); } function loadActiveEmployeeByDepartment(){ var deptID = $("#deptAccess").val(); var userID = $("#userID").val(); var searchText =$("#searchText").val(); var selCompID = $("#companyAccess").val(); //alert(searchText); if(deptID == ""){ return false; } //alert(deptID); ShowUploadBar(); $.ajax({ url: "./pcpDocuments/pmsAdmin_pcpView.php", method: 'POST', dataType: 'text', async:true, data: { pcpAdmin: 1, selCompID:selCompID, searchText:searchText, userID: userID, deptID:deptID, report:0 }, success: function(d){ $("#activeOps").html(d); ShowUploadBar(); } }); } function showDealershipF(str) { var selCompID = $("#companyAccess").val(); //loadActiveOpsByCompany(); ShowUploadBar(); $.ajax({ url: "./ajaxCall/onchangeLoadBranches.php", method: 'POST', dataType: 'text', async:true, data: { loadBranchData: 1, selCompID:selCompID }, success: function(d){ $("#dealerAccess").html(d); ShowUploadBar(); } }); } function showGroup(str) { var FempCompany = $("#dealerAccess").val(); //loadActiveOpsByDealer(); ShowUploadBar(); $.ajax({ url: "./ajaxCall/onChangeLoadSubGroupByDealer.php", method: 'POST', dataType: 'text', async:true, data: { loadSubGroupData: 1, FempCompany:FempCompany }, success: function(d){ $("#groupAccess").html(d); ShowUploadBar(); } }); } function showDivision(str) { var empSubGroup = $("#groupAccess").val(); //loadActiveOpsByMainDivision(); ShowUploadBar(); $.ajax({ url: "./ajaxCall/onchangeLoadDivisions.php", method: 'POST', dataType: 'text', async:true, data: { loadSubGroupData: 1, empSubGroup:empSubGroup }, success: function(d){ $("#divisionAccess").html(d); ShowUploadBar(); } }); } function showDepartment(str) { var empDivision = $("#divisionAccess").val(); //loadActiveOpsByDepartment(); //alert(empDivision); ShowUploadBar(); $.ajax({ url: "./ajaxCall/onchangeLoadDepartments.php", method: 'POST', dataType: 'text', async:true, data: { loadDepartmentData: 1, empDivision:empDivision }, success: function(d){ $("#deptAccess").html(d); ShowUploadBar(); } }); } </script>
| ver. 1.4 |
.
| PHP 7.3.33 | Generation time: 0 |
proxy
|
phpinfo
|
Settings