|
From: Jon O. <jon...@us...> - 2007-05-05 20:33:28
|
Update of /cvsroot/mxbb/mx_slides/slides/modules/tabs In directory sc8-pr-cvs16:/tmp/cvs-serv30431/slides/modules/tabs Added Files: .htaccess slides__tab-index.php Log Message: First commit --- NEW FILE: slides__tab-index.php --- <?php /** * * @package mxBB Portal Module - mx_kb * @version $Id: slides__tab-index.php,v 1.1 2007/05/05 20:33:24 jonohlsson Exp $ * @copyright (c) 2002-2006 [Jon Ohlsson, Mohd Basri, wGEric, PHP Arena, pafileDB, CRLin] mxBB Project Team * @license http://opensource.org/licenses/gpl-license.php GNU General Public License v2 * */ define( 'IN_PORTAL', 1 ); $mx_root_path = "./../../../../../"; $phpEx = substr(strrchr(__FILE__, '.'), 1); include($mx_root_path . 'common.' . $phpEx); define( 'MXBB_MODULE', true ); define( 'MXBB_27x', file_exists( $mx_root_path . 'mx_login.' . $phpEx ) ); $is_block = true; // // Page selector // $page_id = $mx_request_vars->request('page_id', MX_TYPE_INT, 0); // // Start session, user and style (template + theme) management // - populate $userdata, $lang, $theme, $images and initiate $template. // $mx_user->init($user_ip, - ( 1000 + $page_id )); // // Load and instatiate page and block classes // $mx_page = new mx_page(); $mx_page->init( $page_id ); $mx_block = new mx_block(); // // Block selector // $block_id = $mx_request_vars->request('block_id', MX_TYPE_INT, 0); $slides_block_id = $mx_request_vars->request('slides_block_id', MX_TYPE_INT, 0); // // Instatiate block // $mx_block->init( $block_id ); // // Page Auth and IP filter // if ( !$mx_page->auth_view && $userdata['session_logged_in'] ) { echo('Not authorized - 1'); return; } elseif ( !$mx_page->auth_view && !$userdata['session_logged_in'] ) { echo('Not authorized - 2'); return; } elseif ( !$mx_page->auth_ip ) { echo('Not authorized - 3'); return; } // // Page Auth and IP filter // if ( !( ( $mx_block->auth_view && $mx_block->show_block ) || $mx_block->auth_mod ) ) { echo('Not authorized - 4'); return; } // // Define $module_root_path, to be used within blocks // $module_root_path = $mx_root_path . $mx_block->module_root_path; // ------------------------------------------------------------------------------------------------------------------------- // ------------------------------------------------------------------------------------------------------------------------- // Start // ------------------------------------------------------------------------------------------------------------------------- // ------------------------------------------------------------------------------------------------------------------------- // =================================================== // Include the common file // =================================================== include_once( $module_root_path . 'slides/slides_common.' . $phpEx ); // =================================================== // Is admin? // =================================================== $is_admin = ( ( $userdata['user_level'] == ADMIN ) && $userdata['session_logged_in'] ) ? true : 0; // =================================================== // if the database disabled give them a nice message // =================================================== if ( intval( $slides_config['module_enable'] ) ) { mx_message_die( GENERAL_MESSAGE, $lang['slides_disable'] ); } $CONFIG['encoding'] = 'iso-8859-1'; // Date in the past header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // always modified header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); // HTTP/1.1 header("Cache-Control: no-store, no-cache, must-revalidate"); header("Cache-Control: post-check=0, pre-check=0", false); // HTTP/1.0 header("Pragma: no-cache"); header('Content-type: text/html; charset='.$CONFIG['encoding']); // // Here we go ;) // $mx_block = new mx_block(); $mx_block->init( $slides_block_id ); $module_root_path = $mx_root_path . $mx_block->module_root_path; $module_root_path = $mx_root_path . 'modules/mx_slides/'; // Hack to use custom textblock template files include($mx_root_path . $mx_block->module_root_path . $mx_block->block_file); ?> --- NEW FILE: .htaccess --- allow from all |