Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- Include "Configuration.php";
- If(LOGGED_IN) Header("Location: Index.php?alert=login_loggedin");
- IPLog("Attempted to login.");
- If(IsSet($_POST["username"]) && IsSet($_POST["password"])) {
- If(UserExist(UserName2Id(Secure($_POST["username"])))) {
- $User = MySQL_Query("SELECT * FROM `users` WHERE `username` = '".Secure($_POST["username"])."'");
- $User = MySQL_Fetch_Array($User);
- If(IsSet($User["password"])) {
- If(Md5($_POST["password"]) == Md5($User["password"])) {
- $_SESSION["id"] = $User["id"];
- Header("Location: Index.php");
- }Else{
- Header("Location: Index.php?alert=login_password");
- }
- }Else{
- Header("Location: Index.php?alert=login_password");
- }
- }Else{
- Header("Location: Index.php?alert=login_username");
- }
- }Else{
- Header("Location: Index.php");
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement