File manager - Edit - /home/autoph/public_html/connect/home/prf_CANCELItemInPRF.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'])){ $activePRF = mysql_escape_string($_POST['activePRF']); $reasonForCancellation = mysql_escape_string($_POST['reasonForCancellation']); $activeItem = mysql_escape_string($_POST['activeItem']); $chkIfWdPO = mysql_result(mysql_query("SELECT COUNT(1) FROM `prf_request_detl` WHERE `header_ref_code`='$activePRF' AND `po_code`!='' AND `id`='$activeItem'"),0); if($chkIfWdPO > 0){ echo '<script>alert("ERROR: Unable to proceed with your request. Active PO has been detected. Please cancel PO first before you can proceed with the cancellation of this item")</script>'; }else{ //mysql_query("UPDATE `prf_request_hdr` SET `current_status`='93', `deleted`=1 WHERE `reference_code`='$activePRF'"); mysql_query("UPDATE `prf_request_detl` SET `item_status`='93', `deleted`=1,`notes`='$reasonForCancellation' WHERE `header_ref_code`='$activePRF' AND `id`='$activeItem'"); mysql_query("UPDATE `prf_validate_links` SET `completed`='1' WHERE `item_id`='$activeItem'"); echo '<script>alert("TRANSACTION COMPLETE:\n The selected item has been cancelled")</script>'; mysql_query("INSERT INTO prf_changes_logs(id,action_taken,user_id,old_info,new_info, ref_number) VALUES('','{$reasonForCancellation}','{$activeID}','{$activeItem}','','{$activePRF}')"); } echo "<table style='width:100%;border-collapse:collapse'>"; $getItems = mysql_query("SELECT * FROM `prf_request_detl` WHERE `header_ref_code`='$activePRF'"); while($row=mysql_fetch_array($getItems)){ ?><tr onclick="javascript:getInfoX(this);" ><?php echo "<td style='width:5%;border:0px solid gray;padding:1px;font-family:Yu Gothic Light;font-size:11px;font-weight:normal;text-align:center;'>".$row['id']."</td>"; echo "<td style='width:12%;border:0px solid gray;padding:1px;font-family:Yu Gothic Light;font-size:11px;font-weight:normal;text-align:center;'>".$row['date_created']."</td>"; echo "<td style='width:60%;border:0px solid gray;padding:1px;font-family:Yu Gothic Light;font-size:11px;font-weight:normal;text-align:left;'>".$row['item_description']."</td>"; echo "<td style='width:8%;border:0px solid gray;padding:1px;font-family:Yu Gothic Light;font-size:11px;font-weight:normal;text-align:center;'>".$row['quantity']."</td>"; echo "<td style='width:15%;border:0px solid gray;padding:1px;font-family:Yu Gothic Light;font-size:11px;font-weight:normal;text-align:left;'>"; $stat=$row['item_status']; $staName = mysql_result(mysql_query("SELECT `status_name` FROM `prf_status` WHERE `sequence`='$stat'"),0); echo $staName; echo "</td>"; echo "</tr>"; } echo "</table>"; exit; } ?>
| ver. 1.4 |
.
| PHP 7.3.33 | Generation time: 0 |
proxy
|
phpinfo
|
Settings