File manager - Edit - /home/autoph/public_html/connect/home/PRF_PO_REAPPROVED_LINK.PHP
Back
<?php include_once 'core/init.php'; $prfDate = date_create() ->format("Y-m-d"); $myUID = $user_data['u_id']; if(isset($_POST['done'])){ $myPONumber = mysql_escape_string($_POST['myPONumber']); $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); $poResend = mysql_result(mysql_query("SELECT * FROM `prf_validate_links` WHERE `po_cpde`='$myPONumber'"),0); //$getPOApprovingOfficers=mysql_query("SELECT vts_users.`u_id`,vts_users.`u_fname`,vts_users.`u_lname`,vts_users.`usr_mobile`,vts_users.`email`, //prf_poapprover.`comp_id`,prf_poapprover.`po_officer_id`,prf_poapprover.`authority` // FROM prf_poapprover JOIN vts_users ON vts_users.`u_id` = prf_poapprover.`po_officer_id` //WHERE prf_poapprover.`deleted`=0 AND prf_poapprover.`trans_type`='Approver'"); while($xRow = mysql_fetch_array($poResend)){ $exID = $xRow['uid']; $randomCode = mysql_result(mysql_query("SELECT `code` FROM `prf_validate_links` WHERE `po_code`='$myPONumber'"),0);; $SMSMessage = "Purchase Order has been routed to you for FINAL Approval. Click the link below to access the record https://autohub.ph/apr.php?c=".$randomCode; $empMobile = mysql_result(mysql_query("SELECT `usr_mobile` FROM `vts_users` WHERE `u_id`='$exID'"),0); $empEmail = mysql_result(mysql_query("SELECT `email` FROM `vts_users` WHERE `u_id`='$exID'"),0); $empFName =mysql_result(mysql_query("SELECT `u_fname` FROM `vts_users` WHERE `u_id`='$exID'"),0); //$result = itexmo($empMobile, $SMSMessage,$MyAPIcode,$MyPasswd); $result = itexmoAA($empMobile, $SMSMessage,$MyAPIcode,$MyPasswd); if ($result == ""){ //echo '<script>alert("No response from SMS server. SMS failed to send")</script>'; }else if ($result == 0){ //echo "SMS Sent!"; } else{ //echo "Error Num ". $result . " was encountered!"; } //######################################PAGINATION####################################################### //######################################PAGINATION####################################################### $from = "support@autohub.ph"; $to = $empEmail; $subject = "NEW PO FOR VALIDATION"; $msgBox = "Hi ".$empFName."! Purchase Order has been routed to you for FINAL Approval. Click link below to access the record https://autohub.ph/apr.php?".$randomCode; $headers = "From:" . $from; mail($to,$subject,$msgBox, $headers); //######################################PAGINATION####################################################### //######################################PAGINATION####################################################### } echo "PO Validation LINK has been to officers using their register mobile and e-mail address."; } ?>
| ver. 1.4 |
.
| PHP 7.3.33 | Generation time: 0 |
proxy
|
phpinfo
|
Settings