Source for file login.php

Documentation is available at login.php

  1. <?php
  2. /**
  3. * Print a polite login form
  4. *
  5. @author    Stuart Prescott
  6. @copyright  Copyright Stuart Prescott
  7. @license    http://opensource.org/licenses/gpl-license.php GNU Public License
  8. @version    $Id$
  9. @package    Bumblebee
  10. @subpackage Actions
  11. *
  12. *  path (bumblebee root)/inc/actions/login.php
  13. */
  14.  
  15. /** Load ancillary functions */
  16. require_once 'inc/typeinfo.php';
  17.  
  18. require_once 'inc/bb/configreader.php';
  19.  
  20. /** parent object */
  21. require_once 'inc/actions/actionaction.php';
  22. /** Data reflector object */
  23. require_once 'inc/formslib/datareflector.php';
  24.  
  25. /**
  26. * Print a polite login form
  27. *
  28. * Authentication is undertaken by the class BumblebeeAuth
  29. @package    Bumblebee
  30. @subpackage Actions
  31. */
  32.  
  33.   /**
  34.   * Initialising the class
  35.   *
  36.   * @return void nothing
  37.   */
  38.   function ActionPrintLoginForm($auth$PDATA{
  39.     parent::ActionAction($auth$PDATA);
  40.     $this->mungeInputData();
  41.   }
  42.  
  43.   function go({
  44.     $conf ConfigReader::getInstance();
  45.     if ($conf->value('display''LoginPage'!== null && $conf->value('display''LoginPage'!== ""{
  46.       echo $conf->value('display''LoginPage');
  47.     }
  48.     echo '<h2>' T_('Login required').'</h2>';
  49.     echo '<p>'  T_('Please login to view or book instrument usage''</p>';
  50.     $this->printLoginForm();
  51.     if ($this->readOnly{
  52.       $this->printDataReflectionForm($this->PD'reflection_');
  53.     }
  54.   }
  55.  
  56.   function printLoginForm({
  57.     printf('
  58.       <table>
  59.       <tr>
  60.         <td>%s</td>
  61.         <td><input name="username" type="text" size="16" /></td>
  62.       </tr>
  63.       <tr>
  64.         <td>%s</td>
  65.         <td><input name="pass" type="password" size="16" /></td>
  66.       </tr>
  67.       <tr>
  68.         <td></td>
  69.         <td><input name="submit" type="submit" value="%s" /></td>
  70.       </tr>
  71.       </table>',
  72.       T_('Username:'),
  73.       T_('Password:'),
  74.       T_('login')  );
  75.   }
  76.  
  77.   function printDataReflectionForm($data$basename=''{
  78.     // save the rest of the query string for later use
  79.     $reflector new DataReflector($basename);
  80.     $reflector->excludeLogin();
  81.     $reflector->exclude('changeuser');
  82. /*    $reflector->addLimit(array('action', 'forceaction', $basename.'action', $basename.'forceaction'),
  83.                          array('view', 'calendar'));*/
  84.     echo $reflector->display($this->PD);
  85.   }
  86.  
  87. }
  88.  
  89. ?>

Documentation generated on Tue, 06 Mar 2007 10:01:44 +0000 by phpDocumentor 1.3.0