|
From: Jon O. <jon...@us...> - 2005-12-05 22:25:21
|
Update of /cvsroot/mxbb/core27x/admin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32005/core27x/admin Modified Files: admin_mx_block.php admin_mx_chkobjs.php admin_mx_gen_cache.php admin_mx_meta.php admin_mx_module.php admin_mx_page.php admin_mx_page_setting.php admin_mx_phpinfo.php admin_mx_portal.php index.php page_footer_admin.php page_header_admin.php pagestart.php Added Files: admin_mx_module_cp.php Log Message: Updated - more is backported - some is fixed Index: admin_mx_phpinfo.php =================================================================== RCS file: /cvsroot/mxbb/core27x/admin/admin_mx_phpinfo.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** admin_mx_phpinfo.php 5 Dec 2005 19:25:26 -0000 1.2 --- admin_mx_phpinfo.php 5 Dec 2005 22:25:11 -0000 1.3 *************** *** 21,25 **** if( !empty($setmodules) ) { ! $module['Portal - System']['phpInfo'] = 'admin/' . $file; return; } --- 21,26 ---- if( !empty($setmodules) ) { ! $module['4_Panel_system']['4_1_PHPinfo'] = 'admin/' . basename(__FILE__); ! return; } Index: admin_mx_page.php =================================================================== RCS file: /cvsroot/mxbb/core27x/admin/admin_mx_page.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** admin_mx_page.php 5 Dec 2005 19:25:26 -0000 1.2 --- admin_mx_page.php 5 Dec 2005 22:25:11 -0000 1.3 *************** *** 24,30 **** if( !empty($setmodules) ) { ! $file = basename(__FILE__); ! $module['Portal - General']['Page_admin'] = 'admin/' . $file; ! return; } --- 24,31 ---- if( !empty($setmodules) ) { ! $file = basename(__FILE__); ! $module['2_CP']['2_4_PageCP'] = 'admin/' . $file; ! ! return; } Index: admin_mx_chkobjs.php =================================================================== RCS file: /cvsroot/mxbb/core27x/admin/admin_mx_chkobjs.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** admin_mx_chkobjs.php 5 Dec 2005 19:25:26 -0000 1.2 --- admin_mx_chkobjs.php 5 Dec 2005 22:25:11 -0000 1.3 *************** *** 26,30 **** if( !empty($setmodules) ) { ! $module['Portal - System']['Objects_Integrity_Check'] = 'admin/' . basename(__FILE__); return; } --- 26,31 ---- if( !empty($setmodules) ) { ! $module['4_Panel_system']['4_1_Integrity'] = 'admin/' . basename(__FILE__); ! return; } Index: admin_mx_gen_cache.php =================================================================== RCS file: /cvsroot/mxbb/core27x/admin/admin_mx_gen_cache.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** admin_mx_gen_cache.php 5 Dec 2005 19:25:26 -0000 1.3 --- admin_mx_gen_cache.php 5 Dec 2005 22:25:11 -0000 1.4 *************** *** 14,18 **** if( !empty($setmodules) ) { ! $module['Portal - System']['Generate cache'] = 'admin/' . basename(__FILE__); return; } --- 14,19 ---- if( !empty($setmodules) ) { ! $module['4_Panel_system']['4_1_Cache'] = 'admin/' . basename(__FILE__); ! return; } Index: admin_mx_meta.php =================================================================== RCS file: /cvsroot/mxbb/core27x/admin/admin_mx_meta.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** admin_mx_meta.php 5 Dec 2005 19:25:26 -0000 1.2 --- admin_mx_meta.php 5 Dec 2005 22:25:11 -0000 1.3 *************** *** 22,26 **** if( !empty($setmodules) ) { ! $module['Portal - System']['Meta Tag'] = 'admin/' . basename(__FILE__); return; } --- 22,26 ---- if( !empty($setmodules) ) { ! $module['4_Panel_system']['4_1_Meta'] = 'admin/' . basename(__FILE__); return; } Index: index.php =================================================================== RCS file: /cvsroot/mxbb/core27x/admin/index.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** index.php 6 May 2005 06:47:56 -0000 1.1 --- index.php 5 Dec 2005 22:25:11 -0000 1.2 *************** *** 1,37 **** <?php ! /*************************************************************************** ! * (admin) index.php ! * ------------------- ! * begin : Saturday, Feb 13, 2001 ! * copyright : (C) 2001 The phpBB Group ! * email : su...@ph... ! * ! * $Id$ ! * ! * ! ***************************************************************************/ ! /*************************************************************************** ! * ! * This program is free software; you can redistribute it and/or modify ! * it under the terms of the GNU General Public License as published by ! * the Free Software Foundation; either version 2 of the License, or ! * (at your option) any later version. ! * ! ***************************************************************************/ - define('IN_PORTAL', 1); - $mx_root_path = '../'; // ! // Load default header // $no_page_header = TRUE; - require('./pagestart.php'); - - session_start(); - // Unset all of the session variables. - session_unset(); --- 1,42 ---- <?php ! /** ------------------------------------------------------------------------ ! * Subject : mxBB - a fully modular portal and CMS (for phpBB) ! * Author : Jon Ohlsson and the mxBB Team ! * Credits : The phpBB Group & Marc Morisette ! * Copyright : (C) 2002-2005 mxBB Portal ! * Email : jo...@mx... ! * Project site : www.mxbb-portal.com ! * ------------------------------------------------------------------------- ! * ! * $Id$ ! */ ! /** ! * This program is free software; you can redistribute it and/or modify ! * it under the terms of the GNU General Public License as published by ! * the Free Software Foundation; either version 2 of the License, or ! * (at your option) any later version. ! */ ! ! /** ! * mxNN Notes: ! * This file is borrowed from phpBB, with some modifications ! */ // ! // Security and Page header // + define('IN_PORTAL', 1); + $mx_root_path = './../'; + require($mx_root_path . 'extension.inc'); $no_page_header = TRUE; + require('./pagestart.' . $phpEx); + // ------------------------------ + // DEBUG ONLY ;-) + // + //error_reporting(E_ALL); + // ------------------------------ *************** *** 41,45 **** function inarray($needle, $haystack) { ! for($i = 0; $i < sizeof($haystack); $i++ ) { if( $haystack[$i] == $needle ) --- 46,50 ---- function inarray($needle, $haystack) { ! for( $i = 0; $i < sizeof($haystack); $i++ ) { if( $haystack[$i] == $needle ) *************** *** 50,83 **** return false; } ! ! ! function read_admin($dir_module ) { ! global $phpEx, $template; ! $module = array(); ! $setmodules = 1; ! $dir = @opendir( $dir_module ); ! while( $file = @readdir($dir) ) { ! if( preg_match("/^admin_.*?\." . $phpEx . "$/", $file) ) { ! include($dir_module . '/' . $file); } } - @closedir($dir); - - unset($setmodules); - return $module; } - // // End functions // ------------- - - - // // Generate relevant output --- 55,82 ---- return false; } ! function read_admin($dir_module) { ! global $phpEx, $template, $lang; ! $module = array(); ! if( $dir = @opendir($dir_module) ) { ! $setmodules = 1; ! while( $file = @readdir($dir) ) { ! if( preg_match("/^admin_.*?\." . $phpEx . "$/", $file) ) ! { ! include($dir_module . '/' . $file); ! } } + @closedir($dir); + unset($setmodules); } return $module; } // // End functions // ------------- // // Generate relevant output *************** *** 88,107 **** $template->set_filenames(array( ! "body" => "admin/index_navigate.tpl") ); $template->assign_vars(array( 'U_PHPBB_ROOT_PATH' => PHPBB_URL, 'TEMPLATE_ROOT_PATH' => TEMPLATE_ROOT_PATH, ! "U_FORUM_INDEX" => append_sid( PHPBB_URL . "index.$phpEx"), ! "U_PORTAL_INDEX" => append_sid( PORTAL_URL . "index.$phpEx"), "U_ADMIN_INDEX" => append_sid("index.$phpEx?pane=right"), ! "L_FORUM_INDEX" => $lang['Main_index'], - "L_PORTAL_INDEX" => $lang['Portal_index'], "L_ADMIN_INDEX" => $lang['Admin_Index'], ! "L_PREVIEW_FORUM" => $lang['Preview_forum'], ! "L_PREVIEW_PORTAL" => $lang['Preview_portal']) ); --- 87,115 ---- $template->set_filenames(array( ! 'body' => 'admin/index_navigate.tpl') ); + + $admincp_nav_icon_url = PORTAL_URL . TEMPLATE_ROOT_PATH . 'images/'; $template->assign_vars(array( 'U_PHPBB_ROOT_PATH' => PHPBB_URL, 'TEMPLATE_ROOT_PATH' => TEMPLATE_ROOT_PATH, + "U_PORTAL_INDEX" => append_sid(PORTAL_URL . "index.$phpEx"), + "L_PORTAL_INDEX" => $lang['Portal_index'], + "L_PREVIEW_PORTAL" => $lang['Preview_portal'], ! "U_FORUM_INDEX" => append_sid(PHPBB_URL . "index.$phpEx"), "U_ADMIN_INDEX" => append_sid("index.$phpEx?pane=right"), ! //+MOD: DHTML Menu for ACP ! 'COOKIE_NAME' => $board_config['cookie_name'], ! 'COOKIE_PATH' => $board_config['cookie_path'], ! 'COOKIE_DOMAIN' => $board_config['cookie_domain'], ! 'COOKIE_SECURE' => $board_config['cookie_secure'], ! 'IMG_URL_CONTRACT' => $admincp_nav_icon_url . 'contract.gif', ! 'IMG_URL_EXPAND' => $admincp_nav_icon_url . 'expand.gif', ! //-MOD: DHTML Menu for ACP "L_FORUM_INDEX" => $lang['Main_index'], "L_ADMIN_INDEX" => $lang['Admin_Index'], ! "L_PREVIEW_FORUM" => $lang['Preview_forum']) ); *************** *** 110,128 **** // ! $module_portal = read_admin( "."); ksort($module_portal); ! $template->assign_block_vars('module_portal', array( ! "L_MX_PORTAL" => $lang['MX_Portal'] ! ) ! ); ! while( list($cat, $action_array) = each($module_portal) ) { $cat = ( !empty($lang[$cat]) ) ? $lang[$cat] : preg_replace("/_/", " ", $cat); ! $template->assign_block_vars("module_portal.catrow", array( ! "ADMIN_CATEGORY" => $cat) ); --- 118,144 ---- // ! // MX Addon ------------------------------------ ! $module_portal = read_admin('.'); ! $template->assign_block_vars('module_portal', array( ! 'L_MX_PORTAL' => $lang['MX_Portal'] ! )); ! // END ------------------------------------------ ksort($module_portal); ! //+MOD: DHTML Menu for ACP ! $menu_cat_id = 0; ! //-MOD: DHTML Menu for ACP ! while( list($cat, $action_array) = each($module_portal) ) { $cat = ( !empty($lang[$cat]) ) ? $lang[$cat] : preg_replace("/_/", " ", $cat); ! $template->assign_block_vars('module_portal.catrow', array( ! //+MOD: DHTML Menu for ACP ! 'MENU_CAT_ID' => $menu_cat_id, ! 'MENU_CAT_ROWS' => count($action_array), ! //-MOD: DHTML Menu for ACP ! 'ADMIN_CATEGORY' => $cat) ); *************** *** 130,172 **** $row_count = 0; - while( list($action, $file) = each($action_array) ) { $row_color = ( !($row_count%2) ) ? $theme['td_color1'] : $theme['td_color2']; $row_class = ( !($row_count%2) ) ? $theme['td_class1'] : $theme['td_class2']; - $action = ( !empty($lang[$action]) ) ? $lang[$action] : preg_replace("/_/", " ", $action); ! $template->assign_block_vars("module_portal.catrow.modulerow", array( ! "ROW_COLOR" => "#" . $row_color, ! "ROW_CLASS" => $row_class, ! "ADMIN_MODULE" => $action, ! "U_ADMIN_MODULE" => append_sid( PORTAL_URL . $file)) ! ); $row_count++; } } ! ! ! // // Include PHPBB Administration ! // ! ! $module_phpbb = array_merge( $module, read_admin( $phpbb_root_path . "admin/" )); ksort($module_phpbb); ! $template->assign_block_vars('module_phpbb', array( ! "L_PHPBB" => $lang['Phpbb'] ! ) ! ); ! while( list($cat, $action_array) = each($module_phpbb) ) { $cat = ( !empty($lang[$cat]) ) ? $lang[$cat] : preg_replace("/_/", " ", $cat); ! $template->assign_block_vars("module_phpbb.catrow", array( ! "ADMIN_CATEGORY" => $cat) ); --- 146,196 ---- $row_count = 0; while( list($action, $file) = each($action_array) ) { $row_color = ( !($row_count%2) ) ? $theme['td_color1'] : $theme['td_color2']; $row_class = ( !($row_count%2) ) ? $theme['td_class1'] : $theme['td_class2']; ! $action = ( !empty($lang[$action]) ) ? $lang[$action] : preg_replace("/_/", " ", $action); + $template->assign_block_vars('module_portal.catrow.modulerow', array( + "ROW_COLOR" => "#" . $row_color, + "ROW_CLASS" => $row_class, + //+MOD: DHTML Menu for ACP + 'ROW_COUNT' => $row_count, + //-MOD: DHTML Menu for ACP + "ADMIN_MODULE" => $action, + "U_ADMIN_MODULE" => append_sid(PORTAL_URL . $file) + )); $row_count++; } + //+MOD: DHTML Menu for ACP + $menu_cat_id++; + //-MOD: DHTML Menu for ACP } ! // MX ADDON // Include PHPBB Administration ! // ------------------------------------------------------------------------------- ! $module_phpbb = read_admin($phpbb_root_path . 'admin/'); ! $template->assign_block_vars('module_phpbb', array( ! 'L_PHPBB' => $lang['Phpbb'] ! )); ksort($module_phpbb); ! //+MOD: DHTML Menu for ACP ! $menu_cat_id = 0; ! //-MOD: DHTML Menu for ACP ! while( list($cat, $action_array) = each($module_phpbb) ) { $cat = ( !empty($lang[$cat]) ) ? $lang[$cat] : preg_replace("/_/", " ", $cat); ! $template->assign_block_vars('module_phpbb.catrow', array( ! //+MOD: DHTML Menu for ACP ! 'MENU_CAT_ID' => $menu_cat_id, ! 'MENU_CAT_ROWS' => count($action_array), ! //-MOD: DHTML Menu for ACP ! 'ADMIN_CATEGORY' => $cat) ); *************** *** 174,232 **** $row_count = 0; - while( list($action, $file) = each($action_array) ) { $row_color = ( !($row_count%2) ) ? $theme['td_color1'] : $theme['td_color2']; $row_class = ( !($row_count%2) ) ? $theme['td_class1'] : $theme['td_class2']; - $action = ( !empty($lang[$action]) ) ? $lang[$action] : preg_replace("/_/", " ", $action); ! $template->assign_block_vars("module_phpbb.catrow.modulerow", array( ! "ROW_COLOR" => "#" . $row_color, ! "ROW_CLASS" => $row_class, ! "ADMIN_MODULE" => $action, ! "U_ADMIN_MODULE" => append_sid( PHPBB_URL . 'admin/' . $file)) ! ); $row_count++; } } // // Read Portal Module Configuration // ! $sql = "SELECT * ! FROM " . MODULE_TABLE . " ! WHERE module_include_admin = 1 ! ORDER BY module_name"; ! ! if(!$q_modules = $db->sql_query($sql)) ! { ! message_die(GENERAL_ERROR, "Could not query modules information", "", __LINE__, __FILE__, $sql); ! } ! ! if( $total_modules = $db->sql_numrows($q_modules) ) ! { ! $module_rows = $db->sql_fetchrowset($q_modules); ! } ! $module_mx = array(); ! for($module_cnt = 0; $module_cnt < $total_modules; $module_cnt++) ! { ! $module_path_admin = $mx_root_path . $module_rows[$module_cnt]['module_path'] . "admin/"; ! $module_mx = array_merge_recursive( $module_mx, read_admin( $module_path_admin ) ); ! } // for ... modules ! ksort($module_mx); $template->assign_block_vars('module_mx', array( ! "L_MX_MODULES" => $lang['MX_Modules'] ! ) ); while( list($cat, $action_array) = each($module_mx) ) { $cat = ( !empty($lang[$cat]) ) ? $lang[$cat] : preg_replace("/_/", " ", $cat); ! $template->assign_block_vars("module_mx.catrow", array( ! "ADMIN_CATEGORY" => $cat) ); --- 198,268 ---- $row_count = 0; while( list($action, $file) = each($action_array) ) { $row_color = ( !($row_count%2) ) ? $theme['td_color1'] : $theme['td_color2']; $row_class = ( !($row_count%2) ) ? $theme['td_class1'] : $theme['td_class2']; ! $action = ( !empty($lang[$action]) ) ? $lang[$action] : preg_replace("/_/", " ", $action); + $template->assign_block_vars('module_phpbb.catrow.modulerow', array( + "ROW_COLOR" => "#" . $row_color, + "ROW_CLASS" => $row_class, + //+MOD: DHTML Menu for ACP + 'ROW_COUNT' => $row_count, + //-MOD: DHTML Menu for ACP + "ADMIN_MODULE" => $action, + "U_ADMIN_MODULE" => append_sid(PHPBB_URL . 'admin/' . $file)) + ); $row_count++; } + //+MOD: DHTML Menu for ACP + $menu_cat_id++; + //-MOD: DHTML Menu for ACP } + // // Read Portal Module Configuration // ! $sql = "SELECT * ! FROM " . MODULE_TABLE . " ! WHERE module_include_admin = 1 ! ORDER BY module_name"; ! if( !($q_modules = $db->sql_query($sql)) ) ! { ! mx_message_die(GENERAL_ERROR, "Could not query modules information", '', __LINE__, __FILE__, $sql); ! } ! if( $total_modules = $db->sql_numrows($q_modules) ) ! { ! $module_rows = $db->sql_fetchrowset($q_modules); ! } + $module_mx = array(); + for( $module_cnt = 0; $module_cnt < $total_modules; $module_cnt++ ) + { + $module_path_admin = $mx_root_path . $module_rows[$module_cnt]['module_path'] . "admin/"; + $module_mx = array_merge_recursive($module_mx, read_admin($module_path_admin)); + } $template->assign_block_vars('module_mx', array( ! 'L_MX_MODULES' => $lang['MX_Modules']) ); + ksort($module_mx); + + //+MOD: DHTML Menu for ACP + $menu_cat_id = 0; + //-MOD: DHTML Menu for ACP + while( list($cat, $action_array) = each($module_mx) ) { $cat = ( !empty($lang[$cat]) ) ? $lang[$cat] : preg_replace("/_/", " ", $cat); ! $template->assign_block_vars('module_mx.catrow', array( ! //+MOD: DHTML Menu for ACP ! 'MENU_CAT_ID' => $menu_cat_id, ! 'MENU_CAT_ROWS' => count($action_array), ! //-MOD: DHTML Menu for ACP ! 'ADMIN_CATEGORY' => $cat) ); *************** *** 234,256 **** $row_count = 0; - while( list($action, $file) = each($action_array) ) { $row_color = ( !($row_count%2) ) ? $theme['td_color1'] : $theme['td_color2']; $row_class = ( !($row_count%2) ) ? $theme['td_class1'] : $theme['td_class2']; $action = ( !empty($lang[$action]) ) ? $lang[$action] : preg_replace("/_/", " ", $action); ! $template->assign_block_vars("module_mx.catrow.modulerow", array( ! "ROW_COLOR" => "#" . $row_color, ! "ROW_CLASS" => $row_class, ! "ADMIN_MODULE" => $action, ! "U_ADMIN_MODULE" => append_sid( PORTAL_URL . $file)) ! ); $row_count++; } } ! ! $template->pparse("body"); include('./page_footer_admin.'.$phpEx); --- 270,300 ---- $row_count = 0; while( list($action, $file) = each($action_array) ) { $row_color = ( !($row_count%2) ) ? $theme['td_color1'] : $theme['td_color2']; $row_class = ( !($row_count%2) ) ? $theme['td_class1'] : $theme['td_class2']; + $action = ( !empty($lang[$action]) ) ? $lang[$action] : preg_replace("/_/", " ", $action); ! $template->assign_block_vars('module_mx.catrow.modulerow', array( ! "ROW_COLOR" => "#" . $row_color, ! "ROW_CLASS" => $row_class, ! //+MOD: DHTML Menu for ACP ! 'ROW_COUNT' => $row_count, ! //-MOD: DHTML Menu for ACP + "ADMIN_MODULE" => $action, + "U_ADMIN_MODULE" => append_sid(PORTAL_URL . $file)) + ); $row_count++; } + //+MOD: DHTML Menu for ACP + $menu_cat_id++; + //-MOD: DHTML Menu for ACP } ! // ----------------------------------------------------------------------------------- ! // END MX ADDON ! // ----------------------------------------------------------------------------------- ! $template->pparse('body'); include('./page_footer_admin.'.$phpEx); *************** *** 266,277 **** $template->assign_vars(array( ! ! 'U_PHPBB_ROOT_PATH' => PHPBB_URL, ! 'TEMPLATE_ROOT_PATH' => TEMPLATE_ROOT_PATH, ! "L_WELCOME" => $lang['Welcome_phpBB'], "L_ADMIN_INTRO" => $lang['Admin_intro'], "L_FORUM_STATS" => $lang['Forum_stats'], "L_WHO_IS_ONLINE" => $lang['Who_is_Online'], "L_LOCATION" => $lang['Location'], "L_LAST_UPDATE" => $lang['Last_updated'], --- 310,322 ---- $template->assign_vars(array( ! // MX Addon ! 'U_PHPBB_ROOT_PATH' => PHPBB_URL, ! 'TEMPLATE_ROOT_PATH' => TEMPLATE_ROOT_PATH, ! // END "L_WELCOME" => $lang['Welcome_phpBB'], "L_ADMIN_INTRO" => $lang['Admin_intro'], "L_FORUM_STATS" => $lang['Forum_stats'], "L_WHO_IS_ONLINE" => $lang['Who_is_Online'], + "L_USERNAME" => $lang['Username'], "L_LOCATION" => $lang['Location'], "L_LAST_UPDATE" => $lang['Last_updated'], *************** *** 310,314 **** $avatar_dir_size = 0; ! if ($avatar_dir = @opendir($phpbb_root_path . $board_config['avatar_path'])) { while( $file = @readdir($avatar_dir) ) --- 355,359 ---- $avatar_dir_size = 0; ! if ($avatar_dir = @opendir($phpbb_root_path . $board_config['avatar_path']) ) { while( $file = @readdir($avatar_dir) ) *************** *** 341,345 **** } else ! { // Couldn't open Avatar dir. $avatar_dir_size = $lang['Not_available']; --- 386,390 ---- } else ! { // Couldn't open Avatar dir. $avatar_dir_size = $lang['Not_available']; *************** *** 473,485 **** AND u.user_id = s.session_user_id AND u.user_id <> " . ANONYMOUS . " ! AND u.user_session_time >= " . ( time() - 300 ) . " ORDER BY u.user_session_time DESC"; if(!$result = $db->sql_query($sql)) { ! message_die(GENERAL_ERROR, "Couldn't obtain regd user/online information.", "", __LINE__, __FILE__, $sql); } $onlinerow_reg = $db->sql_fetchrowset($result); ! $sql = "SELECT session_page, session_logged_in, session_time, session_ip, session_start FROM " . SESSIONS_TABLE . " WHERE session_logged_in = 0 --- 518,530 ---- AND u.user_id = s.session_user_id AND u.user_id <> " . ANONYMOUS . " ! AND s.session_time >= " . ( time() - 300 ) . " ORDER BY u.user_session_time DESC"; if(!$result = $db->sql_query($sql)) { ! mx_message_die(GENERAL_ERROR, "Couldn't obtain regd user/online information.", "", __LINE__, __FILE__, $sql); } $onlinerow_reg = $db->sql_fetchrowset($result); ! $sql = "SELECT session_page, session_logged_in, session_time, session_ip, session_start FROM " . SESSIONS_TABLE . " WHERE session_logged_in = 0 *************** *** 488,492 **** if(!$result = $db->sql_query($sql)) { ! message_die(GENERAL_ERROR, "Couldn't obtain guest user/online information.", "", __LINE__, __FILE__, $sql); } $onlinerow_guest = $db->sql_fetchrowset($result); --- 533,537 ---- if(!$result = $db->sql_query($sql)) { ! mx_message_die(GENERAL_ERROR, "Couldn't obtain guest user/online information.", "", __LINE__, __FILE__, $sql); } $onlinerow_guest = $db->sql_fetchrowset($result); *************** *** 503,507 **** else { ! message_die(GENERAL_ERROR, "Couldn't obtain user/online forums information.", "", __LINE__, __FILE__, $sql); } --- 548,552 ---- else { ! mx_message_die(GENERAL_ERROR, "Couldn't obtain user/online forums information.", "", __LINE__, __FILE__, $sql); } *************** *** 572,575 **** --- 617,628 ---- break; default: + //+MOD: ViewOnline extension for mxBB Portal Pages + $mx_viewonline_info = mx_get_viewonline_info($onlinerow_reg[$i]['user_session_page']); + if( $mx_viewonline_info !== false ) + { + list($location, $location_url) = $mx_viewonline_info; + break; + } + //-MOD: ViewOnline extension for mxBB Portal Pages $location = $lang['Forum_index']; $location_url = "index.$phpEx?pane=right"; *************** *** 578,582 **** else { ! $location_url = append_sid("admin_forums.$phpEx?mode=editforum&" . POST_FORUM_URL . "=" . $onlinerow_reg[$i]['user_session_page']); $location = $forum_data[$onlinerow_reg[$i]['user_session_page']]; } --- 631,635 ---- else { ! $location_url = append_sid(PHPBB_URL . "admin_forums.$phpEx?mode=editforum&" . POST_FORUM_URL . "=" . $onlinerow_reg[$i]['user_session_page']); $location = $forum_data[$onlinerow_reg[$i]['user_session_page']]; } *************** *** 596,601 **** "IP_ADDRESS" => $reg_ip, ! "U_WHOIS_IP" => "http://www.samspade.org/t/ipwhois?a=$reg_ip", ! "U_USER_PROFILE" => append_sid("admin_users.$phpEx?mode=edit&" . POST_USERS_URL . "=" . $onlinerow_reg[$i]['user_id']), "U_FORUM_LOCATION" => append_sid($location_url)) ); --- 649,654 ---- "IP_ADDRESS" => $reg_ip, ! "U_WHOIS_IP" => "http://network-tools.com/default.asp?host=$reg_ip", ! "U_USER_PROFILE" => append_sid(PHPBB_URL . "admin_users.$phpEx?mode=edit&" . POST_USERS_URL . "=" . $onlinerow_reg[$i]['user_id']), "U_FORUM_LOCATION" => append_sid($location_url)) ); *************** *** 609,613 **** "L_NO_REGISTERED_USERS_BROWSING" => $lang['No_users_browsing']) ); ! } // --- 662,666 ---- "L_NO_REGISTERED_USERS_BROWSING" => $lang['No_users_browsing']) ); ! } // *************** *** 621,625 **** { $guest_userip_ary[] = $onlinerow_guest[$i]['session_ip']; ! $guest_users++; if( $onlinerow_guest[$i]['session_page'] < 1 ) --- 674,678 ---- { $guest_userip_ary[] = $onlinerow_guest[$i]['session_ip']; ! $guest_users++; if( $onlinerow_guest[$i]['session_page'] < 1 ) *************** *** 664,667 **** --- 717,728 ---- break; default: + //+MOD: ViewOnline extension for mxBB Portal Pages + $mx_viewonline_info = mx_get_viewonline_info($onlinerow_guest[$i]['session_page']); + if( $mx_viewonline_info !== false ) + { + list($location, $location_url) = $mx_viewonline_info; + break; + } + //-MOD: ViewOnline extension for mxBB Portal Pages $location = $lang['Forum_index']; $location_url = "index.$phpEx?pane=right"; *************** *** 670,674 **** else { ! $location_url = append_sid("admin_forums.$phpEx?mode=editforum&" . POST_FORUM_URL . "=" . $onlinerow_guest[$i]['session_page']); $location = $forum_data[$onlinerow_guest[$i]['session_page']]; } --- 731,735 ---- else { ! $location_url = append_sid(PHPBB_URL . "admin_forums.$phpEx?mode=editforum&" . POST_FORUM_URL . "=" . $onlinerow_guest[$i]['session_page']); $location = $forum_data[$onlinerow_guest[$i]['session_page']]; } *************** *** 688,692 **** "IP_ADDRESS" => $guest_ip, ! "U_WHOIS_IP" => "http://www.samspade.org/t/ipwhois?a=$guest_ip", "U_FORUM_LOCATION" => append_sid($location_url)) ); --- 749,753 ---- "IP_ADDRESS" => $guest_ip, ! "U_WHOIS_IP" => "http://network-tools.com/default.asp?host=$guest_ip", "U_FORUM_LOCATION" => append_sid($location_url)) ); *************** *** 700,704 **** --- 761,833 ---- ); } + + // Check for new phpBB version + $current_phpbb_version = explode('.', '2' . $board_config['version']); + $minor_phpbb_revision = (int) $current_phpbb_version[2]; + + $errno = 0; + $errstr = $phpbb_version_info = ''; + + if ($fsock = @fsockopen('www.phpbb.com', 80, $errno, $errstr)) + { + @fputs($fsock, "GET /updatecheck/20x.txt HTTP/1.1\r\n"); + @fputs($fsock, "HOST: www.phpbb.com\r\n"); + @fputs($fsock, "Connection: close\r\n\r\n"); + + $get_info = false; + while (!@feof($fsock)) + { + if ($get_info) + { + $phpbb_version_info .= @fread($fsock, 1024); + } + else + { + if (@fgets($fsock, 1024) == "\r\n") + { + $get_info = true; + } + } + } + @fclose($fsock); + + $phpbb_version_info = explode("\n", $phpbb_version_info); + $latest_phpbb_head_revision = (int) $phpbb_version_info[0]; + $latest_phpbb_minor_revision = (int) $phpbb_version_info[2]; + $latest_phpbb_version = (int) $phpbb_version_info[0] . '.' . (int) $phpbb_version_info[1] . '.' . (int) $phpbb_version_info[2]; + + if ($latest_phpbb_head_revision == 2 && $minor_phpbb_revision == $latest_phpbb_minor_revision) + { + $phpbb_version_info = '<p style="color:green">' . $lang['Version_up_to_date'] . '</p>'; + } + else + { + $phpbb_version_info = '<p style="color:red">' . $lang['Version_not_up_to_date']; + $phpbb_version_info .= '<br />' . sprintf($lang['Latest_version_info'], $phpbb_latest_version) . sprintf($lang['Current_version_info'], '2' . $board_config['version']) . '</p>'; + } + } + else + { + if ($errstr) + { + $phpbb_version_info = '<p style="color:red">' . sprintf($lang['Connect_socket_error'], $errstr) . '</p>'; + } + else + { + $phpbb_version_info = '<p>' . $lang['Socket_functions_disabled'] . '</p>'; + } + } + + $phpbb_version_info .= '<p>' . $lang['Mailing_list_subscribe_reminder'] . '</p>'; + + // done with the phpBB version check for now + + $template->assign_vars(array( + 'PHPBB_VERSION_INFO' => $phpbb_version_info, + 'L_VERSION_INFORMATION' => $lang['Version_information']) + ); + + $template->pparse("body"); *************** *** 707,711 **** } else ! { // // Generate frameset --- 836,840 ---- } else ! { // // Generate frameset *************** *** 717,721 **** $template->assign_vars(array( "S_FRAME_NAV" => append_sid("index.$phpEx?pane=left"), ! "S_FRAME_MAIN" => append_sid("index.$phpEx?pane=right")) ); --- 846,850 ---- $template->assign_vars(array( "S_FRAME_NAV" => append_sid("index.$phpEx?pane=left"), ! "S_FRAME_MAIN" => append_sid("index.$phpEx?pane=right")) ); --- NEW FILE: admin_mx_module_cp.php --- <?php /** ------------------------------------------------------------------------ * Subject : mxBB - a fully modular portal and CMS (for phpBB) * Author : Jon Ohlsson and the mxBB Team * Credits : The phpBB Group & Marc Morisette * Copyright : (C) 2002-2005 mxBB Portal * Email : jo...@mx... * Project site : www.mxbb-portal.com * ------------------------------------------------------------------------- * * $Id: admin_mx_module_cp.php,v 1.1 2005/12/05 22:25:12 jonohlsson Exp $ */ /** * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. */ if( !empty($setmodules) ) { $file = basename(__FILE__); $module['2_CP']['2_1_Modules'] = 'admin/' . $file; return; } // // Security and Page header // define('IN_PORTAL', 1); $mx_root_path = './../'; require($mx_root_path . 'extension.inc'); $no_page_header = TRUE; require('./pagestart.' . $phpEx); // // Instatiate the mx_cache class // $mx_admin = new mx_admin(); // // Pak file delimiter // $delimeter = '=+:'; // // Mode & Action setting // $mode = $mx_request_vars->request('mode', MX_TYPE_NO_TAGS, ''); $action = $mx_request_vars->request('action', MX_TYPE_NO_TAGS, ''); // Main module id, to load the adminCP blocks and parameter data $nav_module_id = $mx_request_vars->request('module_id', MX_TYPE_INT, ''); if ( empty($nav_module_id) ) { $cookie_tmp = $board_config['cookie_name'].'_adminModule_module_id'; $nav_module_id = !empty($HTTP_COOKIE_VARS[$cookie_tmp]) ? $HTTP_COOKIE_VARS[$cookie_tmp] : ''; } // Load states $cookie_tmp = $board_config['cookie_name'].'_admincp_blockstates'; $cookie_states = !empty($HTTP_COOKIE_VARS[$cookie_tmp]) ? explode(",", $HTTP_COOKIE_VARS[$cookie_tmp]) : array(); $this_module_path = $mx_request_vars->request('this_module_path', MX_TYPE_NO_TAGS, ''); if( !empty($mode) && !empty($action) ) { // // Get vars // $portalpage = $mx_request_vars->request('portalpage', MX_TYPE_INT, 1); $id = $mx_request_vars->request('id', MX_TYPE_INT, ''); // // Send to adminCP // $result_message = $mx_admin->do_it($mode, $action, $id); // // If new page, load new page settings panel // $is_pak = false; if (is_array($result_message)) { $nav_module_id = $result_message['new_module_id']; $is_pak = !empty($result_message['is_pak']); $result_message = $result_message['text']; } $result_message = $lang['AdminCP_status'] . '<hr>' . $result_message; } // if .. !empty($mode) // -------------------------------------------------------------------------------------------------------------------- // -------------------------------------------------------------------------------------------------------------------- // -------------------------------------------------------------------------------------------------------------------- // // Start page proper // $template->set_filenames(array( 'body' => 'admin/mx_modulecp_admin_body.tpl') ); // // Define some graphics // $module_nav_icon_url = PORTAL_URL . TEMPLATE_ROOT_PATH . 'images/admin_icons/'; $admin_icon['contract'] = $module_nav_icon_url . 'contract.gif'; $admin_icon['expand'] = $module_nav_icon_url . 'expand.gif'; $admin_icon['module'] = $module_nav_icon_url . 'icon_module.gif'; // // Install module // $modules_list = $mx_admin->get_new_module_pak_files(); $modules_select_list = get_list_static('module_path', $modules_list, '', false); // // Hidden fields // $s_hidden_module_install_fields = '<input type="hidden" name="mode" value="' . MX_MODULE_TYPE . '" /> <input type="hidden" name="action" value="' . MX_DO_INSTALL . '" /> <input type="hidden" name="id" value="' . $module_id . '" /> <input type="hidden" name="sid" value="' . $userdata['session_id'] . '" />'; $result_message_height = $is_pak ? '300px' : '50px'; // // Hidden vars // $s_hidden_fields_module = '<input type="hidden" name="mode" value="add" /><input type="hidden" name="id" value="' . $module_id . '" />'; // // Send to template // $template->assign_vars(array( 'L_TITLE' => $lang['Module_admin'], 'L_EXPLAIN' => $lang['Module_admin_explain'], 'NAV_MODULE_ID' => $nav_module_id, 'RESULT_MESSAGE' => !empty($result_message) ? '<div style="overflow:auto; height:'.$result_message_height.'"><span class="gensmall">' . $result_message . '<br/> -::-</span></div>': '', // // General // 'L_ACTION' => $lang['Action'], 'L_DELETE' => $lang['Delete'], 'L_UNINSTALL' => $lang['Uninstall_module'], 'L_EDIT' => $lang['Edit'], 'L_SETTING' => $lang['Settings'], 'L_ADD' => $lang['Create_module'], // // Module // 'L_CODE' => $lang['Code'], 'L_MODULE_NAME' => $lang['Module_name'], 'L_MODULE_DESC' => $lang['Module_desc'], 'L_MODULE_PATH' => $lang['Module_path'], 'L_MODULE_INCLUDE_ADMIN' => $lang['Module_include_admin'], 'L_IMPORT_PACK' => $lang['import_module_pack'], 'L_UPGRADE_PACK' => $lang['upgrade_module_pack'], 'L_EXPORT_PACK' => $lang['export_module_pack'], 'L_QUICK_NAV' => $lang['Quick_nav'], 'IMG_URL_CONTRACT' => $admin_icon['contract'], 'IMG_URL_EXPAND' => $admin_icon['expand'], 'IMG_ICON_MODULE' => $admin_icon['module'], 'S_HIDDEN_FIELDS_MODULE' => $s_hidden_fields_module, 'S_SUBMIT' => $lang['Update'], // // Module Install // 'S_MODULE_INSTALL_LIST' => $modules_select_list, 'S_HIDDEN_MODULE_INSTALL_FIELDS' => $s_hidden_module_install_fields, // // Cookies // 'COOKIE_NAME' => $board_config['cookie_name'], 'COOKIE_PATH' => $board_config['cookie_path'], 'COOKIE_DOMAIN' => $board_config['cookie_domain'], 'COOKIE_SECURE' => $board_config['cookie_secure'], 'S_ACTION' => append_sid("admin_mx_module_cp.$phpEx") )); // // ---------------------------------------------------------------------------------- Modules // // Display list of Modules --------------------------------------------------------------- // --------------------------------------------------------------------------------------- // // Get current/active module // $sql = "SELECT * FROM " . MODULE_TABLE . " WHERE module_id = '" . $nav_module_id . "' ORDER BY module_name ASC"; if( !($q_modules_current = $db->sql_query($sql)) ) { mx_message_die(GENERAL_ERROR, "Could not query modules information", "", __LINE__, __FILE__, $sql); } $module_rows_current = array(); if( $total_modules_current = $db->sql_numrows($q_modules_current) ) { $module_rows_current = $db->sql_fetchrowset($q_modules_current); } // // Get the rest modules // $sql = "SELECT * FROM " . MODULE_TABLE . " WHERE module_id <> '" . $nav_module_id . "' ORDER BY module_name ASC"; if( !($q_modules = $db->sql_query($sql)) ) { mx_message_die(GENERAL_ERROR, "Could not query modules information", "", __LINE__, __FILE__, $sql); } $module_rows = array(); if( $total_modules = $db->sql_numrows($q_modules) ) { $module_rows = $db->sql_fetchrowset($q_modules); } if ( $total_modules + $total_modules_current == 0 ) { $template->assign_block_vars('nomodule', array( 'NONE' => $lang['No_modules'] )); } $module_rows = array_merge($module_rows_current, $module_rows); $total_modules = $total_modules + $total_modules_current; // // Setup an additional var for the quick nav dropdown // $module_rows_select = array(); // // Loop through the rows of modules setting block vars for the template. // for( $module_count = -1; $module_count < $total_modules; $module_count++ ) { // // Give main vars specific names // $new_module = $module_count == -1; $newmode = $new_module ? 'add' : 'modify'; $module_id = $new_module ? '0' : $module_rows[$module_count]['module_id']; $mode = MX_MODULE_TYPE; $action = $new_module ? MX_DO_INSERT : MX_DO_UPDATE; $deletemode = '?mode=' . $mode . '&action=' . MX_DO_DELETE . '&id=' . $module_id . '&module_path=' . $module_rows[$module_count]['module_path']; $upgrademode = '?mode=' . $mode . '&action=' . MX_DO_UPGRADE . '&id=' . $module_id . '&module_path=' . $module_rows[$module_count]['module_path']; $exportmode = '?mode=' . $mode . '&action=' . MX_DO_EXPORT . '&id=' . $module_id; $settingmode = '?module_id=' . $module_id; // // Hidden fields // $s_hidden_module_fields = '<input type="hidden" name="mode" value="' . $mode . '" /> <input type="hidden" name="action" value="' . $action . '" /> <input type="hidden" name="id" value="' . $module_id . '" /> <input type="hidden" name="sid" value="' . $userdata['session_id'] . '" />'; $is_current_module = $module_id == $nav_module_id; if ($module_count > -1) { $module_rows_select[$module_id] = $module_rows[$module_count]['module_name']; } $check_opt = ''; if( $module_rows[$module_count]['module_include_admin'] == 1 ) { $check_opt = 'checked="checked"'; } //$pak_row = search_pak($module_rows[$module_count]['module_path']); //$pak_list = get_list_static('file_select', $pak_row, ''); $message_uninstall = $lang['Module_delete'] . '<br /><br />' . sprintf($lang['Click_module_delete_yes'], '<a href="' . append_sid("admin_mx_module_cp.$phpEx" . $deletemode) . '">', '</a>') . '<br /><br />'; $message_upgrade = $lang['upgrade_module_pack_explain'] . '<br /><br />' . sprintf($lang['Click_module_upgrade_yes'], '<a href="' . append_sid("admin_mx_module_cp.$phpEx" . $upgrademode) . '">', '</a>') . '<br /><br />'; $message_export = $lang['export_module_pack_explain'] . '<br /><br />' . sprintf($lang['Click_module_export_yes'], '<a href="' . append_sid("admin_mx_module_cp.$phpEx" . $exportmode) . '">', '</a>') . '<br /><br />'; // // Module subpanel - edit // $visible = in_array('adminModule_' . $module_id, $cookie_states); $visible_upgrade = in_array('adminModuleUpgrade_' . $module_id, $cookie_states); $visible_export = in_array('adminModuleExport_' . $module_id, $cookie_states); $visible_uninstall = in_array('adminModuleDelete_' . $module_id, $cookie_states); $template->assign_block_vars('module', array( 'L_TITLE' => $new_module ? $lang['Create_module'] : $lang['Edit_module'], 'L_MODULE' => $lang['Module'], 'VISIBLE' => $visible ? 'block' : 'none', 'VISIBLE_UPGRADE' => $visible_upgrade ? 'block' : 'none', 'VISIBLE_EXPORT' => $visible_export ? 'block' : 'none', 'VISIBLE_DELETE' => $visible_uninstall ? 'block' : 'none', 'IMG_URL' => $visible ? $module_nav_icon_url . 'contract.gif' : $module_nav_icon_url . 'expand.gif', 'IMG_URL_UPGRADE' => $visible_upgrade ? $module_nav_icon_url . 'contract.gif' : $module_nav_icon_url . 'expand.gif', 'IMG_URL_EXPORT' => $visible_export ? $module_nav_icon_url . 'contract.gif' : $module_nav_icon_url . 'expand.gif', 'IMG_URL_DELETE' => $visible_uninstall ? $module_nav_icon_url . 'contract.gif' : $module_nav_icon_url . 'expand.gif', 'U_MODULE' => append_sid("admin_mx_module_cp.$phpEx" . $settingmode), 'MODULE_ID' => $module_id, 'MODULE_TITLE' => $new_module ? $lang['Create_module'] : $module_rows[$module_count]['module_name'], 'MODULE_DESCRIPTION' => ( $module_rows[$module_count]['module_desc'] != '' ) ? ' - ' . $module_rows[$module_count]['module_desc'] : '', 'MODULE_VERSION' => ( $module_rows[$module_count]['module_version'] != '' ) ? '- ' . $module_rows[$module_count]['module_version'] : '', // Module subpanel - edit 'E_MODULE_NAME' => $module_rows[$module_count]['module_name'], 'E_MODULE_DESC' => $module_rows[$module_count]['module_desc'], 'E_MODULE_PATH' => $module_rows[$module_count]['module_path'], 'E_MODULE_INCLUDE_CHECK_OPT' => $check_opt, // Quick Panels 'MESSAGE_UPGRADE' => $message_upgrade, 'MESSAGE_EXPORT' => $message_export, 'MESSAGE_DELETE' => $message_uninstall, 'S_SUBMIT' => $new_module ? $lang['Create_module'] : $lang['Update'], 'S_HIDDEN_FIELDS' => $s_hidden_module_fields )); if (!$new_module) { $template->assign_block_vars('module.settings', array()); } } // // Create quick nav box // $module_select_box = get_list_static('module_id', $module_rows_select, $nav_module_id, false); $template->assign_vars(array( 'MODULE_SELECT_BOX' => $module_select_box )); // // Generate Module and Function Page // include_once('./page_header_admin.php'); $template->pparse('body'); include('./page_footer_admin.php'); ?> Index: admin_mx_block.php =================================================================== RCS file: /cvsroot/mxbb/core27x/admin/admin_mx_block.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** admin_mx_block.php 5 Dec 2005 19:25:26 -0000 1.2 --- admin_mx_block.php 5 Dec 2005 22:25:11 -0000 1.3 *************** *** 24,30 **** if( !empty($setmodules) ) { ! $file = basename(__FILE__); ! $module['Portal - Modules']['Block_admin'] = 'admin/' . $file; ! return; } --- 24,31 ---- if( !empty($setmodules) ) { ! $file = basename(__FILE__); ! $module['2_CP']['2_3_BlockCP'] = 'admin/' . $file; ! ! return; } Index: admin_mx_module.php =================================================================== RCS file: /cvsroot/mxbb/core27x/admin/admin_mx_module.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** admin_mx_module.php 5 Dec 2005 19:25:26 -0000 1.2 --- admin_mx_module.php 5 Dec 2005 22:25:11 -0000 1.3 *************** *** 14,18 **** if (!empty($setmodules)) { $file = basename(__FILE__); ! $module['Portal - Modules']['Module_admin'] = 'admin/' . $file; return; } --- 14,18 ---- if (!empty($setmodules)) { $file = basename(__FILE__); ! $module['2_CP']['2_2_FunctionCP'] = 'admin/' . $file; return; [...1616 lines suppressed...] { ! global $template, $lang, $db, $board_config, $theme, $HTTP_POST_VARS; ! $sql = "INSERT INTO " . PARAMETER_TABLE . "( function_id, parameter_name, parameter_type, parameter_default, parameter_function ) ! VALUES( " . intval($HTTP_POST_VARS['function_id']) . ", ! '" . str_replace("\'", "''", $HTTP_POST_VARS['parameter_name']) . "', ! '" . str_replace("\'", "''", $HTTP_POST_VARS['parameter_type']) . "', ! '" . str_replace("\'", "''", $HTTP_POST_VARS['parameter_default']) . "', ! '" . str_replace("\'", "''", $HTTP_POST_VARS['parameter_function']) . "' )"; ! if (!$result = $db -> sql_query($sql)) { ! mx_message_die(GENERAL_ERROR, "Couldn't insert parameter information", "", __LINE__, __FILE__, $sql); } + + $message = $lang['Module_Config_updated'] . "<br /><br />" . sprintf($lang['Click_return_module_admin'], "<a href=\"" . append_sid("admin_mx_module.php") . "\">", "</a>") . "<br /><br />" . sprintf($lang['Click_return_admin_index'], "<a href=\"" . append_sid("index.php?pane=right") . "\">", "</a>"); + mx_message_die(GENERAL_MESSAGE, $message); + } ?> \ No newline at end of file Index: admin_mx_page_setting.php =================================================================== RCS file: /cvsroot/mxbb/core27x/admin/admin_mx_page_setting.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** admin_mx_page_setting.php 5 Dec 2005 19:25:26 -0000 1.2 --- admin_mx_page_setting.php 5 Dec 2005 22:25:11 -0000 1.3 *************** *** 24,29 **** if( !empty($setmodules) ) { ! $file = basename(__FILE__); ! $module['Portal - General']['Page_Setting'] = 'admin/' . $file; return; } --- 24,30 ---- if( !empty($setmodules) ) { ! $file = basename(__FILE__); ! $module['2_CP']['2_5_PageCP_settings'] = 'admin/' . $file; ! return; } Index: page_header_admin.php =================================================================== RCS file: /cvsroot/mxbb/core27x/admin/page_header_admin.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** page_header_admin.php 5 Dec 2005 19:25:26 -0000 1.2 --- page_header_admin.php 5 Dec 2005 22:25:12 -0000 1.3 *************** *** 1,12 **** <?php /** ------------------------------------------------------------------------ ! * subject : mx-portal, CMS & portal ! * begin : june, 2002 ! * copyright : (C) 2002-2005 MX-System ! * email : jon...@ho... ! * project site : www.mx-system.com ! * ! * description : * ------------------------------------------------------------------------- * $Id$ */ --- 1,12 ---- <?php /** ------------------------------------------------------------------------ ! * Subject : mxBB - a fully modular portal and CMS (for phpBB) ! * Author : Jon Ohlsson and the mxBB Team ! * Credits : The phpBB Group & Marc Morisette ! * Copyright : (C) 2002-2005 mxBB Portal ! * Email : jo...@mx... ! * Project site : www.mxbb-portal.com * ------------------------------------------------------------------------- + * * $Id$ */ *************** *** 19,26 **** */ - // ================================================================================ - // The following code is based on admin/page_header_admin.php (phpBB 2.0.14) - // ================================================================================ - if ( !defined('IN_PORTAL') ) { --- 19,22 ---- Index: page_footer_admin.php =================================================================== RCS file: /cvsroot/mxbb/core27x/admin/page_footer_admin.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** page_footer_admin.php 5 Dec 2005 19:25:26 -0000 1.3 --- page_footer_admin.php 5 Dec 2005 22:25:12 -0000 1.4 *************** *** 1,12 **** <?php /** ------------------------------------------------------------------------ ! * subject : mx-portal, CMS & portal ! * begin : june, 2002 ! * copyright : (C) 2002-2005 MX-System ! * email : jon...@ho... ! * project site : www.mx-system.com ! * ! * description : * ------------------------------------------------------------------------- * $Id$ */ --- 1,12 ---- <?php /** ------------------------------------------------------------------------ ! * Subject : mxBB - a fully modular portal and CMS (for phpBB) ! * Author : Jon Ohlsson and the mxBB Team ! * Credits : The phpBB Group & Marc Morisette ! * Copyright : (C) 2002-2005 mxBB Portal ! * Email : jo...@mx... ! * Project site : www.mxbb-portal.com * ------------------------------------------------------------------------- + * * $Id$ */ *************** *** 19,26 **** */ - // ================================================================================ - // The following code is based on admin/page_footer_admin.php (phpBB 2.0.14) - // ================================================================================ - if ( !defined('IN_PHPBB') ) { --- 19,22 ---- *************** *** 28,33 **** } - global $do_gzip_compress; - // // Show the overall footer. --- 24,27 ---- *************** *** 47,52 **** $template->assign_vars(array( 'PHPBB_VERSION' => ($userdata['user_level'] == ADMIN && $userdata['user_id'] != ANONYMOUS) ? '2' . $board_config['version'] : '', ! 'MX_VERSION' => ($userdata['user_level'] == ADMIN && $userdata['user_id'] != ANONYMOUS) ? $portal_config['portal_version'] : '', ! 'TRANSLATION_INFO' => (isset($lang['TRANSLATION_INFO'])) ? $lang['TRANSLATION_INFO'] : ((isset($lang['TRANSLATION'])) ? $lang['TRANSLATION'] : ''), 'EXECUTION_STATS' => $execution_stats) ); --- 41,46 ---- $template->assign_vars(array( 'PHPBB_VERSION' => ($userdata['user_level'] == ADMIN && $userdata['user_id'] != ANONYMOUS) ? '2' . $board_config['version'] : '', ! 'MX_VERSION' => ($userdata['user_level'] == ADMIN && $userdata['user_id'] != ANONYMOUS) ? PORTAL_VERSION : '', ! 'TRANSLATION_INFO' => isset($lang['TRANSLATION_INFO']) ? $lang['TRANSLATION_INFO'] : '', 'EXECUTION_STATS' => $execution_stats) ); Index: pagestart.php =================================================================== RCS file: /cvsroot/mxbb/core27x/admin/pagestart.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** pagestart.php 26 May 2005 21:54:08 -0000 1.2 --- pagestart.php 5 Dec 2005 22:25:12 -0000 1.3 *************** *** 1,25 **** <?php ! /*************************************************************************** ! * pagestart.php ! * ------------------- ! * begin : Thursday, Aug 2, 2001 ! * copyright : (C) 2001 The phpBB Group ! * email : su...@ph... ! * ! * $Id$ ! * ! * ! ***************************************************************************/ ! /*************************************************************************** ! * ! * This program is free software; you can redistribute it and/or modify ! * it under the terms of the GNU General Public License as published by ! * the Free Software Foundation; either version 2 of the License, or ! * (at your option) any later version. ! * ! ***************************************************************************/ ! if ( !defined('IN_PORTAL') ) { die("Hacking attempt"); --- 1,28 ---- <?php ! /** ------------------------------------------------------------------------ ! * Subject : mxBB - a fully modular portal and CMS (for phpBB) ! * Author : Jon Ohlsson and the mxBB Team ! * Credits : The phpBB Group & Marc Morisette ! * Copyright : (C) 2002-2005 mxBB Portal ! * Email : jo...@mx... ! * Project site : www.mxbb-portal.com ! * ------------------------------------------------------------------------- ! * ! * $Id$ ! */ ! /** ! * This program is free software; you can redistribute it and/or modify ! * it under the terms of the GNU General Public License as published by ! * the Free Software Foundation; either version 2 of the License, or ! * (at your option) any later version. ! */ ! /** ! * mxBB Notes: ! * The BLOCK_EDIT switch makes this file accessible when editing blocks in portal mode. ! */ ! ! if( !defined('IN_PORTAL') ) { die("Hacking attempt"); *************** *** 29,35 **** include_once($mx_root_path . 'extension.inc'); ! include_once($mx_root_path . 'common.'.$phpEx); ! include_once($phpbb_root_path . 'includes/functions_admin.'.$phpEx); ! include_once($phpbb_root_path . 'includes/functions_post.'.$phpEx); // --- 32,42 ---- include_once($mx_root_path . 'extension.inc'); ! include_once($mx_root_path . 'common.' . $phpEx); ! ! include_once($mx_root_path . 'includes/mx_functions_admincp.' . $phpEx); ! //include_once($mx_root_path . 'includes/mx_functions_blockcp.' . $phpEx); ! ! include_once($phpbb_root_path . 'includes/functions_admin.' . $phpEx); ! include_once($phpbb_root_path . 'includes/functions_post.' . $phpEx); // *************** *** 42,65 **** // ! if (!$userdata['session_logged_in']) { ! mx_redirect(append_sid("login.$phpEx?redirect=admin/", true)); } ! else if( $userdata['user_level'] != ADMIN ) { mx_message_die(GENERAL_MESSAGE, $lang['Not_admin']); } ! if ($HTTP_GET_VARS['sid'] != $userdata['session_id']) { ! //mx_redirect(PORTAL_URL . "admin/index.$phpEx?sid=" . $userdata['session_id']); mx_redirect("admin/index.$phpEx?sid=" . $userdata['session_id']); } ! if (empty($no_page_header)) { // Not including the pageheader can be neccesarry if META tags are // needed in the calling script. ! include($mx_root_path . 'admin/page_header_admin.'.$phpEx); } --- 49,82 ---- // ! if ( !$userdata['session_logged_in'] ) { ! mx_redirect(append_sid("login.php?redirect=admin/index.$phpEx", true)); } ! ! //if ( !($userdata['user_level'] == ADMIN || $block_edit_auth['auth_edit'] ) ) ! if ( !($userdata['user_level'] == ADMIN) ) { mx_message_die(GENERAL_MESSAGE, $lang['Not_admin']); } ! if( $HTTP_GET_VARS['sid'] != $userdata['session_id'] ) { ! //mx_redirect("index.$phpEx?sid=" . $userdata['session_id']); mx_redirect("admin/index.$phpEx?sid=" . $userdata['session_id']); } ! if (!$userdata['session_admin']) { + mx_redirect(append_sid("login.php?redirect=admin/index.$phpEx&admin=1", true)); + } + + + if( empty($no_page_header) ) + { + // // Not including the pageheader can be neccesarry if META tags are // needed in the calling script. ! // ! include($mx_root_path . 'admin/page_header_admin.' . $phpEx); } Index: admin_mx_portal.php =================================================================== RCS file: /cvsroot/mxbb/core27x/admin/admin_mx_portal.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** admin_mx_portal.php 5 Dec 2005 19:25:26 -0000 1.2 --- admin_mx_portal.php 5 Dec 2005 22:25:11 -0000 1.3 *************** *** 22,29 **** if( !empty($setmodules) ) { ! $filename = basename(__FILE__); ! $module['Portal - General']['Manage'] = 'admin/' . $filename; ! return; } --- 22,28 ---- if( !empty($setmodules) ) { ! $module['1_General_admin']['1_1_Management'] = 'admin/' . basename(__FILE__); ! return; } |