|
From: Jon O. <jon...@us...> - 2006-07-08 10:21:44
|
Update of /cvsroot/mxbb/mx_kb/admin In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv26309/modules/mx_kb/admin Added Files: admin_kb.php Log Message: making all admincp an object :-) --- NEW FILE: admin_kb.php --- <?php /** * * @package mxBB Portal Module - mx_kb * @version $Id: admin_kb.php,v 1.1 2006/07/08 10:21:36 jonohlsson Exp $ * @copyright (c) 2002-2006 [CRLin, Jon Ohlsson] mxBB Project Team * @license http://opensource.org/licenses/gpl-license.php GNU General Public License v2 * */ define( 'IN_PORTAL', true ); if ( file_exists( './../viewtopic.php' ) ) { define( 'IN_PHPBB', 1 ); define( 'MXBB_MODULE', false ); // // Main paths // $phpbb_root_path = $module_root_path = $mx_root_path = "./../"; // // Left Pane Paths // $setmodules_admin_path = ''; $setmodules_module_path = "./../"; require_once( $phpbb_root_path . 'extension.inc' ); } else { define( 'IN_PORTAL', 1 ); define( 'MXBB_MODULE', true ); // // Main paths // $mx_root_path = './../../../'; $module_root_path = './../../../modules/mx_kb/'; // // Left Pane Paths // $setmodules_module_path = './../modules/mx_kb/'; $setmodules_admin_path = $setmodules_module_path . 'admin/'; define( 'MXBB_27x', file_exists( $mx_root_path . 'mx_login.php' ) ); $phpEx = substr(strrchr(__FILE__, '.'), 1); } if ( !empty( $setmodules ) ) { include_once( $setmodules_module_path . 'kb/includes/kb_constants.' . $phpEx ); $filename = basename( __FILE__ ); $module['KB_title']['1_Configuration'] = $setmodules_admin_path . $filename . "?action=settings"; $module['KB_title']['2_Cat_man'] = $setmodules_admin_path . $filename . "?action=cat_manage"; $module['KB_title']['3_Art_man'] = $setmodules_admin_path . $filename . "?action=article_manage"; $module['KB_title']['4_Permissions'] = $setmodules_admin_path . $filename . "?action=auth_manage"; $module['KB_title']['5_Types_man'] = $setmodules_admin_path . $filename . "?action=types_manage"; $module['KB_title']['6_Custom_Field'] = $setmodules_admin_path . $filename . "?action=custom_manage"; return; } // // Includes // require( $mx_root_path . '/admin/pagestart.' . $phpEx ); include( $module_root_path . 'kb/kb_common.' . $phpEx ); // ********************************************************************** // Read language definition // ********************************************************************** if ( !file_exists( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_admin.' . $phpEx ) ) { include( $module_root_path . 'language/lang_english/lang_admin.' . $phpEx ); } else { include( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_admin.' . $phpEx ); } // // Get action variable other wise set it to the main // $action = ( isset( $_REQUEST['action'] ) ) ? htmlspecialchars( $_REQUEST['action'] ) : 'setting'; // // an array of all expected actions // $actions = array( 'settings' => 'settings', 'cat_manage' => 'cat_manage', 'article_manage' => 'article_manage', 'auth_manage' => 'auth_manage', 'types_manage' => 'types_manage', 'custom_manage' => 'custom_manage' ); // // Lets Build the page // $mx_kb->adminmodule( $actions[$action] ); $mx_kb->modules[$actions[$action]]->main( $action ); $mx_kb->modules[$actions[$action]]->_kb(); include_once( $mx_root_path . 'admin/page_footer_admin.' . $phpEx ); ?> |