Revision 1668
Added by Dietmar over 12 years ago
class.admin.php | ||
---|---|---|
187 | 187 |
|
188 | 188 |
// Print the admin footer |
189 | 189 |
function print_footer($activateJsAdmin = false) { |
190 |
global $database; |
|
190 | 191 |
// include the required file for Javascript admin |
191 | 192 |
if($activateJsAdmin != false) { |
192 | 193 |
if(file_exists(WB_PATH.'/modules/jsadmin/jsadmin_backend_include.php')){ |
... | ... | |
204 | 205 |
'ADMIN_URL' => ADMIN_URL, |
205 | 206 |
'THEME_URL' => THEME_URL, |
206 | 207 |
) ); |
208 |
|
|
209 |
$footer_template->set_block('footer_block', 'show_debug_block', 'show_debug'); |
|
210 |
|
|
211 |
$bDebug = (defined('DEBUG') ? true : false); |
|
212 |
$bDevInfo = (defined('DEV_INFOS') && (DEV_INFOS == true) && (1 == $this->get_user_id()) ? true : false); |
|
213 |
// if( $debug && (1 == $this->get_user_id())) |
|
214 |
if( $bDevInfo ) |
|
215 |
{ |
|
216 |
$footer_template->set_var('MEMORY', number_format(memory_get_peak_usage(), 0, ',', '.').' Byte' ); |
|
217 |
$footer_template->set_var('QUERIES', $database->getQueryCount ); |
|
218 |
// $footer_template->set_var('QUERIES', 'disabled' ); |
|
219 |
$included_files = get_included_files(); |
|
220 |
$footer_template->set_var('INCLUDES', sizeof($included_files) ); |
|
221 |
|
|
222 |
$sum_filesize = 0; |
|
223 |
$footer_template->set_block('show_debug_block', 'show_block_list', 'show_list'); |
|
224 |
$footer_template->set_block('show_block_list', 'include_block_list', 'include_list'); |
|
225 |
// $debug = true; |
|
226 |
foreach($included_files as $filename) |
|
227 |
{ |
|
228 |
if($bDebug) |
|
229 |
{ |
|
230 |
$footer_template->set_var('INCLUDES_ARRAY', str_replace(WB_PATH, '',$filename) ); |
|
231 |
$footer_template->set_var('FILESIZE', number_format(filesize($filename), 0, ',', '.').' Byte'); |
|
232 |
$footer_template->parse('include_list', 'include_block_list', true); |
|
233 |
} |
|
234 |
$sum_filesize += filesize($filename); |
|
235 |
} |
|
236 |
$footer_template->parse('show_list', 'show_block_list', true); |
|
237 |
|
|
238 |
if($bDebug) |
|
239 |
{ |
|
240 |
$footer_template->parse('include_list', ''); |
|
241 |
$footer_template->parse('show_list', ''); |
|
242 |
} |
|
243 |
|
|
244 |
$footer_template->set_var('FILESIZE', ini_get('memory_limit')); |
|
245 |
$footer_template->set_var('TXT_SUM_FILESIZE', 'Summary size of included files: '); |
|
246 |
$footer_template->set_var('SUM_FILESIZE', number_format($sum_filesize, 0, ',', '.').' Byte'); |
|
247 |
$footer_template->parse('show_debug', 'show_debug_block', true); |
|
248 |
} else { |
|
249 |
$footer_template->parse('show_debug', ''); |
|
250 |
} |
|
207 | 251 |
$footer_template->parse('header', 'footer_block', false); |
208 | 252 |
$footer_template->pparse('output', 'page'); |
209 | 253 |
} |
Also available in: Unified diff
! settigs.php add fields dev_infos and page_icon_dir
+ add developer info to footer
! update class.admin.php, footer.htt