Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- if(!empty($_POST['Code']))
- {
- $result=mysql_query("SELECT * FROM `ForgotSerial` WHERE `Serial` = '".RES($_POST['Code'])."' LIMIT 1");
- if(mysql_num_rows($result))
- {
- $row=mysql_fetch_assoc($result);
- $Des->Success("You have been sent a new password. Please check your E-Mail. <a href=\"control.php?login\">Click here</a> to be redirected back to the login area.");
- $NewPass=rand(10000000000,99999999999);
- $Mail->Send($row['CusID'],"New Gta-multi Account Password", "Hello %FULLNAME%,
- Your password has been successfully changed.
- You can now login with the new password stated below. Be sure to change it right after you login by going to the "Profile" section on your control panel!
- Your new password is: $NewPass
- Regards,
- The Gta-Multi Team");
- mysql_query("UPDATE `Users` SET `Password` = '".RES(Encode($NewPass))."' WHERE `Users`.`CusID` =".RES($row['CusID']).";");
- mysql_query("DELETE FROM `ForgotSerial` WHERE `ForgotSerial`.`Serial` = '".RES($_POST['Code'])."'");
- }
- else $Des->Error("You have entered a wrong serial code!");
- }
- elseif(!empty($_POST['Username']) && !empty($_POST['Email']))
- {
- $result=mysql_query("SELECT `CusID` FROM `Users` WHERE `Username` = '".RES($_POST['Username'])."' AND `Email` = '".RES($_POST['Email'])."' LIMIT 1");
- if(mysql_num_rows($result))
- {
- $row=mysql_fetch_assoc($result);
- echo "We have send an E-mail to your E-mail address, please enter the serial-code provided in the E-mail to continue.";
- echo "<br/><br/>Code:<br/><form method=\"POST\"><input type=\"text\" style=\"width:300px;\" name=\"Code\">";
- echo "<br/><br/><input type=\"submit\" value=\"Continue\"></form><br/><br/>";
- $Serial=Encode(rand(1000000000000000000,9999999999999999999));
- mysql_query("INSERT INTO `ForgotSerial` (`CusID`, `Serial`, `Date`) VALUES ('".RES($row['CusID'])."', '".RES($Serial)."', CURRENT_TIMESTAMP);");
- $Mail->Send($row['CusID'],"Password Reset", "Hello %FULLNAME%,
- There was a new password requested for this Gta-Multi account.
- Please enter the serial provided in this E-Mail into the Lost Password page.
- Serial: $Serial
- If you did not requested for a password reset, please ignore this e-mail.
- Regards,
- The Gta-Multi Team");
- }
- else $Des->Error("You entered a wrong username/e-mail combination!");
- }
- else
- {
- echo "If you have forgot or lost your password to your Gta-Multi account, you can request a new one here. Please enter your username and E-Mail address to continue.<br/><br/>";
- echo "<form method=\"POST\">Username:<br/><input type=\"text\" name=\"Username\" style=\"width:200px;\"><br/>";
- echo "<br/>E-Mail:<br/><input type=\"text\" name=\"Email\" style=\"width:300px;\"><br/><br/>";
- echo "<input type=\"submit\" value=\"Continue\"></form><br/><br/>";
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement