File manager - Edit - /home/autoph/public_html/connect/home/PRF/PRF_AssetIssuanceCancelledItemOnly.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'); $fullDateTime =$prfDate . " ".$prfTime; $myDate = date_create() ->format("Y-m-d"); $uniqueRefID=$user_data['u_id']; $MyAPIcode = mysql_result(mysql_query("SELECT `SMSAPICode` FROM `asa_versioning_db` WHERE `type`='Live'"),0); $MyPasswd = mysql_result(mysql_query("SELECT `SMSAPIPass` FROM `asa_versioning_db` WHERE `type`='Live'"),0); if(isset($_POST['done'])){ $returnCommentAssetItemOnly = mysql_escape_string($_POST['returnCommentAssetItemOnly']); $returnRefCodeAssetItemOnly = mysql_escape_string($_POST['cancelThisRefCode']); $cancelThisItem = mysql_escape_string($_POST['cancelThisItem']); $requestorID = mysql_result(mysql_query("SELECT `request_by` FROM `prf_request_hdr` WHERE `reference_code`='$returnRefCodeAssetItemOnly'"),0); mysql_query("UPDATE prf_request_detl SET deleted = '1', notes='$returnCommentAssetItemOnly' WHERE id='$cancelThisItem'"); mysql_query("INSERT INTO prf_ff_message(ref_code,sender_id,message,send_to,sms,email,date,time) VALUES('{$returnRefCodeAssetItemOnly}','{$uniqueRefID}','{$returnCommentAssetItemOnly}','{$requestorID}','sms','email','{$prfDate}','{$prfTime}')"); $requestorID = mysql_result(mysql_query("SELECT `request_by` FROM `prf_request_hdr` WHERE `reference_code`='$returnRefCodeAssetItemOnly'"),0); $empUFname = mysql_result(mysql_query("SELECT `u_fname` FROM `vts_users` WHERE `u_id`='$requestorID'"),0); $empULname = mysql_result(mysql_query("SELECT `u_lname` FROM `vts_users` WHERE `u_id`='$requestorID'"),0); $requestorMobile = mysql_result(mysql_query("SELECT `usr_mobile` FROM `vts_users` WHERE `u_id`='$requestorID'"),0); $requestorEmail = mysql_result(mysql_query("SELECT `email` FROM `vts_users` WHERE `u_id`='$requestorID'"),0); //######################################################################################################################### //######################################################################################################################### //UPDATE REQUESTING PARTY //######################################################################################################################### $SMSMessage = "Hi ". $empUFname. "! ". " Your purchase request with reference # ".$returnRefCodeAssetItemOnly." has been cancelled. Existing asset will be used instead. "; $result = itexmo($requestorMobile, $SMSMessage,$MyAPIcode,$MyPasswd); if ($result == ""){ //echo '<script>alert("Transaction complete but SMS notification failed.")</script>'; }else if ($result == 0){ //echo "SMS Sent!"; } else{ //echo "Error Num ". $result . " was encountered!"; } //######################################################################################################################### //######################################################################################################################### $from = "support@autohubgroup.com"; $to = $requestorEmail; $headersH = "From:" . $from; $subject = "NEW PURCHASE REQUEST"; $msgBox = "Hi ".$empUFname."! Your purchase request with reference # ".$returnRefCodeAssetItemOnly." has been cancelled. Existing asset will be used instead. Autohub Support"; mail($to,$subject,$msgBox, $headersH); //######################################################################################################################### //######################################################################################################################### } ?> <div style='width:100%;height:33px;background:white'> <table> <thead> <?php echo "<table>"; echo "<thead>"; echo "<th style='width:100px'>Rec.#</th>"; echo "<th style='width:160px'>REF. #</th>"; echo "<th style='width:320px'>ITEM DESCRIPTION</th>"; echo "<th style='width:50px'>UoM</th>"; echo "<th style='width:50px'>QUANTITY</th>"; echo "</thead>";?> </thead> </table> </div> <div class='PRFTableItems'> <?php $getItemDetl = mysql_query("SELECT * FROM prf_request_detl WHERE header_ref_code='$UpdatePRFReferenceNumber' AND `deleted` = 0"); while($row=mysql_fetch_array($getItemDetl)){ $count = $count + 1; ?><tr onClick ="javascript:showPRFUpdateItemOnly(this);" onDblclick="javascript:showFollowUpAssetItemOnly(this);"><?php echo "<td>".$row['id']."</td>"; echo "<td>".strtoupper($row['header_ref_code'])."</td>"; echo "<td>".strtoupper($row['item_description'])."</td>"; echo "<td>".strtoupper($row['uom'])."</td>"; echo "<td style='text-align:center'>".strtoupper($row['quantity'])."</td>"; echo "</tr>"; } echo "</table>"; ?> </div>
| ver. 1.4 |
.
| PHP 7.3.33 | Generation time: 0 |
proxy
|
phpinfo
|
Settings