.'; exit(); } } if ($user['is_the_guest'] and !$conf['guest_access'] and !in_array( script_basename(), // Array of basename without file extention array('identification', 'password', 'register' ) ) ) { //next line required if PATH_INFO (no ? in url) but won't work for scripts outside PWG $page['root_path'] = cookie_path(); redirect (get_root_url().'identification.php'); } if ($conf['check_upgrade_feed'] and defined('PHPWG_IN_UPGRADE') and PHPWG_IN_UPGRADE) { // retrieve already applied upgrades $query = ' SELECT id FROM '.UPGRADE_TABLE.' ;'; $applied = array_from_query($query, 'id'); // retrieve existing upgrades $existing = get_available_upgrade_ids(); // which upgrades need to be applied? if (count(array_diff($existing, $applied)) > 0) { //next line required if PATH_INFO (no ? in url) but won't work for scripts outside PWG $page['root_path'] = cookie_path(); $header_msgs[] = 'Some database upgrades are missing, ' .'upgrade now'; } } if (is_adviser()) { $header_msgs[] = $lang['adviser_mode_enabled']; } if (count($header_msgs) > 0) { $template->assign_block_vars('header_msgs',array()); foreach ($header_msgs as $header_msg) { $template->assign_block_vars('header_msgs.header_msg', array('HEADER_MSG'=>$header_msg)); } } if (!defined('IN_ADMIN') or !IN_ADMIN) { include(PHPWG_ROOT_PATH.'include/functions_filter.inc.php'); include(PHPWG_ROOT_PATH.'include/filter.inc.php'); } if (isset($conf['header_notes'])) { $header_notes = array_merge($header_notes, $conf['header_notes']); } // default event handlers add_event_handler('render_comment_content', 'parse_comment_content'); trigger_action('init'); ?>