Linux ip-172-26-7-228 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64
Your IP : 3.22.27.41
Current Path : /var/www/html/oums/src/ |
| Current File : /var/www/html/oums/src/user_password_request.php |
<?php
include("sys_connect.php");
include("sys_mainphp.php");
include("api_sendsms.php");
$resp_mesg = "";
$resp_stat = "F";
if ($_POST['load_data'] == 'chck_user') {
$mysql = "select * from masempl where (femplmobl='$_POST[user_code]' or fusercode='$_POST[user_code]') and ifnull(fusercode,'')<>'' and femplstat='T' and fdeleted<>'T'";
$myres = mysqli_query($mycon, $mysql);
$myrow = mysqli_fetch_assoc($myres);
$mycnt = mysqli_num_rows($myres);
if ($mycnt == 0) {
$resp_stat = "F";
$resp_mesg = "Details not found for your password request!";
} else {
if (strlen($myrow['femplmobl']) == 10) {
$empl_code = $myrow['femplcode'];
$empl_name = $myrow['femplname'];
$empl_mobl = $myrow['femplmobl'];
$resp_stat = "T";
$resp_mesg = "Password has been sent to your registered mobile number!";
$mess_text = "Dear [". $empl_code . "] " . $empl_name . ", your login details: id: " . $myrow['fusercode'] . ", password: " . $myrow['fuserpswd'] . " - Uniclare";
$resp_stat = send_sms($user_mobl, $mess_text);
} else {
$resp_stat = "F";
$resp_mesg = "Mobile number not found, please contact administrator!";
}
$user_ip = $_SERVER['REMOTE_ADDR'];
ob_start();
system('ipconfig /all');
$mycom = ob_get_contents(); // Capture the output into a variable
ob_clean();
$find_me = "Physical";
$posi_mc = strpos($mycom, $find_me); //Find the position of Physical text
$user_mc = substr($mycom, ($posi_mc + 36), 17); // Get Physical Address
set_user_logs($myrow['fdeptcode'], $myrow['fusercode'], 'PSWD', 'PASSWORD REQUESTED: ' . $myrow['fusercode']);
}
echo json_encode(array("mesg" => $resp_mesg, "stat" => $resp_stat));
}
if ($_POST['load_data'] == 'veri_code') {
$resp_stat = "T";
$resp_mesg = substr(str_shuffle('0123456789ABCDEF'), 1, 4);
echo json_encode(array("mesg" => $resp_mesg, "stat" => $resp_stat));
}
|