Source for file unknownaction.php

Documentation is available at unknownaction.php

  1. <?php
  2. /**
  3. * Error handling class for unknown actions
  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/unknownaction.php
  13. */
  14.  
  15. /** Load ancillary functions */
  16. require_once 'inc/typeinfo.php';
  17.  
  18. /** parent object */
  19. require_once 'inc/actions/actionaction.php';
  20.  
  21. /**
  22. * Error handling class for unknown actions
  23. @package    Bumblebee
  24. @subpackage Actions
  25. */
  26. class ActionUnknown extends ActionAction {
  27.   var $action;
  28.   var $forbiden;
  29.  
  30.   /**
  31.   * Initialising the class
  32.   *
  33.   * @param  string  $action requested action ('verb')
  34.   * @param  boolean $forbidden  (optional)
  35.   * @return void nothing
  36.   */
  37.   function ActionUnknown($action$forbidden=0{
  38.     parent::ActionAction('','');
  39.     $this->action = $action;
  40.     $this->forbidden $forbidden;
  41.   }
  42.  
  43.   function go({
  44.     $conf ConfigReader::getInstance();
  45.     echo '<h2>'.T_('Error').'</h2><div class="msgerror">';
  46.     if ($this->forbidden{
  47.       echo '<p>'
  48.           .sprintf(T_('Sorry, you don\'t have permission to perform the action "%s".')xssqw($this->action))
  49.           .'</p>';
  50.     else {
  51.       echo '<p>'
  52.           .sprintf(T_('An unknown error occurred. I was asked to perform the action "%s", but I don\'t know how to do that.')xssqw($this->action))
  53.           .'</p>';
  54.     }
  55.     echo '<p>'
  56.         .sprintf(T_('Please contact <a href="mailto:%s">the system administrator</a> for more information.')$conf->AdminEmail)
  57.         .'</p></div>';
  58.   }
  59.  
  60.  
  61.  
  62. //ActionUnknown
  63. ?>

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