Your browser must have JavaScript enabled in order to view this page.
 >  >
 
Welcome Guest#214 Login/register    Go to Bottom
Go to Top

Source for file login.php

Documentation is available at login.php

  1. <?php
  2. /**
  3.  * The Login/register/Logout page
  4.  *
  5.  * DutchPIPE version 0.4; PHP version 5
  6.  *
  7.  * LICENSE: This source file is subject to version 1.0 of the DutchPIPE license.
  8.  * If you did not receive a copy of the DutchPIPE license, you can obtain one at
  9.  * http://dutchpipe.org/license/1_0.txt or by sending a note to
  10.  * license@dutchpipe.org, in which case you will be mailed a copy immediately.
  11.  *
  12.  * @package    DutchPIPE
  13.  * @subpackage dpuniverse_page
  14.  * @author     Lennert Stock <ls@dutchpipe.org>
  15.  * @copyright  2006, 2007 Lennert Stock
  16.  * @license    http://dutchpipe.org/license/1_0.txt  DutchPIPE License
  17.  * @version    Subversion: $Id: login.php 278 2007-08-19 22:52:25Z ls $
  18.  * @link       http://dutchpipe.org/manual/package/DutchPIPE
  19.  * @see        DpPage
  20.  */
  21.  
  22. /**
  23.  * Builts upon the standard DpPage class
  24.  */
  25. inherit(DPUNIVERSE_STD_PATH 'DpPage.php');
  26.  
  27. /**
  28.  * Gets event constants
  29.  */
  30. inherit(DPUNIVERSE_INCLUDE_PATH 'events.php');
  31.  
  32. /**
  33.  * The Login/register/Logout page
  34.  *
  35.  * @package    DutchPIPE
  36.  * @subpackage dpuniverse_page
  37.  * @author     Lennert Stock <ls@dutchpipe.org>
  38.  * @copyright  2006, 2007 Lennert Stock
  39.  * @license    http://dutchpipe.org/license/1_0.txt  DutchPIPE License
  40.  * @version    Release: 0.2.1
  41.  * @link       http://dutchpipe.org/manual/package/DutchPIPE
  42.  * @see        DpPage
  43.  */
  44. final class Login extends DpPage
  45. {
  46.     /**
  47.      * Sets up the page at object creation time
  48.      */
  49.     public function createDpPage()
  50.     {
  51.         // Standard setup calls:
  52.         $this->setTitle(dp_text('Login/register'));
  53.         $this->setBody(dp_text(DPUNIVERSE_PAGE_PATH 'login.html')'file');
  54.         $this->setNavigationTrail(
  55.             array(DPUNIVERSE_NAVLOGO''),
  56.             dp_text('Login/register'));
  57.     }
  58.  
  59.     /**
  60.      * Logs out users, gets the HTML content of this object
  61.      *
  62.      * Logs out logged in users when they enter this page with ?act=logout
  63.      * attached to the URL. Then returns DpPage::getBody().
  64.      *
  65.      * @return     string    HTML content of this object
  66.      * @see        DpObject::getBody()
  67.      */
  68.     public function getBody($str NULL)
  69.     {
  70.         if (($user get_current_dpuser()) && isset($user->_GET['act'])
  71.                 && 'logout' === $user->_GET['act']
  72.                 && $user->isRegistered{
  73.             get_current_dpuniverse()->logoutUser($user);
  74.             return FALSE;
  75.         }
  76.         return DpPage::getBody($str);
  77.     }
  78.  
  79.     function validateExisting()
  80.     {
  81.         get_current_dpuniverse()->validateExisting(get_current_dpuser());
  82.         return TRUE;
  83.     }
  84.  
  85.     function validateCaptcha()
  86.     {
  87.         get_current_dpuniverse()->validateCaptcha(get_current_dpuser());
  88.         return TRUE;
  89.     }
  90.  
  91.     function validateNewUser()
  92.     {
  93.         $x get_current_dpuser();
  94.         get_current_dpuniverse()->validateNewUser($x);
  95.         return TRUE;
  96.     }
  97. }
  98. ?>

Documentation generated on Mon, 03 Sep 2007 22:21:55 +0200 by phpDocumentor 1.3.0RC6

Click me!
Guest#214
 
 
 
  Go to Top
 
 
Input Field OptionsClose Input Field Go to Top
 
Legal Notices | Copyright © 2006, 2007 Lennert Stock. All rights reserved. Last update: Mon Sep 03 2007, 21:50 CET.