File manager - Edit - /home/autoph/public_html/connect/home/PRF_AddExECOM.php
Back
<?php include 'core/init.php'; //$connect_error = 'Sorry, we\'re experiencing connection problem. Please try again later... Thank you!'; //mysql_connect('localhost','root','aee1024') or die ($connect_error); //mysql_select_db('db_vts') or die($connect_error); //error_reporting(1); 193 * 1067 * 215 $prfDate = date_create() ->format("Y-m-d"); $prfTime = date('H:i:s'); $myDate = date_create() ->format("Y-m-d"); $activeID=$user_data['u_id']; if(isset($_POST['done'])){ $getAuthority = mysql_escape_string($_POST['getAuthority']); $getExecom = mysql_escape_string($_POST['getExecom']); $getCompany = mysql_escape_string($_POST['getCompany']); //$getCompID = mysql_result(mysql_query("SELECT company FROM vts_users WHERE u_id='$getExecom'"),0); $checkIfExist = mysql_result(mysql_query("SELECT COUNT(1) FROM prf_execommembers WHERE execom_id='$getExecom' AND `authority`='$getAuthority' AND `comp_id`='$getCompany'"),0); if($checkIfExist > 0){ //mysql_query("DELETE FROM `db_vts`.`prf_execommembers` WHERE execom_id='$getExecom' AND `authority`='$getAuthority'"); }else{ mysql_query("INSERT INTO prf_execommembers(comp_id,execom_id,authority) VALUES('{$getCompany}','{$getExecom}','{$getAuthority}')"); } } echo "<table id='deleteEXECOM'>"; $getExecomList = mysql_query("SELECT 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><!-- 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%'>".$exeType."</td> <td style='width:35%'>".strtoupper($companyName)."</td>"; echo "</tr>"; } echo "</table>"; exit(); ?>
| ver. 1.4 |
.
| PHP 7.3.33 | Generation time: 0 |
proxy
|
phpinfo
|
Settings