Esempio n. 1
0
<!DOCTYPE html>
<html>
  <head>
    <title>Change Password</title>
  </head>
  <body>
    <?php 
if (isset($_POST['change_password'])) {
    if (isset($_POST['current_password']) && $_POST['current_password'] != "" && isset($_POST['new_password']) && $_POST['new_password'] != "" && isset($_POST['retype_password']) && $_POST['retype_password'] != "" && isset($_POST['current_password']) && $_POST['current_password'] != "") {
        $curpass = $_POST['current_password'];
        $new_password = $_POST['new_password'];
        $retype_password = $_POST['retype_password'];
        if ($new_password != $retype_password) {
            echo "<p><h2>Passwords Doesn't match</h2><p>The passwords you entered didn't match. Try again.</p></p>";
        } else {
            if (\Fr\LS::login(\Fr\LS::getUser("username"), "", false, false) == false) {
                echo "<h2>Current Password Wrong!</h2><p>The password you entered for your account is wrong.</p>";
            } else {
                $change_password = \Fr\LS::changePassword($new_password);
                if ($change_password === true) {
                    echo "<h2>Password Changed Successfully</h2>";
                }
            }
        }
    } else {
        echo "<p><h2>Password Fields was blank</h2><p>Form fields were left blank</p></p>";
    }
}
?>
    <form action="<?php 
echo \Fr\LS::curPageURL();
Esempio n. 2
0
<?php

$this->setTitle("Change Password");
?>
<div class="contents">
  <h2>Change Password</h2>
  <?php 
if (isset($_POST['change_password'])) {
    $curPass = $_POST['current_password'];
    $newPass = $_POST['new_password'];
    $retypePass = $_POST['retype_password'];
    if ($curPass != null && $newPass != null && $retypePass != null) {
        if (!\Fr\LS::login("admin", $curPass, false, false)) {
            echo ser("Login Failed", "Couldn't login to your account to change password.");
        } else {
            if ($newPass !== $retypePass) {
                echo ser("Passwords Doesn't match"), "The passwords you entered didn't match. Try again.</p></p>";
            } else {
                $changePass = \Fr\LS::changePassword($newPass);
                if ($changePass === true) {
                    echo sss("Password Changed Successfully", "Your password was updated.");
                }
            }
        }
    } else {
        echo "<p><h2>Password Fields was blank</h2><p>Form fields were left blank</p></p>";
    }
}
?>
  <form action="<?php 
