Core  3.2
PHP API documentation
 All Data Structures Namespaces Files Functions Variables Pages
guest.php
Go to the documentation of this file.
1 <?php
2 /*
3  * @author Anakeen
4  * @package FDL
5 */
6 /**
7  * Main program to activate action in WHAT software in guest mode
8  *
9  * @author Anakeen
10  * @version $Id: guest.php,v 1.24 2008/12/16 15:51:53 jerome Exp $
11  * @package FDL
12  * @subpackage
13  */
14 /**
15  */
16 
17 include_once ('WHAT/Class.ActionRouter.php');
18 
19 $allowGuest = getParam('CORE_ALLOW_GUEST', 'no');
20 if ($allowGuest != 'yes') {
21  $e = new Dcp\Core\Exception("CORE0010");
22  $e->addHttpHeader('HTTP/1.0 503 Guest access not allowed');
23  throw $e;
24 }
25 
27  include_once ('TOOLBOX/stop.php');
28  exit(0);
29 }
30 
31 include_once ('WHAT/Lib.Main.php');
32 include_once ('WHAT/Class.ActionRouter.php');
33 
34 register_shutdown_function('handleFatalShutdown');
35 
36 $account = new Account();
37 if ($account->setLoginName("anonymous") === false) {
38  throw new \Dcp\Exception(sprintf("anonymous account not found."));
39 }
41 $actionRouter->executeAction();
static inMaintenance()
if($account->setLoginName("anonymous")===false) $actionRouter
Definition: guest.php:40
getParam($name, $def="")
must be in core or global type
Definition: Lib.Common.php:193
$allowGuest
Definition: guest.php:19
switch($command) exit
Definition: checkVault.php:46
$account
Definition: guest.php:36
← centre documentaire © anakeen