File manager - Edit - /home/autoph/public_html/connect/home/PRF_SETUP_EXECOM.php
Back
<?php include 'core/init.php'; protected_page(); $uniqueRefID = $user_data['u_id']; //echo $uniqueRefID; $prfDate = date_create() ->format("Y-m-d"); $prtTime =Explode(":", date('H:i:s')); $txDate = explode("-",$prfDate); $refYear = $txDate[0]; $refMonth = $txDate[1]; $refMinute = $prtTime[1]; $refSecond = $prtTime[2]; $NewRefCode = $refMonth.''.$refMinute.''.$refSecond; ?> <!DOCTYPE html> <html lang="en"> <head> <link rel="stylesheet" type="text/css" href="css/bootstrap.css"/> <link rel="stylesheet" type="text/css" href="css/jquery-ui.css"/> <meta charset="UTF-8" name="viewport" content="width=device-width, initial-scale=1"/> </head> <body> <div class='NewPRFHeader'> <p class='PRFBodyTitle'>📝 SETUP EXECOM OFFICERS</p> </div> <input type='hidden' id='SelExecomID'> <!--########################## MAIN TABLE WINDOW ############################################--> <!--########################################################################################################--> <div class='NewPRFBody' style='height:700px;'> <div id='mainTable' class='PRFTableBody' style='height:683px;'> <div style='width:60%;height:33px;background:white'> <table> <thead> <th style='width:12%'>REC. ID</th> <th style='width:20%'>NAME</th> <th style='width:38%'>AUTHORITY</th> <th style='width:35%'>COMPANY</th> </thead> </table> </div> <div id='execomList' class='PRFTableItems' style='width:60%;height:350px;border:1px solid gray;overflow:auto'> <?php echo "<table id='deleteEXECOM'>"; $getExecomList = mysql_query("SELECT vts_users.company,vts_users.u_id,vts_users.u_fname,vts_users.u_lname,prf_execommembers.id,prf_execommembers.execom_id,prf_execommembers.authority,prf_execommembers.comp_id FROM `vts_users` JOIN `prf_execommembers` ON `prf_execommembers`.execom_id = vts_users.u_id WHERE `vts_users`.u_id=`prf_execommembers`.execom_id AND `prf_execommembers`.deleted=0 ORDER BY authority,company,u_lname ASC"); while($row=mysql_fetch_array($getExecomList)){ $companyName=mysql_result(mysql_query("SELECT comp_name FROM vts_company WHERE comp_id='".$row['comp_id']."'"),0); $getAuthority= $row['authority']; if($getAuthority == 1){ $exeType ='SINGLE APPROVER - Approval matrix WILL NOT be used'; } if($getAuthority == 3){ $exeType ='GROUP OF EXECOM - Approval matrix WILL be used'; } if($getAuthority == 2){ $exeType ='VP / SVP - Approval matrix WILL be used'; } if($getAuthority == 4){ $exeType ='AVP\'s - Approval matrix WILL be used'; } ?> <tr onclick="javascript:getExecomID(this);"><!-- getCategoryIDonDblclick="javascript:showActionViewDelete(this);" >--> <?php echo "<td style='width:12%'>".$row['id']."</td> <td style='width:20%'>".strtoupper($row['u_lname']).", ".strtoupper($row['u_fname'])."</td> <td style='width:38%'>".strtoupper($exeType)."</td> <td style='width:35%'>".strtoupper($companyName)."</td>"; echo "</tr>"; } echo "</table>"; ?> </div> <div id='execomListX' class='PRFTableItems' style='width:60%;height:300px;'> <p style='font-family:Yu Gothic;font-size:14px;color:black;margin-bottom:2px;padding-bottom:2px'>SELECT EMPLOYEE:</p> <div style='float:left;width:30%;margin:0px;background:white;padding:2px'> EMPLOYEE NAME:<br> <select id='getExecom' style='margin:0px;padding:0px;height:30px;' > <option value=''>-- Select -- </option> <?php $getExecomMember = mysql_query("SELECT vts_users.u_id,vts_users.u_fname,vts_users.u_lname,vts_users.company FROM vts_users WHERE u_status=1 ORDER BY u_lname ASC"); while($uRow=mysql_fetch_array($getExecomMember)){ echo "<option value='".$uRow['u_id']."'>".strtoupper($uRow['u_lname']).", ".strtoupper($uRow['u_fname'])."</option>"; } ?> </select> </div> <div style='float:left;width:30%;margin:0px;background:white;padding:2px'> COMPANY NAME:<br> <select id='getCompany' style='margin:0px;padding:0px;height:30px;' > <option value=''>-- Select Company-- </option> <?php $myCompany = mysql_query("SELECT * FROM vts_company WHERE comp_status=1 ORDER BY comp_name ASC"); while($uRow=mysql_fetch_array($myCompany)){ echo "<option value='".$uRow['comp_id']."'>".strtoupper($uRow['comp_name']). "</option>"; } ?> </select> </div> <div style='float:left;width:20%;margin:0px;background:white;padding:2px'> LEVEL OF AUTHORITY: <select id='getAuthority' style='margin:0px;padding:0px;height:30px;' > <option value='1'>NO MATRIX</option> <option value='4'>AVP</option> <option value='2'>VP/SVP/PRESIDENT</option> <option value='3'>EXECOM MEMBERS</option> <?php //$getExecomMember = mysql_query("SELECT * FROM `prf_approval_matrix` WHERE `deleted`=0"); //while($uRow=mysql_fetch_array($getExecomMember)){ // echo "<option value='".$uRow['level']."'>".strtoupper($uRow['description'])."</option>"; //} ?> </select> </div> <div style='float:left;width:20%;margin:0px;background:white;padding:2px'> <br> <button id='addExecom' style='margin:0px;width:100%;height:30px;'>Add</button> </div> <div style='float:left;width:90%;margin:2px;padding:10px;background:white;border:0px solid gray;color:gray'> <u style='font-family:Yu Gothic;font-weight:bold;color:Black'>LEVEL OF AUTHORITY:</u> <br> <br> NO MATRIX = This will be used if MATRIX Table is OFF<br> <br> VP/SVP/PRESIDENT = SVP/ CFO/President/ Ms.Owee (Any of the Three (3) plus additional Required Officer (Owee)<br> <br> EXECOM MEMBERS = Required 3 EXECOM Members plus additiona required officer (WQT)<br> <br><br> For GM's and Department Approval, the system will automatically detect the GM or the department head if required </div> </div> </div> </div> <!--########################## END OF EDIT/UPDATING PURCHASE REQEUST ############################################--> </body> </html> <!--- LOCALIZED COPY OF JAVASCRIPT --> <script type="text/javascript" src="http://code.jquery.com/jquery-1.9.1.js"></script> <script type="text/javascript"> $(document).ready(function(){ //====================================================================================================== $("#deleteEXECOM").dblclick(function(){ //getAuthority getExecom addExecom var SelExecomID = $("#SelExecomID").val(); //alert(SelExecomID); //exit; if(confirm("CONFIRM DELETION: \n\N Are you sure you want to delete this record? Press OK to continue...")){ //========================= ShowUploadBar(); $.ajax({ url: "PRF_DeleteEXECOM.php", type: "POST", async: false, data: { "SelExecomID": SelExecomID, "done": 1 }, success: function(d){ ShowUploadBar(); $("#execomList").html(d); hideActionViewDelete(); Swal.fire( 'Deleted!', 'Your file has been deleted.', 'success' ) } }) //========================= } }); $("#addExecom").click(function(){ // getExecom var getAuthority = $("#getAuthority").val(); var getExecom = $("#getExecom").val(); var getCompany = $("#getCompany").val(); //alert(getAuthority); //exit; if(getExecom==''){ alert("Please select name"); return false; } if(getCompany==''){ alert("Please select Company"); return false; } //if(confirm("CONFIRM DELETE ACTION: \n\nAre you sure you want to ADD ? \n\n Press 'OK' button to proceed...")){ ShowUploadBar(); $.ajax({ url: "PRF_AddExECOM.php", type: "POST", async: false, data: { "getAuthority": getAuthority, "getExecom": getExecom, "getCompany": getCompany, "done": 1 }, success: function(d){ ShowUploadBar(); $("#execomList").html(d); hideActionViewDelete(); //$('#searchText').val(''); 015334295-1005 } }) //} }); //====================================================================================================== function updateCREATENEWPRF(){ $.ajax({ url: "PRF_Update_CREATE_NEW_PRF.php", type: "POST", async: false, data: { "trans":1 }, success: function(d){ updatePostedPRF(); $("#unPostedPRFRequestCount").html(d); } }) } //====================================================================================================== function updatePostedPRF(){ $.ajax({ url: "PRF_Update_POSTEDPRF.php", type: "POST", async: false, data: { "trans":2 }, success: function(d){ $("#PostedPRFRequestCount").html(d); } }) } //====================================================================================================== function updateApprovalPRF(){ $.ajax({ url: "PRF_procIncomingInfo.php", type: "POST", async: false, data: { "trans":2 }, success: function(d){ $("#forMyApprovalCount").html(d); } }) } //====================================================================================================== function refreshMainTable(){ $.ajax({ url: "PRF_MainTableHeaderDisplay.php", type: "POST", async: false, data: { }, success: function(d){ //invShowAssignMsg(); $("#mainTable").html(d); //invHideAssignMsg(); //$('#searchText').val(''); } }) } }); </script> <!--- LOCALIZED COPY OF JAVASCRIPT --> <script type="text/javascript"> function getExecomID(row) { var x=row.cells; document.getElementById("SelExecomID").value = x[0].innerHTML; } </script>
| ver. 1.4 |
.
| PHP 7.3.33 | Generation time: 0 |
proxy
|
phpinfo
|
Settings