echo \Lobby::u();
                    $sql->execute(array($who, "Facebook", $client->access_token));
                    $OP->redirect($location);
                } else {
                    /**
                     * Make it DD/MM/YYYY format
                     */
                    $birthday = date('d/m/Y', strtotime($user->birthday));
                    $image = get_headers("https://graph.facebook.com/me/picture?width=200&height=200&access_token=" . $client->access_token, 1);
                    /* Facebook Redirects the above URL to the image URL, We get that new URL ! PHP is Magic */
                    $image = $image['Location'];
                    /* An array containing user details that will made in to JSON */
                    $userArray = array("joined" => date("Y-m-d H:i:s"), "gen" => $gender, "birth" => $birthday, "img" => $image);
                    $json = json_encode($userArray);
                    \Fr\LS::register($email, "", array("name" => $name, "udata" => $json, "seen" => ""));
                    /* Login the user */
                    \Fr\LS::login($email, "");
                    $client->SetUser($id);
                    $OP->redirect($location);
                }
            }
        }
    }
    $success = $client->Finalize($success);
}
if ($client->exit) {
    $OP->ser("Something Happened", "<a href='" . $client->redirect_uri . "'>Try Again</a>");
}
if (!$success) {
    ?>
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <html>
Esempio n. 4
0
<?php

require "config.php";
if (isset($_POST['action_login'])) {
    $identification = $_POST['login'];
    $password = $_POST['password'];
    if ($identification == "" || $password == "") {
        $msg = array("Error", "Username / Password Wrong !");
    } else {
        $login = \Fr\LS::login($identification, $password, isset($_POST['remember_me']));
        if ($login === false) {
            $msg = array("Error", "Username / Password Wrong !");
        } else {
            if (is_array($login) && $login['status'] == "blocked") {
                $msg = array("Error", "Too many login attempts. You can attempt login after " . $login['minutes'] . " minutes (" . $login['seconds'] . " seconds)");
            }
        }
    }
}
?>
<html>
 <head>
  <title>Log In</title>
  </head>
  <body>
    <div id="content">
      <h1>Log In</h1>
      <?php 
if (isset($msg)) {
    echo "<h2>{$msg[0]}</h2><p>{$msg[1]}</p>";
}
Esempio n. 5
0
<!DOCTYPE html>
<?php 
require "/thirdpartylib/class.logsys.php";
\Fr\LS::init();
if (isset($_POST['action_login'])) {
    //echo 'this';
    $username = $_POST['login'];
    echo $username . '<br>';
    $password = $_POST['password'];
    echo $password . '<br>';
    if ($username == "" || $password == "") {
        $msg = array("Error", "Username / Password Wrong !");
        print_r($msg);
        echo '<br>';
    } else {
        $login = \Fr\LS::login($username, $password, isset($_POST['remember_me']));
        print_r($login);
        if ($login === false) {
            $msg = array("Error", "Username / Password Wrong !");
            print_r($msg);
            echo '<br>';
        } else {
            if (is_array($login) && $login['status'] == "blocked") {
                $msg = array("Error", "Too many login attempts. You can attempt login after " . $login['minutes'] . " minutes (" . $login['seconds'] . " seconds)");
                print_r($msg);
                echo '<br>';
            }
        }
    }
}
?>
Esempio n. 6
0
<?php

$_GET['c'] = isset($_GET['c']) ? $_GET['c'] : "";
$returnURL = urldecode($_GET['c']);
$returnURL = $returnURL == "" ? "/home" : $returnURL;
if (isset($_POST['submit'])) {
    $user = $OP->format($_POST['user']);
    $pass = $OP->format($_POST['pass']);
    if ($pass != "" && \Fr\LS::login($user, $pass, isset($_POST['remember_me']))) {
        header("Location: {$returnURL}");
        exit;
    } else {
        $error = 'E-Mail/Password is Incorrect';
    }
}
if (isset($_GET['logout']) && $_GET['logout'] == "true") {
    \Fr\LS::logout();
} elseif (loggedIn) {
    header("Location: {$returnURL};");
    exit;
}
?>
<!DOCTYPE html>
<html>
  <head>
    <?php 
$OP->head("Log In");
?>
  </head>
  <body>
    <?php 
Esempio n. 7
0
<?php

/**
 * User is logged in, so redirect to Admin main page
 */
if (\Fr\LS::$loggedIn) {
    \Response::redirect("/admin");
}
if (isset($_POST["username"]) && isset($_POST["password"])) {
    $user = $_POST["username"];
    $pass = $_POST["password"];
    if ($user == "" || $pass == "") {
        $error = array("Username / Password Wrong", "The username or password you submitted was wrong.");
    } else {
        $login = \Fr\LS::login($user, $pass, isset($_POST['remember_me']));
        if ($login === false) {
            $error = array("Username / Password Wrong", "The username or password you submitted was wrong.");
        } else {
            if (is_array($login) && $login['status'] == "blocked") {
                $error = array("Account Blocked", "Too many login attempts. You can attempt login again after " . $login['minutes'] . " minutes (" . $login['seconds'] . " seconds)");
            } else {
                \Response::redirect("/admin");
            }
        }
    }
}
?>
<html>
  <head>
    <?php 
\Hooks::doAction("head.begin");
Esempio n. 8
0
<!DOCTYPE html>
<html>
  <head>
    <title>Change Password</title>
  </head>
  <body>
    <?php 
if (isset($_POST['change_password'])) {
    if (isset($_POST['current_password']) && $_POST['current_password'] != "" && isset($_POST['new_password']) && $_POST['new_password'] != "" && isset($_POST['retype_password']) && $_POST['retype_password'] != "" && isset($_POST['current_password']) && $_POST['current_password'] != "") {
        $curpass = $_POST['current_password'];
        $new_password = $_POST['new_password'];
        $retype_password = $_POST['retype_password'];
        if ($new_password != $retype_password) {
            echo "<p><h2>Passwords Doesn't match</h2><p>The passwords you entered didn't match. Try again.</p></p>";
        } else {
            if (\Fr\LS::login(\Fr\LS::getUser("username"), $_POST['current_password'], false, false) == false) {
                echo "<h2>Current Password Wrong!</h2><p>The password you entered for your account is wrong.</p>";
            } else {
                $change_password = \Fr\LS::changePassword($new_password);
                if ($change_password === true) {
                    echo "<h2>Password Changed Successfully</h2>";
                }
            }
        }
    } else {
        echo "<p><h2>Password Fields was blank</h2><p>Form fields were left blank</p></p>";
    }
}
?>
    <form action="<?php 
echo \Fr\LS::curPageURL();