Core
3.2
PHP API documentation
Main Page
Related Pages
Namespaces
Data Structures
Files
Examples
File List
Globals
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
26
if
(
ActionRouter::inMaintenance
()) {
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
}
40
$actionRouter
=
new
ActionRouter
(
$account
);
41
$actionRouter
->executeAction();
ActionRouter
Definition:
Class.ActionRouter.php:11
Dcp\Core\Exception
Definition:
ErrorCodeCORE.php:82
ActionRouter\inMaintenance
static inMaintenance()
Definition:
Class.ActionRouter.php:32
Account
Definition:
Class.Account.php:31
$actionRouter
if($account->setLoginName("anonymous")===false) $actionRouter
Definition:
guest.php:40
getParam
getParam($name, $def="")
must be in core or global type
Definition:
Lib.Common.php:193
$allowGuest
$allowGuest
Definition:
guest.php:19
exit
switch($command) exit
Definition:
checkVault.php:46
$account
$account
Definition:
guest.php:36
← centre documentaire
© anakeen