File manager - Edit - /home/autoph/public_html/connect/home/PRF_resendOTP.php
Back
<?php include_once 'core/init.php'; $prfDate = date_create() ->format("Y-m-d"); if(isset($_POST['done'])){ $myUID = mysql_escape_string($_POST['myUID']); $tokenKey = mysql_escape_string($_POST['tokenKey']); $myPONumber = mysql_escape_string($_POST['myPONumber']); $otp = Rand(100001, 999999); $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); $getMaxCount = mysql_result(mysql_query("SELECT `max_otp_approval` FROM `prf_purchase_order` WHERE `po_number`='$myPONumber'"),0); if($getMaxCount < 5){ //echo $otp; mysql_query("UPDATE `prf_purchase_order` SET `po_status`='3',`otp_approval`='$otp',`otp_approval_start`='$prfDate' WHERE `po_number`='$myPONumber' AND `token`='$tokenKey'"); $SMSMessage = "Your OTP Code is ".$otp. ". Valid within 24 hours only."; $empMobile = mysql_result(mysql_query("SELECT `usr_mobile` FROM `vts_users` WHERE `u_id`='$myUID'"),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!"; } $MaxCount = $getMaxCount + 1; mysql_query("UPDATE `prf_purchase_order` SET `max_otp_approval`='$MaxCount' WHERE `po_number`='$myPONumber'"); echo "<div id='OTPStatus' style='width:97.5%;height:20px;float:left;padding:5px;font-family:Yu Gothic Light;font-size:14px;background:yellow;padding:20px;font-weight:bold;color:blue'> SUCCESS: New OTP code has been sent to your registered mobile number. </div>"; }else{ echo "<div id='OTPStatus' style='width:97.5%;height:20px;float:left;padding:5px;font-family:Yu Gothic Light;font-size:14px;background:yellow;padding:20px;font-weight:bold;color:red'> ERROR: Maximum OTP request with same transaction detected. Please contact your system administrator for assistance or you may have to wait 24 hrs to reset your OTP counter for this record. </div>"; } } ?>
| ver. 1.4 |
.
| PHP 7.3.33 | Generation time: 0 |
proxy
|
phpinfo
|
Settings