This repository has been archived by the owner on Mar 19, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
/
footer.php
114 lines (98 loc) · 3.2 KB
/
footer.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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
<?php
/**
* WoWRoster.net WoWRoster
*
* Overall footer for Roster
*
*
* @copyright 2002-2011 WoWRoster.net
* @license http://www.gnu.org/licenses/gpl.html Licensed under the GNU General Public License v3.
* @package WoWRoster
*/
if( !defined('IN_ROSTER') )
{
exit('Detected invalid access to this file!');
}
define('ROSTER_FOOTER_INC', true);
roster_add_js(getAllTooltips(), 'inline', 'footer', FALSE, FALSE);
$totaltime = round(format_microtime() - ROSTER_STARTTIME, 2);
//debug_window
d($roster_filter,$roster_actions);
//$roster->config['debug_window'] = true;
// Assign template vars
$roster->tpl->assign_vars(array(
'S_PROCESSTIME' => $roster->config['processtime'],
'U_CREDITS' => makelink('credits'),
'PROCESSTIME' => $totaltime,
'QUERYCOUNT' => $roster->db->query_count,
'ROSTER_PATH' => ROSTER_PATH,
'ROSTER_BODY' => (!empty($roster->config['roster_bg'])
? ' style="background-image:url(' . $roster->config['roster_bg'] . ');"'
: '') . (!empty($roster->output['body_attr']) ? ' ' . $roster->output['body_attr'] : ''),
'ROSTER_ONLOAD' => (!empty($roster->output['body_onload']) ? $roster->output['body_onload'] : ''),
'WEBSITE_ADDRESS' => $roster->config['website_address'],
'HEADER_LOGO' => $roster->config['logo'],
'IMG_URL' => $roster->config['img_url'],
'INTERFACE_URL' => $roster->config['interface_url'],
'ROSTER_VERSION' => $roster->config['version'],
'ROSTER_FOOT_JS' => roster_get_js('footer'),
));
if ( $roster->auth->getAuthorized( 'debug_window' ) )
{
$error_report = $roster->error->stop();
$debug_report = '';
if ( $roster->config['debug_window'] )
{
$debug_report = $roster->debug->get_debug();
}
$roster->tpl->assign_vars(array(
'S_DEBUG_MODE' => $roster->config['debug_mode'] && is_array($error_report),
'S_DEBUG' => $debug_report,
'S_SQL_WIN' => $roster->config['sql_window'],
'S_DESCRIBE' => $roster->config['sql_window'] == 2,
));
if( $roster->config['debug_mode'] )
{
if( is_array($error_report) )
{
foreach( $error_report as $file => $errors )
{
$roster->tpl->assign_block_vars('php_debug', array(
'FILE' => substr($file, strlen(ROSTER_BASE))
));
foreach( $errors as $error )
{
$roster->tpl->assign_block_vars('php_debug.row', array(
'ROW_CLASS' => $roster->switch_row_class(),
'ERROR' => $error
));
}
}
}
}
if( $roster->config['sql_window'] )
{
if( count($roster->db->queries) > 0 )
{
foreach( $roster->db->queries as $file => $queries )
{
$roster->tpl->assign_block_vars('sql_debug', array(
'FILE' => substr($file, strlen(ROSTER_BASE))
));
foreach( $queries as $query )
{
$roster->tpl->assign_block_vars('sql_debug.row', array(
'ROW_CLASS' => $roster->switch_row_class(),
'LINE' => $query['line'],
'TIME' => $query['time'],
'QUERY' => nl2br(htmlentities($query['query'])) . (empty($query['error']) ? '' : '<hr />'
. nl2br(htmlentities($query['error']))),
'DESCRIBE' => aprint($query['describe'], '', true)
));
}
}
}
}
}
$roster->tpl->set_handle('roster_footer', 'footer.html');
$roster->tpl->display('roster_footer');