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: Jon O. <jon...@us...> - 2005-04-21 20:55:51
|
Update of /cvsroot/mxbb/mx_pafiledb/pafiledb/modules In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31188/modules/mx_pafiledb/pafiledb/modules Modified Files: pa_download.php pa_user_upload.php Log Message: updating for pafiledb 2.0.1 Index: pa_download.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/pafiledb/modules/pa_download.php,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** pa_download.php 9 Jan 2005 21:44:14 -0000 1.9 --- pa_download.php 21 Apr 2005 20:55:42 -0000 1.10 *************** *** 197,201 **** $this->display( $lang['Download'], 'pa_mirrors_body.tpl' ); include( $mx_root_path . 'includes/page_tail.' . $phpEx ); ! }elseif ( ( !empty( $mirrors_data ) && $mirror_id == -1 ) || ( empty( $mirrors_data ) ) ) { $real_filename = $file_data['real_name']; --- 197,202 ---- $this->display( $lang['Download'], 'pa_mirrors_body.tpl' ); include( $mx_root_path . 'includes/page_tail.' . $phpEx ); ! } ! elseif ( ( !empty( $mirrors_data ) && $mirror_id == -1 ) || ( empty( $mirrors_data ) ) ) { $real_filename = $file_data['real_name']; *************** *** 203,207 **** $upload_dir = ( !empty( $file_data['upload_dir'] ) ) ? $file_data['upload_dir'] : $pafiledb_config['upload_dir']; $file_url = $file_data['file_dlurl']; ! }elseif ( $mirror_id > 0 && !empty( $mirrors_data[$mirror_id] ) ) { $real_filename = $mirrors_data[$mirror_id]['real_name']; --- 204,209 ---- $upload_dir = ( !empty( $file_data['upload_dir'] ) ) ? $file_data['upload_dir'] : $pafiledb_config['upload_dir']; $file_url = $file_data['file_dlurl']; ! } ! elseif ( $mirror_id > 0 && !empty( $mirrors_data[$mirror_id] ) ) { $real_filename = $mirrors_data[$mirror_id]['real_name']; *************** *** 242,253 **** // now send the file to the user so he can enjoy it :D // ========================================================================= ! if ( $pafiledb_functions->get_extension( $physical_filename ) == 'pdf' ) { ! $file_url = $module_root_path . $upload_dir . $physical_filename; ! pa_redirect( $file_url ); ! }elseif ( !send_file_to_browser( $real_filename, 'application/force-download', $physical_filename, $module_root_path . $upload_dir ) ) { ! $file_url = $module_root_path . $upload_dir . $physical_filename; ! pa_redirect( $file_url ); } } --- 244,259 ---- // now send the file to the user so he can enjoy it :D // ========================================================================= ! if($pafiledb_functions->get_extension($physical_filename) == 'pdf') { ! $mimetype = 'application/pdf'; ! } ! else { ! $mimetype = 'application/force-download'; ! } ! ! if(!send_file_to_browser($real_filename, $mimetype, $physical_filename, $module_root_path . $upload_dir)) ! { ! message_die(GENERAL_ERROR, $lang['Error_no_download'] . '<br /><br /><b>404 File Not Found:</b> The File <i>' . $real_filename . '</i> does not exist.'); } } *************** *** 350,354 **** if ( $browser_agent == 'ie' ) { ! header( 'Content-Type: ' . $mimetype ); header( 'Content-Disposition: inline; filename="' . $real_filename . '"' ); } --- 356,360 ---- if ( $browser_agent == 'ie' ) { ! header( 'Content-Type: ' . $mimetype . '; name="' . $real_filename . '"' ); header( 'Content-Disposition: inline; filename="' . $real_filename . '"' ); } Index: pa_user_upload.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/pafiledb/modules/pa_user_upload.php,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** pa_user_upload.php 11 Apr 2005 17:55:41 -0000 1.10 --- pa_user_upload.php 21 Apr 2005 20:55:42 -0000 1.11 *************** *** 141,149 **** // PM notify ! $pa_admins = pa_get_admins( true); ! for ($i = 0; $i < count($pa_admins) || $i < 10; $ii) { ! pa_notify( $pafiledb_config['pm_notify'], $pa_message, $pa_admins[$i]['user_id'], $pa_pm['file_editor_id'], $info = 'new' ); } } --- 141,149 ---- // PM notify ! $pa_admins = pa_get_admins( true ); ! for ($i = 0; $i < count($pa_admins) || $i < 10; $i++) { ! pa_notify( $pafiledb_config['pm_notify'], $pa_message, $pa_admins[$i]['user_id'], $pa_pm['file_editor_id'], $info = 'new' ); } } |
|
From: Jon O. <jon...@us...> - 2005-04-21 20:55:51
|
Update of /cvsroot/mxbb/mx_pafiledb/templates/subSilver/admin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31188/modules/mx_pafiledb/templates/subSilver/admin Modified Files: pa_admin_file.tpl Log Message: updating for pafiledb 2.0.1 Index: pa_admin_file.tpl =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/templates/subSilver/admin/pa_admin_file.tpl,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** pa_admin_file.tpl 8 Dec 2003 00:24:39 -0000 1.2 --- pa_admin_file.tpl 21 Apr 2005 20:55:42 -0000 1.3 *************** *** 128,131 **** --- 128,132 ---- </table> </form> + <!-- BEGIN pagination --> <table width="100%" cellspacing="2" border="0" cellpadding="2"> <tr> *************** *** 136,137 **** --- 137,139 ---- </tr> </table> + <!-- END pagination --> |
|
From: Jon O. <jon...@us...> - 2005-04-21 20:55:51
|
Update of /cvsroot/mxbb/mx_pafiledb/admin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31188/modules/mx_pafiledb/admin Modified Files: admin_pa_catauth.php admin_pa_category.php admin_pa_custom.php admin_pa_fchecker.php admin_pa_file.php admin_pa_license.php admin_pa_settings.php admin_pa_ug_auth.php Log Message: updating for pafiledb 2.0.1 Index: admin_pa_fchecker.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/admin/admin_pa_fchecker.php,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** admin_pa_fchecker.php 11 Apr 2005 17:55:38 -0000 1.8 --- admin_pa_fchecker.php 21 Apr 2005 20:55:42 -0000 1.9 *************** *** 57,61 **** $mx_root_path = './../../../'; ! define( 'MXBB_27x', file_exists( $mx_root_path . 'more_smilies.php' ) ); require( $mx_root_path . 'extension.inc' ); --- 57,61 ---- $mx_root_path = './../../../'; ! define( 'MXBB_27x', file_exists( $mx_root_path . 'mx_login.php' ) ); require( $mx_root_path . 'extension.inc' ); Index: admin_pa_custom.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/admin/admin_pa_custom.php,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** admin_pa_custom.php 11 Apr 2005 17:55:38 -0000 1.9 --- admin_pa_custom.php 21 Apr 2005 20:55:42 -0000 1.10 *************** *** 59,63 **** $mx_root_path = './../../../'; ! define( 'MXBB_27x', file_exists( $mx_root_path . 'more_smilies.php' ) ); require( $mx_root_path . 'extension.inc' ); --- 59,63 ---- $mx_root_path = './../../../'; ! define( 'MXBB_27x', file_exists( $mx_root_path . 'mx_login.php' ) ); require( $mx_root_path . 'extension.inc' ); Index: admin_pa_category.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/admin/admin_pa_category.php,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** admin_pa_category.php 11 Apr 2005 17:55:38 -0000 1.8 --- admin_pa_category.php 21 Apr 2005 20:55:42 -0000 1.9 *************** *** 58,62 **** $mx_root_path = './../../../'; ! define( 'MXBB_27x', file_exists( $mx_root_path . 'more_smilies.php' ) ); require( $mx_root_path . 'extension.inc' ); --- 58,62 ---- $mx_root_path = './../../../'; ! define( 'MXBB_27x', file_exists( $mx_root_path . 'mx_login.php' ) ); require( $mx_root_path . 'extension.inc' ); Index: admin_pa_file.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/admin/admin_pa_file.php,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** admin_pa_file.php 11 Apr 2005 17:55:38 -0000 1.11 --- admin_pa_file.php 21 Apr 2005 20:55:42 -0000 1.12 *************** *** 58,62 **** $mx_root_path = './../../../'; ! define( 'MXBB_27x', file_exists( $mx_root_path . 'more_smilies.php' ) ); require( $mx_root_path . 'extension.inc' ); --- 58,62 ---- $mx_root_path = './../../../'; ! define( 'MXBB_27x', file_exists( $mx_root_path . 'mx_login.php' ) ); require( $mx_root_path . 'extension.inc' ); *************** *** 441,444 **** --- 441,449 ---- ); + if ( $total_files > 0 ) + { + $template->assign_block_vars( 'pagination', array() ); + } + foreach( $global_array as $files_data ) { Index: admin_pa_settings.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/admin/admin_pa_settings.php,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** admin_pa_settings.php 11 Apr 2005 17:55:39 -0000 1.9 --- admin_pa_settings.php 21 Apr 2005 20:55:42 -0000 1.10 *************** *** 57,61 **** $mx_root_path = './../../../'; ! define( 'MXBB_27x', file_exists( $mx_root_path . 'more_smilies.php' ) ); require( $mx_root_path . 'extension.inc' ); --- 57,61 ---- $mx_root_path = './../../../'; ! define( 'MXBB_27x', file_exists( $mx_root_path . 'mx_login.php' ) ); require( $mx_root_path . 'extension.inc' ); Index: admin_pa_ug_auth.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/admin/admin_pa_ug_auth.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** admin_pa_ug_auth.php 11 Apr 2005 17:55:39 -0000 1.5 --- admin_pa_ug_auth.php 21 Apr 2005 20:55:42 -0000 1.6 *************** *** 57,61 **** $mx_root_path = './../../../'; ! define( 'MXBB_27x', file_exists( $mx_root_path . 'more_smilies.php' ) ); require( $mx_root_path . 'extension.inc' ); --- 57,61 ---- $mx_root_path = './../../../'; ! define( 'MXBB_27x', file_exists( $mx_root_path . 'mx_login.php' ) ); require( $mx_root_path . 'extension.inc' ); Index: admin_pa_catauth.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/admin/admin_pa_catauth.php,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** admin_pa_catauth.php 11 Apr 2005 17:55:38 -0000 1.7 --- admin_pa_catauth.php 21 Apr 2005 20:55:42 -0000 1.8 *************** *** 57,61 **** $mx_root_path = './../../../'; ! define( 'MXBB_27x', file_exists( $mx_root_path . 'more_smilies.php' ) ); require( $mx_root_path . 'extension.inc' ); --- 57,61 ---- $mx_root_path = './../../../'; ! define( 'MXBB_27x', file_exists( $mx_root_path . 'mx_login.php' ) ); require( $mx_root_path . 'extension.inc' ); Index: admin_pa_license.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/admin/admin_pa_license.php,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** admin_pa_license.php 11 Apr 2005 17:55:38 -0000 1.8 --- admin_pa_license.php 21 Apr 2005 20:55:42 -0000 1.9 *************** *** 57,61 **** $mx_root_path = './../../../'; ! define( 'MXBB_27x', file_exists( $mx_root_path . 'more_smilies.php' ) ); require( $mx_root_path . 'extension.inc' ); --- 57,61 ---- $mx_root_path = './../../../'; ! define( 'MXBB_27x', file_exists( $mx_root_path . 'mx_login.php' ) ); require( $mx_root_path . 'extension.inc' ); |
|
From: Jon O. <jon...@us...> - 2005-04-21 19:36:55
|
Update of /cvsroot/mxbb/mx_kb In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17718/modules/mx_kb Modified Files: db_upgrade.php install.txt kb_article_reader.php upgrade_kb_tables.php Log Message: final fix before 2.0.2 release Index: db_upgrade.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/db_upgrade.php,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** db_upgrade.php 20 Apr 2005 19:30:19 -0000 1.23 --- db_upgrade.php 21 Apr 2005 19:36:16 -0000 1.24 *************** *** 72,76 **** $upgrade_200 = 0; $upgrade_201 = 0; ! $upgrade_202 = 1; $message = "<b>Upgrading!</b><br/><br/>"; --- 72,76 ---- $upgrade_200 = 0; $upgrade_201 = 0; ! $upgrade_202 = 0; $message = "<b>Upgrading!</b><br/><br/>"; *************** *** 152,155 **** --- 152,158 ---- } + $upgrade_202 = 1; + $message .= "<b>Upgrading to v. 2.02...ok</b><br/><br/>"; + // ------------------------------------------------------------------------------------------------------ if ( $upgrade_105 == 1 ) Index: install.txt =================================================================== RCS file: /cvsroot/mxbb/mx_kb/install.txt,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** install.txt 12 Apr 2005 19:30:42 -0000 1.3 --- install.txt 21 Apr 2005 19:36:16 -0000 1.4 *************** *** 41,44 **** --- 41,48 ---- ## - All patches 2.0.1a-e summarized in new version 2.0.2 ## - Minor fixes "forgotten" in version 2.0.1e + ## - tpl bug fixed for custom fields adminCP + ## - Number of articles in cat (subcat) fixed + ## - Hopefully the MAIL notification now works ;) + ## - "All" reported bugs/fixes/addons in dev thread fixed (implemented) ## 2005/04/09 - Version KB MOD 2.0.1e. Index: kb_article_reader.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/kb_article_reader.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** kb_article_reader.php 9 Apr 2005 21:41:28 -0000 1.5 --- kb_article_reader.php 21 Apr 2005 19:36:16 -0000 1.6 *************** *** 20,78 **** * (at your option) any later version. */ ! // MX ! if ( !function_exists( 'read_block_config' ) ) { define( 'IN_PORTAL', true ); ! $mx_root_path = '../../'; ! include_once( $mx_root_path . 'extension.inc' ); ! include_once( $mx_root_path . 'common.' . $phpEx ); // Start session management ! $userdata = session_pagestart( $user_ip, PAGE_INDEX ); ! mx_init_userprefs( $userdata ); // End session management ! $block_id = ( !empty( $HTTP_GET_VARS['block_id'] ) ) ? $HTTP_GET_VARS['block_id'] : $HTTP_POST_VARS['id']; ! if ( empty( $block_id ) ) { ! $sql = "SELECT * FROM " . BLOCK_TABLE . " WHERE block_title = 'KB' LIMIT 1"; ! if ( !$result = $db->sql_query( $sql ) ) { ! message_die( GENERAL_ERROR, "Could not query Smartor_Album module information", "", __LINE__, __FILE__, $sql ); } ! $tmp_row = $db->sql_fetchrow( $result ); ! $block_id = $tmp_row['block_id']; } ! $is_block = false; ! } ! else ! { ! // Read block Configuration ! $block_config = read_block_config( $block_id ); ! $title = $block_config[$block_id]['block_title']; ! $desc = $block_config[$block_id]['block_desc']; ! $block_size = ( isset( $block_size ) && !empty( $block_size ) ? $block_size : '100%' ); - $is_block = true; - global $images; - } - // Extract 'what posts to view info', the cool Array ;) - $kb_type_select_data = array(); - $kb_type_select_temp = $block_config[$block_id][kb_type_select]['parameter_value']; - $kb_type_select_temp = stripslashes( $kb_type_select_temp ); - $kb_type_select_data = eval( "return " . $kb_type_select_temp . ";" ); ! $default_article_id = $block_config[$block_id][default_article_id]['parameter_value']; ! include_once( $phpbb_root_path . 'includes/functions_post.' . $phpEx ); ! include( $module_root_path . 'includes/kb_constants.' . $phpEx ); ! include_once( $module_root_path . 'includes/functions_kb.' . $phpEx ); ! include_once( $module_root_path . 'includes/functions_kb_auth.' . $phpEx ); ! include_once( $module_root_path . 'includes/functions_kb_field.' . $phpEx ); ! include_once( $phpbb_root_path . 'includes/functions_search.' . $phpEx ); ! // echo(var_export($_SESSION['newssuite_'.$page_id]['testar'])); // Instanciate custom fields --- 20,122 ---- * (at your option) any later version. */ ! ! // Switch for making this run as a phpBB MOD or mxBB module ! ! if ( file_exists( './viewtopic.php' ) ) // -------------------------------------------- phpBB MOD MODE { + define( 'MXBB_MODULE', false ); + define( 'IN_PHPBB', true ); define( 'IN_PORTAL', true ); ! ! // When run as a phpBB mod these paths are identical ;) ! $phpbb_root_path = $module_root_path = $mx_root_path = './'; ! ! include( $phpbb_root_path . 'extension.inc' ); ! include( $phpbb_root_path . 'common.' . $phpEx ); ! ! define( 'PAGE_KB', -500 ); // If this id generates a conflict with other mods, change it ;) // Start session management ! $userdata = session_pagestart( $user_ip, PAGE_KB ); ! init_userprefs( $userdata ); // End session management ! include( $phpbb_root_path . 'includes/functions_post.' . $phpEx ); ! include( $phpbb_root_path . 'includes/kb_constants.' . $phpEx ); ! include( $phpbb_root_path . 'includes/functions_kb.' . $phpEx ); ! include( $phpbb_root_path . 'includes/functions_kb_auth.' . $phpEx ); ! include( $phpbb_root_path . 'includes/functions_kb_field.' . $phpEx ); ! include( $phpbb_root_path . 'includes/functions_kb_mx.' . $phpEx ); ! include_once( $phpbb_root_path . 'includes/bbcode.' . $phpEx ); ! include_once( $phpbb_root_path . 'includes/functions_search.' . $phpEx ); ! } ! else // --------------------------------------------------------------------------------- mxBB Module MODE ! { ! define( 'MXBB_MODULE', true ); ! ! if ( !function_exists( 'read_block_config' ) ) { ! define( 'IN_PORTAL', true ); ! $mx_root_path = './../../'; ! ! include_once( $mx_root_path . 'extension.inc' ); ! include_once( $mx_root_path . 'common.' . $phpEx ); ! ! // Start session management ! ! $userdata = session_pagestart( $user_ip, PAGE_INDEX ); ! mx_init_userprefs( $userdata ); ! ! // End session management ! ! define( 'MXBB_27x', file_exists( $mx_root_path . 'mx_login.php' ) ); ! ! $block_id = ( !empty( $HTTP_GET_VARS['block_id'] ) ) ? $HTTP_GET_VARS['block_id'] : $HTTP_POST_VARS['id']; ! if ( empty( $block_id ) ) { ! $sql = "SELECT * FROM " . BLOCK_TABLE . " WHERE block_title = 'KB' LIMIT 1"; ! if ( !$result = $db->sql_query( $sql ) ) ! { ! message_die( GENERAL_ERROR, "Could not query Smartor_Album module information", "", __LINE__, __FILE__, $sql ); ! } ! $tmp_row = $db->sql_fetchrow( $result ); ! $block_id = $tmp_row['block_id']; } ! $is_block = false; } ! else ! { ! // Read block Configuration ! ! define( 'MXBB_27x', file_exists( $mx_root_path . 'mx_login.php' ) ); ! ! $block_config = read_block_config( $block_id ); ! $title = $block_config[$block_id]['block_title']; ! $desc = $block_config[$block_id]['block_desc']; ! $block_size = ( isset( $block_size ) && !empty( $block_size ) ? $block_size : '100%' ); ! $is_block = true; ! global $images; ! } ! // Extract 'what posts to view info', the cool Array ;) ! $kb_type_select_data = array(); ! $kb_type_select_temp = $block_config[$block_id][kb_type_select]['parameter_value']; ! $kb_type_select_temp = stripslashes( $kb_type_select_temp ); ! $kb_type_select_data = eval( "return " . $kb_type_select_temp . ";" ); ! ! $default_article_id = $block_config[$block_id][default_article_id]['parameter_value']; ! include_once( $phpbb_root_path . 'includes/functions_post.' . $phpEx ); ! include( $module_root_path . 'includes/kb_constants.' . $phpEx ); ! include_once( $module_root_path . 'includes/functions_kb.' . $phpEx ); ! include_once( $module_root_path . 'includes/functions_kb_auth.' . $phpEx ); ! include_once( $module_root_path . 'includes/functions_kb_field.' . $phpEx ); ! include_once( $module_root_path . 'includes/functions_kb_mx.' . $phpEx ); ! include_once( $phpbb_root_path . 'includes/functions_search.' . $phpEx ); ! } // Instanciate custom fields *************** *** 146,172 **** } } - // Newssuite operation mode? - //------------------------------------------------------------------------- - $total_blockk = count( $HTTP_SESSION_VARS['mx_pages']['page_' . $page_id]['blocks'] ); ! $kb_config['news_operate_mode'] = ''; ! for( $blockk = 0; $blockk < $total_blockk; $blockk++ ) { ! if ( $HTTP_SESSION_VARS['block_' . $block_rows[$blockk]['block_id']]['news_source_switch']['parameter_value'] == 'kb' && $HTTP_SESSION_VARS['block_' . $block_rows[$blockk]['block_id']]['news_mode_operate']['parameter_value'] == 'Source' ) ! { ! $newssuite_select_par = $HTTP_SESSION_VARS['block_' . $block_rows[$blockk]['block_id']]['news_type_select']['parameter_value']; ! // Extract 'what posts to view info', the cool Array ;) ! $news_type_select_data = array(); ! $news_type_select_temp = $newssuite_select_par; ! $news_type_select_temp = stripslashes( $news_type_select_temp ); ! $news_type_select_data = eval( "return " . $news_type_select_temp . ";" ); ! $kb_config['news_operate_mode'] = true; ! } ! else { ! $kb_config['news_operate_mode'] = ''; ! } ! } ! // ------------------------------------------------------------------------- // $is_admin = ( ( $userdata['user_level'] == ADMIN || is_group_member( $kb_config['mod_group'], $userdata['user_id'] ) ) && $userdata['session_logged_in'] ) ? true : 0; --- 190,220 ---- } } ! if ( MXBB_MODULE ) { ! // Newssuite operation mode? ! //------------------------------------------------------------------------- ! $total_blockk = count( $HTTP_SESSION_VARS['mx_pages']['page_' . $page_id]['blocks'] ); ! ! $kb_config['news_operate_mode'] = ''; ! for( $blockk = 0; $blockk < $total_blockk; $blockk++ ) { ! if ( $HTTP_SESSION_VARS['block_' . $block_rows[$blockk]['block_id']]['news_source_switch']['parameter_value'] == 'kb' && $HTTP_SESSION_VARS['block_' . $block_rows[$blockk]['block_id']]['news_mode_operate']['parameter_value'] == 'Source' ) ! { ! $newssuite_select_par = $HTTP_SESSION_VARS['block_' . $block_rows[$blockk]['block_id']]['news_type_select']['parameter_value']; ! // Extract 'what posts to view info', the cool Array ;) ! $news_type_select_data = array(); ! $news_type_select_temp = $newssuite_select_par; ! $news_type_select_temp = stripslashes( $news_type_select_temp ); ! $news_type_select_data = eval( "return " . $news_type_select_temp . ";" ); ! $kb_config['news_operate_mode'] = true; ! } ! else ! { ! $kb_config['news_operate_mode'] = ''; ! } ! } ! // ------------------------------------------------------------------------- ! } // $is_admin = ( ( $userdata['user_level'] == ADMIN || is_group_member( $kb_config['mod_group'], $userdata['user_id'] ) ) && $userdata['session_logged_in'] ) ? true : 0; Index: upgrade_kb_tables.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/upgrade_kb_tables.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** upgrade_kb_tables.php 12 Apr 2005 19:30:42 -0000 1.2 --- upgrade_kb_tables.php 21 Apr 2005 19:36:16 -0000 1.3 *************** *** 131,135 **** $upgrade_200 = 0; $upgrade_201 = 0; ! $upgrade_202 = 1; // validate before 1.01 --- 131,135 ---- $upgrade_200 = 0; $upgrade_201 = 0; ! $upgrade_202 = 0; // validate before 1.01 *************** *** 191,194 **** --- 191,197 ---- } + $upgrade_202 = 1; + $res_message .= "Upgrading to v. 2.02...<br />"; + if ( $submit ) { |
|
From: Jon O. <jon...@us...> - 2005-04-21 19:36:41
|
Update of /cvsroot/mxbb/mx_kb/includes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17718/modules/mx_kb/includes Modified Files: functions_kb.php kb_pages.php Log Message: final fix before 2.0.2 release Index: kb_pages.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/includes/kb_pages.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** kb_pages.php 9 Apr 2005 21:41:28 -0000 1.4 --- kb_pages.php 21 Apr 2005 19:36:32 -0000 1.5 *************** *** 25,66 **** if ( MXBB_27x ) ! { ! $sql = "SELECT * FROM " . FUNCTION_TABLE . " WHERE function_file = 'kb.php' LIMIT 1"; ! if ( !$result = $db->sql_query( $sql ) ) ! { ! mx_message_die( GENERAL_ERROR, "Could not query Activity Mod module information", "", __LINE__, __FILE__, $sql ); ! } ! $row = $db->sql_fetchrow( $result ); ! $function_id = $row['function_id']; ! $sql = "SELECT * FROM " . BLOCK_TABLE . " WHERE function_id = '$function_id' LIMIT 1"; ! if ( !$result = $db->sql_query( $sql ) ) ! { ! mx_message_die( GENERAL_ERROR, "Could not query kb.php module information", "", __LINE__, __FILE__, $sql ); ! } ! $row = $db->sql_fetchrow( $result ); ! $search_item = $row['block_id']; ! ! // Generate page_blocks data ! $sql = "SELECT pag.page_id ! FROM " . COLUMN_BLOCK_TABLE . " bct, ! " . PAGE_TABLE . " pag, ! " . COLUMN_TABLE . " col ! WHERE pag.page_id = col.page_id ! AND bct.column_id = col.column_id ! AND bct.block_id = '" . $search_item . "' ! ORDER BY pag.page_id"; ! ! if ( !$p_result = $db->sql_query( $sql ) ) { ! mx_message_die( GENERAL_ERROR, "Could not query column list", "", __LINE__, __FILE__, $sql ); } ! $p_row = $db->sql_fetchrow( $p_result ); ! $return_key = $p_row['page_id']; ! ! if ( !empty( $return_key ) ) { ! $kb_pages = $return_key; $kb_error = false; } --- 25,40 ---- if ( MXBB_27x ) ! { ! $page_id = get_page_id( 'kb_article_reader.php', true ); ! ! if ( !$page_id ) { ! $page_id = get_page_id( 'kb.php', true ); } ! if ( !empty( $page_id ) ) { ! $kb_pages = $page_id; $kb_error = false; } *************** *** 69,76 **** $kb_error = true; } - // Start initial var setup $cat_id = $article_id = ''; if ( isset( $HTTP_GET_VARS['cat'] ) || isset( $HTTP_POST_VARS['cat'] ) ) { --- 43,50 ---- $kb_error = true; } // Start initial var setup $cat_id = $article_id = ''; + if ( isset( $HTTP_GET_VARS['cat'] ) || isset( $HTTP_POST_VARS['cat'] ) ) { Index: functions_kb.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/includes/functions_kb.php,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** functions_kb.php 20 Apr 2005 20:48:23 -0000 1.31 --- functions_kb.php 21 Apr 2005 19:36:17 -0000 1.32 *************** *** 905,911 **** --- 905,916 ---- mx_message_die( GENERAL_ERROR, 'Error getting total articles', '', __LINE__, __FILE__, $sql ); } + if ( $total = $db->sql_fetchrow( $result_num ) ) { $category_articles = $total['total']; + } + else + { + $category_articles = $category['number_articles']; } } *************** *** 941,944 **** --- 946,950 ---- { global $db, $template, $phpbb_root_path, $mx_root_path, $module_root_path, $phpEx, $is_block, $page_id, $kb_config; + $sql = "SELECT * FROM " . KB_CATEGORIES_TABLE . " *************** *** 981,1002 **** while ( $category = $db->sql_fetchrow( $result ) ) { ! // Get number of articles in cat - newssuite addon ! $sql_num = "SELECT count(article_id) AS total ! FROM " . KB_ARTICLES_TABLE . " ! WHERE "; ! // newssuite addon ! if ( $kb_config['news_operate_mode'] ) ! { ! $kb_types_list = ns_auth_item( $category['category_id'] ); ! $sql_num .= " article_type IN " . $kb_types_list . ' AND'; ! } ! $sql_num .= " article_category_id = " . $category['category_id']; ! if ( !( $result_num = $db->sql_query( $sql_num ) ) ) ! { ! mx_message_die( GENERAL_ERROR, 'Error getting total articles', '', __LINE__, __FILE__, $sql ); ! } ! if ( $total = $db->sql_fetchrow( $result_num ) ) ! { ! $category_articles = $total['total']; } else --- 987,1018 ---- while ( $category = $db->sql_fetchrow( $result ) ) { ! if ( MXBB_MODULE && !MXBB_27x ) ! { ! // Get number of articles in cat - newssuite addon ! $sql_num = "SELECT count(article_id) AS total ! FROM " . KB_ARTICLES_TABLE . " ! WHERE "; ! // newssuite addon ! ! if ( $kb_config['news_operate_mode'] ) ! { ! $kb_types_list = ns_auth_item( $category['category_id'] ); ! $sql_num .= " article_type IN " . $kb_types_list . ' AND'; ! } ! $sql_num .= " article_category_id = " . $category['category_id']; ! ! if ( !( $result_num = $db->sql_query( $sql_num ) ) ) ! { ! mx_message_die( GENERAL_ERROR, 'Error getting total articles', '', __LINE__, __FILE__, $sql ); ! } ! ! if ( $total = $db->sql_fetchrow( $result_num ) ) ! { ! $category_articles = $total['total']; ! } ! else ! { ! $category_articles = $category['number_articles']; ! } } else |
|
From: Jon O. <jon...@us...> - 2005-04-20 20:48:39
|
Update of /cvsroot/mxbb/mx_kb/includes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9334/modules/mx_kb/includes Modified Files: functions_kb.php Log Message: adding S_CONTENT_DIR_RIGHT compatibility reverting to use the db stored row for "number artcles" Index: functions_kb.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/includes/functions_kb.php,v retrieving revision 1.30 retrieving revision 1.31 diff -C2 -d -r1.30 -r1.31 *** functions_kb.php 12 Apr 2005 19:30:42 -0000 1.30 --- functions_kb.php 20 Apr 2005 20:48:23 -0000 1.31 *************** *** 885,907 **** while ( $category = $db->sql_fetchrow( $result ) ) { - // Get number of articles in cat - newssuite addon - $sql_num = "SELECT count(article_id) AS total - FROM " . KB_ARTICLES_TABLE . " - WHERE "; // newssuite addon - if ( $kb_config['news_operate_mode'] ) - { - $kb_types_list = ns_auth_item( $category['category_id'] ); - $sql_num .= " article_type IN " . $kb_types_list . ' AND'; - } - $sql_num .= " article_category_id = " . $category['category_id'] . " AND approved = '1'"; ! if ( !( $result_num = $db->sql_query( $sql_num ) ) ) ! { ! mx_message_die( GENERAL_ERROR, 'Error getting total articles', '', __LINE__, __FILE__, $sql ); ! } ! if ( $total = $db->sql_fetchrow( $result_num ) ) { ! $category_articles = $total['total']; } else --- 885,912 ---- while ( $category = $db->sql_fetchrow( $result ) ) { // newssuite addon ! if ( MXBB_MODULE && !MXBB_27x ) { ! // Get number of articles in cat - newssuite addon ! $sql_num = "SELECT count(article_id) AS total ! FROM " . KB_ARTICLES_TABLE . " ! WHERE "; ! ! if ( $kb_config['news_operate_mode'] ) ! { ! $kb_types_list = ns_auth_item( $category['category_id'] ); ! $sql_num .= " article_type IN " . $kb_types_list . ' AND'; ! } ! $sql_num .= " article_category_id = " . $category['category_id'] . " AND approved = '1'"; ! ! if ( !( $result_num = $db->sql_query( $sql_num ) ) ) ! { ! mx_message_die( GENERAL_ERROR, 'Error getting total articles', '', __LINE__, __FILE__, $sql ); ! } ! if ( $total = $db->sql_fetchrow( $result_num ) ) ! { ! $category_articles = $total['total']; ! } } else |
|
From: Jon O. <jon...@us...> - 2005-04-20 20:48:39
|
Update of /cvsroot/mxbb/mx_kb/templates/subSilver In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9334/modules/mx_kb/templates/subSilver Modified Files: kb_rate_body.tpl Log Message: adding S_CONTENT_DIR_RIGHT compatibility reverting to use the db stored row for "number artcles" Index: kb_rate_body.tpl =================================================================== RCS file: /cvsroot/mxbb/mx_kb/templates/subSilver/kb_rate_body.tpl,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** kb_rate_body.tpl 9 Jan 2005 21:40:39 -0000 1.2 --- kb_rate_body.tpl 20 Apr 2005 20:48:24 -0000 1.3 *************** *** 6,13 **** <th class="thHead" colspan="2"> {L_RATE}</th> </tr> ! <tr> ! <td class="row1" align="center" width="5%"><img src="pafiledb/styles/{STYLE}/images/error.gif" border="0"></td> ! <td class="row1" width="95%"><span class="genmed">{L_RERROR}</span></td> ! </tr> <tr> <td class="cat" colspan="2"> --- 6,10 ---- <th class="thHead" colspan="2"> {L_RATE}</th> </tr> ! <tr> <td class="cat" colspan="2"> *************** *** 20,27 **** </tr> <tr> - <td class="row1" align="center" width="5%"><img src="pafiledb/styles/{STYLE}/images/info.gif" border="0"></td> - <td class="row1" width="95%">{CONF}</td> - </tr> - <tr> <td class="catBottom" colspan="2"> --- 17,20 ---- |
|
From: Jon O. <jon...@us...> - 2005-04-20 20:48:39
|
Update of /cvsroot/mxbb/mx_kb/templates/subSilver/admin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9334/modules/mx_kb/templates/subSilver/admin Modified Files: kb_art_body.tpl kb_cat_admin_body.tpl kb_type_body.tpl Log Message: adding S_CONTENT_DIR_RIGHT compatibility reverting to use the db stored row for "number artcles" Index: kb_art_body.tpl =================================================================== RCS file: /cvsroot/mxbb/mx_kb/templates/subSilver/admin/kb_art_body.tpl,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** kb_art_body.tpl 1 Apr 2005 20:39:47 -0000 1.3 --- kb_art_body.tpl 20 Apr 2005 20:48:24 -0000 1.4 *************** *** 1,2 **** --- 1,3 ---- + <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1"> <h1>{L_KB_ART_TITLE}</h1> *************** *** 75,80 **** <table width="100%" cellspacing="2" cellpadding="0" border="0"> <tr> ! <td valign="top" align="left" ><span class="nav">{PAGE_NUMBER}</span></td> ! <td valign="top" align="right" ><span class="nav">{PAGINATION}</span></td> </tr> </table> --- 76,81 ---- <table width="100%" cellspacing="2" cellpadding="0" border="0"> <tr> ! <td valign="top" ><span class="nav">{PAGE_NUMBER}</span></td> ! <td valign="top" align="{S_CONTENT_DIR_RIGHT}" ><span class="nav">{PAGINATION}</span></td> </tr> </table> Index: kb_type_body.tpl =================================================================== RCS file: /cvsroot/mxbb/mx_kb/templates/subSilver/admin/kb_type_body.tpl,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** kb_type_body.tpl 14 Aug 2003 17:59:40 -0000 1.1 --- kb_type_body.tpl 20 Apr 2005 20:48:24 -0000 1.2 *************** *** 1,2 **** --- 1,3 ---- + <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1"> <h1>{L_KB_TYPE_TITLE}</h1> *************** *** 6,11 **** <table width="100%" cellpadding="4" cellspacing="1" border="0"> <tr> ! <form action="{S_ACTION}" method="post"> ! <td align="right" width="100%">{L_CREATE_TYPE} <input class="post" type="text" name="new_type_name"> <input type="submit" value="{L_CREATE}" class="liteoption"></td> </form> </tr> --- 7,12 ---- <table width="100%" cellpadding="4" cellspacing="1" border="0"> <tr> ! <form action="{S_ACTION}" method="GET"> ! <td align="{S_CONTENT_DIR_RIGHT}" width="100%">{L_CREATE_TYPE} <input class="post" type="text" name="new_type_name"> <input type="submit" value="{L_CREATE}" class="liteoption"></td> </form> </tr> Index: kb_cat_admin_body.tpl =================================================================== RCS file: /cvsroot/mxbb/mx_kb/templates/subSilver/admin/kb_cat_admin_body.tpl,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** kb_cat_admin_body.tpl 2 Apr 2005 20:37:03 -0000 1.2 --- kb_cat_admin_body.tpl 20 Apr 2005 20:48:24 -0000 1.3 *************** *** 1,2 **** --- 1,3 ---- + <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1"> <h1>{L_KB_CAT_TITLE}</h1> *************** *** 6,11 **** <table width="100%" cellpadding="2" cellspacing="2" border="0"> <tr> ! <form action="{S_ACTION}" method="post"> ! <td align="right" width="100%">{L_CREATE_CAT} <input type="text" name="new_cat_name"> <input type="submit" value="{L_CREATE}" class="liteoption"></td> </form> </tr> --- 7,12 ---- <table width="100%" cellpadding="2" cellspacing="2" border="0"> <tr> ! <form action="{S_ACTION}" method="GET"> ! <td align="{S_CONTENT_DIR_RIGHT}" width="100%">{L_CREATE_CAT} <input type="text" name="new_cat_name"> <input type="submit" value="{L_CREATE}" class="liteoption"></td> </form> </tr> |
|
From: Jon O. <jon...@us...> - 2005-04-20 19:30:30
|
Update of /cvsroot/mxbb/mx_kb/includes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4138/modules/mx_kb/includes Modified Files: functions_kb_auth.php functions_kb_mx.php Log Message: fixing incompatibility with core 2.7.6 define( 'MXBB_27x', file_exists( $mx_root_path . 'more_smilies.php' ) ); replaced by define( 'MXBB_27x', file_exists( $mx_root_path . 'mx_login.php' ) ); Index: functions_kb_auth.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/includes/functions_kb_auth.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** functions_kb_auth.php 12 Apr 2005 21:11:31 -0000 1.2 --- functions_kb_auth.php 20 Apr 2005 19:30:19 -0000 1.3 *************** *** 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 --- 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_is_group_member( $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_is_group_member( $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_is_group_member( $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_is_group_member( $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_is_group_member( $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_is_group_member( $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.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** functions_kb_mx.php 12 Apr 2005 21:11:32 -0000 1.4 --- functions_kb_mx.php 20 Apr 2005 19:30:19 -0000 1.5 *************** *** 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 --- 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_is_group_member ) ) ! { ! // Validates if user belongs to group included in group_ids list ! // Also, adds all usergroups to userdata array ! function mx_is_group_member( $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-20 19:30:29
|
Update of /cvsroot/mxbb/mx_kb In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4138/modules/mx_kb Modified Files: db_install.php db_uninstall.php db_upgrade.php kb.php kb_search.php Log Message: fixing incompatibility with core 2.7.6 define( 'MXBB_27x', file_exists( $mx_root_path . 'more_smilies.php' ) ); replaced by define( 'MXBB_27x', file_exists( $mx_root_path . 'mx_login.php' ) ); Index: kb_search.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/kb_search.php,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** kb_search.php 9 Apr 2005 21:41:28 -0000 1.12 --- kb_search.php 20 Apr 2005 19:30:19 -0000 1.13 *************** *** 80,84 **** } ! define( 'MXBB_27x', file_exists( $mx_root_path . 'more_smilies.php' ) ); include_once( $phpbb_root_path . 'includes/functions_post.' . $phpEx ); --- 80,84 ---- } ! define( 'MXBB_27x', file_exists( $mx_root_path . 'mx_login.php' ) ); include_once( $phpbb_root_path . 'includes/functions_post.' . $phpEx ); Index: kb.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/kb.php,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** kb.php 9 Apr 2005 21:41:28 -0000 1.18 --- kb.php 20 Apr 2005 19:30:19 -0000 1.19 *************** *** 71,75 **** // End session management ! define( 'MXBB_27x', file_exists( $mx_root_path . 'more_smilies.php' ) ); if ( !isset( $HTTP_GET_VARS['print'] ) ) --- 71,75 ---- // End session management ! define( 'MXBB_27x', file_exists( $mx_root_path . 'mx_login.php' ) ); if ( !isset( $HTTP_GET_VARS['print'] ) ) *************** *** 120,124 **** else { ! define( 'MXBB_27x', file_exists( $mx_root_path . 'more_smilies.php' ) ); // Read block Configuration --- 120,124 ---- else { ! define( 'MXBB_27x', file_exists( $mx_root_path . 'mx_login.php' ) ); // Read block Configuration Index: db_uninstall.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/db_uninstall.php,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** db_uninstall.php 9 Apr 2005 21:41:27 -0000 1.10 --- db_uninstall.php 20 Apr 2005 19:30:19 -0000 1.11 *************** *** 45,49 **** // For compatibility with core 2.7.+ ! define( 'MXBB_27x', file_exists( $mx_root_path . 'more_smilies.php' ) ); if ( MXBB_27x ) --- 45,49 ---- // For compatibility with core 2.7.+ ! define( 'MXBB_27x', file_exists( $mx_root_path . 'mx_login.php' ) ); if ( MXBB_27x ) Index: db_install.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/db_install.php,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** db_install.php 12 Apr 2005 19:30:42 -0000 1.29 --- db_install.php 20 Apr 2005 19:30:18 -0000 1.30 *************** *** 50,54 **** // For compatibility with core 2.7.+ ! define( 'MXBB_27x', file_exists( $mx_root_path . 'more_smilies.php' ) ); if ( MXBB_27x ) --- 50,54 ---- // For compatibility with core 2.7.+ ! define( 'MXBB_27x', file_exists( $mx_root_path . 'mx_login.php' ) ); if ( MXBB_27x ) Index: db_upgrade.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/db_upgrade.php,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** db_upgrade.php 12 Apr 2005 19:30:42 -0000 1.22 --- db_upgrade.php 20 Apr 2005 19:30:19 -0000 1.23 *************** *** 49,53 **** // For compatibility with core 2.7.+ ! define( 'MXBB_27x', file_exists( $mx_root_path . 'more_smilies.php' ) ); if ( MXBB_27x ) --- 49,53 ---- // For compatibility with core 2.7.+ ! define( 'MXBB_27x', file_exists( $mx_root_path . 'mx_login.php' ) ); if ( MXBB_27x ) |
|
From: Jon O. <jon...@us...> - 2005-04-20 19:30:28
|
Update of /cvsroot/mxbb/mx_kb/admin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4138/modules/mx_kb/admin Modified Files: admin_kb_art.php admin_kb_auth.php admin_kb_cat.php admin_kb_config.php admin_kb_custom.php admin_kb_rebuild_search.php admin_kb_types.php kb_config.php Log Message: fixing incompatibility with core 2.7.6 define( 'MXBB_27x', file_exists( $mx_root_path . 'more_smilies.php' ) ); replaced by define( 'MXBB_27x', file_exists( $mx_root_path . 'mx_login.php' ) ); Index: admin_kb_art.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/admin/admin_kb_art.php,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** admin_kb_art.php 9 Apr 2005 21:41:27 -0000 1.20 --- admin_kb_art.php 20 Apr 2005 19:30:06 -0000 1.21 *************** *** 63,67 **** $module_root_path = "./../"; ! define( 'MXBB_27x', file_exists( $mx_root_path . 'more_smilies.php' ) ); require( $mx_root_path . 'extension.inc' ); --- 63,67 ---- $module_root_path = "./../"; ! define( 'MXBB_27x', file_exists( $mx_root_path . 'mx_login.php' ) ); require( $mx_root_path . 'extension.inc' ); Index: kb_config.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/admin/kb_config.php,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** kb_config.php 9 Apr 2005 21:41:27 -0000 1.8 --- kb_config.php 20 Apr 2005 19:30:17 -0000 1.9 *************** *** 25,29 **** define( 'IN_PORTAL', true ); define( 'MXBB_MODULE', true ); ! define( 'MXBB_27x', file_exists( $mx_root_path . 'more_smilies.php' ) ); require( $mx_root_path . 'admin/pagestart.php' ); --- 25,29 ---- define( 'IN_PORTAL', true ); define( 'MXBB_MODULE', true ); ! define( 'MXBB_27x', file_exists( $mx_root_path . 'mx_login.php' ) ); require( $mx_root_path . 'admin/pagestart.php' ); Index: admin_kb_config.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/admin/admin_kb_config.php,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** admin_kb_config.php 9 Apr 2005 21:41:27 -0000 1.19 --- admin_kb_config.php 20 Apr 2005 19:30:17 -0000 1.20 *************** *** 60,64 **** $module_root_path = "./../"; ! define( 'MXBB_27x', file_exists( $mx_root_path . 'more_smilies.php' ) ); require( $mx_root_path . 'extension.inc' ); --- 60,64 ---- $module_root_path = "./../"; ! define( 'MXBB_27x', file_exists( $mx_root_path . 'mx_login.php' ) ); require( $mx_root_path . 'extension.inc' ); Index: admin_kb_cat.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/admin/admin_kb_cat.php,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** admin_kb_cat.php 11 Apr 2005 20:07:55 -0000 1.13 --- admin_kb_cat.php 20 Apr 2005 19:30:17 -0000 1.14 *************** *** 60,64 **** $module_root_path = "./../"; ! define( 'MXBB_27x', file_exists( $mx_root_path . 'more_smilies.php' ) ); require( $mx_root_path . 'extension.inc' ); --- 60,64 ---- $module_root_path = "./../"; ! define( 'MXBB_27x', file_exists( $mx_root_path . 'mx_login.php' ) ); require( $mx_root_path . 'extension.inc' ); Index: admin_kb_rebuild_search.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/admin/admin_kb_rebuild_search.php,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** admin_kb_rebuild_search.php 11 Apr 2005 20:07:56 -0000 1.6 --- admin_kb_rebuild_search.php 20 Apr 2005 19:30:17 -0000 1.7 *************** *** 55,59 **** $module_root_path = "./../"; ! define( 'MXBB_27x', file_exists( $mx_root_path . 'more_smilies.php' ) ); require( $mx_root_path . 'extension.inc' ); --- 55,59 ---- $module_root_path = "./../"; ! define( 'MXBB_27x', file_exists( $mx_root_path . 'mx_login.php' ) ); require( $mx_root_path . 'extension.inc' ); Index: admin_kb_auth.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/admin/admin_kb_auth.php,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** admin_kb_auth.php 9 Apr 2005 21:41:27 -0000 1.6 --- admin_kb_auth.php 20 Apr 2005 19:30:17 -0000 1.7 *************** *** 59,63 **** $module_root_path = "./../"; ! define( 'MXBB_27x', file_exists( $mx_root_path . 'more_smilies.php' ) ); require( $mx_root_path . 'extension.inc' ); --- 59,63 ---- $module_root_path = "./../"; ! define( 'MXBB_27x', file_exists( $mx_root_path . 'mx_login.php' ) ); require( $mx_root_path . 'extension.inc' ); Index: admin_kb_types.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/admin/admin_kb_types.php,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** admin_kb_types.php 9 Apr 2005 21:41:27 -0000 1.11 --- admin_kb_types.php 20 Apr 2005 19:30:17 -0000 1.12 *************** *** 60,64 **** $module_root_path = "./../"; ! define( 'MXBB_27x', file_exists( $mx_root_path . 'more_smilies.php' ) ); require( $mx_root_path . 'extension.inc' ); --- 60,64 ---- $module_root_path = "./../"; ! define( 'MXBB_27x', file_exists( $mx_root_path . 'mx_login.php' ) ); require( $mx_root_path . 'extension.inc' ); Index: admin_kb_custom.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/admin/admin_kb_custom.php,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** admin_kb_custom.php 11 Apr 2005 20:07:56 -0000 1.6 --- admin_kb_custom.php 20 Apr 2005 19:30:17 -0000 1.7 *************** *** 51,55 **** $module_root_path = "./../"; ! define( 'MXBB_27x', file_exists( $mx_root_path . 'more_smilies.php' ) ); require( $mx_root_path . 'extension.inc' ); --- 51,55 ---- $module_root_path = "./../"; ! define( 'MXBB_27x', file_exists( $mx_root_path . 'mx_login.php' ) ); require( $mx_root_path . 'extension.inc' ); |
|
From: Markus P. <mar...@us...> - 2005-04-20 17:06:30
|
Update of /cvsroot/mxbb/core/modules/mx_coreblocks/templates/subSilver In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19152 Modified Files: mx_login.tpl Log Message: Fix missing </span> in mx_login.tpl Index: mx_login.tpl =================================================================== RCS file: /cvsroot/mxbb/core/modules/mx_coreblocks/templates/subSilver/mx_login.tpl,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** mx_login.tpl 19 Apr 2005 17:18:48 -0000 1.6 --- mx_login.tpl 20 Apr 2005 17:06:19 -0000 1.7 *************** *** 6,10 **** {L_PASSWORD}:<br /><input class="post" type="password" name="password" size="10" /><br /> <input type="checkbox" class="post" name="autologin" value="ON" /> {L_AUTO_LOGIN}<br /> ! <input type="submit" class="mainoption" name="login" value="{L_LOGIN}" /> </form> </td> --- 6,10 ---- {L_PASSWORD}:<br /><input class="post" type="password" name="password" size="10" /><br /> <input type="checkbox" class="post" name="autologin" value="ON" /> {L_AUTO_LOGIN}<br /> ! <input type="submit" class="mainoption" name="login" value="{L_LOGIN}" /></span> </form> </td> |
|
From: Markus P. <mar...@us...> - 2005-04-20 01:12:32
|
Update of /cvsroot/mxbb/core/templates/subSilver/admin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5391/subSilver/admin Modified Files: page_footer.tpl Log Message: Revised page header/footer. Index: page_footer.tpl =================================================================== RCS file: /cvsroot/mxbb/core/templates/subSilver/admin/page_footer.tpl,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** page_footer.tpl 19 Apr 2005 23:41:31 -0000 1.4 --- page_footer.tpl 20 Apr 2005 01:12:21 -0000 1.5 *************** *** 17,21 **** //--> ! <div align="center"><span class="copyright">Powered by <a href="http://www.mx-system.com/" target="_mx-system" class="copyright">mxBB Portal</a> {MX_VERSION} © 2001, 2005 & <a href="http://www.phpbb.com/" target="_phpbb" class="copyright">phpBB</a> {PHPBB_VERSION} © 2001, 2002 phpBB Group</span></div> </body> --- 17,21 ---- //--> ! <div align="center"><span class="copyright">Powered by <a href="http://www.mx-system.com/" target="_mx-system" class="copyright">mxBB-Portal</a> {MX_VERSION} © 2001, 2005 & <a href="http://www.phpbb.com/" target="_phpbb" class="copyright">phpBB</a> {PHPBB_VERSION} © 2001, 2005 phpBB Group</span></div> </body> |
|
From: Markus P. <mar...@us...> - 2005-04-20 01:12:31
|
Update of /cvsroot/mxbb/core/templates/subSilver In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5391/subSilver Modified Files: overall_footer.tpl Log Message: Revised page header/footer. Index: overall_footer.tpl =================================================================== RCS file: /cvsroot/mxbb/core/templates/subSilver/overall_footer.tpl,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** overall_footer.tpl 19 Apr 2005 23:41:31 -0000 1.12 --- overall_footer.tpl 20 Apr 2005 01:12:21 -0000 1.13 *************** *** 20,24 **** The phpBB Group : 2002 // --> ! {POWERED_BY} <a href="http://www.mx-system.com/" target="_mx-system" class="copyright">mxBB Portal</a> {MX_VERSION} © 2001, 2005 & <a href="http://www.phpbb.com/" target="_phpbb" class="copyright">phpBB</a> {PHPBB_VERSION} © 2001, 2005 phpBB Group<br />{MXBB_EXTRA}<br /> </div> </td> --- 20,24 ---- The phpBB Group : 2002 // --> ! {POWERED_BY} <a href="http://www.mx-system.com/" target="_mx-system" class="copyright">mxBB-Portal</a> {MX_VERSION} © 2001, 2005 & <a href="http://www.phpbb.com/" target="_phpbb" class="copyright">phpBB</a> {PHPBB_VERSION} © 2001, 2005 phpBB Group<br />{MXBB_EXTRA}<br /> </div> </td> |
|
From: Markus P. <mar...@us...> - 2005-04-20 00:20:28
|
Update of /cvsroot/mxbb/core/modules/mx_coreblocks In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9293/modules/mx_coreblocks Modified Files: mx_multiple_blocks.php Log Message: Revised page header/footer. Index: mx_multiple_blocks.php =================================================================== RCS file: /cvsroot/mxbb/core/modules/mx_coreblocks/mx_multiple_blocks.php,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** mx_multiple_blocks.php 21 Mar 2005 20:59:33 -0000 1.7 --- mx_multiple_blocks.php 20 Apr 2005 00:20:16 -0000 1.8 *************** *** 18,34 **** * (at your option) any later version. */ ! ! $block_config = read_block_config( $block_id ); $block_id_temp = $block_id; // check parameter for block count ! ! $block_ids = $block_config[$block_id][block_ids]['parameter_value']; ! $block_ids = explode( ',', $block_ids ); ! $nested_block_count = sizeof( $block_ids ); if ( $nested_block_count < 2 ) { ! mx_message_die( GENERAL_ERROR, "Nested block count must be >=2.", "", __LINE__, __FILE__, '' ); } --- 18,40 ---- * (at your option) any later version. */ ! ! if ( !defined('IN_PORTAL') ) ! { ! die("Hacking attempt"); ! } ! ! $block_config = read_block_config($block_id); $block_id_temp = $block_id; + // // check parameter for block count ! // ! $block_ids = $block_config[$block_id]['block_ids']['parameter_value']; ! $block_ids = explode(',', $block_ids); ! $nested_block_count = sizeof($block_ids); if ( $nested_block_count < 2 ) { ! mx_message_die(GENERAL_ERROR, "Nested block count must be >=2.", '', __LINE__, __FILE__, ''); } *************** *** 37,52 **** // mx_message_die(GENERAL_ERROR, "Number of block ids must be equal to block count.", "", __LINE__, __FILE__, ''); // check parameter block sizes ! $block_sizes = $block_config[$block_id][block_sizes]['parameter_value']; ! $block_sizes = explode( ',', $block_sizes ); ! ! if ( sizeof( $block_sizes ) != $nested_block_count ) { ! mx_message_die( GENERAL_ERROR, "Number of block sizes must be equal to block count.", "", __LINE__, __FILE__, '' ); } // check parameter space ! $block_space = $block_config[$block_id][space_between]['parameter_value']; --- 43,60 ---- // mx_message_die(GENERAL_ERROR, "Number of block ids must be equal to block count.", "", __LINE__, __FILE__, ''); + // // check parameter block sizes + // + $block_sizes = $block_config[$block_id]['block_sizes']['parameter_value']; + $block_sizes = explode(',', $block_sizes); ! if ( sizeof($block_sizes) != $nested_block_count ) { ! mx_message_die(GENERAL_ERROR, "Number of block sizes must be equal to block count.", '', __LINE__, __FILE__, ''); } + // // check parameter space ! // $block_space = $block_config[$block_id][space_between]['parameter_value']; *************** *** 56,64 **** } // start the placement table ! echo '<table cellspacing="0" cellpadding="0" border="0" width="100%"><tr>'; ! for ( $cell = 0;$cell < $nested_block_count;$cell++ ) { $inner_block_id = intval($block_ids[$cell]); --- 64,73 ---- } + // // start the placement table ! // echo '<table cellspacing="0" cellpadding="0" border="0" width="100%"><tr>'; ! for( $cell = 0; $cell < $nested_block_count; $cell++ ) { $inner_block_id = intval($block_ids[$cell]); *************** *** 76,91 **** $sql = "SELECT blk.*, module_path, function_file, function_admin, auth_view, auth_edit FROM " . BLOCK_TABLE . " blk, ! " . FUNCTION_TABLE . " fnc, ! " . MODULE_TABLE . " mdl WHERE blk.function_id = fnc.function_id AND fnc.module_id = mdl.module_id AND blk.block_id = " . $inner_block_id; - if ( !$block_result = $db->sql_query( $sql ) ) { ! mx_message_die( GENERAL_ERROR, "Could not query modules information", "", __LINE__, __FILE__, $sql ); } ! ! $split_block_rows = $db->sql_fetchrow( $block_result ); $HTTP_SESSION_VARS['mx_nested_blocks']['block_' . $inner_block_id] = $split_block_rows; } --- 85,99 ---- $sql = "SELECT blk.*, module_path, function_file, function_admin, auth_view, auth_edit FROM " . BLOCK_TABLE . " blk, ! " . FUNCTION_TABLE . " fnc, ! " . MODULE_TABLE . " mdl WHERE blk.function_id = fnc.function_id AND fnc.module_id = mdl.module_id AND blk.block_id = " . $inner_block_id; if ( !$block_result = $db->sql_query( $sql ) ) { ! mx_message_die(GENERAL_ERROR, "Could not query modules information", '', __LINE__, __FILE__, $sql); } ! ! $split_block_rows = $db->sql_fetchrow($block_result); $HTTP_SESSION_VARS['mx_nested_blocks']['block_' . $inner_block_id] = $split_block_rows; } *************** *** 93,123 **** $module_root_path = $split_block_rows['module_path']; $block_x_file = $split_block_rows['function_file']; ! $admin_x_file = !empty( $split_block_rows['function_admin'] ) ? $split_block_rows['function_admin'] : 'admin/admin_mx_block.php'; ! $block_x_edit_img = ( ( $block_x_file == 'mx_multiple_blocks.php' ) ? 'block_edit_split.gif' : ( $block_x_file == 'mx_textblock_blog.php' ? 'block_edit_admin.gif' : 'block_edit.gif' ) ) ; ! $block_x_show_title = intval($split_block_rows['show_title']) == 1 ? TRUE : FALSE; ! $block_x_hidden = intval($split_block_rows['show_block']) == 0 ? TRUE : FALSE; ! $block_x_desc = !empty( $split_block_rows['block_desc'] ) ? ' (' . $split_block_rows['block_desc'] . ')' : ''; ! $block_x_title = !empty( $split_block_rows['block_title'] ) ? $split_block_rows['block_title'] : ''; ! // output a placement table for each single block and the optional space ! ! echo '<td width="' . $inner_block_size . '" valign="top"><table cellspacing="0" cellpadding="0" border="0" width="100%"><tr><td>'; echo '<table width="100%" cellpadding="0" cellspacing="0" border="0" class="mx_blockline">'; ! echo '<tr> '; ! if ( $block_x_show_title ) { echo '<th class="mxthHead" align="left" width="100%"> '. $block_x_title .' </th>'; } ! echo '<th class="mxthHead" align="right" >'; ! // Add EDIT block nav ! ! $is_auth_ary = array(); ! $is_auth_ary = block_auth( AUTH_EDIT, $inner_block_id , $userdata, $split_block_rows['auth_edit'], $split_block_rows['auth_edit_group'] ); ! if ( ($is_auth_ary[auth_edit] || $is_auth_ary[auth_mod]) ) { $s_hidden_fields = '<input type="hidden" name="sid" value="' . $userdata['session_id'] . '" />'; --- 101,132 ---- $module_root_path = $split_block_rows['module_path']; $block_x_file = $split_block_rows['function_file']; ! $admin_x_file = ( !empty($split_block_rows['function_admin']) ? $split_block_rows['function_admin'] : 'admin/admin_mx_block.php' ); ! $block_x_edit_img = ( ( $block_x_file == 'mx_multiple_blocks.php' ) ? 'block_edit_split.gif' : ( $block_x_file == 'mx_textblock_blog.php' ? 'block_edit_admin.gif' : 'block_edit.gif' ) ); ! $block_x_show_title = ( intval($split_block_rows['show_title']) == 1 ? TRUE : FALSE ); ! $block_x_hidden = ( intval($split_block_rows['show_block']) == 0 ? TRUE : FALSE ); ! $block_x_desc = ( !empty( $split_block_rows['block_desc'] ) ? ' (' . $split_block_rows['block_desc'] . ')' : '' ); ! $block_x_title = ( !empty( $split_block_rows['block_title'] ) ? $split_block_rows['block_title'] : '' ); ! ! // // output a placement table for each single block and the optional space ! // ! echo '<td width="' . $inner_block_size . '" valign="top"><table cellspacing="0" cellpadding="0" border="0" width="100%"><tr><td>'; echo '<table width="100%" cellpadding="0" cellspacing="0" border="0" class="mx_blockline">'; ! echo '<tr>'; ! if ( $block_x_show_title ) { echo '<th class="mxthHead" align="left" width="100%"> '. $block_x_title .' </th>'; } ! echo '<th class="mxthHead" align="right">'; ! ! // // Add EDIT block nav ! // ! $is_auth_ary = block_auth(AUTH_EDIT, $inner_block_id, $userdata, $split_block_rows['auth_edit'], $split_block_rows['auth_edit_group']); ! if ( ($is_auth_ary['auth_edit'] || $is_auth_ary['auth_mod']) ) { $s_hidden_fields = '<input type="hidden" name="sid" value="' . $userdata['session_id'] . '" />'; *************** *** 126,211 **** $s_hidden_fields .= '<input type="hidden" name="mode" value="setting" />'; ! $edit_url = append_sid( $mx_root_path . $admin_x_file . "?sid=" . $userdata['session_id'] ); ! $edit_img = '<input type="image" src="' . PORTAL_URL . TEMPLATE_ROOT_PATH . 'images/block_icons/' . $block_x_edit_img . '" alt="' . $lang['Block_Edit'] . '" title="' . $lang['Block_Edit'] . ' :: ' . $split_block_rows['block_title'] . $block_x_desc . '">'; ! ! // Generate the fold/unfold categories switches ! ! if ( ( $HTTP_COOKIE_VARS['phpbbEdit_Blocks'] ) != '' ) ! { ! $edit_on = $HTTP_COOKIE_VARS['phpbbEdit_Blocks']; ! } ! else if ( $userdata['user_level'] == ADMIN ) ! { ! $edit_on = true; ! } ! else ! { ! $edit_on = false; ! } ! // output Block Edit header ! ! ! echo '<form action="' . $edit_url . '" method="post" class="mx_editform">'; ! echo '<table width="100%" cellpadding="0" cellspacing="0" border="0">'; ! ! if ( $edit_on ) ! { ! echo '<tbody id="phpbbEdit_Blocks" style="display: ;">'; ! } ! else ! { ! echo '<tbody id="phpbbEdit_Blocks" style="display: none;">'; ! } ! echo '<tr>'; ! ! if ( $block_x_hidden ) ! { ! echo '<td align="left" > '; ! echo '<span class="gensmall"><i>'. $lang['Hidden_block'] .'</i></span>'; ! echo '</td>'; ! } ! echo '<td align="right" > '; ! echo $edit_img . $s_hidden_fields; ! echo '</td>'; ! ! ! echo '</tr>'; ! echo '</tbody>'; ! echo '</table>'; ! echo '</form>'; ! } ! // End ! echo '</th>'; echo '</tr>'; echo '</table>'; ! // check visibility (code from index.php) ! ! $is_auth_ary = array(); ! $is_auth_ary = block_auth( AUTH_VIEW, $inner_block_id , $userdata, $split_block_rows['auth_view'], $split_block_rows['auth_view_group'] ); ! // output the block ! ! if ( ($is_auth_ary[auth_view] && $split_block_rows['show_block'] == 1) || $is_auth_ary[auth_mod] ) ! { // set block id and block size as this must be correctly set for the inclusion to work ! $block_id = $inner_block_id; $block_size = '100%'; ! // echo $module_root_path.$block_file; ! ! $template = new mx_Template( $template->root, $board_config, $db ); ! include( $module_root_path . $block_x_file ); ! // output additional space between blocks if it is not the last block ! if ( $cell < $nested_block_count-1 ) { --- 135,196 ---- $s_hidden_fields .= '<input type="hidden" name="mode" value="setting" />'; + $edit_url = append_sid($mx_root_path . $admin_x_file . "?sid=" . $userdata['session_id']); + $edit_img = '<input type="image" src="' . PORTAL_URL . TEMPLATE_ROOT_PATH . 'images/block_icons/' . $block_x_edit_img . '" alt="' . $lang['Block_Edit'] . '" title="' . $lang['Block_Edit'] . ' :: ' . $split_block_rows['block_title'] . $block_x_desc . '">'; ! // // output Block Edit header ! // ! echo '<form action="' . $edit_url . '" method="post" class="mx_editform">'; ! echo '<table width="100%" cellpadding="0" cellspacing="0" border="0">'; ! echo ' <tbody id="phpbbEdit_Blocks" style="display: ' . ( $mx_show_edit_blocks_on ? 'display' : '' ) . ';">'; ! echo ' <tr>'; ! if ( $block_x_hidden ) ! { ! echo ' <td align="left" > '; ! echo ' <span class="gensmall"><i>'. $lang['Hidden_block'] .'</i></span>'; ! echo ' </td>'; ! } ! echo ' <td align="right" > '; ! echo $edit_img . $s_hidden_fields; ! echo ' </td>'; ! echo ' </tr>'; ! echo ' </tbody>'; ! echo '</table>'; ! echo '</form>'; } ! // // End ! // echo '</th>'; echo '</tr>'; echo '</table>'; ! ! // // check visibility (code from index.php) ! // ! $is_auth_ary = block_auth(AUTH_VIEW, $inner_block_id, $userdata, $split_block_rows['auth_view'], $split_block_rows['auth_view_group']); ! ! // // output the block ! // ! if ( ($is_auth_ary['auth_view'] && $split_block_rows['show_block'] == 1) || $is_auth_ary['auth_mod'] ) ! { ! // // set block id and block size as this must be correctly set for the inclusion to work ! // $block_id = $inner_block_id; $block_size = '100%'; ! ! // // echo $module_root_path.$block_file; ! // ! $template = new mx_Template($template->root, $board_config, $db); ! include($module_root_path . $block_x_file); ! ! // // output additional space between blocks if it is not the last block ! // if ( $cell < $nested_block_count-1 ) { *************** *** 213,225 **** echo '<img src="templates/spacer.gif" width="' . $block_space . '">'; } ! } // finish the inner placement table for a single block echo '</td></tr></table></td>'; } // finish the outer placement table ! echo '</tr></table>'; - ?> \ No newline at end of file --- 198,213 ---- echo '<img src="templates/spacer.gif" width="' . $block_space . '">'; } ! } ! ! // // finish the inner placement table for a single block + // echo '</td></tr></table></td>'; } + // // finish the outer placement table ! // echo '</tr></table>'; ?> \ No newline at end of file |
|
From: Markus P. <mar...@us...> - 2005-04-20 00:20:28
|
Update of /cvsroot/mxbb/core/includes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9293/includes Modified Files: page_tail.php Log Message: Revised page header/footer. Index: page_tail.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/page_tail.php,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** page_tail.php 19 Apr 2005 23:36:24 -0000 1.13 --- page_tail.php 20 Apr 2005 00:20:15 -0000 1.14 *************** *** 39,57 **** // Generate the fold/unfold categories switches // ! if ( $show_edit_blocks_icon ) { ! if ( ( $HTTP_COOKIE_VARS['phpbbEdit_Blocks'] ) != '' ) ! { ! $edit_on = $HTTP_COOKIE_VARS['phpbbEdit_Blocks']; ! } ! else if ( $userdata['user_level'] == ADMIN ) ! { ! $edit_on = true; ! } ! else ! { ! $edit_on = false; ! } ! $template->assign_block_vars('switch_edit_' . ( $edit_on ? 'on' : 'off' ), array()); } --- 39,45 ---- // Generate the fold/unfold categories switches // ! if ( $mx_show_edit_blocks_icon ) { ! $template->assign_block_vars('switch_edit_' . ( $mx_show_edit_blocks_on ? 'on' : 'off' ), array()); } *************** *** 59,77 **** // Compose additinal copy footer // ! for( $i = 0; $i < count($mxbb_footer_addup); $i++ ) ! { ! if ( $i == 0 ) ! { ! $mxbb_footer_text = $mxbb_footer_addup[$i]; ! } ! else ! { ! $mxbb_footer_text .= ', ' . $mxbb_footer_addup[$i]; ! } ! } ! ! if ( !empty($mxbb_footer_text) ) { ! $mxbb_footer_text = $lang['Modules_copy'] . '(' . $mxbb_footer_text . ')'; $mxbb_footer_text = '<a href="' . PORTAL_URL . 'index.' . $phpEx . '?sid=' . $userdata['session_id'] . '&mx_copy=true' . '" target="_blank">' . $mxbb_footer_text . '</a>'; } --- 47,53 ---- // Compose additinal copy footer // ! if ( count($mxbb_footer_addup) > 0 ) { ! $mxbb_footer_text = $lang['Modules_copy'] . '(' . implode(', ', $mxbb_footer_addup) . ')'; $mxbb_footer_text = '<a href="' . PORTAL_URL . 'index.' . $phpEx . '?sid=' . $userdata['session_id'] . '&mx_copy=true' . '" target="_blank">' . $mxbb_footer_text . '</a>'; } |
|
From: Markus P. <mar...@us...> - 2005-04-20 00:20:27
|
Update of /cvsroot/mxbb/core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9293 Modified Files: common.php index.php Log Message: Revised page header/footer. Index: common.php =================================================================== RCS file: /cvsroot/mxbb/core/common.php,v retrieving revision 1.30 retrieving revision 1.31 diff -C2 -d -r1.30 -r1.31 *** common.php 13 Apr 2005 20:15:55 -0000 1.30 --- common.php 20 Apr 2005 00:20:13 -0000 1.31 *************** *** 184,187 **** --- 184,188 ---- $nav_links = array(); $gen_simple_header = false; + $mxbb_footer_addup = array(); @include_once( $mx_root_path . 'config.' . $phpEx ); Index: index.php =================================================================== RCS file: /cvsroot/mxbb/core/index.php,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -d -r1.33 -r1.34 *** index.php 19 Apr 2005 19:59:32 -0000 1.33 --- index.php 20 Apr 2005 00:20:13 -0000 1.34 *************** *** 114,127 **** 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 --------------------------------------------------------------------------------------- --- 114,128 ---- if ( !empty($HTTP_COOKIE_VARS['phpbbEdit_Blocks']) ) { ! $mx_show_edit_blocks_on = $HTTP_COOKIE_VARS['phpbbEdit_Blocks']; } elseif ( $userdata['user_level'] == ADMIN ) { ! $mx_show_edit_blocks_on = true; } else { ! $mx_show_edit_blocks_on = false; } + $mx_show_edit_blocks_icon = false; // Start output of page --------------------------------------------------------------------------------------- *************** *** 168,173 **** // Page blocks // - $show_edit_blocks_icon = false; - for( $block = 0; $block < $total_block; $block++ ) { --- 169,172 ---- *************** *** 252,256 **** 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; --- 251,255 ---- if ( ( ($is_auth_ary['auth_edit'] && $block_rows[$block]['show_block'] == 1 ) || $is_auth_ary['auth_mod']) ) { ! $mx_show_edit_blocks_icon = true; $mx_block_edit = true; *************** *** 295,299 **** )); ! $layouttemplate->assign_block_vars('layout_column.blocks.edit.switch_edit_' . ( $edit_on ? 'on' : 'off' ), array()); } } --- 294,298 ---- )); ! $layouttemplate->assign_block_vars('layout_column.blocks.edit.switch_edit_' . ( $mx_show_edit_blocks_on ? 'on' : 'off' ), array()); } } *************** *** 329,333 **** // Switch: Edit Block // ! $layouttemplate->assign_block_vars('layout_column.blocks.edit.switch_edit_' . ( $edit_on ? 'on' : 'off' ), array()); } // End Edit auth --- 328,332 ---- // Switch: Edit Block // ! $layouttemplate->assign_block_vars('layout_column.blocks.edit.switch_edit_' . ( $mx_show_edit_blocks_on ? 'on' : 'off' ), array()); } // End Edit auth |
|
From: Markus P. <mar...@us...> - 2005-04-19 23:41:41
|
Update of /cvsroot/mxbb/core/templates/subSilver/admin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21046/admin Modified Files: page_footer.tpl Log Message: Revised page header/footer templates. Index: page_footer.tpl =================================================================== RCS file: /cvsroot/mxbb/core/templates/subSilver/admin/page_footer.tpl,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** page_footer.tpl 11 Feb 2005 22:39:52 -0000 1.3 --- page_footer.tpl 19 Apr 2005 23:41:31 -0000 1.4 *************** *** 17,22 **** //--> ! <div align="center"><span class="copyright">Powered by <a href="http://www.mx-system.com/" target="_mx-system" class="copyright">mxBB Portal</a> {MX_VERSION} © 2001-2005 & <a href="http://www.phpbb.com/" target="_phpbb" class="copyright">phpBB</a> {PHPBB_VERSION} © 2001, 2002 phpBB Group</span></div> ! </body> --- 17,21 ---- //--> ! <div align="center"><span class="copyright">Powered by <a href="http://www.mx-system.com/" target="_mx-system" class="copyright">mxBB Portal</a> {MX_VERSION} © 2001, 2005 & <a href="http://www.phpbb.com/" target="_phpbb" class="copyright">phpBB</a> {PHPBB_VERSION} © 2001, 2002 phpBB Group</span></div> </body> |
|
From: Markus P. <mar...@us...> - 2005-04-19 23:41:41
|
Update of /cvsroot/mxbb/core/templates/subSilver In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21046 Modified Files: overall_footer.tpl Log Message: Revised page header/footer templates. Index: overall_footer.tpl =================================================================== RCS file: /cvsroot/mxbb/core/templates/subSilver/overall_footer.tpl,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** overall_footer.tpl 19 Apr 2005 22:15:20 -0000 1.11 --- overall_footer.tpl 19 Apr 2005 23:41:31 -0000 1.12 *************** *** 20,24 **** The phpBB Group : 2002 // --> ! {POWERED_BY} <a href="http://www.mx-system.com/" target="_mx-system" class="copyright">mxBB Portal</a> © 2001-2005 & <a href="http://www.phpbb.com/" target="_phpbb" class="copyright">phpBB</a> © 2001, 2005 phpBB Group<br />{MXBB_EXTRA}<br /> </div> </td> --- 20,24 ---- The phpBB Group : 2002 // --> ! {POWERED_BY} <a href="http://www.mx-system.com/" target="_mx-system" class="copyright">mxBB Portal</a> {MX_VERSION} © 2001, 2005 & <a href="http://www.phpbb.com/" target="_phpbb" class="copyright">phpBB</a> {PHPBB_VERSION} © 2001, 2005 phpBB Group<br />{MXBB_EXTRA}<br /> </div> </td> |
|
From: Markus P. <mar...@us...> - 2005-04-19 23:36:47
|
Update of /cvsroot/mxbb/core/includes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17958/includes Modified Files: page_header.php page_tail.php Log Message: Revised page header/footer templates. Index: page_header.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/page_header.php,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** page_header.php 17 Mar 2005 11:30:37 -0000 1.17 --- page_header.php 19 Apr 2005 23:36:24 -0000 1.18 *************** *** 22,60 **** */ ! if ( !defined( 'IN_PORTAL' ) ) { ! die( "Hacking attempt" ); } ! define( 'HEADER_INC', true ); // gzip_compression [...970 lines suppressed...] ! include($mx_root_path . 'mx_meta.inc'); ! $meta_str = '<meta name="title" content="' . $title .'" />' . "\n"; ! $meta_str .= '<meta name="author" content="' . $author .'" />' . "\n"; ! $meta_str .= '<meta name="copyright" content="' . $copyright .'" />' . "\n"; ! $meta_str .= '<meta name="keywords" content="' . $keywords .'" />' . "\n"; ! $meta_str .= '<meta name="description" lang="' . $langcode .'" content="'. $description .'" />' . "\n"; ! $meta_str .= '<meta name="category" content="' . $rating .'" />' . "\n"; ! $meta_str .= '<meta name="robots" content="' . $index . ',' . $follow .'" />' . "\n"; ! $meta_str .= $header . "\n"; ! $template->assign_vars(array( ! 'META' => $meta_str) ! ); ! $template->pparse('overall_header'); ?> \ No newline at end of file Index: page_tail.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/page_tail.php,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** page_tail.php 16 Apr 2005 01:55:04 -0000 1.12 --- page_tail.php 19 Apr 2005 23:36:24 -0000 1.13 *************** *** 22,43 **** */ ! if ( !defined( 'IN_PORTAL' ) ) { ! die( 'Hacking attempt' ); } // Show the overall footer. ! ! // $admin_link = ( $userdata['user_level'] == ADMIN ) ? '<a href="' . append_sid( PORTAL_URL . "admin/index.$phpEx") . '">' . $lang['Admin_panel'] . '</a><br /><br />' : ''; ! $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 ) { - - // Generate the fold/unfold categories switches if ( ( $HTTP_COOKIE_VARS['phpbbEdit_Blocks'] ) != '' ) { --- 22,44 ---- */ ! if ( !defined('IN_PORTAL') ) { ! die('Hacking attempt'); } + // // Show the overall footer. ! // ! $admin_link = ( $userdata['user_level'] == ADMIN ) ? '<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' ) ); ! ! // ! // Generate the fold/unfold categories switches ! // if ( $show_edit_blocks_icon ) { if ( ( $HTTP_COOKIE_VARS['phpbbEdit_Blocks'] ) != '' ) { *************** *** 52,66 **** $edit_on = false; } ! 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++ ) { --- 53,62 ---- $edit_on = false; } ! $template->assign_block_vars('switch_edit_' . ( $edit_on ? 'on' : 'off' ), array()); } ! ! // ! // Compose additinal copy footer ! // for( $i = 0; $i < count($mxbb_footer_addup); $i++ ) { *************** *** 84,106 **** $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( --- 80,104 ---- $template->assign_vars(array( 'U_PORTAL_ROOT_PATH' => PORTAL_URL, 'U_PHPBB_ROOT_PATH' => PHPBB_URL, 'TEMPLATE_ROOT_PATH' => TEMPLATE_ROOT_PATH, 'MXBB_EXTRA' => $mxbb_footer_text, 'POWERED_BY' => $lang['Powered_by'], 'U_EDIT_NAV' => $edit_nav_icon_url, 'ADMIN_OPTIONS' => $lang['Show_admin_options'], ! 'MX_VERSION' => ($userdata['user_level'] == ADMIN && $userdata['user_id'] != ANONYMOUS) ? '2' . PORTAL_VERSION : '', ! 'PHPBB_VERSION' => ($userdata['user_level'] == ADMIN && $userdata['user_id'] != ANONYMOUS) ? '2' . $board_config['version'] : '', ! 'TRANSLATION_INFO' => ( isset($lang['TRANSLATION_INFO']) ) ? $lang['TRANSLATION_INFO'] : '', ! 'ADMIN_LINK' => $admin_link) ! ); ! ! // // Generate stats + // $endtime = explode(' ', microtime()); $stime = ( $endtime[1] + $endtime[0] ) - $mx_starttime; ! $execution_stats = '<div align="center"><span class="copyright">' . sprintf($lang['Execution_Stats'], $db->num_queries, round($stime, 4)) . '</span></div>'; ! // Comment out next 3 lines and stats will be turned off $template->assign_vars(array( *************** *** 110,141 **** $template->pparse('overall_footer'); // Close our DB connection. ! $db->sql_close(); // Compress buffered output if required and send to browser ! if ( $do_gzip_compress ) { ! // Borrowed from php.net! ! $gzip_contents = ob_get_contents(); ob_end_clean(); ! $gzip_size = strlen( $gzip_contents ); ! $gzip_crc = crc32( $gzip_contents ); ! $gzip_contents = gzcompress( $gzip_contents, 9 ); ! $gzip_contents = substr( $gzip_contents, 0, strlen( $gzip_contents ) - 4 ); echo "\x1f\x8b\x08\x00\x00\x00\x00\x00"; echo $gzip_contents; ! echo pack( 'V', $gzip_crc ); ! echo pack( 'V', $gzip_size ); } ! //echo( '<br><br>'.var_export($_SESSION['mx_config']) ); ! //echo( '<br><br>'.var_export($_SESSION['mx_pages']) ); ! //echo( '<br><br>'.var_export($_SESSION) ); exit; --- 108,141 ---- $template->pparse('overall_footer'); + // // Close our DB connection. ! // $db->sql_close(); + // // Compress buffered output if required and send to browser ! // if ( $do_gzip_compress ) { ! // // Borrowed from php.net! ! // $gzip_contents = ob_get_contents(); ob_end_clean(); ! $gzip_size = strlen($gzip_contents); ! $gzip_crc = crc32($gzip_contents); ! $gzip_contents = gzcompress($gzip_contents, 9); ! $gzip_contents = substr($gzip_contents, 0, strlen($gzip_contents) - 4); echo "\x1f\x8b\x08\x00\x00\x00\x00\x00"; echo $gzip_contents; ! echo pack('V', $gzip_crc); ! echo pack('V', $gzip_size); } ! //echo( '<br><br>'.var_export($_SESSION['mx_config']) ); ! //echo( '<br><br>'.var_export($_SESSION['mx_pages']) ); ! //echo( '<br><br>'.var_export($_SESSION) ); exit; |
|
From: Markus P. <mar...@us...> - 2005-04-19 22:15:30
|
Update of /cvsroot/mxbb/core/templates/subSilver In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7251 Modified Files: overall_footer.tpl overall_header.tpl Log Message: Revised page header/footer templates. Index: overall_footer.tpl =================================================================== RCS file: /cvsroot/mxbb/core/templates/subSilver/overall_footer.tpl,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** overall_footer.tpl 8 Mar 2005 19:09:42 -0000 1.10 --- overall_footer.tpl 19 Apr 2005 22:15:20 -0000 1.11 *************** *** 3,11 **** <!-- BEGIN switch_edit_on --> <span class="genmed">{ADMIN_OPTIONS}</span> ! <span class="newsbutton" onClick="rollup_contract_main(this, 'phpbbEdit_Blocks', '{U_EDIT_NAV}');"><img src="{U_EDIT_NAV}contract.gif" border="0" /></span> <!-- END switch_edit_on --> <!-- BEGIN switch_edit_off --> <span class="genmed">{ADMIN_OPTIONS}</span> ! <span class="newsbutton" onClick="rollup_contract_main(this, 'phpbbEdit_Blocks', '{U_EDIT_NAV}');"><img src="{U_EDIT_NAV}expand.gif" border="0" /></span> <!-- END switch_edit_off --> <br />{ADMIN_LINK}<br /> --- 3,11 ---- <!-- BEGIN switch_edit_on --> <span class="genmed">{ADMIN_OPTIONS}</span> ! <span class="newsbutton" onclick="rollup_contract_main(this, 'phpbbEdit_Blocks', '{U_EDIT_NAV}');"><img src="{U_EDIT_NAV}contract.gif" border="0" alt="" /></span> <!-- END switch_edit_on --> <!-- BEGIN switch_edit_off --> <span class="genmed">{ADMIN_OPTIONS}</span> ! <span class="newsbutton" onclick="rollup_contract_main(this, 'phpbbEdit_Blocks', '{U_EDIT_NAV}');"><img src="{U_EDIT_NAV}expand.gif" border="0" alt="" /></span> <!-- END switch_edit_off --> <br />{ADMIN_LINK}<br /> *************** *** 20,24 **** The phpBB Group : 2002 // --> ! {POWERED_BY} <a href="http://www.mx-system.com/" target="_mx-system" class="copyright">mxBB Portal</a> © 2001-2005 & <a href="http://www.phpbb.com/" target="_phpbb" class="copyright">phpBB</a> © 2001, 2002 phpBB Group<br />{MXBB_EXTRA}<br /> </div> </td> --- 20,24 ---- The phpBB Group : 2002 // --> ! {POWERED_BY} <a href="http://www.mx-system.com/" target="_mx-system" class="copyright">mxBB Portal</a> © 2001-2005 & <a href="http://www.phpbb.com/" target="_phpbb" class="copyright">phpBB</a> © 2001, 2005 phpBB Group<br />{MXBB_EXTRA}<br /> </div> </td> *************** *** 28,30 **** {EXECUTION_STATS} </body> ! </html> --- 28,30 ---- {EXECUTION_STATS} </body> ! </html> \ No newline at end of file Index: overall_header.tpl =================================================================== RCS file: /cvsroot/mxbb/core/templates/subSilver/overall_header.tpl,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** overall_header.tpl 6 Mar 2005 09:49:16 -0000 1.16 --- overall_header.tpl 19 Apr 2005 22:15:21 -0000 1.17 *************** *** 21,36 **** <!-- BEGIN switch_enable_pm_popup --> ! <script language="Javascript" type="text/javascript"> ! <!-- if ( {PRIVATE_MESSAGE_NEW_FLAG} ) { ! window.open('{U_PRIVATEMSGS_POPUP}', '_phpbbprivmsg', 'HEIGHT=225,resizable=yes,WIDTH=400');; } ! //--> ! </script> <!-- END switch_enable_pm_popup --> ! <SCRIPT type=text/javascript> ! <!-- function newImage(arg) { if (document.images) { --- 21,34 ---- <!-- BEGIN switch_enable_pm_popup --> ! <script language="javascript" type="text/javascript"><!-- if ( {PRIVATE_MESSAGE_NEW_FLAG} ) { ! window.open('{U_PRIVATEMSGS_POPUP}', '_phpbbprivmsg', 'HEIGHT=225,resizable=yes,WIDTH=400'); } ! // --></script> <!-- END switch_enable_pm_popup --> ! <script language="javascript" type="text/javascript"><!-- ! function newImage(arg) { if (document.images) { *************** *** 49,53 **** } ! function set_mx_cookie(in_listID, status) { var expDate = new Date(); --- 47,51 ---- } ! function set_mx_cookie(in_listID, status) { var expDate = new Date(); *************** *** 57,61 **** } ! function set_phpbb_cookie( cookieName, cookieValue, lifeTime, path, domain, isSecure ) { var expDate = new Date(); --- 55,59 ---- } ! function set_phpbb_cookie(cookieName, cookieValue, lifeTime, path, domain, isSecure) { var expDate = new Date(); *************** *** 98,223 **** } ! // --> ! </SCRIPT> ! ! <script type="text/javascript" src="templates/rollout.js"></script> ! <script type="text/javascript" src="templates/rollout_main.js"></script> ! <script type="text/javascript" src="modules/mx_newssuite/templates/rollout_cat.js"></script> ! ! <!-- End Preload Script --> ! </head> ! <body bgcolor="{T_BODY_BGCOLOR}" text="{T_BODY_TEXT}" link="{T_BODY_LINK}" vlink="{T_BODY_VLINK}" /> <a name="top"></a> ! <center> ! <table width="100%" cellspacing="0" cellpadding="5" border="0" align="center" class="mx_main_table" /> ! <tr> ! <td class="bodyline"> ! <table width="100%" cellspacing="0" cellpadding="5" border="0" class="mx_header_table"> ! <tr> ! <td align="left" valign="top" width="25%" class="row2"><a href="{U_INDEX}"><img src="{U_PORTAL_ROOT_PATH}{TEMPLATE_ROOT_PATH}images/logo_mxBB.gif" border="0" alt="{L_INDEX}" vspace="1"/></a></td> ! <td align="center" valign="middle" width="50%" class="row2">{PAGE_ICON}<span class="pagetitle">{PAGE_TITLE}</span><hr class="hrtop"></td> ! <td align="right" valign="top" width="25%" class="row2"><span class="sitetitle"><b>{SITENAME}</b></span><br /><span class="sitetitle_desc">{SITE_DESCRIPTION} </span></td> ! </tr> ! <tr> ! <td align="center" valign="middle" colspan="3" class="row1"> ! <table cellspacing="6" cellpadding="2" border="0" > ! <tr> ! <td height="15" align="center" valign="top" nowrap><span class="mainmenu"><a href="{U_INDEX}" class="mainmenu"><img src="{U_PORTAL_ROOT_PATH}{TEMPLATE_ROOT_PATH}images/page_icons/nav_home.gif" border="0" alt="{L_HOME}" hspace="3" /></a></span></td> ! <td height="15" align="center" valign="top" nowrap><span class="mainmenu"><a href="{U_INDEX_FORUM}" class="mainmenu"><img src="{U_PORTAL_ROOT_PATH}{TEMPLATE_ROOT_PATH}images/page_icons/nav_forum.gif" border="0" alt="{L_FORUM}" hspace="3" /></a></span></td> ! <td height="15" align="center" valign="top" nowrap><span class="mainmenu"><a href="{U_PROFILE}" class="mainmenu"><img src="{U_PORTAL_ROOT_PATH}{TEMPLATE_ROOT_PATH}images/page_icons/nav_profile.gif" border="0" alt="{L_PROFILE}" hspace="3" /></a></span></td> ! <!-- <td height="15" align="center" valign="top" nowrap><span class="mainmenu"><a href="{U_FAQ}" class="mainmenu"><img src="{U_PORTAL_ROOT_PATH}{TEMPLATE_ROOT_PATH}/images/page_icons/nav_help.gif" border="0" alt="{L_FAQ}" hspace="3" /></a></span></span></td> --> ! <td height="15" align="center" valign="top" nowrap><span class="mainmenu"><a href="{U_SEARCH}" class="mainmenu"><img src="{U_PORTAL_ROOT_PATH}{TEMPLATE_ROOT_PATH}images/page_icons/nav_search.gif" border="0" alt="{L_SEARCH}" hspace="3" /></a></span></td> ! <td height="15" align="center" valign="top" nowrap><span class="mainmenu"><a href="{U_MEMBERLIST}" class="mainmenu"><img src="{U_PORTAL_ROOT_PATH}{TEMPLATE_ROOT_PATH}images/page_icons/nav_members.gif" border="0" alt="{L_MEMBERLIST}" hspace="3" /></a></span></td> ! <td height="15" align="center" valign="top" nowrap><span class="mainmenu"><a href="{U_GROUP_CP}" class="mainmenu"><img src="{U_PORTAL_ROOT_PATH}{TEMPLATE_ROOT_PATH}images/page_icons/nav_settings.gif" border="0" alt="{L_USERGROUPS}" hspace="3" /></a></span></td> ! <td height="15" align="center" valign="top" nowrap><span class="mainmenu"><a href="{U_PRIVATEMSGS}" class="mainmenu"><img src="{U_PORTAL_ROOT_PATH}{TEMPLATE_ROOT_PATH}images/page_icons/nav_email.gif" border="0" alt="{PRIVATE_MESSAGE_INFO}" hspace="3" /></a></span></td> ! <td height="15" align="center" valign="top" nowrap><span class="mainmenu"><a href="{U_LOGIN_LOGOUT}" class="mainmenu"><img src="{U_PORTAL_ROOT_PATH}{TEMPLATE_ROOT_PATH}images/page_icons/nav_login.gif" border="0" alt="{L_LOGIN_LOGOUT}" hspace="3" /></a></span></td> ! ! <!-- BEGIN switch_user_logged_out --> ! <td height="15" align="center" valign="top" nowrap><a href="{U_REGISTER}" class="mainmenu"><img src="{U_PORTAL_ROOT_PATH}{TEMPLATE_ROOT_PATH}images/page_icons/nav_register.gif" border="0" alt="{L_REGISTER}" hspace="3" /></a></span></td> ! ! <!-- END switch_user_logged_out --> ! </tr> ! <tr> ! <td height="15" align="center" valign="top" nowrap><span class="mainmenu"><a href="{U_INDEX}" class="mainmenu">{L_HOME}</a></span></td> ! <td height="15" align="center" valign="top" nowrap><span class="mainmenu"><a href="{U_INDEX_FORUM}" class="mainmenu">{L_FORUM}</a></span></td> ! <td height="15" align="center" valign="top" nowrap><span class="mainmenu"><a href="{U_PROFILE}" class="mainmenu">{L_PROFILE}</a></span></td> ! <!-- <td height="15" align="center" valign="top" nowrap><span class="mainmenu"><a href="{U_FAQ}" class="mainmenu">{L_FAQ}</a></span></td> --> ! <td height="15" align="center" valign="top" nowrap><span class="mainmenu"><a href="{U_SEARCH}" class="mainmenu">{L_SEARCH}</a></span></td> ! <td height="15" align="center" valign="top" nowrap><span class="mainmenu"><a href="{U_MEMBERLIST}" class="mainmenu">{L_MEMBERLIST}</a></span></td> ! <td height="15" align="center" valign="top" nowrap><span class="mainmenu"><a href="{U_GROUP_CP}" class="mainmenu">{L_USERGROUPS}</a></span></td> ! <td height="15" align="center" valign="top" nowrap><span class="mainmenu"><a href="{U_PRIVATEMSGS}" class="mainmenu">{L_PRIVATEMSGS}</a></span></td> ! <td height="15" align="center" valign="top" nowrap><span class="mainmenu"><a href="{U_LOGIN_LOGOUT}" class="mainmenu">{L_LOGIN_LOGOUT} </a></span></td> ! <!-- BEGIN switch_user_logged_out --> ! <td height="15" align="center" valign="top" nowrap><a href="{U_REGISTER}" class="mainmenu">{L_REGISTER}</a></span></td> ! <!-- END switch_user_logged_out --> ! </tr> ! </table> ! </td> ! </tr> ! <!-- BEGIN switch_view --> ! <tr> ! <td align="left" valign="bottom" colspan="3" ><span class="gensmall">{CURRENT_TIME}</span></td> ! </tr> ! <tr> ! <td align="left" valign="bottom" colspan="3" ><span class="nav"><a href="{U_INDEX}" class="nav">{L_INDEX}</a></span></td> ! </tr> ! <!-- END switch_view --> ! </table> ! <table width="100%" cellspacing="0" cellpadding="2" border="0" align="center"> ! <tr> ! <td valign="top" align="left" width="5" height="5" > </td> ! <td valign="top" align="right" width="100%" height="5" > ! <form name="search_block" method="post" action="{U_SEARCH}" onsubmit="return checkSearch()"> ! <a href="{U_SEARCH}"><span class="gen">{L_SEARCH}:</span></a> ! <input class="post" type="text" name="search_keywords" size="15"> ! <select class="post" name="search_engine"> ! {L_SEARCH_SITE} ! {L_SEARCH_FORUM} ! {L_SEARCH_KB} ! {L_SEARCH_GOOGLE} ! </select> ! <input type="hidden" name="search_fields" value="all"> ! <input type="hidden" name="show_results" value="topics"> ! <input class="mainoption" type="submit" value="Search"> ! </form> ! </td> ! <td valign="top" align="left" width="5" height="5" > </td> ! </tr> ! </table> ! ! <!-- BEGIN portal_top_links_off --> ! <!-- ! /* ! <!-- END portal_top_links_off --> ! <table width="100%" cellspacing="0" cellpadding="2" border="0" align="center"> ! <tr> ! <td align="left" valign="top" ><span class="gensmall"> ! <!-- BEGIN switch_user_logged_in --> ! {LAST_VISIT_DATE}<br /> ! <!-- END switch_user_logged_in --> ! {CURRENT_TIME}<br /></span> ! </td> ! <td align="right" valign="top" > ! <!-- BEGIN switch_user_logged_in --> ! <a href="{U_SEARCH_NEW}" class="gensmall">{L_SEARCH_NEW}</a><br /><a href="{U_SEARCH_SELF}" class="gensmall">{L_SEARCH_SELF}</a><br /> ! <!-- END switch_user_logged_in --> ! <a href="{U_SEARCH_UNANSWERED}" class="gensmall">{L_SEARCH_UNANSWERED}</a> ! </td> ! </tr> ! </table> ! <!-- BEGIN portal_top_links_off --> ! */ ! --> ! <!-- END portal_top_links_off --> \ No newline at end of file --- 96,213 ---- } ! // --></script> ! <script language="javascript" type="text/javascript" src="templates/rollout.js"></script> ! <script language="javascript" type="text/javascript" src="templates/rollout_main.js"></script> ! <script language="javascript" type="text/javascript" src="modules/mx_newssuite/templates/rollout_cat.js"></script> </head> ! <body bgcolor="{T_BODY_BGCOLOR}" text="{T_BODY_TEXT}" link="{T_BODY_LINK}" vlink="{T_BODY_VLINK}"> <a name="top"></a> ! <table width="100%" cellspacing="0" cellpadding="5" border="0" align="center" class="mx_main_table"> ! <tr> ! <td class="bodyline"> ! <table width="100%" cellspacing="0" cellpadding="5" border="0" class="mx_header_table"> ! <tr> ! <td class="row2" width="25%" align="left" valign="top"><a href="{U_INDEX}"><img src="{U_PORTAL_ROOT_PATH}{TEMPLATE_ROOT_PATH}images/logo_mxBB.gif" border="0" alt="{L_INDEX}" vspace="1"/></a></td> ! <td class="row2" width="50%" align="center" valign="middle">{PAGE_ICON}<span class="pagetitle">{PAGE_TITLE}</span><hr class="hrtop"></td> ! <td class="row2" width="25%" align="right" valign="top"><span class="sitetitle"><b>{SITENAME}</b></span><br /><span class="sitetitle_desc">{SITE_DESCRIPTION} </span></td> ! </tr> ! <tr> ! <td class="row1" align="center" valign="middle" colspan="3"> ! <table cellspacing="6" cellpadding="2" border="0"> ! <tr> ! <td height="15" align="center" valign="top" nowrap><span class="mainmenu"><a href="{U_INDEX}" class="mainmenu"><img src="{U_PORTAL_ROOT_PATH}{TEMPLATE_ROOT_PATH}images/page_icons/nav_home.gif" border="0" alt="{L_HOME}" hspace="3" /></a></span></td> ! <td height="15" align="center" valign="top" nowrap><span class="mainmenu"><a href="{U_INDEX_FORUM}" class="mainmenu"><img src="{U_PORTAL_ROOT_PATH}{TEMPLATE_ROOT_PATH}images/page_icons/nav_forum.gif" border="0" alt="{L_FORUM}" hspace="3" /></a></span></td> ! <td height="15" align="center" valign="top" nowrap><span class="mainmenu"><a href="{U_PROFILE}" class="mainmenu"><img src="{U_PORTAL_ROOT_PATH}{TEMPLATE_ROOT_PATH}images/page_icons/nav_profile.gif" border="0" alt="{L_PROFILE}" hspace="3" /></a></span></td> ! <!-- <td height="15" align="center" valign="top" nowrap><span class="mainmenu"><a href="{U_FAQ}" class="mainmenu"><img src="{U_PORTAL_ROOT_PATH}{TEMPLATE_ROOT_PATH}/images/page_icons/nav_help.gif" border="0" alt="{L_FAQ}" hspace="3" /></a></span></span></td> --> ! <td height="15" align="center" valign="top" nowrap><span class="mainmenu"><a href="{U_SEARCH}" class="mainmenu"><img src="{U_PORTAL_ROOT_PATH}{TEMPLATE_ROOT_PATH}images/page_icons/nav_search.gif" border="0" alt="{L_SEARCH}" hspace="3" /></a></span></td> ! <td height="15" align="center" valign="top" nowrap><span class="mainmenu"><a href="{U_MEMBERLIST}" class="mainmenu"><img src="{U_PORTAL_ROOT_PATH}{TEMPLATE_ROOT_PATH}images/page_icons/nav_members.gif" border="0" alt="{L_MEMBERLIST}" hspace="3" /></a></span></td> ! <td height="15" align="center" valign="top" nowrap><span class="mainmenu"><a href="{U_GROUP_CP}" class="mainmenu"><img src="{U_PORTAL_ROOT_PATH}{TEMPLATE_ROOT_PATH}images/page_icons/nav_settings.gif" border="0" alt="{L_USERGROUPS}" hspace="3" /></a></span></td> ! <td height="15" align="center" valign="top" nowrap><span class="mainmenu"><a href="{U_PRIVATEMSGS}" class="mainmenu"><img src="{U_PORTAL_ROOT_PATH}{TEMPLATE_ROOT_PATH}images/page_icons/nav_email.gif" border="0" alt="{PRIVATE_MESSAGE_INFO}" hspace="3" /></a></span></td> ! <td height="15" align="center" valign="top" nowrap><span class="mainmenu"><a href="{U_LOGIN_LOGOUT}" class="mainmenu"><img src="{U_PORTAL_ROOT_PATH}{TEMPLATE_ROOT_PATH}images/page_icons/nav_login.gif" border="0" alt="{L_LOGIN_LOGOUT}" hspace="3" /></a></span></td> ! <!-- BEGIN switch_user_logged_out --> ! <td height="15" align="center" valign="top" nowrap><a href="{U_REGISTER}" class="mainmenu"><img src="{U_PORTAL_ROOT_PATH}{TEMPLATE_ROOT_PATH}images/page_icons/nav_register.gif" border="0" alt="{L_REGISTER}" hspace="3" /></a></span></td> ! ! <!-- END switch_user_logged_out --> ! </tr> ! <tr> ! <td height="15" align="center" valign="top" nowrap><span class="mainmenu"><a href="{U_INDEX}" class="mainmenu">{L_HOME}</a></span></td> ! <td height="15" align="center" valign="top" nowrap><span class="mainmenu"><a href="{U_INDEX_FORUM}" class="mainmenu">{L_FORUM}</a></span></td> ! <td height="15" align="center" valign="top" nowrap><span class="mainmenu"><a href="{U_PROFILE}" class="mainmenu">{L_PROFILE}</a></span></td> ! <!-- <td height="15" align="center" valign="top" nowrap><span class="mainmenu"><a href="{U_FAQ}" class="mainmenu">{L_FAQ}</a></span></td> --> ! <td height="15" align="center" valign="top" nowrap><span class="mainmenu"><a href="{U_SEARCH}" class="mainmenu">{L_SEARCH}</a></span></td> ! <td height="15" align="center" valign="top" nowrap><span class="mainmenu"><a href="{U_MEMBERLIST}" class="mainmenu">{L_MEMBERLIST}</a></span></td> ! <td height="15" align="center" valign="top" nowrap><span class="mainmenu"><a href="{U_GROUP_CP}" class="mainmenu">{L_USERGROUPS}</a></span></td> ! <td height="15" align="center" valign="top" nowrap><span class="mainmenu"><a href="{U_PRIVATEMSGS}" class="mainmenu">{L_PRIVATEMSGS}</a></span></td> ! <td height="15" align="center" valign="top" nowrap><span class="mainmenu"><a href="{U_LOGIN_LOGOUT}" class="mainmenu">{L_LOGIN_LOGOUT} </a></span></td> ! <!-- BEGIN switch_user_logged_out --> ! <td height="15" align="center" valign="top" nowrap><a href="{U_REGISTER}" class="mainmenu">{L_REGISTER}</a></span></td> ! <!-- END switch_user_logged_out --> ! </tr> ! </table> ! </td> ! </tr> + <!-- BEGIN switch_view --> + <tr> + <td align="left" valign="bottom" colspan="3" ><span class="gensmall">{CURRENT_TIME}</span></td> + </tr> + <tr> + <td align="left" valign="bottom" colspan="3" ><span class="nav"><a href="{U_INDEX}" class="nav">{L_INDEX}</a></span></td> + </tr> + <!-- END switch_view --> ! </table> ! <table width="100%" cellspacing="0" cellpadding="2" border="0" align="center"> ! <tr> ! <td valign="top" align="left" width="5" height="5" > </td> ! <td valign="top" align="right" width="100%" height="5" > ! <form name="search_block" method="post" action="{U_SEARCH}" onsubmit="return checkSearch()"> ! <a href="{U_SEARCH}"><span class="gen">{L_SEARCH}:</span></a> ! <input class="post" type="text" name="search_keywords" size="15"> ! <select class="post" name="search_engine"> ! {L_SEARCH_SITE} ! {L_SEARCH_FORUM} ! {L_SEARCH_KB} ! {L_SEARCH_GOOGLE} ! </select> ! <input type="hidden" name="search_fields" value="all"> ! <input type="hidden" name="show_results" value="topics"> ! <input class="mainoption" type="submit" value="Search"> ! </form> ! </td> ! <td valign="top" align="left" width="5" height="5" > </td> ! </tr> ! </table> ! <!-- BEGIN portal_top_links_off --> ! <!-- ! /* ! <!-- END portal_top_links_off --> ! <table width="100%" cellspacing="0" cellpadding="2" border="0" align="center"> ! <tr> ! <td align="left" valign="top" ><span class="gensmall"> ! <!-- BEGIN switch_user_logged_in --> ! {LAST_VISIT_DATE}<br /> ! <!-- END switch_user_logged_in --> ! {CURRENT_TIME}<br /></span> ! </td> ! <td align="right" valign="top" > ! <!-- BEGIN switch_user_logged_in --> ! <a href="{U_SEARCH_NEW}" class="gensmall">{L_SEARCH_NEW}</a><br /><a href="{U_SEARCH_SELF}" class="gensmall">{L_SEARCH_SELF}</a><br /> ! <!-- END switch_user_logged_in --> ! <a href="{U_SEARCH_UNANSWERED}" class="gensmall">{L_SEARCH_UNANSWERED}</a> ! </td> ! </tr> ! </table> ! <!-- BEGIN portal_top_links_off --> ! */ ! --> ! <!-- END portal_top_links_off --> \ No newline at end of file |
|
From: Markus P. <mar...@us...> - 2005-04-19 21:52:51
|
Update of /cvsroot/mxbb/core/includes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28058 Modified Files: mx_functions.php Log Message: Fixed mx_get_groups function to avoid errors when no usergroup is defined. Index: mx_functions.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/mx_functions.php,v retrieving revision 1.36 retrieving revision 1.37 diff -C2 -d -r1.36 -r1.37 *** mx_functions.php 16 Apr 2005 21:51:35 -0000 1.36 --- mx_functions.php 19 Apr 2005 21:52:43 -0000 1.37 *************** *** 707,740 **** } ! function mx_get_groups( $sel_id, $field_entry = 'auth_view_group' ) { ! global $db; $sql = "SELECT group_id, group_name ! FROM " . GROUPS_TABLE; ! ! if ( !$result = $db->sql_query( $sql ) ) { ! message_die( GENERAL_ERROR, "Couldn't get list of groups", "", __LINE__, __FILE__, $sql ); } ! $grouplist = '<select name="' . $field_entry . '">'; ! ! while ( $row = $db->sql_fetchrow( $result ) ) { ! if ( $row['group_name'] != '' ) ! { ! if ( $sel_id == $row['group_id'] ) ! { ! $status = "selected"; ! } ! else ! { ! $status = ''; ! } ! $grouplist .= '<option value="' . $row['group_id'] . '" ' . $status . '>' . $row['group_name'] . '</option>'; ! } } - $grouplist .= '</select>'; --- 707,730 ---- } ! function mx_get_groups($sel_id, $field_entry = 'auth_view_group') { ! global $db, $lang; $sql = "SELECT group_id, group_name ! FROM " . GROUPS_TABLE . " ! WHERE group_single_user <> " . TRUE . " ! ORDER BY group_name"; ! if( !($result = $db->sql_query($sql)) ) { ! message_die(GENERAL_ERROR, "Couldn't get list of groups", "", __LINE__, __FILE__, $sql); } ! $grouplist = '<select name="'.$field_entry.'">'; ! $grouplist .= '<option value="0">' . $lang['Select_group'] . '</option>'; ! while( $row = $db->sql_fetchrow($result) ) { ! $selected = ( $sel_id == $row['group_id'] ? ' selected="selected"' : '' ); ! $grouplist .= '<option value="' .$row['group_id'] . '"' . $selected . '>' . $row['group_name'] . '</option>'; } $grouplist .= '</select>'; *************** *** 742,745 **** --- 732,736 ---- } + // Add search words for blocks function mx_add_search_words($mode, $post_id, $post_text, $post_title = '', $mx_mode = 'mx') |
|
From: Markus P. <mar...@us...> - 2005-04-19 21:36:46
|
Update of /cvsroot/mxbb/core/admin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20438 Modified Files: page_footer_admin.php page_header_admin.php pagestart.php Log Message: Admin page header/footer synchronized with phpBB 2.0.14 Index: pagestart.php =================================================================== RCS file: /cvsroot/mxbb/core/admin/pagestart.php,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** pagestart.php 12 Apr 2005 17:38:36 -0000 1.9 --- pagestart.php 19 Apr 2005 21:36:37 -0000 1.10 *************** *** 19,66 **** */ /** * MX Notes: ! * This file is borrowed from phpBB, with some modifications ! * Also, the BLOCK_EDIT switch makes this file accessible when editing blocks in portal mode */ ! if ( !defined( 'IN_PORTAL' ) ) { ! die( "Hacking attempt" ); } ! define( 'IN_ADMIN', true ); ! include_once( $mx_root_path . 'extension.inc' ); ! include_once( $mx_root_path . 'common.' . $phpEx ); ! include_once( $mx_root_path . 'includes/mx_admincp.' . $phpEx ); ! include_once( $phpbb_root_path . 'includes/functions_admin.' . $phpEx ); ! include_once( $phpbb_root_path . 'includes/functions_post.' . $phpEx ); // Start session management ! ! $userdata = session_pagestart( $user_ip, PAGE_INDEX ); ! mx_init_userprefs( $userdata ); ! // End session management // Security - used for block_edits ! $block_id = $mx_request_vars->post('block_id', MX_TYPE_INT, '0'); ! $block_config = read_block_config( $block_id, false ); ! ! $block_edit_auth = array(); ! $block_edit_auth = block_auth( AUTH_EDIT, $block_id , $userdata, $block_config[$block_id][auth_edit], $block_config[$block_id][auth_edit_group] ); if ( !$userdata['session_logged_in'] ) { //die(append_sid( $mx_root_path . "login.php?redirect=admin/" . $mx_admin_file, true )); ! mx_redirect( append_sid( "login.php?redirect=admin/" . $mx_admin_file, true ) ); } ! if ( !($userdata['user_level'] == ADMIN || $block_edit_auth[auth_edit] ) ) { ! mx_message_die( GENERAL_MESSAGE, $lang['Not_admin'] ); } --- 19,71 ---- */ + // ================================================================================ + // The following code is based on admin/pagestart.php (phpBB 2.0.14) + // ================================================================================ + /** * MX Notes: ! * The BLOCK_EDIT switch makes this file accessible when editing blocks in portal mode. */ ! if ( !defined('IN_PORTAL') ) { ! die("Hacking attempt"); } ! define('IN_ADMIN', true); ! include_once($mx_root_path . 'extension.inc'); ! include_once($mx_root_path . 'common.' . $phpEx); ! include_once($mx_root_path . 'includes/mx_admincp.' . $phpEx); ! include_once($phpbb_root_path . 'includes/functions_admin.' . $phpEx); ! include_once($phpbb_root_path . 'includes/functions_post.' . $phpEx); + // // Start session management ! // ! $userdata = session_pagestart($user_ip, PAGE_INDEX); ! mx_init_userprefs($userdata); ! // // End session management + // + // // Security - used for block_edits + // + $block_id = $mx_request_vars->post('block_id', MX_TYPE_INT, 0); + $block_config = read_block_config($block_id, false); ! $block_edit_auth = block_auth(AUTH_EDIT, $block_id, $userdata, $block_config[$block_id]['auth_edit'], $block_config[$block_id]['auth_edit_group']); if ( !$userdata['session_logged_in'] ) { //die(append_sid( $mx_root_path . "login.php?redirect=admin/" . $mx_admin_file, true )); ! mx_redirect(append_sid("login.php?redirect=admin/" . $mx_admin_file, true)); } ! if ( !($userdata['user_level'] == ADMIN || $block_edit_auth['auth_edit'] ) ) { ! mx_message_die(GENERAL_MESSAGE, $lang['Not_admin']); } *************** *** 74,85 **** $url .= ( ( strpos( $url, '?' ) ) ? '&' : '?' ) . 'sid=' . $userdata['session_id']; ! mx_redirect( "index.$phpEx?sid=" . $userdata['session_id'] ); } ! if ( empty( $no_page_header ) ) ! { // Not including the pageheader can be neccesarry if META tags are // needed in the calling script. ! include( $mx_root_path . 'admin/page_header_admin.' . $phpEx ); } --- 79,90 ---- $url .= ( ( strpos( $url, '?' ) ) ? '&' : '?' ) . 'sid=' . $userdata['session_id']; ! mx_redirect("index.$phpEx?sid=" . $userdata['session_id']); } ! if ( empty($no_page_header) ) ! { // Not including the pageheader can be neccesarry if META tags are // needed in the calling script. ! include($mx_root_path . 'admin/page_header_admin.' . $phpEx); } Index: page_header_admin.php =================================================================== RCS file: /cvsroot/mxbb/core/admin/page_header_admin.php,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** page_header_admin.php 14 Mar 2005 20:56:21 -0000 1.6 --- page_header_admin.php 19 Apr 2005 21:36:37 -0000 1.7 *************** *** 19,62 **** */ ! /** ! * MX Notes: ! * This file is borrowed from phpBB, with some commented modifications ! */ ! if ( !defined( 'IN_PORTAL' ) ) { ! die( "Hacking attempt" ); } ! define( 'HEADER_INC', true ); // gzip_compression ! ! $do_gzip_compress = false; if ( $board_config['gzip_compress'] ) { $phpver = phpversion(); ! $useragent = ( isset( $_SERVER["HTTP_USER_AGENT"] ) ) ? $_SERVER["HTTP_USER_AGENT"] : $HTTP_USER_AGENT; ! if ( $phpver >= '4.0.4pl1' && ( strstr( $useragent, 'compatible' ) || strstr( $useragent, 'Gecko' ) ) ) { ! if ( extension_loaded( 'zlib' ) ) { @ob_end_clean(); ! ob_start( 'ob_gzhandler' ); } } else if ( $phpver > '4.0' ) { ! if ( strstr( $HTTP_SERVER_VARS['HTTP_ACCEPT_ENCODING'], 'gzip' ) ) { ! if ( extension_loaded( 'zlib' ) ) { ! $do_gzip_compress = true; ob_start(); ! ob_implicit_flush( 0 ); ! header( 'Content-Encoding: gzip' ); } } --- 19,62 ---- */ ! // ================================================================================ ! // The following code is based on admin/page_header_admin.php (phpBB 2.0.14) ! // ================================================================================ ! if ( !defined('IN_PORTAL') ) { ! die("Hacking attempt"); } ! define('HEADER_INC', true); + // // gzip_compression ! // ! $do_gzip_compress = FALSE; if ( $board_config['gzip_compress'] ) { $phpver = phpversion(); ! $useragent = (isset($HTTP_SERVER_VARS['HTTP_USER_AGENT'])) ? $HTTP_SERVER_VARS['HTTP_USER_AGENT'] : getenv('HTTP_USER_AGENT'); ! if ( $phpver >= '4.0.4pl1' && ( strstr($useragent,'compatible') || strstr($useragent,'Gecko') ) ) { ! if ( extension_loaded('zlib') ) { @ob_end_clean(); ! ob_start('ob_gzhandler'); } } else if ( $phpver > '4.0' ) { ! if ( strstr($HTTP_SERVER_VARS['HTTP_ACCEPT_ENCODING'], 'gzip') ) { ! if ( extension_loaded('zlib') ) { ! $do_gzip_compress = TRUE; ob_start(); ! ob_implicit_flush(0); ! header('Content-Encoding: gzip'); } } *************** *** 64,140 **** } ! $template->set_filenames( array( 'header' => 'admin/page_header.tpl' ) ! ); // Format Timezone. We are unable to use array_pop here, because of PHP3 compatibility ! $l_timezone = explode( '.', $board_config['board_timezone'] ); ! $l_timezone = ( count( $l_timezone ) > 1 && $l_timezone[count( $l_timezone )-1] != 0 ) ? $lang[sprintf( '%.1f', $board_config['board_timezone'] )] : $lang[number_format( $board_config['board_timezone'] )]; // The following assigns all _common_ variables that may be used at any point // in a template. Note that all URL's should be wrapped in append_sid, as // should all S_x_ACTIONS for forms. ! $template->assign_vars( array( 'SITENAME' => $board_config['sitename'], ! 'PAGE_TITLE' => $page_title, ! ! 'L_ADMIN' => $lang['Admin'], ! 'L_INDEX' => sprintf( $lang['Forum_Index'], $board_config['sitename'] ), ! 'L_FAQ' => $lang['FAQ'], ! 'U_INDEX' => append_sid( '../index.' . $phpEx ), ! 'S_TIMEZONE' => sprintf( $lang['All_times'], $l_timezone ), ! 'S_LOGIN_ACTION' => append_sid( '../login.' . $phpEx ), ! 'S_JUMPBOX_ACTION' => append_sid( '../viewforum.' . $phpEx ), ! 'S_CURRENT_TIME' => sprintf( $lang['Current_time'], create_date( $board_config['default_dateformat'], time(), $board_config['board_timezone'] ) ), ! 'S_CONTENT_DIRECTION' => $lang['DIRECTION'], ! 'S_CONTENT_ENCODING' => $lang['ENCODING'], ! 'S_CONTENT_DIR_LEFT' => $lang['LEFT'], ! 'S_CONTENT_DIR_RIGHT' => $lang['RIGHT'], ! // MX ADDON ! 'L_MX_ADMIN' => 'MX-System Portal Administration', ! 'U_PHPBB_ROOT_PATH' => PHPBB_URL, ! 'U_PORTAL_ROOT_PATH' => PORTAL_URL, ! 'TEMPLATE_ROOT_PATH' => TEMPLATE_ROOT_PATH, ! // END ! 'T_HEAD_STYLESHEET' => $theme['head_stylesheet'], ! 'T_BODY_BACKGROUND' => $theme['body_background'], ! 'T_BODY_BGCOLOR' => '#' . $theme['body_bgcolor'], ! 'T_BODY_TEXT' => '#' . $theme['body_text'], ! 'T_BODY_LINK' => '#' . $theme['body_link'], ! 'T_BODY_VLINK' => '#' . $theme['body_vlink'], ! 'T_BODY_ALINK' => '#' . $theme['body_alink'], ! 'T_BODY_HLINK' => '#' . $theme['body_hlink'], ! 'T_TR_COLOR1' => '#' . $theme['tr_color1'], ! 'T_TR_COLOR2' => '#' . $theme['tr_color2'], ! 'T_TR_COLOR3' => '#' . $theme['tr_color3'], ! 'T_TR_CLASS1' => $theme['tr_class1'], ! 'T_TR_CLASS2' => $theme['tr_class2'], ! 'T_TR_CLASS3' => $theme['tr_class3'], ! 'T_TH_COLOR1' => '#' . $theme['th_color1'], ! 'T_TH_COLOR2' => '#' . $theme['th_color2'], ! 'T_TH_COLOR3' => '#' . $theme['th_color3'], ! 'T_TH_CLASS1' => $theme['th_class1'], ! 'T_TH_CLASS2' => $theme['th_class2'], ! 'T_TH_CLASS3' => $theme['th_class3'], ! 'T_TD_COLOR1' => '#' . $theme['td_color1'], ! 'T_TD_COLOR2' => '#' . $theme['td_color2'], ! 'T_TD_COLOR3' => '#' . $theme['td_color3'], ! 'T_TD_CLASS1' => $theme['td_class1'], ! 'T_TD_CLASS2' => $theme['td_class2'], ! 'T_TD_CLASS3' => $theme['td_class3'], ! 'T_FONTFACE1' => $theme['fontface1'], ! 'T_FONTFACE2' => $theme['fontface2'], ! 'T_FONTFACE3' => $theme['fontface3'], ! 'T_FONTSIZE1' => $theme['fontsize1'], ! 'T_FONTSIZE2' => $theme['fontsize2'], ! 'T_FONTSIZE3' => $theme['fontsize3'], ! 'T_FONTCOLOR1' => '#' . $theme['fontcolor1'], ! 'T_FONTCOLOR2' => '#' . $theme['fontcolor2'], ! 'T_FONTCOLOR3' => '#' . $theme['fontcolor3'], ! 'T_SPAN_CLASS1' => $theme['span_class1'], ! 'T_SPAN_CLASS2' => $theme['span_class2'], ! 'T_SPAN_CLASS3' => $theme['span_class3'] ! ) ); ! $template->pparse( 'header' ); ?> \ No newline at end of file --- 64,144 ---- } ! $template->set_filenames(array( ! 'header' => 'admin/page_header.tpl') ! ); ! // Format Timezone. We are unable to use array_pop here, because of PHP3 compatibility ! $l_timezone = explode('.', $board_config['board_timezone']); ! $l_timezone = (count($l_timezone) > 1 && $l_timezone[count($l_timezone)-1] != 0) ? $lang[sprintf('%.1f', $board_config['board_timezone'])] : $lang[number_format($board_config['board_timezone'])]; + // // The following assigns all _common_ variables that may be used at any point // in a template. Note that all URL's should be wrapped in append_sid, as // should all S_x_ACTIONS for forms. + // + $template->assign_vars(array( + 'SITENAME' => $board_config['sitename'], + 'PAGE_TITLE' => $page_title, ! 'L_ADMIN' => $lang['Admin'], ! 'L_INDEX' => sprintf($lang['Forum_Index'], $board_config['sitename']), ! 'L_FAQ' => $lang['FAQ'], ! 'U_INDEX' => append_sid('../index.'.$phpEx), ! 'S_TIMEZONE' => sprintf($lang['All_times'], $l_timezone), ! 'S_LOGIN_ACTION' => append_sid('../login.'.$phpEx), ! 'S_JUMPBOX_ACTION' => append_sid('../viewforum.'.$phpEx), ! 'S_CURRENT_TIME' => sprintf($lang['Current_time'], create_date($board_config['default_dateformat'], time(), $board_config['board_timezone'])), ! 'S_CONTENT_DIRECTION' => $lang['DIRECTION'], ! 'S_CONTENT_ENCODING' => $lang['ENCODING'], ! 'S_CONTENT_DIR_LEFT' => $lang['LEFT'], ! 'S_CONTENT_DIR_RIGHT' => $lang['RIGHT'], ! // MX ADDON ! 'L_MX_ADMIN' => 'mxBB-Portal Administration', ! 'U_PHPBB_ROOT_PATH' => PHPBB_URL, ! 'U_PORTAL_ROOT_PATH' => PORTAL_URL, ! 'TEMPLATE_ROOT_PATH' => TEMPLATE_ROOT_PATH, ! // END ! 'T_HEAD_STYLESHEET' => $theme['head_stylesheet'], ! 'T_BODY_BACKGROUND' => $theme['body_background'], ! 'T_BODY_BGCOLOR' => '#'.$theme['body_bgcolor'], ! 'T_BODY_TEXT' => '#'.$theme['body_text'], ! 'T_BODY_LINK' => '#'.$theme['body_link'], ! 'T_BODY_VLINK' => '#'.$theme['body_vlink'], ! 'T_BODY_ALINK' => '#'.$theme['body_alink'], ! 'T_BODY_HLINK' => '#'.$theme['body_hlink'], ! 'T_TR_COLOR1' => '#'.$theme['tr_color1'], ! 'T_TR_COLOR2' => '#'.$theme['tr_color2'], ! 'T_TR_COLOR3' => '#'.$theme['tr_color3'], ! 'T_TR_CLASS1' => $theme['tr_class1'], ! 'T_TR_CLASS2' => $theme['tr_class2'], ! 'T_TR_CLASS3' => $theme['tr_class3'], ! 'T_TH_COLOR1' => '#'.$theme['th_color1'], ! 'T_TH_COLOR2' => '#'.$theme['th_color2'], ! 'T_TH_COLOR3' => '#'.$theme['th_color3'], ! 'T_TH_CLASS1' => $theme['th_class1'], ! 'T_TH_CLASS2' => $theme['th_class2'], ! 'T_TH_CLASS3' => $theme['th_class3'], ! 'T_TD_COLOR1' => '#'.$theme['td_color1'], ! 'T_TD_COLOR2' => '#'.$theme['td_color2'], ! 'T_TD_COLOR3' => '#'.$theme['td_color3'], ! 'T_TD_CLASS1' => $theme['td_class1'], ! 'T_TD_CLASS2' => $theme['td_class2'], ! 'T_TD_CLASS3' => $theme['td_class3'], ! 'T_FONTFACE1' => $theme['fontface1'], ! 'T_FONTFACE2' => $theme['fontface2'], ! 'T_FONTFACE3' => $theme['fontface3'], ! 'T_FONTSIZE1' => $theme['fontsize1'], ! 'T_FONTSIZE2' => $theme['fontsize2'], ! 'T_FONTSIZE3' => $theme['fontsize3'], ! 'T_FONTCOLOR1' => '#'.$theme['fontcolor1'], ! 'T_FONTCOLOR2' => '#'.$theme['fontcolor2'], ! 'T_FONTCOLOR3' => '#'.$theme['fontcolor3'], ! 'T_SPAN_CLASS1' => $theme['span_class1'], ! 'T_SPAN_CLASS2' => $theme['span_class2'], ! 'T_SPAN_CLASS3' => $theme['span_class3']) ! ); ! $template->pparse('header'); ?> \ No newline at end of file Index: page_footer_admin.php =================================================================== RCS file: /cvsroot/mxbb/core/admin/page_footer_admin.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** page_footer_admin.php 11 Feb 2005 22:39:51 -0000 1.4 --- page_footer_admin.php 19 Apr 2005 21:36:37 -0000 1.5 *************** *** 19,69 **** */ ! /** ! * MX Notes: ! * This file is borrowed from phpBB, with some commented modifications ! */ ! if ( !defined( 'IN_PHPBB' ) ) { ! die( "Hacking attempt" ); } // Show the overall footer. ! $template->set_filenames( array( 'page_footer' => 'admin/page_footer.tpl' ) ! ); ! ! $template->assign_vars( array( 'PHPBB_VERSION' => '2' . $board_config['version'], ! 'MX_VERSION' => PORTAL_VERSION, ! 'TRANSLATION_INFO' => '' ) ! ); ! $template->pparse( 'page_footer' ); // Close our DB connection. ! $db->sql_close(); // Compress buffered output if required // and send to browser ! ! if ( $do_gzip_compress ) { ! // Borrowed from php.net! ! $gzip_contents = ob_get_contents(); ob_end_clean(); ! $gzip_size = strlen( $gzip_contents ); ! $gzip_crc = crc32( $gzip_contents ); ! $gzip_contents = gzcompress( $gzip_contents, 9 ); ! $gzip_contents = substr( $gzip_contents, 0, strlen( $gzip_contents ) - 4 ); echo "\x1f\x8b\x08\x00\x00\x00\x00\x00"; echo $gzip_contents; ! echo pack( 'V', $gzip_crc ); ! echo pack( 'V', $gzip_size ); } --- 19,73 ---- */ ! // ================================================================================ ! // The following code is based on admin/page_footer_admin.php (phpBB 2.0.14) ! // ================================================================================ ! if ( !defined('IN_PHPBB') ) { ! die("Hacking attempt"); } + // // Show the overall footer. + // + $template->set_filenames(array( + 'page_footer' => 'admin/page_footer.tpl') + ); ! $template->assign_vars(array( ! 'PHPBB_VERSION' => ($userdata['user_level'] == ADMIN && $userdata['user_id'] != ANONYMOUS) ? '2' . $board_config['version'] : '', ! 'MX_VERSION' => ($userdata['user_level'] == ADMIN && $userdata['user_id'] != ANONYMOUS) ? PORTAL_VERSION : '', ! 'TRANSLATION_INFO' => $lang['TRANSLATION_INFO']) ! ); ! $template->pparse('page_footer'); + // // Close our DB connection. ! // $db->sql_close(); + // // Compress buffered output if required // and send to browser ! // ! if( $do_gzip_compress ) { ! // // Borrowed from php.net! ! // $gzip_contents = ob_get_contents(); ob_end_clean(); ! $gzip_size = strlen($gzip_contents); ! $gzip_crc = crc32($gzip_contents); ! $gzip_contents = gzcompress($gzip_contents, 9); ! $gzip_contents = substr($gzip_contents, 0, strlen($gzip_contents) - 4); echo "\x1f\x8b\x08\x00\x00\x00\x00\x00"; echo $gzip_contents; ! echo pack('V', $gzip_crc); ! echo pack('V', $gzip_size); } |
|
From: Markus P. <mar...@us...> - 2005-04-19 21:05:31
|
Update of /cvsroot/mxbb/core/admin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2663 Modified Files: admin_mx_chkobjs.php Log Message: Improved Object Integrity Checker (with delete function) Index: admin_mx_chkobjs.php =================================================================== RCS file: /cvsroot/mxbb/core/admin/admin_mx_chkobjs.php,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** admin_mx_chkobjs.php 9 Jan 2005 21:55:43 -0000 1.7 --- admin_mx_chkobjs.php 19 Apr 2005 21:05:20 -0000 1.8 *************** *** 1,179 **** <?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. - */ // ====================================================== ! // [ ADMINCP COMMON INITIALIZATION ] // ====================================================== - $no_page_header = true; ! if ( !empty( $setmodules ) ) { ! $file = basename( __FILE__ ); ! $module['Portal - System']['Objects_Integrity_Check'] = 'admin/' . $file; return; } ! define( 'IN_PORTAL', 1 ); $mx_root_path = '../'; // Security and page header - require( './pagestart.php' ); // ====================================================== ! // [ GLOBAL DATA ] // ====================================================== - $main_title = "Check MX Objects"; - $main_desc = "This utility allows you to check MX object relationships."; - $main_info = "This report shows the relations between MX tables. " . "You'll see the object name next to its object identifier. " . "Whenever an object is missing (not found on the database), the row is marked with the symbol <font color=red>[?]</font>. " . "In this case, execute phpMyAdmin (or your favorite DB Control Center) and remove that row.<br /><br />" . "DISCLAIMER: This utility is released AS-IS. Please, ensure you have a working backup <u>before</u> you manually edit your DB."; ! $check_args = array( ! array( 'table' => FUNCTION_TABLE, ! 'fkeys' => array( ! array( MODULE_TABLE, 'module_id', 'module_name' ), ! array( FUNCTION_TABLE, 'function_id', 'function_name' ) ! ) ! ), ! array( 'table' => PARAMETER_TABLE, ! 'fkeys' => array( ! array( FUNCTION_TABLE, 'function_id', 'function_name' ), ! array( PARAMETER_TABLE, 'parameter_id', 'parameter_name' ) ! ) ! ), ! array( 'table' => PARAMETER_OPTION_TABLE, ! 'fkeys' => array( ! array( PARAMETER_TABLE, 'parameter_id', 'parameter_name' ), ! array( PARAMETER_OPTION_TABLE, 'option_id', 'option_desc' ) ! ) ! ), ! array( 'table' => BLOCK_TABLE, ! 'fkeys' => array( ! array( FUNCTION_TABLE, 'function_id', 'function_name' ), ! array( BLOCK_TABLE, 'block_id', 'block_title' ) ! ) ! ), ! array( 'table' => BLOCK_SYSTEM_PARAMETER_TABLE, ! 'fkeys' => array( ! array( BLOCK_TABLE, 'block_id', 'block_title' ), ! array( PARAMETER_TABLE, 'parameter_id', 'parameter_name' ) ! ) ! ), ! array( 'table' => COLUMN_TABLE, ! 'fkeys' => array( ! array( PAGE_TABLE, 'page_id', 'page_name' ), ! array( COLUMN_TABLE, 'column_id', 'column_title' ) ! ) ! ), ! array( 'table' => COLUMN_BLOCK_TABLE, ! 'fkeys' => array( ! array( COLUMN_TABLE, 'column_id', 'column_title' ), ! array( BLOCK_TABLE, 'block_id', 'block_title' ) ! ) ! ) ! ); // ====================================================== ! // [ MAIN PROCESS ] // ====================================================== // Check to see if we need to show the table selection box. ! ! if ( isset( $_POST['check_mode'] ) ) { ! $check_mode = $_POST['check_mode']; ! $check_mode = htmlspecialchars( $check_mode ); } else { ! $select_options = '<select name="check_mode">'; ! for( $i = 0; $i < count( $check_args ); $i++ ) { ! $select_options .= '<option value="' . $i . '">' . $check_args[$i]['table'] . '</option>'; ! } ! $select_options .= '</select>'; ! mx_message_die( GENERAL_MESSAGE, ! '<p>' . $main_desc . '</p>' . '<form action="' . append_sid( PORTAL_URL . 'admin/admin_mx_chkobjs.php' ) . '" method="post"> ' . $select_options . ' <input type="submit" name="submit" value="' . $lang[Submit] . '" class="mainoption" /></form>', ! $main_title ); } ! include_once( './page_header_admin.php' ); ! check_relationship( $check_mode ); ! include( './page_footer_admin.php' ); exit; // ====================================================== ! // [ FUNCTIONS ] // ====================================================== - // ------------ - ! function check_relationship( $tb ) { ! global $db, $check_args, $main_title, $main_desc, $main_info; $table = $check_args[$tb]['table']; ! $fkeys = count( $check_args[$tb]['fkeys'] ); ! for( $i = 0; $i < $fkeys; $i++ ) { $ftab[] = $check_args[$tb]['fkeys'][$i][0]; $fkey[] = $check_args[$tb]['fkeys'][$i][1]; $fnam[] = $check_args[$tb]['fkeys'][$i][2]; ! } ! // Build the query and check the table relations. ! ! $sql = "SELECT * FROM " . $table . " ORDER BY " . implode( ',', $fkey ); ! $result = $db->sql_query( $sql ); ! if ( !$result ) { ! mx_message_die( GENERAL_ERROR, "Couldn't obtain the data from database.", "", __LINE__, __FILE__, $sql ); } ! $html = '<h1>' . $main_title . '</h1>' . "\n"; ! $html .= '<p>' . $main_desc . '<br /><br />' . $main_info . '</p>' . "\n"; ! $html .= '<table width="100%" cellpadding="2" cellspacing="1" border="0" class="forumline" align="center">' . "\n"; ! $html .= "\t" . '<tr>' . "\n"; ! $html .= tbHead( 'td', 'catHead', 4, '<b>Checking Table: ' . $table . '</b>' ); ! $html .= "\t" . '</tr>' . "\n"; ! $html .= "\t" . '<tr>' . "\n"; ! $html .= tbHead( 'td', 'cat', 4, '<a href="javascript:history.go(-1);"><b>Go Back</b></a>' ); ! $html .= "\t" . '</tr>' . "\n"; ! $html .= "\t" . '<tr>' . "\n"; ! $html .= tbHead( 'th', 'thCornerL', 1, $fkey[0] ); ! for( $i = 0; $i < ( $fkeys-1 ); $i++ ) { ! $html .= tbHead( 'th', 'thTop' , 1, $fnam[$i] ); ! $html .= tbHead( 'th', 'thTop' , 1, $fkey[$i + 1] ); } ! $html .= tbHead( 'th', 'thCornerR', 1, $fnam[$fkeys-1] ); ! $html .= "\t" . '</tr>' . "\n"; $row_count = 0; ! while ( $row = $db->sql_fetchrow( $result ) ) { ! $row_class = ( ( $row_count % 2 ) == 0 ) ? 'row1' : 'row2'; ! $html .= "\t" . '<tr>' . "\n"; ! for( $i = 0; $i < $fkeys; $i++ ) { $field = $fkey[$i]; ! if ( $ftab[$i] == $table ) { $field_key = $row[$field]; --- 1,256 ---- <?php ! /*************************************************************************** ! * admin_mx_chkobjs.php ! * -------------------- ! * begin : June, 2003 ! * copyright : (C) 2002-2005 mxBB-Portal ! * email : su...@mx... ! * ! * $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. ! * ! ***************************************************************************/ // ====================================================== ! // [ ADMINCP COMMON INITIALIZATION ] // ====================================================== ! $no_page_header = TRUE; ! ! if( !empty($setmodules) ) { ! $module['Portal - System']['Objects_Integrity_Check'] = 'admin/' . basename(__FILE__); return; } ! define('IN_PORTAL', 1); $mx_root_path = '../'; + // // Security and page header + // + require('./pagestart.php'); + // ====================================================== ! // [ GLOBAL DATA ] // ====================================================== ! $main_title = "Check mxBB Objects"; ! $main_desc = "This utility allows you to check mxBB object relationships."; ! $main_info = "This report shows the relations between mxBB tables. " . ! "You'll see the object name next to its object identifier. " . ! "Whenever an object is missing (not found on the database), the row is marked with the symbol <font color=red>[?]</font>. " . ! "In this case, execute phpMyAdmin (or your favorite DB Control Center) and remove that row.<br /><br />" . ! "DISCLAIMER: This utility is released AS-IS. Please, ensure you have a working backup <u>before</u> you manually edit your DB."; ! ! $check_args = array( ! array( ! 'table' => FUNCTION_TABLE, ! 'fkeys' => array( ! array(MODULE_TABLE, 'module_id', 'module_name'), ! array(FUNCTION_TABLE, 'function_id', 'function_name') ! ) ! ), ! array( ! 'table' => PARAMETER_TABLE, ! 'fkeys' => array( ! array(FUNCTION_TABLE, 'function_id', 'function_name'), ! array(PARAMETER_TABLE, 'parameter_id', 'parameter_name') ! ) ! ), ! array( ! 'table' => PARAMETER_OPTION_TABLE, ! 'fkeys' => array( ! array(PARAMETER_TABLE, 'parameter_id', 'parameter_name'), ! array(PARAMETER_OPTION_TABLE, 'option_id', 'option_desc') ! ) ! ), ! array( ! 'table' => BLOCK_TABLE, ! 'fkeys' => array( ! array(FUNCTION_TABLE, 'function_id', 'function_name'), ! array(BLOCK_TABLE, 'block_id', 'block_title') ! ) ! ), ! array( ! 'table' => BLOCK_SYSTEM_PARAMETER_TABLE, ! 'fkeys' => array( ! array(BLOCK_TABLE, 'block_id', 'block_title'), ! array(PARAMETER_TABLE, 'parameter_id', 'parameter_name') ! ) ! ), ! array( ! 'table' => COLUMN_TABLE, ! 'fkeys' => array( ! array(PAGE_TABLE, 'page_id', 'page_name'), ! array(COLUMN_TABLE, 'column_id', 'column_title') ! ) ! ), ! array( ! 'table' => COLUMN_BLOCK_TABLE, ! 'fkeys' => array( ! array(COLUMN_TABLE, 'column_id', 'column_title'), ! array(BLOCK_TABLE, 'block_id', 'block_title') ! ) ! ) ! ); ! ! // ====================================================== ! // [ MAIN PROCESS ] // ====================================================== + // // Check to see if we need to show the table selection box. ! // ! if( isset($HTTP_POST_VARS['check_mode']) || isset($HTTP_GET_VARS['check_mode']) ) { ! $check_mode = ( isset($HTTP_POST_VARS['check_mode']) ? $HTTP_POST_VARS['check_mode'] : $HTTP_GET_VARS['check_mode'] ); } else { ! if( !isset($HTTP_GET_VARS['mode']) ) { ! $select_options = '<select name="check_mode">'; ! for( $i=0; $i < count($check_args); $i++ ) ! { ! $selected = ( $i == $HTTP_GET_VARS['table'] ? ' selected="selected"' : '' ); ! $select_options .= '<option value="'.$i.'"'.$selected.'>'.$check_args[$i]['table'].'</option>'; ! } ! $select_options .= '</select>'; ! mx_message_die(GENERAL_MESSAGE, ! '<p>'.$main_desc.'</p>' . ! '<form action="' . append_sid(PORTAL_URL . "admin/admin_mx_chkobjs.$phpEx") . '" method="post"> ' . ! $select_options . ! ' <input type="submit" name="submit" value="' . $lang[Submit].'" class="mainoption" /></form>', ! $main_title ); ! } ! $mode = $HTTP_GET_VARS['mode']; ! $tb = $HTTP_GET_VARS['table']; ! $table = $check_args[$tb]['table']; ! $val0 = $HTTP_GET_VARS['val0']; ! $val1 = $HTTP_GET_VARS['val1']; ! $tab0 = $check_args[$tb]['fkeys'][0][0]; ! $key0 = $check_args[$tb]['fkeys'][0][1]; ! $tab1 = $check_args[$tb]['fkeys'][1][0]; ! $key1 = $check_args[$tb]['fkeys'][1][1]; ! switch($mode) ! { ! case 'delete': ! $sql = "DELETE FROM ".$table." WHERE $key0 = $val0 AND $key1 = $val1"; ! $get_vars = '&table='.$tb. ! '&val0='.$val0.'&val1='.$val1. ! '&key0='.$key0.'&key1='.$key1; ! $message = '<form method="post" action="' . basename(__FILE__) . '">' . ! '<table border="0" cellpadding="4" cellspacing="0">' . ! '<tr><td colspan="2"><b>' . $table . '</b></td></tr>' . ! '<tr><td><b>' . $key0 . ':</b> </td><td>[ ' . $val0 . ' ]</td></tr>' . ! '<tr><td><b>' . $key1 . ':</b> </td><td>[ ' . $val1 . ' ]</td></tr>' . ! '</table> <br /> <br />' . ! '<div style="width:80%; padding:10px; border:solid red 1px;">' . ! '<b>' . $lang['Confirm'] . '</b>:<br />' . $sql . '<br />' . ! '<br /> <br />' . ! '[ <a href="'.append_sid(basename(__FILE__)."?check_mode=$tb").'">'.$lang['No'].'</a> ]' . ! ' ' . ! '[ <a href="'.append_sid(basename(__FILE__).'?mode=db_delete'.$get_vars).'">'.$lang['Yes'].'</a> ]' . ! '</div><br /> ' . ! '</form>'; ! message_die(GENERAL_MESSAGE, $message, $my_script_title); ! break; ! case 'db_delete': ! $sql = "DELETE FROM ".$table." WHERE $key0 = $val0 AND $key1 = $val1"; ! if( !dbQuery($sql) ) ! { ! message_die(GENERAL_ERROR, "Couldn't DELETE data from table : " . $table, ! "", __LINE__, __FILE__, $sql); ! } ! $check_mode = $tb; ! break; ! default: ! break; ! } } ! include_once('./page_header_admin.php'); ! check_relationship($check_mode); ! include('./page_footer_admin.php'); exit; + + // ====================================================== ! // [ FUNCTIONS ] // ====================================================== ! // ------------ ! // ! // ! function check_relationship($tb) { ! global $db, $lang, $check_args, $main_title, $main_desc, $main_info; $table = $check_args[$tb]['table']; ! $fkeys = count($check_args[$tb]['fkeys']); ! for($i = 0; $i < $fkeys; $i++) { $ftab[] = $check_args[$tb]['fkeys'][$i][0]; $fkey[] = $check_args[$tb]['fkeys'][$i][1]; $fnam[] = $check_args[$tb]['fkeys'][$i][2]; ! } ! ! // // Build the query and check the table relations. ! // ! $sql = "SELECT * FROM ".$table." ORDER BY ".implode(',', $fkey); ! $result = $db->sql_query($sql); ! if( !$result ) { ! mx_message_die(GENERAL_ERROR, "Couldn't obtain the data from database.", '', __LINE__, __FILE__, $sql); } ! $html='<h1>' . $main_title.'</h1>' . "\n"; ! $html.='<p>' . $main_desc.'<br /><br />' . $main_info.'</p>' . "\n"; ! $html.='<table width="100%" cellpadding="2" cellspacing="1" border="0" class="forumline" align="center">' . "\n"; ! $html.="\t" . '<tr>' . "\n"; ! $html.=tbHead('td', 'catHead', 5, '<b>Checking Table: '.$table.'</b>'); ! $html.="\t" . '</tr>' . "\n"; ! $html.="\t" . '<tr>' . "\n"; ! $html.=tbHead('td', 'cat', 5, '<a href="'.append_sid(basename(__FILE__)."?table=$tb").'"><b>Go Back</b></a>'); ! $html.="\t" . '</tr>' . "\n"; ! $html.="\t" . '<tr>' . "\n"; ! $html.=tbHead('th', 'thCornerL', 1, $fkey[0]); ! for($i = 0; $i < ($fkeys-1); $i++) { ! $html.=tbHead('th', 'thTop', 1, $fnam[$i]); ! $html.=tbHead('th', 'thTop', 1, $fkey[$i+1]); } ! $html.=tbHead('th', 'thTop', 1, $fnam[$fkeys-1]); ! $html.=tbHead('th', 'thCornerR', 1, $lang['Action']); ! $html.="\t" . '</tr>' . "\n"; $row_count = 0; ! while( $row = $db->sql_fetchrow($result) ) { ! $row_class = (($row_count % 2) == 0) ? 'row1' : 'row2'; ! $html.= "\t" . '<tr>' . "\n"; ! $get_vars = '&table='.$tb; ! ! for($i = 0; $i < $fkeys; $i++) { $field = $fkey[$i]; ! if( $ftab[$i] == $table ) { $field_key = $row[$field]; *************** *** 183,241 **** else { ! if ( !( $field_value = dbFetchField( $ftab[$i], $field . '=' . $row[$field], $fnam[$i] ) ) ) { ! $field_key = '<font color=red><b>' . $row[$field] . '</b></font>'; $field_value = '<font color=red><b>[?]</b></font>'; } else { ! $field_key = $row[$field]; } } ! $html .= tbItem( 'td', 'row1', 'center', $field_key ); ! $html .= tbItem( 'td', 'row2', 'left' , $field_value ); } ! $html .= "\t" . '</tr>' . "\n"; $row_count++; } ! $html .= "\t" . '<tr>' . "\n"; ! $html .= tbHead( 'td', 'catBottom', 4, '<a href="javascript:history.go(-1);"><b>Go Back</b></a>' ); ! $html .= "\t" . '</tr>' . "\n"; ! $html .= '</table><br />' . "\n"; echo $html; } ! function tbHead( $td, $class, $colspan, $text ) { ! return "\t\t" . '<' . $td . ' class="' . $class . '" colspan="' . $colspan . '" align="center">' . $text . '</' . $td . '>' . "\n"; } ! function tbItem( $td, $class, $align, $text ) { ! return "\t\t" . '<' . $td . ' class="' . $class . '" align="' . $align . '">' . $text . '</' . $td . '>' . "\n"; ! // return '<'.$td.' class="'.$class.'" align="'.$align.'"><span class="gen">'.$text.'</span></'.$td.'>' . "\n"; } // ------------ // DB Utilities ! function dbFetchRow( $sql ) { global $db; ! if ( !( $result = $db->sql_query( $sql ) ) ) return false; ! if ( !( $row = $db->sql_fetchrow( $result ) ) ) return false; return $row; } ! function dbFetchField( $tbname, $where, $field ) { ! $sql = "SELECT * FROM " . $tbname . " WHERE " . $where; ! if ( !( $row = dbFetchRow( $sql ) ) ) return false; ! return $row[$field]; } --- 260,330 ---- else { ! if( !($field_value = dbFetchField($ftab[$i], $field.'='.$row[$field], $fnam[$i])) ) { ! $field_key = '<font color=red><b>'.$row[$field].'</b></font>'; $field_value = '<font color=red><b>[?]</b></font>'; } else { ! $field_key = $row[$field]; } } ! $get_vars .= '&val'.$i.'='.$row[$field]; ! $html.=tbItem('td', 'row1', 'center', $field_key); ! $html.=tbItem('td', 'row2', 'left' , $field_value); } ! $onclick = 'onclick="return confirm(\'Are you sure you want to delete this object?\');"'; ! $html.=tbItem('td', 'row1', 'center', '<a href="'.append_sid(basename(__FILE__).'?mode=delete'.$get_vars).'" '.$onclick.'>'.$lang['Delete'].'</a>'); ! $html.= "\t" . '</tr>' . "\n"; $row_count++; } ! $html.="\t" . '<tr>' . "\n"; ! $html.=tbHead('td', 'catBottom', 5, '<a href="'.append_sid(basename(__FILE__)."?table=$tb").'"><b>Go Back</b></a>'); ! $html.="\t" . '</tr>' . "\n"; ! $html.='</table><br />' . "\n"; echo $html; } ! function tbHead($td, $class, $colspan, $text) { ! return "\t\t" . '<'.$td.' class="'.$class.'" colspan="'.$colspan.'" align="center">'.$text.'</'.$td.'>' . "\n"; } ! function tbItem($td, $class, $align, $text) { ! return "\t\t" . '<'.$td.' class="'.$class.'" align="'.$align.'">'.$text.'</'.$td.'>' . "\n"; ! // return '<'.$td.' class="'.$class.'" align="'.$align.'"><span class="gen">'.$text.'</span></'.$td.'>' . "\n"; } + // ------------ // DB Utilities + // + function dbFetchField($tbname, $where, $field) + { + $sql = "SELECT * FROM ".$tbname." WHERE ".$where; + if( !($row = dbFetchRow($sql)) ) + return false; + return $row[$field]; + } ! function dbFetchRow($sql) { global $db; ! if( !($result = $db->sql_query($sql)) ) return false; ! if( !($row = $db->sql_fetchrow($result)) ) return false; return $row; } ! function dbQuery($sql) { ! global $db; ! if( !($result = $db->sql_query($sql)) ) return false; ! return $result; } |
|
From: Markus P. <mar...@us...> - 2005-04-19 21:03:03
|
Update of /cvsroot/mxbb/core/modules/mx_coreblocks In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1725 Modified Files: mx_poll.php Log Message: Last minute fixes in 2.7.6 for the Poll block. Index: mx_poll.php =================================================================== RCS file: /cvsroot/mxbb/core/modules/mx_coreblocks/mx_poll.php,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** mx_poll.php 10 Apr 2005 23:02:11 -0000 1.17 --- mx_poll.php 19 Apr 2005 21:02:53 -0000 1.18 *************** *** 12,16 **** */ ! /** * 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 --- 12,16 ---- */ ! /** * 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 *************** *** 19,22 **** --- 19,27 ---- */ + if( !defined('IN_PORTAL') ) + { + die("Hacking attempt"); + } + // -------------------------------------------------------------------------------- // Poll Block - based on posting.php and viewtopic.php from phpBB 2.0.13 (see below) *************** *** 134,140 **** $template->assign_vars(array( ! 'META' => '<meta http-equiv="refresh" content="3;url=' . append_sid(PORTAL_URL . "index.$phpEx?" . "vote=viewresult&block_id=" . $block_id) . '">') ); ! $message .= '<br /><br />' . sprintf($lang['Click_view_voted'], '<a href="' . append_sid(PORTAL_URL . "index.$phpEx?" . "vote=viewresult&block_id=" . $block_id . "&page=$current_page") . '">', '</a>'); mx_block_message($lang['Surveys/Polls'], $message); --- 139,145 ---- $template->assign_vars(array( ! 'META' => '<meta http-equiv="refresh" content="3;url=' . append_sid(PORTAL_URL . "index.$phpEx?page=$current_page&vote=viewresult") . '">') ); ! $message .= '<br /><br />' . sprintf($lang['Click_view_voted'], '<a href="' . append_sid(PORTAL_URL . "index.$phpEx?page=$current_page&vote=viewresult") . '">', '</a>'); mx_block_message($lang['Surveys/Polls'], $message); *************** *** 268,272 **** 'L_SUBMIT_VOTE' => $lang['Submit_vote'], 'L_VIEW_RESULTS' => $lang['View_results'], ! 'U_VIEW_RESULTS' => append_sid(PORTAL_URL . "index.$phpEx?" . "vote=viewresult&block_id=" . $block_id . "&page=$current_page"), 'U_URL' => append_sid(PHPBB_URL . "viewtopic.$phpEx?t=$topic_id")) ); --- 273,277 ---- 'L_SUBMIT_VOTE' => $lang['Submit_vote'], 'L_VIEW_RESULTS' => $lang['View_results'], ! 'U_VIEW_RESULTS' => append_sid(PORTAL_URL . "index.$phpEx?page=$current_page&vote=viewresult"), 'U_URL' => append_sid(PHPBB_URL . "viewtopic.$phpEx?t=$topic_id")) ); *************** *** 287,291 **** 'POLL_QUESTION' => $vote_title, 'S_HIDDEN_FIELDS' => ( !empty($s_hidden_fields) ? $s_hidden_fields : '' ), ! 'S_POLL_ACTION' => append_sid(PORTAL_URL . "index.$phpEx?" . POST_TOPIC_URL . "=$topic_id&block_id=" . $block_id . "&page=$current_page")) ); --- 292,296 ---- 'POLL_QUESTION' => $vote_title, 'S_HIDDEN_FIELDS' => ( !empty($s_hidden_fields) ? $s_hidden_fields : '' ), ! 'S_POLL_ACTION' => append_sid(PORTAL_URL . "index.$phpEx?page=$current_page")) ); |