<?php $docRoot = realpath(__DIR__); define("docRoot", $docRoot); /* Load the configuration */ require_once "{$docRoot}/config.php"; require_once "{$docRoot}/inc/class.open.php"; require_once "{$docRoot}/inc/class.logsys.php"; $db = unserialize(DATABASE); \Fr\LS::config(array("db" => array("host" => $db['host'], "port" => $db['port'], "name" => $db['name'], "username" => $db['user'], "password" => $db['pass'], "table" => "users"), "keys" => array("cookie" => "cantMakePublic", "salt" => "cantMakePublic"), "pages" => array("no_login" => array("/", "/register", "/me/ResetPassword"), "login_page" => "/login", "home_page" => "/home"), "features" => array("email_login" => false), "cookies" => array("domain" => CLEAN_HOST))); /* Basic Variables */ $loggedIn = \Fr\LS::$loggedIn; /* Boolean on status of current user (logged in or not) */ $who = \Fr\LS::$user; /* The current user */ /* Global Variables */ $_P = count($_POST) > 0 ? true : false; /* Boolean Variable whether POST data is sent with the request */ define("loggedIn", $loggedIn); define("curUser", $who); $OP = new Open(); if (!function_exists("get")) { function get($key, $uid = "", $json = true) { global $OP; return $OP->get($key, $uid, $json); } } /* Do these if user is logged in */ if (loggedIn && !isset($uimg)) { $uimg = get("img");
<?php require __DIR__ . "/../class.logsys.php"; \Fr\LS::config(array("db" => array("host" => "localhost", "port" => 3306, "username" => "root", "password" => "backstreetboys", "name" => "test", "table" => "users"), "features" => array("auto_init" => true), "pages" => array("no_login" => array("/Francium/logSys/", "/Francium/logSys/example-basic/reset.php", "/Francium/logSys/example-basic/register.php"), "login_page" => "/Francium/logSys/example-basic/login.php", "home_page" => "/Francium/logSys/example-basic/home.php")));
<?php require "class.logsys.php"; \Fr\LS::config(array("basic" => array("company" => "American University of Nigeria", "email" => "*****@*****.**", "email_callback" => 0), "db" => array("host" => "localhost", "port" => 3306, "username" => "root", "password" => "", "name" => "attendance", "table" => "instructor", "token_table" => "resetTokens"), "keys" => array("cookie" => "ckxc436jd*^30f840v*9!@#\$", "salt" => "^#\$4%9f+1^p9)M@4M)V\$"), "features" => array("start_session" => true, "email_login" => true, "remember_me" => true, "auto_init" => false, "block_brute_force" => false, "two_step_login" => false), "brute_force" => array("tries" => 5, "time_limit" => 300), "pages" => array("no_login" => array(), "login_page" => "login.php", "home_page" => "home.php"), "cookies" => array("expire" => "+30 days", "path" => "/", "domain" => "local.dev"), 'two_step_login' => array('instruction' => '', 'send_callback' => '', 'devices_table' => 'user_devices', 'token_length' => 4, 'numeric' => false, 'expire' => '+45 days', 'first_check_only' => true)));
<?php class logSysLobbyDB { public function prepare($query) { $obj = \Lobby\DB::getDBH()->prepare($query); return $obj; } } require_once __DIR__ . "/class.logsys.php"; $salt = Lobby\DB::getOption("admin_secure_salt"); $cookie = Lobby\DB::getOption("admin_secure_cookie"); \Fr\LS::config(array("db" => array("table" => \Lobby\DB::getPrefix() . "users"), "features" => array("auto_init" => false, "start_session" => false, "email_login" => false), "keys" => array("cookie" => $cookie, "salt" => $salt)));
<?php require __DIR__ . "/../class.logsys.php"; $config = array("basic" => array("company" => "My Site", "email" => "*****@*****.**"), "db" => array("host" => "localhost", "port" => 3306, "username" => "root", "password" => "backstreetboys", "name" => "test", "table" => "users"), "features" => array("auto_init" => true, "two_step_login" => true), "pages" => array("no_login" => array("/Francium/logSys/example-two-step-login/", "/Francium/logSys/example-two-step-login/reset.php", "/Francium/logSys/example-two-step-login/register.php"), "login_page" => "/Francium/logSys/example-two-step-login/login.php", "home_page" => "/Francium/logSys/example-two-step-login/home.php"), "two_step_login" => array("instruction" => "A token was sent to your E-Mail Address. Please see the mail in your inbox and paste the token found in the textbox below :", "send_callback" => function ($userID, $token) { $email = \Fr\LS::getUser("email", $userID); \Fr\LS::sendMail($email, "Verify Yourself", "Someone tried to login to your account. If it was you, then use the following token to complete logging in : <blockquote>" . $token . "</blockquote>If it was not you, then ignore this email and please consider to change your account's password."); })); \Fr\LS::config($config);