You can subscribe to this list here.
| 2005 |
Jan
|
Feb
|
Mar
(95) |
Apr
(270) |
May
(111) |
Jun
|
Jul
|
Aug
(64) |
Sep
(130) |
Oct
(319) |
Nov
(17) |
Dec
(191) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2006 |
Jan
(53) |
Feb
|
Mar
|
Apr
|
May
(6) |
Jun
(387) |
Jul
(102) |
Aug
(247) |
Sep
(120) |
Oct
(1) |
Nov
(8) |
Dec
(21) |
| 2007 |
Jan
(38) |
Feb
(36) |
Mar
|
Apr
(32) |
May
(135) |
Jun
(523) |
Jul
(192) |
Aug
(103) |
Sep
(533) |
Oct
(77) |
Nov
(23) |
Dec
(203) |
| 2008 |
Jan
(312) |
Feb
(1193) |
Mar
(404) |
Apr
(67) |
May
(62) |
Jun
(497) |
Jul
(297) |
Aug
(110) |
Sep
(335) |
Oct
(256) |
Nov
(50) |
Dec
(118) |
| 2009 |
Jan
(67) |
Feb
(10) |
Mar
(1) |
Apr
(1) |
May
|
Jun
(10) |
Jul
(61) |
Aug
|
Sep
(16) |
Oct
(45) |
Nov
(12) |
Dec
(14) |
| 2010 |
Jan
(30) |
Feb
|
Mar
|
Apr
(4) |
May
|
Jun
|
Jul
(7) |
Aug
(7) |
Sep
(5) |
Oct
(5) |
Nov
|
Dec
|
| 2011 |
Jan
(7) |
Feb
(3) |
Mar
(89) |
Apr
(11) |
May
(5) |
Jun
|
Jul
(8) |
Aug
(1) |
Sep
(2) |
Oct
|
Nov
(2) |
Dec
(89) |
| 2012 |
Jan
(7) |
Feb
(1) |
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
(4) |
Sep
(3) |
Oct
(42) |
Nov
(1) |
Dec
|
| 2013 |
Jan
|
Feb
|
Mar
(19) |
Apr
(90) |
May
(38) |
Jun
(235) |
Jul
(38) |
Aug
(10) |
Sep
|
Oct
(29) |
Nov
|
Dec
|
| 2014 |
Jan
|
Feb
|
Mar
|
Apr
(6) |
May
(52) |
Jun
|
Jul
(7) |
Aug
|
Sep
(17) |
Oct
|
Nov
|
Dec
|
|
From: Markus P. <mar...@us...> - 2005-04-16 18:24:17
|
Update of /cvsroot/mxbb/core/install/includes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5014 Modified Files: template.php Log Message: Fix template class required by the installer. It now calls mx_realpath, instead of phpbb_realpath. =:-o Index: template.php =================================================================== RCS file: /cvsroot/mxbb/core/install/includes/template.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** template.php 22 Mar 2005 00:27:23 -0000 1.1 --- template.php 16 Apr 2005 18:23:58 -0000 1.2 *************** *** 231,235 **** if (substr($filename, 0, 1) != '/') { ! $filename = ($rp_filename = phpbb_realpath($this->root . '/' . $filename)) ? $rp_filename : $filename; } --- 231,235 ---- if (substr($filename, 0, 1) != '/') { ! $filename = ($rp_filename = mx_realpath($this->root . '/' . $filename)) ? $rp_filename : $filename; } *************** *** 476,478 **** } ! ?> --- 476,478 ---- } ! ?> \ No newline at end of file |
|
From: Markus P. <mar...@us...> - 2005-04-16 01:55:50
|
Update of /cvsroot/mxbb/core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27656 Modified Files: extension.inc Log Message: Renamed $starttime as $mx_starttime to avoid problems with other scripts overriding its value. Remember this variable is initialized in extension.inc and should live until page_tail.php is reached. Index: extension.inc =================================================================== RCS file: /cvsroot/mxbb/core/extension.inc,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** extension.inc 9 Jan 2005 21:55:44 -0000 1.3 --- extension.inc 16 Apr 2005 01:54:56 -0000 1.4 *************** *** 32,42 **** // Change this if your extension is not .php! // ! $phpEx = "php"; ! ! $starttime = 0; ! $starttime = microtime(); ! $starttime = explode(" ",$starttime); ! $starttime = $starttime[1] + $starttime[0]; ?> \ No newline at end of file --- 32,39 ---- // Change this if your extension is not .php! // ! $phpEx = 'php'; ! $mx_starttime = explode(' ', microtime()); ! $mx_starttime = $mx_starttime[1] + $mx_starttime[0]; ?> \ No newline at end of file |
|
From: Markus P. <mar...@us...> - 2005-04-16 01:55:13
|
Update of /cvsroot/mxbb/core/includes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27656/includes Modified Files: mx_functions_phpbb.php page_tail.php Log Message: Renamed $starttime as $mx_starttime to avoid problems with other scripts overriding its value. Remember this variable is initialized in extension.inc and should live until page_tail.php is reached. Index: mx_functions_phpbb.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/mx_functions_phpbb.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** mx_functions_phpbb.php 13 Apr 2005 21:23:25 -0000 1.5 --- mx_functions_phpbb.php 16 Apr 2005 01:55:03 -0000 1.6 *************** *** 278,282 **** global $db, $template, $board_config, $theme, $lang, $phpEx, $phpbb_root_path, $mx_root_path, $nav_links, $gen_simple_header, $images; global $userdata, $user_ip, $session_length, $page_title; - global $starttime; $sql_store = $sql; --- 278,281 ---- Index: page_tail.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/page_tail.php,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** page_tail.php 8 Mar 2005 19:09:42 -0000 1.11 --- page_tail.php 16 Apr 2005 01:55:04 -0000 1.12 *************** *** 32,37 **** $admin_link = ( $userdata['user_level'] == ADMIN && $userdata['session_logged_in'] ) ? '<a href="' . PORTAL_URL . 'admin/index.' . $phpEx . '?sid=' . $userdata['session_id'] . '">' . $lang['Admin_panel'] . '</a><br /><br />' : ''; ! $template->set_filenames( array( 'overall_footer' => ( empty( $gen_simple_header ) ) ? 'overall_footer.tpl' : 'simple_footer.tpl' ) ! ); if ( $show_edit_blocks_icon ) --- 32,38 ---- $admin_link = ( $userdata['user_level'] == ADMIN && $userdata['session_logged_in'] ) ? '<a href="' . PORTAL_URL . 'admin/index.' . $phpEx . '?sid=' . $userdata['session_id'] . '">' . $lang['Admin_panel'] . '</a><br /><br />' : ''; ! $template->set_filenames(array( ! 'overall_footer' => ( empty($gen_simple_header) ) ? 'overall_footer.tpl' : 'simple_footer.tpl' ) ! ); if ( $show_edit_blocks_icon ) *************** *** 53,66 **** if ( $edit_on ) { ! $template->assign_block_vars( 'switch_edit_on', array() ); } else { ! $template->assign_block_vars( 'switch_edit_off', array() ); } } // Compose additinal copy footer ! for ($i = 0; $i < count($mxbb_footer_addup); $i++) { if ( $i == 0 ) --- 54,67 ---- if ( $edit_on ) { ! $template->assign_block_vars('switch_edit_on', array()); } else { ! $template->assign_block_vars('switch_edit_off', array()); } } // Compose additinal copy footer ! for( $i = 0; $i < count($mxbb_footer_addup); $i++ ) { if ( $i == 0 ) *************** *** 82,112 **** $edit_nav_icon_url = PORTAL_URL . TEMPLATE_ROOT_PATH . 'images/'; ! $template->assign_vars( array( ! // MX Addon ! 'U_PORTAL_ROOT_PATH' => PORTAL_URL, ! 'U_PHPBB_ROOT_PATH' => PHPBB_URL, ! 'TEMPLATE_ROOT_PATH' => TEMPLATE_ROOT_PATH, ! 'MX_VERSION' => PORTAL_VERSION, ! 'MXBB_EXTRA' => $mxbb_footer_text, ! 'POWERED_BY' => $lang['Powered_by'], ! // END ! 'PHPBB_VERSION' => '2' . $board_config['version'], ! // 'TRANSLATION_INFO' => ( isset($lang['TRANSLATION_INFO']) ) ? $lang['TRANSLATION_INFO'] : '', ! 'U_EDIT_NAV' => $edit_nav_icon_url, ! 'ADMIN_OPTIONS' => $lang['Show_admin_options'], ! 'ADMIN_LINK' => $admin_link ! ) ); // Generate stats ! $endtime = microtime(); ! $endtime = explode( " ", $endtime ); ! $endtime = $endtime[1] + $endtime[0]; ! $stime = $endtime - $starttime; ! $execution_stats = '<center><span class="copyright">' . sprintf( $lang['Execution_Stats'], $db->num_queries, round( $stime, 4 ) ) . '</span></center>'; // Comment out next 3 lines and stats will be turned off ! $template->assign_vars( array( 'EXECUTION_STATS' => $execution_stats ) ! ); ! $template->pparse( 'overall_footer' ); // Close our DB connection. --- 83,112 ---- $edit_nav_icon_url = PORTAL_URL . TEMPLATE_ROOT_PATH . 'images/'; ! $template->assign_vars(array( ! // MX Addon ! 'U_PORTAL_ROOT_PATH' => PORTAL_URL, ! 'U_PHPBB_ROOT_PATH' => PHPBB_URL, ! 'TEMPLATE_ROOT_PATH' => TEMPLATE_ROOT_PATH, ! 'MX_VERSION' => PORTAL_VERSION, ! 'MXBB_EXTRA' => $mxbb_footer_text, ! 'POWERED_BY' => $lang['Powered_by'], ! // END ! 'PHPBB_VERSION' => '2' . $board_config['version'], ! // 'TRANSLATION_INFO' => ( isset($lang['TRANSLATION_INFO']) ) ? $lang['TRANSLATION_INFO'] : '', ! 'U_EDIT_NAV' => $edit_nav_icon_url, ! 'ADMIN_OPTIONS' => $lang['Show_admin_options'], ! 'ADMIN_LINK' => $admin_link ! )); // Generate stats ! $endtime = explode(' ', microtime()); ! $stime = ( $endtime[1] + $endtime[0] ) - $mx_starttime; ! $execution_stats = '<center><span class="copyright">' . sprintf($lang['Execution_Stats'], $db->num_queries, round($stime, 4)) . '</span></center>'; // Comment out next 3 lines and stats will be turned off ! $template->assign_vars(array( ! 'EXECUTION_STATS' => $execution_stats) ! ); ! $template->pparse('overall_footer'); // Close our DB connection. *************** *** 139,141 **** --- 139,142 ---- //echo( '<br><br>'.var_export($_SESSION) ); exit; + ?> \ No newline at end of file |
|
From: Markus P. <mar...@us...> - 2005-04-16 01:55:12
|
Update of /cvsroot/mxbb/core/admin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27656/admin Modified Files: admin_mx_block.php Log Message: Renamed $starttime as $mx_starttime to avoid problems with other scripts overriding its value. Remember this variable is initialized in extension.inc and should live until page_tail.php is reached. Index: admin_mx_block.php =================================================================== RCS file: /cvsroot/mxbb/core/admin/admin_mx_block.php,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** admin_mx_block.php 6 Apr 2005 21:48:21 -0000 1.24 --- admin_mx_block.php 16 Apr 2005 01:54:57 -0000 1.25 *************** *** 574,578 **** function block_setting( $block_id ) { ! global $template, $lang, $db, $board_config, $theme, $HTTP_GET_VARS, $HTTP_POST_VARS, $phpEx, $mx_root_path, $s_hidden_fields, $userdata, $portalpage, $starttime; // Generate Layout for each block parameter --- 574,578 ---- function block_setting( $block_id ) { ! global $template, $lang, $db, $board_config, $theme, $HTTP_GET_VARS, $HTTP_POST_VARS, $phpEx, $mx_root_path, $s_hidden_fields, $userdata, $portalpage; // Generate Layout for each block parameter |
|
From: Markus P. <mar...@us...> - 2005-04-15 18:35:01
|
Update of /cvsroot/mxbb/core/modules/mx_coreblocks In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30595 Modified Files: mx_online.php Log Message: Fixed bug building URLs to user profiles in mx_online.php http://www.mx-system.com/forum/viewtopic.php?t=6542 Index: mx_online.php =================================================================== RCS file: /cvsroot/mxbb/core/modules/mx_coreblocks/mx_online.php,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** mx_online.php 4 Apr 2005 21:34:40 -0000 1.7 --- mx_online.php 15 Apr 2005 18:34:51 -0000 1.8 *************** *** 82,91 **** if ( $row['user_allow_viewonline'] ) { ! $user_online_link = '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=" . $row['user_id']) . '"' . $style_color .'>' . $row['username'] . '</a>'; $logged_visible_online++; } else { ! $user_online_link = '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=" . $row['user_id']) . '"' . $style_color .'><i>' . $row['username'] . '</i></a>'; $logged_hidden_online++; } --- 82,91 ---- if ( $row['user_allow_viewonline'] ) { ! $user_online_link = '<a href="' . append_sid(PHPBB_URL."profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=" . $row['user_id']) . '"' . $style_color .'>' . $row['username'] . '</a>'; $logged_visible_online++; } else { ! $user_online_link = '<a href="' . append_sid(PHPBB_URL."profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=" . $row['user_id']) . '"' . $style_color .'><i>' . $row['username'] . '</i></a>'; $logged_hidden_online++; } |
Update of /cvsroot/mxbb/core/templates/subSilver In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14823/templates/subSilver Removed Files: bbcode.tpl confirm_body.tpl formIE.css jumpbox.tpl login_body.tpl message_body.tpl posting_body.tpl posting_smilies.tpl Log Message: Removed all duplicated templates related files we had from phpBB. --- posting_smilies.tpl DELETED --- --- message_body.tpl DELETED --- --- posting_body.tpl DELETED --- --- formIE.css DELETED --- --- jumpbox.tpl DELETED --- --- login_body.tpl DELETED --- --- confirm_body.tpl DELETED --- --- bbcode.tpl DELETED --- |
|
From: Markus P. <mar...@us...> - 2005-04-13 22:46:03
|
Update of /cvsroot/mxbb/core/templates/subSilver/admin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14823/templates/subSilver/admin Removed Files: admin_message_body.tpl Log Message: Removed all duplicated templates related files we had from phpBB. --- admin_message_body.tpl DELETED --- |
|
From: Markus P. <mar...@us...> - 2005-04-13 21:26:25
|
Update of /cvsroot/mxbb/core/modules/mx_coreblocks/templates/subSilver In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5108 Removed Files: keepme.txt Log Message: Removed temporary file keepme.txt from new folder mx_coreblocks/templates/subSilver. --- keepme.txt DELETED --- |
|
From: Markus P. <mar...@us...> - 2005-04-13 21:24:08
|
Update of /cvsroot/mxbb/core/install In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3079/install Modified Files: mx_install.php mx_install_readme.htm Log Message: ok, second step on fixing double line breaks. I think this is all. Index: mx_install_readme.htm =================================================================== RCS file: /cvsroot/mxbb/core/install/mx_install_readme.htm,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** mx_install_readme.htm 23 Mar 2005 23:41:31 -0000 1.8 --- mx_install_readme.htm 13 Apr 2005 21:23:26 -0000 1.9 *************** *** 1,777 **** ! <html> ! <head> ! <title>Mx Portal installation - readme</title> ! <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> ! <!-- link rel="stylesheet" href="templates/subSilver/subSilver.css" type="text/css" --> ! <style type="text/css"> ! <!-- ! /* ! The original subSilver Theme for phpBB version 2+ ! Created by subBlue design [...1527 lines suppressed...] ! ! <br /> ! If your language is not already translated, duplicate (copy and paste) the /language/lang_english/ directory, rename it to something like "lang_yourlanguage." Translate all of the included files, save it, ZIP it, and upload it to the mxBB Languages Download Area. Be sure to report translated languages to us. We appreciate your contribution. <img src="http://www.mx-system.com/forum/images/smiles/icon_smile.gif" alt="Smile" border="0" /> ! <br /> ! ! <br /> ! <a href="#top">Back to Top</a> ! <br /> ! ! <br /> ! Jon and MennoniteHobbit ! <br /> ! <span style="font-style: italic">On behalf of the rest of the mxBB Team</span></span> ! </td> ! </tr> ! ! </table> ! </body> </html> \ No newline at end of file Index: mx_install.php =================================================================== RCS file: /cvsroot/mxbb/core/install/mx_install.php,v retrieving revision 1.41 retrieving revision 1.42 diff -C2 -d -r1.41 -r1.42 *** mx_install.php 9 Apr 2005 16:21:44 -0000 1.41 --- mx_install.php 13 Apr 2005 21:23:26 -0000 1.42 *************** *** 1,1710 **** ! <?php ! /** ------------------------------------------------------------------------ ! * subject : mxBB-Portal Installation Script ! * begin : june, 2002 ! * copyright : (C) 2002-2005 mxBB-Portal ! * email : jon...@ho... ! * project site : www.mx-system.com ! * ! * editor settings : Please, set tabsize to 4 ! * [...3391 lines suppressed...] ! // When the PHP realpath function is disabled it returns false and generates a message like: ! // ! // Warning: realpath (and maybe other functions) has been disabled for security reasons in ! // path-to-your/install/mx_install.php on line XXX ! // ! // This "security" measure seems somehow stupid since information of the filesystem layout ! // can be easily retrieved from PHP (and Apache) global variables ...as well as from the ! // same PHP generated warning message! :P ! // ! // Just wanted to mention I already saw the phpBB guys also created their own phpbb_realpath ! // function (in includes/functions.php). I never understood why they did it. Only if they ! // had documented the correct reason in their source code. ;-) ! // ! function mx_realpath($path) ! { ! return ( @function_exists('realpath') && @realpath(__FILE__) ? realpath($path) : $path ); ! } ! ?> \ No newline at end of file |
|
From: Markus P. <mar...@us...> - 2005-04-13 21:24:07
|
Update of /cvsroot/mxbb/core/includes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3079/includes Modified Files: mx_auth.php mx_functions.php mx_functions_phpbb.php Log Message: ok, second step on fixing double line breaks. I think this is all. Index: mx_functions_phpbb.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/mx_functions_phpbb.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** mx_functions_phpbb.php 10 Apr 2005 20:40:42 -0000 1.4 --- mx_functions_phpbb.php 13 Apr 2005 21:23:25 -0000 1.5 *************** *** 1,603 **** ! <?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 : ! * ------------------------------------------------------------------------- [...1179 lines suppressed...] ! { ! if ( $on_page > 1 ) ! { ! $page_string = ' <a href="' . append_sid($base_url . "&".$name_id."=" . ( ( $on_page - 2 ) * $per_page ) ) . '">' . $previous_string . '</a> ' . $page_string; ! } ! ! if ( $on_page < $total_pages ) ! { ! $page_string .= ' <a href="' . append_sid($base_url . "&".$name_id."=" . ( $on_page * $per_page ) ) . '">' . $next_string . '</a>'; ! } ! ! } ! $pre_text = $add_preinfo_text ? $lang['Goto_page'] : ''; ! $page_string = $pre_text . ' ' . $page_string; ! ! return $page_string; ! } ! ?> \ No newline at end of file Index: mx_auth.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/mx_auth.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** mx_auth.php 12 Apr 2005 21:10:33 -0000 1.5 --- mx_auth.php 13 Apr 2005 21:23:25 -0000 1.6 *************** *** 1,464 **** ! <?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$ ! */ ! ! /** ! * 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. ! */ ! ! /** ! * Included functions in this file: ! * - block_auth ! * - page_auth ! * - menu_auth ! * - mx_auth_check_user (from auth.php - validated for phpbb 2.0.10) ! * - get_auth_forum ! * - mx_auth_group_cache ! */ ! ! /* ! $type's accepted (pre-pend with AUTH_): ! VIEW, READ, POST, REPLY, EDIT, DELETE, STICKY, ANNOUNCE, VOTE, POLLCREATE ! ! Possible options ($type/module_id combinations): ! ! * If you include a type and module_id then a specific lookup will be done and ! the single result returned ! ! * If you set type to AUTH_ALL and specify a module_id an array of all auth types ! will be returned ! ! * If you provide a module_id a specific lookup on that module will be done ! ! * If you set module_id to AUTH_LIST_ALL and specify a type an array listing the ! results for all modules will be returned ! ! * If you set module_id to AUTH_LIST_ALL and type to AUTH_ALL a multidimensional ! array containing the auth permissions for all types and all modules for that ! user is returned ! ! All results are returned as associative arrays, even when a single auth type is ! specified. ! ! If available you can send an array (either one or two dimensional) containing the ! module auth levels, this will prevent the auth function having to do its own ! lookup ! */ ! function block_auth( $type, $module_id, $userdata, $f_access = '', $f_access_group = '' ) ! { ! global $db, $lang; ! ! switch ( $type ) ! { ! // case AUTH_ALL: ! // $a_sql = 'a.auth_view, a.auth_edit, a.auth_delete'; ! // $a_sql_groups = 'a.auth_view_group, a.auth_edit_group, a.auth_delete_group'; ! // $auth_fields = array( 'auth_view', 'auth_edit', 'auth_delete' ); ! // $auth_fields_groups = array( 'auth_view_group', 'auth_edit_group', 'auth_delete_group' ); ! // break; ! ! case AUTH_VIEW: ! $a_sql = 'a.auth_view'; ! $a_sql_groups = 'a.auth_view_group'; ! $auth_fields = array( 'auth_view' ); ! $auth_fields_groups = array( 'auth_view_group' ); ! break; ! ! case AUTH_EDIT: ! $a_sql = 'a.auth_edit'; ! $a_sql_groups = 'a.auth_edit_group'; ! $auth_fields = array( 'auth_edit' ); ! $auth_fields_groups = array( 'auth_edit_group' ); ! break; ! ! case AUTH_DELETE: ! $a_sql = 'a.auth_delete'; ! $a_sql_groups = 'a.auth_delete_group'; ! $auth_fields = array( 'auth_delete' ); ! $auth_fields_groups = array( 'auth_delete_group' ); ! break; ! ! default: ! break; ! } ! ! if ( $module_id == 0 ) ! { ! if ( $userdata['user_level'] == ADMIN && $userdata['session_logged_in'] ) ! { ! $auth_user[$auth_fields[0]] = 1; ! $auth_user[$auth_fields[0] . '_type'] = $lang['Auth_Moderators']; ! } ! else ! { ! $auth_user[$auth_fields[0]] = 0; ! $auth_user[$auth_fields[0] . '_type'] = $lang['Auth_Moderators']; ! } ! return $auth_user; ! } ! ! $is_admin = ( $userdata['user_level'] == ADMIN && $userdata['session_logged_in'] ) ? true : 0; ! ! $auth_user = array(); ! for( $i = 0; $i < count( $auth_fields ); $i++ ) ! { ! $key = $auth_fields[$i]; ! $key_groups = $auth_fields_groups[$i]; ! // If the user is logged on and the module type is either ALL or REG then the user has access ! // If the type if ACL, MOD or ADMIN then we need to see if the user has specific permissions ! // to do whatever it is they want to do ... to do this we pull relevant information for the ! // user (and any groups they belong to) ! // Now we compare the users access level against the modules. We assume here that a moderator ! // and admin automatically have access to an ACL module, similarly we assume admins meet an ! // auth requirement of MOD ! $value = $f_access[$key]; ! // $value_groups = $f_access_group[$key_groups]; ! $value_groups = $f_access_group; ! ! switch ( $value ) ! { ! case AUTH_ALL: ! $auth_user[$key] = true; ! $auth_user[$key . '_type'] = $lang['Auth_Anonymous_users']; ! break; ! ! case AUTH_REG: ! $auth_user[$key] = ( $userdata['session_logged_in'] ) ? true : 0; ! $auth_user[$key . '_type'] = $lang['Auth_Registered_Users']; ! break; ! ! case AUTH_ANONYMOUS: ! $auth_user[$key] = ( ! $userdata['session_logged_in'] ) ? true : 0; ! $auth_user[$key . '_type'] = $lang['Auth_Anonymous_users']; ! break; ! ! case AUTH_ACL: // PRIVATE ! $auth_user[$key] = ( $userdata['session_logged_in'] ) ? mx_auth_group( $value_groups ) || $is_admin : 0; ! $auth_user[$key . '_type'] = $lang['Auth_Users_granted_access']; ! break; ! ! case AUTH_MOD: ! $auth_user[$key] = ( $userdata['session_logged_in'] ) ? mx_auth_group( $f_access_group['auth_moderator_group'] ) || $is_admin : 0; ! $auth_user[$key . '_type'] = $lang['Auth_Moderators']; ! break; ! ! case AUTH_ADMIN: ! $auth_user[$key] = $is_admin; ! $auth_user[$key . '_type'] = $lang['Auth_Administrators']; ! break; ! ! default: ! $auth_user[$key] = 0; ! break; ! } ! } ! // Is user a moderator? ! $auth_user['auth_mod'] = ( $userdata['session_logged_in'] ) ? mx_auth_group( $f_access_group['auth_moderator_group'] ) || $is_admin : 0; ! ! return $auth_user; ! } ! ! function page_auth( $type, $userdata, $f_access = '', $f_access_group = '' ) ! { ! global $db, $lang; ! ! $a_sql = 'a.auth_view'; ! $a_sql_groups = 'a.auth_view_group'; ! $auth_fields = array( 'auth_view' ); ! $auth_fields_groups = array( 'auth_view_group' ); ! ! $is_admin = ( $userdata['user_level'] == ADMIN && $userdata['session_logged_in'] ) ? true : 0; ! ! $auth_user = array(); ! for( $i = 0; $i < count( $auth_fields ); $i++ ) ! { ! $key = $auth_fields[$i]; ! $key_groups = $auth_fields_groups[$i]; ! ! $value = $f_access[$key]; ! // $value_groups = $f_access_group[$key_groups]; ! $value_groups = $f_access_group; ! ! switch ( $value ) ! { ! case AUTH_ALL: ! $auth_user[$key] = true; ! $auth_user[$key . '_type'] = $lang['Auth_Anonymous_users']; ! break; ! ! case AUTH_REG: ! $auth_user[$key] = ( $userdata['session_logged_in'] ) ? true : 0; ! $auth_user[$key . '_type'] = $lang['Auth_Registered_Users']; ! break; ! ! case AUTH_ANONYMOUS: ! $auth_user[$key] = ( ! $userdata['session_logged_in'] ) ? true : 0; ! $auth_user[$key . '_type'] = $lang['Auth_Anonymous_users']; ! break; ! ! case AUTH_ACL: // PRIVATE ! $auth_user[$key] = ( $userdata['session_logged_in'] ) ? mx_auth_group( $value_groups ) || $is_admin : 0; ! $auth_user[$key . '_type'] = $lang['Auth_Users_granted_access']; ! break; ! ! case AUTH_MOD: ! $auth_user[$key] = ( $userdata['session_logged_in'] ) ? mx_auth_group( $f_access_group['auth_moderator_group'] ) || $is_admin : 0; ! $auth_user[$key . '_type'] = $lang['Auth_Moderators']; ! break; ! ! case AUTH_ADMIN: ! $auth_user[$key] = $is_admin; ! $auth_user[$key . '_type'] = $lang['Auth_Administrators']; ! break; ! ! default: ! $auth_user[$key] = 0; ! break; ! } ! } ! // Is user a moderator? ! $auth_user['auth_mod'] = ( $userdata['session_logged_in'] ) ? mx_auth_group( $f_access_group['auth_moderator_group'] ) || $is_admin : 0; ! ! return $auth_user; ! } ! // ************************************************************************** ! function menu_auth( $type, $menu_id, $userdata, $f_access = '', $f_access_group = '' ) ! { ! global $db, $lang; ! ! switch ( $type ) ! { ! case AUTH_ALL: ! $a_sql = 'a.auth_view'; ! $auth_fields = array( 'auth_view' ); ! break; ! ! case AUTH_VIEW: ! $a_sql = 'a.auth_view'; ! $auth_fields = array( 'auth_view' ); ! break; ! ! default: ! break; ! } ! // If f_access has been passed, or auth is needed to return an array of menus ! // then we need to pull the auth information on the given menu (or all menus) ! $is_admin = ( $userdata['user_level'] == ADMIN && $userdata['session_logged_in'] ) ? true : 0; ! ! $auth_user = array(); ! for( $i = 0; $i < count( $auth_fields ); $i++ ) ! { ! $key = $auth_fields[$i]; ! // If the user is logged on and the menu type is either ALL or REG then the user has access ! // If the type if ACL, MOD or ADMIN then we need to see if the user has specific permissions ! // to do whatever it is they want to do ... to do this we pull relevant information for the ! // user (and any groups they belong to) ! // Now we compare the users access level against the menus. We assume here that a moderator ! // and admin automatically have access to an ACL menu, similarly we assume admins meet an ! // auth requirement of MOD ! $value = $f_access[$key]; ! ! switch ( $value ) ! { ! case AUTH_ALL: ! $auth_user[$key] = true; ! $auth_user[$key . '_type'] = $lang['Auth_Anonymous_users']; ! break; ! ! case AUTH_REG: ! $auth_user[$key] = ( $userdata['session_logged_in'] ) ? true : 0; ! $auth_user[$key . '_type'] = $lang['Auth_Registered_Users']; ! break; ! ! case AUTH_ANONYMOUS: ! $auth_user[$key] = ( ! $userdata['session_logged_in'] ) ? true : 0; ! $auth_user[$key . '_type'] = $lang['Auth_Anonymous_users']; ! break; ! ! case AUTH_ACL: ! $auth_user[$key] = ( $userdata['session_logged_in'] ) ? mx_auth_group( $f_access_group ) || $is_admin : 0; ! $auth_user[$key . '_type'] = $lang['Auth_Users_granted_access']; ! break; ! ! case AUTH_MOD: ! $auth_user[$key] = ( $userdata['session_logged_in'] ) ? mx_auth_group( $f_access_group ) || $is_admin : 0; ! $auth_user[$key . '_type'] = $lang['Auth_Moderators']; ! break; ! ! case AUTH_ADMIN: ! $auth_user[$key] = $is_admin; ! $auth_user[$key . '_type'] = $lang['Auth_Administrators']; ! break; ! ! default: ! $auth_user[$key] = 0; ! break; ! } ! } ! // Is user a moderator? ! // $auth_user['auth_mod'] = ( $userdata['session_logged_in'] ) ? mx_auth_group( $f_access_group ) || $is_admin : 0; ! ! return $auth_user; ! } ! ! // New optimized get_auth_forum ! // Credits to Markus_Petrux :-) ! function get_auth_forum( $mode = 'phpbb' ) ! { ! global $userdata, $mx_root_path, $phpEx; ! ! switch ( $mode ) ! { ! case 'phpbb': ! ! // Try to reuse auth_view query result. ! $userdata_key = 'mx_get_auth_forum' . $userdata['user_id']; ! if ( !empty( $userdata[$userdata_key] ) ) ! { ! $auth_data_sql = $userdata[$userdata_key]; ! return $auth_data_sql; ! } ! // Now, this tries to optimize DB access involved in auth(), ! // passing AUTH_LIST_ALL will load info for all forums at once. ! $is_auth_ary = auth( AUTH_VIEW, AUTH_LIST_ALL, $userdata ); ! // Loop through the list of forums to retrieve the ids for ! // those with AUTH_VIEW allowed. ! $auth_data_sql = ''; ! foreach( $is_auth_ary as $fid => $is_auth_row ) ! { ! if ( $is_auth_row['auth_view'] ) ! { ! $auth_data_sql .= ( $auth_data_sql != '' ) ? ', ' . $fid : $fid; ! } ! } ! ! if ( empty( $auth_data_sql ) ) ! { ! $auth_data_sql = -1; ! } ! $userdata[$userdata_key] = $auth_data_sql; ! return $auth_data_sql; ! break; ! ! case 'kb': ! ! // Try to reuse auth_view query result. ! $userdata_key = 'mx_get_auth_kb' . $userdata['user_id']; ! if ( !empty( $userdata[$userdata_key] ) ) ! { ! $auth_data_sql = $userdata[$userdata_key]; ! return $auth_data_sql; ! } ! // Now, this tries to optimize DB access involved in auth(), ! // passing AUTH_LIST_ALL will load info for all forums at once. ! ! include_once( $mx_root_path . 'modules/mx_kb/includes/functions_kb_auth.' . $phpEx ); ! $is_auth_ary = kb_auth( AUTH_VIEW, AUTH_LIST_ALL, $userdata ); ! // Loop through the list of forums to retrieve the ids for ! // those with AUTH_VIEW allowed. ! $auth_data_sql = ''; ! foreach( $is_auth_ary as $fid => $is_auth_row ) ! { ! if ( $is_auth_row['auth_view'] ) ! { ! $auth_data_sql .= ( $auth_data_sql != '' ) ? ', ' . $fid : $fid; ! } ! } ! ! if ( empty( $auth_data_sql ) ) ! { ! $auth_data_sql = -1; ! } ! $userdata[$userdata_key] = $auth_data_sql; ! return $auth_data_sql; ! break; ! default: ! //nothing ! break; ! } ! ! } ! ! // Validates if user belongs to group included in group_ids list ! // Also, adds all usergroups to userdata array ! function mx_auth_group( $group_ids = '', $group_mod_mode = false ) ! { ! global $userdata, $db; ! ! if ( $group_ids == '' ) ! { ! return false; ! } ! ! $group_ids_array = explode(",", $group_ids); ! ! // Try to reuse usergroups result. ! if ( $group_mod_mode ) ! { ! $userdata_key = 'mx_usergroups_mod' . $userdata['user_id']; ! ! if ( empty( $userdata[$userdata_key] ) ) ! { ! // Check if user is group moderator.. ! $sql = "SELECT gr.group_id ! FROM " . GROUPS_TABLE . " gr, ! " . USER_GROUP_TABLE . " ugr ! WHERE gr.group_id = ugr.group_id ! AND gr.group_moderator = '" . $userdata['user_id'] . "' ! AND ugr.user_pending = '0' "; ! ! if ( !( $result = $db->sql_query( $sql ) ) ) ! { ! message_die( GENERAL_ERROR, "Could not query group rights information", '', '', '', '' ); ! } ! ! $group_row = $db->sql_fetchrowset( $result ); ! ! $userdata[$userdata_key_mod] = $group_row; ! } ! } ! else ! { ! $userdata_key = 'mx_usergroups' . $userdata['user_id']; ! ! if ( empty( $userdata[$userdata_key] ) ) ! { ! // Check if user is member of the proper group.. ! $sql = "SELECT group_id FROM " . USER_GROUP_TABLE . " WHERE user_id='" . $userdata['user_id'] . "' AND user_pending = 0"; ! ! if ( !( $result = $db->sql_query( $sql ) ) ) ! { ! message_die( GENERAL_ERROR, "Could not query group rights information", '', '', '', '' ); ! } ! ! $group_row = $db->sql_fetchrowset( $result ); ! ! $userdata[$userdata_key] = $group_row; ! } ! } ! ! for ( $i = 0; $i < count( $userdata[$userdata_key] ); $i++ ) ! { ! if ( in_array( $userdata[$userdata_key][$i]['group_id'], $group_ids_array ) ) ! { ! $is_member = true; ! return $is_member; ! } ! } ! ! return false; ! } ?> \ No newline at end of file --- 1,464 ---- ! <?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$ ! */ ! ! /** ! * 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. ! */ ! ! /** ! * Included functions in this file: ! * - block_auth ! * - page_auth ! * - menu_auth ! * - mx_auth_check_user (from auth.php - validated for phpbb 2.0.10) ! * - get_auth_forum ! * - mx_auth_group_cache ! */ ! ! /* ! $type's accepted (pre-pend with AUTH_): ! VIEW, READ, POST, REPLY, EDIT, DELETE, STICKY, ANNOUNCE, VOTE, POLLCREATE ! ! Possible options ($type/module_id combinations): ! ! * If you include a type and module_id then a specific lookup will be done and ! the single result returned ! ! * If you set type to AUTH_ALL and specify a module_id an array of all auth types ! will be returned ! ! * If you provide a module_id a specific lookup on that module will be done ! ! * If you set module_id to AUTH_LIST_ALL and specify a type an array listing the ! results for all modules will be returned ! ! * If you set module_id to AUTH_LIST_ALL and type to AUTH_ALL a multidimensional ! array containing the auth permissions for all types and all modules for that ! user is returned ! ! All results are returned as associative arrays, even when a single auth type is ! specified. ! ! If available you can send an array (either one or two dimensional) containing the ! module auth levels, this will prevent the auth function having to do its own ! lookup ! */ ! function block_auth( $type, $module_id, $userdata, $f_access = '', $f_access_group = '' ) ! { ! global $db, $lang; ! ! switch ( $type ) ! { ! // case AUTH_ALL: ! // $a_sql = 'a.auth_view, a.auth_edit, a.auth_delete'; ! // $a_sql_groups = 'a.auth_view_group, a.auth_edit_group, a.auth_delete_group'; ! // $auth_fields = array( 'auth_view', 'auth_edit', 'auth_delete' ); ! // $auth_fields_groups = array( 'auth_view_group', 'auth_edit_group', 'auth_delete_group' ); ! // break; ! ! case AUTH_VIEW: ! $a_sql = 'a.auth_view'; ! $a_sql_groups = 'a.auth_view_group'; ! $auth_fields = array( 'auth_view' ); ! $auth_fields_groups = array( 'auth_view_group' ); ! break; ! ! case AUTH_EDIT: ! $a_sql = 'a.auth_edit'; ! $a_sql_groups = 'a.auth_edit_group'; ! $auth_fields = array( 'auth_edit' ); ! $auth_fields_groups = array( 'auth_edit_group' ); ! break; ! ! case AUTH_DELETE: ! $a_sql = 'a.auth_delete'; ! $a_sql_groups = 'a.auth_delete_group'; ! $auth_fields = array( 'auth_delete' ); ! $auth_fields_groups = array( 'auth_delete_group' ); ! break; ! ! default: ! break; ! } ! ! if ( $module_id == 0 ) ! { ! if ( $userdata['user_level'] == ADMIN && $userdata['session_logged_in'] ) ! { ! $auth_user[$auth_fields[0]] = 1; ! $auth_user[$auth_fields[0] . '_type'] = $lang['Auth_Moderators']; ! } ! else ! { ! $auth_user[$auth_fields[0]] = 0; ! $auth_user[$auth_fields[0] . '_type'] = $lang['Auth_Moderators']; ! } ! return $auth_user; ! } ! ! $is_admin = ( $userdata['user_level'] == ADMIN && $userdata['session_logged_in'] ) ? true : 0; ! ! $auth_user = array(); ! for( $i = 0; $i < count( $auth_fields ); $i++ ) ! { ! $key = $auth_fields[$i]; ! $key_groups = $auth_fields_groups[$i]; ! // If the user is logged on and the module type is either ALL or REG then the user has access ! // If the type if ACL, MOD or ADMIN then we need to see if the user has specific permissions ! // to do whatever it is they want to do ... to do this we pull relevant information for the ! // user (and any groups they belong to) ! // Now we compare the users access level against the modules. We assume here that a moderator ! // and admin automatically have access to an ACL module, similarly we assume admins meet an ! // auth requirement of MOD ! $value = $f_access[$key]; ! // $value_groups = $f_access_group[$key_groups]; ! $value_groups = $f_access_group; ! ! switch ( $value ) ! { ! case AUTH_ALL: ! $auth_user[$key] = true; ! $auth_user[$key . '_type'] = $lang['Auth_Anonymous_users']; ! break; ! ! case AUTH_REG: ! $auth_user[$key] = ( $userdata['session_logged_in'] ) ? true : 0; ! $auth_user[$key . '_type'] = $lang['Auth_Registered_Users']; ! break; ! ! case AUTH_ANONYMOUS: ! $auth_user[$key] = ( ! $userdata['session_logged_in'] ) ? true : 0; ! $auth_user[$key . '_type'] = $lang['Auth_Anonymous_users']; ! break; ! ! case AUTH_ACL: // PRIVATE ! $auth_user[$key] = ( $userdata['session_logged_in'] ) ? mx_auth_group( $value_groups ) || $is_admin : 0; ! $auth_user[$key . '_type'] = $lang['Auth_Users_granted_access']; ! break; ! ! case AUTH_MOD: ! $auth_user[$key] = ( $userdata['session_logged_in'] ) ? mx_auth_group( $f_access_group['auth_moderator_group'] ) || $is_admin : 0; ! $auth_user[$key . '_type'] = $lang['Auth_Moderators']; ! break; ! ! case AUTH_ADMIN: ! $auth_user[$key] = $is_admin; ! $auth_user[$key . '_type'] = $lang['Auth_Administrators']; ! break; ! ! default: ! $auth_user[$key] = 0; ! break; ! } ! } ! // Is user a moderator? ! $auth_user['auth_mod'] = ( $userdata['session_logged_in'] ) ? mx_auth_group( $f_access_group['auth_moderator_group'] ) || $is_admin : 0; ! ! return $auth_user; ! } ! ! function page_auth( $type, $userdata, $f_access = '', $f_access_group = '' ) ! { ! global $db, $lang; ! ! $a_sql = 'a.auth_view'; ! $a_sql_groups = 'a.auth_view_group'; ! $auth_fields = array( 'auth_view' ); ! $auth_fields_groups = array( 'auth_view_group' ); ! ! $is_admin = ( $userdata['user_level'] == ADMIN && $userdata['session_logged_in'] ) ? true : 0; ! ! $auth_user = array(); ! for( $i = 0; $i < count( $auth_fields ); $i++ ) ! { ! $key = $auth_fields[$i]; ! $key_groups = $auth_fields_groups[$i]; ! ! $value = $f_access[$key]; ! // $value_groups = $f_access_group[$key_groups]; ! $value_groups = $f_access_group; ! ! switch ( $value ) ! { ! case AUTH_ALL: ! $auth_user[$key] = true; ! $auth_user[$key . '_type'] = $lang['Auth_Anonymous_users']; ! break; ! ! case AUTH_REG: ! $auth_user[$key] = ( $userdata['session_logged_in'] ) ? true : 0; ! $auth_user[$key . '_type'] = $lang['Auth_Registered_Users']; ! break; ! ! case AUTH_ANONYMOUS: ! $auth_user[$key] = ( ! $userdata['session_logged_in'] ) ? true : 0; ! $auth_user[$key . '_type'] = $lang['Auth_Anonymous_users']; ! break; ! ! case AUTH_ACL: // PRIVATE ! $auth_user[$key] = ( $userdata['session_logged_in'] ) ? mx_auth_group( $value_groups ) || $is_admin : 0; ! $auth_user[$key . '_type'] = $lang['Auth_Users_granted_access']; ! break; ! ! case AUTH_MOD: ! $auth_user[$key] = ( $userdata['session_logged_in'] ) ? mx_auth_group( $f_access_group['auth_moderator_group'] ) || $is_admin : 0; ! $auth_user[$key . '_type'] = $lang['Auth_Moderators']; ! break; ! ! case AUTH_ADMIN: ! $auth_user[$key] = $is_admin; ! $auth_user[$key . '_type'] = $lang['Auth_Administrators']; ! break; ! ! default: ! $auth_user[$key] = 0; ! break; ! } ! } ! // Is user a moderator? ! $auth_user['auth_mod'] = ( $userdata['session_logged_in'] ) ? mx_auth_group( $f_access_group['auth_moderator_group'] ) || $is_admin : 0; ! ! return $auth_user; ! } ! // ************************************************************************** ! function menu_auth( $type, $menu_id, $userdata, $f_access = '', $f_access_group = '' ) ! { ! global $db, $lang; ! ! switch ( $type ) ! { ! case AUTH_ALL: ! $a_sql = 'a.auth_view'; ! $auth_fields = array( 'auth_view' ); ! break; ! ! case AUTH_VIEW: ! $a_sql = 'a.auth_view'; ! $auth_fields = array( 'auth_view' ); ! break; ! ! default: ! break; ! } ! // If f_access has been passed, or auth is needed to return an array of menus ! // then we need to pull the auth information on the given menu (or all menus) ! $is_admin = ( $userdata['user_level'] == ADMIN && $userdata['session_logged_in'] ) ? true : 0; ! ! $auth_user = array(); ! for( $i = 0; $i < count( $auth_fields ); $i++ ) ! { ! $key = $auth_fields[$i]; ! // If the user is logged on and the menu type is either ALL or REG then the user has access ! // If the type if ACL, MOD or ADMIN then we need to see if the user has specific permissions ! // to do whatever it is they want to do ... to do this we pull relevant information for the ! // user (and any groups they belong to) ! // Now we compare the users access level against the menus. We assume here that a moderator ! // and admin automatically have access to an ACL menu, similarly we assume admins meet an ! // auth requirement of MOD ! $value = $f_access[$key]; ! ! switch ( $value ) ! { ! case AUTH_ALL: ! $auth_user[$key] = true; ! $auth_user[$key . '_type'] = $lang['Auth_Anonymous_users']; ! break; ! ! case AUTH_REG: ! $auth_user[$key] = ( $userdata['session_logged_in'] ) ? true : 0; ! $auth_user[$key . '_type'] = $lang['Auth_Registered_Users']; ! break; ! ! case AUTH_ANONYMOUS: ! $auth_user[$key] = ( ! $userdata['session_logged_in'] ) ? true : 0; ! $auth_user[$key . '_type'] = $lang['Auth_Anonymous_users']; ! break; ! ! case AUTH_ACL: ! $auth_user[$key] = ( $userdata['session_logged_in'] ) ? mx_auth_group( $f_access_group ) || $is_admin : 0; ! $auth_user[$key . '_type'] = $lang['Auth_Users_granted_access']; ! break; ! ! case AUTH_MOD: ! $auth_user[$key] = ( $userdata['session_logged_in'] ) ? mx_auth_group( $f_access_group ) || $is_admin : 0; ! $auth_user[$key . '_type'] = $lang['Auth_Moderators']; ! break; ! ! case AUTH_ADMIN: ! $auth_user[$key] = $is_admin; ! $auth_user[$key . '_type'] = $lang['Auth_Administrators']; ! break; ! ! default: ! $auth_user[$key] = 0; ! break; ! } ! } ! // Is user a moderator? ! // $auth_user['auth_mod'] = ( $userdata['session_logged_in'] ) ? mx_auth_group( $f_access_group ) || $is_admin : 0; ! ! return $auth_user; ! } ! ! // New optimized get_auth_forum ! // Credits to Markus_Petrux :-) ! function get_auth_forum( $mode = 'phpbb' ) ! { ! global $userdata, $mx_root_path, $phpEx; ! ! switch ( $mode ) ! { ! case 'phpbb': ! ! // Try to reuse auth_view query result. ! $userdata_key = 'mx_get_auth_forum' . $userdata['user_id']; ! if ( !empty( $userdata[$userdata_key] ) ) ! { ! $auth_data_sql = $userdata[$userdata_key]; ! return $auth_data_sql; ! } ! // Now, this tries to optimize DB access involved in auth(), ! // passing AUTH_LIST_ALL will load info for all forums at once. ! $is_auth_ary = auth( AUTH_VIEW, AUTH_LIST_ALL, $userdata ); ! // Loop through the list of forums to retrieve the ids for ! // those with AUTH_VIEW allowed. ! $auth_data_sql = ''; ! foreach( $is_auth_ary as $fid => $is_auth_row ) ! { ! if ( $is_auth_row['auth_view'] ) ! { ! $auth_data_sql .= ( $auth_data_sql != '' ) ? ', ' . $fid : $fid; ! } ! } ! ! if ( empty( $auth_data_sql ) ) ! { ! $auth_data_sql = -1; ! } ! $userdata[$userdata_key] = $auth_data_sql; ! return $auth_data_sql; ! break; ! ! case 'kb': ! ! // Try to reuse auth_view query result. ! $userdata_key = 'mx_get_auth_kb' . $userdata['user_id']; ! if ( !empty( $userdata[$userdata_key] ) ) ! { ! $auth_data_sql = $userdata[$userdata_key]; ! return $auth_data_sql; ! } ! // Now, this tries to optimize DB access involved in auth(), ! // passing AUTH_LIST_ALL will load info for all forums at once. ! ! include_once( $mx_root_path . 'modules/mx_kb/includes/functions_kb_auth.' . $phpEx ); ! $is_auth_ary = kb_auth( AUTH_VIEW, AUTH_LIST_ALL, $userdata ); ! // Loop through the list of forums to retrieve the ids for ! // those with AUTH_VIEW allowed. ! $auth_data_sql = ''; ! foreach( $is_auth_ary as $fid => $is_auth_row ) ! { ! if ( $is_auth_row['auth_view'] ) ! { ! $auth_data_sql .= ( $auth_data_sql != '' ) ? ', ' . $fid : $fid; ! } ! } ! ! if ( empty( $auth_data_sql ) ) ! { ! $auth_data_sql = -1; ! } ! $userdata[$userdata_key] = $auth_data_sql; ! return $auth_data_sql; ! break; ! default: ! //nothing ! break; ! } ! ! } ! ! // Validates if user belongs to group included in group_ids list ! // Also, adds all usergroups to userdata array ! function mx_auth_group( $group_ids = '', $group_mod_mode = false ) ! { ! global $userdata, $db; ! ! if ( $group_ids == '' ) ! { ! return false; ! } ! ! $group_ids_array = explode(",", $group_ids); ! ! // Try to reuse usergroups result. ! if ( $group_mod_mode ) ! { ! $userdata_key = 'mx_usergroups_mod' . $userdata['user_id']; ! ! if ( empty( $userdata[$userdata_key] ) ) ! { ! // Check if user is group moderator.. ! $sql = "SELECT gr.group_id ! FROM " . GROUPS_TABLE . " gr, ! " . USER_GROUP_TABLE . " ugr ! WHERE gr.group_id = ugr.group_id ! AND gr.group_moderator = '" . $userdata['user_id'] . "' ! AND ugr.user_pending = '0' "; ! ! if ( !( $result = $db->sql_query( $sql ) ) ) ! { ! message_die( GENERAL_ERROR, "Could not query group rights information", '', '', '', '' ); ! } ! ! $group_row = $db->sql_fetchrowset( $result ); ! ! $userdata[$userdata_key_mod] = $group_row; ! } ! } ! else ! { ! $userdata_key = 'mx_usergroups' . $userdata['user_id']; ! ! if ( empty( $userdata[$userdata_key] ) ) ! { ! // Check if user is member of the proper group.. ! $sql = "SELECT group_id FROM " . USER_GROUP_TABLE . " WHERE user_id='" . $userdata['user_id'] . "' AND user_pending = 0"; ! ! if ( !( $result = $db->sql_query( $sql ) ) ) ! { ! message_die( GENERAL_ERROR, "Could not query group rights information", '', '', '', '' ); ! } ! ! $group_row = $db->sql_fetchrowset( $result ); ! ! $userdata[$userdata_key] = $group_row; ! } ! } ! ! for ( $i = 0; $i < count( $userdata[$userdata_key] ); $i++ ) ! { ! if ( in_array( $userdata[$userdata_key][$i]['group_id'], $group_ids_array ) ) ! { ! $is_member = true; ! return $is_member; ! } ! } ! ! return false; ! } ?> \ No newline at end of file Index: mx_functions.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/mx_functions.php,v retrieving revision 1.34 retrieving revision 1.35 diff -C2 -d -r1.34 -r1.35 *** mx_functions.php 12 Apr 2005 19:02:30 -0000 1.34 --- mx_functions.php 13 Apr 2005 21:23:25 -0000 1.35 *************** *** 1,1288 **** ! <?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 : ! * ------------------------------------------------------------------------- [...2549 lines suppressed...] ! function is_post($var) ! { ! global $HTTP_POST_VARS; ! // Note: _x and _y are used by (at least IE) to return the mouse position at onclick of INPUT TYPE="img" elements. ! return ( isset($HTTP_POST_VARS[$var]) || ( isset($HTTP_POST_VARS[$var.'_x']) && isset($HTTP_POST_VARS[$var.'_y']) ) ); ! } ! function is_get($var) ! { ! global $HTTP_GET_VARS; ! return ( isset($HTTP_GET_VARS[$var]) ); ! } ! function is_request($var) ! { ! return ( $this->is_get($var) || $this->is_post($var) ); ! } ! ! } // class mx_request_vars ! ?> \ No newline at end of file |
|
From: Markus P. <mar...@us...> - 2005-04-13 21:23:47
|
Update of /cvsroot/mxbb/core/language/lang_english In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3079/language/lang_english Modified Files: lang_admin.php lang_main.php Log Message: ok, second step on fixing double line breaks. I think this is all. Index: lang_main.php =================================================================== RCS file: /cvsroot/mxbb/core/language/lang_english/lang_main.php,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** lang_main.php 12 Apr 2005 19:29:01 -0000 1.16 --- lang_main.php 13 Apr 2005 21:23:28 -0000 1.17 *************** *** 1,109 **** ! <?php ! /*************************************************************************** ! * lang_main.php [English] ! * ------------------- ! * copyright : (C) 2003 mxBB Portal ! * email : jon...@ho... ! * ! * $Id$ ! * ! ****************************************************************************/ ! ! // ! // The format of this file is: ! // ! // ---> $lang["message"] = "text"; ! // ! // Specify your language character encoding... [optional] ! // ! // setlocale(LC_ALL, "en"); ! ! // Menu_nav.php ! $lang['Home Page'] = "Portal Home"; ! $lang['Announcements'] = "Announcements"; ! $lang['Forum'] = "Forum"; ! $lang['Main Menu'] = "Main Menu"; ! $lang['Module Statistics'] = "Statistics"; ! $lang['Send a Private message'] = "Send Private message"; ! $lang['Edit your Profile'] = "Edit Your Profile"; ! ! $lang['Portal_lang'] = "Language CP"; // Blocktitle ! $lang['SELECTGUILANG'] = "Select Language:"; ! ! $lang['Change'] = "Change now"; ! $lang['Change_default_style'] = "Set Board Default Style"; ! $lang['Change_user_style'] = "Set Your Style"; ! ! $lang['Change_default_lang'] = "Set Board Default Language"; ! $lang['Change_user_lang'] = "Set Your Language"; ! ! $lang['Block_Title'] = "Title"; ! $lang['Block_Info'] = "Information"; ! ! $lang['Theme'] = "Theme/Style CP"; // Blocktitle ! $lang['SelectTheme'] = "Select Theme/Style:"; ! ! $lang['Surveys/Polls'] = "Surveys/Polls"; ! $lang['Already_voted'] = "You have already voted"; ! $lang['Click_view_voted'] = "Click %sHere%s to view the results"; ! ! $lang['Annonce_sent'] = "The announcement has been sent"; ! $lang['Annonce_Deleted'] = "The announcement has been deleted"; ! ! $lang['Block_Config_updated'] = "Block Configuration updated successfully"; ! $lang['Block_Edit'] = "Edit Block Configuration"; ! ! // ! // New for v. 2.704 ! // ! ! $lang['Page_Not_Authorised'] = "Sorry, but you are not authorized to access this page."; ! ! // ! // New for v. 2.705 ! // ! ! $lang['Execution_Stats'] = "Page generated %s queries - Generation time: %s seconds"; ! ! // ! // New for v. 2.7.3 ! // ! ! $lang['Redirect_login'] = "Click %sHere%s to login."; ! ! // ! // New for v. 2.7.4 - 2.8 ! // ! $lang['Show_admin_options'] = "Show/Hide admin options: "; ! $lang['Hidden_block'] = "Hidden block..."; ! ! $lang['General_updated_return_settings'] = "Configuration updated successfully...<br /><br />Click %shere%s to continue."; // %s's for URI params - DO NOT REMOVE ! $lang['General_update_error'] = "Couldn't update configuration..."; ! ! $lang['Mx_Page'] = "Page"; ! $lang['Mx_Block'] = "Section"; ! ! $lang['Mx_search_site'] = "Site"; ! $lang['Mx_search_forum'] = "Forum"; ! $lang['Mx_search_kb'] = "KB articles"; ! $lang['Mx_search_google'] = "Google"; ! ! $lang['Block_updated_by'] = "Updated by "; ! $lang['No_items_found'] = "Nothing new to report... "; ! ! $lang['Powered_by'] = "Powered by "; ! $lang['Modules_copy'] = "and mxBB Modules "; ! ! $lang['mx_copy_text'] = '<b>mxBB - modular Portal & CMS for phpBB!</b> <br /><br/> mxBB is a fully modular portal and CMS for phpBB, featuring dynamic pages/blocks/themes by means of a powerful yet flexible Admin CP. While it uses integrated features, it works without touching phpBB. mxBB-Portal is the classical phpBB portal add-on, improved and enhanced for every phpBB version since 2001. <br /><br />Authors: Jon Ohlsson, Marc Morissette, Markus, Jaime, Luke Finnigan & Snake - the mxBB Development Team. <br />Please visit <a href="http://www.mx-system.com/">www.mx-system.com</a> for further information.'; ! $lang['mx_modules_text'] = '<b>mxBB Modules</b>'; ! ! $lang['mx_copy'] = 'mxBB Copyrights Info'; ! ! $lang['Yes'] = 'Yes'; ! $lang['No'] = 'No'; ! ! // ! // That's all Folks! ! // ------------------------------------------------- ! ?> \ No newline at end of file --- 1,109 ---- ! <?php ! /*************************************************************************** ! * lang_main.php [English] ! * ------------------- ! * copyright : (C) 2003 mxBB Portal ! * email : jon...@ho... ! * ! * $Id$ ! * ! ****************************************************************************/ ! ! // ! // The format of this file is: ! // ! // ---> $lang["message"] = "text"; ! // ! // Specify your language character encoding... [optional] ! // ! // setlocale(LC_ALL, "en"); ! ! // Menu_nav.php ! $lang['Home Page'] = "Portal Home"; ! $lang['Announcements'] = "Announcements"; ! $lang['Forum'] = "Forum"; ! $lang['Main Menu'] = "Main Menu"; ! $lang['Module Statistics'] = "Statistics"; ! $lang['Send a Private message'] = "Send Private message"; ! $lang['Edit your Profile'] = "Edit Your Profile"; ! ! $lang['Portal_lang'] = "Language CP"; // Blocktitle ! $lang['SELECTGUILANG'] = "Select Language:"; ! ! $lang['Change'] = "Change now"; ! $lang['Change_default_style'] = "Set Board Default Style"; ! $lang['Change_user_style'] = "Set Your Style"; ! ! $lang['Change_default_lang'] = "Set Board Default Language"; ! $lang['Change_user_lang'] = "Set Your Language"; ! ! $lang['Block_Title'] = "Title"; ! $lang['Block_Info'] = "Information"; ! ! $lang['Theme'] = "Theme/Style CP"; // Blocktitle ! $lang['SelectTheme'] = "Select Theme/Style:"; ! ! $lang['Surveys/Polls'] = "Surveys/Polls"; ! $lang['Already_voted'] = "You have already voted"; ! $lang['Click_view_voted'] = "Click %sHere%s to view the results"; ! ! $lang['Annonce_sent'] = "The announcement has been sent"; ! $lang['Annonce_Deleted'] = "The announcement has been deleted"; ! ! $lang['Block_Config_updated'] = "Block Configuration updated successfully"; ! $lang['Block_Edit'] = "Edit Block Configuration"; ! ! // ! // New for v. 2.704 ! // ! ! $lang['Page_Not_Authorised'] = "Sorry, but you are not authorized to access this page."; ! ! // ! // New for v. 2.705 ! // ! ! $lang['Execution_Stats'] = "Page generated %s queries - Generation time: %s seconds"; ! ! // ! // New for v. 2.7.3 ! // ! ! $lang['Redirect_login'] = "Click %sHere%s to login."; ! ! // ! // New for v. 2.7.4 - 2.8 ! // ! $lang['Show_admin_options'] = "Show/Hide admin options: "; ! $lang['Hidden_block'] = "Hidden block..."; ! ! $lang['General_updated_return_settings'] = "Configuration updated successfully...<br /><br />Click %shere%s to continue."; // %s's for URI params - DO NOT REMOVE ! $lang['General_update_error'] = "Couldn't update configuration..."; ! ! $lang['Mx_Page'] = "Page"; ! $lang['Mx_Block'] = "Section"; ! ! $lang['Mx_search_site'] = "Site"; ! $lang['Mx_search_forum'] = "Forum"; ! $lang['Mx_search_kb'] = "KB articles"; ! $lang['Mx_search_google'] = "Google"; ! ! $lang['Block_updated_by'] = "Updated by "; ! $lang['No_items_found'] = "Nothing new to report... "; ! ! $lang['Powered_by'] = "Powered by "; ! $lang['Modules_copy'] = "and mxBB Modules "; ! ! $lang['mx_copy_text'] = '<b>mxBB - modular Portal & CMS for phpBB!</b> <br /><br/> mxBB is a fully modular portal and CMS for phpBB, featuring dynamic pages/blocks/themes by means of a powerful yet flexible Admin CP. While it uses integrated features, it works without touching phpBB. mxBB-Portal is the classical phpBB portal add-on, improved and enhanced for every phpBB version since 2001. <br /><br />Authors: Jon Ohlsson, Marc Morissette, Markus, Jaime, Luke Finnigan & Snake - the mxBB Development Team. <br />Please visit <a href="http://www.mx-system.com/">www.mx-system.com</a> for further information.'; ! $lang['mx_modules_text'] = '<b>mxBB Modules</b>'; ! ! $lang['mx_copy'] = 'mxBB Copyrights Info'; ! ! $lang['Yes'] = 'Yes'; ! $lang['No'] = 'No'; ! ! // ! // That's all Folks! ! // ------------------------------------------------- ! ?> \ No newline at end of file Index: lang_admin.php =================================================================== RCS file: /cvsroot/mxbb/core/language/lang_english/lang_admin.php,v retrieving revision 1.35 retrieving revision 1.36 diff -C2 -d -r1.35 -r1.36 *** lang_admin.php 12 Apr 2005 19:28:51 -0000 1.35 --- lang_admin.php 13 Apr 2005 21:23:28 -0000 1.36 *************** *** 1,372 **** ! <?php ! /*************************************************************************** ! * lang_admin.php [English] ! * ------------------- ! * copyright : (C) 2003 mxBB-Portal ! * email : su...@mx... ! * ! * $Id$ ! * ! * Rev. hist : Created by MarcMoris (su...@mx...), ! reedited by Haplo (jon...@ho...) ! ****************************************************************************/ ! ! // ! // Editor Settings: Please, set Tabsize to 4 ;-) ! // ! ! // ! // The format of this file is: ! // ! // ---> $lang["message"] = "text"; ! // ! // Specify your language character encoding... [optional] ! // ! // setlocale(LC_ALL, "en"); ! ! ! // ! // Configuration ! // ! $lang['Portal_admin'] = "Portal Administration"; ! $lang['Portal_admin_explain'] = "Use this form to customize your portal"; ! $lang['Portal_General_Config'] = "Portal Configuration"; ! $lang['Portal_General_settings'] = "General Settings"; ! $lang['Portal_General_config_info'] = "General Portal Config Info "; ! $lang['Portal_General_config_info_explain'] = "Posted setup info from the config.php file (no edits needed)"; ! $lang['Portal_Name'] = "Portal Name:"; ! $lang['Portal_PHPBB_Url'] = "URL to your phpBB installation:"; ! $lang['Portal_Url'] = "URL to mxBB-Portal:"; ! $lang['Portal_Config_updated'] = "Portal Configuration Updated Successfully"; ! $lang['Click_return_portal_config'] = "Click %sHere%s to return to Portal Configuration"; ! ! ! // ! // Menu Management ! // ! $lang['Menu_admin'] = "Navigation Menu Administration"; ! $lang['Menu_admin_explain'] = "Use this form to customize your Navigation Menu"; ! $lang['Menu_edit_delete_explain'] = "Use this form to customize your Navigation Menu"; ! $lang['Menu_settings'] = "Navigation Menu Information"; ! $lang['Menu_delete'] = "Delete a Navigation Menu"; ! $lang['Menu_delete_explain'] = "Use this form to delete (and/or move) a Navigation Menu and its subelement(s)"; ! $lang['Edit_menu'] = "Edit a Navigation Menu"; ! $lang['Update'] = "Update"; ! $lang['Create_menu'] = "Add new Navigation Menu"; ! $lang['Create_category'] = "Add new Navigation Category"; ! $lang['Menu_Config_updated'] = "Navigation Menu Configuration Updated Successfully"; ! $lang['Menus_updated'] = "Menu and Category information updated successfully"; ! $lang['Click_return_menuadmin'] = "Click %sHere%s to return to Navigation Menu Administration"; ! $lang['Menu_name'] = "Navigation Menu Name"; ! $lang['Menu_icon'] = "Navigation Menu Icon<br /> - the *_hot.gif pic is only used when 'Mark Current Page' is enabled."; ! $lang['Menu_desc'] = "Description"; ! $lang['Edit'] = "Edit"; ! $lang['Delete'] = "Delete"; ! $lang['Move_up'] = "Move up"; ! $lang['Move_down'] = "Move down"; ! $lang['Resync'] = "Resync"; ! $lang['Click_return_admin_index'] = "Click %sHere%s to return to the Administration Index"; ! ! ! // ! // Module Management ! // ! $lang['Module'] = "Module"; ! $lang['Module_admin'] = "Module Administration"; ! $lang['Module_admin_explain'] = "Use this form to customize Modules"; ! $lang['Column_delete'] = "Delete a Column"; ! $lang['Module_delete'] = "Delete a Module"; ! $lang['Module_delete_explain'] = "Use this form to delete a Module (or function)"; ! $lang['Edit_module'] = "Edit a Module"; ! $lang['Create_module'] = "Create new Module"; ! $lang['Module_Config_updated'] = "Module Configuration Updated Successfully"; ! $lang['Module_updated'] = "Module Information Updated successfully"; ! $lang['Click_return_module_admin'] = "Click %sHere%s to return to Module Administration"; ! $lang['Column_name'] = "Column Name"; ! $lang['Module_name'] = "Module Name"; ! $lang['Module_desc'] = "Description"; ! $lang['Module_path'] = "Path"; ! $lang['Create_column'] = "Add new Column"; ! $lang['Column'] = "Column"; ! $lang['Edit_Column'] = "Edit a Column"; ! $lang['Edit_Column_explain'] = "Use this form to modify a column"; ! $lang['Column_Size'] = "Size of the column"; ! ! // ! // These are displayed in the drop down boxes for advanced ! // mode Module auth, try and keep them short! ! // ! $lang['Menu_Navigation'] = "Navigation Menu"; ! $lang['Modules'] = "Modules"; ! $lang['Portal_index'] = "Portal Index"; ! $lang['Poll_Display'] = "Which Poll do you want to display?"; ! $lang['Meta_admin'] = "Meta Tags Administration"; ! $lang['Mega_admin_explain'] = "Use this form to customize your meta tags"; ! $lang['Meta_Title'] = "Title"; ! $lang['Meta_Author'] = "Author"; ! $lang['Meta_Copyright'] = "Copyright"; ! $lang['Meta_Keywords'] = "Keywords"; ! $lang['Meta_Keywords_explain'] = "(comma seperated list)"; ! $lang['Meta_Description'] = "Description"; ! $lang['Meta_Language'] = "Language Code"; ! $lang['Meta_Rating'] = "Rating"; ! $lang['Meta_Robots'] = "Robots"; ! $lang['Meta_Pragma'] = "Pragma no-cache"; ! $lang['Meta_Bookmark_icon'] = "Bookmark Icon"; ! $lang['Meta_Bookmark_explain'] = "(relative location)"; ! $lang['Meta_HTITLE'] = "Extra Header Settings"; ! $lang['Meta_data_updated'] = "Meta data file (mx_meta.inc) has been updated!<br />Click %sHERE%s to return to Meta Tags Administration."; ! $lang['Meta_data_ioerror'] = "Unable to open mx_meta.inc. Make sure the file is writable (chmod 777)."; ! $lang['Create_block'] = "Create new Block"; ! $lang['Block_delete'] = "Delete a Block"; ! $lang['Block_delete_explain'] = "Use this form to delete a Block (or column)"; ! $lang['Block'] = "Block"; ! $lang['Block_title'] = "Title"; ! $lang['Block_desc'] = "Description"; ! $lang['Add_Block'] = "Add new Block"; ! $lang['Auth_Block'] = "Permissions"; ! $lang['AUTH_ALL'] = "ALL"; ! $lang['AUTH_REG'] = "REG"; ! $lang['AUTH_PRIVATE'] = "PRIVATE"; ! $lang['AUTH_MOD'] = "MOD"; ! $lang['AUTH_ADMIN'] = "ADMIN"; ! $lang['AUTH_ANONYMOUS'] = "ANONYMOUS"; ! $lang['Function'] = "Function"; ! $lang['Settings'] = "Settings"; ! $lang['Save_Settings'] = "Save Settings"; ! $lang['announce_nbr_display'] = "Number of Messages to display (max)"; ! $lang['announce_nbr_days'] = "Number of Days to Display Messages"; ! $lang['announce_img'] = "Announcement Image"; ! $lang['announce_img_sticky'] = "Sticky Image"; ! $lang['announce_img_normal'] = "Normal Message Image"; ! $lang['announce_img_global'] = "Global Announcement Image"; ! $lang['announce_display'] = "Display Announcement(s) messages in this Block"; ! $lang['announce_display_sticky'] = "Display Sticky(ies) in this Block"; ! $lang['announce_display_normal'] = "Display Normal message(s) in this Block"; ! $lang['announce_display_global'] = "Display Global Announcements in this Block"; ! $lang['announce_forum'] = "Source Forums<br /> You may make multiple selections<br />* If none is selected, all authorized forums will be visible"; ! $lang['poll_forum'] = "Source Forums<br /> You may make multiple selections<br />* If none is selected, all authorized forums will be visible"; ! $lang['Function_admin'] = "Function Administration"; ! $lang['Function_admin_explain'] = "Each Module has one or more Functions. Use this form to edit, add, or delete a Function"; ! $lang['Function_name'] = "Function Name"; ! $lang['Function_desc'] = "Description"; ! $lang['Function_file'] = "File ( Script )"; ! $lang['Create_function'] = "Add new Function"; ! $lang['Parameter_name'] = "Name "; ! $lang['Parameter_desc'] = "Description"; ! $lang['Parameter_type'] = "Type"; ! $lang['Parameter_default'] = "Default Value"; ! $lang['import_module_pack'] = "Install Module"; ! $lang['import_module_pack_explain'] = "This will add a Module to the portal. Be sure the Module Package is uploaded to the /modules folder. Remember to use the latest Module version!"; ! $lang['upgrade_module_pack'] = "Upgrade Module"; ! $lang['upgrade_module_pack_explain']= "This will upgrade your Module. Be sure to read the Module Documentation before proceeding, or you may risk module data loss."; ! $lang['export_module_pack'] = "Export Module"; ! $lang['Export_Module'] = "Select a Module:"; ! $lang['export_module_pack_explain'] = "This will export a Module *.pak file. This is only intended for Module writers..."; ! $lang['Not_Specified'] = "Not Specified"; ! $lang['Page'] = "Page"; ! $lang['Add_Page'] = "Add new Page"; ! $lang['Block_admin'] = "Block Administration"; ! $lang['Block_admin_explain'] = "Use this form to add, delete and change the settings for each block."; ! $lang['Module_include_admin'] = "Include this module in Admin Menu Navigation"; ! $lang['Translation_Tools'] = "Translation Tools"; ! $lang['Create_parameter'] = "Add new Parameter"; ! $lang['Parameter_admin'] = "Parameter Administration"; ! $lang['Parameter_admin_explain'] = "List all Parameters for this Function"; ! $lang['Parameter_id'] = "ID"; ! $lang['Parameter_function'] = "Function"; ! $lang['Preview_portal'] = "Preview Portal"; ! $lang['Page_admin'] = "Page Administration"; ! $lang['Page_Config_updated'] = "Page Configuration Updated Successfully"; ! $lang['Page_updated'] = "Page and Column information updated successfully"; ! $lang['Click_return_page_admin'] = "Click %sHere%s to return to Page Administration"; ! ! $lang['Module_delete_db'] = "Do you really want to uninstall the Module? Warning: you will lose all Module data. Consider upgrading instead..."; ! $lang['Click_module_delete_db_yes'] = "Click %sHere%s to uninstall the Module"; ! ! ! // ! // Install Process ! // ! $lang['Welcome_install'] = "Welcome to the mxBB-Portal Installation Guide"; ! $lang['Install_Instruction'] = "Please, fill out the details requested below. This installation program will create your personalized config.php (in the Portal root directory) and the Portal database with default settings. Once this is done, you'll see a report of all the steps taken (please note mxBB-Portal does not modify your phpBB database in any way). Then, you should login to your board with your administrator username and password and go to the Administration Control Panel to configure your portal upon your own needs. Please note mxBB-Portal will not work by itself, phpBB must already be installed and configured. Thank you for choosing mxBB-Portal."; ! $lang['Upgrade_Instruction'] = "mxBB-Portal is already installed. Please, make backups of your database now !<br /><br />The next step will modify the structure of your database (please note mxBB-Portal does not modify your phpBB database in any way). If for whatever reason this upgrade procedure fails, there would be no other way to return to your current state. Please, make backups of your database BEFORE proceeding !<br /><br />Once done, click the button below to start the upgrade procedure."; ! $lang['Install_moreinfo'] = "%sRelease Notes%s | %sWelcome Pack%s | %sOnline FAQ%s | %sSupport Forums%s | %sTerms Of Use%s"; ! $lang['Install_settings'] = "Installation Settings"; ! $lang['Choose_lang_explain'] = "Please, use the form below to select the language you wish to use thoughtout the installation panels."; ! $lang['Choose_lang'] = "Choose Language"; ! $lang['Language'] = "Language"; ! $lang['Phpbb_path'] = "phpBB relative path"; ! $lang['Phpbb_path_explain'] = "Relative path to phpBB, eg phpBB/ or ../phpBB/<br />Note the slashes '/', they are important!"; ! $lang['Phpbb_url'] = "Full phpBB URL"; ! $lang['Phpbb_url_explain'] = "Full phpBB URL, eg<br />http://www.example.com/phpBB/"; ! $lang['Portal_url'] = "Full Portal URL"; ! $lang['Portal_url_explain'] = "Full Portal URL, eg<br />http://www.example.com/"; ! $lang['Database_settings'] = "Database Settings"; ! $lang['dbms'] = "Database Type"; ! $lang['DB_Host'] = "Database Server Hostname/DSN"; ! $lang['DB_Name'] = "Your Database Name"; ! $lang['DB_Username'] = "Database Username"; ! $lang['DB_Password'] = "Database Password"; ! $lang['Table_Prefix'] = "phpBB Prefix in DB"; ! $lang['MX_Table_Prefix'] = "mxBB-Portal Prefix in DB"; ! $lang['Start_Install'] = "Start mxBB Installation"; ! $lang['Start_Upgrade'] = "Yes, I already did a backup and wish to upgrade my mxBB-Portal now."; ! $lang['Portal_intalled'] = "mxBB-Portal has been installed !"; ! $lang['Portal_upgraded'] = "mxBB-Portal has been upgraded !"; ! $lang['Unwriteable_config'] = "Your mxBB config file (config.php) is un-writeable at present.<br /><br />A copy of the config file will be downloaded to you when you click the button below. You should upload this file to your mxBB root directory: %s <br /><br />Once this is done, please %sREFRESH%s this window to proceed with the next installation step.<br /><br />Thank you for choosing mxBB-Portal.<br />"; ! $lang['Send_file'] = "Just send the file to me and I'll FTP it manually"; ! $lang['phpBB_nfnd_retry'] = "Sorry, we could not find your phpBB installation. Please, press the %sBACK%s button of your browser and retry."; ! $lang['Installation_error'] = "An error has occurred during installation"; ! $lang['Debug_Information'] = "DEBUG INFORMATION"; ! $lang['Install_phpbb_not_found'] = "Sorry, we cound not find any phpBB board installed on this server.<br />Please, install phpBB BEFORE installing mxBB-Portal.<br />\n<br />\n"; ! $lang['Install_phpbb_db_failed'] = "Sorry, we could not connect to the phpBB database.<br />Please, check your phpBB is correctly installed, up and running BEFORE installing mxBB-Portal.<br />\n<br />\n"; ! $lang['Install_phpbb_unsupported'] = "Unfortunately, the phpBB board installed on this server is not supported by mxBB-Portal.<br />Please, check the release notes for installation requirements.<br />\n<br />\n"; ! $lang['Install_noscript_warning'] = "Sorry, this installation requires a JavaScript enabled browser. It might not work on your browser."; ! $lang['Upgrade_are_you_sure'] = "This upgrade procedure will make modifications to your database. Are you sure you wish to proceed?"; ! $lang['Writing_config'] = "Writing config.php file"; ! $lang['Processing_schema'] = "Processing SQL Schema '%s'"; ! $lang['Portal_intalling'] = "Installing mxBB-Portal version %s"; ! $lang['Portal_upgrading'] = "Upgrading mxBB-Portal version %s"; ! $lang['Install_warning'] = "There was 1 warning updating the database"; ! $lang['Install_warnings'] = "There were %d warnings updating the database"; ! $lang['Subscribe_mxBB_News_now'] = "We recommend that you subscribe to the %smxBB-News Mailing List%s to receive information about important news and release announcements.<br /> <br />%sSubscribe to mxBB-News, now!%s"; ! $lang['Portal_install_done'][0] = "At this point your basic installation is complete."; ! $lang['Portal_install_done'][1] = "Please, delete the /install and /contrib folders BEFORE proceeding!!!"; ! $lang['Portal_install_done'][2] = "Remember to make backups as often as possible ;-)"; ! $lang['Portal_install_done'][3] = "Press the button below and use your Administrator username and password to login to the system."; ! $lang['Portal_install_done'][4] = "Please be sure to check the Portal Configurations and make any required changes."; ! $lang['Thanks_for_choosing'] = "Thank you for choosing mxBB-Portal."; ! $lang['Critical_Error'] = "CRITICAL ERROR"; ! $lang['Error_loading_config'] = "Sorry, could not load mxBB-Portal config.php"; ! $lang['Error_database_down'] = "Sorry, could not connect to database."; ! ! ! // ! // New for v. 2.704 ! // ! $lang['Page_Id'] = "Page ID"; ! $lang['Page_icon'] = "Page Icon <br /> - to be used in the adminCP only, eg. icon_home.gif (default)"; ! $lang['Page_header'] = "Page header file <br /> - i.e. overall_header.php (default), overall_noheader.php (no header) or user custom header file."; ! $lang['Auth_Page'] = "Permissions"; ! ! $lang['Cache_dir_write_protect'] = "Your cache directory is write-protected. Unable to generate the cache file"; ! $lang['Cache_generate'] = "Your cache files have been generated. ;-)"; ! $lang['Cache_submit'] = "Generate the cache file?"; ! $lang['Cache_explain'] = "With this option you can generate all XML files (cache files) at once for all portal blocks. These files allow the reduction of the number of database queries needed, and improves overall portal performance. <br />Note: the mxBB cache must be enabled (in the Portal General Admin CP) for these files to be used by the system.<br>Further note: the cache files are created on the fly when editing blocks as well."; ! ! ! // ! // New for v. 2.706 ! // ! $lang['MX_Portal'] = "mxBB-Portal"; ! $lang['MX_Modules'] = "mxBB-Modules"; ! $lang['Phpbb'] = "phpBB"; ! ! $lang['Top_phpbb_links'] = "Show phpBB header links <br /> - new/unread posts etc on the portal front page"; ! $lang['Auth_Page_group'] = "-> PRIVATE Group"; ! ! ! // New for v. 2.7.1 ! $lang['Error_no_db_install'] = "Error: The file db_install.php does not exist. Please verify this and try again..."; ! $lang['Error_no_db_uninstall'] = "Error: The file db_uninstall.php does not exist, or the uninstall feature is not supported for this module. Please verify this and try again..."; ! $lang['Error_no_db_upgrade'] = "Error: The file db_upgrade.php does not exist, or the upgrade feature is not supported for this module. Please verify this and try again..."; ! $lang['Error_module_installed'] = "Error: This module is already installed! Please either first delete module, or upgrade the module instead."; ! ! $lang['Menu_links'] = "Menu URL<br />- Link to external page (enter full URL) or internal page (enter relative path)<br />- This option may be used together with 'Link Target: - iframe mode'."; ! $lang['Menu_page'] = "Menu Page (default/standard) <br />- link to internal portal page<br />NOTE: Pages are created using Page Administration."; ! $lang['Menu_block'] = "Dynamic Block<br />- need a dynamic block on the Page to handle the setting"; ! $lang['Menu_function'] = "Menu Function (dev only)<br />- link to mxBB specific function (not available)"; ! $lang['Menu_action_title'] = "<b>Menu Action:</b> <br /><i>(Chose one of the 4 options below.)</i> "; ! $lang['Menu_action_adv'] = "<b>Advanced Menu Actions:</b> <br /><i>(Use carefully - intended for developers only):</i>"; ! $lang['Menu_permissions_title'] = "<b>View/Edit Permissions:</b>"; ! $lang['Link_target'] = "Link Target:<br />- 'default', open in this browser<br />- 'new browser', open in new browser<br />- 'iframe mode', open url (given below) in page with IncludeX block."; ! $lang['Portal_version'] = "mxBB-Portal Version:"; ! ! $lang['PHPBB_info'] = "phpBB Info"; ! $lang['PHPBB_version'] = "phpBB Version:"; ! $lang['PHPBB_script_path'] = "phpBB Script Path:"; ! $lang['PHPBB_server_name'] = "phpBB Domain (server_name):"; ! ! ! // ! // New for v. 2.7.3 ! // ! $lang['Return_to_page'] = "Return to Portal Page"; ! ! ! // ! // New for v. 2.7.4 - 2.8 ! // ! ! // Page templates ! $lang['Choose_page_template'] = "Choose Page Template"; ! $lang['Template_Config_updated'] = "Template Configuration Updated"; ! $lang['Page_templates_admin'] = "Page Templates Administration"; ! $lang['Page_templates_admin_explain'] = "Use this page to create, edit or delete Page Templates"; ! $lang['Add_Template'] = "Add new Template"; ! $lang['Template'] = "Template"; ! $lang['Page_template_delete'] = "Delete Template"; ! ! // Navigation menu ! $lang['Menu_display_mode'] = "Navigation Mode:<br /> - span horizontal or vertical"; ! $lang['Menu_page_sync'] = "Highlight selected page in navigation menu<br /> - current menu option is highlighted and its icon will be switched (if you have a *_hot.gif)"; ! $lang['Menu_par_title'] = "General Menu Navigation Settings:"; ! $lang['Show_cat'] = "Folded/Unfolded Category: <br /> - Default value, before user value is set:"; ! ! // Split column ! $lang['block_ids'] = "Source Blocks<br /> - to be placed left to right"; ! $lang['block_sizes'] = "Block Sizes (comma separated)<br />- You may specify size using numbers (pixels), percentages (relative sizes, ie. '40%') or '*' for the remainder."; ! $lang['space_between'] = "Space between Blocks"; ! ! ! $lang['Page_desc'] = "Description"; ! ! $lang['Show_title'] = "Show this Block Title"; ! $lang['Show_block'] = "Show this Block <br />(if 'no', the Block is hidden to all users, except administrators)"; ! $lang['Show_stats'] = "Show Block Statistics <br />(if 'yes', 'edited by...' will be displayed below the block)"; ! ! $lang['Page_graph_border'] = "Page border graphics - file prefix"; ! $lang['Page_graph_border_explain'] = "To use border graphics around Blocks, specify the prefix for the graphics files here. For example, enter 'border_' to use the files: border_1-1.gif, border_1-2.gif,..., border_3-3.gif for the 3x3 matrix with gif-images. Leave blank to disable border graphics (default)."; ! ! $lang['Uninstall_module'] = "Uninstall"; ! ! // Portal permissons ! $lang['Mx_Block_Auth_Title'] = "Private Block Permissions" ; ! $lang['Mx_Block_Auth_Explain'] = "Here you can configure Private Block Permissions"; ! $lang['Mx_Page_Auth_Title'] = "Private Page Permissions" ; ! $lang['Mx_Page_Auth_Explain'] = "Here you configure Private Page Permissions"; ! $lang['Block_Auth_successfully'] = "Block Permissions Updated Successfully"; ! $lang['Click_return_block_auth'] = "Click %sHere%s to return to Private Block Permissions"; ! $lang['Page_Auth_successfully'] = "Page Permissions Updated Successfully"; ! $lang['Click_return_page_auth'] = "Click %sHere%s to return to Private Page Permissions"; ! ! // Stats ! $lang['log_filter_date'] = "Filter by time<br />Show logs from last week, month, year..."; ! $lang['msg_filter_date'] = "Filter by time<br />Show posts from last week, month, year..."; ! ! // IncludeX ! $lang['x_listen'] = "Listen (GET)"; ! $lang['x_iframe'] = "IFrame"; ! $lang['x_textfile'] = "Textfile"; ! $lang['x_multimedia'] = "WMP Multimedia"; ! $lang['x_pic'] = "Pic"; ! $lang['x_format'] = "Formatted Textfile"; ! ! $lang['x_mode'] = '<b>IncludeX mode:</b><br /> The IncludeX block operates in one of the following modes. If mode \'Listen (GET)\' is selected, the mode may be set by a url \'x_mode=mode\' and associated parameters with \'x_1=, x_2=, etc\'.<br />Example: To pass a url to a iframe use \'domain/index.php?page=x&x_mode=iframe&x_1=http://domain\' '; ! $lang['x_1'] = '<b>Variable 1:</b><br /><i>IFrame:</i> url<br /><i>Textfile:</i> file (located in \'/include_file\')<br /><i>Multimedia:</i> file (located in \'/include_file\')<br /><i>Pic:</i> file (located in \'/include_file\')<br /><i>Formatted textfile:</i> not available'; ! $lang['x_2'] = '<b>Variable 2:</b><br /><i>IFrame:</i> frame height (pixels)<br /><i>Multimedia:</i> width (pixles)'; ! $lang['x_3'] = '<b>Variable 3:</b><br /><i>Multimedia:</i> height (pixles)'; ! ! $lang['Yes'] = "Yes"; ! $lang['No'] = "No"; ! ! // Cache ! $lang['Mx_use_cache'] = "Use mxBB Block Cache<br />- Block data is cached to individual cache/block_*.xml files. Block cache files are created when Blocks are edited."; ! $lang['Generate_mx_cache'] = "Generate Block Cache"; ! ! ! // ! // That's all Folks! ! // ------------------------------------------------- ?> \ No newline at end of file --- 1,372 ---- ! <?php ! /*************************************************************************** ! * lang_admin.php [English] ! * ------------------- ! * copyright : (C) 2003 mxBB-Portal ! * email : su...@mx... ! * ! * $Id$ ! * ! * Rev. hist : Created by MarcMoris (su...@mx...), ! reedited by Haplo (jon...@ho...) ! ****************************************************************************/ ! ! // ! // Editor Settings: Please, set Tabsize to 4 ;-) ! // ! ! // ! // The format of this file is: ! // ! // ---> $lang["message"] = "text"; ! // ! // Specify your language character encoding... [optional] ! // ! // setlocale(LC_ALL, "en"); ! ! ! // ! // Configuration ! // ! $lang['Portal_admin'] = "Portal Administration"; ! $lang['Portal_admin_explain'] = "Use this form to customize your portal"; ! $lang['Portal_General_Config'] = "Portal Configuration"; ! $lang['Portal_General_settings'] = "General Settings"; ! $lang['Portal_General_config_info'] = "General Portal Config Info "; ! $lang['Portal_General_config_info_explain'] = "Posted setup info from the config.php file (no edits needed)"; ! $lang['Portal_Name'] = "Portal Name:"; ! $lang['Portal_PHPBB_Url'] = "URL to your phpBB installation:"; ! $lang['Portal_Url'] = "URL to mxBB-Portal:"; ! $lang['Portal_Config_updated'] = "Portal Configuration Updated Successfully"; ! $lang['Click_return_portal_config'] = "Click %sHere%s to return to Portal Configuration"; ! ! ! // ! // Menu Management ! // ! $lang['Menu_admin'] = "Navigation Menu Administration"; ! $lang['Menu_admin_explain'] = "Use this form to customize your Navigation Menu"; ! $lang['Menu_edit_delete_explain'] = "Use this form to customize your Navigation Menu"; ! $lang['Menu_settings'] = "Navigation Menu Information"; ! $lang['Menu_delete'] = "Delete a Navigation Menu"; ! $lang['Menu_delete_explain'] = "Use this form to delete (and/or move) a Navigation Menu and its subelement(s)"; ! $lang['Edit_menu'] = "Edit a Navigation Menu"; ! $lang['Update'] = "Update"; ! $lang['Create_menu'] = "Add new Navigation Menu"; ! $lang['Create_category'] = "Add new Navigation Category"; ! $lang['Menu_Config_updated'] = "Navigation Menu Configuration Updated Successfully"; ! $lang['Menus_updated'] = "Menu and Category information updated successfully"; ! $lang['Click_return_menuadmin'] = "Click %sHere%s to return to Navigation Menu Administration"; ! $lang['Menu_name'] = "Navigation Menu Name"; ! $lang['Menu_icon'] = "Navigation Menu Icon<br /> - the *_hot.gif pic is only used when 'Mark Current Page' is enabled."; ! $lang['Menu_desc'] = "Description"; ! $lang['Edit'] = "Edit"; ! $lang['Delete'] = "Delete"; ! $lang['Move_up'] = "Move up"; ! $lang['Move_down'] = "Move down"; ! $lang['Resync'] = "Resync"; ! $lang['Click_return_admin_index'] = "Click %sHere%s to return to the Administration Index"; ! ! ! // ! // Module Management ! // ! $lang['Module'] = "Module"; ! $lang['Module_admin'] = "Module Administration"; ! $lang['Module_admin_explain'] = "Use this form to customize Modules"; ! $lang['Column_delete'] = "Delete a Column"; ! $lang['Module_delete'] = "Delete a Module"; ! $lang['Module_delete_explain'] = "Use this form to delete a Module (or function)"; ! $lang['Edit_module'] = "Edit a Module"; ! $lang['Create_module'] = "Create new Module"; ! $lang['Module_Config_updated'] = "Module Configuration Updated Successfully"; ! $lang['Module_updated'] = "Module Information Updated successfully"; ! $lang['Click_return_module_admin'] = "Click %sHere%s to return to Module Administration"; ! $lang['Column_name'] = "Column Name"; ! $lang['Module_name'] = "Module Name"; ! $lang['Module_desc'] = "Description"; ! $lang['Module_path'] = "Path"; ! $lang['Create_column'] = "Add new Column"; ! $lang['Column'] = "Column"; ! $lang['Edit_Column'] = "Edit a Column"; ! $lang['Edit_Column_explain'] = "Use this form to modify a column"; ! $lang['Column_Size'] = "Size of the column"; ! ! // ! // These are displayed in the drop down boxes for advanced ! // mode Module auth, try and keep them short! ! // ! $lang['Menu_Navigation'] = "Navigation Menu"; ! $lang['Modules'] = "Modules"; ! $lang['Portal_index'] = "Portal Index"; ! $lang['Poll_Display'] = "Which Poll do you want to display?"; ! $lang['Meta_admin'] = "Meta Tags Administration"; ! $lang['Mega_admin_explain'] = "Use this form to customize your meta tags"; ! $lang['Meta_Title'] = "Title"; ! $lang['Meta_Author'] = "Author"; ! $lang['Meta_Copyright'] = "Copyright"; ! $lang['Meta_Keywords'] = "Keywords"; ! $lang['Meta_Keywords_explain'] = "(comma seperated list)"; ! $lang['Meta_Description'] = "Description"; ! $lang['Meta_Language'] = "Language Code"; ! $lang['Meta_Rating'] = "Rating"; ! $lang['Meta_Robots'] = "Robots"; ! $lang['Meta_Pragma'] = "Pragma no-cache"; ! $lang['Meta_Bookmark_icon'] = "Bookmark Icon"; ! $lang['Meta_Bookmark_explain'] = "(relative location)"; ! $lang['Meta_HTITLE'] = "Extra Header Settings"; ! $lang['Meta_data_updated'] = "Meta data file (mx_meta.inc) has been updated!<br />Click %sHERE%s to return to Meta Tags Administration."; ! $lang['Meta_data_ioerror'] = "Unable to open mx_meta.inc. Make sure the file is writable (chmod 777)."; ! $lang['Create_block'] = "Create new Block"; ! $lang['Block_delete'] = "Delete a Block"; ! $lang['Block_delete_explain'] = "Use this form to delete a Block (or column)"; ! $lang['Block'] = "Block"; ! $lang['Block_title'] = "Title"; ! $lang['Block_desc'] = "Description"; ! $lang['Add_Block'] = "Add new Block"; ! $lang['Auth_Block'] = "Permissions"; ! $lang['AUTH_ALL'] = "ALL"; ! $lang['AUTH_REG'] = "REG"; ! $lang['AUTH_PRIVATE'] = "PRIVATE"; ! $lang['AUTH_MOD'] = "MOD"; ! $lang['AUTH_ADMIN'] = "ADMIN"; ! $lang['AUTH_ANONYMOUS'] = "ANONYMOUS"; ! $lang['Function'] = "Function"; ! $lang['Settings'] = "Settings"; ! $lang['Save_Settings'] = "Save Settings"; ! $lang['announce_nbr_display'] = "Number of Messages to display (max)"; ! $lang['announce_nbr_days'] = "Number of Days to Display Messages"; ! $lang['announce_img'] = "Announcement Image"; ! $lang['announce_img_sticky'] = "Sticky Image"; ! $lang['announce_img_normal'] = "Normal Message Image"; ! $lang['announce_img_global'] = "Global Announcement Image"; ! $lang['announce_display'] = "Display Announcement(s) messages in this Block"; ! $lang['announce_display_sticky'] = "Display Sticky(ies) in this Block"; ! $lang['announce_display_normal'] = "Display Normal message(s) in this Block"; ! $lang['announce_display_global'] = "Display Global Announcements in this Block"; ! $lang['announce_forum'] = "Source Forums<br /> You may make multiple selections<br />* If none is selected, all authorized forums will be visible"; ! $lang['poll_forum'] = "Source Forums<br /> You may make multiple selections<br />* If none is selected, all authorized forums will be visible"; ! $lang['Function_admin'] = "Function Administration"; ! $lang['Function_admin_explain'] = "Each Module has one or more Functions. Use this form to edit, add, or delete a Function"; ! $lang['Function_name'] = "Function Name"; ! $lang['Function_desc'] = "Description"; ! $lang['Function_file'] = "File ( Script )"; ! $lang['Create_function'] = "Add new Function"; ! $lang['Parameter_name'] = "Name "; ! $lang['Parameter_desc'] = "Description"; ! $lang['Parameter_type'] = "Type"; ! $lang['Parameter_default'] = "Default Value"; ! $lang['import_module_pack'] = "Install Module"; ! $lang['import_module_pack_explain'] = "This will add a Module to the portal. Be sure the Module Package is uploaded to the /modules folder. Remember to use the latest Module version!"; ! $lang['upgrade_module_pack'] = "Upgrade Module"; ! $lang['upgrade_module_pack_explain']= "This will upgrade your Module. Be sure to read the Module Documentation before proceeding, or you may risk module data loss."; ! $lang['export_module_pack'] = "Export Module"; ! $lang['Export_Module'] = "Select a Module:"; ! $lang['export_module_pack_explain'] = "This will export a Module *.pak file. This is only intended for Module writers..."; ! $lang['Not_Specified'] = "Not Specified"; ! $lang['Page'] = "Page"; ! $lang['Add_Page'] = "Add new Page"; ! $lang['Block_admin'] = "Block Administration"; ! $lang['Block_admin_explain'] = "Use this form to add, delete and change the settings for each block."; ! $lang['Module_include_admin'] = "Include this module in Admin Menu Navigation"; ! $lang['Translation_Tools'] = "Translation Tools"; ! $lang['Create_parameter'] = "Add new Parameter"; ! $lang['Parameter_admin'] = "Parameter Administration"; ! $lang['Parameter_admin_explain'] = "List all Parameters for this Function"; ! $lang['Parameter_id'] = "ID"; ! $lang['Parameter_function'] = "Function"; ! $lang['Preview_portal'] = "Preview Portal"; ! $lang['Page_admin'] = "Page Administration"; ! $lang['Page_Config_updated'] = "Page Configuration Updated Successfully"; ! $lang['Page_updated'] = "Page and Column information updated successfully"; ! $lang['Click_return_page_admin'] = "Click %sHere%s to return to Page Administration"; ! ! $lang['Module_delete_db'] = "Do you really want to uninstall the Module? Warning: you will lose all Module data. Consider upgrading instead..."; ! $lang['Click_module_delete_db_yes'] = "Click %sHere%s to uninstall the Module"; ! ! ! // ! // Install Process ! // ! $lang['Welcome_install'] = "Welcome to the mxBB-Portal Installation Guide"; ! $lang['Install_Instruction'] = "Please, fill out the details requested below. This installation program will create your personalized config.php (in the Portal root directory) and the Portal database with default settings. Once this is done, you'll see a report of all the steps taken (please note mxBB-Portal does not modify your phpBB database in any way). Then, you should login to your board with your administrator username and password and go to the Administration Control Panel to configure your portal upon your own needs. Please note mxBB-Portal will not work by itself, phpBB must already be installed and configured. Thank you for choosing mxBB-Portal."; ! $lang['Upgrade_Instruction'] = "mxBB-Portal is already installed. Please, make backups of your database now !<br /><br />The next step will modify the structure of your database (please note mxBB-Portal does not modify your phpBB database in any way). If for whatever reason this upgrade procedure fails, there would be no other way to return to your current state. Please, make backups of your database BEFORE proceeding !<br /><br />Once done, click the button below to start the upgrade procedure."; ! $lang['Install_moreinfo'] = "%sRelease Notes%s | %sWelcome Pack%s | %sOnline FAQ%s | %sSupport Forums%s | %sTerms Of Use%s"; ! $lang['Install_settings'] = "Installation Settings"; ! $lang['Choose_lang_explain'] = "Please, use the form below to select the language you wish to use thoughtout the installation panels."; ! $lang['Choose_lang'] = "Choose Language"; ! $lang['Language'] = "Language"; ! $lang['Phpbb_path'] = "phpBB relative path"; ! $lang['Phpbb_path_explain'] = "Relative path to phpBB, eg phpBB/ or ../phpBB/<br />Note the slashes '/', they are important!"; ! $lang['Phpbb_url'] = "Full phpBB URL"; ! $lang['Phpbb_url_explain'] = "Full phpBB URL, eg<br />http://www.example.com/phpBB/"; ! $lang['Portal_url'] = "Full Portal URL"; ! $lang['Portal_url_explain'] = "Full Portal URL, eg<br />http://www.example.com/"; ! $lang['Database_settings'] = "Database Settings"; ! $lang['dbms'] = "Database Type"; ! $lang['DB_Host'] = "Database Server Hostname/DSN"; ! $lang['DB_Name'] = "Your Database Name"; ! $lang['DB_Username'] = "Database Username"; ! $lang['DB_Password'] = "Database Password"; ! $lang['Table_Prefix'] = "phpBB Prefix in DB"; ! $lang['MX_Table_Prefix'] = "mxBB-Portal Prefix in DB"; ! $lang['Start_Install'] = "Start mxBB Installation"; ! $lang['Start_Upgrade'] = "Yes, I already did a backup and wish to upgrade my mxBB-Portal now."; ! $lang['Portal_intalled'] = "mxBB-Portal has been installed !"; ! $lang['Portal_upgraded'] = "mxBB-Portal has been upgraded !"; ! $lang['Unwriteable_config'] = "Your mxBB config file (config.php) is un-writeable at present.<br /><br />A copy of the config file will be downloaded to you when you click the button below. You should upload this file to your mxBB root directory: %s <br /><br />Once this is done, please %sREFRESH%s this window to proceed with the next installation step.<br /><br />Thank you for choosing mxBB-Portal.<br />"; ! $lang['Send_file'] = "Just send the file to me and I'll FTP it manually"; ! $lang['phpBB_nfnd_retry'] = "Sorry, we could not find your phpBB installation. Please, press the %sBACK%s button of your browser and retry."; ! $lang['Installation_error'] = "An error has occurred during installation"; ! $lang['Debug_Information'] = "DEBUG INFORMATION"; ! $lang['Install_phpbb_not_found'] = "Sorry, we cound not find any phpBB board installed on this server.<br />Please, install phpBB BEFORE installing mxBB-Portal.<br />\n<br />\n"; ! $lang['Install_phpbb_db_failed'] = "Sorry, we could not connect to the phpBB database.<br />Please, check your phpBB is correctly installed, up and running BEFORE installing mxBB-Portal.<br />\n<br />\n"; ! $lang['Install_phpbb_unsupported'] = "Unfortunately, the phpBB board installed on this server is not supported by mxBB-Portal.<br />Please, check the release notes for installation requirements.<br />\n<br />\n"; ! $lang['Install_noscript_warning'] = "Sorry, this installation requires a JavaScript enabled browser. It might not work on your browser."; ! $lang['Upgrade_are_you_sure'] = "This upgrade procedure will make modifications to your database. Are you sure you wish to proceed?"; ! $lang['Writing_config'] = "Writing config.php file"; ! $lang['Processing_schema'] = "Processing SQL Schema '%s'"; ! $lang['Portal_intalling'] = "Installing mxBB-Portal version %s"; ! $lang['Portal_upgrading'] = "Upgrading mxBB-Portal version %s"; ! $lang['Install_warning'] = "There was 1 warning updating the database"; ! $lang['Install_warnings'] = "There were %d warnings updating the database"; ! $lang['Subscribe_mxBB_News_now'] = "We recommend that you subscribe to the %smxBB-News Mailing List%s to receive information about important news and release announcements.<br /> <br />%sSubscribe to mxBB-News, now!%s"; ! $lang['Portal_install_done'][0] = "At this point your basic installation is complete."; ! $lang['Portal_install_done'][1] = "Please, delete the /install and /contrib folders BEFORE proceeding!!!"; ! $lang['Portal_install_done'][2] = "Remember to make backups as often as possible ;-)"; ! $lang['Portal_install_done'][3] = "Press the button below and use your Administrator username and password to login to the system."; ! $lang['Portal_install_done'][4] = "Please be sure to check the Portal Configurations and make any required changes."; ! $lang['Thanks_for_choosing'] = "Thank you for choosing mxBB-Portal."; ! $lang['Critical_Error'] = "CRITICAL ERROR"; ! $lang['Error_loading_config'] = "Sorry, could not load mxBB-Portal config.php"; ! $lang['Error_database_down'] = "Sorry, could not connect to database."; ! ! ! // ! // New for v. 2.704 ! // ! $lang['Page_Id'] = "Page ID"; ! $lang['Page_icon'] = "Page Icon <br /> - to be used in the adminCP only, eg. icon_home.gif (default)"; ! $lang['Page_header'] = "Page header file <br /> - i.e. overall_header.php (default), overall_noheader.php (no header) or user custom header file."; ! $lang['Auth_Page'] = "Permissions"; ! ! $lang['Cache_dir_write_protect'] = "Your cache directory is write-protected. Unable to generate the cache file"; ! $lang['Cache_generate'] = "Your cache files have been generated. ;-)"; ! $lang['Cache_submit'] = "Generate the cache file?"; ! $lang['Cache_explain'] = "With this option you can generate all XML files (cache files) at once for all portal blocks. These files allow the reduction of the number of database queries needed, and improves overall portal performance. <br />Note: the mxBB cache must be enabled (in the Portal General Admin CP) for these files to be used by the system.<br>Further note: the cache files are created on the fly when editing blocks as well."; ! ! ! // ! // New for v. 2.706 ! // ! $lang['MX_Portal'] = "mxBB-Portal"; ! $lang['MX_Modules'] = "mxBB-Modules"; ! $lang['Phpbb'] = "phpBB"; ! ! $lang['Top_phpbb_links'] = "Show phpBB header links <br /> - new/unread posts etc on the portal front page"; ! $lang['Auth_Page_group'] = "-> PRIVATE Group"; ! ! ! // New for v. 2.7.1 ! $lang['Error_no_db_install'] = "Error: The file db_install.php does not exist. Please verify this and try again..."; ! $lang['Error_no_db_uninstall'] = "Error: The file db_uninstall.php does not exist, or the uninstall feature is not supported for this module. Please verify this and try again..."; ! $lang['Error_no_db_upgrade'] = "Error: The file db_upgrade.php does not exist, or the upgrade feature is not supported for this module. Please verify this and try again..."; ! $lang['Error_module_installed'] = "Error: This module is already installed! Please either first delete module, or upgrade the module instead."; ! ! $lang['Menu_links'] = "Menu URL<br />- Link to external page (enter full URL) or internal page (enter relative path)<br />- This option may be used together with 'Link Target: - iframe mode'."; ! $lang['Menu_page'] = "Menu Page (default/standard) <br />- link to internal portal page<br />NOTE: Pages are created using Page Administration."; ! $lang['Menu_block'] = "Dynamic Block<br />- need a dynamic block on the Page to handle the setting"; ! $lang['Menu_function'] = "Menu Function (dev only)<br />- link to mxBB specific function (not available)"; ! $lang['Menu_action_title'] = "<b>Menu Action:</b> <br /><i>(Chose one of the 4 options below.)</i> "; ! $lang['Menu_action_adv'] = "<b>Advanced Menu Actions:</b> <br /><i>(Use carefully - intended for developers only):</i>"; ! $lang['Menu_permissions_title'] = "<b>View/Edit Permissions:</b>"; ! $lang['Link_target'] = "Link Target:<br />- 'default', open in this browser<br />- 'new browser', open in new browser<br />- 'iframe mode', open url (given below) in page with IncludeX block."; ! $lang['Portal_version'] = "mxBB-Portal Version:"; ! ! $lang['PHPBB_info'] = "phpBB Info"; ! $lang['PHPBB_version'] = "phpBB Version:"; ! $lang['PHPBB_script_path'] = "phpBB Script Path:"; ! $lang['PHPBB_server_name'] = "phpBB Domain (server_name):"; ! ! ! // ! // New for v. 2.7.3 ! // ! $lang['Return_to_page'] = "Return to Portal Page"; ! ! ! // ! // New for v. 2.7.4 - 2.8 ! // ! ! // Page templates ! $lang['Choose_page_template'] = "Choose Page Template"; ! $lang['Template_Config_updated'] = "Template Configuration Updated"; ! $lang['Page_templates_admin'] = "Page Templates Administration"; ! $lang['Page_templates_admin_explain'] = "Use this page to create, edit or delete Page Templates"; ! $lang['Add_Template'] = "Add new Template"; ! $lang['Template'] = "Template"; ! $lang['Page_template_delete'] = "Delete Template"; ! ! // Navigation menu ! $lang['Menu_display_mode'] = "Navigation Mode:<br /> - span horizontal or vertical"; ! $lang['Menu_page_sync'] = "Highlight selected page in navigation menu<br /> - current menu option is highlighted and its icon will be switched (if you have a *_hot.gif)"; ! $lang['Menu_par_title'] = "General Menu Navigation Settings:"; ! $lang['Show_cat'] = "Folded/Unfolded Category: <br /> - Default value, before user value is set:"; ! ! // Split column ! $lang['block_ids'] = "Source Blocks<br /> - to be placed left to right"; ! $lang['block_sizes'] = "Block Sizes (comma separated)<br />- You may specify size using numbers (pixels), percentages (relative sizes, ie. '40%') or '*' for the remainder."; ! $lang['space_between'] = "Space between Blocks"; ! ! ! $lang['Page_desc'] = "Description"; ! ! $lang['Show_title'] = "Show this Block Title"; ! $lang['Show_block'] = "Show this Block <br />(if 'no', the Block is hidden to all users, except administrators)"; ! $lang['Show_stats'] = "Show Block Statistics <br />(if 'yes', 'edited by...' will be displayed below the block)"; ! ! $lang['Page_graph_border'] = "Page border graphics - file prefix"; ! $lang['Page_graph_border_explain'] = "To use border graphics around Blocks, specify the prefix for the graphics files here. For example, enter 'border_' to use the files: border_1-1.gif, border_1-2.gif,..., border_3-3.gif for the 3x3 matrix with gif-images. Leave blank to disable border graphics (default)."; ! ! $lang['Uninstall_module'] = "Uninstall"; ! ! // Portal permissons ! $lang['Mx_Block_Auth_Title'] = "Private Block Permissions" ; ! $lang['Mx_Block_Auth_Explain'] = "Here you can configure Private Block Permissions"; ! $lang['Mx_Page_Auth_Title'] = "Private Page Permissions" ; ! $lang['Mx_Page_Auth_Explain'] = "Here you configure Private Page Permissions"; ! $lang['Block_Auth_successfully'] = "Block Permissions Updated Successfully"; ! $lang['Click_return_block_auth'] = "Click %sHere%s to return to Private Block Permissions"; ! $lang['Page_Auth_successfully'] = "Page Permissions Updated Successfully"; ! $lang['Click_return_page_auth'] = "Click %sHere%s to return to Private Page Permissions"; ! ! // Stats ! $lang['log_filter_date'] = "Filter by time<br />Show logs from last week, month, year..."; ! $lang['msg_filter_date'] = "Filter by time<br />Show posts from last week, month, year..."; ! ! // IncludeX ! $lang['x_listen'] = "Listen (GET)"; ! $lang['x_iframe'] = "IFrame"; ! $lang['x_textfile'] = "Textfile"; ! $lang['x_multimedia'] = "WMP Multimedia"; ! $lang['x_pic'] = "Pic"; ! $lang['x_format'] = "Formatted Textfile"; ! ! $lang['x_mode'] = '<b>IncludeX mode:</b><br /> The IncludeX block operates in one of the following modes. If mode \'Listen (GET)\' is selected, the mode may be set by a url \'x_mode=mode\' and associated parameters with \'x_1=, x_2=, etc\'.<br />Example: To pass a url to a iframe use \'domain/index.php?page=x&x_mode=iframe&x_1=http://domain\' '; ! $lang['x_1'] = '<b>Variable 1:</b><br /><i>IFrame:</i> url<br /><i>Textfile:</i> file (located in \'/include_file\')<br /><i>Multimedia:</i> file (located in \'/include_file\')<br /><i>Pic:</i> file (located in \'/include_file\')<br /><i>Formatted textfile:</i> not available'; ! $lang['x_2'] = '<b>Variable 2:</b><br /><i>IFrame:</i> frame height (pixels)<br /><i>Multimedia:</i> width (pixles)'; ! $lang['x_3'] = '<b>Variable 3:</b><br /><i>Multimedia:</i> height (pixles)'; ! ! $lang['Yes'] = "Yes"; ! $lang['No'] = "No"; ! ! // Cache ! $lang['Mx_use_cache'] = "Use mxBB Block Cache<br />- Block data is cached to individual cache/block_*.xml files. Block cache files are created when Blocks are edited."; ! $lang['Generate_mx_cache'] = "Generate Block Cache"; ! ! ! // ! // That's all Folks! ! // ------------------------------------------------- ?> \ No newline at end of file |
|
From: Markus P. <mar...@us...> - 2005-04-13 21:23:47
|
Update of /cvsroot/mxbb/core/modules/mx_textblocks In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3079/modules/mx_textblocks Modified Files: mx_textblock_blog.php Log Message: ok, second step on fixing double line breaks. I think this is all. Index: mx_textblock_blog.php =================================================================== RCS file: /cvsroot/mxbb/core/modules/mx_textblocks/mx_textblock_blog.php,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** mx_textblock_blog.php 12 Apr 2005 21:10:34 -0000 1.6 --- mx_textblock_blog.php 13 Apr 2005 21:23:28 -0000 1.7 *************** *** 1,257 **** ! <?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$ ! */ ! ! /** ! * 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 ( isset( $HTTP_POST_VARS['u'] ) || isset( $HTTP_GET_VARS['u'] ) ) ! { ! $sub_id = ( isset( $HTTP_POST_VARS['u'] ) ) ? intval( $HTTP_POST_VARS['u'] ) : intval( $HTTP_GET_VARS['u'] ); ! $blog_mode = 'user'; ! } ! else if ( isset( $HTTP_POST_VARS['g'] ) || isset( $HTTP_GET_VARS['g'] ) ) ! { ! $sub_id = ( isset( $HTTP_POST_VARS['g'] ) ) ? intval( $HTTP_POST_VARS['g'] ) : intval( $HTTP_GET_VARS['g'] ); ! $blog_mode = 'group'; ! } ! else ! { ! // $sub_id = $userdata['user_id']; ! // $blog_mode = 'user'; ! $block_rows[$block]['show_title'] = 0; ! $block_rows[$block]['show_block'] = 0; ! return; ! } ! ! $block_config = read_block_config( $block_id, false, $sub_id ); ! $title = $block_config[$block_id]['block_title']; ! ! $message = $block_config[$block_id]['Blog']['parameter_value']; ! $blog_id = $block_config[$block_id]['blog_id']['parameter_value']; ! ! // $block_style = $block_config[$block_id][block_style]['parameter_value']; ! // $text_style = $block_config[$block_id][text_style]['parameter_value']; ! // $title_style = $block_config[$block_id][title_style]['parameter_value']; ! // $show_title = $block_config[$block_id][show_title]['parameter_value']; ! // ********************************************************************** ! // Read language definition ! // ********************************************************************** ! if ( !file_exists( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_main.' . $phpEx ) ) ! { ! include( $module_root_path . 'language/lang_english/lang_main.' . $phpEx ); ! } ! else ! { ! include( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_main.' . $phpEx ); ! } ! // Block Pages/toc ! if ( isset( $HTTP_POST_VARS['page_num'] ) || isset( $HTTP_GET_VARS['page_num'] ) ) ! { ! $page_num = ( isset( $HTTP_POST_VARS['page_num'] ) ) ? $HTTP_POST_VARS['page_num'] : $HTTP_GET_VARS['page_num']; ! $page_num = $page_num - 1; ! } ! else ! { ! $page_num = 0; ! } ! ! $art_pages = explode( '[page]', $message ); ! $message = trim( $art_pages[$page_num] ); ! $message = str_replace( '[toc]', '', $message ); ! // End Pages/TOC ! $bbcode_uid = $block_config[$block_id]['Blog']['bbcode_uid']; ! $message = mx_decode( $message, $bbcode_uid ) ; ! ! // EDIT BLOG ! $iss_auth_ary = array(); ! $iss_auth_ary = block_auth( AUTH_EDIT, $block_id , $userdata, $block_config[$block_id][auth_edit], $block_config[$block_id][auth_edit_group] ); ! ! $blog_validate = ( $blog_mode == 'user' ) ? $sub_id == $userdata['user_id'] : mx_auth_group( $sub_id, true ); ! ! if ( $blog_validate || $iss_auth_ary[auth_edit] ) ! { ! $ss_hidden_fields = '<input type="hidden" name="sid" value="' . $userdata['session_id'] . '" />'; ! $ss_hidden_fields .= '<input type="hidden" name="block_id" value="' . $block_id . '" />'; ! $ss_hidden_fields .= '<input type="hidden" name="portalpage" value="' . $page_id . '" />'; ! $ss_hidden_fields .= '<input type="hidden" name="mode" value="editblog" />'; ! //$ss_hidden_fields .= '<input type="hidden" name="u" value="' . intval( $HTTP_GET_VARS['u'] ) . '" />'; ! //$ss_hidden_fields .= '<input type="hidden" name="g" value="' . intval( $HTTP_GET_VARS['g'] ) . '" />'; ! $ss_hidden_fields .= '<input type="hidden" name="u" value="' . $sub_id. '" />'; ! $ss_hidden_fields .= '<input type="hidden" name="g" value="' . $sub_id. '" />'; ! $ss_hidden_fields .= '<input type="hidden" name="sub_id" value="' . $sub_id . '" />'; ! $ss_hidden_fields .= '<input type="hidden" name="blog_mode" value="' . $blog_mode . '" />'; ! ! $splitt_admin_file = 'modules/mx_textblocks/admin/mx_textblock_edit.php'; ! $editt_url = append_sid( $mx_root_path . $splitt_admin_file . "?sid=" . $userdata['session_id'] ); ! $editt_img = '<input type="image" src="' . PORTAL_URL . TEMPLATE_ROOT_PATH . 'images/block_icons/block_edit.gif" alt="' . $lang['Block_Edit'] . '" title="' . $lang['Block_Edit'] . ' :: ' . $block_config[$block_id][block_title] . '"></input>'; ! ! $template->assign_block_vars( "switch_blog_edit", array( 'EDIT_ACTION' => $editt_url, ! 'EDIT_IMG' => $editt_img, ! 'S_HIDDEN_FORM_FIELDS' => $ss_hidden_fields ! ) ); ! } ! else ! { ! $template->assign_block_vars( "switch_blog_noedit", array() ); ! } ! ! // Start output of page ! ! $template->set_filenames( array( "body_block" => "mx_textblock_blog.tpl" ) ! ); ! ! if ( $show_title == 'TRUE' ) ! { ! if ( $title_style == 'TRUE' ) ! { ! $template->assign_block_vars( "switch_standard_style", array() ); ! } ! else ! { ! $template->assign_block_vars( "switch_no_style", array() ); ! } ! } ! ! $block_style = ( ( $block_style == '' ) || ( $block_style == 'FALSE' ) ) ? '' : 'forumline'; ! $text_style = ( ( $text_style == '' ) || ( $text_style == 'none' ) ) ? 'genmed' : $text_style; ! ! if ( !empty($blog_id) && $userdata['session_logged_in'] && $blog_mode == 'user' ) ! { ! $template->assign_block_vars( "switch_blog_id", array( ! 'BLOG_ID' => sprintf( $blog_id, $userdata['username'] ) ! ) ); ! } ! ! $template->assign_vars( array( 'BLOCK_SIZE' => ( !empty( $block_size ) ? $block_size : '100%' ), ! 'L_TITLE' => ( !empty( $lang[$title] ) ? $lang[$title] : $title ), ! 'S_ACTION' => $edit_url, ! 'U_TEXT' => $message, ! 'EDIT_IMG' => $edit_img, ! 'MOVE_L_IMG' => $move_l_img, ! 'MOVE_R_IMG' => $move_r_img, ! 'MOVE_U_IMG' => $move_u_img, ! 'MOVE_D_IMG' => $move_d_img, ! 'CACHE_IMG' => $cache_img, ! 'DELETE_IMG' => $delete_img, ! 'BLOCK_ID' => $block_id, ! 'BLOCK_STYLE' => $block_style, ! 'TEXT_STYLE' => $text_style, ! 'TITLE_STYLE' => $block_style, ! 'S_HIDDEN_FORM_FIELDS' => $s_hidden_fields, ! 'L_TOC' => $lang['Toc_title'], ! 'L_GOTO_PAGE' => $lang['Goto_page'] ! ) ); ! ! // article pages table of contents ! ! if ( count( $art_pages ) > 1 ) ! { ! $template->assign_block_vars( 'switch_toc', array() ); ! ! $i = 0; ! while ( $i < count( $art_pages ) ) ! { ! $page_number = $i + 1; ! ! $art_split = explode( '[toc]', $art_pages[$i] ); ! $article_toc = $art_split[0]; ! // $article_body = $art_split[1]; ! // Fix up the toc title ! if ( !$board_config['allow_html'] ) ! { ! $article_toc = preg_replace( '#(<)([\/]?.*?)(>)#is', "<\\2>", $article_toc ); ! } ! ! // Parse message ! ! // $bbcode_uid = $row['bbcode_uid']; ! // $article_toc = preg_replace('/\:[0-9a-z\:]+\]/si', ']', $article_toc); ! $article_toc = preg_replace( "/\[(\S+)\]/e", "", $article_toc ); ! // $txt = preg_replace("/<a href=\"(.*)\">(.*)<\/a>/i", "\\2 (\\1)", $txt); ! $article_toc = make_clickable( $article_toc ); ! ! // Parse smilies ! ! if ( $board_config['allow_smilies'] ) ! { ! $article_toc = mx_smilies_pass( $article_toc ); ! } ! ! // Replace naughty words ! ! if ( count( $orig_word ) ) ! { ! $article_toc = str_replace( '\"', '"', substr( preg_replace( '#(\>(((?>([^><]+|(?R)))*)\<))#se', "preg_replace(\$orig_word, \$replacement_word, '\\0')", '>' . $article_toc . '<' ), 1, -1 ) ); ! } ! // Replace newlines (we use this rather than nl2br because ! // till recently it wasn't XHTML compliant) ! // $article_toc = str_replace("\n", "\n<br />\n", $article_toc); ! $page_toc = $art_pages[$i]; ! ! if ( $page_num != $i ) ! { ! $temp_url = append_sid( "index.php?page=$page_id&mode=article&page_num=$page_number" ); ! $page_link = '<a href="' . $temp_url . '" class="nav">' . $page_number . ' - ' . $article_toc . '</a>'; ! } ! else ! { ! $page_link = $page_number . ' - ' . $article_toc ; ! } ! ! if ( $i < count( $art_pages ) - 1 ) ! { ! $page_link .= '<br />'; ! } ! $template->assign_block_vars( 'switch_toc.pages', array( 'TOC_ITEM' => $page_link ) ! ); ! $i++; ! } ! } ! ! // article pages ! ! if ( count( $art_pages ) > 1 ) ! { ! $template->assign_block_vars( 'switch_pages', array() ); ! ! $i = 0; ! while ( $i < count( $art_pages ) ) ! { ! $page_number = $i + 1; ! if ( $page_num != $i ) ! { ! $temp_url = append_sid( "index.php?page=$page_id&mode=article&page_num=$page_number" ); ! $page_link = '<a href="' . $temp_url . '" class="nav">' . $page_number . '</a>'; ! } ! else ! { ! $page_link = $page_number; ! } ! ! if ( $i < count( $art_pages ) - 1 ) ! { ! $page_link .= ', '; ! } ! $template->assign_block_vars( 'switch_pages.pages', array( 'PAGE_LINK' => $page_link ) ! ); ! $i++; ! } ! } ! ! $template->pparse( "body_block" ); ! ?> \ No newline at end of file --- 1,257 ---- ! <?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$ ! */ ! ! /** ! * 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 ( isset( $HTTP_POST_VARS['u'] ) || isset( $HTTP_GET_VARS['u'] ) ) ! { ! $sub_id = ( isset( $HTTP_POST_VARS['u'] ) ) ? intval( $HTTP_POST_VARS['u'] ) : intval( $HTTP_GET_VARS['u'] ); ! $blog_mode = 'user'; ! } ! else if ( isset( $HTTP_POST_VARS['g'] ) || isset( $HTTP_GET_VARS['g'] ) ) ! { ! $sub_id = ( isset( $HTTP_POST_VARS['g'] ) ) ? intval( $HTTP_POST_VARS['g'] ) : intval( $HTTP_GET_VARS['g'] ); ! $blog_mode = 'group'; ! } ! else ! { ! // $sub_id = $userdata['user_id']; ! // $blog_mode = 'user'; ! $block_rows[$block]['show_title'] = 0; ! $block_rows[$block]['show_block'] = 0; ! return; ! } ! ! $block_config = read_block_config( $block_id, false, $sub_id ); ! $title = $block_config[$block_id]['block_title']; ! ! $message = $block_config[$block_id]['Blog']['parameter_value']; ! $blog_id = $block_config[$block_id]['blog_id']['parameter_value']; ! ! // $block_style = $block_config[$block_id][block_style]['parameter_value']; ! // $text_style = $block_config[$block_id][text_style]['parameter_value']; ! // $title_style = $block_config[$block_id][title_style]['parameter_value']; ! // $show_title = $block_config[$block_id][show_title]['parameter_value']; ! // ********************************************************************** ! // Read language definition ! // ********************************************************************** ! if ( !file_exists( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_main.' . $phpEx ) ) ! { ! include( $module_root_path . 'language/lang_english/lang_main.' . $phpEx ); ! } ! else ! { ! include( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_main.' . $phpEx ); ! } ! // Block Pages/toc ! if ( isset( $HTTP_POST_VARS['page_num'] ) || isset( $HTTP_GET_VARS['page_num'] ) ) ! { ! $page_num = ( isset( $HTTP_POST_VARS['page_num'] ) ) ? $HTTP_POST_VARS['page_num'] : $HTTP_GET_VARS['page_num']; ! $page_num = $page_num - 1; ! } ! else ! { ! $page_num = 0; ! } ! ! $art_pages = explode( '[page]', $message ); ! $message = trim( $art_pages[$page_num] ); ! $message = str_replace( '[toc]', '', $message ); ! // End Pages/TOC ! $bbcode_uid = $block_config[$block_id]['Blog']['bbcode_uid']; ! $message = mx_decode( $message, $bbcode_uid ) ; ! ! // EDIT BLOG ! $iss_auth_ary = array(); ! $iss_auth_ary = block_auth( AUTH_EDIT, $block_id , $userdata, $block_config[$block_id][auth_edit], $block_config[$block_id][auth_edit_group] ); ! ! $blog_validate = ( $blog_mode == 'user' ) ? $sub_id == $userdata['user_id'] : mx_auth_group( $sub_id, true ); ! ! if ( $blog_validate || $iss_auth_ary[auth_edit] ) ! { ! $ss_hidden_fields = '<input type="hidden" name="sid" value="' . $userdata['session_id'] . '" />'; ! $ss_hidden_fields .= '<input type="hidden" name="block_id" value="' . $block_id . '" />'; ! $ss_hidden_fields .= '<input type="hidden" name="portalpage" value="' . $page_id . '" />'; ! $ss_hidden_fields .= '<input type="hidden" name="mode" value="editblog" />'; ! //$ss_hidden_fields .= '<input type="hidden" name="u" value="' . intval( $HTTP_GET_VARS['u'] ) . '" />'; ! //$ss_hidden_fields .= '<input type="hidden" name="g" value="' . intval( $HTTP_GET_VARS['g'] ) . '" />'; ! $ss_hidden_fields .= '<input type="hidden" name="u" value="' . $sub_id. '" />'; ! $ss_hidden_fields .= '<input type="hidden" name="g" value="' . $sub_id. '" />'; ! $ss_hidden_fields .= '<input type="hidden" name="sub_id" value="' . $sub_id . '" />'; ! $ss_hidden_fields .= '<input type="hidden" name="blog_mode" value="' . $blog_mode . '" />'; ! ! $splitt_admin_file = 'modules/mx_textblocks/admin/mx_textblock_edit.php'; ! $editt_url = append_sid( $mx_root_path . $splitt_admin_file . "?sid=" . $userdata['session_id'] ); ! $editt_img = '<input type="image" src="' . PORTAL_URL . TEMPLATE_ROOT_PATH . 'images/block_icons/block_edit.gif" alt="' . $lang['Block_Edit'] . '" title="' . $lang['Block_Edit'] . ' :: ' . $block_config[$block_id][block_title] . '"></input>'; ! ! $template->assign_block_vars( "switch_blog_edit", array( 'EDIT_ACTION' => $editt_url, ! 'EDIT_IMG' => $editt_img, ! 'S_HIDDEN_FORM_FIELDS' => $ss_hidden_fields ! ) ); ! } ! else ! { ! $template->assign_block_vars( "switch_blog_noedit", array() ); ! } ! ! // Start output of page ! ! $template->set_filenames( array( "body_block" => "mx_textblock_blog.tpl" ) ! ); ! ! if ( $show_title == 'TRUE' ) ! { ! if ( $title_style == 'TRUE' ) ! { ! $template->assign_block_vars( "switch_standard_style", array() ); ! } ! else ! { ! $template->assign_block_vars( "switch_no_style", array() ); ! } ! } ! ! $block_style = ( ( $block_style == '' ) || ( $block_style == 'FALSE' ) ) ? '' : 'forumline'; ! $text_style = ( ( $text_style == '' ) || ( $text_style == 'none' ) ) ? 'genmed' : $text_style; ! ! if ( !empty($blog_id) && $userdata['session_logged_in'] && $blog_mode == 'user' ) ! { ! $template->assign_block_vars( "switch_blog_id", array( ! 'BLOG_ID' => sprintf( $blog_id, $userdata['username'] ) ! ) ); ! } ! ! $template->assign_vars( array( 'BLOCK_SIZE' => ( !empty( $block_size ) ? $block_size : '100%' ), ! 'L_TITLE' => ( !empty( $lang[$title] ) ? $lang[$title] : $title ), ! 'S_ACTION' => $edit_url, ! 'U_TEXT' => $message, ! 'EDIT_IMG' => $edit_img, ! 'MOVE_L_IMG' => $move_l_img, ! 'MOVE_R_IMG' => $move_r_img, ! 'MOVE_U_IMG' => $move_u_img, ! 'MOVE_D_IMG' => $move_d_img, ! 'CACHE_IMG' => $cache_img, ! 'DELETE_IMG' => $delete_img, ! 'BLOCK_ID' => $block_id, ! 'BLOCK_STYLE' => $block_style, ! 'TEXT_STYLE' => $text_style, ! 'TITLE_STYLE' => $block_style, ! 'S_HIDDEN_FORM_FIELDS' => $s_hidden_fields, ! 'L_TOC' => $lang['Toc_title'], ! 'L_GOTO_PAGE' => $lang['Goto_page'] ! ) ); ! ! // article pages table of contents ! ! if ( count( $art_pages ) > 1 ) ! { ! $template->assign_block_vars( 'switch_toc', array() ); ! ! $i = 0; ! while ( $i < count( $art_pages ) ) ! { ! $page_number = $i + 1; ! ! $art_split = explode( '[toc]', $art_pages[$i] ); ! $article_toc = $art_split[0]; ! // $article_body = $art_split[1]; ! // Fix up the toc title ! if ( !$board_config['allow_html'] ) ! { ! $article_toc = preg_replace( '#(<)([\/]?.*?)(>)#is', "<\\2>", $article_toc ); ! } ! ! // Parse message ! ! // $bbcode_uid = $row['bbcode_uid']; ! // $article_toc = preg_replace('/\:[0-9a-z\:]+\]/si', ']', $article_toc); ! $article_toc = preg_replace( "/\[(\S+)\]/e", "", $article_toc ); ! // $txt = preg_replace("/<a href=\"(.*)\">(.*)<\/a>/i", "\\2 (\\1)", $txt); ! $article_toc = make_clickable( $article_toc ); ! ! // Parse smilies ! ! if ( $board_config['allow_smilies'] ) ! { ! $article_toc = mx_smilies_pass( $article_toc ); ! } ! ! // Replace naughty words ! ! if ( count( $orig_word ) ) ! { ! $article_toc = str_replace( '\"', '"', substr( preg_replace( '#(\>(((?>([^><]+|(?R)))*)\<))#se', "preg_replace(\$orig_word, \$replacement_word, '\\0')", '>' . $article_toc . '<' ), 1, -1 ) ); ! } ! // Replace newlines (we use this rather than nl2br because ! // till recently it wasn't XHTML compliant) ! // $article_toc = str_replace("\n", "\n<br />\n", $article_toc); ! $page_toc = $art_pages[$i]; ! ! if ( $page_num != $i ) ! { ! $temp_url = append_sid( "index.php?page=$page_id&mode=article&page_num=$page_number" ); ! $page_link = '<a href="' . $temp_url . '" class="nav">' . $page_number . ' - ' . $article_toc . '</a>'; ! } ! else ! { ! $page_link = $page_number . ' - ' . $article_toc ; ! } ! ! if ( $i < count( $art_pages ) - 1 ) ! { ! $page_link .= '<br />'; ! } ! $template->assign_block_vars( 'switch_toc.pages', array( 'TOC_ITEM' => $page_link ) ! ); ! $i++; ! } ! } ! ! // article pages ! ! if ( count( $art_pages ) > 1 ) ! { ! $template->assign_block_vars( 'switch_pages', array() ); ! ! $i = 0; ! while ( $i < count( $art_pages ) ) ! { ! $page_number = $i + 1; ! if ( $page_num != $i ) ! { ! $temp_url = append_sid( "index.php?page=$page_id&mode=article&page_num=$page_number" ); ! $page_link = '<a href="' . $temp_url . '" class="nav">' . $page_number . '</a>'; ! } ! else ! { ! $page_link = $page_number; ! } ! ! if ( $i < count( $art_pages ) - 1 ) ! { ! $page_link .= ', '; ! } ! $template->assign_block_vars( 'switch_pages.pages', array( 'PAGE_LINK' => $page_link ) ! ); ! $i++; ! } ! } ! ! $template->pparse( "body_block" ); ! ?> \ No newline at end of file |
|
From: Markus P. <mar...@us...> - 2005-04-13 21:23:47
|
Update of /cvsroot/mxbb/core/modules/mx_textblocks/admin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3079/modules/mx_textblocks/admin Modified Files: mx_textblock_edit.php Log Message: ok, second step on fixing double line breaks. I think this is all. Index: mx_textblock_edit.php =================================================================== RCS file: /cvsroot/mxbb/core/modules/mx_textblocks/admin/mx_textblock_edit.php,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** mx_textblock_edit.php 12 Apr 2005 21:10:33 -0000 1.17 --- mx_textblock_edit.php 13 Apr 2005 21:23:29 -0000 1.18 *************** *** 1,689 **** ! <?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 : ! * ------------------------------------------------------------------------- [...1351 lines suppressed...] ! 'S_SHOW_STATS_YES' => $show_stats_yes, ! 'S_SHOW_STATS_NO' => $show_stats_no, ! ! 'U_PHPBB_ROOT_PATH' => PHPBB_URL ! ) ); ! ! $template->pparse( 'body' ); ! ! if ( !empty( $portalpage ) ) ! { ! $page_title = $lang['Block_admin']; ! include( $mx_root_path . 'includes/page_tail.' . $phpEx ); ! } ! else ! { ! include_once( $mx_root_path . 'admin/page_footer_admin.' . $phpEx ); ! } ! ?> \ No newline at end of file |
|
From: Markus P. <mar...@us...> - 2005-04-13 21:23:46
|
Update of /cvsroot/mxbb/core/install/schemas In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3079/install/schemas Modified Files: mysql_schema_install_2.7.1.sql mysql_schema_install_2.7.2.sql mysql_schema_install_2.7.3.sql mysql_schema_install_2.7.5.sql mysql_schema_install_2.701.sql mysql_schema_install_2.702.sql mysql_schema_install_2.703.sql mysql_schema_install_2.704.sql mysql_schema_install_2.705.sql mysql_schema_install_2.706.sql mysql_schema_upgrade_to_2.7.4.sql Log Message: ok, second step on fixing double line breaks. I think this is all. Index: mysql_schema_install_2.7.5.sql =================================================================== RCS file: /cvsroot/mxbb/core/install/schemas/mysql_schema_install_2.7.5.sql,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** mysql_schema_install_2.7.5.sql 20 Mar 2005 04:20:17 -0000 1.1 --- mysql_schema_install_2.7.5.sql 13 Apr 2005 21:23:27 -0000 1.2 *************** *** 1,391 **** ! # ! # mxBB-Portal - MySQL Schema - version 2.7.5 ! # ! # $Id$ ! # ! ! # -------------------------------------------------------- ! ! # ! # Table structure for table `mx_block` ! # ! ! CREATE TABLE mx_table_block ( ! block_id smallint(5) unsigned NOT NULL auto_increment, ! block_title varchar(150) default NULL, ! block_desc text, ! function_id smallint(5) unsigned default NULL, ! auth_view tinyint(2) NOT NULL default '0', ! auth_edit tinyint(2) default '0', ! auth_delete tinyint(2) default '0', ! auth_view_group smallint(5) NOT NULL default '0', ! auth_edit_group smallint(5) NOT NULL default '0', ! auth_delete_group smallint(5) NOT NULL default '0', ! PRIMARY KEY (block_id) ! ); ! ! # ! # Dumping data for table `mx_block` ! # ! ! INSERT INTO mx_table_block VALUES (1, 'Welcome', '', 20, 0, 5, 0, 0, 0, 0); ! INSERT INTO mx_table_block VALUES (2, 'Multiple Horizontal Blocks', '', 19, 0, 0, 0, 0, 0, 0); ! INSERT INTO mx_table_block VALUES (3, 'Demo Textblock Multi', '', 22, 0, 5, 0, 0, 0, 0); ! INSERT INTO mx_table_block VALUES (4, 'Demo Textblock BBcode', '', 20, 0, 5, 0, 0, 0, 0); ! INSERT INTO mx_table_block VALUES (5, 'Demo Textblock Html', '', 21, 0, 5, 0, 0, 0, 0); ! INSERT INTO mx_table_block VALUES (6, 'Poll', '', 12, 0, 5, 0, 0, 0, 0); ! INSERT INTO mx_table_block VALUES (7, 'Language Select', '', 13, 99, 5, 0, 0, 0, 0); ! INSERT INTO mx_table_block VALUES (8, 'Navigation Menu', '', 11, 0, 5, 0, 0, 0, 0); ! INSERT INTO mx_table_block VALUES (24, 'Forum', '', 10, 0, 0, 0, 0, 0, 0); ! INSERT INTO mx_table_block VALUES (13, 'Login', NULL, 14, 99, 5, 0, 0, 0, 0); ! INSERT INTO mx_table_block VALUES (14, 'Theme Select', '', 15, 0, 5, 0, 0, 0, 0); ! INSERT INTO mx_table_block VALUES (21, 'Google', '', 16, 0, 0, 0, 0, 0, 0); ! INSERT INTO mx_table_block VALUES (18, 'Announcements', NULL, 17, 0, 0, 0, 0, 0, 0); ! INSERT INTO mx_table_block VALUES (19, 'Online', '', 18, 0, 0, 0, 0, 0, 0); ! INSERT INTO mx_table_block VALUES (16, 'Last Message Post', NULL, 30, 0, 0, 0, 0, 0, 0); ! INSERT INTO mx_table_block VALUES (32, 'Statistics', '', 40, 0, 0, 0, 0, 0, 0); ! ! # -------------------------------------------------------- ! ! # ! # Table structure for table `mx_block_system_parameter` ! # ! ! CREATE TABLE mx_table_block_system_parameter ( ! block_id smallint(5) unsigned NOT NULL default '0', ! parameter_id smallint(5) unsigned NOT NULL default '0', ! parameter_value text, ! bbcode_uid varchar(10) default NULL, ! PRIMARY KEY (block_id, parameter_id) ! ); ! ! # ! # Dumping data for table `mx_block_system_parameter` ! # ! ! INSERT INTO mx_table_block_system_parameter VALUES (1, 15, 'Welcome to the Mx-system Portal!\r\n\r\nPlease visit www.mx-system.com for further information.\r\n\r\nThe Mx-Portal version is announced and documented [url=http://www.mx-system.com/forum/viewforum.php?f=11] here[/url].', '10bec5b560'); ! INSERT INTO mx_table_block_system_parameter VALUES (2, 60, '3,4,5', ''); ! INSERT INTO mx_table_block_system_parameter VALUES (2, 61, '33%,*,33%', ''); ! INSERT INTO mx_table_block_system_parameter VALUES (2, 62, '4', ''); ! INSERT INTO mx_table_block_system_parameter VALUES (3, 50, 'This is a demo multi textblock!\r\n\r\n - featuring bbcode, html, style parameters (click the EDIT button and try them out) and permissions (view and edit permissions for users and PRIVATE groups).', '10bec5b560'); ! INSERT INTO mx_table_block_system_parameter VALUES (3, 51, 'none', ''); ! INSERT INTO mx_table_block_system_parameter VALUES (3, 52, 'TRUE', ''); ! INSERT INTO mx_table_block_system_parameter VALUES (3, 53, 'TRUE', ''); ! INSERT INTO mx_table_block_system_parameter VALUES (3, 54, 'TRUE', ''); ! INSERT INTO mx_table_block_system_parameter VALUES (4, 15, 'This is a demo bbcode textblock!\r\n\r\n- featuring bbcode, html and permissions (view and edit permissions for users and PRIVATE groups).', '10bec5b560'); ! INSERT INTO mx_table_block_system_parameter VALUES (5, 16, 'This is a demo html textblock!\r\n\r\n- featuring html and permissions (view and edit permissions for users and PRIVATE groups).', '10bec5b560'); ! INSERT INTO mx_table_block_system_parameter VALUES (6, 36, '', NULL); ! INSERT INTO mx_table_block_system_parameter VALUES (6, 13, '0', NULL); ! INSERT INTO mx_table_block_system_parameter VALUES (16, 17, '5', NULL); ! INSERT INTO mx_table_block_system_parameter VALUES (16, 18, 'TRUE', NULL); ! INSERT INTO mx_table_block_system_parameter VALUES (16, 19, '30', NULL); ! INSERT INTO mx_table_block_system_parameter VALUES (16, 20, '_self', NULL); ! INSERT INTO mx_table_block_system_parameter VALUES (16, 21, 'left', NULL); ! INSERT INTO mx_table_block_system_parameter VALUES (16, 22, 'TRUE', NULL); ! INSERT INTO mx_table_block_system_parameter VALUES (16, 37, '', NULL); ! INSERT INTO mx_table_block_system_parameter VALUES (16, 38, 'FALSE', NULL); ! INSERT INTO mx_table_block_system_parameter VALUES (16, 39, 'FALSE', NULL); ! INSERT INTO mx_table_block_system_parameter VALUES (16, 40, 'TRUE', NULL); ! INSERT INTO mx_table_block_system_parameter VALUES (18, 1, '1', NULL); ! INSERT INTO mx_table_block_system_parameter VALUES (18, 2, '999', NULL); ! INSERT INTO mx_table_block_system_parameter VALUES (18, 3, 'TRUE', NULL); ! INSERT INTO mx_table_block_system_parameter VALUES (18, 4, 'FALSE', NULL); ! INSERT INTO mx_table_block_system_parameter VALUES (18, 5, 'FALSE', NULL); ! INSERT INTO mx_table_block_system_parameter VALUES (18, 7, 'thumb_news.gif', NULL); ! INSERT INTO mx_table_block_system_parameter VALUES (18, 8, 'thumb_globe.gif', NULL); ! INSERT INTO mx_table_block_system_parameter VALUES (18, 9, 'thumb_globe.gif', NULL); ! INSERT INTO mx_table_block_system_parameter VALUES (18, 6, 'TRUE', NULL); ! INSERT INTO mx_table_block_system_parameter VALUES (18, 10, 'thumb_globe.gif ', NULL); ! INSERT INTO mx_table_block_system_parameter VALUES (18, 11, '', NULL); ! ! # -------------------------------------------------------- ! ! # ! # Table structure for table `mx_column` ! # ! ! CREATE TABLE mx_table_column ( ! column_id smallint(5) unsigned NOT NULL auto_increment, ! column_title varchar(100) default NULL, ! column_order smallint(5) unsigned NOT NULL default '0', ! bbcode_uid varchar(10) default NULL, ! column_size varchar(5) default '100%', ! page_id smallint(5) NOT NULL default '0', ! PRIMARY KEY (column_id), ! KEY cat_order (column_order) ! ); ! ! # ! # Dumping data for table `mx_column` ! # ! ! INSERT INTO mx_table_column VALUES (1, 'Column 1', 10, NULL, '220', 1); ! INSERT INTO mx_table_column VALUES (2, 'Column 2', 20, NULL, '100%', 1); ! INSERT INTO mx_table_column VALUES (20, 'Menu', 10, NULL, '200', 2); ! INSERT INTO mx_table_column VALUES (21, 'Forum', 20, NULL, '100%', 2); ! ! # -------------------------------------------------------- ! ! # ! # Table structure for table `mx_column_block` ! # ! ! CREATE TABLE mx_table_column_block ( ! column_id smallint(5) NOT NULL default '0', ! block_id smallint(5) NOT NULL default '0', ! block_order smallint(5) NOT NULL default '0' ! ); ! ! # ! # Dumping data for table `mx_column_block` ! # ! ! INSERT INTO mx_table_column_block VALUES (1, 8, 10); ! INSERT INTO mx_table_column_block VALUES (1, 16, 20); ! INSERT INTO mx_table_column_block VALUES (1, 6, 30); ! INSERT INTO mx_table_column_block VALUES (1, 13, 40); ! INSERT INTO mx_table_column_block VALUES (1, 7, 50); ! INSERT INTO mx_table_column_block VALUES (1, 14, 60); ! INSERT INTO mx_table_column_block VALUES (2, 1, 10); ! INSERT INTO mx_table_column_block VALUES (2, 2, 10); ! INSERT INTO mx_table_column_block VALUES (2, 18, 20); ! INSERT INTO mx_table_column_block VALUES (2, 19, 30); ! INSERT INTO mx_table_column_block VALUES (20, 8, 10); ! INSERT INTO mx_table_column_block VALUES (20, 16, 20); ! INSERT INTO mx_table_column_block VALUES (21, 24, 30); ! INSERT INTO mx_table_column_block VALUES (21, 19, 40); ! ! # -------------------------------------------------------- ! ! # ! # Table structure for table `mx_function` ! # ! ! CREATE TABLE mx_table_function ( ! function_id smallint(5) unsigned NOT NULL auto_increment, ! module_id smallint(5) unsigned NOT NULL default '0', ! function_name varchar(150) default NULL, ! function_desc text, ! function_file varchar(255) default NULL, ! function_admin varchar(255) default NULL, ! PRIMARY KEY (function_id), ! KEY module_id (module_id) ! ); ! ! # ! # Dumping data for table `mx_function` ! # ! ! INSERT INTO mx_table_function VALUES (10, 10, 'Forum phpBB', 'Forum phpBB', 'mx_forum.php', NULL); ! INSERT INTO mx_table_function VALUES (11, 10, 'Navigation Menu', 'Menu Navigation', 'mx_menu_nav.php', 'admin/admin_mx_menu.php'); ! INSERT INTO mx_table_function VALUES (12, 10, 'Polls', 'Polls', 'mx_poll.php', NULL); ! INSERT INTO mx_table_function VALUES (13, 10, 'Language Select', 'Language Select', 'mx_language.php', NULL); ! INSERT INTO mx_table_function VALUES (14, 10, 'Login', 'Login', 'mx_login.php', NULL); ! INSERT INTO mx_table_function VALUES (15, 10, 'Theme Select', 'Theme Select', 'mx_theme.php', NULL); ! INSERT INTO mx_table_function VALUES (16, 10, 'Google', 'Google', 'mx_google.php', NULL); ! INSERT INTO mx_table_function VALUES (17, 10, 'Announcements', 'Announcements', 'mx_announce.php', NULL); ! INSERT INTO mx_table_function VALUES (18, 10, 'Who is Online', 'Who is Online', 'mx_online.php', NULL); ! INSERT INTO mx_table_function VALUES (19, 10, 'Multiple Horizontal Blocks', 'Block that can arrange other blocks in a horizontal line.', 'mx_multiple_blocks.php', ''); ! INSERT INTO mx_table_function VALUES (20, 20, 'TextBlock_BBcode', 'TextBlock_BBcode', 'mx_textblock_bbcode.php', 'modules/mx_textblocks/admin/admin_edit.php'); ! INSERT INTO mx_table_function VALUES (21, 20, 'TextBlock_Html', 'TextBlock_Html', 'mx_textblock_html.php', 'modules/mx_textblocks/admin/admin_edit.php'); ! INSERT INTO mx_table_function VALUES (22, 20, 'TextBlock_Multi', 'Textblock for bbcode and html with parameters', 'mx_textblock_multi.php', 'modules/mx_textblocks/admin/admin_edit.php'); ! INSERT INTO mx_table_function VALUES (30, 30, 'Post Last Message', 'Post Last Message', 'mx_last_msg.php', NULL); ! INSERT INTO mx_table_function VALUES (40, 40, 'Statistics MX', 'Statistics MX', 'mx_statistics.php', NULL); ! ! # -------------------------------------------------------- ! ! # ! # Table structure for table `mx_menu_categories` ! # ! ! CREATE TABLE mx_table_menu_categories ( ! block_id smallint(5) unsigned NOT NULL default '1', ! cat_id mediumint(8) unsigned NOT NULL auto_increment, ! cat_title varchar(100) default NULL, ! cat_order mediumint(8) unsigned NOT NULL default '0', ! bbcode_uid varchar(10) default NULL, ! cat_desc text, ! cat_show tinyint(1) unsigned NOT NULL default '0', ! PRIMARY KEY (cat_id), ! KEY cat_order (cat_order) ! ); ! ! # ! # Dumping data for table `mx_menu_categories` ! # ! ! INSERT INTO mx_table_menu_categories VALUES (8, 1, 'Main Menu', 20, NULL, NULL, 1); ! ! # -------------------------------------------------------- ! ! # ! # Table structure for table `mx_menu_nav` ! # ! ! CREATE TABLE mx_table_menu_nav ( ! menu_id smallint(5) unsigned NOT NULL auto_increment, ! cat_id mediumint(8) unsigned NOT NULL default '0', ! menu_name varchar(150) default NULL, ! menu_desc text, ! menu_links varchar(255) default NULL, ! auth_view tinyint(2) NOT NULL default '0', ! menu_order smallint(5) unsigned default '0', ! bbcode_uid varchar(10) default NULL, ! menu_icon varchar(255) default NULL, ! function_id smallint(5) unsigned default '0', ! block_id smallint(8) NOT NULL default '0', ! page_id smallint(5) unsigned default '0', ! auth_view_group smallint(5) NOT NULL default '0', ! link_target tinyint(2) unsigned NOT NULL default '0', ! PRIMARY KEY (menu_id), ! KEY cat_id (cat_id) ! ); ! ! # ! # Dumping data for table `mx_menu_nav` ! # ! ! INSERT INTO mx_table_menu_nav VALUES (1, 1, 'Home', 'Home Page', 'index.php', 0, 10, 'bc5d5e65eb', 'icon_home.gif', 0, 0, 0, 0, 0); ! INSERT INTO mx_table_menu_nav VALUES (2, 1, 'Forum', 'phpBB Forum', 'index.php', 0, 20, '1a7e19f246', 'icon_forum.gif', 0, 0, 2, 0, 0); ! INSERT INTO mx_table_menu_nav VALUES (3, 1, 'Statistics', 'Statistics Module', '', 0, 30, 'e16b0fbb51', 'icon_stat.gif', 40, 0, 0, 0, 0); ! ! # -------------------------------------------------------- ! ! # ! # Table structure for table `mx_module` ! # ! ! CREATE TABLE mx_table_module ( ! module_id smallint(5) unsigned NOT NULL auto_increment, ! module_name varchar(150) default NULL, ! module_path varchar(255) default NULL, ! module_desc text, ! module_include_admin char(1) default '0', ! PRIMARY KEY (module_id) ! ); ! ! # ! # Dumping data for table `mx_module` ! # ! ! INSERT INTO mx_table_module VALUES (10, 'Core Blocks', './', 'Core blocks', ''); ! INSERT INTO mx_table_module VALUES (20, 'Text Blocks', 'modules/mx_textblocks/', 'Textblocks module', ''); ! INSERT INTO mx_table_module VALUES (30, 'Post Last Message', 'modules/mx_last_msg/', 'Last Message Module', '0'); ! INSERT INTO mx_table_module VALUES (40, 'Statistics MX', 'modules/mx_statistics/', 'Statistics Modules', '0'); ! ! # -------------------------------------------------------- ! ! # ! # Table structure for table `mx_page` ! # ! ! CREATE TABLE mx_table_page ( ! page_id smallint(5) NOT NULL auto_increment, ! page_name varchar(255) default NULL, ! page_icon varchar(255) default NULL, ! auth_view tinyint(2) NOT NULL default '0', ! auth_view_group smallint(5) NOT NULL default '0', ! page_header varchar(255) default 'overall_header.tpl', ! PRIMARY KEY (page_id) ! ); ! ! # ! # Dumping data for table `mx_page` ! # ! ! INSERT INTO mx_table_page VALUES (1, 'Home', 'icon_home.gif', 0, 0, 'overall_header.tpl'); ! INSERT INTO mx_table_page VALUES (2, 'Forum', 'icon_forum.gif', 0, 0, 'overall_header.tpl'); ! ! # -------------------------------------------------------- ! ! # ! # Table structure for table `mx_parameter` ! # ! ! CREATE TABLE mx_table_parameter ( ! parameter_id smallint(5) unsigned NOT NULL auto_increment, ! function_id smallint(5) unsigned NOT NULL default '0', ! parameter_name varchar(150) default NULL, ! parameter_type varchar(30) default NULL, ! parameter_default varchar(150) default NULL, ! parameter_function varchar(255) default NULL, ! PRIMARY KEY (parameter_id) ! ); ! ! # ! # Dumping data for table `mx_parameter` ! # ! ! INSERT INTO mx_table_parameter VALUES (1, 17, 'announce_nbr_display', 'Number', '1', NULL); ! INSERT INTO mx_table_parameter VALUES (2, 17, 'announce_nbr_days', 'Number', '14', NULL); ! INSERT INTO mx_table_parameter VALUES (3, 17, 'announce_display', 'Boolean', 'TRUE', NULL); ! INSERT INTO mx_table_parameter VALUES (4, 17, 'announce_display_sticky', 'Boolean', 'TRUE', NULL); ! INSERT INTO mx_table_parameter VALUES (5, 17, 'announce_display_normal', 'Boolean', 'FALSE', NULL); ! INSERT INTO mx_table_parameter VALUES (7, 17, 'announce_img', 'Text', 'thumb_globe.gif', NULL); ! INSERT INTO mx_table_parameter VALUES (8, 17, 'announce_img_sticky', 'Text', 'thumb_globe.gif', NULL); ! INSERT INTO mx_table_parameter VALUES (9, 17, 'announce_img_normal', 'Text', 'thumb_globe.gif', NULL); ! INSERT INTO mx_table_parameter VALUES (6, 17, 'announce_display_global', 'Boolean', 'TRUE', NULL); ! INSERT INTO mx_table_parameter VALUES (10, 17, 'announce_img_global', 'Text', 'thumb_globe.gif', NULL); ! INSERT INTO mx_table_parameter VALUES (11, 17, 'announce_forum', 'Function', NULL, 'get_list_multiple("{parameter_id}[]", FORUMS_TABLE, \'forum_id\', \'forum_name\', "{parameter_value}", TRUE)'); ! INSERT INTO mx_table_parameter VALUES (13, 12, 'Poll_Display', 'Function', '0', 'poll_select( {parameter_value}, "{parameter_id}" )'); ! INSERT INTO mx_table_parameter VALUES (36, 12, 'poll_forum', 'Function', '', 'get_list_multiple("{parameter_id}[]", FORUMS_TABLE, \'forum_id\', \'forum_name\', "{parameter_value}", TRUE)'); ! INSERT INTO mx_table_parameter VALUES (15, 20, 'Text', 'BBText', 'Insert your text here', NULL); ! INSERT INTO mx_table_parameter VALUES (16, 21, 'Html', 'Html', 'Entre your Html code here', NULL); ! INSERT INTO mx_table_parameter VALUES (17, 30, 'Last_Msg_Number_Title', 'Number', '15', NULL); ! INSERT INTO mx_table_parameter VALUES (18, 30, 'Last_Msg_Display_Date', 'Boolean', 'TRUE', NULL); ! INSERT INTO mx_table_parameter VALUES (19, 30, 'Last_Msg_Title_Length', 'Number', '30', NULL); ! INSERT INTO mx_table_parameter VALUES (20, 30, 'Last_Msg_Target', 'Values', '_blank', NULL); ! INSERT INTO mx_table_parameter VALUES (21, 30, 'Last_Msg_Align', 'Values', 'left', NULL); ! INSERT INTO mx_table_parameter VALUES (22, 30, 'Last_Msg_Display_Forum', 'Boolean', 'TRUE', NULL); ! INSERT INTO mx_table_parameter VALUES (37, 30, 'Last_Msg_forum', 'Function', '', 'get_list_multiple("{parameter_id}[]", FORUMS_TABLE, \'forum_id\', \'forum_name\', "{parameter_value}", TRUE)'); ! INSERT INTO mx_table_parameter VALUES (38, 30, 'Last_Msg_Display_Last_Author', 'Boolean', 'TRUE', ''); ! INSERT INTO mx_table_parameter VALUES (39, 30, 'Last_Msg_Display_Author', 'Boolean', 'FALSE', ''); ! INSERT INTO mx_table_parameter VALUES (40, 30, 'Last_Msg_Display_Icon_View', 'Boolean', 'TRUE', ''); ! INSERT INTO mx_table_parameter VALUES (50, 22, 'Text', 'BBText', 'Enter your block text here', ''); ! INSERT INTO mx_table_parameter VALUES (51, 22, 'text_style', 'Values', 'none', ''); ! INSERT INTO mx_table_parameter VALUES (52, 22, 'block_style', 'Boolean', 'TRUE', ''); ! INSERT INTO mx_table_parameter VALUES (53, 22, 'title_style', 'Boolean', 'TRUE', ''); ! INSERT INTO mx_table_parameter VALUES (54, 22, 'show_title', 'Boolean', 'TRUE', ''); ! INSERT INTO mx_table_parameter VALUES (60, 19, 'block_ids', 'Function', '1,2,3', 'get_list_multiple( "{parameter_id}[]", BLOCK_TABLE, \'block_id\', \'block_title\', "{parameter_value}", TRUE)'); ! INSERT INTO mx_table_parameter VALUES (61, 19, 'block_sizes', 'Text', '20%,30%,*', ''); ! INSERT INTO mx_table_parameter VALUES (62, 19, 'space_between', 'Number', '4', ''); ! ! # -------------------------------------------------------- ! ! # ! # Table structure for table `mx_parameter_option` ! # ! ! CREATE TABLE mx_table_parameter_option ( ! option_id smallint(5) unsigned NOT NULL auto_increment, ! parameter_id smallint(5) unsigned NOT NULL default '0', ! option_code varchar(150) default NULL, ! option_desc text, ! PRIMARY KEY (option_id) ! ); ! ! # ! # Dumping data for table `mx_parameter_option` ! # ! ! INSERT INTO mx_table_parameter_option VALUES (3, 21, 'left', 'left '); ! INSERT INTO mx_table_parameter_option VALUES (4, 21, 'right', 'right'); ! INSERT INTO mx_table_parameter_option VALUES (5, 21, 'center', 'center'); ! INSERT INTO mx_table_parameter_option VALUES (6, 20, '_blank', 'New Window'); ! INSERT INTO mx_table_parameter_option VALUES (7, 20, '_self', 'Current Window'); ! ! # -------------------------------------------------------- ! ! # ! # Table structure for table `mx_portal` ! # ! ! CREATE TABLE mx_table_portal ( ! portal_id smallint(5) unsigned NOT NULL auto_increment, ! portal_name varchar(150) default NULL, ! portal_phpbb_url varchar(255) default 'http://www.phpbb.com/phpBB/', ! portal_url varchar(255) default NULL, ! portal_version varchar(255) default NULL, ! top_phpbb_links smallint(5) unsigned NOT NULL default '1', ! PRIMARY KEY (portal_id) ! ); --- 1,391 ---- ! # ! # mxBB-Portal - MySQL Schema - version 2.7.5 ! # ! # $Id$ ! # ! ! # -------------------------------------------------------- ! ! # ! # Table structure for table `mx_block` ! # ! ! CREATE TABLE mx_table_block ( ! block_id smallint(5) unsigned NOT NULL auto_increment, ! block_title varchar(150) default NULL, ! block_desc text, ! function_id smallint(5) unsigned default NULL, ! auth_view tinyint(2) NOT NULL default '0', ! auth_edit tinyint(2) default '0', ! auth_delete tinyint(2) default '0', ! auth_view_group smallint(5) NOT NULL default '0', ! auth_edit_group smallint(5) NOT NULL default '0', ! auth_delete_group smallint(5) NOT NULL default '0', ! PRIMARY KEY (block_id) ! ); ! ! # ! # Dumping data for table `mx_block` ! # ! ! INSERT INTO mx_table_block VALUES (1, 'Welcome', '', 20, 0, 5, 0, 0, 0, 0); ! INSERT INTO mx_table_block VALUES (2, 'Multiple Horizontal Blocks', '', 19, 0, 0, 0, 0, 0, 0); ! INSERT INTO mx_table_block VALUES (3, 'Demo Textblock Multi', '', 22, 0, 5, 0, 0, 0, 0); ! INSERT INTO mx_table_block VALUES (4, 'Demo Textblock BBcode', '', 20, 0, 5, 0, 0, 0, 0); ! INSERT INTO mx_table_block VALUES (5, 'Demo Textblock Html', '', 21, 0, 5, 0, 0, 0, 0); ! INSERT INTO mx_table_block VALUES (6, 'Poll', '', 12, 0, 5, 0, 0, 0, 0); ! INSERT INTO mx_table_block VALUES (7, 'Language Select', '', 13, 99, 5, 0, 0, 0, 0); ! INSERT INTO mx_table_block VALUES (8, 'Navigation Menu', '', 11, 0, 5, 0, 0, 0, 0); ! INSERT INTO mx_table_block VALUES (24, 'Forum', '', 10, 0, 0, 0, 0, 0, 0); ! INSERT INTO mx_table_block VALUES (13, 'Login', NULL, 14, 99, 5, 0, 0, 0, 0); ! INSERT INTO mx_table_block VALUES (14, 'Theme Select', '', 15, 0, 5, 0, 0, 0, 0); ! INSERT INTO mx_table_block VALUES (21, 'Google', '', 16, 0, 0, 0, 0, 0, 0); ! INSERT INTO mx_table_block VALUES (18, 'Announcements', NULL, 17, 0, 0, 0, 0, 0, 0); ! INSERT INTO mx_table_block VALUES (19, 'Online', '', 18, 0, 0, 0, 0, 0, 0); ! INSERT INTO mx_table_block VALUES (16, 'Last Message Post', NULL, 30, 0, 0, 0, 0, 0, 0); ! INSERT INTO mx_table_block VALUES (32, 'Statistics', '', 40, 0, 0, 0, 0, 0, 0); ! ! # -------------------------------------------------------- ! ! # ! # Table structure for table `mx_block_system_parameter` ! # ! ! CREATE TABLE mx_table_block_system_parameter ( ! block_id smallint(5) unsigned NOT NULL default '0', ! parameter_id smallint(5) unsigned NOT NULL default '0', ! parameter_value text, ! bbcode_uid varchar(10) default NULL, ! PRIMARY KEY (block_id, parameter_id) ! ); ! ! # ! # Dumping data for table `mx_block_system_parameter` ! # ! ! INSERT INTO mx_table_block_system_parameter VALUES (1, 15, 'Welcome to the Mx-system Portal!\r\n\r\nPlease visit www.mx-system.com for further information.\r\n\r\nThe Mx-Portal version is announced and documented [url=http://www.mx-system.com/forum/viewforum.php?f=11] here[/url].', '10bec5b560'); ! INSERT INTO mx_table_block_system_parameter VALUES (2, 60, '3,4,5', ''); ! INSERT INTO mx_table_block_system_parameter VALUES (2, 61, '33%,*,33%', ''); ! INSERT INTO mx_table_block_system_parameter VALUES (2, 62, '4', ''); ! INSERT INTO mx_table_block_system_parameter VALUES (3, 50, 'This is a demo multi textblock!\r\n\r\n - featuring bbcode, html, style parameters (click the EDIT button and try them out) and permissions (view and edit permissions for users and PRIVATE groups).', '10bec5b560'); ! INSERT INTO mx_table_block_system_parameter VALUES (3, 51, 'none', ''); ! INSERT INTO mx_table_block_system_parameter VALUES (3, 52, 'TRUE', ''); ! INSERT INTO mx_table_block_system_parameter VALUES (3, 53, 'TRUE', ''); ! INSERT INTO mx_table_block_system_parameter VALUES (3, 54, 'TRUE', ''); ! INSERT INTO mx_table_block_system_parameter VALUES (4, 15, 'This is a demo bbcode textblock!\r\n\r\n- featuring bbcode, html and permissions (view and edit permissions for users and PRIVATE groups).', '10bec5b560'); ! INSERT INTO mx_table_block_system_parameter VALUES (5, 16, 'This is a demo html textblock!\r\n\r\n- featuring html and permissions (view and edit permissions for users and PRIVATE groups).', '10bec5b560'); ! INSERT INTO mx_table_block_system_parameter VALUES (6, 36, '', NULL); ! INSERT INTO mx_table_block_system_parameter VALUES (6, 13, '0', NULL); ! INSERT INTO mx_table_block_system_parameter VALUES (16, 17, '5', NULL); ! INSERT INTO mx_table_block_system_parameter VALUES (16, 18, 'TRUE', NULL); ! INSERT INTO mx_table_block_system_parameter VALUES (16, 19, '30', NULL); ! INSERT INTO mx_table_block_system_parameter VALUES (16, 20, '_self', NULL); ! INSERT INTO mx_table_block_system_parameter VALUES (16, 21, 'left', NULL); ! INSERT INTO mx_table_block_system_parameter VALUES (16, 22, 'TRUE', NULL); ! INSERT INTO mx_table_block_system_parameter VALUES (16, 37, '', NULL); ! INSERT INTO mx_table_block_system_parameter VALUES (16, 38, 'FALSE', NULL); ! INSERT INTO mx_table_block_system_parameter VALUES (16, 39, 'FALSE', NULL); ! INSERT INTO mx_table_block_system_parameter VALUES (16, 40, 'TRUE', NULL); ! INSERT INTO mx_table_block_system_parameter VALUES (18, 1, '1', NULL); ! INSERT INTO mx_table_block_system_parameter VALUES (18, 2, '999', NULL); ! INSERT INTO mx_table_block_system_parameter VALUES (18, 3, 'TRUE', NULL); ! INSERT INTO mx_table_block_system_parameter VALUES (18, 4, 'FALSE', NULL); ! INSERT INTO mx_table_block_system_parameter VALUES (18, 5, 'FALSE', NULL); ! INSERT INTO mx_table_block_system_parameter VALUES (18, 7, 'thumb_news.gif', NULL); ! INSERT INTO mx_table_block_system_parameter VALUES (18, 8, 'thumb_globe.gif', NULL); ! INSERT INTO mx_table_block_system_parameter VALUES (18, 9, 'thumb_globe.gif', NULL); ! INSERT INTO mx_table_block_system_parameter VALUES (18, 6, 'TRUE', NULL); ! INSERT INTO mx_table_block_system_parameter VALUES (18, 10, 'thumb_globe.gif ', NULL); ! INSERT INTO mx_table_block_system_parameter VALUES (18, 11, '', NULL); ! ! # -------------------------------------------------------- ! ! # ! # Table structure for table `mx_column` ! # ! ! CREATE TABLE mx_table_column ( ! column_id smallint(5) unsigned NOT NULL auto_increment, ! column_title varchar(100) default NULL, ! column_order smallint(5) unsigned NOT NULL default '0', ! bbcode_uid varchar(10) default NULL, ! column_size varchar(5) default '100%', ! page_id smallint(5) NOT NULL default '0', ! PRIMARY KEY (column_id), ! KEY cat_order (column_order) ! ); ! ! # ! # Dumping data for table `mx_column` ! # ! ! INSERT INTO mx_table_column VALUES (1, 'Column 1', 10, NULL, '220', 1); ! INSERT INTO mx_table_column VALUES (2, 'Column 2', 20, NULL, '100%', 1); ! INSERT INTO mx_table_column VALUES (20, 'Menu', 10, NULL, '200', 2); ! INSERT INTO mx_table_column VALUES (21, 'Forum', 20, NULL, '100%', 2); ! ! # -------------------------------------------------------- ! ! # ! # Table structure for table `mx_column_block` ! # ! ! CREATE TABLE mx_table_column_block ( ! column_id smallint(5) NOT NULL default '0', ! block_id smallint(5) NOT NULL default '0', ! block_order smallint(5) NOT NULL default '0' ! ); ! ! # ! # Dumping data for table `mx_column_block` ! # ! ! INSERT INTO mx_table_column_block VALUES (1, 8, 10); ! INSERT INTO mx_table_column_block VALUES (1, 16, 20); ! INSERT INTO mx_table_column_block VALUES (1, 6, 30); ! INSERT INTO mx_table_column_block VALUES (1, 13, 40); ! INSERT INTO mx_table_column_block VALUES (1, 7, 50); ! INSERT INTO mx_table_column_block VALUES (1, 14, 60); ! INSERT INTO mx_table_column_block VALUES (2, 1, 10); ! INSERT INTO mx_table_column_block VALUES (2, 2, 10); ! INSERT INTO mx_table_column_block VALUES (2, 18, 20); ! INSERT INTO mx_table_column_block VALUES (2, 19, 30); ! INSERT INTO mx_table_column_block VALUES (20, 8, 10); ! INSERT INTO mx_table_column_block VALUES (20, 16, 20); ! INSERT INTO mx_table_column_block VALUES (21, 24, 30); ! INSERT INTO mx_table_column_block VALUES (21, 19, 40); ! ! # -------------------------------------------------------- ! ! # ! # Table structure for table `mx_function` ! # ! ! CREATE TABLE mx_table_function ( ! function_id smallint(5) unsigned NOT NULL auto_increment, ! module_id smallint(5) unsigned NOT NULL default '0', ! function_name varchar(150) default NULL, ! function_desc text, ! function_file varchar(255) default NULL, ! function_admin varchar(255) default NULL, ! PRIMARY KEY (function_id), ! KEY module_id (module_id) ! ); ! ! # ! # Dumping data for table `mx_function` ! # ! ! INSERT INTO mx_table_function VALUES (10, 10, 'Forum phpBB', 'Forum phpBB', 'mx_forum.php', NULL); ! INSERT INTO mx_table_function VALUES (11, 10, 'Navigation Menu', 'Menu Navigation', 'mx_menu_nav.php', 'admin/admin_mx_menu.php'); ! INSERT INTO mx_table_function VALUES (12, 10, 'Polls', 'Polls', 'mx_poll.php', NULL); ! INSERT INTO mx_table_function VALUES (13, 10, 'Language Select', 'Language Select', 'mx_language.php', NULL); ! INSERT INTO mx_table_function VALUES (14, 10, 'Login', 'Login', 'mx_login.php', NULL); ! INSERT INTO mx_table_function VALUES (15, 10, 'Theme Select', 'Theme Select', 'mx_theme.php', NULL); ! INSERT INTO mx_table_function VALUES (16, 10, 'Google', 'Google', 'mx_google.php', NULL); ! INSERT INTO mx_table_function VALUES (17, 10, 'Announcements', 'Announcements', 'mx_announce.php', NULL); ! INSERT INTO mx_table_function VALUES (18, 10, 'Who is Online', 'Who is Online', 'mx_online.php', NULL); ! INSERT INTO mx_table_function VALUES (19, 10, 'Multiple Horizontal Blocks', 'Block that can arrange other blocks in a horizontal line.', 'mx_multiple_blocks.php', ''); ! INSERT INTO mx_table_function VALUES (20, 20, 'TextBlock_BBcode', 'TextBlock_BBcode', 'mx_textblock_bbcode.php', 'modules/mx_textblocks/admin/admin_edit.php'); ! INSERT INTO mx_table_function VALUES (21, 20, 'TextBlock_Html', 'TextBlock_Html', 'mx_textblock_html.php', 'modules/mx_textblocks/admin/admin_edit.php'); ! INSERT INTO mx_table_function VALUES (22, 20, 'TextBlock_Multi', 'Textblock for bbcode and html with parameters', 'mx_textblock_multi.php', 'modules/mx_textblocks/admin/admin_edit.php'); ! INSERT INTO mx_table_function VALUES (30, 30, 'Post Last Message', 'Post Last Message', 'mx_last_msg.php', NULL); ! INSERT INTO mx_table_function VALUES (40, 40, 'Statistics MX', 'Statistics MX', 'mx_statistics.php', NULL); ! ! # -------------------------------------------------------- ! ! # ! # Table structure for table `mx_menu_categories` ! # ! ! CREATE TABLE mx_table_menu_categories ( ! block_id smallint(5) unsigned NOT NULL default '1', ! cat_id mediumint(8) unsigned NOT NULL auto_increment, ! cat_title varchar(100) default NULL, ! cat_order mediumint(8) unsigned NOT NULL default '0', ! bbcode_uid varchar(10) default NULL, ! cat_desc text, ! cat_show tinyint(1) unsigned NOT NULL default '0', ! PRIMARY KEY (cat_id), ! KEY cat_order (cat_order) ! ); ! ! # ! # Dumping data for table `mx_menu_categories` ! # ! ! INSERT INTO mx_table_menu_categories VALUES (8, 1, 'Main Menu', 20, NULL, NULL, 1); ! ! # -------------------------------------------------------- ! ! # ! # Table structure for table `mx_menu_nav` ! # ! ! CREATE TABLE mx_table_menu_nav ( ! menu_id smallint(5) unsigned NOT NULL auto_increment, ! cat_id mediumint(8) unsigned NOT NULL default '0', ! menu_name varchar(150) default NULL, ! menu_desc text, ! menu_links varchar(255) default NULL, ! auth_view tinyint(2) NOT NULL default '0', ! menu_order smallint(5) unsigned default '0', ! bbcode_uid varchar(10) default NULL, ! menu_icon varchar(255) default NULL, ! function_id smallint(5) unsigned default '0', ! block_id smallint(8) NOT NULL default '0', ! page_id smallint(5) unsigned default '0', ! auth_view_group smallint(5) NOT NULL default '0', ! link_target tinyint(2) unsigned NOT NULL default '0', ! PRIMARY KEY (menu_id), ! KEY cat_id (cat_id) ! ); ! ! # ! # Dumping data for table `mx_menu_nav` ! # ! ! INSERT INTO mx_table_menu_nav VALUES (1, 1, 'Home', 'Home Page', 'index.php', 0, 10, 'bc5d5e65eb', 'icon_home.gif', 0, 0, 0, 0, 0); ! INSERT INTO mx_table_menu_nav VALUES (2, 1, 'Forum', 'phpBB Forum', 'index.php', 0, 20, '1a7e19f246', 'icon_forum.gif', 0, 0, 2, 0, 0); ! INSERT INTO mx_table_menu_nav VALUES (3, 1, 'Statistics', 'Statistics Module', '', 0, 30, 'e16b0fbb51', 'icon_stat.gif', 40, 0, 0, 0, 0); ! ! # -------------------------------------------------------- ! ! # ! # Table structure for table `mx_module` ! # ! ! CREATE TABLE mx_table_module ( ! module_id smallint(5) unsigned NOT NULL auto_increment, ! module_name varchar(150) default NULL, ! module_path varchar(255) default NULL, ! module_desc text, ! module_include_admin char(1) default '0', ! PRIMARY KEY (module_id) ! ); ! ! # ! # Dumping data for table `mx_module` ! # ! ! INSERT INTO mx_table_module VALUES (10, 'Core Blocks', './', 'Core blocks', ''); ! INSERT INTO mx_table_module VALUES (20, 'Text Blocks', 'modules/mx_textblocks/', 'Textblocks module', ''); ! INSERT INTO mx_table_module VALUES (30, 'Post Last Message', 'modules/mx_last_msg/', 'Last Message Module', '0'); ! INSERT INTO mx_table_module VALUES (40, 'Statistics MX', 'modules/mx_statistics/', 'Statistics Modules', '0'); ! ! # -------------------------------------------------------- ! ! # ! # Table structure for table `mx_page` ! # ! ! CREATE TABLE mx_table_page ( ! page_id smallint(5) NOT NULL auto_increment, ! page_name varchar(255) default NULL, ! page_icon varchar(255) default NULL, ! auth_view tinyint(2) NOT NULL default '0', ! auth_view_group smallint(5) NOT NULL default '0', ! page_header varchar(255) default 'overall_header.tpl', ! PRIMARY KEY (page_id) ! ); ! ! # ! # Dumping data for table `mx_page` ! # ! ! INSERT INTO mx_table_page VALUES (1, 'Home', 'icon_home.gif', 0, 0, 'overall_header.tpl'); ! INSERT INTO mx_table_page VALUES (2, 'Forum', 'icon_forum.gif', 0, 0, 'overall_header.tpl'); ! ! # -------------------------------------------------------- ! ! # ! # Table structure for table `mx_parameter` ! # ! ! CREATE TABLE mx_table_parameter ( ! parameter_id smallint(5) unsigned NOT NULL auto_increment, ! function_id smallint(5) unsigned NOT NULL default '0', ! parameter_name varchar(150) default NULL, ! parameter_type varchar(30) default NULL, ! parameter_default varchar(150) default NULL, ! parameter_function varchar(255) default NULL, ! PRIMARY KEY (parameter_id) ! ); ! ! # ! # Dumping data for table `mx_parameter` ! # ! ! INSERT INTO mx_table_parameter VALUES (1, 17, 'announce_nbr_display', 'Number', '1', NULL); ! INSERT INTO mx_table_parameter VALUES (2, 17, 'announce_nbr_days', 'Number', '14', NULL); ! INSERT INTO mx_table_parameter VALUES (3, 17, 'announce_display', 'Boolean', 'TRUE', NULL); ! INSERT INTO mx_table_parameter VALUES (4, 17, 'announce_display_sticky', 'Boolean', 'TRUE', NULL); ! INSERT INTO mx_table_parameter VALUES (5, 17, 'announce_display_normal', 'Boolean', 'FALSE', NULL); ! INSERT INTO mx_table_parameter VALUES (7, 17, 'announce_img', 'Text', 'thumb_globe.gif', NULL); ! INSERT INTO mx_table_parameter VALUES (8, 17, 'announce_img_sticky', 'Text', 'thumb_globe.gif', NULL); ! INSERT INTO mx_table_parameter VALUES (9, 17, 'announce_img_normal', 'Text', 'thumb_globe.gif', NULL); ! INSERT INTO mx_table_parameter VALUES (6, 17, 'announce_display_global', 'Boolean', 'TRUE', NULL); ! INSERT INTO mx_table_parameter VALUES (10, 17, 'announce_img_global', 'Text', 'thumb_globe.gif', NULL); ! INSERT INTO mx_table_parameter VALUES (11, 17, 'announce_forum', 'Function', NULL, 'get_list_multiple("{parameter_id}[]", FORUMS_TABLE, \'forum_id\', \'forum_name\', "{parameter_value}", TRUE)'); ! INSERT INTO mx_table_parameter VALUES (13, 12, 'Poll_Display', 'Function', '0', 'poll_select( {parameter_value}, "{parameter_id}" )'); ! INSERT INTO mx_table_parameter VALUES (36, 12, 'poll_forum', 'Function', '', 'get_list_multiple("{parameter_id}[]", FORUMS_TABLE, \'forum_id\', \'forum_name\', "{parameter_value}", TRUE)'); ! INSERT INTO mx_table_parameter VALUES (15, 20, 'Text', 'BBText', 'Insert your text here', NULL); ! INSERT INTO mx_table_parameter VALUES (16, 21, 'Html', 'Html', 'Entre your Html code here', NULL); ! INSERT INTO mx_table_parameter VALUES (17, 30, 'Last_Msg_Number_Title', 'Number', '15', NULL); ! INSERT INTO mx_table_parameter VALUES (18, 30, 'Last_Msg_Display_Date', 'Boolean', 'TRUE', NULL); ! INSERT INTO mx_table_parameter VALUES (19, 30, 'Last_Msg_Title_Length', 'Number', '30', NULL); ! INSERT INTO mx_table_parameter VALUES (20, 30, 'Last_Msg_Target', 'Values', '_blank', NULL); ! INSERT INTO mx_table_parameter VALUES (21, 30, 'Last_Msg_Align', 'Values', 'left', NULL); ! INSERT INTO mx_table_parameter VALUES (22, 30, 'Last_Msg_Display_Forum', 'Boolean', 'TRUE', NULL); ! INSERT INTO mx_table_parameter VALUES (37, 30, 'Last_Msg_forum', 'Function', '', 'get_list_multiple("{parameter_id}[]", FORUMS_TABLE, \'forum_id\', \'forum_name\', "{parameter_value}", TRUE)'); ! INSERT INTO mx_table_parameter VALUES (38, 30, 'Last_Msg_Display_Last_Author', 'Boolean', 'TRUE', ''); ! INSERT INTO mx_table_parameter VALUES (39, 30, 'Last_Msg_Display_Author', 'Boolean', 'FALSE', ''); ! INSERT INTO mx_table_parameter VALUES (40, 30, 'Last_Msg_Display_Icon_View', 'Boolean', 'TRUE', ''); ! INSERT INTO mx_table_parameter VALUES (50, 22, 'Text', 'BBText', 'Enter your block text here', ''); ! INSERT INTO mx_table_parameter VALUES (51, 22, 'text_style', 'Values', 'none', ''); ! INSERT INTO mx_table_parameter VALUES (52, 22, 'block_style', 'Boolean', 'TRUE', ''); ! INSERT INTO mx_table_parameter VALUES (53, 22, 'title_style', 'Boolean', 'TRUE', ''); ! INSERT INTO mx_table_parameter VALUES (54, 22, 'show_title', 'Boolean', 'TRUE', ''); ! INSERT INTO mx_table_parameter VALUES (60, 19, 'block_ids', 'Function', '1,2,3', 'get_list_multiple( "{parameter_id}[]", BLOCK_TABLE, \'block_id\', \'block_title\', "{parameter_value}", TRUE)'); ! INSERT INTO mx_table_parameter VALUES (61, 19, 'block_sizes', 'Text', '20%,30%,*', ''); ! INSERT INTO mx_table_parameter VALUES (62, 19, 'space_between', 'Number', '4', ''); ! ! # -------------------------------------------------------- ! ! # ! # Table structure for table `mx_parameter_option` ! # ! ! CREATE TABLE mx_table_parameter_option ( ! option_id smallint(5) unsigned NOT NULL auto_increment, ! parameter_id smallint(5) unsigned NOT NULL default '0', ! option_code varchar(150) default NULL, ! option_desc text, ! PRIMARY KEY (option_id) ! ); ! ! # ! # Dumping data for table `mx_parameter_option` ! # ! ! INSERT INTO mx_table_parameter_option VALUES (3, 21, 'left', 'left '); ! INSERT INTO mx_table_parameter_option VALUES (4, 21, 'right', 'right'); ! INSERT INTO mx_table_parameter_option VALUES (5, 21, 'center', 'center'); ! INSERT INTO mx_table_parameter_option VALUES (6, 20, '_blank', 'New Window'); ! INSERT INTO mx_table_parameter_option VALUES (7, 20, '_self', 'Current Window'); ! ! # -------------------------------------------------------- ! ! # ! # Table structure for table `mx_portal` ! # ! ! CREATE TABLE mx_table_portal ( ! portal_id smallint(5) unsigned NOT NULL auto_increment, ! portal_name varchar(150) default NULL, ! portal_phpbb_url varchar(255) default 'http://www.phpbb.com/phpBB/', ! portal_url varchar(255) default NULL, ! portal_version varchar(255) default NULL, ! top_phpbb_links smallint(5) unsigned NOT NULL default '1', ! PRIMARY KEY (portal_id) ! ); Index: mysql_schema_upgrade_to_2.7.4.sql =================================================================== RCS file: /cvsroot/mxbb/core/install/schemas/mysql_schema_upgrade_to_2.7.4.sql,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** mysql_schema_upgrade_to_2.7.4.sql 9 Mar 2005 19:25:18 -0000 1.3 --- mysql_schema_upgrade_to_2.7.4.sql 13 Apr 2005 21:23:28 -0000 1.4 *************** *** 1,99 **** ! # ! # mxBB-Portal - MySQL Schema - Upgrade "2.7.4" ! # ! # $Id$ ! # ! ! # ------------------------------------------------------------ ! # ! # New Function, Block and Parameters 'IncludeX' ! # ! SET module = SELECT * FROM mx_table_module WHERE module_name = 'Core Blocks'; ! SET function = SELECT MAX(function_id) AS next_id FROM mx_table_function; ! SET block = SELECT MAX(block_id) AS next_id FROM mx_table_block; ! SET parameter = SELECT MAX(parameter_id) AS next_id FROM mx_table_parameter; ! ! SET function.next_id = function.next_id + 1; ! INSERT INTO mx_table_function VALUES('{function.next_id}', '{module.module_id}', 'IncludeX', 'IncludeX Block, include file or url', 'mx_include_file.php', NULL); ! ! SET block.next_id = block.next_id + 1; ! INSERT INTO mx_table_block VALUES('{block.next_id}', 'IncludeX', 'IncludeX Block, include file or url', '{function.next_id}', '0', '0', '0', '', '', '', '', '1', '1', '0', '', '0'); ! ! SET parameter.next_id = parameter.next_id + 1; ! INSERT INTO mx_table_parameter VALUES('{parameter.next_id}', '{function.next_id}', 'include_file', 'Text', '0', ''); ! INSERT INTO mx_table_block_system_parameter VALUES('{block.next_id}', '{parameter.next_id}', '0', '', '0'); ! ! SET parameter.next_id = parameter.next_id + 1; ! INSERT INTO mx_table_parameter VALUES('{parameter.next_id}', '{function.next_id}', 'show_title', 'Boolean', 'TRUE', ''); ! INSERT INTO mx_table_block_system_parameter VALUES('{block.next_id}', '{parameter.next_id}', 'TRUE', '', '0'); ! ! SET parameter.next_id = parameter.next_id + 1; ! INSERT INTO mx_table_parameter VALUES('{parameter.next_id}', '{function.next_id}', 'iframe_mode', 'Boolean', 'FALSE', ''); ! INSERT INTO mx_table_block_system_parameter VALUES('{block.next_id}', '{parameter.next_id}', 'FALSE', '', '0'); ! ! SET parameter.next_id = parameter.next_id + 1; ! INSERT INTO mx_table_parameter VALUES('{parameter.next_id}', '{function.next_id}', 'include_url', 'Text', 'http://www.mx-system.com', ''); ! INSERT INTO mx_table_block_system_parameter VALUES('{block.next_id}', '{parameter.next_id}', 'http://www.mx-system.com', '', '0'); ! ! SET parameter.next_id = parameter.next_id + 1; ! INSERT INTO mx_table_parameter VALUES('{parameter.next_id}', '{function.next_id}', 'iframe_height', '300', '0', ''); ! INSERT INTO mx_table_block_system_parameter VALUES('{block.next_id}', '{parameter.next_id}', '0', '', '0'); ! ! # ------------------------------------------------------------ ! # ! # New Parameters for Function 'Navigation Menu' (added by Jaime) ! # ! SET function = SELECT * FROM mx_table_function WHERE function_name = 'Navigation Menu'; ! SET block = SELECT * FROM mx_table_block WHERE block_title = 'Navigation Menu'; ! ! SET parameter.next_id = parameter.next_id + 1; ! INSERT INTO mx_table_parameter VALUES('{parameter.next_id}', '{function.function_id}', 'menu_display_mode', 'Text', 'Vertical', ''); ! INSERT INTO mx_table_block_system_parameter VALUES('{block.block_id}', '{parameter.next_id}', 'Vertical', NULL); ! ! SET parameter.next_id = parameter.next_id + 1; ! INSERT INTO mx_table_parameter VALUES('{parameter.next_id}', '{function.function_id}', 'menu_page_sync', 'Text', '0', ''); ! INSERT INTO mx_table_block_system_parameter VALUES('{block.block_id}', '{parameter.next_id}', '0', NULL); ! ! # ------------------------------------------------------------ ! # ! # New Fields in Table `mx_menu_categories` (added by Jaime) ! # ! ALTER TABLE mx_table_menu_categories ADD cat_url SMALLINT(5) UNSIGNED DEFAULT '0'; ! ALTER TABLE mx_table_menu_categories ADD cat_target TINYINT(2) UNSIGNED DEFAULT '0' NOT NULL; ! ! # ------------------------------------------------------------ ! # ! # New Table `mx_page_templates` (added by Jaime) ! # ! CREATE TABLE mx_table_page_templates ( ! page_template_id SMALLINT(3) UNSIGNED NOT NULL auto_increment, ! template_name VARCHAR(255) NOT NULL DEFAULT '', ! PRIMARY KEY (page_template_id) ! ); ! INSERT INTO mx_table_page_templates VALUES('1', 'NONE'); ! INSERT INTO mx_table_page_templates VALUES('2', 'Two-Columns left'); ! INSERT INTO mx_table_page_templates VALUES('3', 'Two-Columns right'); ! INSERT INTO mx_table_page_templates VALUES('4', 'Three-Columns'); ! ! # ------------------------------------------------------------ ! # ! # New Table `mx_column_templates` (added by Jaime) ! # ! CREATE TABLE mx_table_column_templates ( ! column_template_id SMALLINT(5) UNSIGNED NOT NULL auto_increment, ! column_title VARCHAR(100) DEFAULT '0', ! column_order SMALLINT(5) UNSIGNED NOT NULL DEFAULT '0', ! column_size VARCHAR(5) DEFAULT '0', ! page_template_id SMALLINT(5) NOT NULL DEFAULT '0', ! PRIMARY KEY (column_template_id), ! KEY cat_order (column_order) ! ); ! INSERT INTO mx_table_column_templates VALUES('1', 'Left', '10', '200', '2'); ! INSERT INTO mx_table_column_templates VALUES('2', 'Right', '20', '100%', '2'); ! INSERT INTO mx_table_column_templates VALUES('3', 'Left', '10', '100%', '3'); ! INSERT INTO mx_table_column_templates VALUES('4', 'Right', '20', '200', '3'); ! INSERT INTO mx_table_column_templates VALUES('5', 'Left', '10', '150', '4'); ! INSERT INTO mx_table_column_templates VALUES('6', 'Middle', '20', '100%', '4'); ! INSERT INTO mx_table_column_templates VALUES('7', 'Right', '30', '150', '4'); ! ! # ------------------------------------------------------------ --- 1,99 ---- ! # ! # mxBB-Portal - MySQL Schema - Upgrade "2.7.4" ! # ! # $Id$ ! # ! ! # ------------------------------------------------------------ ! # ! # New Function, Block and Parameters 'IncludeX' ! # ! SET module = SELECT * FROM mx_table_module WHERE module_name = 'Core Blocks'; ! SET function = SELECT MAX(function_id) AS next_id FROM mx_table_function; ! SET block = SELECT MAX(block_id) AS next_id FROM mx_table_block; ! SET parameter = SELECT MAX(parameter_id) AS next_id FROM mx_table_parameter; ! ! SET function.next_id = function.next_id + 1; ! INSERT INTO mx_table_function VALUES('{function.next_id}', '{module.module_id}', 'IncludeX', 'IncludeX Block, include file or url', 'mx_include_file.php', NULL); ! ! SET block.next_id = block.next_id + 1; ! INSERT INTO mx_table_block VALUES('{block.next_id}', 'IncludeX', 'IncludeX Block, include file or url', '{function.next_id}', '0', '0', '0', '', '', '', '', '1', '1', '0', '', '0'); ! ! SET parameter.next_id = parameter.next_id + 1; ! INSERT INTO mx_table_parameter VALUES('{parameter.next_id}', '{function.next_id}', 'include_file', 'Text', '0', ''); ! INSERT INTO mx_table_block_system_parameter VALUES('{block.next_id}', '{parameter.next_id}', '0', '', '0'); ! ! SET parameter.next_id = parameter.next_id + 1; ! INSERT INTO mx_table_parameter VALUES('{parameter.next_id}', '{function.next_id}', 'show_title', 'Boolean', 'TRUE', ''); ! INSERT INTO mx_table_block_system_parameter VALUES('{block.next_id}', '{parameter.next_id}', 'TRUE', '', '0'); ! ! SET parameter.next_id = parameter.next_id + 1; ! INSERT INTO mx_table_parameter VALUES('{parameter.next_id}', '{function.next_id}', 'iframe_mode', 'Boolean', 'FALSE', ''); ! INSERT INTO mx_table_block_system_parameter VALUES('{block.next_id}', '{parameter.next_id}', 'FALSE', '', '0'); ! ! SET parameter.next_id = parameter.next_id + 1; ! INSERT INTO mx_table_parameter VALUES('{parameter.next_id}', '{function.next_id}', 'include_url', 'Text', 'http://www.mx-system.com', ''); ! INSERT INTO mx_table_block_system_parameter VALUES('{block.next_id}', '{parameter.next_id}', 'http://www.mx-system.com', '', '0'); ! ! SET parameter.next_id = parameter.next_id + 1; ! INSERT INTO mx_table_parameter VALUES('{parameter.next_id}', '{function.next_id}', 'iframe_height', '300', '0', ''); ! INSERT INTO mx_table_block_system_parameter VALUES('{block.next_id}', '{parameter.next_id}', '0', '', '0'); ! ! # ------------------------------------------------------------ ! # ! # New Parameters for Function 'Navigation Menu' (added by Jaime) ! # ! SET function = SELECT * FROM mx_table_function WHERE function_name = 'Navigation Menu'; ! SET block = SELECT * FROM mx_table_block WHERE block_title = 'Navigation Menu'; ! ! SET parameter.next_id = parameter.next_id + 1; ! INSERT INTO mx_table_parameter VALUES('{parameter.next_id}', '{function.function_id}', 'menu_display_mode', 'Text', 'Vertical', ''); ! INSERT INTO mx_table_block_system_parameter VALUES('{block.block_id}', '{parameter.next_id}', 'Vertical', NULL); ! ! SET parameter.next_id = parameter.next_id + 1; ! INSERT INTO mx_table_parameter VALUES('{parameter.next_id}', '{function.function_id}', 'menu_page_sync', 'Text', '0', ''); ! INSERT INTO mx_table_block_system_parameter VALUES('{block.block_id}', '{parameter.next_id}', '0', NULL); ! ! # ------------------------------------------------------------ ! # ! # New Fields in Table `mx_menu_categories` (added by Jaime) ! # ! ALTER TABLE mx_table_menu_categories ADD cat_url SMALLINT(5) UNSIGNED DEFAULT '0'; ! ALTER TABLE mx_table_menu_categories ADD cat_target TINYINT(2) UNSIGNED DEFAULT '0' NOT NULL; ! ! # ------------------------------------------------------------ ! # ! # New Table `mx_page_templates` (added by Jaime) ! # ! CREATE TABLE mx_table_page_templates ( ! page_template_id SMALLINT(3) UNSIGNED NOT NULL auto_increment, ! template_name VARCHAR(255) NOT NULL DEFAULT '', ! PRIMARY KEY (page_template_id) ! ); ! INSERT INTO mx_table_page_templates VALUES('1', 'NONE'); ! INSERT INTO mx_table_page_templates VALUES('2', 'Two-Columns left'); ! INSERT INTO mx_table_page_templates VALUES('3', 'Two-Columns right'); ! INSERT INTO mx_table_page_templates VALUES('4', 'Three-Columns'); ! ! # ------------------------------------------------------------ ! # ! # New Table `mx_column_templates` (added by Jaime) ! # ! CREATE TABLE mx_table_column_templates ( ! column_template_id SMALLINT(5) UNSIGNED NOT NULL auto_increment, ! column_title VARCHAR(100) DEFAULT '0', ! column_order SMALLINT(5) UNSIGNED NOT NULL DEFAULT '0', ! column_size VARCHAR(5) DEFAULT '0', ! page_template_id SMALLINT(5) NOT NULL DEFAULT '0', ! PRIMARY KEY (column_template_id), ! KEY cat_order (column_order) ! ); ! INSERT INTO mx_table_column_templates VALUES('1', 'Left', '10', '200', '2'); ! INSERT INTO mx_table_column_templates VALUES('2', 'Right', '20', '100%', '2'); ! INSERT INTO mx_table_column_templates VALUES('3', 'Left', '10', '100%', '3'); ! INSERT INTO mx_table_column_templates VALUES('4', 'Right', '20', '200', '3'); ! INSERT INTO mx_table_column_templates VALUES('5', 'Left', '10', '150', '4'); ! INSERT INTO mx_table_column_templates VALUES('6', 'Middle', '20', '100%', '4'); ! INSERT INTO mx_table_column_templates VALUES('7', 'Right', '30', '150', '4'); ! ! # ------------------------------------------------------------ Index: mysql_schema_install_2.7.1.sql =================================================================== RCS file: /cvsroot/mxbb/core/install/schemas/mysql_schema_install_2.7.1.sql,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** mysql_schema_install_2.7.1.sql 20 Mar 2005 03:37:05 -0000 1.1 --- mysql_schema_install_2.7.1.sql 13 Apr 2005 21:23:27 -0000 1.2 *************** *** 1,393 **** ! # ! # mxBB-Portal - MySQL Schema - version 2.7.1 ! # ! # $Id$ ! # ! ! # -------------------------------------------------------- ! ! # ! # Table structure for table `mx_block` ! # ! ! CREATE TABLE mx_table_block ( ! block_id smallint(5) unsigned NOT NULL auto_increment, ! block_title varchar(150) default NULL, ! block_desc text, ! function_id smallint(5) unsigned default NULL, ! auth_view tinyint(2) NOT NULL default '0', ! auth_edit tinyint(2) default '0', ! auth_delete tinyint(2) default '0', ! auth_view_group smallint(5) NOT NULL default '0', ! auth_edit_group smallint(5) NOT NULL default '0', ! auth_delete_group smallint(5) NOT NULL default '0', ! PRIMARY KEY (block_id) ! ); ! ! # ! # Dumping data for table `mx_block` ! # ! ! INSERT INTO mx_table_block VALUES (1, 'Welcome', '', 20, 0, 5, 0, 0, 0, 0); ! INSERT INTO mx_table_block VALUES (2, 'Multiple Horizontal Blocks', '', 19, 0, 0, 0, 0, 0, 0); ! INSERT INTO mx_table_block VALUES (3, 'Demo Textblock Multi', '', 22, 0, 5, 0, 0, 0, 0); ! INSERT INTO mx_table_block VALUES (4, 'Demo Textblock BBcode', '', 20, 0, 5, 0, 0, 0, 0); ! INSERT INTO mx_table_block VALUES (5, 'Demo Textblock Html', '', 21, 0, 5, 0, 0, 0, 0); ! INSERT INTO mx_table_block VALUES (6, 'Poll', '', 12, 0, 5, 0, 0, 0, 0); ! INSERT INTO mx_table_block VALUES (7, 'Language Select', '', 13, 99, 5, 0, 0, 0, 0); ! INSERT INTO mx_table_block VALUES (8, 'Navigation Menu', '', 11, 0, 5, 0, 0, 0, 0); ! INSERT INTO mx_table_block VALUES (24, 'Forum', '', 10, 0, 0, 0, 0, 0, 0); ! INSERT INTO mx_table_block VALUES (13, 'Login', NULL, 14, 99, 5, 0, 0, 0, 0); ! INSERT INTO mx_table_block VALUES (14, 'Theme Select', '', 15, 0, 5, 0, 0, 0, 0); ! INSERT INTO mx_table_block VALUES (21, 'Google', '', 16, 0, 0, 0, 0, 0, 0); ! INSERT INTO mx_table_block VALUES (18, 'Announcements', NULL, 17, 0, 0, 0, 0, 0, 0); ! INSERT INTO mx_table_block VALUES (19, 'Online', '', 18, 0, 0, 0, 0, 0, 0); ! INSERT INTO mx_table_block VALUES (16, 'Last Message Post', NULL, 30, 0, 0, 0, 0, 0, 0); ! INSERT INTO mx_table_block VALUES (32, 'Statistics', '', 40, 0, 0, 0, 0, 0, 0); ! ! # -------------------------------------------------------- ! ! # ! # Table structure for table `mx_block_system_parameter` ! # ! ! CREATE TABLE mx_table_block_system_parameter ( ! block_id smallint(5) unsigned NOT NULL default '0', ! parameter_id smallint(5) unsigned NOT NULL default '0', ! parameter_value text, ! bbcode_uid varchar(10) default NULL, ! PRIMARY KEY (block_id, parameter_id) ! ); ! ! # ! # Dumping data for table `mx_block_system_parameter` ! # ! ! INSERT INTO mx_table_block_system_parameter VALUES (1, 15, 'Welcome to the Mx-system Portal!\r\n\r\nPlease visit www.mx-system.com for further information.\r\n\r\nThe Mx-Portal version is announced and documented [url=http://www.mx-system.com/forum/viewforum.php?f=11] here[/url].', '10bec5b560'); ! INSERT INTO mx_table_block_system_parameter VALUES (2, 60, '3,4,5', ''); ! INSERT INTO mx_table_block_system_parameter VALUES (2, 61, '33%,*,33%', ''); ! INSERT INTO mx_table_block_system_parameter VALUES (2, 62, '4', ''); ! INSERT INTO mx_table_block_system_parameter VALUES (3, 50, 'This is a demo multi textblock!\r\n\r\n - featuring bbcode, html (if allowed by phpbb config), style parameters (click the EDIT button and try them out) and permissions (view and edit permissions for users and PRIVATE groups).', '10bec5b560'); ! INSERT INTO mx_table_block_system_parameter VALUES (3, 51, 'none', ''); ! INSERT INTO mx_table_block_system_parameter VALUES (3, 52, 'TRUE', ''); ! INSERT INTO mx_table_block_system_parameter VALUES (3, 53, 'TRUE', ''); ! INSERT INTO mx_table_block_system_parameter VALUES (3, 54, 'TRUE', ''); ! INSERT INTO mx_table_block_system_parameter VALUES (4, 15, 'This is a demo bbcode textblock!\r\n\r\n- featuring bbcode, html (if allowed by phpbb config) and permissions (view and edit permissions for users and PRIVATE groups).', '10bec5b560'); ! INSERT INTO mx_table_block_system_parameter VALUES (5, 16, 'This is a demo html textblock!\r\n\r\n- featuring html (if allowed by phpbb config) and permissions (view and edit permissions for users and PRIVATE groups).', '10bec5b560'); ! INSERT INTO mx_table_block_system_parameter VALUES (6, 36, '', NULL); ! INSERT INTO mx_table_block_system_parameter VALUES (6, 13, '0', NULL); ! INSERT INTO mx_table_block_system_parameter VALUES (16, 17, '5', NULL); ! INSERT INTO mx_table_block_system_parameter VALUES (16, 18, 'TRUE', NULL); ! INSERT INTO mx_table_block_system_parameter VALUES (16, 19, '30', NULL); ! INSERT INTO mx_table_block_system_parameter VALUES (16, 20, '_self', NULL); ! INSERT INTO mx_table_block_system_parameter VALUES (16, 21, 'left', NULL); ! INSERT INTO mx_table_block_system_parameter VALUES (16, 22, 'TRUE', NULL); ! INSERT INTO mx_table_block_system_parameter VALUES (16, 37, '', NULL); ! INSERT INTO mx_table_block_system_parameter VALUES (16, 38, 'FALSE', NULL); ! INSERT INTO mx_table_block_system_parameter VALUES (16, 39, 'FALSE', NULL); ! INSERT INTO mx_table_block_system_parameter VALUES (16, 40, 'TRUE', NULL); ! INSERT INTO mx_table_block_system_parameter VALUES (18, 1, '1', NULL); ! INSERT INTO mx_table_block_system_parameter VALUES (18, 2, '999', NULL); ! INSERT INTO mx_table_block_system_parameter VALUES (18, 3, 'TRUE', NULL); ! INSERT INTO mx_table_block_system_parameter VALUES (18, 4, 'FALSE', NULL); ! INSERT INTO mx_table_block_system_parameter VALUES (18, 5, 'FALSE', NULL); ! INSERT INTO mx_table_block_system_parameter VALUES (18, 7, 'thumb_news.gif', NULL); ! INSERT INTO mx_table_block_system_parameter VALUES (18, 8, 'thumb_globe.gif', NULL); ! INSERT INTO mx_table_block_system_parameter VALUES (18, 9, 'thumb_globe.gif', NULL); ! INSERT INTO mx_table_block_system_parameter VALUES (18, 6, 'TRUE', NULL); ! INSERT INTO mx_table_block_system_parameter VALUES (18, 10, 'thumb_globe.gif ', NULL); ! INSERT INTO mx_table_block_system_parameter VALUES (18, 11, '', NULL); ! ! # -------------------------------------------------------- ! ! # ! # Table structure for table `mx_column` ! # ! ! CREATE TABLE mx_table_column ( ! column_id smallint(5) unsigned NOT NULL auto_increment, ! column_title varchar(100) default NULL, ! column_order smallint(5) unsigned NOT NULL default '0', ! bbcode_uid varchar(10) default NULL, ! column_size varchar(5) default '100%', ! page_id smallint(5) NOT NULL default '0', ! PRIMARY KEY (column_id), ! KEY cat_order (column_order) ! ); ! ! # ! # Dumping data for table `mx_column` ! # ! ! INSERT INTO mx_table_column VALUES (1, 'Column 1', 10, NULL, '220', 1); ! INSERT INTO mx_table_column VALUES (2, 'Column 2', 20, NULL, '100%', 1); ! INSERT INTO mx_table_column VALUES (20, 'Menu', 10, NULL, '200', 2); ! INSERT INTO mx_table_column VALUES (21, 'Forum', 20, NULL, '100%', 2); ! ! # -------------------------------------------------------- ! ! # ! # Table structure for table `mx_column_block` ! # ! ! CREATE TABLE mx_table_column_block ( ! column_id smallint(5) NOT NULL default '0', ! block_id smallint(5) NOT NULL default '0', ! block_order smallint(5) NOT NULL default '0' ! ); ! ! # ! # Dumping data for table `mx_column_block` ! # ! ! INSERT INTO mx_table_column_block VALUES (1, 8, 10); ! INSERT INTO mx_table_column_block VALUES (1, 16, 20); ! INSERT INTO mx_table_column_block VALUES (1, 6, 30); ! INSERT INTO mx_table_column_block VALUES (1, 13, 40); ! INSERT INTO mx_table_column_block VALUES (1, 7, 50); ! INSERT INTO mx_table_column_block VALUES (1, 14, 60); ! INSERT INTO mx_table_column_block VALUES (2, 1, 10); ! INSERT INTO mx_table_column_block VALUES (2, 2, 10); ! INSERT INTO mx_table_column_block VALUES (2, 18, 20); ! INSERT INTO mx_table_column_block VALUES (2, 19, 30); ! INSERT INTO mx_table_column_block VALUES (20, 8, 10); ! INSERT INTO mx_table_column_block VALUES (20, 16, 20); ! INSERT INTO mx_table_column_block VALUES (21, 24, 30); ! INSERT INTO mx_table_column_block VALUES (21, 19, 40); ! ! # -------------------------------------------------------- ! ! # ! # Table structure for table `mx_function` ! # ! ! CREATE TABLE mx_table_function ( ! function_id smallint(5) unsigned NOT NULL auto_increment, ! module_id smallint(5) unsigned NOT NULL default '0', ! function_name varchar(150) default NULL, ! function_desc text, ! function_file varchar(255) default NULL, ! function_admin varchar(255) default NULL, ! PRIMARY KEY (function_id), ! KEY module_id (module_id) ! ); ! ! # ! # Dumping data for table `mx_function` ! # ! ! INSERT INTO mx_table_function VALUES (10, 10, 'Forum phpBB', 'Forum phpBB', 'mx_forum.php', NULL); ! INSERT INTO mx_table_function VALUES (11, 10, 'Navigation Menu', 'Menu Navigation', 'mx_menu_nav.php', 'admin/admin_mx_menu.php'); ! INSERT INTO mx_table_function VALUES (12, 10, 'Polls', 'Polls', 'mx_poll.php', NULL); ! INSERT INTO mx_table_function VALUES (13, 10... [truncated message content] |
|
From: Markus P. <mar...@us...> - 2005-04-13 21:23:46
|
Update of /cvsroot/mxbb/core/modules/mx_coreblocks In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3079/modules/mx_coreblocks Modified Files: CoreBlocks.pak Log Message: ok, second step on fixing double line breaks. I think this is all. Index: CoreBlocks.pak =================================================================== RCS file: /cvsroot/mxbb/core/modules/mx_coreblocks/CoreBlocks.pak,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** CoreBlocks.pak 12 Apr 2005 19:02:31 -0000 1.4 --- CoreBlocks.pak 13 Apr 2005 21:23:28 -0000 1.5 *************** *** 1,104 **** ! module=+:10=+:Core Blocks=+:modules/mx_coreblocks/=+:Core blocks=+: ! New_function=+:---------------------------=+:0=+:0=+:0=+:0=+:0 ! function=+:10=+:17=+:Announcements=+:Announcements=+:mx_announce.php=+: ! parameter=+:17=+:3=+:announce_display=+:Boolean=+:TRUE=+: ! option=+:0=+:0=+:0=+:endoflist=+: ! parameter=+:17=+:6=+:announce_display_global=+:Boolean=+:TRUE=+: ! option=+:0=+:0=+:0=+:endoflist=+: ! parameter=+:17=+:5=+:announce_display_normal=+:Boolean=+:FALSE=+: ! option=+:0=+:0=+:0=+:endoflist=+: ! parameter=+:17=+:4=+:announce_display_sticky=+:Boolean=+:TRUE=+: ! option=+:0=+:0=+:0=+:endoflist=+: ! parameter=+:17=+:11=+:announce_forum=+:Function=+:=+:get_list_multiple("{parameter_id}[]", FORUMS_TABLE, 'forum_id', 'forum_name', "{parameter_value}", TRUE) ! option=+:0=+:0=+:0=+:endoflist=+: ! parameter=+:17=+:7=+:announce_img=+:Text=+:thumb_globe.gif=+: ! option=+:0=+:0=+:0=+:endoflist=+: ! parameter=+:17=+:10=+:announce_img_global=+:Text=+:thumb_globe.gif=+: ! option=+:0=+:0=+:0=+:endoflist=+: ! parameter=+:17=+:9=+:announce_img_normal=+:Text=+:thumb_globe.gif=+: ! option=+:0=+:0=+:0=+:endoflist=+: ! parameter=+:17=+:8=+:announce_img_sticky=+:Text=+:thumb_globe.gif=+: ! option=+:0=+:0=+:0=+:endoflist=+: ! parameter=+:17=+:2=+:announce_nbr_days=+:Number=+:14=+: ! option=+:0=+:0=+:0=+:endoflist=+: ! parameter=+:17=+:1=+:announce_nbr_display=+:Number=+:1=+: ! option=+:0=+:0=+:0=+:endoflist=+: ! parameter=+:0=+:0=+:0=+:endoflist=+:0=+:0 ! block=+:=+:Demo - Announcements=+:Demo block=+:17=+:0=+:5=+:0=+:0=+:0=+:0=+:1=+:1 ! New_function=+:---------------------------=+:0=+:0=+:0=+:0=+:0 ! function=+:10=+:53=+:DynamicBlock=+:Dynamic block defined by its block_id=+:mx_dynamic.php=+: ! parameter=+:53=+:136=+:default_block_id=+:Function=+:0=+:get_list_formatted("block_list","{parameter_value}","{parameter_id}[]") ! option=+:0=+:0=+:0=+:endoflist=+: ! parameter=+:0=+:0=+:0=+:endoflist=+:0=+:0 ! block=+:=+:Demo - DynamicBlock=+:Demo block=+:53=+:0=+:5=+:0=+:0=+:0=+:0=+:1=+:1 ! New_function=+:---------------------------=+:0=+:0=+:0=+:0=+:0 ! function=+:10=+:10=+:Forum phpBB=+:Forum phpBB=+:mx_forum.php=+: ! parameter=+:0=+:0=+:0=+:endoflist=+:0=+:0 ! block=+:=+:Demo - Forum phpBB=+:Demo block=+:10=+:0=+:5=+:0=+:0=+:0=+:0=+:1=+:1 ! New_function=+:---------------------------=+:0=+:0=+:0=+:0=+:0 ! function=+:10=+:16=+:Google=+:Google=+:mx_google.php=+: ! parameter=+:0=+:0=+:0=+:endoflist=+:0=+:0 ! block=+:=+:Demo - Google=+:Demo block=+:16=+:0=+:5=+:0=+:0=+:0=+:0=+:1=+:1 ! New_function=+:---------------------------=+:0=+:0=+:0=+:0=+:0 ! function=+:10=+:48=+:IncludeX=+:Include site or file=+:mx_includex.php=+: ! parameter=+:48=+:133=+:x_1=+:Text=+:=+: ! option=+:0=+:0=+:0=+:endoflist=+: ! parameter=+:48=+:134=+:x_2=+:Text=+:=+: ! option=+:0=+:0=+:0=+:endoflist=+: ! parameter=+:48=+:161=+:x_3=+:Text=+:http://www.mx-system.com=+: ! option=+:0=+:0=+:0=+:endoflist=+: ! parameter=+:48=+:131=+:x_mode=+:Function=+:0=+:get_mx_select_list( 'includex', "{parameter_value}", "{parameter_id}[]") ! option=+:0=+:0=+:0=+:endoflist=+: ! parameter=+:0=+:0=+:0=+:endoflist=+:0=+:0 ! block=+:=+:Demo - IncludeX=+:Demo block=+:48=+:0=+:5=+:0=+:0=+:0=+:0=+:1=+:1 ! New_function=+:---------------------------=+:0=+:0=+:0=+:0=+:0 ! function=+:10=+:13=+:Language Select=+:Language Select=+:mx_language.php=+: ! parameter=+:0=+:0=+:0=+:endoflist=+:0=+:0 ! block=+:=+:Demo - Language Select=+:Demo block=+:13=+:0=+:5=+:0=+:0=+:0=+:0=+:1=+:1 ! New_function=+:---------------------------=+:0=+:0=+:0=+:0=+:0 ! function=+:10=+:14=+:Login=+:Login=+:mx_login.php=+: ! parameter=+:0=+:0=+:0=+:endoflist=+:0=+:0 ! block=+:=+:Demo - Login=+:Demo block=+:14=+:0=+:5=+:0=+:0=+:0=+:0=+:1=+:1 ! New_function=+:---------------------------=+:0=+:0=+:0=+:0=+:0 ! function=+:10=+:11=+:Navigation Menu=+:Menu Navigation=+:mx_menu_nav.php=+:admin/admin_mx_menu.php ! parameter=+:11=+:63=+:menu_display_mode=+:Text=+:Vertical=+: ! option=+:0=+:0=+:0=+:endoflist=+: ! parameter=+:11=+:64=+:menu_page_sync=+:Text=+:0=+: ! option=+:0=+:0=+:0=+:endoflist=+: ! parameter=+:0=+:0=+:0=+:endoflist=+:0=+:0 ! block=+:=+:Demo - Navigation Menu=+:Demo block=+:11=+:0=+:5=+:0=+:0=+:0=+:0=+:1=+:1 ! New_function=+:---------------------------=+:0=+:0=+:0=+:0=+:0 ! function=+:10=+:19=+:Multiple Horizontal Blocks=+:Block that can arrange other blocks in a horizontal line.=+:mx_multiple_blocks.php=+: ! parameter=+:19=+:60=+:block_ids=+:Function=+:1,2,3=+:get_list_multiple( "{parameter_id}[]", BLOCK_TABLE, 'block_id', 'block_title', "{parameter_value}", TRUE) ! option=+:0=+:0=+:0=+:endoflist=+: ! parameter=+:19=+:61=+:block_sizes=+:Text=+:20%,30%,*=+: ! option=+:0=+:0=+:0=+:endoflist=+: ! parameter=+:19=+:62=+:space_between=+:Number=+:4=+: ! option=+:0=+:0=+:0=+:endoflist=+: ! parameter=+:0=+:0=+:0=+:endoflist=+:0=+:0 ! block=+:=+:Demo - Multiple Horizontal Blocks=+:Demo block=+:19=+:0=+:5=+:0=+:0=+:0=+:0=+:1=+:1 ! New_function=+:---------------------------=+:0=+:0=+:0=+:0=+:0 ! function=+:10=+:18=+:Who is Online=+:Who is Online=+:mx_online.php=+: ! parameter=+:0=+:0=+:0=+:endoflist=+:0=+:0 ! block=+:=+:Demo - Who is Online=+:Demo block=+:18=+:0=+:5=+:0=+:0=+:0=+:0=+:1=+:1 ! New_function=+:---------------------------=+:0=+:0=+:0=+:0=+:0 ! function=+:10=+:12=+:Polls=+:Polls=+:mx_poll.php=+: ! parameter=+:12=+:13=+:Poll_Display=+:Function=+:0=+:poll_select( {parameter_value}, "{parameter_id}" ) ! option=+:0=+:0=+:0=+:endoflist=+: ! parameter=+:12=+:36=+:poll_forum=+:Function=+:=+:get_list_multiple("{parameter_id}[]", FORUMS_TABLE, 'forum_id', 'forum_name', "{parameter_value}", TRUE) ! option=+:0=+:0=+:0=+:endoflist=+: ! parameter=+:0=+:0=+:0=+:endoflist=+:0=+:0 ! block=+:=+:Demo - Polls=+:Demo block=+:12=+:0=+:5=+:0=+:0=+:0=+:0=+:1=+:1 ! New_function=+:---------------------------=+:0=+:0=+:0=+:0=+:0 ! function=+:10=+:97=+:Site Log=+:Site change monitor=+:mx_site_log.php=+: ! parameter=+:97=+:317=+:log_filter_date=+:Function=+:5=+:get_list_static("{parameter_id}[]",array("no limit", "1 day", "2 days", "3 days", "1 week", "2 weeks", "3 weeks", "1 month", "2 months", "3 months", "6 months", "1 year"),"{parameter_value}") ! option=+:0=+:0=+:0=+:endoflist=+: ! parameter=+:97=+:315=+:numOfEvents=+:Number=+:5=+: ! option=+:0=+:0=+:0=+:endoflist=+: ! parameter=+:0=+:0=+:0=+:endoflist=+:0=+:0 ! block=+:=+:Demo - Site Log=+:Demo block=+:97=+:0=+:5=+:0=+:0=+:0=+:0=+:1=+:1 ! New_function=+:---------------------------=+:0=+:0=+:0=+:0=+:0 ! function=+:10=+:15=+:Theme Select=+:Theme Select=+:mx_theme.php=+: ! parameter=+:0=+:0=+:0=+:endoflist=+:0=+:0 ! block=+:=+:Demo - Theme Select=+:Demo block=+:15=+:0=+:5=+:0=+:0=+:0=+:0=+:1=+:1 ! function=+:0=+:0=+:0=+:endoflist=+:0=+:0 --- 1,104 ---- ! module=+:10=+:Core Blocks=+:modules/mx_coreblocks/=+:Core blocks=+: ! New_function=+:---------------------------=+:0=+:0=+:0=+:0=+:0 ! function=+:10=+:17=+:Announcements=+:Announcements=+:mx_announce.php=+: ! parameter=+:17=+:3=+:announce_display=+:Boolean=+:TRUE=+: ! option=+:0=+:0=+:0=+:endoflist=+: ! parameter=+:17=+:6=+:announce_display_global=+:Boolean=+:TRUE=+: ! option=+:0=+:0=+:0=+:endoflist=+: ! parameter=+:17=+:5=+:announce_display_normal=+:Boolean=+:FALSE=+: ! option=+:0=+:0=+:0=+:endoflist=+: ! parameter=+:17=+:4=+:announce_display_sticky=+:Boolean=+:TRUE=+: ! option=+:0=+:0=+:0=+:endoflist=+: ! parameter=+:17=+:11=+:announce_forum=+:Function=+:=+:get_list_multiple("{parameter_id}[]", FORUMS_TABLE, 'forum_id', 'forum_name', "{parameter_value}", TRUE) ! option=+:0=+:0=+:0=+:endoflist=+: ! parameter=+:17=+:7=+:announce_img=+:Text=+:thumb_globe.gif=+: ! option=+:0=+:0=+:0=+:endoflist=+: ! parameter=+:17=+:10=+:announce_img_global=+:Text=+:thumb_globe.gif=+: ! option=+:0=+:0=+:0=+:endoflist=+: ! parameter=+:17=+:9=+:announce_img_normal=+:Text=+:thumb_globe.gif=+: ! option=+:0=+:0=+:0=+:endoflist=+: ! parameter=+:17=+:8=+:announce_img_sticky=+:Text=+:thumb_globe.gif=+: ! option=+:0=+:0=+:0=+:endoflist=+: ! parameter=+:17=+:2=+:announce_nbr_days=+:Number=+:14=+: ! option=+:0=+:0=+:0=+:endoflist=+: ! parameter=+:17=+:1=+:announce_nbr_display=+:Number=+:1=+: ! option=+:0=+:0=+:0=+:endoflist=+: ! parameter=+:0=+:0=+:0=+:endoflist=+:0=+:0 ! block=+:=+:Demo - Announcements=+:Demo block=+:17=+:0=+:5=+:0=+:0=+:0=+:0=+:1=+:1 ! New_function=+:---------------------------=+:0=+:0=+:0=+:0=+:0 ! function=+:10=+:53=+:DynamicBlock=+:Dynamic block defined by its block_id=+:mx_dynamic.php=+: ! parameter=+:53=+:136=+:default_block_id=+:Function=+:0=+:get_list_formatted("block_list","{parameter_value}","{parameter_id}[]") ! option=+:0=+:0=+:0=+:endoflist=+: ! parameter=+:0=+:0=+:0=+:endoflist=+:0=+:0 ! block=+:=+:Demo - DynamicBlock=+:Demo block=+:53=+:0=+:5=+:0=+:0=+:0=+:0=+:1=+:1 ! New_function=+:---------------------------=+:0=+:0=+:0=+:0=+:0 ! function=+:10=+:10=+:Forum phpBB=+:Forum phpBB=+:mx_forum.php=+: ! parameter=+:0=+:0=+:0=+:endoflist=+:0=+:0 ! block=+:=+:Demo - Forum phpBB=+:Demo block=+:10=+:0=+:5=+:0=+:0=+:0=+:0=+:1=+:1 ! New_function=+:---------------------------=+:0=+:0=+:0=+:0=+:0 ! function=+:10=+:16=+:Google=+:Google=+:mx_google.php=+: ! parameter=+:0=+:0=+:0=+:endoflist=+:0=+:0 ! block=+:=+:Demo - Google=+:Demo block=+:16=+:0=+:5=+:0=+:0=+:0=+:0=+:1=+:1 ! New_function=+:---------------------------=+:0=+:0=+:0=+:0=+:0 ! function=+:10=+:48=+:IncludeX=+:Include site or file=+:mx_includex.php=+: ! parameter=+:48=+:133=+:x_1=+:Text=+:=+: ! option=+:0=+:0=+:0=+:endoflist=+: ! parameter=+:48=+:134=+:x_2=+:Text=+:=+: ! option=+:0=+:0=+:0=+:endoflist=+: ! parameter=+:48=+:161=+:x_3=+:Text=+:http://www.mx-system.com=+: ! option=+:0=+:0=+:0=+:endoflist=+: ! parameter=+:48=+:131=+:x_mode=+:Function=+:0=+:get_mx_select_list( 'includex', "{parameter_value}", "{parameter_id}[]") ! option=+:0=+:0=+:0=+:endoflist=+: ! parameter=+:0=+:0=+:0=+:endoflist=+:0=+:0 ! block=+:=+:Demo - IncludeX=+:Demo block=+:48=+:0=+:5=+:0=+:0=+:0=+:0=+:1=+:1 ! New_function=+:---------------------------=+:0=+:0=+:0=+:0=+:0 ! function=+:10=+:13=+:Language Select=+:Language Select=+:mx_language.php=+: ! parameter=+:0=+:0=+:0=+:endoflist=+:0=+:0 ! block=+:=+:Demo - Language Select=+:Demo block=+:13=+:0=+:5=+:0=+:0=+:0=+:0=+:1=+:1 ! New_function=+:---------------------------=+:0=+:0=+:0=+:0=+:0 ! function=+:10=+:14=+:Login=+:Login=+:mx_login.php=+: ! parameter=+:0=+:0=+:0=+:endoflist=+:0=+:0 ! block=+:=+:Demo - Login=+:Demo block=+:14=+:0=+:5=+:0=+:0=+:0=+:0=+:1=+:1 ! New_function=+:---------------------------=+:0=+:0=+:0=+:0=+:0 ! function=+:10=+:11=+:Navigation Menu=+:Menu Navigation=+:mx_menu_nav.php=+:admin/admin_mx_menu.php ! parameter=+:11=+:63=+:menu_display_mode=+:Text=+:Vertical=+: ! option=+:0=+:0=+:0=+:endoflist=+: ! parameter=+:11=+:64=+:menu_page_sync=+:Text=+:0=+: ! option=+:0=+:0=+:0=+:endoflist=+: ! parameter=+:0=+:0=+:0=+:endoflist=+:0=+:0 ! block=+:=+:Demo - Navigation Menu=+:Demo block=+:11=+:0=+:5=+:0=+:0=+:0=+:0=+:1=+:1 ! New_function=+:---------------------------=+:0=+:0=+:0=+:0=+:0 ! function=+:10=+:19=+:Multiple Horizontal Blocks=+:Block that can arrange other blocks in a horizontal line.=+:mx_multiple_blocks.php=+: ! parameter=+:19=+:60=+:block_ids=+:Function=+:1,2,3=+:get_list_multiple( "{parameter_id}[]", BLOCK_TABLE, 'block_id', 'block_title', "{parameter_value}", TRUE) ! option=+:0=+:0=+:0=+:endoflist=+: ! parameter=+:19=+:61=+:block_sizes=+:Text=+:20%,30%,*=+: ! option=+:0=+:0=+:0=+:endoflist=+: ! parameter=+:19=+:62=+:space_between=+:Number=+:4=+: ! option=+:0=+:0=+:0=+:endoflist=+: ! parameter=+:0=+:0=+:0=+:endoflist=+:0=+:0 ! block=+:=+:Demo - Multiple Horizontal Blocks=+:Demo block=+:19=+:0=+:5=+:0=+:0=+:0=+:0=+:1=+:1 ! New_function=+:---------------------------=+:0=+:0=+:0=+:0=+:0 ! function=+:10=+:18=+:Who is Online=+:Who is Online=+:mx_online.php=+: ! parameter=+:0=+:0=+:0=+:endoflist=+:0=+:0 ! block=+:=+:Demo - Who is Online=+:Demo block=+:18=+:0=+:5=+:0=+:0=+:0=+:0=+:1=+:1 ! New_function=+:---------------------------=+:0=+:0=+:0=+:0=+:0 ! function=+:10=+:12=+:Polls=+:Polls=+:mx_poll.php=+: ! parameter=+:12=+:13=+:Poll_Display=+:Function=+:0=+:poll_select( {parameter_value}, "{parameter_id}" ) ! option=+:0=+:0=+:0=+:endoflist=+: ! parameter=+:12=+:36=+:poll_forum=+:Function=+:=+:get_list_multiple("{parameter_id}[]", FORUMS_TABLE, 'forum_id', 'forum_name', "{parameter_value}", TRUE) ! option=+:0=+:0=+:0=+:endoflist=+: ! parameter=+:0=+:0=+:0=+:endoflist=+:0=+:0 ! block=+:=+:Demo - Polls=+:Demo block=+:12=+:0=+:5=+:0=+:0=+:0=+:0=+:1=+:1 ! New_function=+:---------------------------=+:0=+:0=+:0=+:0=+:0 ! function=+:10=+:97=+:Site Log=+:Site change monitor=+:mx_site_log.php=+: ! parameter=+:97=+:317=+:log_filter_date=+:Function=+:5=+:get_list_static("{parameter_id}[]",array("no limit", "1 day", "2 days", "3 days", "1 week", "2 weeks", "3 weeks", "1 month", "2 months", "3 months", "6 months", "1 year"),"{parameter_value}") ! option=+:0=+:0=+:0=+:endoflist=+: ! parameter=+:97=+:315=+:numOfEvents=+:Number=+:5=+: ! option=+:0=+:0=+:0=+:endoflist=+: ! parameter=+:0=+:0=+:0=+:endoflist=+:0=+:0 ! block=+:=+:Demo - Site Log=+:Demo block=+:97=+:0=+:5=+:0=+:0=+:0=+:0=+:1=+:1 ! New_function=+:---------------------------=+:0=+:0=+:0=+:0=+:0 ! function=+:10=+:15=+:Theme Select=+:Theme Select=+:mx_theme.php=+: ! parameter=+:0=+:0=+:0=+:endoflist=+:0=+:0 ! block=+:=+:Demo - Theme Select=+:Demo block=+:15=+:0=+:5=+:0=+:0=+:0=+:0=+:1=+:1 ! function=+:0=+:0=+:0=+:endoflist=+:0=+:0 |
|
From: Markus P. <mar...@us...> - 2005-04-13 21:09:05
|
Update of /cvsroot/mxbb/core/admin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27685 Modified Files: admin_mx_module.php Log Message: First attempt to fix double line breaks. Index: admin_mx_module.php =================================================================== RCS file: /cvsroot/mxbb/core/admin/admin_mx_module.php,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** admin_mx_module.php 12 Apr 2005 19:05:49 -0000 1.27 --- admin_mx_module.php 13 Apr 2005 21:08:55 -0000 1.28 *************** *** 1,1876 **** ! <?php ! /** ------------------------------------------------------------------------ ! * subject : mx-portal, CMS & portal ! * begin : mars, 2003 ! * copyright : (C) 2002-2005 MX-System ! * email : jon...@ho... ! * project site : www.mx-system.com ! * ! * description : ! * ------------------------------------------------------------------------- [...3724 lines suppressed...] ! { ! $output_message .= '<br><b><font color=#0000ff>[db...error]</font></b> line: ' . __LINE__ . ' , ' . $sql . '<br />'; ! $pak_error = true; ! return $output_message; ! } ! else ! { ! $output_message .= '<font color=#00ff00>[db...ok]</font>'; ! } ! ! $output_message .= ' ' . $parameter_row[1] . '-' . $resultset_param[$p]['parameter_id'] . ','; ! } ! ! $output_message .= '<br> ... ok<br>' ; ! ! return $output_message; ! } ! ?> \ No newline at end of file |
|
From: Markus P. <mar...@us...> - 2005-04-13 20:16:15
|
Update of /cvsroot/mxbb/core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32200 Modified Files: common.php index.php Log Message: First attempt to fix double line breaks. Index: common.php =================================================================== RCS file: /cvsroot/mxbb/core/common.php,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** common.php 12 Apr 2005 21:10:32 -0000 1.29 --- common.php 13 Apr 2005 20:15:55 -0000 1.30 *************** *** 1,279 **** ! <?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 : ! * ------------------------------------------------------------------------- ! * 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" ); ! } ! ! define( 'IN_PHPBB', 1 ); ! @session_start(); ! ! error_reporting (E_ERROR | E_WARNING | E_PARSE); // This will NOT report uninitialized variables ! set_magic_quotes_runtime(0); // Disable magic_quotes_runtime ! ! // The following code (unsetting globals) was contributed by Matt Kavanagh ! ! // PHP5 with register_long_arrays off? ! if (!isset($HTTP_POST_VARS) && isset($_POST)) ! { ! $HTTP_POST_VARS = $_POST; ! $HTTP_GET_VARS = $_GET; ! $HTTP_SERVER_VARS = $_SERVER; ! $HTTP_COOKIE_VARS = $_COOKIE; ! $HTTP_ENV_VARS = $_ENV; ! $HTTP_POST_FILES = $_FILES; ! ! // _SESSION is the only superglobal which is conditionally set ! if (isset($_SESSION)) ! { ! $HTTP_SESSION_VARS = $_SESSION; ! } ! } ! ! if (@phpversion() < '4.0.0') ! { ! // PHP3 path; in PHP3, globals are _always_ registered ! ! // We 'flip' the array of variables to test like this so that ! // we can validate later with isset($test[$var]) (no in_array()) ! $test = array('HTTP_GET_VARS' => NULL, 'HTTP_POST_VARS' => NULL, 'HTTP_COOKIE_VARS' => NULL, 'HTTP_SERVER_VARS' => NULL, 'HTTP_ENV_VARS' => NULL, 'HTTP_POST_FILES' => NULL, 'phpEx' => NULL, 'phpbb_root_path' => NULL); ! ! // Loop through each input array ! @reset($test); ! while (list($input,) = @each($test)) ! { ! while (list($var,) = @each($$input)) ! { ! // Validate the variable to be unset ! if (!isset($test[$var]) && $var != 'test' && $var != 'input') ! { ! unset($$var); ! } ! } ! } ! } ! else if (@ini_get('register_globals') == '1' || strtolower(@ini_get('register_globals')) == 'on') ! { ! // PHP4+ path ! $not_unset = array('HTTP_GET_VARS', 'HTTP_POST_VARS', 'HTTP_COOKIE_VARS', 'HTTP_SERVER_VARS', 'HTTP_SESSION_VARS', 'HTTP_ENV_VARS', 'HTTP_POST_FILES', 'phpEx', 'phpbb_root_path'); ! ! // Not only will array_merge give a warning if a parameter ! // is not an array, it will actually fail. So we check if ! // HTTP_SESSION_VARS has been initialised. ! if (!isset($HTTP_SESSION_VARS)) ! { ! $HTTP_SESSION_VARS = array(); ! } ! ! // Merge all into one extremely huge array; unset ! // this later ! $input = array_merge($HTTP_GET_VARS, $HTTP_POST_VARS, $HTTP_COOKIE_VARS, $HTTP_SERVER_VARS, $HTTP_SESSION_VARS, $HTTP_ENV_VARS, $HTTP_POST_FILES); ! ! unset($input['input']); ! unset($input['not_unset']); ! ! while (list($var,) = @each($input)) ! { ! if (!in_array($var, $not_unset)) ! { ! unset($$var); ! } ! unset($$var); ! } ! ! unset($input); ! } ! ! // ! // addslashes to vars if magic_quotes_gpc is off ! // this is a security precaution to prevent someone ! // trying to break out of a SQL statement. ! // ! if( !get_magic_quotes_gpc() ) ! { ! if( is_array($HTTP_GET_VARS) ) ! { ! while( list($k, $v) = each($HTTP_GET_VARS) ) ! { ! if( is_array($HTTP_GET_VARS[$k]) ) ! { ! while( list($k2, $v2) = each($HTTP_GET_VARS[$k]) ) ! { ! $HTTP_GET_VARS[$k][$k2] = addslashes($v2); ! } ! @reset($HTTP_GET_VARS[$k]); ! } ! else ! { ! $HTTP_GET_VARS[$k] = addslashes($v); ! } ! } ! @reset($HTTP_GET_VARS); ! } ! ! if( is_array($HTTP_POST_VARS) ) ! { ! while( list($k, $v) = each($HTTP_POST_VARS) ) ! { ! if( is_array($HTTP_POST_VARS[$k]) ) ! { ! while( list($k2, $v2) = each($HTTP_POST_VARS[$k]) ) ! { ! $HTTP_POST_VARS[$k][$k2] = addslashes($v2); ! } ! @reset($HTTP_POST_VARS[$k]); ! } ! else ! { ! $HTTP_POST_VARS[$k] = addslashes($v); ! } ! } ! @reset($HTTP_POST_VARS); ! } ! ! if( is_array($HTTP_COOKIE_VARS) ) ! { ! while( list($k, $v) = each($HTTP_COOKIE_VARS) ) ! { ! if( is_array($HTTP_COOKIE_VARS[$k]) ) ! { ! while( list($k2, $v2) = each($HTTP_COOKIE_VARS[$k]) ) ! { ! $HTTP_COOKIE_VARS[$k][$k2] = addslashes($v2); ! } ! @reset($HTTP_COOKIE_VARS[$k]); ! } ! else ! { ! $HTTP_COOKIE_VARS[$k] = addslashes($v); ! } ! } ! @reset($HTTP_COOKIE_VARS); ! } ! } ! ! // Define some basic configuration arrays this also prevents ! // malicious rewriting of language and otherarray values via ! // URI params ! ! $board_config = array(); ! $userdata = array(); ! $theme = array(); ! $images = array(); ! $lang = array(); ! $nav_links = array(); ! $gen_simple_header = false; ! ! @include_once( $mx_root_path . 'config.' . $phpEx ); ! ! if ( !defined( "MX_INSTALLED" ) ) ! { ! header( "Location: install/mx_install.$phpEx" ); ! exit; ! } ! ! str_replace( "//", "/", $phpbb_root_path ); ! include_once( $mx_root_path . 'config.' . $phpEx ); ! ! include_once( $phpbb_root_path . 'includes/constants.' . $phpEx ); ! include_once( $mx_root_path . 'includes/template.' . $phpEx ); ! include_once( $phpbb_root_path . 'includes/sessions.' . $phpEx ); ! include_once( $phpbb_root_path . 'includes/auth.' . $phpEx ); ! include_once( $phpbb_root_path . 'includes/functions.' . $phpEx ); ! include_once( $phpbb_root_path . 'includes/db.' . $phpEx ); ! include_once( $phpbb_root_path . 'includes/functions_selects.' . $phpEx ); ! include_once( $phpbb_root_path . 'includes/bbcode.' . $phpEx ); ! ! include_once( $mx_root_path . 'includes/mx_constants.' . $phpEx ); ! include_once( $mx_root_path . 'includes/mx_functions.' . $phpEx ); ! include_once( $mx_root_path . 'includes/mx_functions_phpbb.' . $phpEx ); ! include_once( $mx_root_path . 'includes/mx_auth.' . $phpEx ); ! include_once( $mx_root_path . 'includes/mx_cache.' . $phpEx ); ! ! // Changed my mind to make this a session var. one more query (see directly below) to make it all more foolproof ;) ! /* ! if ( !empty( $HTTP_SESSION_VARS['mx_config'] ) ) ! { ! $portal_config = $HTTP_SESSION_VARS['mx_config']; ! } ! else ! { ! $portal_config = get_info( PORTAL_TABLE, 'portal_id', 1 ); ! $HTTP_SESSION_VARS['mx_config'] = $portal_config; ! } ! */ ! ! $portal_config = get_info( PORTAL_TABLE, 'portal_id', 1 ); ! define( 'PHPBB_URL', $portal_config['portal_phpbb_url'] ); ! define( 'PORTAL_URL', $portal_config['portal_url'] ); ! define( 'PORTAL_VERSION', $portal_config['portal_version'] ); ! ! // instatiate the mx_request_vars class ! ! $mx_request_vars = new mx_request_vars(); ! ! // Obtain and encode users IP ! ! // I'm removing HTTP_X_FORWARDED_FOR ... this may well cause other problems such as ! // private range IP's appearing instead of the guilty routable IP, tough, don't ! // even bother complaining ... go scream and shout at the idiots out there who feel ! // "clever" is doing harm rather than good ... karma is a great thing ... :) ! ! $client_ip = ( !empty( $HTTP_SERVER_VARS['REMOTE_ADDR'] ) ) ? $HTTP_SERVER_VARS['REMOTE_ADDR'] : ( ( !empty( $HTTP_ENV_VARS['REMOTE_ADDR'] ) ) ? $HTTP_ENV_VARS['REMOTE_ADDR'] : $REMOTE_ADDR ); ! $user_ip = encode_ip( $client_ip ); ! ! // Setup forum wide options, if this fails ! // then we output a CRITICAL_ERROR since ! // basic forum information is not available ! ! $sql = "SELECT * ! FROM " . CONFIG_TABLE; ! if ( !( $result = $db->sql_query( $sql ) ) ) ! { ! mx_message_die( CRITICAL_ERROR, "Could not query config information", "", __LINE__, __FILE__, $sql ); ! } ! ! while ( $row = $db->sql_fetchrow( $result ) ) ! { ! $board_config[$row['config_name']] = $row['config_value']; ! } ! ! if ( file_exists( $phpbb_root_path . 'attach_mod' ) ) ! { ! include_once( $phpbb_root_path . 'attach_mod/attachment_mod.' . $phpEx ); ! } ! ! if ( file_exists( 'install' ) || file_exists( 'contrib' ) ) ! { ! mx_message_die( GENERAL_MESSAGE, 'Please ensure both the install/ and contrib/ directories are deleted' ); ! } ! ! // Show 'Board is disabled' message if needed. ! ! if ( $board_config['board_disable'] && !defined( "IN_ADMIN" ) && !defined( "IN_LOGIN" ) ) ! { ! mx_message_die( GENERAL_MESSAGE, 'Board_disable', 'Information' ); ! } ! ?> \ No newline at end of file --- 1,278 ---- ! <?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 : ! * ------------------------------------------------------------------------- ! * 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" ); ! } ! ! define( 'IN_PHPBB', 1 ); ! @session_start(); ! ! error_reporting (E_ERROR | E_WARNING | E_PARSE); // This will NOT report uninitialized variables ! set_magic_quotes_runtime(0); // Disable magic_quotes_runtime ! ! // The following code (unsetting globals) was contributed by Matt Kavanagh ! ! // PHP5 with register_long_arrays off? ! if (!isset($HTTP_POST_VARS) && isset($_POST)) ! { ! $HTTP_POST_VARS = $_POST; ! $HTTP_GET_VARS = $_GET; ! $HTTP_SERVER_VARS = $_SERVER; ! $HTTP_COOKIE_VARS = $_COOKIE; ! $HTTP_ENV_VARS = $_ENV; ! $HTTP_POST_FILES = $_FILES; ! ! // _SESSION is the only superglobal which is conditionally set ! if (isset($_SESSION)) ! { ! $HTTP_SESSION_VARS = $_SESSION; ! } ! } ! ! if (@phpversion() < '4.0.0') ! { ! // PHP3 path; in PHP3, globals are _always_ registered ! ! // We 'flip' the array of variables to test like this so that ! // we can validate later with isset($test[$var]) (no in_array()) ! $test = array('HTTP_GET_VARS' => NULL, 'HTTP_POST_VARS' => NULL, 'HTTP_COOKIE_VARS' => NULL, 'HTTP_SERVER_VARS' => NULL, 'HTTP_ENV_VARS' => NULL, 'HTTP_POST_FILES' => NULL, 'phpEx' => NULL, 'phpbb_root_path' => NULL); ! ! // Loop through each input array ! @reset($test); ! while (list($input,) = @each($test)) ! { ! while (list($var,) = @each($$input)) ! { ! // Validate the variable to be unset ! if (!isset($test[$var]) && $var != 'test' && $var != 'input') ! { ! unset($$var); ! } ! } ! } ! } ! else if (@ini_get('register_globals') == '1' || strtolower(@ini_get('register_globals')) == 'on') ! { ! // PHP4+ path ! $not_unset = array('HTTP_GET_VARS', 'HTTP_POST_VARS', 'HTTP_COOKIE_VARS', 'HTTP_SERVER_VARS', 'HTTP_SESSION_VARS', 'HTTP_ENV_VARS', 'HTTP_POST_FILES', 'phpEx', 'phpbb_root_path'); ! ! // Not only will array_merge give a warning if a parameter ! // is not an array, it will actually fail. So we check if ! // HTTP_SESSION_VARS has been initialised. ! if (!isset($HTTP_SESSION_VARS)) ! { ! $HTTP_SESSION_VARS = array(); ! } ! ! // Merge all into one extremely huge array; unset ! // this later ! $input = array_merge($HTTP_GET_VARS, $HTTP_POST_VARS, $HTTP_COOKIE_VARS, $HTTP_SERVER_VARS, $HTTP_SESSION_VARS, $HTTP_ENV_VARS, $HTTP_POST_FILES); ! ! unset($input['input']); ! unset($input['not_unset']); ! ! while (list($var,) = @each($input)) ! { ! if (!in_array($var, $not_unset)) ! { ! unset($$var); ! } ! unset($$var); ! } ! ! unset($input); ! } ! ! // ! // addslashes to vars if magic_quotes_gpc is off ! // this is a security precaution to prevent someone ! // trying to break out of a SQL statement. ! // ! if( !get_magic_quotes_gpc() ) ! { ! if( is_array($HTTP_GET_VARS) ) ! { ! while( list($k, $v) = each($HTTP_GET_VARS) ) ! { ! if( is_array($HTTP_GET_VARS[$k]) ) ! { ! while( list($k2, $v2) = each($HTTP_GET_VARS[$k]) ) ! { ! $HTTP_GET_VARS[$k][$k2] = addslashes($v2); ! } ! @reset($HTTP_GET_VARS[$k]); ! } ! else ! { ! $HTTP_GET_VARS[$k] = addslashes($v); ! } ! } ! @reset($HTTP_GET_VARS); ! } ! ! if( is_array($HTTP_POST_VARS) ) ! { while( list($k, $v) = each($HTTP_POST_VARS) ) ! { ! if( is_array($HTTP_POST_VARS[$k]) ) ! { ! while( list($k2, $v2) = each($HTTP_POST_VARS[$k]) ) ! { ! $HTTP_POST_VARS[$k][$k2] = addslashes($v2); ! } ! @reset($HTTP_POST_VARS[$k]); ! } ! else ! { ! $HTTP_POST_VARS[$k] = addslashes($v); ! } ! } ! @reset($HTTP_POST_VARS); ! } ! ! if( is_array($HTTP_COOKIE_VARS) ) ! { ! while( list($k, $v) = each($HTTP_COOKIE_VARS) ) ! { ! if( is_array($HTTP_COOKIE_VARS[$k]) ) ! { ! while( list($k2, $v2) = each($HTTP_COOKIE_VARS[$k]) ) ! { ! $HTTP_COOKIE_VARS[$k][$k2] = addslashes($v2); ! } ! @reset($HTTP_COOKIE_VARS[$k]); ! } ! else ! { ! $HTTP_COOKIE_VARS[$k] = addslashes($v); ! } ! } ! @reset($HTTP_COOKIE_VARS); ! } ! } ! ! // Define some basic configuration arrays this also prevents ! // malicious rewriting of language and otherarray values via ! // URI params ! ! $board_config = array(); ! $userdata = array(); ! $theme = array(); ! $images = array(); ! $lang = array(); ! $nav_links = array(); ! $gen_simple_header = false; ! ! @include_once( $mx_root_path . 'config.' . $phpEx ); ! ! if ( !defined( "MX_INSTALLED" ) ) ! { ! header( "Location: install/mx_install.$phpEx" ); ! exit; ! } ! ! str_replace( "//", "/", $phpbb_root_path ); ! include_once( $mx_root_path . 'config.' . $phpEx ); ! ! include_once( $phpbb_root_path . 'includes/constants.' . $phpEx ); ! include_once( $mx_root_path . 'includes/template.' . $phpEx ); ! include_once( $phpbb_root_path . 'includes/sessions.' . $phpEx ); ! include_once( $phpbb_root_path . 'includes/auth.' . $phpEx ); ! include_once( $phpbb_root_path . 'includes/functions.' . $phpEx ); ! include_once( $phpbb_root_path . 'includes/db.' . $phpEx ); ! include_once( $phpbb_root_path . 'includes/functions_selects.' . $phpEx ); ! include_once( $phpbb_root_path . 'includes/bbcode.' . $phpEx ); ! ! include_once( $mx_root_path . 'includes/mx_constants.' . $phpEx ); ! include_once( $mx_root_path . 'includes/mx_functions.' . $phpEx ); ! include_once( $mx_root_path . 'includes/mx_functions_phpbb.' . $phpEx ); ! include_once( $mx_root_path . 'includes/mx_auth.' . $phpEx ); ! include_once( $mx_root_path . 'includes/mx_cache.' . $phpEx ); ! ! // Changed my mind to make this a session var. one more query (see directly below) to make it all more foolproof ;) ! /* ! if ( !empty( $HTTP_SESSION_VARS['mx_config'] ) ) ! { ! $portal_config = $HTTP_SESSION_VARS['mx_config']; ! } ! else ! { ! $portal_config = get_info( PORTAL_TABLE, 'portal_id', 1 ); ! $HTTP_SESSION_VARS['mx_config'] = $portal_config; ! } ! */ ! ! $portal_config = get_info( PORTAL_TABLE, 'portal_id', 1 ); ! define( 'PHPBB_URL', $portal_config['portal_phpbb_url'] ); ! define( 'PORTAL_URL', $portal_config['portal_url'] ); ! define( 'PORTAL_VERSION', $portal_config['portal_version'] ); ! ! // instatiate the mx_request_vars class ! ! $mx_request_vars = new mx_request_vars(); ! ! // Obtain and encode users IP ! ! // I'm removing HTTP_X_FORWARDED_FOR ... this may well cause other problems such as ! // private range IP's appearing instead of the guilty routable IP, tough, don't ! // even bother complaining ... go scream and shout at the idiots out there who feel ! // "clever" is doing harm rather than good ... karma is a great thing ... :) ! ! $client_ip = ( !empty( $HTTP_SERVER_VARS['REMOTE_ADDR'] ) ) ? $HTTP_SERVER_VARS['REMOTE_ADDR'] : ( ( !empty( $HTTP_ENV_VARS['REMOTE_ADDR'] ) ) ? $HTTP_ENV_VARS['REMOTE_ADDR'] : $REMOTE_ADDR ); ! $user_ip = encode_ip( $client_ip ); ! ! // Setup forum wide options, if this fails ! // then we output a CRITICAL_ERROR since ! // basic forum information is not available ! ! $sql = "SELECT * ! FROM " . CONFIG_TABLE; ! if ( !( $result = $db->sql_query( $sql ) ) ) ! { ! mx_message_die( CRITICAL_ERROR, "Could not query config information", "", __LINE__, __FILE__, $sql ); ! } ! ! while ( $row = $db->sql_fetchrow( $result ) ) ! { ! $board_config[$row['config_name']] = $row['config_value']; ! } ! ! if ( file_exists( $phpbb_root_path . 'attach_mod' ) ) ! { ! include_once( $phpbb_root_path . 'attach_mod/attachment_mod.' . $phpEx ); ! } ! ! if ( file_exists( 'install' ) || file_exists( 'contrib' ) ) ! { ! mx_message_die( GENERAL_MESSAGE, 'Please ensure both the install/ and contrib/ directories are deleted' ); ! } ! ! // Show 'Board is disabled' message if needed. ! ! if ( $board_config['board_disable'] && !defined( "IN_ADMIN" ) && !defined( "IN_LOGIN" ) ) ! { ! mx_message_die( GENERAL_MESSAGE, 'Board_disable', 'Information' ); ! } ! ?> \ No newline at end of file Index: index.php =================================================================== RCS file: /cvsroot/mxbb/core/index.php,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** index.php 12 Apr 2005 21:10:33 -0000 1.29 --- index.php 13 Apr 2005 20:15:56 -0000 1.30 *************** *** 1,333 **** ! <?php ! /** ------------------------------------------------------------------------ ! * subject : mx-portal, CMS & portal ! * author : jon ohlsson, marc morisette and the MX-Team ! * credits : 2001 The phpBB Group ! * begin : june, 2002 ! * copyright : (C) 2002-2005 MX-System ! * email : jon...@ho... ! * project site : www.mx-system.com ! * ! * description : the main mx-portal file ! * ------------------------------------------------------------------------- ! * ! * $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('MX_DEBUG', 1); ! define( 'IN_PORTAL', 1 ); ! $mx_root_path = "./"; ! ! include($mx_root_path . 'extension.inc'); ! include($mx_root_path . 'common.' . $phpEx); ! ! $view_page = false; ! ! // Page selector ! ! $page_id = $mx_request_vars->request('page', MX_TYPE_INT, 1); ! ! // Start session management ! $userdata = session_pagestart($user_ip, - ( 1000 + $page_id )); ! mx_init_userprefs($userdata); ! ! if ( $mx_request_vars->is_request('mx_copy') ) ! { ! compose_mx_copy(); ! } ! ! // Load page vars ! // Load http_session variables if populated, else consult db and populate http_session ! ! $mx_session_time = isset($HTTP_SESSION_VARS['mx_session_recached']) ? $HTTP_SESSION_VARS['mx_session_recached'] : $userdata['session_start']; ! if ( empty( $HTTP_SESSION_VARS['mx_pages']['page_' . $page_id] ) || $portal_config['portal_recached'] > $mx_session_time ) ! { ! $HTTP_SESSION_VARS['mx_session_recached'] = $portal_config['portal_recached']; ! if ( defined('MX_DEBUG') ) ! { ! echo('populating page block http_session'); ! } ! // Populate all mx_pages session vars, for faster navigation ! get_page_session(); ! } ! ! $page_row = $HTTP_SESSION_VARS['mx_pages']['page_' . $page_id]['page_info']; ! ! $block_rows = $HTTP_SESSION_VARS['mx_pages']['page_' . $page_id]['blocks']; ! $total_block = count($block_rows); ! ! $column_rows = $HTTP_SESSION_VARS['mx_pages']['page_' . $page_id]['columns']; ! $total_column = count($column_rows); ! ! $page_title .= $page_row['page_name']; ! $page_icon = $page_row['page_icon']; ! $page_ov_header = $page_row['page_header']; ! ! // Page auth ! $is_auth_ary = page_auth(AUTH_VIEW, $userdata, $page_row['page_auth_view'], $page_row['page_auth_view_group']); ! ! if ( !$is_auth_ary[auth_view] && $userdata['session_logged_in'] ) ! { ! $message = empty($lang['Page_Not_Authorised']) ? "Sorry, but you don't have privilege to access this page." : $lang['Page_Not_Authorised']; ! mx_message_die(GENERAL_MESSAGE, $message, '', __LINE__, __FILE__, ''); ! } ! elseif ( !$is_auth_ary[auth_view] && !$userdata['session_logged_in'] ) ! { ! mx_redirect(append_sid($mx_root_path . "login.$phpEx?redirect=" . mx_this_url(), true)); ! } ! include($mx_root_path . 'includes/page_header.' . $phpEx); ! ! // Initialize template ! ! $layouttemplate = new mx_Template($template->root, $board_config, $db); ! ! $layouttemplate->set_filenames(array( ! 'mx_main_layout' => 'mx_main_layout.tpl') ! ); ! ! // Generate the fold/unfold menu navigation switches (cookie based) ! ! if ( !empty($HTTP_COOKIE_VARS['phpbbEdit_Blocks']) ) ! { ! $edit_on = $HTTP_COOKIE_VARS['phpbbEdit_Blocks']; ! } ! elseif ( $userdata['user_level'] == ADMIN ) ! { ! $edit_on = true; ! } ! else ! { ! $edit_on = false; ! } ! ! // Start output of page --------------------------------------------------------------------------------------- ! // ------------------------------------------------------------------------------------------------------------ ! ! // Page columns ! ! for( $column = 0; $column < $total_column; $column++ ) ! { ! $block_size = $column_rows[$column]['column_size']; ! // Send optional column class ! ! if ( $total_column == 1 ) ! { ! $colclass = 'middlecol'; ! } ! else ! { ! switch( $column ) ! { ! case 0: ! $colclass = 'leftcol'; ! break; ! case 1: ! $colclass = 'middlecol'; ! break; ! case 2: ! $colclass = 'rightcol'; ! break; ! } ! } ! ! // Pass column data ! ! $layouttemplate->assign_block_vars('layout_column', array( ! 'COL_CLASS' => $colclass, ! 'BLOCK_SIZE' => $block_size ! )); ! $column_contents = array(); ! ! // Page blocks ! ! $show_edit_blocks_icon = false; ! ! for( $block = 0; $block < $total_block; $block++ ) ! { ! // Validate this block is really visible and exists for the column ! ! if ( $column_rows[$column]['column_id'] == $block_rows[$block]['column_id'] ) ! { ! $block_id = $mx_block_id = $block_rows[$block]['block_id']; ! $block_file = $block_rows[$block]['function_file']; ! $dynamic_main_block_id = ''; ! ! // Block view auth ----------------------------------------------------------------------------------------------------- ! ! $is_auth_ary = block_auth( AUTH_VIEW, $mx_block_id, $userdata, $block_rows[$block]['auth_view'], $block_rows[$block]['auth_view_group'] ); ! ! if ( ($is_auth_ary['auth_view'] && $block_rows[$block]['show_block'] == 1) || $is_auth_ary['auth_mod'] ) ! { ! //$layouttemplate->assign_block_vars('layoutcol', array()); ! $template = new mx_Template($template->root, $board_config, $db); ! ! $module_root_path = $block_rows[$block]['module_path']; ! ! $title_class = $block_rows[$block]['function_file'] != 'mx_multiple_blocks.php' ? 'mxthHead' : 'mxthHead_none'; ! ! ob_start(); ! include($module_root_path . $block_file); ! $column_contents[$column] = ob_get_contents(); ! ob_end_clean(); ! ! // Pass block data ! if ( $block_rows[$block]['show_block'] == 1 || $is_auth_ary[auth_mod] ) ! { ! $layouttemplate->assign_block_vars('layout_column.blocks', array( ! 'BLOCK' => $column_contents[$column], ! 'BLOCK_SIZE' => ( !empty($block_size) ? $block_size : '100%' ) ! )); ! ! // Switch: graphical block borders ! ! if ( !empty($page_row['page_graph_border']) ) ! { ! if ( file_exists($mx_root_path . TEMPLATE_ROOT_PATH . 'images/' . $page_row['page_graph_border'] . '1-1.gif') ) ! { ! $layouttemplate->assign_block_vars('layout_column.blocks.graph_border', array( ! 'TEMPLATE_ROOT_PATH' => TEMPLATE_ROOT_PATH, ! 'PREFIX' => $page_row['page_graph_border'] ! )); ! } ! } ! ! if ( $block_rows[$block]['show_stats'] == 1 && !empty($block_rows[$block]['block_time']) && !empty($block_rows[$block]['block_editor_id']) ) ! { ! $editor_name_tmp = get_userdata($block_rows[$block]['block_editor_id']); ! $editor_name = $editor_name_tmp['username']; ! $edit_time = create_date($board_config['default_dateformat'], $block_rows[$block]['block_time'], $board_config['board_timezone']); ! ! $layouttemplate->assign_block_vars('layout_column.blocks.block_stats', array( ! 'L_BLOCK_UPDATED' => $lang['Block_updated_by'], ! 'EDITOR_NAME' => $editor_name, ! 'EDIT_TIME' => $edit_time ! )); ! } ! else ! { ! $layouttemplate->assign_block_vars('layout_column.blocks.no_stats', array()); ! } ! } ! } // End View auth ! ! // Block edit auth --------------------------------------------------------------------------------- ! $mx_block_edit = false; ! ! $is_auth_ary = array(); ! $is_auth_ary = block_auth( AUTH_EDIT, $mx_block_id , $userdata, $block_rows[$block]['auth_edit'], $block_rows[$block]['auth_edit_group'] ); ! ! if ( ( ($is_auth_ary['auth_edit'] && $block_rows[$block]['show_block'] == 1 ) || $is_auth_ary['auth_mod']) ) ! { ! $show_edit_blocks_icon = true; ! $mx_block_edit = true; ! ! // Define some hidden Edit Block parameters ! $s_hidden_fields = '<input type="hidden" name="sid" value="' . $userdata['session_id'] . '" />'; ! $s_hidden_fields .= '<input type="hidden" name="portalpage" value="' . $page_id . '" />'; ! $s_hidden_fields .= '<input type="hidden" name="mode" value="setting" />'; ! $s_hidden_fields .= '<input type="hidden" name="f" value="' . intval( $HTTP_GET_VARS['f'] ) . '" />'; ! $s_hidden_fields .= '<input type="hidden" name="t" value="' . intval( $HTTP_GET_VARS['t'] ) . '" />'; ! $s_hidden_fields .= '<input type="hidden" name="p" value="' . intval( $HTTP_GET_VARS['p'] ) . '" />'; ! ! // Switch between different block types ! ! $block_edit_img = ( ( $block_file == 'mx_multiple_blocks.php' ) ? 'block_edit_split.gif' : ( $block_file == 'mx_textblock_blog.php' ? 'block_edit_admin.gif' : 'block_edit.gif' ) ) ; ! $split_admin_file = !empty( $block_rows[$block]['function_admin'] ) ? $block_rows[$block]['function_admin'] : 'admin/admin_mx_block.php'; ! ! // Dynamic Block Itself ! if ( !empty($dynamic_main_block_id) ) ! { ! $is_dynamic_auth_ary = array(); ! $is_dynamic_auth_ary = block_auth( AUTH_EDIT, $dynamic_main_block_id , $userdata, $dynamic_block_config[$dynamic_main_block_id]['auth_edit'], $dynamic_block_config[$dynamic_main_block_id]['auth_edit_group'] ); ! ! if ( ($is_dynamic_auth_ary['auth_edit'] || $is_dynamic_auth_ary['auth_mod']) ) ! { ! $block_desc = !empty( $dynamic_block_config[$dynamic_main_block_id]['block_desc'] ) ? ' (' . $dynamic_block_config[$dynamic_main_block_id]['block_desc'] . ')' : ''; ! $edit_url = append_sid( $mx_root_path . 'admin/admin_mx_block.php' . "?sid=" . $userdata['session_id'] ); ! ! $edit_img = '<input type="image" class ="editblock" src="' . PORTAL_URL . TEMPLATE_ROOT_PATH . 'images/block_icons/' . 'block_edit_admin.gif' . '" alt="' . $lang['Block_Edit'] . $block_rows[$block]['block_id'] . '" title="' . $lang['Block_Edit'] . ' :: ' . $dynamic_block_config[$dynamic_main_block_id]['block_title'] . $block_desc . '">'; ! ! $s_hidden_fields .= '<input type="hidden" name="block_id" value="' . $dynamic_main_block_id . '" />'; ! ! $layouttemplate->assign_block_vars('layout_column.blocks.edit', array( ! 'BLOCK_SIZE' => ( !empty( $block_size ) ? $block_size : '100%' ), ! 'L_TITLE' => $title, ! 'L_DESC' => $b_description, ! 'EDIT_ACTION' => $edit_url, ! 'EDIT_IMG' => $edit_img, ! 'TITLECLASS' => $title_class, ! 'S_HIDDEN_FORM_FIELDS' => $s_hidden_fields ! )); ! ! $layouttemplate->assign_block_vars('layout_column.blocks.edit.switch_edit_' . ( $edit_on ? 'on' : 'off' ), array()); ! } ! } ! ! $block_desc = !empty( $block_rows[$block]['block_desc'] ) ? ' (' . $block_rows[$block]['block_desc'] . ')' : ''; ! $edit_url = append_sid( $mx_root_path . $split_admin_file . "?sid=" . $userdata['session_id'] ); ! $edit_img = '<input type="image" class ="editblock" src="' . PORTAL_URL . TEMPLATE_ROOT_PATH . 'images/block_icons/' . $block_edit_img . '" alt="' . $lang['Block_Edit'] . ' :: ' . $block_rows[$block]['block_title'] . $block_desc . '" title="' . $lang['Block_Edit'] . ' :: ' . $block_rows[$block]['block_title'] . $block_desc . '">'; ! ! $s_hidden_fields .= '<input type="hidden" name="block_id" value="' . $mx_block_id . '" />'; ! ! $layouttemplate->assign_block_vars('layout_column.blocks.edit', array( ! 'BLOCK_SIZE' => ( !empty( $block_size ) ? $block_size : '100%' ), ! 'L_TITLE' => $title, ! 'L_DESC' => $b_description, ! 'EDIT_ACTION' => $edit_url, ! 'EDIT_IMG' => $edit_img, ! 'TITLECLASS' => $title_class, ! 'S_HIDDEN_FORM_FIELDS' => $s_hidden_fields ! )); ! ! // Is the Block hidden ? ! ! if ( $block_rows[$block]['show_block'] == 0 ) ! { ! $hidden_img = '<img src="' . PORTAL_URL . TEMPLATE_ROOT_PATH . 'images/block_icons/block_hidden.gif" alt="' . $lang['Hidden_block'] . '">'; ! $layouttemplate->assign_block_vars('layout_column.blocks.edit.hidden_block', array( ! 'HIDDEN_BLOCK' => $hidden_img ! )); ! } ! ! // Switch: Edit Block ! ! $layouttemplate->assign_block_vars( 'layout_column.blocks.edit.switch_edit_' . ( $edit_on ? 'on' : 'off' ), array() ); ! ! } // End Edit auth ! ! // Switch: show block header ------------------- ! if ( $block_rows[$block]['show_block'] == 1 && ( $mx_block_edit || $block_rows[$block]['show_title'] == 1 ) || $is_auth_ary[auth_mod] ) ! { ! $layouttemplate->assign_block_vars('layout_column.blocks.block_header', array()); ! ! // Switch: show title ------------------- ! if ( $block_rows[$block]['show_title'] == 1 || $is_auth_ary[auth_mod] ) ! { ! $this_block_title = $block_rows[$block]['show_title'] == 0 && $is_auth_ary[auth_mod] ? '(' . $block_rows[$block]['block_title'] . ')' : $block_rows[$block]['block_title']; ! $layouttemplate->assign_block_vars('layout_column.blocks.show_title', array( ! 'L_TITLE' => $this_block_title, ! 'TITLECLASS' => $title_class ! )); ! } ! } ! ! } ! } // for ... blocks ! } // for ... column ! ! // Output page ! ! $layouttemplate->pparse('mx_main_layout'); ! ! // Output footer ! ! include($mx_root_path . 'includes/page_tail.' . $phpEx); ! ?> \ No newline at end of file --- 1,333 ---- ! <?php ! /** ------------------------------------------------------------------------ ! * subject : mx-portal, CMS & portal ! * author : jon ohlsson, marc morisette and the MX-Team ! * credits : 2001 The phpBB Group ! * begin : june, 2002 ! * copyright : (C) 2002-2005 MX-System ! * email : jon...@ho... ! * project site : www.mx-system.com ! * ! * description : the main mx-portal file ! * ------------------------------------------------------------------------- ! * ! * $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('MX_DEBUG', 1); ! define( 'IN_PORTAL', 1 ); ! $mx_root_path = "./"; ! ! include($mx_root_path . 'extension.inc'); ! include($mx_root_path . 'common.' . $phpEx); ! ! $view_page = false; ! ! // Page selector ! ! $page_id = $mx_request_vars->request('page', MX_TYPE_INT, 1); ! ! // Start session management ! $userdata = session_pagestart($user_ip, - ( 1000 + $page_id )); ! mx_init_userprefs($userdata); ! ! if ( $mx_request_vars->is_request('mx_copy') ) ! { ! compose_mx_copy(); ! } ! ! // Load page vars ! // Load http_session variables if populated, else consult db and populate http_session ! ! $mx_session_time = isset($HTTP_SESSION_VARS['mx_session_recached']) ? $HTTP_SESSION_VARS['mx_session_recached'] : $userdata['session_start']; ! if ( empty( $HTTP_SESSION_VARS['mx_pages']['page_' . $page_id] ) || $portal_config['portal_recached'] > $mx_session_time ) ! { ! $HTTP_SESSION_VARS['mx_session_recached'] = $portal_config['portal_recached']; ! if ( defined('MX_DEBUG') ) ! { ! echo('populating page block http_session'); ! } ! // Populate all mx_pages session vars, for faster navigation ! get_page_session(); ! } ! ! $page_row = $HTTP_SESSION_VARS['mx_pages']['page_' . $page_id]['page_info']; ! ! $block_rows = $HTTP_SESSION_VARS['mx_pages']['page_' . $page_id]['blocks']; ! $total_block = count($block_rows); ! ! $column_rows = $HTTP_SESSION_VARS['mx_pages']['page_' . $page_id]['columns']; ! $total_column = count($column_rows); ! ! $page_title .= $page_row['page_name']; ! $page_icon = $page_row['page_icon']; ! $page_ov_header = $page_row['page_header']; ! ! // Page auth ! $is_auth_ary = page_auth(AUTH_VIEW, $userdata, $page_row['page_auth_view'], $page_row['page_auth_view_group']); ! ! if ( !$is_auth_ary[auth_view] && $userdata['session_logged_in'] ) ! { ! $message = empty($lang['Page_Not_Authorised']) ? "Sorry, but you don't have privilege to access this page." : $lang['Page_Not_Authorised']; ! mx_message_die(GENERAL_MESSAGE, $message, '', __LINE__, __FILE__, ''); ! } ! elseif ( !$is_auth_ary[auth_view] && !$userdata['session_logged_in'] ) ! { ! mx_redirect(append_sid($mx_root_path . "login.$phpEx?redirect=" . mx_this_url(), true)); ! } ! include($mx_root_path . 'includes/page_header.' . $phpEx); ! ! // Initialize template ! ! $layouttemplate = new mx_Template($template->root, $board_config, $db); ! ! $layouttemplate->set_filenames(array( ! 'mx_main_layout' => 'mx_main_layout.tpl') ! ); ! ! // Generate the fold/unfold menu navigation switches (cookie based) ! ! if ( !empty($HTTP_COOKIE_VARS['phpbbEdit_Blocks']) ) ! { ! $edit_on = $HTTP_COOKIE_VARS['phpbbEdit_Blocks']; ! } ! elseif ( $userdata['user_level'] == ADMIN ) ! { ! $edit_on = true; ! } ! else ! { ! $edit_on = false; ! } ! ! // Start output of page --------------------------------------------------------------------------------------- ! // ------------------------------------------------------------------------------------------------------------ ! ! // Page columns ! ! for( $column = 0; $column < $total_column; $column++ ) ! { ! $block_size = $column_rows[$column]['column_size']; ! // Send optional column class ! ! if ( $total_column == 1 ) ! { ! $colclass = 'middlecol'; ! } ! else ! { ! switch( $column ) ! { ! case 0: ! $colclass = 'leftcol'; ! break; ! case 1: ! $colclass = 'middlecol'; ! break; ! case 2: ! $colclass = 'rightcol'; ! break; ! } ! } ! ! // Pass column data ! ! $layouttemplate->assign_block_vars('layout_column', array( ! 'COL_CLASS' => $colclass, ! 'BLOCK_SIZE' => $block_size ! )); ! $column_contents = array(); ! ! // Page blocks ! ! $show_edit_blocks_icon = false; ! ! for( $block = 0; $block < $total_block; $block++ ) ! { ! // Validate this block is really visible and exists for the column ! ! if ( $column_rows[$column]['column_id'] == $block_rows[$block]['column_id'] ) ! { ! $block_id = $mx_block_id = $block_rows[$block]['block_id']; ! $block_file = $block_rows[$block]['function_file']; ! $dynamic_main_block_id = ''; ! ! // Block view auth ----------------------------------------------------------------------------------------------------- ! ! $is_auth_ary = block_auth( AUTH_VIEW, $mx_block_id, $userdata, $block_rows[$block]['auth_view'], $block_rows[$block]['auth_view_group'] ); ! ! if ( ($is_auth_ary['auth_view'] && $block_rows[$block]['show_block'] == 1) || $is_auth_ary['auth_mod'] ) ! { ! //$layouttemplate->assign_block_vars('layoutcol', array()); ! $template = new mx_Template($template->root, $board_config, $db); ! ! $module_root_path = $block_rows[$block]['module_path']; ! ! $title_class = $block_rows[$block]['function_file'] != 'mx_multiple_blocks.php' ? 'mxthHead' : 'mxthHead_none'; ! ! ob_start(); ! include($module_root_path . $block_file); ! $column_contents[$column] = ob_get_contents(); ! ob_end_clean(); ! ! // Pass block data ! if ( $block_rows[$block]['show_block'] == 1 || $is_auth_ary[auth_mod] ) ! { ! $layouttemplate->assign_block_vars('layout_column.blocks', array( ! 'BLOCK' => $column_contents[$column], ! 'BLOCK_SIZE' => ( !empty($block_size) ? $block_size : '100%' ) ! )); ! ! // Switch: graphical block borders ! ! if ( !empty($page_row['page_graph_border']) ) ! { ! if ( file_exists($mx_root_path . TEMPLATE_ROOT_PATH . 'images/' . $page_row['page_graph_border'] . '1-1.gif') ) ! { ! $layouttemplate->assign_block_vars('layout_column.blocks.graph_border', array( ! 'TEMPLATE_ROOT_PATH' => TEMPLATE_ROOT_PATH, ! 'PREFIX' => $page_row['page_graph_border'] ! )); ! } ! } ! ! if ( $block_rows[$block]['show_stats'] == 1 && !empty($block_rows[$block]['block_time']) && !empty($block_rows[$block]['block_editor_id']) ) ! { ! $editor_name_tmp = get_userdata($block_rows[$block]['block_editor_id']); ! $editor_name = $editor_name_tmp['username']; ! $edit_time = create_date($board_config['default_dateformat'], $block_rows[$block]['block_time'], $board_config['board_timezone']); ! ! $layouttemplate->assign_block_vars('layout_column.blocks.block_stats', array( ! 'L_BLOCK_UPDATED' => $lang['Block_updated_by'], ! 'EDITOR_NAME' => $editor_name, ! 'EDIT_TIME' => $edit_time ! )); ! } ! else ! { ! $layouttemplate->assign_block_vars('layout_column.blocks.no_stats', array()); ! } ! } ! } // End View auth ! ! // Block edit auth --------------------------------------------------------------------------------- ! $mx_block_edit = false; ! ! $is_auth_ary = array(); ! $is_auth_ary = block_auth( AUTH_EDIT, $mx_block_id , $userdata, $block_rows[$block]['auth_edit'], $block_rows[$block]['auth_edit_group'] ); ! ! if ( ( ($is_auth_ary['auth_edit'] && $block_rows[$block]['show_block'] == 1 ) || $is_auth_ary['auth_mod']) ) ! { ! $show_edit_blocks_icon = true; ! $mx_block_edit = true; ! ! // Define some hidden Edit Block parameters ! $s_hidden_fields = '<input type="hidden" name="sid" value="' . $userdata['session_id'] . '" />'; ! $s_hidden_fields .= '<input type="hidden" name="portalpage" value="' . $page_id . '" />'; ! $s_hidden_fields .= '<input type="hidden" name="mode" value="setting" />'; ! $s_hidden_fields .= '<input type="hidden" name="f" value="' . intval( $HTTP_GET_VARS['f'] ) . '" />'; ! $s_hidden_fields .= '<input type="hidden" name="t" value="' . intval( $HTTP_GET_VARS['t'] ) . '" />'; ! $s_hidden_fields .= '<input type="hidden" name="p" value="' . intval( $HTTP_GET_VARS['p'] ) . '" />'; ! ! // Switch between different block types ! ! $block_edit_img = ( ( $block_file == 'mx_multiple_blocks.php' ) ? 'block_edit_split.gif' : ( $block_file == 'mx_textblock_blog.php' ? 'block_edit_admin.gif' : 'block_edit.gif' ) ) ; ! $split_admin_file = !empty( $block_rows[$block]['function_admin'] ) ? $block_rows[$block]['function_admin'] : 'admin/admin_mx_block.php'; ! ! // Dynamic Block Itself ! if ( !empty($dynamic_main_block_id) ) ! { ! $is_dynamic_auth_ary = array(); ! $is_dynamic_auth_ary = block_auth( AUTH_EDIT, $dynamic_main_block_id , $userdata, $dynamic_block_config[$dynamic_main_block_id]['auth_edit'], $dynamic_block_config[$dynamic_main_block_id]['auth_edit_group'] ); ! ! if ( ($is_dynamic_auth_ary['auth_edit'] || $is_dynamic_auth_ary['auth_mod']) ) ! { ! $block_desc = !empty( $dynamic_block_config[$dynamic_main_block_id]['block_desc'] ) ? ' (' . $dynamic_block_config[$dynamic_main_block_id]['block_desc'] . ')' : ''; ! $edit_url = append_sid( $mx_root_path . 'admin/admin_mx_block.php' . "?sid=" . $userdata['session_id'] ); ! ! $edit_img = '<input type="image" class ="editblock" src="' . PORTAL_URL . TEMPLATE_ROOT_PATH . 'images/block_icons/' . 'block_edit_admin.gif' . '" alt="' . $lang['Block_Edit'] . $block_rows[$block]['block_id'] . '" title="' . $lang['Block_Edit'] . ' :: ' . $dynamic_block_config[$dynamic_main_block_id]['block_title'] . $block_desc . '">'; ! ! $s_hidden_fields .= '<input type="hidden" name="block_id" value="' . $dynamic_main_block_id . '" />'; ! ! $layouttemplate->assign_block_vars('layout_column.blocks.edit', array( ! 'BLOCK_SIZE' => ( !empty( $block_size ) ? $block_size : '100%' ), ! 'L_TITLE' => $title, ! 'L_DESC' => $b_description, ! 'EDIT_ACTION' => $edit_url, ! 'EDIT_IMG' => $edit_img, ! 'TITLECLASS' => $title_class, ! 'S_HIDDEN_FORM_FIELDS' => $s_hidden_fields ! )); ! ! $layouttemplate->assign_block_vars('layout_column.blocks.edit.switch_edit_' . ( $edit_on ? 'on' : 'off' ), array()); ! } ! } ! ! $block_desc = !empty( $block_rows[$block]['block_desc'] ) ? ' (' . $block_rows[$block]['block_desc'] . ')' : ''; ! $edit_url = append_sid( $mx_root_path . $split_admin_file . "?sid=" . $userdata['session_id'] ); ! $edit_img = '<input type="image" class ="editblock" src="' . PORTAL_URL . TEMPLATE_ROOT_PATH . 'images/block_icons/' . $block_edit_img . '" alt="' . $lang['Block_Edit'] . ' :: ' . $block_rows[$block]['block_title'] . $block_desc . '" title="' . $lang['Block_Edit'] . ' :: ' . $block_rows[$block]['block_title'] . $block_desc . '">'; ! ! $s_hidden_fields .= '<input type="hidden" name="block_id" value="' . $mx_block_id . '" />'; ! ! $layouttemplate->assign_block_vars('layout_column.blocks.edit', array( ! 'BLOCK_SIZE' => ( !empty( $block_size ) ? $block_size : '100%' ), ! 'L_TITLE' => $title, ! 'L_DESC' => $b_description, ! 'EDIT_ACTION' => $edit_url, ! 'EDIT_IMG' => $edit_img, ! 'TITLECLASS' => $title_class, ! 'S_HIDDEN_FORM_FIELDS' => $s_hidden_fields ! )); ! ! // Is the Block hidden ? ! ! if ( $block_rows[$block]['show_block'] == 0 ) ! { ! $hidden_img = '<img src="' . PORTAL_URL . TEMPLATE_ROOT_PATH . 'images/block_icons/block_hidden.gif" alt="' . $lang['Hidden_block'] . '">'; ! $layouttemplate->assign_block_vars('layout_column.blocks.edit.hidden_block', array( ! 'HIDDEN_BLOCK' => $hidden_img ! )); ! } ! ! // Switch: Edit Block ! ! $layouttemplate->assign_block_vars( 'layout_column.blocks.edit.switch_edit_' . ( $edit_on ? 'on' : 'off' ), array() ); ! ! } // End Edit auth ! ! // Switch: show block header ------------------- ! if ( $block_rows[$block]['show_block'] == 1 && ( $mx_block_edit || $block_rows[$block]['show_title'] == 1 ) || $is_auth_ary[auth_mod] ) ! { ! $layouttemplate->assign_block_vars('layout_column.blocks.block_header', array()); ! ! // Switch: show title ------------------- ! if ( $block_rows[$block]['show_title'] == 1 || $is_auth_ary[auth_mod] ) ! { ! $this_block_title = $block_rows[$block]['show_title'] == 0 && $is_auth_ary[auth_mod] ? '(' . $block_rows[$block]['block_title'] . ')' : $block_rows[$block]['block_title']; ! $layouttemplate->assign_block_vars('layout_column.blocks.show_title', array( ! 'L_TITLE' => $this_block_title, ! 'TITLECLASS' => $title_class ! )); ! } ! } ! ! } ! } // for ... blocks ! } // for ... column ! ! // Output page ! ! $layouttemplate->pparse('mx_main_layout'); ! ! // Output footer ! ! include($mx_root_path . 'includes/page_tail.' . $phpEx); ! ?> \ No newline at end of file |
|
From: Jon O. <jon...@us...> - 2005-04-12 21:19:13
|
Update of /cvsroot/mxbb/core/admin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1115/admin Removed Files: admin_mx_block_edit.php Log Message: removed --- admin_mx_block_edit.php DELETED --- |
|
From: Jon O. <jon...@us...> - 2005-04-12 21:12:19
|
Update of /cvsroot/mxbb/mx_pafiledb/pafiledb/includes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30245/modules/mx_pafiledb/pafiledb/includes Modified Files: functions_mx.php Log Message: Index: functions_mx.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/pafiledb/includes/functions_mx.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** functions_mx.php 11 Apr 2005 17:55:41 -0000 1.1 --- functions_mx.php 12 Apr 2005 21:11:51 -0000 1.2 *************** *** 1,469 **** ! <?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$ ! */ ! ! /** ! * 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 ( !function_exists( mx_smilies_pass ) ) ! { ! function mx_smilies_pass($message) ! { ! global $board_config; ! $smilies_path = $board_config['smilies_path']; ! $board_config['smilies_path'] = PHPBB_URL . $board_config['smilies_path']; ! $message = smilies_pass($message); ! $board_config['smilies_path'] = $smilies_path; ! return $message; ! } ! } ! ! if ( !function_exists( mx_generate_smilies ) ) ! { ! function mx_generate_smilies($mode, $page_id) ! { ! global $board_config, $template, $phpEx; ! $smilies_path = $board_config['smilies_path']; ! $board_config['smilies_path'] = PHPBB_URL . $board_config['smilies_path']; ! generate_smilies($mode, $page_id); ! $board_config['smilies_path'] = $smilies_path; ! $template->assign_vars(array( ! 'U_MORE_SMILIES' => append_sid(PHPBB_URL . "posting.$phpEx?mode=smilies")) ! ); ! } ! } ! ! if ( !function_exists( mx_message_die ) ) ! { ! ! function mx_message_die($msg_code, $msg_text = '', $msg_title = '', $err_line = '', $err_file = '', $sql = '') ! { ! global $db, $template, $board_config, $theme, $lang, $phpEx, $phpbb_root_path, $nav_links, $gen_simple_header, $images; ! global $userdata, $user_ip, $session_length; ! global $starttime; ! ! message_die($msg_code, $msg_text, $msg_title, $err_line, $err_file, $sql); ! } ! ! } ! ! if ( !function_exists( mx_auth_group_cache ) ) ! { ! // Validates if user belongs to group included in group_ids list ! // Also, adds all usergroups to userdata array ! function mx_auth_group_cache( $group_ids = '', $group_mod_mode = false ) ! { ! global $userdata, $db; ! ! if ( $group_ids == '' ) ! { ! return false; ! } ! ! $group_ids_array = explode(",", $group_ids); ! ! // Try to reuse usergroups result. ! if ( $group_mod_mode ) ! { ! $userdata_key = 'mx_usergroups_mod' . $userdata['user_id']; ! ! if ( empty( $userdata[$userdata_key] ) ) ! { ! // Check if user is group moderator.. ! $sql = "SELECT gr.group_id ! FROM " . GROUPS_TABLE . " gr, ! " . USER_GROUP_TABLE . " ugr ! WHERE gr.group_id = ugr.group_id ! AND gr.group_moderator = '" . $userdata['user_id'] . "' ! AND ugr.user_pending = '0' "; ! ! if ( !( $result = $db->sql_query( $sql ) ) ) ! { ! message_die( GENERAL_ERROR, "Could not query group rights information", '', '', '', '' ); ! } ! ! $group_row = $db->sql_fetchrowset( $result ); ! ! $userdata[$userdata_key_mod] = $group_row; ! } ! } ! else ! { ! $userdata_key = 'mx_usergroups' . $userdata['user_id']; ! ! if ( empty( $userdata[$userdata_key] ) ) ! { ! // Check if user is member of the proper group.. ! $sql = "SELECT group_id FROM " . USER_GROUP_TABLE . " WHERE user_id='" . $userdata['user_id'] . "' AND user_pending = 0"; ! ! if ( !( $result = $db->sql_query( $sql ) ) ) ! { ! message_die( GENERAL_ERROR, "Could not query group rights information", '', '', '', '' ); ! } ! ! $group_row = $db->sql_fetchrowset( $result ); ! ! $userdata[$userdata_key] = $group_row; ! } ! } ! ! for ( $i = 0; $i < count( $userdata[$userdata_key] ); $i++ ) ! { ! if ( in_array( $userdata[$userdata_key][$i]['group_id'], $group_ids_array ) ) ! { ! $is_member = true; ! return $is_member; ! } ! } ! ! return false; ! } ! } ! ! if ( !function_exists( mx_add_search_words ) ) ! { ! // Add search words for blocks ! function mx_add_search_words($mode, $post_id, $post_text, $post_title = '', $mx_mode = 'mx') ! { ! global $db, $phpbb_root_path, $board_config, $lang; ! ! // $search_match_table = SEARCH_MATCH_TABLE; ! // $search_word_table = SEARCH_WORD_TABLE; ! ! switch ( $mx_mode ) ! { ! case 'mx': ! $search_match_table = MX_MATCH_TABLE; ! $search_word_table = MX_WORD_TABLE; ! $db_key = 'block_id'; ! break; ! case 'kb': ! $search_match_table = KB_MATCH_TABLE; ! $search_word_table = KB_WORD_TABLE; ! $db_key = 'article_id'; ! break; ! } ! ! $stopword_array = @file($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . "/search_stopwords.txt"); ! $synonym_array = @file($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . "/search_synonyms.txt"); ! ! $search_raw_words = array(); ! $search_raw_words['text'] = split_words(clean_words('post', $post_text, $stopword_array, $synonym_array)); ! $search_raw_words['title'] = split_words(clean_words('post', $post_title, $stopword_array, $synonym_array)); ! ! @set_time_limit(0); ! ! $word = array(); ! $word_insert_sql = array(); ! while ( list($word_in, $search_matches) = @each($search_raw_words) ) ! { ! $word_insert_sql[$word_in] = ''; ! if ( !empty($search_matches) ) ! { ! for ($i = 0; $i < count($search_matches); $i++) ! { ! $search_matches[$i] = trim($search_matches[$i]); ! ! if( $search_matches[$i] != '' ) ! { ! $word[] = $search_matches[$i]; ! if ( !strstr($word_insert_sql[$word_in], "'" . $search_matches[$i] . "'") ) ! { ! $word_insert_sql[$word_in] .= ( $word_insert_sql[$word_in] != "" ) ? ", '" . $search_matches[$i] . "'" : "'" . $search_matches[$i] . "'"; ! } ! } ! } ! } ! } ! ! if ( count($word) ) ! { ! sort($word); ! ! $prev_word = ''; ! $word_text_sql = ''; ! $temp_word = array(); ! for($i = 0; $i < count($word); $i++) ! { ! if ( $word[$i] != $prev_word ) ! { ! $temp_word[] = $word[$i]; ! $word_text_sql .= ( ( $word_text_sql != '' ) ? ', ' : '' ) . "'" . $word[$i] . "'"; ! } ! $prev_word = $word[$i]; ! } ! $word = $temp_word; ! ! $check_words = array(); ! switch( SQL_LAYER ) ! { ! case 'postgresql': ! case 'msaccess': ! case 'mssql-odbc': ! case 'oracle': ! case 'db2': ! $sql = "SELECT word_id, word_text ! FROM " . $search_word_table . " ! WHERE word_text IN ($word_text_sql)"; ! if ( !($result = $db->sql_query($sql)) ) ! { ! mx_message_die(GENERAL_ERROR, 'Could not select words', '', __LINE__, __FILE__, $sql); ! } ! ! while ( $row = $db->sql_fetchrow($result) ) ! { ! $check_words[$row['word_text']] = $row['word_id']; ! } ! break; ! } ! ! $value_sql = ''; ! $match_word = array(); ! for ($i = 0; $i < count($word); $i++) ! { ! $new_match = true; ! if ( isset($check_words[$word[$i]]) ) ! { ! $new_match = false; ! } ! ! if ( $new_match ) ! { ! switch( SQL_LAYER ) ! { ! case 'mysql': ! case 'mysql4': ! $value_sql .= ( ( $value_sql != '' ) ? ', ' : '' ) . '(\'' . $word[$i] . '\', 0)'; ! break; ! case 'mssql': ! case 'mssql-odbc': ! $value_sql .= ( ( $value_sql != '' ) ? ' UNION ALL ' : '' ) . "SELECT '" . $word[$i] . "', 0"; ! break; ! default: ! $sql = "INSERT INTO " . $search_word_table . " (word_text, word_common) ! VALUES ('" . $word[$i] . "', 0)"; ! if( !$db->sql_query($sql) ) ! { ! mx_message_die(GENERAL_ERROR, 'Could not insert new word', '', __LINE__, __FILE__, $sql); ! } ! break; ! } ! } ! } ! ! if ( $value_sql != '' ) ! { ! switch ( SQL_LAYER ) ! { ! case 'mysql': ! case 'mysql4': ! $sql = "INSERT IGNORE INTO " . $search_word_table . " (word_text, word_common) ! VALUES $value_sql"; ! break; ! case 'mssql': ! case 'mssql-odbc': ! $sql = "INSERT INTO " . $search_word_table . " (word_text, word_common) ! $value_sql"; ! break; ! } ! ! if ( !$db->sql_query($sql) ) ! { ! mx_message_die(GENERAL_ERROR, 'Could not insert new word', '', __LINE__, __FILE__, $sql); ! } ! } ! } ! ! while( list($word_in, $match_sql) = @each($word_insert_sql) ) ! { ! $title_match = ( $word_in == 'title' ) ? 1 : 0; ! ! if ( $match_sql != '' ) ! { ! $sql = "INSERT INTO " . $search_match_table . " ($db_key, word_id, title_match) ! SELECT $post_id, word_id, $title_match ! FROM " . $search_word_table . " ! WHERE word_text IN ($match_sql)"; ! if ( !$db->sql_query($sql) ) ! { ! mx_message_die(GENERAL_ERROR, 'Could not insert new word matches', '', __LINE__, __FILE__, $sql); ! } ! } ! } ! ! if ($mode == 'single') ! { ! // remove_common('single', 4/10, $word); ! } ! ! return; ! } ! ! function mx_remove_search_post($post_id_sql, $mx_mode = 'mx') ! { ! global $db; ! ! // $search_match_table = SEARCH_MATCH_TABLE; ! // $search_word_table = SEARCH_WORD_TABLE; ! ! switch ( $mx_mode ) ! { ! case 'mx': ! $search_match_table = MX_MATCH_TABLE; ! $search_word_table = MX_WORD_TABLE; ! $db_key = 'block_id'; ! break; ! case 'kb': ! $search_match_table = KB_MATCH_TABLE; ! $search_word_table = KB_WORD_TABLE; ! $db_key = 'article_id'; ! break; ! } ! ! $words_removed = false; ! ! switch ( SQL_LAYER ) ! { ! case 'mysql': ! case 'mysql4': ! $sql = "SELECT word_id ! FROM " . $search_match_table . " ! WHERE $db_key IN ($post_id_sql) ! GROUP BY word_id"; ! if ( $result = $db->sql_query($sql) ) ! { ! $word_id_sql = ''; ! while ( $row = $db->sql_fetchrow($result) ) ! { ! $word_id_sql .= ( $word_id_sql != '' ) ? ', ' . $row['word_id'] : $row['word_id']; ! } ! ! $sql = "SELECT word_id ! FROM " . $search_match_table . " ! WHERE word_id IN ($word_id_sql) ! GROUP BY word_id ! HAVING COUNT(word_id) = 1"; ! if ( $result = $db->sql_query($sql) ) ! { ! $word_id_sql = ''; ! while ( $row = $db->sql_fetchrow($result) ) ! { ! $word_id_sql .= ( $word_id_sql != '' ) ? ', ' . $row['word_id'] : $row['word_id']; ! } ! ! if ( $word_id_sql != '' ) ! { ! $sql = "DELETE FROM " . $search_word_table . " ! WHERE word_id IN ($word_id_sql)"; ! if ( !$db->sql_query($sql) ) ! { ! mx_message_die(GENERAL_ERROR, 'Could not delete word list entry', '', __LINE__, __FILE__, $sql); ! } ! ! $words_removed = $db->sql_affectedrows(); ! } ! } ! } ! break; ! ! default: ! $sql = "DELETE FROM " . $search_word_table . " ! WHERE word_id IN ( ! SELECT word_id ! FROM " . $search_match_table . " ! WHERE word_id IN ( ! SELECT word_id ! FROM " . $search_match_table . " ! WHERE $db_key IN ($post_id_sql) ! GROUP BY word_id ! ) ! GROUP BY word_id ! HAVING COUNT(word_id) = 1 ! )"; ! if ( !$db->sql_query($sql) ) ! { ! mx_message_die(GENERAL_ERROR, 'Could not delete old words from word table', '', __LINE__, __FILE__, $sql); ! } ! ! $words_removed = $db->sql_affectedrows(); ! ! break; ! } ! ! $sql = "DELETE FROM " . $search_match_table . " ! WHERE $db_key IN ($post_id_sql)"; ! if ( !$db->sql_query($sql) ) ! { ! mx_message_die(GENERAL_ERROR, 'Error in deleting post', '', __LINE__, __FILE__, $sql); ! } ! ! return $words_removed; ! } ! } ! ! if ( !function_exists(mx_do_install_upgrade) ) ! { ! // Generating output ! ! function mx_do_install_upgrade( $sql = '', $main_install = false ) ! { ! global $table_prefix, $mx_table_prefix, $userdata, $phpEx, $template, $lang, $db, $board_config, $HTTP_POST_VARS; ! ! $inst_error = false; ! $n = 0; ! $message = "<b>This is the result list of the SQL queries needed for the install/upgrade</b><br /><br />"; ! ! while ( $sql[$n] ) ! { ! if ( !$result = $db->sql_query( $sql[$n] ) ) ! { ! $message .= '<b><font color=#FF0000>[Error or Already added]</font></b> line: ' . ( $n + 1 ) . ' , ' . $sql[$n] . '<br />'; ! $inst_error = true; ! } ! else ! { ! $message .= '<b><font color=#0000fF>[Added/Updated]</font></b> line: ' . ( $n + 1 ) . ' , ' . $sql[$n] . '<br />'; ! } ! $n++; ! } ! $message .= '<br /> If you get some Errors, Already Added or Updated messages, relax, this is normal when updating modules'; ! ! if ( $main_install ) ! { ! if ( !$inst_error ) ! { ! $message .= '-> no db errors :-)<br /><br /><b>Portal installed successfully! </b><hr><br /><br />'; ! $message .= '1) Now, delete the /install and /contrib folders!!!<br /><br />'; ! $message .= '2) If you haven\'t already done a db backup, now is the time ;)<br /><br />'; ! $message .= '3) Then (after step 1), you HAVE to configure MX core and its modules from within the adminCP, simply \'upgrade\' MX portal Core and all modules in use!!!<br /><br />'; ! ! $message .= 'Click <a href=../admin/admin_mx_module.php>Here</a> to administer/upgrade the portal/modules. You will be promted for an admin username and pass. The upgrade process provide informative output...'; ! } ! else ! { ! $message .= '<br /><br /><b>Portal installed successfully (with some warnings)! </b><hr><br /><br />'; ! $message .= '1) Now, delete the /install and /contrib folders!!!<br /><br />'; ! $message .= '2) If you haven\'t already done a db backup, now is the time ;)<br /><br />'; ! $message .= '3) Now (after step 1), you HAVE to configure MX core and its modules from within the adminCP, simply \'upgrade\' MX portal Core and all modules in use!!!<br /><br />'; ! ! $message .= 'Click <a href=../admin/admin_mx_module.php>Here</a> to administer/upgrade the portal/modules. You will be promted for an admin username and pass. The upgrade process provide informative output...'; ! } ! } ! return $message; ! } ! } ?> \ No newline at end of file --- 1,469 ---- ! <?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$ ! */ ! ! /** ! * 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 ( !function_exists( mx_smilies_pass ) ) ! { ! function mx_smilies_pass($message) ! { ! global $board_config; ! $smilies_path = $board_config['smilies_path']; ! $board_config['smilies_path'] = PHPBB_URL . $board_config['smilies_path']; ! $message = smilies_pass($message); ! $board_config['smilies_path'] = $smilies_path; ! return $message; ! } ! } ! ! if ( !function_exists( mx_generate_smilies ) ) ! { ! function mx_generate_smilies($mode, $page_id) ! { ! global $board_config, $template, $phpEx; ! $smilies_path = $board_config['smilies_path']; ! $board_config['smilies_path'] = PHPBB_URL . $board_config['smilies_path']; ! generate_smilies($mode, $page_id); ! $board_config['smilies_path'] = $smilies_path; ! $template->assign_vars(array( ! 'U_MORE_SMILIES' => append_sid(PHPBB_URL . "posting.$phpEx?mode=smilies")) ! ); ! } ! } ! ! if ( !function_exists( mx_message_die ) ) ! { ! ! function mx_message_die($msg_code, $msg_text = '', $msg_title = '', $err_line = '', $err_file = '', $sql = '') ! { ! global $db, $template, $board_config, $theme, $lang, $phpEx, $phpbb_root_path, $nav_links, $gen_simple_header, $images; ! global $userdata, $user_ip, $session_length; ! global $starttime; ! ! message_die($msg_code, $msg_text, $msg_title, $err_line, $err_file, $sql); ! } ! ! } ! ! if ( !function_exists( mx_auth_group ) ) ! { ! // Validates if user belongs to group included in group_ids list ! // Also, adds all usergroups to userdata array ! function mx_auth_group( $group_ids = '', $group_mod_mode = false ) ! { ! global $userdata, $db; ! ! if ( $group_ids == '' ) ! { ! return false; ! } ! ! $group_ids_array = explode(",", $group_ids); ! ! // Try to reuse usergroups result. ! if ( $group_mod_mode ) ! { ! $userdata_key = 'mx_usergroups_mod' . $userdata['user_id']; ! ! if ( empty( $userdata[$userdata_key] ) ) ! { ! // Check if user is group moderator.. ! $sql = "SELECT gr.group_id ! FROM " . GROUPS_TABLE . " gr, ! " . USER_GROUP_TABLE . " ugr ! WHERE gr.group_id = ugr.group_id ! AND gr.group_moderator = '" . $userdata['user_id'] . "' ! AND ugr.user_pending = '0' "; ! ! if ( !( $result = $db->sql_query( $sql ) ) ) ! { ! message_die( GENERAL_ERROR, "Could not query group rights information", '', '', '', '' ); ! } ! ! $group_row = $db->sql_fetchrowset( $result ); ! ! $userdata[$userdata_key_mod] = $group_row; ! } ! } ! else ! { ! $userdata_key = 'mx_usergroups' . $userdata['user_id']; ! ! if ( empty( $userdata[$userdata_key] ) ) ! { ! // Check if user is member of the proper group.. ! $sql = "SELECT group_id FROM " . USER_GROUP_TABLE . " WHERE user_id='" . $userdata['user_id'] . "' AND user_pending = 0"; ! ! if ( !( $result = $db->sql_query( $sql ) ) ) ! { ! message_die( GENERAL_ERROR, "Could not query group rights information", '', '', '', '' ); ! } ! ! $group_row = $db->sql_fetchrowset( $result ); ! ! $userdata[$userdata_key] = $group_row; ! } ! } ! ! for ( $i = 0; $i < count( $userdata[$userdata_key] ); $i++ ) ! { ! if ( in_array( $userdata[$userdata_key][$i]['group_id'], $group_ids_array ) ) ! { ! $is_member = true; ! return $is_member; ! } ! } ! ! return false; ! } ! } ! ! if ( !function_exists( mx_add_search_words ) ) ! { ! // Add search words for blocks ! function mx_add_search_words($mode, $post_id, $post_text, $post_title = '', $mx_mode = 'mx') ! { ! global $db, $phpbb_root_path, $board_config, $lang; ! ! // $search_match_table = SEARCH_MATCH_TABLE; ! // $search_word_table = SEARCH_WORD_TABLE; ! ! switch ( $mx_mode ) ! { ! case 'mx': ! $search_match_table = MX_MATCH_TABLE; ! $search_word_table = MX_WORD_TABLE; ! $db_key = 'block_id'; ! break; ! case 'kb': ! $search_match_table = KB_MATCH_TABLE; ! $search_word_table = KB_WORD_TABLE; ! $db_key = 'article_id'; ! break; ! } ! ! $stopword_array = @file($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . "/search_stopwords.txt"); ! $synonym_array = @file($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . "/search_synonyms.txt"); ! ! $search_raw_words = array(); ! $search_raw_words['text'] = split_words(clean_words('post', $post_text, $stopword_array, $synonym_array)); ! $search_raw_words['title'] = split_words(clean_words('post', $post_title, $stopword_array, $synonym_array)); ! ! @set_time_limit(0); ! ! $word = array(); ! $word_insert_sql = array(); ! while ( list($word_in, $search_matches) = @each($search_raw_words) ) ! { ! $word_insert_sql[$word_in] = ''; ! if ( !empty($search_matches) ) ! { ! for ($i = 0; $i < count($search_matches); $i++) ! { ! $search_matches[$i] = trim($search_matches[$i]); ! ! if( $search_matches[$i] != '' ) ! { ! $word[] = $search_matches[$i]; ! if ( !strstr($word_insert_sql[$word_in], "'" . $search_matches[$i] . "'") ) ! { ! $word_insert_sql[$word_in] .= ( $word_insert_sql[$word_in] != "" ) ? ", '" . $search_matches[$i] . "'" : "'" . $search_matches[$i] . "'"; ! } ! } ! } ! } ! } ! ! if ( count($word) ) ! { ! sort($word); ! ! $prev_word = ''; ! $word_text_sql = ''; ! $temp_word = array(); ! for($i = 0; $i < count($word); $i++) ! { ! if ( $word[$i] != $prev_word ) ! { ! $temp_word[] = $word[$i]; ! $word_text_sql .= ( ( $word_text_sql != '' ) ? ', ' : '' ) . "'" . $word[$i] . "'"; ! } ! $prev_word = $word[$i]; ! } ! $word = $temp_word; ! ! $check_words = array(); ! switch( SQL_LAYER ) ! { ! case 'postgresql': ! case 'msaccess': ! case 'mssql-odbc': ! case 'oracle': ! case 'db2': ! $sql = "SELECT word_id, word_text ! FROM " . $search_word_table . " ! WHERE word_text IN ($word_text_sql)"; ! if ( !($result = $db->sql_query($sql)) ) ! { ! mx_message_die(GENERAL_ERROR, 'Could not select words', '', __LINE__, __FILE__, $sql); ! } ! ! while ( $row = $db->sql_fetchrow($result) ) ! { ! $check_words[$row['word_text']] = $row['word_id']; ! } ! break; ! } ! ! $value_sql = ''; ! $match_word = array(); ! for ($i = 0; $i < count($word); $i++) ! { ! $new_match = true; ! if ( isset($check_words[$word[$i]]) ) ! { ! $new_match = false; ! } ! ! if ( $new_match ) ! { ! switch( SQL_LAYER ) ! { ! case 'mysql': ! case 'mysql4': ! $value_sql .= ( ( $value_sql != '' ) ? ', ' : '' ) . '(\'' . $word[$i] . '\', 0)'; ! break; ! case 'mssql': ! case 'mssql-odbc': ! $value_sql .= ( ( $value_sql != '' ) ? ' UNION ALL ' : '' ) . "SELECT '" . $word[$i] . "', 0"; ! break; ! default: ! $sql = "INSERT INTO " . $search_word_table . " (word_text, word_common) ! VALUES ('" . $word[$i] . "', 0)"; ! if( !$db->sql_query($sql) ) ! { ! mx_message_die(GENERAL_ERROR, 'Could not insert new word', '', __LINE__, __FILE__, $sql); ! } ! break; ! } ! } ! } ! ! if ( $value_sql != '' ) ! { ! switch ( SQL_LAYER ) ! { ! case 'mysql': ! case 'mysql4': ! $sql = "INSERT IGNORE INTO " . $search_word_table . " (word_text, word_common) ! VALUES $value_sql"; ! break; ! case 'mssql': ! case 'mssql-odbc': ! $sql = "INSERT INTO " . $search_word_table . " (word_text, word_common) ! $value_sql"; ! break; ! } ! ! if ( !$db->sql_query($sql) ) ! { ! mx_message_die(GENERAL_ERROR, 'Could not insert new word', '', __LINE__, __FILE__, $sql); ! } ! } ! } ! ! while( list($word_in, $match_sql) = @each($word_insert_sql) ) ! { ! $title_match = ( $word_in == 'title' ) ? 1 : 0; ! ! if ( $match_sql != '' ) ! { ! $sql = "INSERT INTO " . $search_match_table . " ($db_key, word_id, title_match) ! SELECT $post_id, word_id, $title_match ! FROM " . $search_word_table . " ! WHERE word_text IN ($match_sql)"; ! if ( !$db->sql_query($sql) ) ! { ! mx_message_die(GENERAL_ERROR, 'Could not insert new word matches', '', __LINE__, __FILE__, $sql); ! } ! } ! } ! ! if ($mode == 'single') ! { ! // remove_common('single', 4/10, $word); ! } ! ! return; ! } ! ! function mx_remove_search_post($post_id_sql, $mx_mode = 'mx') ! { ! global $db; ! ! // $search_match_table = SEARCH_MATCH_TABLE; ! // $search_word_table = SEARCH_WORD_TABLE; ! ! switch ( $mx_mode ) ! { ! case 'mx': ! $search_match_table = MX_MATCH_TABLE; ! $search_word_table = MX_WORD_TABLE; ! $db_key = 'block_id'; ! break; ! case 'kb': ! $search_match_table = KB_MATCH_TABLE; ! $search_word_table = KB_WORD_TABLE; ! $db_key = 'article_id'; ! break; ! } ! ! $words_removed = false; ! ! switch ( SQL_LAYER ) ! { ! case 'mysql': ! case 'mysql4': ! $sql = "SELECT word_id ! FROM " . $search_match_table . " ! WHERE $db_key IN ($post_id_sql) ! GROUP BY word_id"; ! if ( $result = $db->sql_query($sql) ) ! { ! $word_id_sql = ''; ! while ( $row = $db->sql_fetchrow($result) ) ! { ! $word_id_sql .= ( $word_id_sql != '' ) ? ', ' . $row['word_id'] : $row['word_id']; ! } ! ! $sql = "SELECT word_id ! FROM " . $search_match_table . " ! WHERE word_id IN ($word_id_sql) ! GROUP BY word_id ! HAVING COUNT(word_id) = 1"; ! if ( $result = $db->sql_query($sql) ) ! { ! $word_id_sql = ''; ! while ( $row = $db->sql_fetchrow($result) ) ! { ! $word_id_sql .= ( $word_id_sql != '' ) ? ', ' . $row['word_id'] : $row['word_id']; ! } ! ! if ( $word_id_sql != '' ) ! { ! $sql = "DELETE FROM " . $search_word_table . " ! WHERE word_id IN ($word_id_sql)"; ! if ( !$db->sql_query($sql) ) ! { ! mx_message_die(GENERAL_ERROR, 'Could not delete word list entry', '', __LINE__, __FILE__, $sql); ! } ! ! $words_removed = $db->sql_affectedrows(); ! } ! } ! } ! break; ! ! default: ! $sql = "DELETE FROM " . $search_word_table . " ! WHERE word_id IN ( ! SELECT word_id ! FROM " . $search_match_table . " ! WHERE word_id IN ( ! SELECT word_id ! FROM " . $search_match_table . " ! WHERE $db_key IN ($post_id_sql) ! GROUP BY word_id ! ) ! GROUP BY word_id ! HAVING COUNT(word_id) = 1 ! )"; ! if ( !$db->sql_query($sql) ) ! { ! mx_message_die(GENERAL_ERROR, 'Could not delete old words from word table', '', __LINE__, __FILE__, $sql); ! } ! ! $words_removed = $db->sql_affectedrows(); ! ! break; ! } ! ! $sql = "DELETE FROM " . $search_match_table . " ! WHERE $db_key IN ($post_id_sql)"; ! if ( !$db->sql_query($sql) ) ! { ! mx_message_die(GENERAL_ERROR, 'Error in deleting post', '', __LINE__, __FILE__, $sql); ! } ! ! return $words_removed; ! } ! } ! ! if ( !function_exists(mx_do_install_upgrade) ) ! { ! // Generating output ! ! function mx_do_install_upgrade( $sql = '', $main_install = false ) ! { ! global $table_prefix, $mx_table_prefix, $userdata, $phpEx, $template, $lang, $db, $board_config, $HTTP_POST_VARS; ! ! $inst_error = false; ! $n = 0; ! $message = "<b>This is the result list of the SQL queries needed for the install/upgrade</b><br /><br />"; ! ! while ( $sql[$n] ) ! { ! if ( !$result = $db->sql_query( $sql[$n] ) ) ! { ! $message .= '<b><font color=#FF0000>[Error or Already added]</font></b> line: ' . ( $n + 1 ) . ' , ' . $sql[$n] . '<br />'; ! $inst_error = true; ! } ! else ! { ! $message .= '<b><font color=#0000fF>[Added/Updated]</font></b> line: ' . ( $n + 1 ) . ' , ' . $sql[$n] . '<br />'; ! } ! $n++; ! } ! $message .= '<br /> If you get some Errors, Already Added or Updated messages, relax, this is normal when updating modules'; ! ! if ( $main_install ) ! { ! if ( !$inst_error ) ! { ! $message .= '-> no db errors :-)<br /><br /><b>Portal installed successfully! </b><hr><br /><br />'; ! $message .= '1) Now, delete the /install and /contrib folders!!!<br /><br />'; ! $message .= '2) If you haven\'t already done a db backup, now is the time ;)<br /><br />'; ! $message .= '3) Then (after step 1), you HAVE to configure MX core and its modules from within the adminCP, simply \'upgrade\' MX portal Core and all modules in use!!!<br /><br />'; ! ! $message .= 'Click <a href=../admin/admin_mx_module.php>Here</a> to administer/upgrade the portal/modules. You will be promted for an admin username and pass. The upgrade process provide informative output...'; ! } ! else ! { ! $message .= '<br /><br /><b>Portal installed successfully (with some warnings)! </b><hr><br /><br />'; ! $message .= '1) Now, delete the /install and /contrib folders!!!<br /><br />'; ! $message .= '2) If you haven\'t already done a db backup, now is the time ;)<br /><br />'; ! $message .= '3) Now (after step 1), you HAVE to configure MX core and its modules from within the adminCP, simply \'upgrade\' MX portal Core and all modules in use!!!<br /><br />'; ! ! $message .= 'Click <a href=../admin/admin_mx_module.php>Here</a> to administer/upgrade the portal/modules. You will be promted for an admin username and pass. The upgrade process provide informative output...'; ! } ! } ! return $message; ! } ! } ?> \ No newline at end of file |
|
From: Jon O. <jon...@us...> - 2005-04-12 21:11:49
|
Update of /cvsroot/mxbb/mx_kb/includes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30151/modules/mx_kb/includes Modified Files: functions_kb_auth.php functions_kb_mx.php Log Message: i have renamed mx_auth_group_cache to mx_auth_group and removed old function with shorter name ;) ...to make it clearer Index: functions_kb_auth.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/includes/functions_kb_auth.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** functions_kb_auth.php 4 Feb 2005 23:44:31 -0000 1.1 --- functions_kb_auth.php 12 Apr 2005 21:11:31 -0000 1.2 *************** *** 1,278 **** ! <?php ! ! /** ------------------------------------------------------------------------ ! * subject : mx-portal module ! * begin : june, 2002 ! * copyright : (C) 2002-2005 MX-System ! * email : jon...@ho... ! * project site : www.mx-system.com ! * ! * description : ! * ! */ ! ! /** ! * 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' ); ! } ! ! function kb_auth( $type, $cat_id, $userdata, $f_access = '', $f_access_group = '' ) ! { ! global $db, $lang; ! ! switch ( $type ) ! { ! case AUTH_ALL: ! $a_sql = 'a.auth_view, a.auth_post, a.auth_rate, a.auth_comment, a.auth_edit, a.auth_delete, a.auth_approval, a.auth_approval_edit'; ! $a_sql_groups = 'a.auth_view_groups, a.auth_post_groups, a.auth_rate_groups, a.auth_comment_groups, a.auth_edit_groups, a.auth_delete_groups, a.auth_approval_groups, a.auth_approval_edit_groups'; ! $auth_fields = array( 'auth_view', 'auth_post', 'auth_rate', 'auth_comment', 'auth_edit', 'auth_delete', 'auth_approval', 'auth_approval_edit' ); ! $auth_fields_groups = array( 'auth_view_groups', 'auth_post_groups', 'auth_rate_groups', 'auth_comment_groups', 'auth_edit_groups', 'auth_delete_groups', 'auth_approval_groups', 'auth_approval_edit_groups' ); ! break; ! ! case AUTH_VIEW: ! $a_sql = 'a.auth_view'; ! $a_sql_groups = 'a.auth_view_groups'; ! $auth_fields = array( 'auth_view' ); ! $auth_fields_groups = array( 'auth_view_groups' ); ! break; ! ! case AUTH_POST: ! $a_sql = 'a.auth_post'; ! $a_sql_groups = 'a.auth_post_groups'; ! $auth_fields = array( 'auth_post' ); ! $auth_fields_groups = array( 'auth_post_groups' ); ! break; ! ! case AUTH_RATE: ! $a_sql = 'a.auth_rate'; ! $a_sql_groups = 'a.auth_rate_groups'; ! $auth_fields = array( 'auth_rate' ); ! $auth_fields_groups = array( 'auth_rate_groups' ); ! break; ! ! case AUTH_COMMENT: ! $a_sql = 'a.auth_comment'; ! $a_sql_groups = 'a.auth_comment_groups'; ! $auth_fields = array( 'auth_comment' ); ! $auth_fields_groups = array( 'auth_comment_groups' ); ! break; ! ! case AUTH_EDIT: ! $a_sql = 'a.auth_edit'; ! $a_sql_groups = 'a.auth_edit_groups'; ! $auth_fields = array( 'auth_edit' ); ! $auth_fields_groups = array( 'auth_edit_groups' ); ! break; ! ! case AUTH_DELETE: ! $a_sql = 'a.auth_delete'; ! $a_sql_groups = 'a.auth_delete_groups'; ! $auth_fields = array( 'auth_delete' ); ! $auth_fields_groups = array( 'auth_delete_groups' ); ! break; ! ! case AUTH_APPROVAL: ! $a_sql = 'a.auth_approval'; ! $a_sql_groups = 'a.auth_approval_groups'; ! $auth_fields = array( 'auth_approval' ); ! $auth_fields_groups = array( 'auth_approval_groups' ); ! break; ! ! case AUTH_APPROVAL_EDIT: ! $a_sql = 'a.auth_approval_edit'; ! $a_sql_groups = 'a.auth_approval_edit_groups'; ! $auth_fields = array( 'auth_approval_edit' ); ! $auth_fields_groups = array( 'auth_approval_edit_groups' ); ! break; ! ! default: ! break; ! } ! ! $is_admin = ( $userdata['user_level'] == ADMIN && $userdata['session_logged_in'] ) ? true : 0; ! ! // ! // If f_access has not been passed, or auth is needed to return an array of forums ! // then we need to pull the auth information on the given forum (or all forums) ! // ! if ( empty($f_access) ) ! { ! $forum_match_sql = ( $cat_id != AUTH_LIST_ALL ) ? "WHERE a.category_id = $cat_id" : ''; ! ! $sql = "SELECT a.category_id, $a_sql ! FROM " . KB_CATEGORIES_TABLE . " a ! $forum_match_sql"; ! if ( !($result = $db->sql_query($sql)) ) ! { ! message_die(GENERAL_ERROR, 'Failed obtaining forum access control lists', '', __LINE__, __FILE__, $sql); ! } ! ! $sql_fetchrow = ( $cat_id != AUTH_LIST_ALL ) ? 'sql_fetchrow' : 'sql_fetchrowset'; ! ! if ( !($f_access = $db->$sql_fetchrow($result)) ) ! { ! $db->sql_freeresult($result); ! return array(); ! } ! $db->sql_freeresult($result); ! } ! ! // ! // If f_access_group has not been passed, or auth is needed to return an array of forums ! // then we need to pull the auth information on the given forum (or all forums) ! // ! if ( empty($f_access_group) ) ! { ! $forum_match_sql = ( $cat_id != AUTH_LIST_ALL ) ? "WHERE a.category_id = $cat_id" : ''; ! ! $sql = "SELECT a.category_id, $a_sql_groups, a.auth_moderator_groups ! FROM " . KB_CATEGORIES_TABLE . " a ! $forum_match_sql"; ! if ( !($result = $db->sql_query($sql)) ) ! { ! message_die(GENERAL_ERROR, 'Failed obtaining forum access control lists', '', __LINE__, __FILE__, $sql); ! } ! ! $sql_fetchrow = ( $cat_id != AUTH_LIST_ALL ) ? 'sql_fetchrow' : 'sql_fetchrowset'; ! ! if ( !($f_access_group = $db->$sql_fetchrow($result)) ) ! { ! $db->sql_freeresult($result); ! return array(); ! } ! $db->sql_freeresult($result); ! } ! ! $auth_user = array(); ! for( $i = 0; $i < count( $auth_fields ); $i++ ) ! { ! $key = $auth_fields[$i]; ! $key_groups = $auth_fields_groups[$i]; ! // If the user is logged on and the module type is either ALL or REG then the user has access ! // If the type if ACL, MOD or ADMIN then we need to see if the user has specific permissions ! // to do whatever it is they want to do ... to do this we pull relevant information for the ! // user (and any groups they belong to) ! // Now we compare the users access level against the modules. We assume here that a moderator ! // and admin automatically have access to an ACL module, similarly we assume admins meet an ! // auth requirement of MOD ! ! if ( $cat_id != AUTH_LIST_ALL ) ! { ! $value = $f_access[$key]; ! $value_groups = $f_access_group[$key_groups]; ! ! switch ( $value ) ! { ! case AUTH_ALL: ! $auth_user[$key] = true; ! $auth_user[$key . '_type'] = $lang['Auth_Anonymous_users']; ! break; ! ! case AUTH_REG: ! $auth_user[$key] = ( $userdata['session_logged_in'] ) ? true : 0; ! $auth_user[$key . '_type'] = $lang['Auth_Registered_Users']; ! break; ! ! case AUTH_ANONYMOUS: ! $auth_user[$key] = ( ! $userdata['session_logged_in'] ) ? true : 0; ! $auth_user[$key . '_type'] = $lang['Auth_Anonymous_users']; ! break; ! ! case AUTH_ACL: // PRIVATE ! $auth_user[$key] = ( $userdata['session_logged_in'] ) ? mx_auth_group_cache( $value_groups ) || $is_admin : 0; ! $auth_user[$key . '_type'] = $lang['Auth_Users_granted_access']; ! break; ! ! case AUTH_MOD: ! $auth_user[$key] = ( $userdata['session_logged_in'] ) ? mx_auth_group_cache( $f_access_group['auth_moderator_groups'] ) || $is_admin : 0; ! $auth_user[$key . '_type'] = $lang['Auth_Moderators']; ! break; ! ! case AUTH_ADMIN: ! $auth_user[$key] = $is_admin; ! $auth_user[$key . '_type'] = $lang['Auth_Administrators']; ! break; ! ! default: ! $auth_user[$key] = 0; ! break; ! } ! } ! else ! { ! for($k = 0; $k < count($f_access); $k++) ! { ! $value = $f_access[$k][$key]; ! $value_groups = $f_access_group[$k][$key_groups]; ! ! $f_cat_id = $f_access[$k]['category_id']; ! ! ! switch ( $value ) ! { ! case AUTH_ALL: ! $auth_user[$f_cat_id][$key] = true; ! $auth_user[$f_cat_id][$key . '_type'] = $lang['Auth_Anonymous_users']; ! break; ! ! case AUTH_REG: ! $auth_user[$f_cat_id][$key] = ( $userdata['session_logged_in'] ) ? true : 0; ! $auth_user[$f_cat_id][$key . '_type'] = $lang['Auth_Registered_Users']; ! break; ! ! case AUTH_ANONYMOUS: ! $auth_user[$f_cat_id][$key] = ( ! $userdata['session_logged_in'] ) ? true : 0; ! $auth_user[$f_cat_id][$key . '_type'] = $lang['Auth_Anonymous_users']; ! break; ! ! case AUTH_ACL: // PRIVATE ! $auth_user[$f_cat_id][$key] = ( $userdata['session_logged_in'] ) ? mx_auth_group_cache( $value_groups ) || $is_admin : 0; ! $auth_user[$f_cat_id][$key . '_type'] = $lang['Auth_Users_granted_access']; ! break; ! ! case AUTH_MOD: ! $auth_user[$f_cat_id][$key] = ( $userdata['session_logged_in'] ) ? mx_auth_group_cache( $f_access_group[$k]['auth_moderator_groups'] ) || $is_admin : 0; ! $auth_user[$f_cat_id][$key . '_type'] = $lang['Auth_Moderators']; ! break; ! ! case AUTH_ADMIN: ! $auth_user[$f_cat_id][$key] = $is_admin; ! $auth_user[$f_cat_id][$key . '_type'] = $lang['Auth_Administrators']; ! break; ! ! default: ! $auth_user[$f_cat_id][$key] = 0; ! break; ! } ! } ! } ! } ! ! // ! // Is user a moderator? ! // ! if ( $cat_id != AUTH_LIST_ALL ) ! { ! $auth_user['auth_mod'] = ( $userdata['session_logged_in'] ) ? mx_auth_group_cache( $f_access_group['auth_moderator_groups'] ) || $is_admin : 0; ! } ! else ! { ! for($k = 0; $k < count($f_access); $k++) ! { ! $f_cat_id = $f_access[$k]['category_id']; ! ! $auth_user[$f_cat_id]['auth_mod'] = ( $userdata['session_logged_in'] ) ? mx_auth_group_cache( $f_access_group[$k]['auth_moderator_groups'] ) || $is_admin : 0; ! } ! } ! //die(var_export($auth_user)); ! return $auth_user; ! } ! ?> \ No newline at end of file --- 1,278 ---- ! <?php ! ! /** ------------------------------------------------------------------------ ! * subject : mx-portal module ! * begin : june, 2002 ! * copyright : (C) 2002-2005 MX-System ! * email : jon...@ho... ! * project site : www.mx-system.com ! * ! * description : ! * ! */ ! ! /** ! * 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' ); ! } ! ! function kb_auth( $type, $cat_id, $userdata, $f_access = '', $f_access_group = '' ) ! { ! global $db, $lang; ! ! switch ( $type ) ! { ! case AUTH_ALL: ! $a_sql = 'a.auth_view, a.auth_post, a.auth_rate, a.auth_comment, a.auth_edit, a.auth_delete, a.auth_approval, a.auth_approval_edit'; ! $a_sql_groups = 'a.auth_view_groups, a.auth_post_groups, a.auth_rate_groups, a.auth_comment_groups, a.auth_edit_groups, a.auth_delete_groups, a.auth_approval_groups, a.auth_approval_edit_groups'; ! $auth_fields = array( 'auth_view', 'auth_post', 'auth_rate', 'auth_comment', 'auth_edit', 'auth_delete', 'auth_approval', 'auth_approval_edit' ); ! $auth_fields_groups = array( 'auth_view_groups', 'auth_post_groups', 'auth_rate_groups', 'auth_comment_groups', 'auth_edit_groups', 'auth_delete_groups', 'auth_approval_groups', 'auth_approval_edit_groups' ); ! break; ! ! case AUTH_VIEW: ! $a_sql = 'a.auth_view'; ! $a_sql_groups = 'a.auth_view_groups'; ! $auth_fields = array( 'auth_view' ); ! $auth_fields_groups = array( 'auth_view_groups' ); ! break; ! ! case AUTH_POST: ! $a_sql = 'a.auth_post'; ! $a_sql_groups = 'a.auth_post_groups'; ! $auth_fields = array( 'auth_post' ); ! $auth_fields_groups = array( 'auth_post_groups' ); ! break; ! ! case AUTH_RATE: ! $a_sql = 'a.auth_rate'; ! $a_sql_groups = 'a.auth_rate_groups'; ! $auth_fields = array( 'auth_rate' ); ! $auth_fields_groups = array( 'auth_rate_groups' ); ! break; ! ! case AUTH_COMMENT: ! $a_sql = 'a.auth_comment'; ! $a_sql_groups = 'a.auth_comment_groups'; ! $auth_fields = array( 'auth_comment' ); ! $auth_fields_groups = array( 'auth_comment_groups' ); ! break; ! ! case AUTH_EDIT: ! $a_sql = 'a.auth_edit'; ! $a_sql_groups = 'a.auth_edit_groups'; ! $auth_fields = array( 'auth_edit' ); ! $auth_fields_groups = array( 'auth_edit_groups' ); ! break; ! ! case AUTH_DELETE: ! $a_sql = 'a.auth_delete'; ! $a_sql_groups = 'a.auth_delete_groups'; ! $auth_fields = array( 'auth_delete' ); ! $auth_fields_groups = array( 'auth_delete_groups' ); ! break; ! ! case AUTH_APPROVAL: ! $a_sql = 'a.auth_approval'; ! $a_sql_groups = 'a.auth_approval_groups'; ! $auth_fields = array( 'auth_approval' ); ! $auth_fields_groups = array( 'auth_approval_groups' ); ! break; ! ! case AUTH_APPROVAL_EDIT: ! $a_sql = 'a.auth_approval_edit'; ! $a_sql_groups = 'a.auth_approval_edit_groups'; ! $auth_fields = array( 'auth_approval_edit' ); ! $auth_fields_groups = array( 'auth_approval_edit_groups' ); ! break; ! ! default: ! break; ! } ! ! $is_admin = ( $userdata['user_level'] == ADMIN && $userdata['session_logged_in'] ) ? true : 0; ! ! // ! // If f_access has not been passed, or auth is needed to return an array of forums ! // then we need to pull the auth information on the given forum (or all forums) ! // ! if ( empty($f_access) ) ! { ! $forum_match_sql = ( $cat_id != AUTH_LIST_ALL ) ? "WHERE a.category_id = $cat_id" : ''; ! ! $sql = "SELECT a.category_id, $a_sql ! FROM " . KB_CATEGORIES_TABLE . " a ! $forum_match_sql"; ! if ( !($result = $db->sql_query($sql)) ) ! { ! message_die(GENERAL_ERROR, 'Failed obtaining forum access control lists', '', __LINE__, __FILE__, $sql); ! } ! ! $sql_fetchrow = ( $cat_id != AUTH_LIST_ALL ) ? 'sql_fetchrow' : 'sql_fetchrowset'; ! ! if ( !($f_access = $db->$sql_fetchrow($result)) ) ! { ! $db->sql_freeresult($result); ! return array(); ! } ! $db->sql_freeresult($result); ! } ! ! // ! // If f_access_group has not been passed, or auth is needed to return an array of forums ! // then we need to pull the auth information on the given forum (or all forums) ! // ! if ( empty($f_access_group) ) ! { ! $forum_match_sql = ( $cat_id != AUTH_LIST_ALL ) ? "WHERE a.category_id = $cat_id" : ''; ! ! $sql = "SELECT a.category_id, $a_sql_groups, a.auth_moderator_groups ! FROM " . KB_CATEGORIES_TABLE . " a ! $forum_match_sql"; ! if ( !($result = $db->sql_query($sql)) ) ! { ! message_die(GENERAL_ERROR, 'Failed obtaining forum access control lists', '', __LINE__, __FILE__, $sql); ! } ! ! $sql_fetchrow = ( $cat_id != AUTH_LIST_ALL ) ? 'sql_fetchrow' : 'sql_fetchrowset'; ! ! if ( !($f_access_group = $db->$sql_fetchrow($result)) ) ! { ! $db->sql_freeresult($result); ! return array(); ! } ! $db->sql_freeresult($result); ! } ! ! $auth_user = array(); ! for( $i = 0; $i < count( $auth_fields ); $i++ ) ! { ! $key = $auth_fields[$i]; ! $key_groups = $auth_fields_groups[$i]; ! // If the user is logged on and the module type is either ALL or REG then the user has access ! // If the type if ACL, MOD or ADMIN then we need to see if the user has specific permissions ! // to do whatever it is they want to do ... to do this we pull relevant information for the ! // user (and any groups they belong to) ! // Now we compare the users access level against the modules. We assume here that a moderator ! // and admin automatically have access to an ACL module, similarly we assume admins meet an ! // auth requirement of MOD ! ! if ( $cat_id != AUTH_LIST_ALL ) ! { ! $value = $f_access[$key]; ! $value_groups = $f_access_group[$key_groups]; ! ! switch ( $value ) ! { ! case AUTH_ALL: ! $auth_user[$key] = true; ! $auth_user[$key . '_type'] = $lang['Auth_Anonymous_users']; ! break; ! ! case AUTH_REG: ! $auth_user[$key] = ( $userdata['session_logged_in'] ) ? true : 0; ! $auth_user[$key . '_type'] = $lang['Auth_Registered_Users']; ! break; ! ! case AUTH_ANONYMOUS: ! $auth_user[$key] = ( ! $userdata['session_logged_in'] ) ? true : 0; ! $auth_user[$key . '_type'] = $lang['Auth_Anonymous_users']; ! break; ! ! case AUTH_ACL: // PRIVATE ! $auth_user[$key] = ( $userdata['session_logged_in'] ) ? mx_auth_group( $value_groups ) || $is_admin : 0; ! $auth_user[$key . '_type'] = $lang['Auth_Users_granted_access']; ! break; ! ! case AUTH_MOD: ! $auth_user[$key] = ( $userdata['session_logged_in'] ) ? mx_auth_group( $f_access_group['auth_moderator_groups'] ) || $is_admin : 0; ! $auth_user[$key . '_type'] = $lang['Auth_Moderators']; ! break; ! ! case AUTH_ADMIN: ! $auth_user[$key] = $is_admin; ! $auth_user[$key . '_type'] = $lang['Auth_Administrators']; ! break; ! ! default: ! $auth_user[$key] = 0; ! break; ! } ! } ! else ! { ! for($k = 0; $k < count($f_access); $k++) ! { ! $value = $f_access[$k][$key]; ! $value_groups = $f_access_group[$k][$key_groups]; ! ! $f_cat_id = $f_access[$k]['category_id']; ! ! ! switch ( $value ) ! { ! case AUTH_ALL: ! $auth_user[$f_cat_id][$key] = true; ! $auth_user[$f_cat_id][$key . '_type'] = $lang['Auth_Anonymous_users']; ! break; ! ! case AUTH_REG: ! $auth_user[$f_cat_id][$key] = ( $userdata['session_logged_in'] ) ? true : 0; ! $auth_user[$f_cat_id][$key . '_type'] = $lang['Auth_Registered_Users']; ! break; ! ! case AUTH_ANONYMOUS: ! $auth_user[$f_cat_id][$key] = ( ! $userdata['session_logged_in'] ) ? true : 0; ! $auth_user[$f_cat_id][$key . '_type'] = $lang['Auth_Anonymous_users']; ! break; ! ! case AUTH_ACL: // PRIVATE ! $auth_user[$f_cat_id][$key] = ( $userdata['session_logged_in'] ) ? mx_auth_group( $value_groups ) || $is_admin : 0; ! $auth_user[$f_cat_id][$key . '_type'] = $lang['Auth_Users_granted_access']; ! break; ! ! case AUTH_MOD: ! $auth_user[$f_cat_id][$key] = ( $userdata['session_logged_in'] ) ? mx_auth_group( $f_access_group[$k]['auth_moderator_groups'] ) || $is_admin : 0; ! $auth_user[$f_cat_id][$key . '_type'] = $lang['Auth_Moderators']; ! break; ! ! case AUTH_ADMIN: ! $auth_user[$f_cat_id][$key] = $is_admin; ! $auth_user[$f_cat_id][$key . '_type'] = $lang['Auth_Administrators']; ! break; ! ! default: ! $auth_user[$f_cat_id][$key] = 0; ! break; ! } ! } ! } ! } ! ! // ! // Is user a moderator? ! // ! if ( $cat_id != AUTH_LIST_ALL ) ! { ! $auth_user['auth_mod'] = ( $userdata['session_logged_in'] ) ? mx_auth_group( $f_access_group['auth_moderator_groups'] ) || $is_admin : 0; ! } ! else ! { ! for($k = 0; $k < count($f_access); $k++) ! { ! $f_cat_id = $f_access[$k]['category_id']; ! ! $auth_user[$f_cat_id]['auth_mod'] = ( $userdata['session_logged_in'] ) ? mx_auth_group( $f_access_group[$k]['auth_moderator_groups'] ) || $is_admin : 0; ! } ! } ! //die(var_export($auth_user)); ! return $auth_user; ! } ! ?> \ No newline at end of file Index: functions_kb_mx.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/includes/functions_kb_mx.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** functions_kb_mx.php 9 Apr 2005 21:41:28 -0000 1.3 --- functions_kb_mx.php 12 Apr 2005 21:11:32 -0000 1.4 *************** *** 1,469 **** ! <?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$ ! */ ! ! /** ! * 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 ( !function_exists( mx_smilies_pass ) ) ! { ! function mx_smilies_pass($message) ! { ! global $board_config; ! $smilies_path = $board_config['smilies_path']; ! $board_config['smilies_path'] = PHPBB_URL . $board_config['smilies_path']; ! $message = smilies_pass($message); ! $board_config['smilies_path'] = $smilies_path; ! return $message; ! } ! } ! ! if ( !function_exists( mx_generate_smilies ) ) ! { ! function mx_generate_smilies($mode, $page_id) ! { ! global $board_config, $template, $phpEx; ! $smilies_path = $board_config['smilies_path']; ! $board_config['smilies_path'] = PHPBB_URL . $board_config['smilies_path']; ! generate_smilies($mode, $page_id); ! $board_config['smilies_path'] = $smilies_path; ! $template->assign_vars(array( ! 'U_MORE_SMILIES' => append_sid(PHPBB_URL . "posting.$phpEx?mode=smilies")) ! ); ! } ! } ! ! if ( !function_exists( mx_message_die ) ) ! { ! ! function mx_message_die($msg_code, $msg_text = '', $msg_title = '', $err_line = '', $err_file = '', $sql = '') ! { ! global $db, $template, $board_config, $theme, $lang, $phpEx, $phpbb_root_path, $nav_links, $gen_simple_header, $images; ! global $userdata, $user_ip, $session_length; ! global $starttime; ! ! message_die($msg_code, $msg_text, $msg_title, $err_line, $err_file, $sql); ! } ! ! } ! ! if ( !function_exists( mx_auth_group_cache ) ) ! { ! // Validates if user belongs to group included in group_ids list ! // Also, adds all usergroups to userdata array ! function mx_auth_group_cache( $group_ids = '', $group_mod_mode = false ) ! { ! global $userdata, $db; ! ! if ( $group_ids == '' ) ! { ! return false; ! } ! ! $group_ids_array = explode(",", $group_ids); ! ! // Try to reuse usergroups result. ! if ( $group_mod_mode ) ! { ! $userdata_key = 'mx_usergroups_mod' . $userdata['user_id']; ! ! if ( empty( $userdata[$userdata_key] ) ) ! { ! // Check if user is group moderator.. ! $sql = "SELECT gr.group_id ! FROM " . GROUPS_TABLE . " gr, ! " . USER_GROUP_TABLE . " ugr ! WHERE gr.group_id = ugr.group_id ! AND gr.group_moderator = '" . $userdata['user_id'] . "' ! AND ugr.user_pending = '0' "; ! ! if ( !( $result = $db->sql_query( $sql ) ) ) ! { ! message_die( GENERAL_ERROR, "Could not query group rights information", '', '', '', '' ); ! } ! ! $group_row = $db->sql_fetchrowset( $result ); ! ! $userdata[$userdata_key_mod] = $group_row; ! } ! } ! else ! { ! $userdata_key = 'mx_usergroups' . $userdata['user_id']; ! ! if ( empty( $userdata[$userdata_key] ) ) ! { ! // Check if user is member of the proper group.. ! $sql = "SELECT group_id FROM " . USER_GROUP_TABLE . " WHERE user_id='" . $userdata['user_id'] . "' AND user_pending = 0"; ! ! if ( !( $result = $db->sql_query( $sql ) ) ) ! { ! message_die( GENERAL_ERROR, "Could not query group rights information", '', '', '', '' ); ! } ! ! $group_row = $db->sql_fetchrowset( $result ); ! ! $userdata[$userdata_key] = $group_row; ! } ! } ! ! for ( $i = 0; $i < count( $userdata[$userdata_key] ); $i++ ) ! { ! if ( in_array( $userdata[$userdata_key][$i]['group_id'], $group_ids_array ) ) ! { ! $is_member = true; ! return $is_member; ! } ! } ! ! return false; ! } ! } ! ! if ( !function_exists( mx_add_search_words ) ) ! { ! // Add search words for blocks ! function mx_add_search_words($mode, $post_id, $post_text, $post_title = '', $mx_mode = 'mx') ! { ! global $db, $phpbb_root_path, $board_config, $lang; ! ! // $search_match_table = SEARCH_MATCH_TABLE; ! // $search_word_table = SEARCH_WORD_TABLE; ! ! switch ( $mx_mode ) ! { ! case 'mx': ! $search_match_table = MX_MATCH_TABLE; ! $search_word_table = MX_WORD_TABLE; ! $db_key = 'block_id'; ! break; ! case 'kb': ! $search_match_table = KB_MATCH_TABLE; ! $search_word_table = KB_WORD_TABLE; ! $db_key = 'article_id'; ! break; ! } ! ! $stopword_array = @file($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . "/search_stopwords.txt"); ! $synonym_array = @file($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . "/search_synonyms.txt"); ! ! $search_raw_words = array(); ! $search_raw_words['text'] = split_words(clean_words('post', $post_text, $stopword_array, $synonym_array)); ! $search_raw_words['title'] = split_words(clean_words('post', $post_title, $stopword_array, $synonym_array)); ! ! @set_time_limit(0); ! ! $word = array(); ! $word_insert_sql = array(); ! while ( list($word_in, $search_matches) = @each($search_raw_words) ) ! { ! $word_insert_sql[$word_in] = ''; ! if ( !empty($search_matches) ) ! { ! for ($i = 0; $i < count($search_matches); $i++) ! { ! $search_matches[$i] = trim($search_matches[$i]); ! ! if( $search_matches[$i] != '' ) ! { ! $word[] = $search_matches[$i]; ! if ( !strstr($word_insert_sql[$word_in], "'" . $search_matches[$i] . "'") ) ! { ! $word_insert_sql[$word_in] .= ( $word_insert_sql[$word_in] != "" ) ? ", '" . $search_matches[$i] . "'" : "'" . $search_matches[$i] . "'"; ! } ! } ! } ! } ! } ! ! if ( count($word) ) ! { ! sort($word); ! ! $prev_word = ''; ! $word_text_sql = ''; ! $temp_word = array(); ! for($i = 0; $i < count($word); $i++) ! { ! if ( $word[$i] != $prev_word ) ! { ! $temp_word[] = $word[$i]; ! $word_text_sql .= ( ( $word_text_sql != '' ) ? ', ' : '' ) . "'" . $word[$i] . "'"; ! } ! $prev_word = $word[$i]; ! } ! $word = $temp_word; ! ! $check_words = array(); ! switch( SQL_LAYER ) ! { ! case 'postgresql': ! case 'msaccess': ! case 'mssql-odbc': ! case 'oracle': ! case 'db2': ! $sql = "SELECT word_id, word_text ! FROM " . $search_word_table . " ! WHERE word_text IN ($word_text_sql)"; ! if ( !($result = $db->sql_query($sql)) ) ! { ! mx_message_die(GENERAL_ERROR, 'Could not select words', '', __LINE__, __FILE__, $sql); ! } ! ! while ( $row = $db->sql_fetchrow($result) ) ! { ! $check_words[$row['word_text']] = $row['word_id']; ! } ! break; ! } ! ! $value_sql = ''; ! $match_word = array(); ! for ($i = 0; $i < count($word); $i++) ! { ! $new_match = true; ! if ( isset($check_words[$word[$i]]) ) ! { ! $new_match = false; ! } ! ! if ( $new_match ) ! { ! switch( SQL_LAYER ) ! { ! case 'mysql': ! case 'mysql4': ! $value_sql .= ( ( $value_sql != '' ) ? ', ' : '' ) . '(\'' . $word[$i] . '\', 0)'; ! break; ! case 'mssql': ! case 'mssql-odbc': ! $value_sql .= ( ( $value_sql != '' ) ? ' UNION ALL ' : '' ) . "SELECT '" . $word[$i] . "', 0"; ! break; ! default: ! $sql = "INSERT INTO " . $search_word_table . " (word_text, word_common) ! VALUES ('" . $word[$i] . "', 0)"; ! if( !$db->sql_query($sql) ) ! { ! mx_message_die(GENERAL_ERROR, 'Could not insert new word', '', __LINE__, __FILE__, $sql); ! } ! break; ! } ! } ! } ! ! if ( $value_sql != '' ) ! { ! switch ( SQL_LAYER ) ! { ! case 'mysql': ! case 'mysql4': ! $sql = "INSERT IGNORE INTO " . $search_word_table . " (word_text, word_common) ! VALUES $value_sql"; ! break; ! case 'mssql': ! case 'mssql-odbc': ! $sql = "INSERT INTO " . $search_word_table . " (word_text, word_common) ! $value_sql"; ! break; ! } ! ! if ( !$db->sql_query($sql) ) ! { ! mx_message_die(GENERAL_ERROR, 'Could not insert new word', '', __LINE__, __FILE__, $sql); ! } ! } ! } ! ! while( list($word_in, $match_sql) = @each($word_insert_sql) ) ! { ! $title_match = ( $word_in == 'title' ) ? 1 : 0; ! ! if ( $match_sql != '' ) ! { ! $sql = "INSERT INTO " . $search_match_table . " ($db_key, word_id, title_match) ! SELECT $post_id, word_id, $title_match ! FROM " . $search_word_table . " ! WHERE word_text IN ($match_sql)"; ! if ( !$db->sql_query($sql) ) ! { ! mx_message_die(GENERAL_ERROR, 'Could not insert new word matches', '', __LINE__, __FILE__, $sql); ! } ! } ! } ! ! if ($mode == 'single') ! { ! // remove_common('single', 4/10, $word); ! } ! ! return; ! } ! ! function mx_remove_search_post($post_id_sql, $mx_mode = 'mx') ! { ! global $db; ! ! // $search_match_table = SEARCH_MATCH_TABLE; ! // $search_word_table = SEARCH_WORD_TABLE; ! ! switch ( $mx_mode ) ! { ! case 'mx': ! $search_match_table = MX_MATCH_TABLE; ! $search_word_table = MX_WORD_TABLE; ! $db_key = 'block_id'; ! break; ! case 'kb': ! $search_match_table = KB_MATCH_TABLE; ! $search_word_table = KB_WORD_TABLE; ! $db_key = 'article_id'; ! break; ! } ! ! $words_removed = false; ! ! switch ( SQL_LAYER ) ! { ! case 'mysql': ! case 'mysql4': ! $sql = "SELECT word_id ! FROM " . $search_match_table . " ! WHERE $db_key IN ($post_id_sql) ! GROUP BY word_id"; ! if ( $result = $db->sql_query($sql) ) ! { ! $word_id_sql = ''; ! while ( $row = $db->sql_fetchrow($result) ) ! { ! $word_id_sql .= ( $word_id_sql != '' ) ? ', ' . $row['word_id'] : $row['word_id']; ! } ! ! $sql = "SELECT word_id ! FROM " . $search_match_table . " ! WHERE word_id IN ($word_id_sql) ! GROUP BY word_id ! HAVING COUNT(word_id) = 1"; ! if ( $result = $db->sql_query($sql) ) ! { ! $word_id_sql = ''; ! while ( $row = $db->sql_fetchrow($result) ) ! { ! $word_id_sql .= ( $word_id_sql != '' ) ? ', ' . $row['word_id'] : $row['word_id']; ! } ! ! if ( $word_id_sql != '' ) ! { ! $sql = "DELETE FROM " . $search_word_table . " ! WHERE word_id IN ($word_id_sql)"; ! if ( !$db->sql_query($sql) ) ! { ! mx_message_die(GENERAL_ERROR, 'Could not delete word list entry', '', __LINE__, __FILE__, $sql); ! } ! ! $words_removed = $db->sql_affectedrows(); ! } ! } ! } ! break; ! ! default: ! $sql = "DELETE FROM " . $search_word_table . " ! WHERE word_id IN ( ! SELECT word_id ! FROM " . $search_match_table . " ! WHERE word_id IN ( ! SELECT word_id ! FROM " . $search_match_table . " ! WHERE $db_key IN ($post_id_sql) ! GROUP BY word_id ! ) ! GROUP BY word_id ! HAVING COUNT(word_id) = 1 ! )"; ! if ( !$db->sql_query($sql) ) ! { ! mx_message_die(GENERAL_ERROR, 'Could not delete old words from word table', '', __LINE__, __FILE__, $sql); ! } ! ! $words_removed = $db->sql_affectedrows(); ! ! break; ! } ! ! $sql = "DELETE FROM " . $search_match_table . " ! WHERE $db_key IN ($post_id_sql)"; ! if ( !$db->sql_query($sql) ) ! { ! mx_message_die(GENERAL_ERROR, 'Error in deleting post', '', __LINE__, __FILE__, $sql); ! } ! ! return $words_removed; ! } ! } ! ! if ( !function_exists(mx_do_install_upgrade) ) ! { ! // Generating output ! ! function mx_do_install_upgrade( $sql = '', $main_install = false ) ! { ! global $table_prefix, $mx_table_prefix, $userdata, $phpEx, $template, $lang, $db, $board_config, $HTTP_POST_VARS; ! ! $inst_error = false; ! $n = 0; ! $message = "<b>This is the result list of the SQL queries needed for the install/upgrade</b><br /><br />"; ! ! while ( $sql[$n] ) ! { ! if ( !$result = $db->sql_query( $sql[$n] ) ) ! { ! $message .= '<b><font color=#FF0000>[Error or Already added]</font></b> line: ' . ( $n + 1 ) . ' , ' . $sql[$n] . '<br />'; ! $inst_error = true; ! } ! else ! { ! $message .= '<b><font color=#0000fF>[Added/Updated]</font></b> line: ' . ( $n + 1 ) . ' , ' . $sql[$n] . '<br />'; ! } ! $n++; ! } ! $message .= '<br /> If you get some Errors, Already Added or Updated messages, relax, this is normal when updating modules'; ! ! if ( $main_install ) ! { ! if ( !$inst_error ) ! { ! $message .= '-> no db errors :-)<br /><br /><b>Portal installed successfully! </b><hr><br /><br />'; ! $message .= '1) Now, delete the /install and /contrib folders!!!<br /><br />'; ! $message .= '2) If you haven\'t already done a db backup, now is the time ;)<br /><br />'; ! $message .= '3) Then (after step 1), you HAVE to configure MX core and its modules from within the adminCP, simply \'upgrade\' MX portal Core and all modules in use!!!<br /><br />'; ! ! $message .= 'Click <a href=../admin/admin_mx_module.php>Here</a> to administer/upgrade the portal/modules. You will be promted for an admin username and pass. The upgrade process provide informative output...'; ! } ! else ! { ! $message .= '<br /><br /><b>Portal installed successfully (with some warnings)! </b><hr><br /><br />'; ! $message .= '1) Now, delete the /install and /contrib folders!!!<br /><br />'; ! $message .= '2) If you haven\'t already done a db backup, now is the time ;)<br /><br />'; ! $message .= '3) Now (after step 1), you HAVE to configure MX core and its modules from within the adminCP, simply \'upgrade\' MX portal Core and all modules in use!!!<br /><br />'; ! ! $message .= 'Click <a href=../admin/admin_mx_module.php>Here</a> to administer/upgrade the portal/modules. You will be promted for an admin username and pass. The upgrade process provide informative output...'; ! } ! } ! return $message; ! } ! } ?> \ No newline at end of file --- 1,469 ---- ! <?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$ ! */ ! ! /** ! * 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 ( !function_exists( mx_smilies_pass ) ) ! { ! function mx_smilies_pass($message) ! { ! global $board_config; ! $smilies_path = $board_config['smilies_path']; ! $board_config['smilies_path'] = PHPBB_URL . $board_config['smilies_path']; ! $message = smilies_pass($message); ! $board_config['smilies_path'] = $smilies_path; ! return $message; ! } ! } ! ! if ( !function_exists( mx_generate_smilies ) ) ! { ! function mx_generate_smilies($mode, $page_id) ! { ! global $board_config, $template, $phpEx; ! $smilies_path = $board_config['smilies_path']; ! $board_config['smilies_path'] = PHPBB_URL . $board_config['smilies_path']; ! generate_smilies($mode, $page_id); ! $board_config['smilies_path'] = $smilies_path; ! $template->assign_vars(array( ! 'U_MORE_SMILIES' => append_sid(PHPBB_URL . "posting.$phpEx?mode=smilies")) ! ); ! } ! } ! ! if ( !function_exists( mx_message_die ) ) ! { ! ! function mx_message_die($msg_code, $msg_text = '', $msg_title = '', $err_line = '', $err_file = '', $sql = '') ! { ! global $db, $template, $board_config, $theme, $lang, $phpEx, $phpbb_root_path, $nav_links, $gen_simple_header, $images; ! global $userdata, $user_ip, $session_length; ! global $starttime; ! ! message_die($msg_code, $msg_text, $msg_title, $err_line, $err_file, $sql); ! } ! ! } ! ! if ( !function_exists( mx_auth_group ) ) ! { ! // Validates if user belongs to group included in group_ids list ! // Also, adds all usergroups to userdata array ! function mx_auth_group( $group_ids = '', $group_mod_mode = false ) ! { ! global $userdata, $db; ! ! if ( $group_ids == '' ) ! { ! return false; ! } ! ! $group_ids_array = explode(",", $group_ids); ! ! // Try to reuse usergroups result. ! if ( $group_mod_mode ) ! { ! $userdata_key = 'mx_usergroups_mod' . $userdata['user_id']; ! ! if ( empty( $userdata[$userdata_key] ) ) ! { ! // Check if user is group moderator.. ! $sql = "SELECT gr.group_id ! FROM " . GROUPS_TABLE . " gr, ! " . USER_GROUP_TABLE . " ugr ! WHERE gr.group_id = ugr.group_id ! AND gr.group_moderator = '" . $userdata['user_id'] . "' ! AND ugr.user_pending = '0' "; ! ! if ( !( $result = $db->sql_query( $sql ) ) ) ! { ! message_die( GENERAL_ERROR, "Could not query group rights information", '', '', '', '' ); ! } ! ! $group_row = $db->sql_fetchrowset( $result ); ! ! $userdata[$userdata_key_mod] = $group_row; ! } ! } ! else ! { ! $userdata_key = 'mx_usergroups' . $userdata['user_id']; ! ! if ( empty( $userdata[$userdata_key] ) ) ! { ! // Check if user is member of the proper group.. ! $sql = "SELECT group_id FROM " . USER_GROUP_TABLE . " WHERE user_id='" . $userdata['user_id'] . "' AND user_pending = 0"; ! ! if ( !( $result = $db->sql_query( $sql ) ) ) ! { ! message_die( GENERAL_ERROR, "Could not query group rights information", '', '', '', '' ); ! } ! ! $group_row = $db->sql_fetchrowset( $result ); ! ! $userdata[$userdata_key] = $group_row; ! } ! } ! ! for ( $i = 0; $i < count( $userdata[$userdata_key] ); $i++ ) ! { ! if ( in_array( $userdata[$userdata_key][$i]['group_id'], $group_ids_array ) ) ! { ! $is_member = true; ! return $is_member; ! } ! } ! ! return false; ! } ! } ! ! if ( !function_exists( mx_add_search_words ) ) ! { ! // Add search words for blocks ! function mx_add_search_words($mode, $post_id, $post_text, $post_title = '', $mx_mode = 'mx') ! { ! global $db, $phpbb_root_path, $board_config, $lang; ! ! // $search_match_table = SEARCH_MATCH_TABLE; ! // $search_word_table = SEARCH_WORD_TABLE; ! ! switch ( $mx_mode ) ! { ! case 'mx': ! $search_match_table = MX_MATCH_TABLE; ! $search_word_table = MX_WORD_TABLE; ! $db_key = 'block_id'; ! break; ! case 'kb': ! $search_match_table = KB_MATCH_TABLE; ! $search_word_table = KB_WORD_TABLE; ! $db_key = 'article_id'; ! break; ! } ! ! $stopword_array = @file($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . "/search_stopwords.txt"); ! $synonym_array = @file($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . "/search_synonyms.txt"); ! ! $search_raw_words = array(); ! $search_raw_words['text'] = split_words(clean_words('post', $post_text, $stopword_array, $synonym_array)); ! $search_raw_words['title'] = split_words(clean_words('post', $post_title, $stopword_array, $synonym_array)); ! ! @set_time_limit(0); ! ! $word = array(); ! $word_insert_sql = array(); ! while ( list($word_in, $search_matches) = @each($search_raw_words) ) ! { ! $word_insert_sql[$word_in] = ''; ! if ( !empty($search_matches) ) ! { ! for ($i = 0; $i < count($search_matches); $i++) ! { ! $search_matches[$i] = trim($search_matches[$i]); ! ! if( $search_matches[$i] != '' ) ! { ! $word[] = $search_matches[$i]; ! if ( !strstr($word_insert_sql[$word_in], "'" . $search_matches[$i] . "'") ) ! { ! $word_insert_sql[$word_in] .= ( $word_insert_sql[$word_in] != "" ) ? ", '" . $search_matches[$i] . "'" : "'" . $search_matches[$i] . "'"; ! } ! } ! } ! } ! } ! ! if ( count($word) ) ! { ! sort($word); ! ! $prev_word = ''; ! $word_text_sql = ''; ! $temp_word = array(); ! for($i = 0; $i < count($word); $i++) ! { ! if ( $word[$i] != $prev_word ) ! { ! $temp_word[] = $word[$i]; ! $word_text_sql .= ( ( $word_text_sql != '' ) ? ', ' : '' ) . "'" . $word[$i] . "'"; ! } ! $prev_word = $word[$i]; ! } ! $word = $temp_word; ! ! $check_words = array(); ! switch( SQL_LAYER ) ! { ! case 'postgresql': ! case 'msaccess': ! case 'mssql-odbc': ! case 'oracle': ! case 'db2': ! $sql = "SELECT word_id, word_text ! FROM " . $search_word_table . " ! WHERE word_text IN ($word_text_sql)"; ! if ( !($result = $db->sql_query($sql)) ) ! { ! mx_message_die(GENERAL_ERROR, 'Could not select words', '', __LINE__, __FILE__, $sql); ! } ! ! while ( $row = $db->sql_fetchrow($result) ) ! { ! $check_words[$row['word_text']] = $row['word_id']; ! } ! break; ! } ! ! $value_sql = ''; ! $match_word = array(); ! for ($i = 0; $i < count($word); $i++) ! { ! $new_match = true; ! if ( isset($check_words[$word[$i]]) ) ! { ! $new_match = false; ! } ! ! if ( $new_match ) ! { ! switch( SQL_LAYER ) ! { ! case 'mysql': ! case 'mysql4': ! $value_sql .= ( ( $value_sql != '' ) ? ', ' : '' ) . '(\'' . $word[$i] . '\', 0)'; ! break; ! case 'mssql': ! case 'mssql-odbc': ! $value_sql .= ( ( $value_sql != '' ) ? ' UNION ALL ' : '' ) . "SELECT '" . $word[$i] . "', 0"; ! break; ! default: ! $sql = "INSERT INTO " . $search_word_table . " (word_text, word_common) ! VALUES ('" . $word[$i] . "', 0)"; ! if( !$db->sql_query($sql) ) ! { ! mx_message_die(GENERAL_ERROR, 'Could not insert new word', '', __LINE__, __FILE__, $sql); ! } ! break; ! } ! } ! } ! ! if ( $value_sql != '' ) ! { ! switch ( SQL_LAYER ) ! { ! case 'mysql': ! case 'mysql4': ! $sql = "INSERT IGNORE INTO " . $search_word_table . " (word_text, word_common) ! VALUES $value_sql"; ! break; ! case 'mssql': ! case 'mssql-odbc': ! $sql = "INSERT INTO " . $search_word_table . " (word_text, word_common) ! $value_sql"; ! break; ! } ! ! if ( !$db->sql_query($sql) ) ! { ! mx_message_die(GENERAL_ERROR, 'Could not insert new word', '', __LINE__, __FILE__, $sql); ! } ! } ! } ! ! while( list($word_in, $match_sql) = @each($word_insert_sql) ) ! { ! $title_match = ( $word_in == 'title' ) ? 1 : 0; ! ! if ( $match_sql != '' ) ! { ! $sql = "INSERT INTO " . $search_match_table . " ($db_key, word_id, title_match) ! SELECT $post_id, word_id, $title_match ! FROM " . $search_word_table . " ! WHERE word_text IN ($match_sql)"; ! if ( !$db->sql_query($sql) ) ! { ! mx_message_die(GENERAL_ERROR, 'Could not insert new word matches', '', __LINE__, __FILE__, $sql); ! } ! } ! } ! ! if ($mode == 'single') ! { ! // remove_common('single', 4/10, $word); ! } ! ! return; ! } ! ! function mx_remove_search_post($post_id_sql, $mx_mode = 'mx') ! { ! global $db; ! ! // $search_match_table = SEARCH_MATCH_TABLE; ! // $search_word_table = SEARCH_WORD_TABLE; ! ! switch ( $mx_mode ) ! { ! case 'mx': ! $search_match_table = MX_MATCH_TABLE; ! $search_word_table = MX_WORD_TABLE; ! $db_key = 'block_id'; ! break; ! case 'kb': ! $search_match_table = KB_MATCH_TABLE; ! $search_word_table = KB_WORD_TABLE; ! $db_key = 'article_id'; ! break; ! } ! ! $words_removed = false; ! ! switch ( SQL_LAYER ) ! { ! case 'mysql': ! case 'mysql4': ! $sql = "SELECT word_id ! FROM " . $search_match_table . " ! WHERE $db_key IN ($post_id_sql) ! GROUP BY word_id"; ! if ( $result = $db->sql_query($sql) ) ! { ! $word_id_sql = ''; ! while ( $row = $db->sql_fetchrow($result) ) ! { ! $word_id_sql .= ( $word_id_sql != '' ) ? ', ' . $row['word_id'] : $row['word_id']; ! } ! ! $sql = "SELECT word_id ! FROM " . $search_match_table . " ! WHERE word_id IN ($word_id_sql) ! GROUP BY word_id ! HAVING COUNT(word_id) = 1"; ! if ( $result = $db->sql_query($sql) ) ! { ! $word_id_sql = ''; ! while ( $row = $db->sql_fetchrow($result) ) ! { ! $word_id_sql .= ( $word_id_sql != '' ) ? ', ' . $row['word_id'] : $row['word_id']; ! } ! ! if ( $word_id_sql != '' ) ! { ! $sql = "DELETE FROM " . $search_word_table . " ! WHERE word_id IN ($word_id_sql)"; ! if ( !$db->sql_query($sql) ) ! { ! mx_message_die(GENERAL_ERROR, 'Could not delete word list entry', '', __LINE__, __FILE__, $sql); ! } ! ! $words_removed = $db->sql_affectedrows(); ! } ! } ! } ! break; ! ! default: ! $sql = "DELETE FROM " . $search_word_table . " ! WHERE word_id IN ( ! SELECT word_id ! FROM " . $search_match_table . " ! WHERE word_id IN ( ! SELECT word_id ! FROM " . $search_match_table . " ! WHERE $db_key IN ($post_id_sql) ! GROUP BY word_id ! ) ! GROUP BY word_id ! HAVING COUNT(word_id) = 1 ! )"; ! if ( !$db->sql_query($sql) ) ! { ! mx_message_die(GENERAL_ERROR, 'Could not delete old words from word table', '', __LINE__, __FILE__, $sql); ! } ! ! $words_removed = $db->sql_affectedrows(); ! ! break; ! } ! ! $sql = "DELETE FROM " . $search_match_table . " ! WHERE $db_key IN ($post_id_sql)"; ! if ( !$db->sql_query($sql) ) ! { ! mx_message_die(GENERAL_ERROR, 'Error in deleting post', '', __LINE__, __FILE__, $sql); ! } ! ! return $words_removed; ! } ! } ! ! if ( !function_exists(mx_do_install_upgrade) ) ! { ! // Generating output ! ! function mx_do_install_upgrade( $sql = '', $main_install = false ) ! { ! global $table_prefix, $mx_table_prefix, $userdata, $phpEx, $template, $lang, $db, $board_config, $HTTP_POST_VARS; ! ! $inst_error = false; ! $n = 0; ! $message = "<b>This is the result list of the SQL queries needed for the install/upgrade</b><br /><br />"; ! ! while ( $sql[$n] ) ! { ! if ( !$result = $db->sql_query( $sql[$n] ) ) ! { ! $message .= '<b><font color=#FF0000>[Error or Already added]</font></b> line: ' . ( $n + 1 ) . ' , ' . $sql[$n] . '<br />'; ! $inst_error = true; ! } ! else ! { ! $message .= '<b><font color=#0000fF>[Added/Updated]</font></b> line: ' . ( $n + 1 ) . ' , ' . $sql[$n] . '<br />'; ! } ! $n++; ! } ! $message .= '<br /> If you get some Errors, Already Added or Updated messages, relax, this is normal when updating modules'; ! ! if ( $main_install ) ! { ! if ( !$inst_error ) ! { ! $message .= '-> no db errors :-)<br /><br /><b>Portal installed successfully! </b><hr><br /><br />'; ! $message .= '1) Now, delete the /install and /contrib folders!!!<br /><br />'; ! $message .= '2) If you haven\'t already done a db backup, now is the time ;)<br /><br />'; ! $message .= '3) Then (after step 1), you HAVE to configure MX core and its modules from within the adminCP, simply \'upgrade\' MX portal Core and all modules in use!!!<br /><br />'; ! ! $message .= 'Click <a href=../admin/admin_mx_module.php>Here</a> to administer/upgrade the portal/modules. You will be promted for an admin username and pass. The upgrade process provide informative output...'; ! } ! else ! { ! $message .= '<br /><br /><b>Portal installed successfully (with some warnings)! </b><hr><br /><br />'; ! $message .= '1) Now, delete the /install and /contrib folders!!!<br /><br />'; ! $message .= '2) If you haven\'t already done a db backup, now is the time ;)<br /><br />'; ! $message .= '3) Now (after step 1), you HAVE to configure MX core and its modules from within the adminCP, simply \'upgrade\' MX portal Core and all modules in use!!!<br /><br />'; ! ! $message .= 'Click <a href=../admin/admin_mx_module.php>Here</a> to administer/upgrade the portal/modules. You will be promted for an admin username and pass. The upgrade process provide informative output...'; ! } ! } ! return $message; ! } ! } ?> \ No newline at end of file |
|
From: Jon O. <jon...@us...> - 2005-04-12 21:11:18
|
Update of /cvsroot/mxbb/mx_calsnails In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30005/modules/mx_calsnails Modified Files: calendar.php Log Message: i have renamed mx_auth_group_cache to mx_auth_group and removed old function with shorter name ;) ...to make it clearer Index: calendar.php =================================================================== RCS file: /cvsroot/mxbb/mx_calsnails/calendar.php,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** calendar.php 17 Mar 2005 12:04:26 -0000 1.14 --- calendar.php 12 Apr 2005 21:11:06 -0000 1.15 *************** *** 1,1759 **** ! <?php ! /** ! * MX-System changes to original source: ! * ! * MX001: MX Block Initialization and Use of $block_size. ! * MX002: Remove include cal_settings (includes/mx_common.php). ! * MX003: Move other includes into mx_common.php. ! * MX004: Add $module_root_path to $thisscript. ! * MX005: Check the use of header/footer (only if running standalone). ! * MX006: Change table names to match MX conventions. [...3491 lines suppressed...] ! { ! $omega--; ! } ! } ! if ( $alpha > $omega ) ! { ! break; ! } ! $temporary = $array[$alpha]; ! $array[$alpha++] = $array[$omega]; ! $array[$omega--] = $temporary; ! } ! array_qsort2 ( $array, $column, $order, $first, $omega ); ! array_qsort2 ( $array, $column, $order, $alpha, $last ); ! } ! return $array; ! } ! ?> \ No newline at end of file |
|
From: Jon O. <jon...@us...> - 2005-04-12 21:11:04
|
Update of /cvsroot/mxbb/core/modules/mx_textblocks In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29720/modules/mx_textblocks Modified Files: mx_textblock_blog.php Log Message: i have renamed mx_auth_group_cache to mx_auth_group and removed old function with shorter name ;) ...to make it clearer Index: mx_textblock_blog.php =================================================================== RCS file: /cvsroot/mxbb/core/modules/mx_textblocks/mx_textblock_blog.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** mx_textblock_blog.php 12 Apr 2005 17:38:37 -0000 1.5 --- mx_textblock_blog.php 12 Apr 2005 21:10:34 -0000 1.6 *************** *** 1,258 **** ! <?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$ ! */ ! ! /** ! * 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 ( isset( $HTTP_POST_VARS['u'] ) || isset( $HTTP_GET_VARS['u'] ) ) ! { ! $sub_id = ( isset( $HTTP_POST_VARS['u'] ) ) ? intval( $HTTP_POST_VARS['u'] ) : intval( $HTTP_GET_VARS['u'] ); ! $blog_mode = 'user'; ! } ! else if ( isset( $HTTP_POST_VARS['g'] ) || isset( $HTTP_GET_VARS['g'] ) ) ! { ! $sub_id = ( isset( $HTTP_POST_VARS['g'] ) ) ? intval( $HTTP_POST_VARS['g'] ) : intval( $HTTP_GET_VARS['g'] ); ! $blog_mode = 'group'; ! } ! else ! { ! // $sub_id = $userdata['user_id']; ! // $blog_mode = 'user'; ! $block_rows[$block]['show_title'] = 0; ! $block_rows[$block]['show_block'] = 0; ! return; ! } ! ! $block_config = read_block_config( $block_id, false, $sub_id ); ! $title = $block_config[$block_id]['block_title']; ! ! $message = $block_config[$block_id]['Blog']['parameter_value']; ! $blog_id = $block_config[$block_id]['blog_id']['parameter_value']; ! ! // $block_style = $block_config[$block_id][block_style]['parameter_value']; ! // $text_style = $block_config[$block_id][text_style]['parameter_value']; ! // $title_style = $block_config[$block_id][title_style]['parameter_value']; ! // $show_title = $block_config[$block_id][show_title]['parameter_value']; ! // ********************************************************************** ! // Read language definition ! // ********************************************************************** ! if ( !file_exists( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_main.' . $phpEx ) ) ! { ! include( $module_root_path . 'language/lang_english/lang_main.' . $phpEx ); ! } ! else ! { ! include( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_main.' . $phpEx ); ! } ! // Block Pages/toc ! if ( isset( $HTTP_POST_VARS['page_num'] ) || isset( $HTTP_GET_VARS['page_num'] ) ) ! { ! $page_num = ( isset( $HTTP_POST_VARS['page_num'] ) ) ? $HTTP_POST_VARS['page_num'] : $HTTP_GET_VARS['page_num']; ! $page_num = $page_num - 1; ! } ! else ! { ! $page_num = 0; ! } ! ! $art_pages = explode( '[page]', $message ); ! $message = trim( $art_pages[$page_num] ); ! $message = str_replace( '[toc]', '', $message ); ! // End Pages/TOC ! $bbcode_uid = $block_config[$block_id]['Blog']['bbcode_uid']; ! $message = mx_decode( $message, $bbcode_uid ) ; ! ! // EDIT BLOG ! $iss_auth_ary = array(); ! $iss_auth_ary = block_auth( AUTH_EDIT, $block_id , $userdata, $block_config[$block_id][auth_edit], $block_config[$block_id][auth_edit_group] ); ! ! // $blog_validate = ( $blog_mode == 'user' ) ? $sub_id == $userdata['user_id'] : mx_auth_group( $sub_id, $userdata['user_id'], true ); ! $blog_validate = ( $blog_mode == 'user' ) ? $sub_id == $userdata['user_id'] : mx_auth_group_cache( $sub_id, true ); ! ! if ( $blog_validate || $iss_auth_ary[auth_edit] ) ! { ! $ss_hidden_fields = '<input type="hidden" name="sid" value="' . $userdata['session_id'] . '" />'; ! $ss_hidden_fields .= '<input type="hidden" name="block_id" value="' . $block_id . '" />'; ! $ss_hidden_fields .= '<input type="hidden" name="portalpage" value="' . $page_id . '" />'; ! $ss_hidden_fields .= '<input type="hidden" name="mode" value="editblog" />'; ! //$ss_hidden_fields .= '<input type="hidden" name="u" value="' . intval( $HTTP_GET_VARS['u'] ) . '" />'; ! //$ss_hidden_fields .= '<input type="hidden" name="g" value="' . intval( $HTTP_GET_VARS['g'] ) . '" />'; ! $ss_hidden_fields .= '<input type="hidden" name="u" value="' . $sub_id. '" />'; ! $ss_hidden_fields .= '<input type="hidden" name="g" value="' . $sub_id. '" />'; ! $ss_hidden_fields .= '<input type="hidden" name="sub_id" value="' . $sub_id . '" />'; ! $ss_hidden_fields .= '<input type="hidden" name="blog_mode" value="' . $blog_mode . '" />'; ! ! $splitt_admin_file = 'modules/mx_textblocks/admin/mx_textblock_edit.php'; ! $editt_url = append_sid( $mx_root_path . $splitt_admin_file . "?sid=" . $userdata['session_id'] ); ! $editt_img = '<input type="image" src="' . PORTAL_URL . TEMPLATE_ROOT_PATH . 'images/block_icons/block_edit.gif" alt="' . $lang['Block_Edit'] . '" title="' . $lang['Block_Edit'] . ' :: ' . $block_config[$block_id][block_title] . '"></input>'; ! ! $template->assign_block_vars( "switch_blog_edit", array( 'EDIT_ACTION' => $editt_url, ! 'EDIT_IMG' => $editt_img, ! 'S_HIDDEN_FORM_FIELDS' => $ss_hidden_fields ! ) ); ! } ! else ! { ! $template->assign_block_vars( "switch_blog_noedit", array() ); ! } ! ! // Start output of page ! ! $template->set_filenames( array( "body_block" => "mx_textblock_blog.tpl" ) ! ); ! ! if ( $show_title == 'TRUE' ) ! { ! if ( $title_style == 'TRUE' ) ! { ! $template->assign_block_vars( "switch_standard_style", array() ); ! } ! else ! { ! $template->assign_block_vars( "switch_no_style", array() ); ! } ! } ! ! $block_style = ( ( $block_style == '' ) || ( $block_style == 'FALSE' ) ) ? '' : 'forumline'; ! $text_style = ( ( $text_style == '' ) || ( $text_style == 'none' ) ) ? 'genmed' : $text_style; ! ! if ( !empty($blog_id) && $userdata['session_logged_in'] && $blog_mode == 'user' ) ! { ! $template->assign_block_vars( "switch_blog_id", array( ! 'BLOG_ID' => sprintf( $blog_id, $userdata['username'] ) ! ) ); ! } ! ! $template->assign_vars( array( 'BLOCK_SIZE' => ( !empty( $block_size ) ? $block_size : '100%' ), ! 'L_TITLE' => ( !empty( $lang[$title] ) ? $lang[$title] : $title ), ! 'S_ACTION' => $edit_url, ! 'U_TEXT' => $message, ! 'EDIT_IMG' => $edit_img, ! 'MOVE_L_IMG' => $move_l_img, ! 'MOVE_R_IMG' => $move_r_img, ! 'MOVE_U_IMG' => $move_u_img, ! 'MOVE_D_IMG' => $move_d_img, ! 'CACHE_IMG' => $cache_img, ! 'DELETE_IMG' => $delete_img, ! 'BLOCK_ID' => $block_id, ! 'BLOCK_STYLE' => $block_style, ! 'TEXT_STYLE' => $text_style, ! 'TITLE_STYLE' => $block_style, ! 'S_HIDDEN_FORM_FIELDS' => $s_hidden_fields, ! 'L_TOC' => $lang['Toc_title'], ! 'L_GOTO_PAGE' => $lang['Goto_page'] ! ) ); ! ! // article pages table of contents ! ! if ( count( $art_pages ) > 1 ) ! { ! $template->assign_block_vars( 'switch_toc', array() ); ! ! $i = 0; ! while ( $i < count( $art_pages ) ) ! { ! $page_number = $i + 1; ! ! $art_split = explode( '[toc]', $art_pages[$i] ); ! $article_toc = $art_split[0]; ! // $article_body = $art_split[1]; ! // Fix up the toc title ! if ( !$board_config['allow_html'] ) ! { ! $article_toc = preg_replace( '#(<)([\/]?.*?)(>)#is', "<\\2>", $article_toc ); ! } ! ! // Parse message ! ! // $bbcode_uid = $row['bbcode_uid']; ! // $article_toc = preg_replace('/\:[0-9a-z\:]+\]/si', ']', $article_toc); ! $article_toc = preg_replace( "/\[(\S+)\]/e", "", $article_toc ); ! // $txt = preg_replace("/<a href=\"(.*)\">(.*)<\/a>/i", "\\2 (\\1)", $txt); ! $article_toc = make_clickable( $article_toc ); ! ! // Parse smilies ! ! if ( $board_config['allow_smilies'] ) ! { ! $article_toc = mx_smilies_pass( $article_toc ); ! } ! ! // Replace naughty words ! ! if ( count( $orig_word ) ) ! { ! $article_toc = str_replace( '\"', '"', substr( preg_replace( '#(\>(((?>([^><]+|(?R)))*)\<))#se', "preg_replace(\$orig_word, \$replacement_word, '\\0')", '>' . $article_toc . '<' ), 1, -1 ) ); ! } ! // Replace newlines (we use this rather than nl2br because ! // till recently it wasn't XHTML compliant) ! // $article_toc = str_replace("\n", "\n<br />\n", $article_toc); ! $page_toc = $art_pages[$i]; ! ! if ( $page_num != $i ) ! { ! $temp_url = append_sid( "index.php?page=$page_id&mode=article&page_num=$page_number" ); ! $page_link = '<a href="' . $temp_url . '" class="nav">' . $page_number . ' - ' . $article_toc . '</a>'; ! } ! else ! { ! $page_link = $page_number . ' - ' . $article_toc ; ! } ! ! if ( $i < count( $art_pages ) - 1 ) ! { ! $page_link .= '<br />'; ! } ! $template->assign_block_vars( 'switch_toc.pages', array( 'TOC_ITEM' => $page_link ) ! ); ! $i++; ! } ! } ! ! // article pages ! ! if ( count( $art_pages ) > 1 ) ! { ! $template->assign_block_vars( 'switch_pages', array() ); ! ! $i = 0; ! while ( $i < count( $art_pages ) ) ! { ! $page_number = $i + 1; ! if ( $page_num != $i ) ! { ! $temp_url = append_sid( "index.php?page=$page_id&mode=article&page_num=$page_number" ); ! $page_link = '<a href="' . $temp_url . '" class="nav">' . $page_number . '</a>'; ! } ! else ! { ! $page_link = $page_number; ! } ! ! if ( $i < count( $art_pages ) - 1 ) ! { ! $page_link .= ', '; ! } ! $template->assign_block_vars( 'switch_pages.pages', array( 'PAGE_LINK' => $page_link ) ! ); ! $i++; ! } ! } ! ! $template->pparse( "body_block" ); ! ?> \ No newline at end of file --- 1,257 ---- ! <?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$ ! */ ! ! /** ! * 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 ( isset( $HTTP_POST_VARS['u'] ) || isset( $HTTP_GET_VARS['u'] ) ) ! { ! $sub_id = ( isset( $HTTP_POST_VARS['u'] ) ) ? intval( $HTTP_POST_VARS['u'] ) : intval( $HTTP_GET_VARS['u'] ); ! $blog_mode = 'user'; ! } ! else if ( isset( $HTTP_POST_VARS['g'] ) || isset( $HTTP_GET_VARS['g'] ) ) ! { ! $sub_id = ( isset( $HTTP_POST_VARS['g'] ) ) ? intval( $HTTP_POST_VARS['g'] ) : intval( $HTTP_GET_VARS['g'] ); ! $blog_mode = 'group'; ! } ! else ! { ! // $sub_id = $userdata['user_id']; ! // $blog_mode = 'user'; ! $block_rows[$block]['show_title'] = 0; ! $block_rows[$block]['show_block'] = 0; ! return; ! } ! ! $block_config = read_block_config( $block_id, false, $sub_id ); ! $title = $block_config[$block_id]['block_title']; ! ! $message = $block_config[$block_id]['Blog']['parameter_value']; ! $blog_id = $block_config[$block_id]['blog_id']['parameter_value']; ! ! // $block_style = $block_config[$block_id][block_style]['parameter_value']; ! // $text_style = $block_config[$block_id][text_style]['parameter_value']; ! // $title_style = $block_config[$block_id][title_style]['parameter_value']; ! // $show_title = $block_config[$block_id][show_title]['parameter_value']; ! // ********************************************************************** ! // Read language definition ! // ********************************************************************** ! if ( !file_exists( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_main.' . $phpEx ) ) ! { ! include( $module_root_path . 'language/lang_english/lang_main.' . $phpEx ); ! } ! else ! { ! include( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_main.' . $phpEx ); ! } ! // Block Pages/toc ! if ( isset( $HTTP_POST_VARS['page_num'] ) || isset( $HTTP_GET_VARS['page_num'] ) ) ! { ! $page_num = ( isset( $HTTP_POST_VARS['page_num'] ) ) ? $HTTP_POST_VARS['page_num'] : $HTTP_GET_VARS['page_num']; ! $page_num = $page_num - 1; ! } ! else ! { ! $page_num = 0; ! } ! ! $art_pages = explode( '[page]', $message ); ! $message = trim( $art_pages[$page_num] ); ! $message = str_replace( '[toc]', '', $message ); ! // End Pages/TOC ! $bbcode_uid = $block_config[$block_id]['Blog']['bbcode_uid']; ! $message = mx_decode( $message, $bbcode_uid ) ; ! ! // EDIT BLOG ! $iss_auth_ary = array(); ! $iss_auth_ary = block_auth( AUTH_EDIT, $block_id , $userdata, $block_config[$block_id][auth_edit], $block_config[$block_id][auth_edit_group] ); ! ! $blog_validate = ( $blog_mode == 'user' ) ? $sub_id == $userdata['user_id'] : mx_auth_group( $sub_id, true ); ! ! if ( $blog_validate || $iss_auth_ary[auth_edit] ) ! { ! $ss_hidden_fields = '<input type="hidden" name="sid" value="' . $userdata['session_id'] . '" />'; ! $ss_hidden_fields .= '<input type="hidden" name="block_id" value="' . $block_id . '" />'; ! $ss_hidden_fields .= '<input type="hidden" name="portalpage" value="' . $page_id . '" />'; ! $ss_hidden_fields .= '<input type="hidden" name="mode" value="editblog" />'; ! //$ss_hidden_fields .= '<input type="hidden" name="u" value="' . intval( $HTTP_GET_VARS['u'] ) . '" />'; ! //$ss_hidden_fields .= '<input type="hidden" name="g" value="' . intval( $HTTP_GET_VARS['g'] ) . '" />'; ! $ss_hidden_fields .= '<input type="hidden" name="u" value="' . $sub_id. '" />'; ! $ss_hidden_fields .= '<input type="hidden" name="g" value="' . $sub_id. '" />'; ! $ss_hidden_fields .= '<input type="hidden" name="sub_id" value="' . $sub_id . '" />'; ! $ss_hidden_fields .= '<input type="hidden" name="blog_mode" value="' . $blog_mode . '" />'; ! ! $splitt_admin_file = 'modules/mx_textblocks/admin/mx_textblock_edit.php'; ! $editt_url = append_sid( $mx_root_path . $splitt_admin_file . "?sid=" . $userdata['session_id'] ); ! $editt_img = '<input type="image" src="' . PORTAL_URL . TEMPLATE_ROOT_PATH . 'images/block_icons/block_edit.gif" alt="' . $lang['Block_Edit'] . '" title="' . $lang['Block_Edit'] . ' :: ' . $block_config[$block_id][block_title] . '"></input>'; ! ! $template->assign_block_vars( "switch_blog_edit", array( 'EDIT_ACTION' => $editt_url, ! 'EDIT_IMG' => $editt_img, ! 'S_HIDDEN_FORM_FIELDS' => $ss_hidden_fields ! ) ); ! } ! else ! { ! $template->assign_block_vars( "switch_blog_noedit", array() ); ! } ! ! // Start output of page ! ! $template->set_filenames( array( "body_block" => "mx_textblock_blog.tpl" ) ! ); ! ! if ( $show_title == 'TRUE' ) ! { ! if ( $title_style == 'TRUE' ) ! { ! $template->assign_block_vars( "switch_standard_style", array() ); ! } ! else ! { ! $template->assign_block_vars( "switch_no_style", array() ); ! } ! } ! ! $block_style = ( ( $block_style == '' ) || ( $block_style == 'FALSE' ) ) ? '' : 'forumline'; ! $text_style = ( ( $text_style == '' ) || ( $text_style == 'none' ) ) ? 'genmed' : $text_style; ! ! if ( !empty($blog_id) && $userdata['session_logged_in'] && $blog_mode == 'user' ) ! { ! $template->assign_block_vars( "switch_blog_id", array( ! 'BLOG_ID' => sprintf( $blog_id, $userdata['username'] ) ! ) ); ! } ! ! $template->assign_vars( array( 'BLOCK_SIZE' => ( !empty( $block_size ) ? $block_size : '100%' ), ! 'L_TITLE' => ( !empty( $lang[$title] ) ? $lang[$title] : $title ), ! 'S_ACTION' => $edit_url, ! 'U_TEXT' => $message, ! 'EDIT_IMG' => $edit_img, ! 'MOVE_L_IMG' => $move_l_img, ! 'MOVE_R_IMG' => $move_r_img, ! 'MOVE_U_IMG' => $move_u_img, ! 'MOVE_D_IMG' => $move_d_img, ! 'CACHE_IMG' => $cache_img, ! 'DELETE_IMG' => $delete_img, ! 'BLOCK_ID' => $block_id, ! 'BLOCK_STYLE' => $block_style, ! 'TEXT_STYLE' => $text_style, ! 'TITLE_STYLE' => $block_style, ! 'S_HIDDEN_FORM_FIELDS' => $s_hidden_fields, ! 'L_TOC' => $lang['Toc_title'], ! 'L_GOTO_PAGE' => $lang['Goto_page'] ! ) ); ! ! // article pages table of contents ! ! if ( count( $art_pages ) > 1 ) ! { ! $template->assign_block_vars( 'switch_toc', array() ); ! ! $i = 0; ! while ( $i < count( $art_pages ) ) ! { ! $page_number = $i + 1; ! ! $art_split = explode( '[toc]', $art_pages[$i] ); ! $article_toc = $art_split[0]; ! // $article_body = $art_split[1]; ! // Fix up the toc title ! if ( !$board_config['allow_html'] ) ! { ! $article_toc = preg_replace( '#(<)([\/]?.*?)(>)#is', "<\\2>", $article_toc ); ! } ! ! // Parse message ! ! // $bbcode_uid = $row['bbcode_uid']; ! // $article_toc = preg_replace('/\:[0-9a-z\:]+\]/si', ']', $article_toc); ! $article_toc = preg_replace( "/\[(\S+)\]/e", "", $article_toc ); ! // $txt = preg_replace("/<a href=\"(.*)\">(.*)<\/a>/i", "\\2 (\\1)", $txt); ! $article_toc = make_clickable( $article_toc ); ! ! // Parse smilies ! ! if ( $board_config['allow_smilies'] ) ! { ! $article_toc = mx_smilies_pass( $article_toc ); ! } ! ! // Replace naughty words ! ! if ( count( $orig_word ) ) ! { ! $article_toc = str_replace( '\"', '"', substr( preg_replace( '#(\>(((?>([^><]+|(?R)))*)\<))#se', "preg_replace(\$orig_word, \$replacement_word, '\\0')", '>' . $article_toc . '<' ), 1, -1 ) ); ! } ! // Replace newlines (we use this rather than nl2br because ! // till recently it wasn't XHTML compliant) ! // $article_toc = str_replace("\n", "\n<br />\n", $article_toc); ! $page_toc = $art_pages[$i]; ! ! if ( $page_num != $i ) ! { ! $temp_url = append_sid( "index.php?page=$page_id&mode=article&page_num=$page_number" ); ! $page_link = '<a href="' . $temp_url . '" class="nav">' . $page_number . ' - ' . $article_toc . '</a>'; ! } ! else ! { ! $page_link = $page_number . ' - ' . $article_toc ; ! } ! ! if ( $i < count( $art_pages ) - 1 ) ! { ! $page_link .= '<br />'; ! } ! $template->assign_block_vars( 'switch_toc.pages', array( 'TOC_ITEM' => $page_link ) ! ); ! $i++; ! } ! } ! ! // article pages ! ! if ( count( $art_pages ) > 1 ) ! { ! $template->assign_block_vars( 'switch_pages', array() ); ! ! $i = 0; ! while ( $i < count( $art_pages ) ) ! { ! $page_number = $i + 1; ! if ( $page_num != $i ) ! { ! $temp_url = append_sid( "index.php?page=$page_id&mode=article&page_num=$page_number" ); ! $page_link = '<a href="' . $temp_url . '" class="nav">' . $page_number . '</a>'; ! } ! else ! { ! $page_link = $page_number; ! } ! ! if ( $i < count( $art_pages ) - 1 ) ! { ! $page_link .= ', '; ! } ! $template->assign_block_vars( 'switch_pages.pages', array( 'PAGE_LINK' => $page_link ) ! ); ! $i++; ! } ! } ! ! $template->pparse( "body_block" ); ! ?> \ No newline at end of file |
|
From: Jon O. <jon...@us...> - 2005-04-12 21:10:43
|
Update of /cvsroot/mxbb/core/modules/mx_textblocks/admin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29720/modules/mx_textblocks/admin Modified Files: mx_textblock_edit.php Log Message: i have renamed mx_auth_group_cache to mx_auth_group and removed old function with shorter name ;) ...to make it clearer Index: mx_textblock_edit.php =================================================================== RCS file: /cvsroot/mxbb/core/modules/mx_textblocks/admin/mx_textblock_edit.php,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** mx_textblock_edit.php 12 Apr 2005 17:38:37 -0000 1.16 --- mx_textblock_edit.php 12 Apr 2005 21:10:33 -0000 1.17 *************** *** 1,689 **** ! <?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 : ! * ------------------------------------------------------------------------- [...1351 lines suppressed...] ! 'S_SHOW_STATS_YES' => $show_stats_yes, ! 'S_SHOW_STATS_NO' => $show_stats_no, ! ! 'U_PHPBB_ROOT_PATH' => PHPBB_URL ! ) ); ! ! $template->pparse( 'body' ); ! ! if ( !empty( $portalpage ) ) ! { ! $page_title = $lang['Block_admin']; ! include( $mx_root_path . 'includes/page_tail.' . $phpEx ); ! } ! else ! { ! include_once( $mx_root_path . 'admin/page_footer_admin.' . $phpEx ); ! } ! ?> \ No newline at end of file |
|
From: Jon O. <jon...@us...> - 2005-04-12 21:10:43
|
Update of /cvsroot/mxbb/core/includes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29720/includes Modified Files: mx_auth.php Log Message: i have renamed mx_auth_group_cache to mx_auth_group and removed old function with shorter name ;) ...to make it clearer Index: mx_auth.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/mx_auth.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** mx_auth.php 6 Mar 2005 01:10:14 -0000 1.4 --- mx_auth.php 12 Apr 2005 21:10:33 -0000 1.5 *************** *** 1,514 **** ! <?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$ ! */ ! ! /** ! * 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. ! */ ! ! /** ! * Included functions in this file: ! * - block_auth ! * - page_auth ! * - menu_auth ! * - mx_auth_check_user (from auth.php - validated for phpbb 2.0.10) ! * - get_auth_forum ! * - mx_auth_group ! */ ! ! /* ! $type's accepted (pre-pend with AUTH_): ! VIEW, READ, POST, REPLY, EDIT, DELETE, STICKY, ANNOUNCE, VOTE, POLLCREATE ! ! Possible options ($type/module_id combinations): ! ! * If you include a type and module_id then a specific lookup will be done and ! the single result returned ! ! * If you set type to AUTH_ALL and specify a module_id an array of all auth types ! will be returned ! ! * If you provide a module_id a specific lookup on that module will be done ! ! * If you set module_id to AUTH_LIST_ALL and specify a type an array listing the ! results for all modules will be returned ! ! * If you set module_id to AUTH_LIST_ALL and type to AUTH_ALL a multidimensional ! array containing the auth permissions for all types and all modules for that ! user is returned ! ! All results are returned as associative arrays, even when a single auth type is ! specified. ! ! If available you can send an array (either one or two dimensional) containing the ! module auth levels, this will prevent the auth function having to do its own ! lookup ! */ ! function block_auth( $type, $module_id, $userdata, $f_access = '', $f_access_group = '' ) ! { ! global $db, $lang; ! ! switch ( $type ) ! { ! // case AUTH_ALL: ! // $a_sql = 'a.auth_view, a.auth_edit, a.auth_delete'; ! // $a_sql_groups = 'a.auth_view_group, a.auth_edit_group, a.auth_delete_group'; ! // $auth_fields = array( 'auth_view', 'auth_edit', 'auth_delete' ); ! // $auth_fields_groups = array( 'auth_view_group', 'auth_edit_group', 'auth_delete_group' ); ! // break; ! ! case AUTH_VIEW: ! $a_sql = 'a.auth_view'; ! $a_sql_groups = 'a.auth_view_group'; ! $auth_fields = array( 'auth_view' ); ! $auth_fields_groups = array( 'auth_view_group' ); ! break; ! ! case AUTH_EDIT: ! $a_sql = 'a.auth_edit'; ! $a_sql_groups = 'a.auth_edit_group'; ! $auth_fields = array( 'auth_edit' ); ! $auth_fields_groups = array( 'auth_edit_group' ); ! break; ! ! case AUTH_DELETE: ! $a_sql = 'a.auth_delete'; ! $a_sql_groups = 'a.auth_delete_group'; ! $auth_fields = array( 'auth_delete' ); ! $auth_fields_groups = array( 'auth_delete_group' ); ! break; ! ! default: ! break; ! } ! ! if ( $module_id == 0 ) ! { ! if ( $userdata['user_level'] == ADMIN && $userdata['session_logged_in'] ) ! { ! $auth_user[$auth_fields[0]] = 1; ! $auth_user[$auth_fields[0] . '_type'] = $lang['Auth_Moderators']; ! } ! else ! { ! $auth_user[$auth_fields[0]] = 0; ! $auth_user[$auth_fields[0] . '_type'] = $lang['Auth_Moderators']; ! } ! return $auth_user; ! } ! ! $is_admin = ( $userdata['user_level'] == ADMIN && $userdata['session_logged_in'] ) ? true : 0; ! ! $auth_user = array(); ! for( $i = 0; $i < count( $auth_fields ); $i++ ) ! { ! $key = $auth_fields[$i]; ! $key_groups = $auth_fields_groups[$i]; ! // If the user is logged on and the module type is either ALL or REG then the user has access ! // If the type if ACL, MOD or ADMIN then we need to see if the user has specific permissions ! // to do whatever it is they want to do ... to do this we pull relevant information for the ! // user (and any groups they belong to) ! // Now we compare the users access level against the modules. We assume here that a moderator ! // and admin automatically have access to an ACL module, similarly we assume admins meet an ! // auth requirement of MOD ! $value = $f_access[$key]; ! // $value_groups = $f_access_group[$key_groups]; ! $value_groups = $f_access_group; ! ! switch ( $value ) ! { ! case AUTH_ALL: ! $auth_user[$key] = true; ! $auth_user[$key . '_type'] = $lang['Auth_Anonymous_users']; ! break; ! ! case AUTH_REG: ! $auth_user[$key] = ( $userdata['session_logged_in'] ) ? true : 0; ! $auth_user[$key . '_type'] = $lang['Auth_Registered_Users']; ! break; ! ! case AUTH_ANONYMOUS: ! $auth_user[$key] = ( ! $userdata['session_logged_in'] ) ? true : 0; ! $auth_user[$key . '_type'] = $lang['Auth_Anonymous_users']; ! break; ! ! case AUTH_ACL: // PRIVATE ! $auth_user[$key] = ( $userdata['session_logged_in'] ) ? mx_auth_group_cache( $value_groups ) || $is_admin : 0; ! $auth_user[$key . '_type'] = $lang['Auth_Users_granted_access']; ! break; ! ! case AUTH_MOD: ! $auth_user[$key] = ( $userdata['session_logged_in'] ) ? mx_auth_group_cache( $f_access_group['auth_moderator_group'] ) || $is_admin : 0; ! $auth_user[$key . '_type'] = $lang['Auth_Moderators']; ! break; ! ! case AUTH_ADMIN: ! $auth_user[$key] = $is_admin; ! $auth_user[$key . '_type'] = $lang['Auth_Administrators']; ! break; ! ! default: ! $auth_user[$key] = 0; ! break; ! } ! } ! // Is user a moderator? ! $auth_user['auth_mod'] = ( $userdata['session_logged_in'] ) ? mx_auth_group_cache( $f_access_group['auth_moderator_group'] ) || $is_admin : 0; ! ! return $auth_user; ! } ! ! function page_auth( $type, $userdata, $f_access = '', $f_access_group = '' ) ! { ! global $db, $lang; ! ! $a_sql = 'a.auth_view'; ! $a_sql_groups = 'a.auth_view_group'; ! $auth_fields = array( 'auth_view' ); ! $auth_fields_groups = array( 'auth_view_group' ); ! ! $is_admin = ( $userdata['user_level'] == ADMIN && $userdata['session_logged_in'] ) ? true : 0; ! ! $auth_user = array(); ! for( $i = 0; $i < count( $auth_fields ); $i++ ) ! { ! $key = $auth_fields[$i]; ! $key_groups = $auth_fields_groups[$i]; ! ! $value = $f_access[$key]; ! // $value_groups = $f_access_group[$key_groups]; ! $value_groups = $f_access_group; ! ! switch ( $value ) ! { ! case AUTH_ALL: ! $auth_user[$key] = true; ! $auth_user[$key . '_type'] = $lang['Auth_Anonymous_users']; ! break; ! ! case AUTH_REG: ! $auth_user[$key] = ( $userdata['session_logged_in'] ) ? true : 0; ! $auth_user[$key . '_type'] = $lang['Auth_Registered_Users']; ! break; ! ! case AUTH_ANONYMOUS: ! $auth_user[$key] = ( ! $userdata['session_logged_in'] ) ? true : 0; ! $auth_user[$key . '_type'] = $lang['Auth_Anonymous_users']; ! break; ! ! case AUTH_ACL: // PRIVATE ! $auth_user[$key] = ( $userdata['session_logged_in'] ) ? mx_auth_group_cache( $value_groups ) || $is_admin : 0; ! $auth_user[$key . '_type'] = $lang['Auth_Users_granted_access']; ! break; ! ! case AUTH_MOD: ! $auth_user[$key] = ( $userdata['session_logged_in'] ) ? mx_auth_group_cache( $f_access_group['auth_moderator_group'] ) || $is_admin : 0; ! $auth_user[$key . '_type'] = $lang['Auth_Moderators']; ! break; ! ! case AUTH_ADMIN: ! $auth_user[$key] = $is_admin; ! $auth_user[$key . '_type'] = $lang['Auth_Administrators']; ! break; ! ! default: ! $auth_user[$key] = 0; ! break; ! } ! } ! // Is user a moderator? ! $auth_user['auth_mod'] = ( $userdata['session_logged_in'] ) ? mx_auth_group_cache( $f_access_group['auth_moderator_group'] ) || $is_admin : 0; ! ! return $auth_user; ! } ! // ************************************************************************** ! function menu_auth( $type, $menu_id, $userdata, $f_access = '', $f_access_group = '' ) ! { ! global $db, $lang; ! ! switch ( $type ) ! { ! case AUTH_ALL: ! $a_sql = 'a.auth_view'; ! $auth_fields = array( 'auth_view' ); ! break; ! ! case AUTH_VIEW: ! $a_sql = 'a.auth_view'; ! $auth_fields = array( 'auth_view' ); ! break; ! ! default: ! break; ! } ! // If f_access has been passed, or auth is needed to return an array of menus ! // then we need to pull the auth information on the given menu (or all menus) ! $is_admin = ( $userdata['user_level'] == ADMIN && $userdata['session_logged_in'] ) ? true : 0; ! ! $auth_user = array(); ! for( $i = 0; $i < count( $auth_fields ); $i++ ) ! { ! $key = $auth_fields[$i]; ! // If the user is logged on and the menu type is either ALL or REG then the user has access ! // If the type if ACL, MOD or ADMIN then we need to see if the user has specific permissions ! // to do whatever it is they want to do ... to do this we pull relevant information for the ! // user (and any groups they belong to) ! // Now we compare the users access level against the menus. We assume here that a moderator ! // and admin automatically have access to an ACL menu, similarly we assume admins meet an ! // auth requirement of MOD ! $value = $f_access[$key]; ! ! switch ( $value ) ! { ! case AUTH_ALL: ! $auth_user[$key] = true; ! $auth_user[$key . '_type'] = $lang['Auth_Anonymous_users']; ! break; ! ! case AUTH_REG: ! $auth_user[$key] = ( $userdata['session_logged_in'] ) ? true : 0; ! $auth_user[$key . '_type'] = $lang['Auth_Registered_Users']; ! break; ! ! case AUTH_ANONYMOUS: ! $auth_user[$key] = ( ! $userdata['session_logged_in'] ) ? true : 0; ! $auth_user[$key . '_type'] = $lang['Auth_Anonymous_users']; ! break; ! ! case AUTH_ACL: ! $auth_user[$key] = ( $userdata['session_logged_in'] ) ? mx_auth_group_cache( $f_access_group ) || $is_admin : 0; ! $auth_user[$key . '_type'] = $lang['Auth_Users_granted_access']; ! break; ! ! case AUTH_MOD: ! $auth_user[$key] = ( $userdata['session_logged_in'] ) ? mx_auth_group_cache( $f_access_group ) || $is_admin : 0; ! $auth_user[$key . '_type'] = $lang['Auth_Moderators']; ! break; ! ! case AUTH_ADMIN: ! $auth_user[$key] = $is_admin; ! $auth_user[$key . '_type'] = $lang['Auth_Administrators']; ! break; ! ! default: ! $auth_user[$key] = 0; ! break; ! } ! } ! // Is user a moderator? ! // $auth_user['auth_mod'] = ( $userdata['session_logged_in'] ) ? mx_auth_group_cache( $f_access_group ) || $is_admin : 0; ! ! return $auth_user; ! } ! ! // New optimized get_auth_forum ! // Credits to Markus_Petrux :-) ! function get_auth_forum( $mode = 'phpbb' ) ! { ! global $userdata, $mx_root_path, $phpEx; ! ! switch ( $mode ) ! { ! case 'phpbb': ! ! // Try to reuse auth_view query result. ! $userdata_key = 'mx_get_auth_forum' . $userdata['user_id']; ! if ( !empty( $userdata[$userdata_key] ) ) ! { ! $auth_data_sql = $userdata[$userdata_key]; ! return $auth_data_sql; ! } ! // Now, this tries to optimize DB access involved in auth(), ! // passing AUTH_LIST_ALL will load info for all forums at once. ! $is_auth_ary = auth( AUTH_VIEW, AUTH_LIST_ALL, $userdata ); ! // Loop through the list of forums to retrieve the ids for ! // those with AUTH_VIEW allowed. ! $auth_data_sql = ''; ! foreach( $is_auth_ary as $fid => $is_auth_row ) ! { ! if ( $is_auth_row['auth_view'] ) ! { ! $auth_data_sql .= ( $auth_data_sql != '' ) ? ', ' . $fid : $fid; ! } ! } ! ! if ( empty( $auth_data_sql ) ) ! { ! $auth_data_sql = -1; ! } ! $userdata[$userdata_key] = $auth_data_sql; ! return $auth_data_sql; ! break; ! ! case 'kb': ! ! // Try to reuse auth_view query result. ! $userdata_key = 'mx_get_auth_kb' . $userdata['user_id']; ! if ( !empty( $userdata[$userdata_key] ) ) ! { ! $auth_data_sql = $userdata[$userdata_key]; ! return $auth_data_sql; ! } ! // Now, this tries to optimize DB access involved in auth(), ! // passing AUTH_LIST_ALL will load info for all forums at once. ! ! include_once( $mx_root_path . 'modules/mx_kb/includes/functions_kb_auth.' . $phpEx ); ! $is_auth_ary = kb_auth( AUTH_VIEW, AUTH_LIST_ALL, $userdata ); ! // Loop through the list of forums to retrieve the ids for ! // those with AUTH_VIEW allowed. ! $auth_data_sql = ''; ! foreach( $is_auth_ary as $fid => $is_auth_row ) ! { ! if ( $is_auth_row['auth_view'] ) ! { ! $auth_data_sql .= ( $auth_data_sql != '' ) ? ', ' . $fid : $fid; ! } ! } ! ! if ( empty( $auth_data_sql ) ) ! { ! $auth_data_sql = -1; ! } ! $userdata[$userdata_key] = $auth_data_sql; ! return $auth_data_sql; ! break; ! default: ! //nothing ! break; ! } ! ! } ! ! // MX add-on ! // Check if user $user_id belongs to group $group_id (or group ids x1, x2, x3 etc) ! // ...function based on original function written by AbelaJohnB :-) ! function mx_auth_group( $group_ids = '', $user_id = '', $group_mod_mode = false ) ! { ! global $db; ! global $mx_root_path, $module_root_path, $page_id, $phpEx, $is_block; ! ! echo('x'); ! ! if ( $user_id == '' ) ! { ! message_die( GENERAL_ERROR, "no valid group function call, user_id:" . $user_id . ", group_id:" . $group_ids, '', '', '', '' ); ! } ! ! if ( $group_ids == '' ) ! { ! return false; ! } ! ! $group_ids_array = explode(",", $group_ids); ! ! for ( $i = 0; $i < count( $group_ids_array ); $i++ ) ! { ! if ( $group_mod_mode ) ! { ! // Check if user is group moderator.. ! $sql = "SELECT * FROM " . GROUPS_TABLE . " WHERE group_id='" . $group_ids_array[$i] . "' AND group_moderator='" . $user_id . "' AND user_pending = 0 LIMIT 1"; ! } ! else ! { ! // Check if user is member of the proper group.. ! $sql = "SELECT * FROM " . USER_GROUP_TABLE . " WHERE group_id='" . $group_ids_array[$i] . "' AND user_id='" . $user_id . "' AND user_pending = 0 LIMIT 1"; ! } ! ! if ( !( $result = $db->sql_query( $sql ) ) ) ! { ! message_die( GENERAL_ERROR, "Could not query group rights information", '', '', '', '' ); ! } ! ! if ( $db->sql_numrows( $result ) != 0 ) ! { ! $is_member = true; ! return $is_member; ! } ! ! } ! return false; ! } ! ! // Validates if user belongs to group included in group_ids list ! // Also, adds all usergroups to userdata array ! function mx_auth_group_cache( $group_ids = '', $group_mod_mode = false ) ! { ! global $userdata, $db; ! ! if ( $group_ids == '' ) ! { ! return false; ! } ! ! $group_ids_array = explode(",", $group_ids); ! ! // Try to reuse usergroups result. ! if ( $group_mod_mode ) ! { ! $userdata_key = 'mx_usergroups_mod' . $userdata['user_id']; ! ! if ( empty( $userdata[$userdata_key] ) ) ! { ! // Check if user is group moderator.. ! $sql = "SELECT gr.group_id ! FROM " . GROUPS_TABLE . " gr, ! " . USER_GROUP_TABLE . " ugr ! WHERE gr.group_id = ugr.group_id ! AND gr.group_moderator = '" . $userdata['user_id'] . "' ! AND ugr.user_pending = '0' "; ! ! if ( !( $result = $db->sql_query( $sql ) ) ) ! { ! message_die( GENERAL_ERROR, "Could not query group rights information", '', '', '', '' ); ! } ! ! $group_row = $db->sql_fetchrowset( $result ); ! ! $userdata[$userdata_key_mod] = $group_row; ! } ! } ! else ! { ! $userdata_key = 'mx_usergroups' . $userdata['user_id']; ! ! if ( empty( $userdata[$userdata_key] ) ) ! { ! // Check if user is member of the proper group.. ! $sql = "SELECT group_id FROM " . USER_GROUP_TABLE . " WHERE user_id='" . $userdata['user_id'] . "' AND user_pending = 0"; ! ! if ( !( $result = $db->sql_query( $sql ) ) ) ! { ! message_die( GENERAL_ERROR, "Could not query group rights information", '', '', '', '' ); ! } ! ! $group_row = $db->sql_fetchrowset( $result ); ! ! $userdata[$userdata_key] = $group_row; ! } ! } ! ! for ( $i = 0; $i < count( $userdata[$userdata_key] ); $i++ ) ! { ! if ( in_array( $userdata[$userdata_key][$i]['group_id'], $group_ids_array ) ) ! { ! $is_member = true; ! return $is_member; ! } ! } ! ! return false; ! } ?> \ No newline at end of file --- 1,464 ---- ! <?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$ ! */ ! ! /** ! * 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. ! */ ! ! /** ! * Included functions in this file: ! * - block_auth ! * - page_auth ! * - menu_auth ! * - mx_auth_check_user (from auth.php - validated for phpbb 2.0.10) ! * - get_auth_forum ! * - mx_auth_group_cache ! */ ! ! /* ! $type's accepted (pre-pend with AUTH_): ! VIEW, READ, POST, REPLY, EDIT, DELETE, STICKY, ANNOUNCE, VOTE, POLLCREATE ! ! Possible options ($type/module_id combinations): ! ! * If you include a type and module_id then a specific lookup will be done and ! the single result returned ! ! * If you set type to AUTH_ALL and specify a module_id an array of all auth types ! will be returned ! ! * If you provide a module_id a specific lookup on that module will be done ! ! * If you set module_id to AUTH_LIST_ALL and specify a type an array listing the ! results for all modules will be returned ! ! * If you set module_id to AUTH_LIST_ALL and type to AUTH_ALL a multidimensional ! array containing the auth permissions for all types and all modules for that ! user is returned ! ! All results are returned as associative arrays, even when a single auth type is ! specified. ! ! If available you can send an array (either one or two dimensional) containing the ! module auth levels, this will prevent the auth function having to do its own ! lookup ! */ ! function block_auth( $type, $module_id, $userdata, $f_access = '', $f_access_group = '' ) ! { ! global $db, $lang; ! ! switch ( $type ) ! { ! // case AUTH_ALL: ! // $a_sql = 'a.auth_view, a.auth_edit, a.auth_delete'; ! // $a_sql_groups = 'a.auth_view_group, a.auth_edit_group, a.auth_delete_group'; ! // $auth_fields = array( 'auth_view', 'auth_edit', 'auth_delete' ); ! // $auth_fields_groups = array( 'auth_view_group', 'auth_edit_group', 'auth_delete_group' ); ! // break; ! ! case AUTH_VIEW: ! $a_sql = 'a.auth_view'; ! $a_sql_groups = 'a.auth_view_group'; ! $auth_fields = array( 'auth_view' ); ! $auth_fields_groups = array( 'auth_view_group' ); ! break; ! ! case AUTH_EDIT: ! $a_sql = 'a.auth_edit'; ! $a_sql_groups = 'a.auth_edit_group'; ! $auth_fields = array( 'auth_edit' ); ! $auth_fields_groups = array( 'auth_edit_group' ); ! break; ! ! case AUTH_DELETE: ! $a_sql = 'a.auth_delete'; ! $a_sql_groups = 'a.auth_delete_group'; ! $auth_fields = array( 'auth_delete' ); ! $auth_fields_groups = array( 'auth_delete_group' ); ! break; ! ! default: ! break; ! } ! ! if ( $module_id == 0 ) ! { ! if ( $userdata['user_level'] == ADMIN && $userdata['session_logged_in'] ) ! { ! $auth_user[$auth_fields[0]] = 1; ! $auth_user[$auth_fields[0] . '_type'] = $lang['Auth_Moderators']; ! } ! else ! { ! $auth_user[$auth_fields[0]] = 0; ! $auth_user[$auth_fields[0] . '_type'] = $lang['Auth_Moderators']; ! } ! return $auth_user; ! } ! ! $is_admin = ( $userdata['user_level'] == ADMIN && $userdata['session_logged_in'] ) ? true : 0; ! ! $auth_user = array(); ! for( $i = 0; $i < count( $auth_fields ); $i++ ) ! { ! $key = $auth_fields[$i]; ! $key_groups = $auth_fields_groups[$i]; ! // If the user is logged on and the module type is either ALL or REG then the user has access ! // If the type if ACL, MOD or ADMIN then we need to see if the user has specific permissions ! // to do whatever it is they want to do ... to do this we pull relevant information for the ! // user (and any groups they belong to) ! // Now we compare the users access level against the modules. We assume here that a moderator ! // and admin automatically have access to an ACL module, similarly we assume admins meet an ! // auth requirement of MOD ! $value = $f_access[$key]; ! // $value_groups = $f_access_group[$key_groups]; ! $value_groups = $f_access_group; ! ! switch ( $value ) ! { ! case AUTH_ALL: ! $auth_user[$key] = true; ! $auth_user[$key . '_type'] = $lang['Auth_Anonymous_users']; ! break; ! ! case AUTH_REG: ! $auth_user[$key] = ( $userdata['session_logged_in'] ) ? true : 0; ! $auth_user[$key . '_type'] = $lang['Auth_Registered_Users']; ! break; ! ! case AUTH_ANONYMOUS: ! $auth_user[$key] = ( ! $userdata['session_logged_in'] ) ? true : 0; ! $auth_user[$key . '_type'] = $lang['Auth_Anonymous_users']; ! break; ! ! case AUTH_ACL: // PRIVATE ! $auth_user[$key] = ( $userdata['session_logged_in'] ) ? mx_auth_group( $value_groups ) || $is_admin : 0; ! $auth_user[$key . '_type'] = $lang['Auth_Users_granted_access']; ! break; ! ! case AUTH_MOD: ! $auth_user[$key] = ( $userdata['session_logged_in'] ) ? mx_auth_group( $f_access_group['auth_moderator_group'] ) || $is_admin : 0; ! $auth_user[$key . '_type'] = $lang['Auth_Moderators']; ! break; ! ! case AUTH_ADMIN: ! $auth_user[$key] = $is_admin; ! $auth_user[$key . '_type'] = $lang['Auth_Administrators']; ! break; ! ! default: ! $auth_user[$key] = 0; ! break; ! } ! } ! // Is user a moderator? ! $auth_user['auth_mod'] = ( $userdata['session_logged_in'] ) ? mx_auth_group( $f_access_group['auth_moderator_group'] ) || $is_admin : 0; ! ! return $auth_user; ! } ! ! function page_auth( $type, $userdata, $f_access = '', $f_access_group = '' ) ! { ! global $db, $lang; ! ! $a_sql = 'a.auth_view'; ! $a_sql_groups = 'a.auth_view_group'; ! $auth_fields = array( 'auth_view' ); ! $auth_fields_groups = array( 'auth_view_group' ); ! ! $is_admin = ( $userdata['user_level'] == ADMIN && $userdata['session_logged_in'] ) ? true : 0; ! ! $auth_user = array(); ! for( $i = 0; $i < count( $auth_fields ); $i++ ) ! { ! $key = $auth_fields[$i]; ! $key_groups = $auth_fields_groups[$i]; ! ! $value = $f_access[$key]; ! // $value_groups = $f_access_group[$key_groups]; ! $value_groups = $f_access_group; ! ! switch ( $value ) ! { ! case AUTH_ALL: ! $auth_user[$key] = true; ! $auth_user[$key . '_type'] = $lang['Auth_Anonymous_users']; ! break; ! ! case AUTH_REG: ! $auth_user[$key] = ( $userdata['session_logged_in'] ) ? true : 0; ! $auth_user[$key . '_type'] = $lang['Auth_Registered_Users']; ! break; ! ! case AUTH_ANONYMOUS: ! $auth_user[$key] = ( ! $userdata['session_logged_in'] ) ? true : 0; ! $auth_user[$key . '_type'] = $lang['Auth_Anonymous_users']; ! break; ! ! case AUTH_ACL: // PRIVATE ! $auth_user[$key] = ( $userdata['session_logged_in'] ) ? mx_auth_group( $value_groups ) || $is_admin : 0; ! $auth_user[$key . '_type'] = $lang['Auth_Users_granted_access']; ! break; ! ! case AUTH_MOD: ! $auth_user[$key] = ( $userdata['session_logged_in'] ) ? mx_auth_group( $f_access_group['auth_moderator_group'] ) || $is_admin : 0; ! $auth_user[$key . '_type'] = $lang['Auth_Moderators']; ! break; ! ! case AUTH_ADMIN: ! $auth_user[$key] = $is_admin; ! $auth_user[$key . '_type'] = $lang['Auth_Administrators']; ! break; ! ! default: ! $auth_user[$key] = 0; ! break; ! } ! } ! // Is user a moderator? ! $auth_user['auth_mod'] = ( $userdata['session_logged_in'] ) ? mx_auth_group( $f_access_group['auth_moderator_group'] ) || $is_admin : 0; ! ! return $auth_user; ! } ! // ************************************************************************** ! function menu_auth( $type, $menu_id, $userdata, $f_access = '', $f_access_group = '' ) ! { ! global $db, $lang; ! ! switch ( $type ) ! { ! case AUTH_ALL: ! $a_sql = 'a.auth_view'; ! $auth_fields = array( 'auth_view' ); ! break; ! ! case AUTH_VIEW: ! $a_sql = 'a.auth_view'; ! $auth_fields = array( 'auth_view' ); ! break; ! ! default: ! break; ! } ! // If f_access has been passed, or auth is needed to return an array of menus ! // then we need to pull the auth information on the given menu (or all menus) ! $is_admin = ( $userdata['user_level'] == ADMIN && $userdata['session_logged_in'] ) ? true : 0; ! ! $auth_user = array(); ! for( $i = 0; $i < count( $auth_fields ); $i++ ) ! { ! $key = $auth_fields[$i]; ! // If the user is logged on and the menu type is either ALL or REG then the user has access ! // If the type if ACL, MOD or ADMIN then we need to see if the user has specific permissions ! // to do whatever it is they want to do ... to do this we pull relevant information for the ! // user (and any groups they belong to) ! // Now we compare the users access level against the menus. We assume here that a moderator ! // and admin automatically have access to an ACL menu, similarly we assume admins meet an ! // auth requirement of MOD ! $value = $f_access[$key]; ! ! switch ( $value ) ! { ! case AUTH_ALL: ! $auth_user[$key] = true; ! $auth_user[$key . '_type'] = $lang['Auth_Anonymous_users']; ! break; ! ! case AUTH_REG: ! $auth_user[$key] = ( $userdata['session_logged_in'] ) ? true : 0; ! $auth_user[$key . '_type'] = $lang['Auth_Registered_Users']; ! break; ! ! case AUTH_ANONYMOUS: ! $auth_user[$key] = ( ! $userdata['session_logged_in'] ) ? true : 0; ! $auth_user[$key . '_type'] = $lang['Auth_Anonymous_users']; ! break; ! ! case AUTH_ACL: ! $auth_user[$key] = ( $userdata['session_logged_in'] ) ? mx_auth_group( $f_access_group ) || $is_admin : 0; ! $auth_user[$key . '_type'] = $lang['Auth_Users_granted_access']; ! break; ! ! case AUTH_MOD: ! $auth_user[$key] = ( $userdata['session_logged_in'] ) ? mx_auth_group( $f_access_group ) || $is_admin : 0; ! $auth_user[$key . '_type'] = $lang['Auth_Moderators']; ! break; ! ! case AUTH_ADMIN: ! $auth_user[$key] = $is_admin; ! $auth_user[$key . '_type'] = $lang['Auth_Administrators']; ! break; ! ! default: ! $auth_user[$key] = 0; ! break; ! } ! } ! // Is user a moderator? ! // $auth_user['auth_mod'] = ( $userdata['session_logged_in'] ) ? mx_auth_group( $f_access_group ) || $is_admin : 0; ! ! return $auth_user; ! } ! ! // New optimized get_auth_forum ! // Credits to Markus_Petrux :-) ! function get_auth_forum( $mode = 'phpbb' ) ! { ! global $userdata, $mx_root_path, $phpEx; ! ! switch ( $mode ) ! { ! case 'phpbb': ! ! // Try to reuse auth_view query result. ! $userdata_key = 'mx_get_auth_forum' . $userdata['user_id']; ! if ( !empty( $userdata[$userdata_key] ) ) ! { ! $auth_data_sql = $userdata[$userdata_key]; ! return $auth_data_sql; ! } ! // Now, this tries to optimize DB access involved in auth(), ! // passing AUTH_LIST_ALL will load info for all forums at once. ! $is_auth_ary = auth( AUTH_VIEW, AUTH_LIST_ALL, $userdata ); ! // Loop through the list of forums to retrieve the ids for ! // those with AUTH_VIEW allowed. ! $auth_data_sql = ''; ! foreach( $is_auth_ary as $fid => $is_auth_row ) ! { ! if ( $is_auth_row['auth_view'] ) ! { ! $auth_data_sql .= ( $auth_data_sql != '' ) ? ', ' . $fid : $fid; ! } ! } ! ! if ( empty( $auth_data_sql ) ) ! { ! $auth_data_sql = -1; ! } ! $userdata[$userdata_key] = $auth_data_sql; ! return $auth_data_sql; ! break; ! ! case 'kb': ! ! // Try to reuse auth_view query result. ! $userdata_key = 'mx_get_auth_kb' . $userdata['user_id']; ! if ( !empty( $userdata[$userdata_key] ) ) ! { ! $auth_data_sql = $userdata[$userdata_key]; ! return $auth_data_sql; ! } ! // Now, this tries to optimize DB access involved in auth(), ! // passing AUTH_LIST_ALL will load info for all forums at once. ! ! include_once( $mx_root_path . 'modules/mx_kb/includes/functions_kb_auth.' . $phpEx ); ! $is_auth_ary = kb_auth( AUTH_VIEW, AUTH_LIST_ALL, $userdata ); ! // Loop through the list of forums to retrieve the ids for ! // those with AUTH_VIEW allowed. ! $auth_data_sql = ''; ! foreach( $is_auth_ary as $fid => $is_auth_row ) ! { ! if ( $is_auth_row['auth_view'] ) ! { ! $auth_data_sql .= ( $auth_data_sql != '' ) ? ', ' . $fid : $fid; ! } ! } ! ! if ( empty( $auth_data_sql ) ) ! { ! $auth_data_sql = -1; ! } ! $userdata[$userdata_key] = $auth_data_sql; ! return $auth_data_sql; ! break; ! default: ! //nothing ! break; ! } ! ! } ! ! // Validates if user belongs to group included in group_ids list ! // Also, adds all usergroups to userdata array ! function mx_auth_group( $group_ids = '', $group_mod_mode = false ) ! { ! global $userdata, $db; ! ! if ( $group_ids == '' ) ! { ! return false; ! } ! ! $group_ids_array = explode(",", $group_ids); ! ! // Try to reuse usergroups result. ! if ( $group_mod_mode ) ! { ! $userdata_key = 'mx_usergroups_mod' . $userdata['user_id']; ! ! if ( empty( $userdata[$userdata_key] ) ) ! { ! // Check if user is group moderator.. ! $sql = "SELECT gr.group_id ! FROM " . GROUPS_TABLE . " gr, ! " . USER_GROUP_TABLE . " ugr ! WHERE gr.group_id = ugr.group_id ! AND gr.group_moderator = '" . $userdata['user_id'] . "' ! AND ugr.user_pending = '0' "; ! ! if ( !( $result = $db->sql_query( $sql ) ) ) ! { ! message_die( GENERAL_ERROR, "Could not query group rights information", '', '', '', '' ); ! } ! ! $group_row = $db->sql_fetchrowset( $result ); ! ! $userdata[$userdata_key_mod] = $group_row; ! } ! } ! else ! { ! $userdata_key = 'mx_usergroups' . $userdata['user_id']; ! ! if ( empty( $userdata[$userdata_key] ) ) ! { ! // Check if user is member of the proper group.. ! $sql = "SELECT group_id FROM " . USER_GROUP_TABLE . " WHERE user_id='" . $userdata['user_id'] . "' AND user_pending = 0"; ! ! if ( !( $result = $db->sql_query( $sql ) ) ) ! { ! message_die( GENERAL_ERROR, "Could not query group rights information", '', '', '', '' ); ! } ! ! $group_row = $db->sql_fetchrowset( $result ); ! ! $userdata[$userdata_key] = $group_row; ! } ! } ! ! for ( $i = 0; $i < count( $userdata[$userdata_key] ); $i++ ) ! { ! if ( in_array( $userdata[$userdata_key][$i]['group_id'], $group_ids_array ) ) ! { ! $is_member = true; ! return $is_member; ! } ! } ! ! return false; ! } ?> \ No newline at end of file |
|
From: Jon O. <jon...@us...> - 2005-04-12 21:10:43
|
Update of /cvsroot/mxbb/core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29720 Modified Files: common.php index.php Log Message: i have renamed mx_auth_group_cache to mx_auth_group and removed old function with shorter name ;) ...to make it clearer Index: common.php =================================================================== RCS file: /cvsroot/mxbb/core/common.php,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** common.php 17 Mar 2005 11:30:35 -0000 1.28 --- common.php 12 Apr 2005 21:10:32 -0000 1.29 *************** *** 1,278 **** ! <?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 : ! * ------------------------------------------------------------------------- ! * 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" ); ! } ! ! define( 'IN_PHPBB', 1 ); ! @session_start(); ! ! error_reporting (E_ERROR | E_WARNING | E_PARSE); // This will NOT report uninitialized variables ! set_magic_quotes_runtime(0); // Disable magic_quotes_runtime ! ! // The following code (unsetting globals) was contributed by Matt Kavanagh ! ! // PHP5 with register_long_arrays off? ! if (!isset($HTTP_POST_VARS) && isset($_POST)) ! { ! $HTTP_POST_VARS = $_POST; ! $HTTP_GET_VARS = $_GET; ! $HTTP_SERVER_VARS = $_SERVER; ! $HTTP_COOKIE_VARS = $_COOKIE; ! $HTTP_ENV_VARS = $_ENV; ! $HTTP_POST_FILES = $_FILES; ! ! // _SESSION is the only superglobal which is conditionally set ! if (isset($_SESSION)) ! { ! $HTTP_SESSION_VARS = $_SESSION; ! } ! } ! ! if (@phpversion() < '4.0.0') ! { ! // PHP3 path; in PHP3, globals are _always_ registered ! ! // We 'flip' the array of variables to test like this so that ! // we can validate later with isset($test[$var]) (no in_array()) ! $test = array('HTTP_GET_VARS' => NULL, 'HTTP_POST_VARS' => NULL, 'HTTP_COOKIE_VARS' => NULL, 'HTTP_SERVER_VARS' => NULL, 'HTTP_ENV_VARS' => NULL, 'HTTP_POST_FILES' => NULL, 'phpEx' => NULL, 'phpbb_root_path' => NULL); ! ! // Loop through each input array ! @reset($test); ! while (list($input,) = @each($test)) ! { ! while (list($var,) = @each($$input)) ! { ! // Validate the variable to be unset ! if (!isset($test[$var]) && $var != 'test' && $var != 'input') ! { ! unset($$var); ! } ! } ! } ! } ! else if (@ini_get('register_globals') == '1' || strtolower(@ini_get('register_globals')) == 'on') ! { ! // PHP4+ path ! $not_unset = array('HTTP_GET_VARS', 'HTTP_POST_VARS', 'HTTP_COOKIE_VARS', 'HTTP_SERVER_VARS', 'HTTP_SESSION_VARS', 'HTTP_ENV_VARS', 'HTTP_POST_FILES', 'phpEx', 'phpbb_root_path'); ! ! // Not only will array_merge give a warning if a parameter ! // is not an array, it will actually fail. So we check if ! // HTTP_SESSION_VARS has been initialised. ! if (!isset($HTTP_SESSION_VARS)) ! { ! $HTTP_SESSION_VARS = array(); ! } ! ! // Merge all into one extremely huge array; unset ! // this later ! $input = array_merge($HTTP_GET_VARS, $HTTP_POST_VARS, $HTTP_COOKIE_VARS, $HTTP_SERVER_VARS, $HTTP_SESSION_VARS, $HTTP_ENV_VARS, $HTTP_POST_FILES); ! ! unset($input['input']); ! unset($input['not_unset']); ! ! while (list($var,) = @each($input)) ! { ! if (!in_array($var, $not_unset)) ! { ! unset($$var); ! } ! unset($$var); ! } ! ! unset($input); ! } ! ! // ! // addslashes to vars if magic_quotes_gpc is off ! // this is a security precaution to prevent someone ! // trying to break out of a SQL statement. ! // ! if( !get_magic_quotes_gpc() ) ! { ! if( is_array($HTTP_GET_VARS) ) ! { ! while( list($k, $v) = each($HTTP_GET_VARS) ) ! { ! if( is_array($HTTP_GET_VARS[$k]) ) ! { ! while( list($k2, $v2) = each($HTTP_GET_VARS[$k]) ) ! { ! $HTTP_GET_VARS[$k][$k2] = addslashes($v2); ! } ! @reset($HTTP_GET_VARS[$k]); ! } ! else ! { ! $HTTP_GET_VARS[$k] = addslashes($v); ! } ! } ! @reset($HTTP_GET_VARS); ! } ! ! if( is_array($HTTP_POST_VARS) ) ! { ! while( list($k, $v) = each($HTTP_POST_VARS) ) ! { ! if( is_array($HTTP_POST_VARS[$k]) ) ! { ! while( list($k2, $v2) = each($HTTP_POST_VARS[$k]) ) ! { ! $HTTP_POST_VARS[$k][$k2] = addslashes($v2); ! } ! @reset($HTTP_POST_VARS[$k]); ! } ! else ! { ! $HTTP_POST_VARS[$k] = addslashes($v); ! } ! } ! @reset($HTTP_POST_VARS); ! } ! ! if( is_array($HTTP_COOKIE_VARS) ) ! { ! while( list($k, $v) = each($HTTP_COOKIE_VARS) ) ! { ! if( is_array($HTTP_COOKIE_VARS[$k]) ) ! { ! while( list($k2, $v2) = each($HTTP_COOKIE_VARS[$k]) ) ! { ! $HTTP_COOKIE_VARS[$k][$k2] = addslashes($v2); ! } ! @reset($HTTP_COOKIE_VARS[$k]); ! } ! else ! { ! $HTTP_COOKIE_VARS[$k] = addslashes($v); ! } ! } ! @reset($HTTP_COOKIE_VARS); ! } ! } ! ! // Define some basic configuration arrays this also prevents ! // malicious rewriting of language and otherarray values via ! // URI params ! ! $board_config = array(); ! $userdata = array(); ! $theme = array(); ! $images = array(); ! $lang = array(); ! $nav_links = array(); ! $gen_simple_header = false; ! ! @include_once( $mx_root_path . 'config.' . $phpEx ); ! ! if ( !defined( "MX_INSTALLED" ) ) ! { ! header( "Location: install/mx_install.$phpEx" ); ! exit; ! } ! ! str_replace( "//", "/", $phpbb_root_path ); ! include_once( $mx_root_path . 'config.' . $phpEx ); ! ! include_once( $phpbb_root_path . 'includes/constants.' . $phpEx ); ! include_once( $mx_root_path . 'includes/template.' . $phpEx ); ! include_once( $phpbb_root_path . 'includes/sessions.' . $phpEx ); ! include_once( $phpbb_root_path . 'includes/auth.' . $phpEx ); ! include_once( $phpbb_root_path . 'includes/functions.' . $phpEx ); ! include_once( $phpbb_root_path . 'includes/db.' . $phpEx ); ! include_once( $phpbb_root_path . 'includes/functions_selects.' . $phpEx ); ! include_once( $phpbb_root_path . 'includes/bbcode.' . $phpEx ); ! ! include_once( $mx_root_path . 'includes/mx_constants.' . $phpEx ); ! include_once( $mx_root_path . 'includes/mx_functions.' . $phpEx ); ! include_once( $mx_root_path . 'includes/mx_functions_phpbb.' . $phpEx ); ! include_once( $mx_root_path . 'includes/mx_auth.' . $phpEx ); ! include_once( $mx_root_path . 'includes/mx_cache.' . $phpEx ); ! ! /* ! if ( !empty( $HTTP_SESSION_VARS['mx_config'] ) ) ! { ! $portal_config = $HTTP_SESSION_VARS['mx_config']; ! } ! else ! { ! $portal_config = get_info( PORTAL_TABLE, 'portal_id', 1 ); ! $HTTP_SESSION_VARS['mx_config'] = $portal_config; ! } ! */ ! ! $portal_config = get_info( PORTAL_TABLE, 'portal_id', 1 ); ! define( 'PHPBB_URL', $portal_config['portal_phpbb_url'] ); ! define( 'PORTAL_URL', $portal_config['portal_url'] ); ! define( 'PORTAL_VERSION', $portal_config['portal_version'] ); ! ! // instatiate the mx_request_vars class ! ! $mx_request_vars = new mx_request_vars(); ! ! // Obtain and encode users IP ! ! // I'm removing HTTP_X_FORWARDED_FOR ... this may well cause other problems such as ! // private range IP's appearing instead of the guilty routable IP, tough, don't ! // even bother complaining ... go scream and shout at the idiots out there who feel ! // "clever" is doing harm rather than good ... karma is a great thing ... :) ! ! $client_ip = ( !empty( $HTTP_SERVER_VARS['REMOTE_ADDR'] ) ) ? $HTTP_SERVER_VARS['REMOTE_ADDR'] : ( ( !empty( $HTTP_ENV_VARS['REMOTE_ADDR'] ) ) ? $HTTP_ENV_VARS['REMOTE_ADDR'] : $REMOTE_ADDR ); ! $user_ip = encode_ip( $client_ip ); ! ! // Setup forum wide options, if this fails ! // then we output a CRITICAL_ERROR since ! // basic forum information is not available ! ! $sql = "SELECT * ! FROM " . CONFIG_TABLE; ! if ( !( $result = $db->sql_query( $sql ) ) ) ! { ! mx_message_die( CRITICAL_ERROR, "Could not query config information", "", __LINE__, __FILE__, $sql ); ! } ! ! while ( $row = $db->sql_fetchrow( $result ) ) ! { ! $board_config[$row['config_name']] = $row['config_value']; ! } ! ! if ( file_exists( $phpbb_root_path . 'attach_mod' ) ) ! { ! include_once( $phpbb_root_path . 'attach_mod/attachment_mod.' . $phpEx ); ! } ! ! if ( file_exists( 'install' ) || file_exists( 'contrib' ) ) ! { ! mx_message_die( GENERAL_MESSAGE, 'Please ensure both the install/ and contrib/ directories are deleted' ); ! } ! ! // Show 'Board is disabled' message if needed. ! ! if ( $board_config['board_disable'] && !defined( "IN_ADMIN" ) && !defined( "IN_LOGIN" ) ) ! { ! mx_message_die( GENERAL_MESSAGE, 'Board_disable', 'Information' ); ! } ! ?> \ No newline at end of file --- 1,279 ---- ! <?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 : ! * ------------------------------------------------------------------------- ! * 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" ); ! } ! ! define( 'IN_PHPBB', 1 ); ! @session_start(); ! ! error_reporting (E_ERROR | E_WARNING | E_PARSE); // This will NOT report uninitialized variables ! set_magic_quotes_runtime(0); // Disable magic_quotes_runtime ! ! // The following code (unsetting globals) was contributed by Matt Kavanagh ! ! // PHP5 with register_long_arrays off? ! if (!isset($HTTP_POST_VARS) && isset($_POST)) ! { ! $HTTP_POST_VARS = $_POST; ! $HTTP_GET_VARS = $_GET; ! $HTTP_SERVER_VARS = $_SERVER; ! $HTTP_COOKIE_VARS = $_COOKIE; ! $HTTP_ENV_VARS = $_ENV; ! $HTTP_POST_FILES = $_FILES; ! ! // _SESSION is the only superglobal which is conditionally set ! if (isset($_SESSION)) ! { ! $HTTP_SESSION_VARS = $_SESSION; ! } ! } ! ! if (@phpversion() < '4.0.0') ! { ! // PHP3 path; in PHP3, globals are _always_ registered ! ! // We 'flip' the array of variables to test like this so that ! // we can validate later with isset($test[$var]) (no in_array()) ! $test = array('HTTP_GET_VARS' => NULL, 'HTTP_POST_VARS' => NULL, 'HTTP_COOKIE_VARS' => NULL, 'HTTP_SERVER_VARS' => NULL, 'HTTP_ENV_VARS' => NULL, 'HTTP_POST_FILES' => NULL, 'phpEx' => NULL, 'phpbb_root_path' => NULL); ! ! // Loop through each input array ! @reset($test); ! while (list($input,) = @each($test)) ! { ! while (list($var,) = @each($$input)) ! { ! // Validate the variable to be unset ! if (!isset($test[$var]) && $var != 'test' && $var != 'input') ! { ! unset($$var); ! } ! } ! } ! } ! else if (@ini_get('register_globals') == '1' || strtolower(@ini_get('register_globals')) == 'on') ! { ! // PHP4+ path ! $not_unset = array('HTTP_GET_VARS', 'HTTP_POST_VARS', 'HTTP_COOKIE_VARS', 'HTTP_SERVER_VARS', 'HTTP_SESSION_VARS', 'HTTP_ENV_VARS', 'HTTP_POST_FILES', 'phpEx', 'phpbb_root_path'); ! ! // Not only will array_merge give a warning if a parameter ! // is not an array, it will actually fail. So we check if ! // HTTP_SESSION_VARS has been initialised. ! if (!isset($HTTP_SESSION_VARS)) ! { ! $HTTP_SESSION_VARS = array(); ! } ! ! // Merge all into one extremely huge array; unset ! // this later ! $input = array_merge($HTTP_GET_VARS, $HTTP_POST_VARS, $HTTP_COOKIE_VARS, $HTTP_SERVER_VARS, $HTTP_SESSION_VARS, $HTTP_ENV_VARS, $HTTP_POST_FILES); ! ! unset($input['input']); ! unset($input['not_unset']); ! ! while (list($var,) = @each($input)) ! { ! if (!in_array($var, $not_unset)) ! { ! unset($$var); ! } ! unset($$var); ! } ! ! unset($input); ! } ! ! // ! // addslashes to vars if magic_quotes_gpc is off ! // this is a security precaution to prevent someone ! // trying to break out of a SQL statement. ! // ! if( !get_magic_quotes_gpc() ) ! { ! if( is_array($HTTP_GET_VARS) ) ! { ! while( list($k, $v) = each($HTTP_GET_VARS) ) ! { ! if( is_array($HTTP_GET_VARS[$k]) ) ! { ! while( list($k2, $v2) = each($HTTP_GET_VARS[$k]) ) ! { ! $HTTP_GET_VARS[$k][$k2] = addslashes($v2); ! } ! @reset($HTTP_GET_VARS[$k]); ! } ! else ! { ! $HTTP_GET_VARS[$k] = addslashes($v); ! } ! } ! @reset($HTTP_GET_VARS); ! } ! ! if( is_array($HTTP_POST_VARS) ) ! { ! while( list($k, $v) = each($HTTP_POST_VARS) ) ! { ! if( is_array($HTTP_POST_VARS[$k]) ) ! { ! while( list($k2, $v2) = each($HTTP_POST_VARS[$k]) ) ! { ! $HTTP_POST_VARS[$k][$k2] = addslashes($v2); ! } ! @reset($HTTP_POST_VARS[$k]); ! } ! else ! { ! $HTTP_POST_VARS[$k] = addslashes($v); ! } ! } ! @reset($HTTP_POST_VARS); ! } ! ! if( is_array($HTTP_COOKIE_VARS) ) ! { ! while( list($k, $v) = each($HTTP_COOKIE_VARS) ) ! { ! if( is_array($HTTP_COOKIE_VARS[$k]) ) ! { ! while( list($k2, $v2) = each($HTTP_COOKIE_VARS[$k]) ) ! { ! $HTTP_COOKIE_VARS[$k][$k2] = addslashes($v2); ! } ! @reset($HTTP_COOKIE_VARS[$k]); ! } ! else ! { ! $HTTP_COOKIE_VARS[$k] = addslashes($v); ! } ! } ! @reset($HTTP_COOKIE_VARS); ! } ! } ! ! // Define some basic configuration arrays this also prevents ! // malicious rewriting of language and otherarray values via ! // URI params ! ! $board_config = array(); ! $userdata = array(); ! $theme = array(); ! $images = array(); ! $lang = array(); ! $nav_links = array(); ! $gen_simple_header = false; ! ! @include_once( $mx_root_path . 'config.' . $phpEx ); ! ! if ( !defined( "MX_INSTALLED" ) ) ! { ! header( "Location: install/mx_install.$phpEx" ); ! exit; ! } ! ! str_replace( "//", "/", $phpbb_root_path ); ! include_once( $mx_root_path . 'config.' . $phpEx ); ! ! include_once( $phpbb_root_path . 'includes/constants.' . $phpEx ); ! include_once( $mx_root_path . 'includes/template.' . $phpEx ); ! include_once( $phpbb_root_path . 'includes/sessions.' . $phpEx ); ! include_once( $phpbb_root_path . 'includes/auth.' . $phpEx ); ! include_once( $phpbb_root_path . 'includes/functions.' . $phpEx ); ! include_once( $phpbb_root_path . 'includes/db.' . $phpEx ); ! include_once( $phpbb_root_path . 'includes/functions_selects.' . $phpEx ); ! include_once( $phpbb_root_path . 'includes/bbcode.' . $phpEx ); ! ! include_once( $mx_root_path . 'includes/mx_constants.' . $phpEx ); ! include_once( $mx_root_path . 'includes/mx_functions.' . $phpEx ); ! include_once( $mx_root_path . 'includes/mx_functions_phpbb.' . $phpEx ); ! include_once( $mx_root_path . 'includes/mx_auth.' . $phpEx ); ! include_once( $mx_root_path . 'includes/mx_cache.' . $phpEx ); ! ! // Changed my mind to make this a session var. one more query (see directly below) to make it all more foolproof ;) ! /* ! if ( !empty( $HTTP_SESSION_VARS['mx_config'] ) ) ! { ! $portal_config = $HTTP_SESSION_VARS['mx_config']; ! } ! else ! { ! $portal_config = get_info( PORTAL_TABLE, 'portal_id', 1 ); ! $HTTP_SESSION_VARS['mx_config'] = $portal_config; ! } ! */ ! ! $portal_config = get_info( PORTAL_TABLE, 'portal_id', 1 ); ! define( 'PHPBB_URL', $portal_config['portal_phpbb_url'] ); ! define( 'PORTAL_URL', $portal_config['portal_url'] ); ! define( 'PORTAL_VERSION', $portal_config['portal_version'] ); ! ! // instatiate the mx_request_vars class ! ! $mx_request_vars = new mx_request_vars(); ! ! // Obtain and encode users IP ! ! // I'm removing HTTP_X_FORWARDED_FOR ... this may well cause other problems such as ! // private range IP's appearing instead of the guilty routable IP, tough, don't ! // even bother complaining ... go scream and shout at the idiots out there who feel ! // "clever" is doing harm rather than good ... karma is a great thing ... :) ! ! $client_ip = ( !empty( $HTTP_SERVER_VARS['REMOTE_ADDR'] ) ) ? $HTTP_SERVER_VARS['REMOTE_ADDR'] : ( ( !empty( $HTTP_ENV_VARS['REMOTE_ADDR'] ) ) ? $HTTP_ENV_VARS['REMOTE_ADDR'] : $REMOTE_ADDR ); ! $user_ip = encode_ip( $client_ip ); ! ! // Setup forum wide options, if this fails ! // then we output a CRITICAL_ERROR since ! // basic forum information is not available ! ! $sql = "SELECT * ! FROM " . CONFIG_TABLE; ! if ( !( $result = $db->sql_query( $sql ) ) ) ! { ! mx_message_die( CRITICAL_ERROR, "Could not query config information", "", __LINE__, __FILE__, $sql ); ! } ! ! while ( $row = $db->sql_fetchrow( $result ) ) ! { ! $board_config[$row['config_name']] = $row['config_value']; ! } ! ! if ( file_exists( $phpbb_root_path . 'attach_mod' ) ) ! { ! include_once( $phpbb_root_path . 'attach_mod/attachment_mod.' . $phpEx ); ! } ! ! if ( file_exists( 'install' ) || file_exists( 'contrib' ) ) ! { ! mx_message_die( GENERAL_MESSAGE, 'Please ensure both the install/ and contrib/ directories are deleted' ); ! } ! ! // Show 'Board is disabled' message if needed. ! ! if ( $board_config['board_disable'] && !defined( "IN_ADMIN" ) && !defined( "IN_LOGIN" ) ) ! { ! mx_message_die( GENERAL_MESSAGE, 'Board_disable', 'Information' ); ! } ! ?> \ No newline at end of file Index: index.php =================================================================== RCS file: /cvsroot/mxbb/core/index.php,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** index.php 12 Apr 2005 17:38:36 -0000 1.28 --- index.php 12 Apr 2005 21:10:33 -0000 1.29 *************** *** 186,194 **** )); - //if ( $block_rows[$block]['function_file'] != 'mx_multiple_blocks.php' ) - //{ - // $layouttemplate->assign_block_vars('layout_column.blocks.no_split', array()); - //} - // Switch: graphical block borders --- 186,189 ---- |