> <? echo ($g_page_title);?> '."\n\t"); echo (''."\n\t"); echo (''."\n"); } if (file_exists($g_path.'favicon.ico')) { echo (''."\n"); } if ($g_prefs['stylesheets'][$g_stylesheet]['unified'] && file_exists($g_path.'styles/unified_'.$g_stylesheet)) { echo (''); } else { echo (''); ?> '); if (file_exists($g_path.'styles/print_letter.css')) echo ("\n\t".''); ?> hooks['page_head']['include_file']) && $inc = $onemod->get_include_file('page_head')) { include($inc); } } } // skip loading RTE if browser doesn't support it, or option is turned off. It's big! if ($g_mod_prefs['global']['rich text'] && $g_browser['rich text']) echo ("\t".''); if (file_exists($g_path.'mods/'.$module.'/js.inc')) { include($g_path.'mods/'.$module.'/js.inc'); } $rssfound = false; $bodyclass = ''; if (isset($g_moduleobj) && $handler != 'restricted') { // look for an RSS feed for this module $rss = glob('rss/*'); if (!empty($rss)) { echo ("\n\t".''); $rssfound = true; } if (!$rssfound && file_exists('rss/homepage/site.xml')) { echo ("\n\t".''); } // create a custom CSS class tag for this module $bodyclass = $g_moduleobj->shortname.'_bodyclass'; if ($g_category->shortname != 'all') { $bodyclass .= ' '.$g_category->shortname; } elseif (isset($_GET['menu'])) { $bodyclass .= ' sub_'.cleantext($_GET['menu']); } $bodyclass = ' class="'.$bodyclass.'"'; } ?> >
XClose
hooks['global_pagebanner']['function'])) { $onemod->call_hook_function_noobject('global_pagebanner'); } elseif (!empty($onemod->hooks['global_pagebanner']['include_file']) && $inc = $onemod->get_include_file('global_pagebanner')) { include($inc); } } } } // if the site is disabled, show disabled.inc // but not to Editors, and don't block the admin and editor login pages if ($g_mod_prefs['global']['disable'] && !isAuthorized('Admin') && $handler != 'restricted') { include('components/disabled.inc'); } elseif (empty($g_roles['Anonymous']->privileges) && !isAuthorized('Any')) { echo ('
'); include('mods/accounts/components/accounts.inc'); echo ('
'); } else { // determine the included files on the basis of $module switch ($handler) { case 'restricted': switch ($level) { case 'admin': include ('admin.inc'); break; case 'editor': include ('editor.inc'); break; case 'member': include ('member.inc'); break; } break; case 'module': include ('module.inc'); break; case 'home': default: include ('home.inc'); } } echo ('
'); echo ('
'); if ($handler != 'restricted' && $t_mods = get_mod_hooks('page_bottom')) { foreach($t_mods as $onemod) { if (!empty($onemod->hooks['page_bottom']['function'])) { $onemod->call_hook_function_noobject('page_bottom'); } elseif (!empty($onemod->hooks['page_bottom']['include_file']) && $inc = $onemod->get_include_file('page_bottom')) { include($inc); } } } if (file_exists('footer.inc')) { include('footer.inc'); } if ($GLOBALS['debug_flag']) { if (!file_exists($g_prefs['logdir'].'stats.log')) touch($g_prefs['logdir'].'stats.log'); $t_exectime = getmicrotime() - $g_starttime; $t_loaded_classes = count(get_declared_classes()); $t_loaded_class_files = 0; if (isset($_debug['loaded_class_files'])) $t_loaded_class_files = (int)$_debug['loaded_class_files']; $t_objects = 0; $t_cache = 0; $t_pagecache = 0; $t_mysql_count = 0; $t_mysql_select = 0; $t_mysql_insert = 0; $t_mysql_update = 0; $t_mysql_delete = 0; if (isset($_debug['unloaded_class_files'])) { $t_total_class_files = $t_loaded_class_files + (int)$_debug['unloaded_class_files']; } else { $t_total_class_files = $t_loaded_class_files; } if (isset($_debug['Object'])) $t_objects = (int)$_debug['Object']; if (isset($_debug['Cache'])) $t_cache = $_debug['Cache']; if (isset($_debug['Page Cache'])) $t_pagecache = $_debug['Page Cache']; if (isset($_debug['MySQL']['count'])) $t_mysql_count = $_debug['MySQL']['count']; if (isset($_debug['MySQL']['select'])) $t_mysql_select = $_debug['MySQL']['select']; if (isset($_debug['MySQL']['insert'])) $t_mysql_insert = $_debug['MySQL']['insert']; if (isset($_debug['MySQL']['update'])) $t_mysql_update = $_debug['MySQL']['update']; if (isset($_debug['MySQL']['delete'])) $t_mysql_delete = $_debug['MySQL']['delete']; // log all entries into stats file in the following format: // timestamp | exectime | loaded classes | total classes | objects | page cache | cache | mysql count | mysql select | mysql update | mysql insert | mysql delete $str = $g_now->unix_timestamp."\t"; $str .= $t_exectime."\t"; $str .= $t_loaded_classes."\t"; $str .= $t_total_class_files."\t"; $str .= $t_objects."\t"; $str .= $t_pagecache."\t"; $str .= $t_cache."\t"; $str .= $t_mysql_count."\t"; $str .= $t_mysql_select."\t"; $str .= $t_mysql_insert."\t"; $str .= $t_mysql_update."\t"; $str .= $t_mysql_delete."\n"; error_log($str,3,$g_prefs['logdir'].'stats.log'); echo '

'; echo 'Page executed in '.$t_exectime.' seconds.
'; echo 'Loaded '.$t_loaded_classes.' classes from '.$t_loaded_class_files.' of '.$t_total_class_files.' total class files. Read '.$t_objects.' objects from the database. '; if (isset($_debug['Cache'])) echo 'Served '.$t_cache.' items from the cache.
'; if (isset($_debug['MySQL'])) { echo 'Queries - '; foreach($_debug['MySQL'] as $otype=>$oct) { echo $otype.': '.(int)$oct.' '; } } echo ('

'); if (isAuthorized('Admin')) { if ($t_mods = get_mod_hooks('global_ondebug')) { foreach($t_mods as $onemod) { if (!empty($onemod->hooks['global_ondebug']['function'])) { if (isset($g_contentobj)) { $onemod->call_hook_function('global_ondebug',$g_contentobj); } else { $onemod->call_hook_function_noobject('global_ondebug'); } } elseif (!empty($onemod->hooks['global_ondebug']['include_file']) && $inc = $onemod->get_include_file('global_ondebug')) { include($inc); } } } } } echo ('
'); ?>