|
From: OryNider <ory...@us...> - 2008-02-06 08:20:20
|
Update of /cvsroot/mxbb/core/admin In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv7291 Modified Files: index_new.php Log Message: upgrade Index: index_new.php =================================================================== RCS file: /cvsroot/mxbb/core/admin/index_new.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** index_new.php 4 Feb 2008 15:44:45 -0000 1.2 --- index_new.php 6 Feb 2008 08:20:11 -0000 1.3 *************** *** 1,12 **** <?php /** ! * ! * @package MX-Publisher Core ! * @version $Id$ ! * @copyright (c) 2002-2008 MX-Publisher Project Team ! * @license http://opensource.org/licenses/gpl-license.php GNU General Public License v2 ! * @link http://www.mx-publisher.com * @origin This file is borrowed from phpBB, with some modifications ! */ // Security and Page header --- 1,12 ---- <?php /** ! * ! * @package mxBB Portal Core ! * @version $Id$ ! * @copyright (c) 2002-2006 mxBB Project Team ! * @license http://opensource.org/licenses/gpl-license.php GNU General Public License v2 ! * @link http://www.mxbb.net * @origin This file is borrowed from phpBB, with some modifications ! */ // Security and Page header *************** *** 41,44 **** --- 41,48 ---- return false; } + function inarray_dec_( $needle, $haystack ) + { + return inarray( $needle, $haystack ); + } /** *************** *** 68,71 **** --- 72,77 ---- return $module; } + + // End functions // ------------- *************** *** 84,87 **** --- 90,94 ---- define( 'OLYMPUS_CATEGORY', 'phpbb3' ); + define('IN_ADMIN', true); if ( (empty( $_SID) || $_SID == 'sid=' ) ) *************** *** 96,101 **** if ( PORTAL_BACKEND == PHPBB2X_BACKEND) { ! mx_page::load_file( 'functions_selects', 'phpbb2'); } //mx_page::load_file( 'functions_'); class mx_acp --- 103,120 ---- if ( PORTAL_BACKEND == PHPBB2X_BACKEND) { ! //mx_page::load_file( 'functions', 'phpbb2'); ! //mx_page::load_file( 'functions_selects', 'phpbb2'); // LOAD phpbb2 file functions_selects for 2.9x ! //mx_page::load_file( 'functions_validate', 'phpbb2'); ! include_once( $phpbb_root_path . 'includes/functions_selects.' . $phpEx); // LOAD phpbb2 file functions_select for 2.8.0 ! include_once( $phpbb_root_path . 'includes/functions.php'); ! include_once( $phpbb_root_path . 'includes/functions_validate.php'); ! } ! if ( PORTAL_BACKEND == OLYMPUS_BACKEND) ! { ! mx_page::load_file( 'auth', 'phpbb3'); ! mx_page::load_file( 'functions_module', 'phpbb3'); ! $phpbb_admin_path = (defined('PHPBB_ADMIN_PATH')) ? PHPBB_ADMIN_PATH : 'adm/'; } + //mx_page::load_file( 'functions_'); class mx_acp *************** *** 142,146 **** } ! /* * Parsing params for display * @param string $params query string --- 161,165 ---- } ! /** * Parsing params for display * @param string $params query string *************** *** 175,179 **** } ! /* * get current tabs */ --- 194,198 ---- } ! /** * get current tabs */ *************** *** 184,188 **** $this->tabs = array(); $this->tabs[] = array( // # ! 'ACTIVE_TAB' => ( $this->category == MAIN_CATEGORY )?' id="activetab"':'', 'CATEGORY' => MAIN_CATEGORY, 'PARAMS' => '', --- 203,207 ---- $this->tabs = array(); $this->tabs[] = array( // # ! 'ACTIVE_TAB' => ( $this->category == MAIN_CATEGORY )?'activetab':'', 'CATEGORY' => MAIN_CATEGORY, 'PARAMS' => '', *************** *** 191,195 **** // MX PORTAL MODULE CATEGORY $this->tabs[] = array( // # ! 'ACTIVE_TAB' => ( $this->category == MODULE_CATEGORY )?' id="activetab"':'', 'CATEGORY' => MODULE_CATEGORY, 'PARAMS' => '', --- 210,214 ---- // MX PORTAL MODULE CATEGORY $this->tabs[] = array( // # ! 'ACTIVE_TAB' => ( $this->category == MODULE_CATEGORY )?'activetab':'', 'CATEGORY' => MODULE_CATEGORY, 'PARAMS' => '', *************** *** 201,205 **** case PHPBB2X_BACKEND: // phpBB2 Backend TABS $this->tabs[] = array( // # ! 'ACTIVE_TAB' => ( $this->category == PHPBB2X_CATEGORY )?' id="activetab"':'', 'CATEGORY' => PHPBB2X_CATEGORY, 'PARAMS' => '', --- 220,224 ---- case PHPBB2X_BACKEND: // phpBB2 Backend TABS $this->tabs[] = array( // # ! 'ACTIVE_TAB' => ( $this->category == PHPBB2X_CATEGORY )?'activetab':'', 'CATEGORY' => PHPBB2X_CATEGORY, 'PARAMS' => '', *************** *** 235,239 **** case MODULE_CATEGORY: case PHPBB2X_CATEGORY: - $cat_keys = array_keys( $menu_array); for( $i = 0; $i< count($menu_array); $i++) --- 254,257 ---- *************** *** 245,249 **** } - break; case OLYMPUS_CATEGORY: --- 263,266 ---- *************** *** 320,323 **** --- 337,341 ---- $menu_array = array_merge_recursive( $menu_array, read_admin( $module_path_admin ) ); } + $this->menu_complete[MODULE_CATEGORY] = $menu_array; $this->_read_menu_actions( $this->menu_complete[MODULE_CATEGORY], MODULE_CATEGORY); *************** *** 371,374 **** --- 389,398 ---- $allow_menu_sort = false; $menu_array = $this->phpbb3_hook->get_menu( $this->phpbb3_i ); + if ( empty( $this->panel)) + { + $menu_keys = array_keys( $menu_array); + $p_keys = array_keys($menu_array[$menu_keys[0]]); + $this->panel = $p_keys[0]; + } break; } *************** *** 405,408 **** --- 429,433 ---- while ( list( $panel, $file ) = each( $action_array ) ) { + $lang_menu = isset( $mx_user->lang[$panel] )?$mx_user->lang[$panel]:( !empty( $lang[$panel] ) ? $lang[$panel] : preg_replace( "/_/", " ", $panel ) ); $file_part = explode( '?', $file ); *************** *** 417,421 **** } ! $menu_link_params = str_replace( '?', '', '&cat=' . $this->category . '&panel=' . $panel . '&' . $file_part[1] ); $menu_link_params = explode( '&', $menu_link_params ); --- 442,456 ---- } ! switch( $this->category) ! { ! case OLYMPUS_CATEGORY: ! $menu_link_params = preg_replace( '#panel=[^&]*#', '&cat=' . $this->category . '&panel='.$panel, $file_part[1]); ! break; ! case PHPBB2X_CATEGORY: ! case MODULE_CATEGORY: ! case MAIN_CATEGORY: ! $menu_link_params = str_replace( '?', '', '&cat=' . $this->category . '&panel=' . $panel . '&' . $file_part[1] ); ! break; ! } $menu_link_params = explode( '&', $menu_link_params ); *************** *** 439,443 **** "L_PANEL" => $lang_menu, 'U_PANEL' => $menu_link, ! 'A_PANEL' => $this->panel == $panel?' id="activemenu"':'', ) ); $row_count++; --- 474,478 ---- "L_PANEL" => $lang_menu, 'U_PANEL' => $menu_link, ! 'A_PANEL' => $this->panel == $panel?'activemenu':'', ) ); $row_count++; *************** *** 447,450 **** --- 482,486 ---- // -MOD: DHTML Menufor ACP } + $this->menu_actions = array_merge( array($this->action_script => $this->menu_actions[$this->action_script]), $this->menu_actions); } *************** *** 453,460 **** if ( empty( $this->action_script ) ) { ! return ''; } ! global $mx_root_path, $phpbb_root_path; --- 489,496 ---- if ( empty( $this->action_script ) ) { ! mx_message_die( GENERAL_INFO, 'No action script to place in panel'); } ! global $mx_root_path, $phpbb_root_path, $phpEx; *************** *** 478,487 **** $preg_array = array( ! '#^<\?(php)?#' => '', ! '#\?>$#' => '', ! "#define\('IN_PORTAL', 1\);#si" => '', ! '#\$mx_root_path = [^;]*;#si' => '', ! '#([^_]{1})append_sid#si' => '\1mx_append_sid', ! '#([^_]{1})message_die#si' => '\1mx_message_die', '#\$phpEx = [^;]*;#' => '', '#(include|require)(_once)?.*(pagestart|footer|header)(_admin)?[^;]*;#' => '', --- 514,524 ---- $preg_array = array( ! '#^<\?(php)?#' => '', ! '#\?>$#' => '', ! "#define\('IN_PORTAL', 1\);#si" => '', ! '#\$mx_root_path = [^;]*;#si' => '', ! '#([^_]{1})append_sid#si' => '\1mx_append_sid', ! '#([^_]{1})mx_message_die#si' => '\1$mx_acp->mx_message_die_acp', ! '#([^_]{1})message_die#si' => '\1$mx_acp->mx_message_die_acp', '#\$phpEx = [^;]*;#' => '', '#(include|require)(_once)?.*(pagestart|footer|header)(_admin)?[^;]*;#' => '', *************** *** 491,524 **** '#->assign_vars\([^(]*\(#si' => '\0 ' . "'TEMPLATE_ROOT_PATH' => TEMPLATE_ROOT_PATH,'U_PORTAL_ROOT_PATH' => PORTAL_URL,", // '#if.*setmodules.*return[^\}]*\}#' => '', ! '#\$phpbb_root_path =[^;]*;#si' => '// \0 <= has been allready defined', '#require[^;]*;#si' => '// \0', ); ! if ( $this->category == PHPBB2X_CATEGORY) ! { ! $preg_array = array_merge( $preg_array, array( // # ! "#\n(@?(include|require)[^;]*;)#si" => "\n" . '// \1 <= has been allready defined', ! '#phpbb_realpath#si' => 'phpbb2::phpbb_realpath', ! //$preg_replace[] = "\n" . '\1'; ! )); ! $func_cnt = preg_match_all( "#\nfunction ([^(]*)\\(#si", $script, $func_match); ! for( $i = 0; $i<$func_cnt; $i++) { ! if ( function_exists( $func_match[1][$i])) ! { ! $preg_array = array_merge( $preg_array, array( // # ! "#\nfunction ".$func_match[1][$i]. '#si' => "\nfunction ".$func_match[1][$i].'_defined', ! )); ! } } - } - $script = preg_replace( array_keys($preg_array), array_values($preg_array), $script ); break; case OLYMPUS_BACKEND: ! $script = trim( file_get_contents( $phpbb_root_path . $this->action_script ) ); break; } // switch --- 528,566 ---- '#->assign_vars\([^(]*\(#si' => '\0 ' . "'TEMPLATE_ROOT_PATH' => TEMPLATE_ROOT_PATH,'U_PORTAL_ROOT_PATH' => PORTAL_URL,", // '#if.*setmodules.*return[^\}]*\}#' => '', ! '#\$phpbb_root_path =[^;]*;#si' => '// \0 //<= has been allready defined $phpbb_root_path', '#require[^;]*;#si' => '// \0', ); ! $preg_array = array_merge( $preg_array, array( // # ! "#([\n\t ](@?(include|require)\\(\\\$phpbb_root_path[^;]*;))#si" => '// \2 // <<== PHPBB2 INCLUDE', ! "#([\n\t ](@?(include|require)[^(lang)]*;))#si" => "\n" . '// \2 //<= has been allready defined INCLUDE', ! //$preg_replace[] = "\n" . '\1'; ! )); ! // PHPBB2 FUNCTIONS REPLACE ! $functions_ary = array( //# ! 'get_userdata', 'phpbb_clean_username', phpbb_realpath ! ); ! $preg_array = array_merge( $preg_array, array( // # ! '#(' . implode( '|', $functions_ary) . ')\(#si' => 'phpBB2::\1(', ! )); ! // ! // REPLACE FUNCTIONS that ARE ALLREADY DECLARED ! $func_cnt = preg_match_all( "#\nfunction ([^(]*)\\(#si", $script, $func_match); ! for( $i = 0; $i<$func_cnt; $i++) ! { ! if ( function_exists( $func_match[1][$i])) { ! $preg_array = array_merge( $preg_array, array( // # ! "#".$func_match[1][$i]. '([^)]*?\()#si' => "".$func_match[1][$i].'_dec_\1', ! )); } } $script = preg_replace( array_keys($preg_array), array_values($preg_array), $script ); + $script = str_replace( 'phpBB2::phpBB2::', 'PHPBB2::', $script); break; case OLYMPUS_BACKEND: ! $script = $this->phpbb3_hook->prepare_action_script( $this->panel); break; } // switch *************** *** 528,535 **** function display() { - // print_r( $this->template->files);die(); $this->_template_assign_vars(); $this->template->pparse( 'adm_header' ); - // $this->template->assign_var( 'CONTENT_ACP', $this->panel_html ); $this->template->pparse( 'adm_body' ); $this->template->pparse( 'adm_footer' ); --- 570,575 ---- *************** *** 544,547 **** --- 584,628 ---- } + function _convert_links( &$text, $match_links = array()) + { + global $phpEx, $mx_root_path; + $match_count = count( $match_links['LINK']); + $values = array_keys( $this->menu_actions); + $values_cnt = count( $values); + $admin_path = substr(str_replace( dirname( realpath($mx_root_path . 'index.' . $phpEx)) , '', dirname( __FILE__)), 1) . '/'; + for( $i=0; $i < $match_count; $i++) + { + if ( eregi( 'javascript:', $match_links['LINK'][$i]) || empty($match_links['SCRIPT'][$i]) || eregi( $mx_root_path . 'index.' . $phpEx, $match_links['LINK'][$i] )|| eregi( $admin_path . 'index.' . $phpEx, $match_links['LINK'][$i] ) ) + { + continue; + } + if ( eregi( 'index.php', $match_links['LINK'][$i])) + { + $text = str_replace( $match_links['LINK'][$i], PORTAL_URL . $admin_path . $match_links['LINK'][$i], $text); + continue; + } // if END + for( $j = 0; $j < $values_cnt; $j++) + { + + if ( strpos( $values[$j], $match_links['SCRIPT'][$i]) !== false ) + { + $text = str_replace( $match_links['LINK'][$i], PORTAL_URL . $admin_path . 'index.'. $phpEx . '?cat=' . $this->category . '&' . $this->menu_actions[$values[$j]] . '&' . $match_links['PARAMS'][$i], $text); + break; + } // if END + } // for END + } // for END + } + + function mx_message_die_acp( $error_type, $message, $title = '', $line = '', $file = '', $sql = '') + { + $match_count = preg_match_all( '#(href|action)="(((' . PORTAL_URL . '|' . PHPBB_URL . ')?((' . $mx_root_path . ')?(admin/|adm/)?([^"?]*)?))\??([^"]*?))"#si', $message, $match_links ); + $matched_links['LINK'] = $match_links[2]; + $matched_links['SCRIPT'] = $match_links[8]; + $matched_links['PARAMS'] = $match_links[9]; + $this->_convert_links( $message, $matched_links); + mx_message_die( $error_type, $message, $title, $line, $file, $sql); + } + + function assign_content_acp( $acp_html ) { *************** *** 555,603 **** case PHPBB2X_CATEGORY: default: - $match_count = preg_match_all( '#(href|action)="(((' . PORTAL_URL . '|' . PHPBB_URL . ')?((' . $mx_root_path . ')?(admin/|adm/)?([^"?]*)?))\??([^"]*?))"#si', $acp_html, $match_links ); ! for( $i=0; $i < $match_count; $i++) ! { ! if ( eregi( 'javascript:', $match_links[2][$i]) || empty($match_links[8][$i]) || eregi( './../index.php', $match_links[2][$i] ) ) ! { ! continue; ! } ! //print $match_links[2][$i] . ' • ' . $match_links[8][$i]. '<br/>'; ! ! for( $j = 0;$j <= $menu_array_normal_count;$j++ ) ! { ! //print $menu_array_normal[$menu_array_normal_keys[$j]] . '<br/>'; ! if ( strpos( $menu_array_normal[$menu_array_normal_keys[$j]], $match_links[8][$i] ) !== false ) ! { ! ! $action_file = $menu_array_normal_keys[$j]; ! $query_string = ''; ! if ( $match_links[9][$i] != '' ) ! { ! $query_string = '&' . $match_links[9][$i]; ! } ! $acp_html = str_replace( $match_links[2][$i], mx_append_sid( "index.$phpEx?cat=" . $this->category . "&panel=$action_file$query_string" ), $acp_html ); ! break; ! } ! } ! //print '<p> </p><hr/>'; ! ! ! } ! ! break; case OLYMPUS_CATEGORY: break; } // switch $forms_cnt = preg_match_all( "#<form([^>]*)>#si", $acp_html, $forms); ! // print '<pre font-size="12px">'; for( $f_i = 0; $f_i < $forms_cnt; $f_i++) { $form_cnt = preg_match_all( "#([^=]*)=[\"']([^\"']*)[\"']#si", $forms[1][$f_i], $form); - //print $f_i . ' • ' . $forms[1][$f_i] . '<br/>'; - //print_r( $form); $form_action = ''; $form_method = ''; --- 636,658 ---- case PHPBB2X_CATEGORY: default: $match_count = preg_match_all( '#(href|action)="(((' . PORTAL_URL . '|' . PHPBB_URL . ')?((' . $mx_root_path . ')?(admin/|adm/)?([^"?]*)?))\??([^"]*?))"#si', $acp_html, $match_links ); + $menu_actions = $this->menu_actions; + $matched_links['LINK'] = $match_links[2]; + $matched_links['SCRIPT'] = $match_links[8]; + $matched_links['PARAMS'] = $match_links[9]; ! $this->_convert_links( $acp_html, $matched_links); break; case OLYMPUS_CATEGORY: + $acp_html = $this->phpbb3_hook->assign_content_acp( $acp_html); + $acp_html = '<h1>' . $this->panel_title . '</h1><p>Panel: ' . $this->panel . '</p>' . $acp_html; break; } // switch $forms_cnt = preg_match_all( "#<form([^>]*)>#si", $acp_html, $forms); ! for( $f_i = 0; $f_i < $forms_cnt; $f_i++) { $form_cnt = preg_match_all( "#([^=]*)=[\"']([^\"']*)[\"']#si", $forms[1][$f_i], $form); $form_action = ''; $form_method = ''; *************** *** 626,634 **** } } - //print htmlentities( $forms[1][$f_i]) . '><br/>'; - //print htmlentities( $forms[1][$f_i] . '>'. $html_add) . '<br/>'; $acp_html = str_replace( $forms[1][$f_i] . '>', $forms[1][$f_i] .'>'. $html_add, $acp_html); } - //print '</pre>'; $this->template->assign_var( 'CONTENT_ACP', $acp_html ); --- 681,686 ---- *************** *** 638,642 **** { global $board_config, $userdata, $lang, $mx_user, $admincp_nav_icon_url; ! global $theme, $images; $l_timezone = explode('.', $board_config['board_timezone']); --- 690,694 ---- { global $board_config, $userdata, $lang, $mx_user, $admincp_nav_icon_url; ! global $theme, $images, $mx_starttime, $db, $phpEx; $l_timezone = explode('.', $board_config['board_timezone']); *************** *** 654,663 **** case 'internal': case 'phpbb2': ! $current_phpbb_version = '2' . $board_config['version']; ! break; case 'phpbb3': ! $current_phpbb_version = $board_config['version']; ! break; } --- 706,715 ---- case 'internal': case 'phpbb2': ! $current_phpbb_version = '2' . $board_config['version']; ! break; case 'phpbb3': ! $current_phpbb_version = $board_config['version']; ! break; } *************** *** 681,685 **** 'MX_ICON_CSS' => $images['mx_graphics']['icon_style'], ! 'LOGO' => !empty($images['mx_logo_acp']) ? $images['mx_logo_acp']: $images['mx_logo'], "U_PORTAL_INDEX" => mx_append_sid( PORTAL_URL . basename( __FILE__ ) ), --- 733,737 ---- 'MX_ICON_CSS' => $images['mx_graphics']['icon_style'], ! 'LOGO' => !empty($images['mx_logo_acp']) ? @$images['mx_logo_acp']: @$images['mx_logo'], "U_PORTAL_INDEX" => mx_append_sid( PORTAL_URL . basename( __FILE__ ) ), *************** *** 698,702 **** "L_PREVIEW_PORTAL" => $lang['Preview_portal'], ! 'L_LOGOUT' => $lang['Log_out'], "L_FORUM_INDEX" => $lang['Main_index'], "L_ADMIN_INDEX" => $lang['Admin_Index'], --- 750,754 ---- "L_PREVIEW_PORTAL" => $lang['Preview_portal'], ! 'L_LOGOUT' => @$lang['Log_out'], "L_FORUM_INDEX" => $lang['Main_index'], "L_ADMIN_INDEX" => $lang['Admin_Index'], *************** *** 718,721 **** --- 770,774 ---- 'S_JUMPBOX_ACTION' => mx_append_sid('../viewforum.'.$phpEx), 'S_CURRENT_TIME' => sprintf($lang['Current_time'], phpBB2::create_date($board_config['default_dateformat'], time(), $board_config['board_timezone'])), + //'S_CURRENT_TIME' => sprintf($lang['Current_time'], create_date($board_config['default_dateformat'], time(), $board_config['board_timezone'])), 'S_CONTENT_DIRECTION' => $lang['DIRECTION'], *************** *** 743,757 **** $script = $mx_acp->prepare_action_script(); switch ( 0 ) { ! case 0; ! ob_start(); ! eval( $script ); ! $panel_html = ob_get_contents(); ! ob_end_clean(); ! break; case 1: - $panel_html = preg_replace( array("#\n#esi", "#\t#si"), array("sprintf('%4d', \$i++) . '\n'", ' '), str_replace( "\n", "<br/>\n", htmlentities( $script ) )); break; --- 796,817 ---- $script = $mx_acp->prepare_action_script(); + //error_reporting( E_ALL ^E_NOTICE); + //ini_set( 'display_errors', '1' ); + $i = 1; + + // VERSION mx v2.8 + //$script = str_replace( 'phpBB2::', '', $script); + // VERSION mx v2.9 + $script = str_replace( 'mx_phpBB2::', 'phpBB2::', $script); switch ( 0 ) { ! case 0: ! ob_start(); ! eval( $script ); ! $panel_html = ob_get_contents(); ! ob_end_clean(); ! break; case 1: $panel_html = preg_replace( array("#\n#esi", "#\t#si"), array("sprintf('%4d', \$i++) . '\n'", ' '), str_replace( "\n", "<br/>\n", htmlentities( $script ) )); break; *************** *** 768,837 **** $panel_html = ob_get_contents(); ob_end_clean(); ! $panel_html .= preg_replace( array("#\n#esi", "#\t#si"), array("sprintf('%4d', \$i++) . '\n'", ' '), str_replace( "\n", "<br/>\n", htmlentities( $panel_html ) ));; break; } $mx_acp->assign_content_acp( $panel_html ); $mx_acp->display(); - die(); - - if ( !$is_phpbb || PORTAL_BACKEND == 'phpbb2' ) - { - while ( list( $cat, $menu_list ) = each( $menu_array ) ) - { - while ( list( $menu_id, $menu_link ) = each( $menu_list ) ) - { - $menu_array_normal[$menu_id] = $menu_link; - $menu_array_revert[$menu_link] = $menu_id; - } - } - - $d = preg_match_all( '#(href|action)="(((' . PORTAL_URL . '|' . PHPBB_URL . ')?((' . $mx_root_path . ')?(admin/)?([^"?]*)?))\??([^"]*?))"#si', $admin_html, $matches_links ); - - $menu_array_normal_keys = array_keys( $menu_array_normal ); - $menu_array_normal_count = count( $menu_array_normal ); - - for( $i = 0; $i < count( $matches_links[0] ); $i++ ) - { - if ( strpos( $matches_links[2][$i], 'javascript:' ) !== false || $matches_links[8][$i] == '' || strpos( $matches_links[2][$i], './../index.php' ) !== false ) - { - continue; - } - for( $j = 0;$j < $menu_array_normal_count;$j++ ) - { - if ( strpos( $menu_array_normal[$menu_array_normal_keys[$j]], $matches_links[8][$i] ) !== false ) - { - $action_file = $menu_array_normal_keys[$j]; - $query_string = ''; - if ( $matches_links[9][$i] != '' ) - { - $query_string = '&' . $matches_links[9][$i]; - } - $admin_html = str_replace( $matches_links[2][$i], mx_append_sid( "index.$phpEx?cat=$category&action_file=$action_file$query_string" ), $admin_html ); - break; - } - } - } - } - - $template->assign_block_vars( 'module_portal', array( 'ACTIVETAB' => $is_portal?' id="activetab"':'', - ) ); - $template->assign_block_vars( 'module_mx', array( 'ACTIVETAB' => $is_module?' id="activetab"':'', - ) ); - // error_reporting( E_ALL); - $menu_params = ''; - - $template->assign_var( 'L_ADMIN_CATEGORY', $lang_category ); - - display_tab_menu( $menu_array, $action_file_id, $allow_menu_sort, $menu_params ); - $template->pparse( 'adm_header' ); - - $template->assign_var( 'CONTENT_ACP', $admin_html ); - - $template->pparse( 'adm_body' ); - $template->pparse( 'adm_footer' ); - // print '<pre>'; - // print_r( $lang); - // print '</pre>'; - ?> \ No newline at end of file --- 828,838 ---- $panel_html = ob_get_contents(); ob_end_clean(); ! $panel_html = preg_replace( array("#\n#esi", "#\t#si"), array("sprintf('%4d', \$i++) . '\n'", ' '), str_replace( "\n", "<br/>\n", htmlentities( $panel_html ) ));; break; + case 4: + eval( $script); } $mx_acp->assign_content_acp( $panel_html ); $mx_acp->display(); ?> \ No newline at end of file |