<?php include_once "ini.dbstring.php"; include_once "mod.admin.php"; //for password edit $status_error = ''; $rece_error = ''; $application_error = ''; if (isset($_POST['add'])) { $user_email = $_POST['email']; $_SESSION['sess_user_email'] = $_POST['email']; $result = getusermail($user_email, $db); foreach ($result as $row) { $psw = $row['password']; $seed = str_split($psw); shuffle($seed); $rand = ''; foreach (array_rand($seed, 8) as $k) { $rand .= $seed[$k]; } } $to = $user_email; $subject = "Security Code"; $message = "You can access our site by using the following code:" . "<br>"; $message .= $rand . "<br>"; $message .= '<a href="http://atu-japan.co.jp/nyuko/password_reset.php?e=' . $_SESSION['sess_user_email'] . '">Click here to change your new password</a>'; ini_set("SMTP", "localhost"); ini_set("sendmail_from", "*****@*****.**"); $headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/html; charset=utf8' . "\r\n"; $headers .= 'From: Rubbersoul' . "\r\n";
/base.css" rel="stylesheet" type="text/css"/> <link href="<?php echo CSS; ?> /content.css" rel="stylesheet" type="text/css"/> <link href="<?php echo CSS; ?> /login.css" rel="stylesheet" type="text/css"/> <title>Password edit</title> </head> <body> <?php if (isset($_GET['e'])) { $user_mail = $_GET['e']; $result = getusermail($_GET['e'], $db); foreach ($result as $row) { $psw = $row['user_password']; $seed = str_split($psw); shuffle($seed); $rand = ''; foreach (array_rand($seed, 8) as $k) { $rand .= $seed[$k]; } } } ?> <div id="psw_reset"> <form action="#" method="post" id="form"> <h2 class="p_edit">Password Reset</h2> You can change the password<br><br>