</select> </div> <div class="modal-footer"> <button type="button" class="btn btn-danger" data-dismiss="modal"><span class="glyphicon glyphicon-remove"></span> Annuler</button> <button type="submit" class="btn btn-success"><span class="glyphicon glyphicon-ok"></span> Ajouter</button> </div> </form> </div> </div> </div> <?php } if (Auth::isLogged()) { // Si l'URL récupéré par le navigateur est différente des URL définis ci dessous, alors on affiche la liste des joueurs aléatoires. // En gros, si on est sur une page dont l'URL est défini ci dessous, on affiche pas la liste aléatoire des joueurs du serveur. $basicUrl = getcurrentpath(); $currentUrl = "http://" . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; $location = $_SERVER['REQUEST_URI']; $lastUrl = $basicUrl . "last"; $moneyUrl = $basicUrl . "money"; $etaUrl = $basicUrl . "eta"; $police = $basicUrl . "police"; $admins = $basicUrl . "admins"; $donators = $basicUrl . "donators"; $users = $basicUrl . "users"; $serveur = $basicUrl . "serveur"; $logs = $basicUrl . "logs"; $modifier = $basicUrl . "modifier"; $error = $basicUrl . "error"; // strlen permet de calculer la longueur de l'URL $location courante. Si elle est égale à 29 (qui est le format de modification d'un profil -> /modifier?j=76561197960498085 alors on masque la liste.) if ($currentUrl != $lastUrl && $currentUrl != $moneyUrl && $currentUrl != $etaUrl && $currentUrl != $police && $currentUrl != $admins && $currentUrl != $donators && $currentUrl != $users && $currentUrl != $serveur && $currentUrl != $logs && strlen($location) != 29 && substr($currentUrl, 0, -20) != $modifier && $currentUrl != $error) {
$stmt->bind_param('ss', $token, $email); if (!$stmt->execute()) { echo 'Could not execute query: ' . $stmt->error; } else { //Set email parameters $subject = "Forgot Password for " . $appName; $uri = 'http://' . $_SERVER['HTTP_HOST']; $message = ' <html> <head> <title>Forgot Password for ' . $appName . '</title> </head> <body> <p>Hi,<br><br>You have requested the password reset link for your ' . $appName . ' account!<br><br> You can change the password for your account here:<br><br> <a href="' . getcurrentpath() . 'resetpassword.php?token=' . $token . '">Reset Password Link</a><br><br> If you need further assistance please contact ' . $emailFrom . '</p> </body> </html>'; $headers = "MIME-Version: 1.0" . "\r\n"; $headers .= "Content-type:text/html;charset=iso-8859-1" . "\r\n"; $headers .= "From: " . $emailFromName . "<" . $emailFrom . ">" . "\r\n"; $headers .= "Bcc: " . $emailBCC . "" . "\r\n"; if (mail($email, $subject, $message, $headers)) { $action = "Success"; } } $stmt->close(); $mysqli->close(); } }
$string = $_POST['b_password']; $encrypted = base64_encode(mcrypt_encrypt(MCRYPT_RIJNDAEL_256, md5($key), $string, MCRYPT_MODE_CBC, md5(md5($key)))); $text .= '$B_PASSWORD = \'' . $encrypted . '\';' . PHP_EOL; $text .= '$B_ACCOUNT_NAME = \'' . $_POST['b_account_name'] . '\';' . PHP_EOL . PHP_EOL; } if (!(empty($_POST['ks_username']) || empty($_POST['ks_password']) || empty($_POST['ks_account_name']))) { $string = $_POST['ks_username']; $encrypted = base64_encode(mcrypt_encrypt(MCRYPT_RIJNDAEL_256, md5($key), $string, MCRYPT_MODE_CBC, md5(md5($key)))); $text .= '$KS_USERNAME = \'' . $encrypted . '\';' . PHP_EOL; $string = $_POST['ks_password']; $encrypted = base64_encode(mcrypt_encrypt(MCRYPT_RIJNDAEL_256, md5($key), $string, MCRYPT_MODE_CBC, md5(md5($key)))); $text .= '$KS_PASSWORD = \'' . $encrypted . '\';' . PHP_EOL; $text .= '$KS_ACCOUNT_NAME = \'' . $_POST['ks_account_name'] . '\';' . PHP_EOL . PHP_EOL; } $text = '<?php' . PHP_EOL . $text . '?>'; $page = getcurrentpath() . '?key=' . $key; ?> <h3>1. Copy ข้อความในกล่องข้อความไปวางที่ไฟล์ key.php</h3> <textarea class="span12" rows="18"><?php echo htmlspecialchars($text); ?> </textarea> <h3>2. สามารถเข้าใช้งานได้ที่</h3> <p class="text-error">(ให้จดบันทึก URL นี้ไว้ ห้ามทำหาย ถ้าไม่งั้นต้องสร้าง <strong>key.php</strong> ใหม่)</p> <div class="alert alert-info"><a href="<?php echo $page; ?> " target="_blank"><?php echo htmlspecialchars($page); ?>