# This script with (index.php?act=l). Redirect here after logging out. $login->logout($help->sessname); # Log the user out. $login->redirectIfNotLoggedIn($help->sessname, '?act=l'); # Send to login page (/help/?act=l). exit; } // End if sign out code. if (isset($_GET['act']) && $_GET['act'] == 'l') { // Send required fields so method can check whether they're not empty. $errrotext = $login->processLogin(array('txt_user' => 'Username', 'txt_pass' => 'Password'), $help); } // End if login attempted. require '../../../includes/classes/Document.php'; if (isset($_GET['act']) && $_GET['act'] == 'l') { if ($login->isLoggedIn($help->sessname)) { exit; } $document = new Document('Help::Login to view this page!'); $login->showLogin(array('user' => 'Username', 'pass' => 'Password'), $login->invalid); # Not currently logged in unset($document); exit; } // End if. $login->redirectIfNotLoggedIn($help->sessname, '?act=l'); # Send to login page if accessing page without being logged in. $help->display(); # Fine, display app screen. unset($help); # Cleanup.
<?php include "../classes/Database.class.php"; include "../classes/Login.class.php"; include "../classes/Evento.class.php"; $database = new Database(); $db = $database->getConnection(); $login = new Login($db); if (isset($_POST['login'])) { $login->setUsuario($_POST['usr']); $login->setSenha($_POST['pass']); $login->login(); } if (isset($_GET['logout'])) { $login->doLogout(); } if ($login->isLoggedIn()) { $evento = new Evento($db); $eventos = $evento->readAll(); $titulo = "Todos os eventos"; $content = array(); $content[] = "tabelasEventos.php"; include "template/dash.php"; } else { include "template/login.php"; }
<?php if (isset($_POST['login'])) { if (Login::isLoggedIn()) { header('location: index.php'); } else { Login::destroy(); echo notification("Incorrecte email of wachtwoord!", 'error'); } } ?> <div id="form"> <form name="login" method="post"> <fieldset class="info_fieldset"> <div id="fields"> <label>Email</label><input class="textbox" type="text" name="txtEmail" value="" /> <label>Wachtwoord</label><input class="textbox" type="password" name="txtWachtwoord" value="" /> <label> </label> <input class="button" type="submit" name="login" value="Inloggen" /> <a class="button" href="index.php?c=gebruiker&p=forgotpass">Wachtwoord vergeten?</a> </div> </fieldset> </form> </div>
<?php $view = new stdClass(); $view->pageTitle = 'Login'; require_once 'Models/Login.php'; $login = new Login(); //Check if user is logged in. if ($login->isLoggedIn() == true) { require_once "views/login.phtml"; } else { $view->messages = $login->messages; require_once "views/not_login.phtml"; }
include 'classes/adminClass.php'; $databaseObj = new Database(); $loginObj = new Login(); $productObj = new Product(); $conversationObj = new Conversation(); $adminObj = new Admin(); session_start(); $range = null; $user_id = null; $bannedUser = null; if (isset($_SESSION['USERNAME'])) { $range = $loginObj->getRangeType($_SESSION['USERNAME']); $user_id = $loginObj->getUserId(); $bannedUser = $loginObj->checkBannedUsers($user_id); } if ($loginObj->isLoggedIn() && count($bannedUser) == 1) { ?> <aside id="loggedMenu" > <button type="button" onClick="window.location.href='logout.php'">Logout</button> </aside> <?php } elseif ($loginObj->isLoggedIn() && strcmp($range, "Regular") === 0) { ?> <aside id="loggedMenu" > <button type="button" onClick="window.location.href='index.php'">Home</button> <button type="button" onClick="window.location.href='userProfile.php'">Profile</button> <button type="button" onClick="window.location.href='messenger.php'">Messages</button> <button type="button" onClick="window.location.href='product.php'" >Upload</button> <button type="button" onClick="window.location.href='displayApartments.php'">Your places</button> <button type="button" onClick="window.location.href='search.php'">Search</button> <button type="button" onClick="window.location.href='logout.php'">Logout</button>
require_once 'view/LayoutView.php'; require_once 'view/RegisterView.php'; require_once 'view/RockPaperScissorsView.php'; require_once 'view/ToDoListView.php'; require_once 'model/Login.php'; require_once 'model/ListOfUsers.php'; require_once 'model/RegisterUser.php'; require_once 'model/User.php'; require_once 'model/AddToDoList.php'; require_once 'model/RockPaperScissor.php'; require_once 'controller/LoginController.php'; require_once 'controller/RegisterUserController.php'; //MAKE SURE ERRORS ARE SHOWN... MIGHT WANT TO TURN THIS OFF ON A PUBLIC SERVER error_reporting(E_ALL); ini_set('display_errors', 'On'); $listOfUsers = new ListOfUsers(); $login = new Login($listOfUsers); $register = new RegisterUser(); //CREATE OBJECTS OF THE VIEWS $v = new LoginView($login); $dtv = new DateTimeView(); $lv = new LayoutView(); $regView = new RegisterView(); $rpsGameView = new RockPaperScissorsView(); $toDoListView = new ToDoListView(); $regController = new RegisterUserController($regView, $register, $v); $lc = new LoginController($v, $login, $lv, $toDoListView); $regController->startRegisterNewUser(); $lc->tryToLogin(); $lv->chooseLayout($login->isLoggedIn(), $v, $dtv, $regView, $rpsGameView, $toDoListView);
<?php // cross domain login if (!Login::isLoggedIn() && $_GET['login_username'] && $_GET['login_password']) { $o = new Login($_GET['login_username'], $_GET['login_password'], $_GET['remember_me']); $re = $o->checkLogin(); if ($re['status'] == 'OK') { $o->doLogin(); } } //header('Access-Control-Allow-Origin: *'); //header("Access-Control-Allow-Headers: x-requested-with"); header("Content-type: text/javascript"); ?> check_login('<?php echo is_numeric(PERSON_ID) ? 'true' : 'false'; ?> ');
$login->startsession(); if (isset($_GET['act']) && $_GET['act'] == 'signout') { $login->login_page = '?act=l'; $login->logout($diary->sessname); $login->redirectIfNotLoggedIn($diary->sessname, '?act=l'); exit; } // End if. if (isset($_GET['act']) && $_GET['act'] == 'l') { $errrotext = $login->processLogin(array('txt_user' => 'Username', 'txt_pass' => 'Password'), $diary); } // End if. require '../../../includes/classes/Document.php'; # Document class. if (isset($_GET['act']) && $_GET['act'] == 'l') { if ($login->isLoggedIn($diary->sessname)) { exit; } $document = new Document('Diary::Login to view this page!'); $login->showLogin(array('user' => 'Username', 'pass' => 'Password'), $login->invalid); # Not currently logged in unset($document); exit; } // End if. $login->redirectIfNotLoggedIn($diary->sessname, '?act=l'); //echo 's'; //@include_once('../../profile/inc/stat.php'); // Log visit // Log datetime page was loaded //$pg_load = h99(); //$db->query("UPDATE diary_events_s SET load_datetime='$pg_load'");
<?php SESSION_START(); //require_once("classes/login.php"); function __autoload($class_name) { require_once '/classes/' . $class_name . '.php'; } //load css bootstrap require 'bootstraploader.php'; $page = null; if (isset($_GET['page'])) { $page = $_GET['page']; } $medewerker = Login::isLoggedIn(); if ($medewerker != null) { } ?> <html lang="en"> <head> <?php require "Views/Header.php"; ?> </head> <body> <?php switch ($page) { case "home": require "Views/Home.php"; break; case "menu":