<?PHP
include_once('../slack.php');
include_once('/var/www/secure.php');
-include('offWorldMail.php');
+include_once('../email.php');
if(isset($_POST['email'])){
$email = $_POST['email'];
$r = $petition->query("SELECT * FROM users WHERE email = '$email'");
- $row = mysqli_fetch_array($r,MYSQLI_ASSOC);
- if ($row['email'] != ''){
+ $row = mysqli_fetch_array($r,MYSQLI_ASSOC);
+ if ($row['email'] != ''){
$pass = rand(1000,9999);
$salt = md5(rand(1000,9999));
$hash = md5($pass.$salt);
$encrypted = $hash.':'.$salt;
- off_world_mail($email,$row['name'],'Login with '.$email.' and your new password '.$pass.' at http://md-petition.com/admin/login.php');
+ //off_world_mail(,,);
+ $subject = 'MD Petition Login';
+ $body = 'Login with '.$email.' and your new password '.$pass.' at https://www.md-petition.com/admin/login.php'
+ meps_mail($email,$body,$subject);
$petition->query("update users set pass = '$encrypted' WHERE email = '$email'");
echo "<h1>Your Password has been Sent.</h1>";
- slack_general('ADMIN: Reset- Your Password has been Sent','md-petition');
+ slack_general_admin('DEBUG: $body','md-petition-signed');
}else{
echo "<h1>E-Mail address not found.</h1>";
slack_general('ADMIN: Reset- E-Mail address not found','md-petition');