-
Notifications
You must be signed in to change notification settings - Fork 0
/
error.php
54 lines (47 loc) · 1.09 KB
/
error.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
<?php
/**
* TestLink Open Source Project - http://testlink.sourceforge.net/
* This script is distributed under the GNU General Public License 2 or later.
*
* General purpose error page.
*
* @package TestLink
* @copyright 2012 TestLink community
*
* @internal revisions
* @since 1.9.4
* 20120703 - kinow - TICKET 4977 - CSRF - Advisory ID: HTB23088
*
**/
require_once('config.inc.php');
require_once('common.php');
function init_args()
{
$iParams = array(
'message' => array(tlInputParameter::STRING_N,0,255)
);
$pParams = R_PARAMS($iParams);
$args = new stdClass();
if(isset($pParams['message'])) {
$args->message = $pParams['message'];
}
return $args;
}
function init_gui($args)
{
$gui = new stdClass();
if(isset($args->message))
{
$gui->message = $args->message;
} else {
$gui->message = '';
}
return $gui;
}
$templateCfg = templateConfiguration();
$args = init_args();
$gui = init_gui($args);
$smarty = new TLSmarty();
$smarty->assign('gui', $gui);
$smarty->display($templateCfg->default_template);
?>