/home/techb158/workloadmatch.com/workloadmatch.com/includes
NameSizeModeActions
CSRF_Protect.php21880644editdlrm
db_connect.php6940644editdlrm
error.php4510644editdlrm
error_log24180644editdlrm
forgetpassword.php68310644editdlrm
functions.php241620644editdlrm
geoiploc.php25204350644editdlrm
hex.php10500644editdlrm
hexbin.php9420644editdlrm
logout.php7940644editdlrm
process_login.php28840644editdlrm
process_login_Remove rechaptcha.php28910644editdlrm
psl-config.php16870644editdlrm
register.inc.php33040644editdlrm
register.php263220644editdlrm
reset.php61540644editdlrm
Edit: /home/techb158/workloadmatch.com/workloadmatch.com/includes/reset.php (6154B)
success){ //$succMsg = 'Your contact request have submitted successfully.'; $error_msg = ""; $userid = $_POST['email']; $password = filter_input(INPUT_POST, 'p', FILTER_SANITIZE_STRING); if (strlen($password) != 128) { $error_msg .= '

Invalid password configuration.

'; } $random_salt = hash('sha512', uniqid(openssl_random_pseudo_bytes(16), TRUE)); $password = hash('sha512', $password . $random_salt); $date = date('Y/m/d H:i'); $token = $_SESSION['token']; //$str =$_GET['token']; //$_GET["token"] = 0; // //$myArray = explode(',', $str); //$token = encrypt_decrypt('decrypt', $myArray[0]); //header('Location: reset.php?error='. $token); //exit(); $querys = "SELECT * FROM tokens where token='".$token."' and used='0'"; $results = $mysqli->query($querys); $row = $results->fetch_assoc(); $email=$row['email']; //$tokens=encrypt_decrypt('decrypt', $row['token']); $users_name=$row['userid']; $used=$row['used']; $Admin_ID = $row['Admin_ID']; $Manager_ID = $row['Manager_ID']; $Master_ID = $row['Master_ID']; $Teacher_ID = $row['Teacher_ID']; If($userid == $email && $used == 0){ $query = "SELECT * FROM Teacher_Profile where Admin_ID ='".$Admin_ID."' and Master_ID ='".$Master_ID."' and Manager_ID ='".$Manager_ID."' and Teacher_ID ='".$Teacher_ID."' and Email ='".$email."' and User_Name ='".$users_name."'"; $result = $mysqli->query($query); $Admin = $result->fetch_assoc(); $Username = $Admin['Teacher_ID']; //header('Location: reset.php?error='. $mysqli->error . '-'.$token); //header('Location: reset.php?error='. $mysqli->error . '-'.$email); //exit(); if($Username > 0){ $se="1"; if (!$mysqli->query("UPDATE Teacher_Profile SET Password ='$password', salt='$random_salt' WHERE Teacher_ID ='".$Teacher_ID."' and Admin_ID ='".$Admin_ID."' and Master_ID ='".$Master_ID."' and Manager_ID ='".$Manager_ID."' and Email ='".$email."'")) { header('Location: reset.php?error=Password Update is failed!'); exit(); } if (!$mysqli->query("UPDATE tokens SET used='".$se."', update_date='".$date."' WHERE token='".$token."'")) { header('Location: reset.php?error=Password Update is failed!'); exit(); } $url = "http://". $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI']; $subject = "Your Password Updated"; $uri = 'https://'. $_SERVER['HTTP_HOST'] ; $message = ' Workloadmatch: Your Password Updated

Dear User,


"'."Thank you for choosing Workloadmatch. - Your password has been updated.".'"


'; $headers = "MIME-Version: 1.0" . "\r\n"; $headers .= "Content-type:text/html;charset=iso-8859-1" . "\r\n"; $headers .= 'From: Workloadmatch Support' . "\r\n"; //$headers = "MIME-Version: 1.0" . "\r\n"; //$headers .= "Content-type:text/html;charset=iso-8859-1" . "\r\n"; //$headers .= 'From: support' . "\r\n"; //$headers .= 'Bcc: support' . "\r\n"; // mail($email,$subject,$message,$headers); //$mail = new PHPMailer(true); // //try { // //Server settings // $mail->isSMTP(); // $mail->Host = 'mail.workloadmatch.com'; // $mail->SMTPAuth = true; // $mail->Username = 'support@workloadmatch.com'; // $mail->Password = 'qND%cDNnI$97'; // $mail->SMTPSecure = PHPMailer::ENCRYPTION_SMTPS; // $mail->Port = 465; // //$to="abala@rsb.qc.ca"; // //Recipients // $mail->setFrom('support@workloadmatch.com', 'Workloadmatch Support'); // $mail->addAddress($to); // Add a recipient // // // Content // $mail->isHTML(true); // $mail->Subject = $subject; // $mail->Body = $message; // // $mail->send(); // //$Broker_Name="WorkloadMatch"; // //$Broker_Email="support@workloadmatch.com"; // //$messages = 'New Update on your file, please visit your profile to view it.'; // //mail($Teacher_SMS_Carrier, $subject, "$messages", "From: $Broker_Name <$Broker_Email>\r\n"); // header('Location: index.php?err=Success - We have sent the password reset link to your email.'); // exit(); //} catch (Exception $e) { // header('Location: index.php?err=Mail could not be sent. Mailer Error: ' . $mail->ErrorInfo); // exit(); //} if (!$mysqli->query("UPDATE tokens SET used='".$se."', update_date='".$date."' WHERE token='".$tokens."'")) { } header('Location: index.php?err=Your password has been successfully updated!.'); exit(); }else { //header('Location: reset.php?error='.$mysqli->error); header('Location: reset.php?error=Invalid link or Password already changed!'); exit(); } }else{ header('Location: reset.php?error=Invalid link!'); exit(); } }else{ header('Location: ../reset.php?err=Robot verification failed, please try again'); exit(); } }else { header('Location: ../reset.php?err=Please click on the reCAPTCHA box.'); exit(); } }