|
From: Jon O. <jon...@us...> - 2005-04-11 17:56:22
|
Update of /cvsroot/mxbb/mx_pafiledb/admin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2875/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 pa_block_config.php Log Message: finally upgrading this module/mod - merging phpBB mod, mxBB module (2.7.x and 2.8) -.permissions reviewed - pm notification added - and many many minor fixes all over the place Index: admin_pa_fchecker.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/admin/admin_pa_fchecker.php,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** admin_pa_fchecker.php 9 Jan 2005 21:44:07 -0000 1.7 --- admin_pa_fchecker.php 11 Apr 2005 17:55:38 -0000 1.8 *************** *** 1,62 **** <?php /** ! * pafiledb mx module * ------------------- ! * copyright : (C) 2002 MX-System ! * begin : oct 23, 2003 ! * email : jon...@ho... ! * based on code by Mohd Basri, and pafilDB * ! * $Id$ */ - /* - Original - define('IN_PHPBB', 1); ! if( !empty($setmodules) ) { ! $file = basename(__FILE__); ! //$module['Download'][$lang['Fchecker']] = "$file"; ! return; ! } ! ! $phpbb_root_path = "./../"; ! ! require($phpbb_root_path . 'extension.inc'); ! ! require('./pagestart.' . $phpEx); ! ! include($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_admin_pafiledb.' . $phpEx); ! ! include($phpbb_root_path . 'pafiledb/pafiledb_common.'.$phpEx); ! ! $this_dir = $phpbb_root_path . 'pafiledb/uploads/'; ! ! $html_path = 'http://' . $HTTP_SERVER_VARS['HTTP_HOST'] . '' . $board_config['script_path'] . 'pafiledb/uploads/'; ! */ ! // MX Portal ! define( 'IN_PORTAL', 1 ); ! if ( !empty( $setmodules ) ) { ! $file = basename( __FILE__ ); ! $module['pafileDB_Download']['File: Maintenance'] = 'modules/mx_pafiledb/admin/' . "$file"; ! return; } - $module_root_path = './../'; - $mx_root_path = './../../../'; - require( $mx_root_path . 'extension.inc' ); - require( $mx_root_path . 'admin/pagestart.' . $phpEx ); - - include( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_admin_pafiledb.' . $phpEx ); - - include( $module_root_path . 'pafiledb/pafiledb_common.' . $phpEx ); $this_dir = $module_root_path . 'pafiledb/uploads/'; - /* - orig - $html_path = get_formated_url() . '/pafiledb/uploads/'; - */ // MX ! $html_path = PORTAL_URL . 'modules/mx_pafiledb/pafiledb/uploads/'; if ( isset( $HTTP_GET_VARS['safety'] ) || isset( $HTTP_POST_VARS['safety'] ) ) --- 1,73 ---- <?php /** ! * mxBB pafileDB adminCP * ------------------- ! * subject : mx-portal, CMS & portal ! * copyright : (C) 2003-2005 mxBB ! * original author : based on code by Mohd Basri & paFileDB 3.0 ©2001/2002 PHP Arena ! * email : jon...@ho... * ! * $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 ( file_exists( './../viewtopic.php' ) ) { ! define( 'IN_PHPBB', 1 ); ! define( 'IN_PORTAL', 1 ); ! define( 'MXBB_MODULE', false ); ! ! if ( !empty( $setmodules ) ) ! { ! $file = basename( __FILE__ ); ! $module['pafileDB_Download']['Fchecker_title'] = $file; ! return; ! } ! // Load default header ! ! $no_page_header = true; ! $phpbb_root_path = $module_root_path = $mx_root_path = './../'; ! require( $phpbb_root_path . 'extension.inc' ); ! require( './pagestart.' . $phpEx ); ! ! include( $phpbb_root_path . 'includes/functions_admin.'.$phpEx ); ! include( $phpbb_root_path . 'pafiledb/pafiledb_common.' . $phpEx ); ! } ! else { ! define( 'IN_PORTAL', 1 ); ! define( 'MXBB_MODULE', true ); ! ! if ( !empty( $setmodules ) ) ! { ! $file = basename( __FILE__ ); ! $module['pafileDB_Download']['Fchecker_title'] = 'modules/mx_pafiledb/admin/' . $file; ! return; ! } ! ! $no_page_header = true; ! $module_root_path = './../'; ! $mx_root_path = './../../../'; ! ! define( 'MXBB_27x', file_exists( $mx_root_path . 'more_smilies.php' ) ); ! ! require( $mx_root_path . 'extension.inc' ); ! require( $mx_root_path . 'admin/pagestart.' . $phpEx ); ! ! include( $module_root_path . 'pafiledb/pafiledb_common.' . $phpEx ); ! include_once( $mx_root_path . 'admin/page_header_admin.' . $phpEx ); } $this_dir = $module_root_path . 'pafiledb/uploads/'; // MX ! $html_path = PORTAL_URL . $module_root_path . 'pafiledb/uploads/'; if ( isset( $HTTP_GET_VARS['safety'] ) || isset( $HTTP_POST_VARS['safety'] ) ) *************** *** 198,202 **** 'SAVED' => $saved ) ); - $template->pparse( 'admin' ); } else --- 209,212 ---- *************** *** 210,221 **** 'L_FILE_SAFTEY' => $lang['File_saftey'] ) ); - - $template->pparse( 'admin' ); } ! /* ! include('./page_footer_admin.'.$phpEx); ! */ ! // MX Module include( $mx_root_path . 'admin/page_footer_admin.' . $phpEx ); --- 220,228 ---- 'L_FILE_SAFTEY' => $lang['File_saftey'] ) ); } ! // Output ! include( $mx_root_path . 'admin/page_header_admin.' . $phpEx ); ! $template->pparse( 'admin' ); include( $mx_root_path . 'admin/page_footer_admin.' . $phpEx ); Index: pa_block_config.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/admin/pa_block_config.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** pa_block_config.php 6 Mar 2005 14:32:55 -0000 1.1 --- pa_block_config.php 11 Apr 2005 17:55:39 -0000 1.2 *************** *** 1,12 **** <?php /** ! * admin_news.php ! * ------------------ ! * begin : Friday, Mar 22, 2002 ! * copyright : (C) 2002 MX System ! * email : jon...@ho... * ! * $Id$ */ define( 'IN_PORTAL', true ); --- 1,20 ---- <?php /** ! * mxBB pafileDB adminCP ! * ------------------- ! * subject : mx-portal, CMS & portal ! * copyright : (C) 2003-2005 mxBB ! * email : jon...@ho... * ! * $Id$ */ + + /** + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + */ + define( 'IN_PORTAL', true ); *************** *** 27,59 **** $block_id = isset( $HTTP_GET_VARS['block_id'] ) ? intval( $HTTP_GET_VARS['block_id'] ) : intval( $HTTP_POST_VARS['block_id'] ); $portalpage = isset( $HTTP_GET_VARS['portalpage'] ) ? intval( $HTTP_GET_VARS['portalpage'] ) : intval( $HTTP_POST_VARS['portalpage'] ); - //$f_id = isset( $HTTP_GET_VARS['f'] ) ? intval( $HTTP_GET_VARS['f'] ) : intval( $HTTP_POST_VARS['f'] ); - //$p_id = isset( $HTTP_GET_VARS['p'] ) ? intval( $HTTP_GET_VARS['p'] ) : intval( $HTTP_POST_VARS['p'] ); - //$t_id = isset( $HTTP_GET_VARS['t'] ) ? intval( $HTTP_GET_VARS['t'] ) : intval( $HTTP_POST_VARS['t'] ); $s_hidden_fields = '<input type="hidden" name="sid" value="' . $userdata['session_id'] . '" />'; $s_hidden_fields .= '<input type="hidden" name="block_id" value="' . $block_id . '" />'; $s_hidden_fields .= '<input type="hidden" name="portalpage" value="' . $portalpage . '" />'; - //$s_hidden_fields .= '<input type="hidden" name="f" value="' . $f_id . '" />'; - //$s_hidden_fields .= '<input type="hidden" name="t" value="' . $t_id . '" />'; - //$s_hidden_fields .= '<input type="hidden" name="p" value="' . $p_id . '" />'; // Setup config parameters $block_config = read_block_config( $block_id, false ); - /* - if ( $f_id != 0 ) - { - $url_opt = '&f=' . $f_id; - } - else if ( $t_id != 0 ) - { - $url_opt = '&t=' . $t_id; - } - else if ( $p_id != 0 ) - { - $url_opt = '&p=' . $p_id; - } - */ - // Setup config parameters $config_name = array( 'pa_mapping', 'pa_quick_cat' ); --- 35,46 ---- *************** *** 65,71 **** } - //include_once( $module_root_path . 'pafiledb/includes/pafiledb_constants.' . $phpEx ); - //include_once( $module_root_path . 'pafiledb/includes/functions_pafiledb.' . $phpEx ); - include( $module_root_path . 'pafiledb/pafiledb_common.' . $phpEx ); --- 52,55 ---- *************** *** 352,358 **** for( $i = 0; $i < $total_maps; $i++ ) { - //$pa_cat_row = get_info( PA_CATEGORY_TABLE, 'cat_id', $pa_mapping_data[$i]['map_cat_id'] ); - //$pa_dyn_row = get_info( BLOCK_TABLE, 'block_id', $pa_mapping_data[$i]['map_dyn_id'] ); - $pa_map_cat_tmp = $pafiledb->jumpmenu_option( 0, 0, array( $pa_mapping_data[$i]['map_cat_id'] => 1 ), false ); $pa_map_dynid_id = 'map_dyn_id_'.$i; --- 336,339 ---- Index: admin_pa_custom.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/admin/admin_pa_custom.php,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** admin_pa_custom.php 9 Jan 2005 21:44:07 -0000 1.8 --- admin_pa_custom.php 11 Apr 2005 17:55:38 -0000 1.9 *************** *** 1,55 **** <?php /** ! * pafiledb mx module * ------------------- ! * copyright : (C) 2002 MX-System ! * begin : oct 23, 2003 ! * email : jon...@ho... ! * based on code by Mohd Basri, and pafilDB * ! * $Id$ */ - /* Orignial code - define('IN_PHPBB', 1); - - if( !empty($setmodules) ) - { - $file = basename(__FILE__); - $module['Download'][$lang['Afield']] = "$file?mode=add"; - $module['Download'][$lang['Efield']] = "$file?mode=edit"; - $module['Download'][$lang['Dfield']] = "$file?mode=delete"; - return; - } - - $phpbb_root_path = "./../"; ! require($phpbb_root_path . 'extension.inc'); ! ! require('./pagestart.' . $phpEx); ! include($phpbb_root_path . 'pafiledb/pafiledb_common.'.$phpEx); ! include($phpbb_root_path . 'pafiledb/includes/functions_field.'.$phpEx); ! */ ! // MX Module ! define( 'IN_PORTAL', 1 ); ! if ( !empty( $setmodules ) ) { ! $file = basename( __FILE__ ); ! $module['pafileDB_Download']['Custom Field'] = "modules/mx_pafiledb/admin/" . "$file"; ! // $module['Download']['Custom Field: Add'] = "modules/mx_pafiledb/admin/" . "$file?mode=add"; ! // $module['Download']['Custom Field: Edit'] = "modules/mx_pafiledb/admin/" . "$file?mode=edit"; ! // $module['Download']['Custom Field: Delete'] = "modules/mx_pafiledb/admin/" . "$file?mode=delete"; ! return; } - $module_root_path = '../'; - $mx_root_path = '../../../'; - require( $mx_root_path . 'extension.inc' ); - - require( $mx_root_path . 'admin/pagestart.' . $phpEx ); - - include( $module_root_path . 'pafiledb/pafiledb_common.' . $phpEx ); - - include( $module_root_path . 'pafiledb/includes/functions_field.' . $phpEx ); $custom_field = new custom_field(); --- 1,70 ---- <?php /** ! * mxBB pafileDB adminCP * ------------------- ! * subject : mx-portal, CMS & portal ! * copyright : (C) 2003-2005 mxBB ! * original author : based on code by Mohd Basri & paFileDB 3.0 ©2001/2002 PHP Arena ! * email : jon...@ho... * ! * $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 ( file_exists( './../viewtopic.php' ) ) ! { ! define( 'IN_PHPBB', 1 ); ! define( 'IN_PORTAL', 1 ); ! define( 'MXBB_MODULE', false ); ! ! if ( !empty( $setmodules ) ) ! { ! $file = basename( __FILE__ ); ! $module['pafileDB_Download']['Custom_manage_title'] = $file; ! return; ! } ! // Load default header ! ! $no_page_header = true; ! $phpbb_root_path = $module_root_path = $mx_root_path = './../'; ! require( $phpbb_root_path . 'extension.inc' ); ! require( './pagestart.' . $phpEx ); ! ! include( $phpbb_root_path . 'includes/functions_admin.'.$phpEx ); ! include( $phpbb_root_path . 'pafiledb/pafiledb_common.' . $phpEx ); ! include( $phpbb_root_path . 'pafiledb/includes/functions_field.' . $phpEx ); ! ! } ! else { ! define( 'IN_PORTAL', 1 ); ! define( 'MXBB_MODULE', true ); ! ! if ( !empty( $setmodules ) ) ! { ! $file = basename( __FILE__ ); ! $module['pafileDB_Download']['Custom_manage_title'] = 'modules/mx_pafiledb/admin/' . $file; ! return; ! } ! ! $no_page_header = true; ! $module_root_path = './../'; ! $mx_root_path = './../../../'; ! ! define( 'MXBB_27x', file_exists( $mx_root_path . 'more_smilies.php' ) ); ! ! require( $mx_root_path . 'extension.inc' ); ! require( $mx_root_path . 'admin/pagestart.' . $phpEx ); ! ! include( $module_root_path . 'pafiledb/pafiledb_common.' . $phpEx ); ! include( $module_root_path . 'pafiledb/includes/functions_field.' . $phpEx ); } $custom_field = new custom_field(); *************** *** 67,70 **** --- 82,88 ---- $template_file = 'admin/pa_admin_field_add.tpl'; break; + case 'editfield': + $template_file = 'admin/pa_admin_field_add.tpl'; + break; case 'edit': $template_file = 'admin/pa_admin_select_field.tpl'; *************** *** 89,93 **** $message = $lang['Fieldadded'] . '<br /><br />' . sprintf( $lang['Click_return'], '<a href="' . append_sid( 'admin_pa_custom.' . $phpEx ) . '">', '</a>' ) . '<br /><br />' . sprintf( $lang['Click_return_admin_index'], '<a href="' . append_sid( 'index.' . $phpEx . '?pane=right' ) . '">', '</a>' ); mx_message_die( GENERAL_MESSAGE, $message ); ! }elseif ( $mode == 'do_add' && $field_id ) { $custom_field->update_add_field( $field_type, $field_id ); --- 107,112 ---- $message = $lang['Fieldadded'] . '<br /><br />' . sprintf( $lang['Click_return'], '<a href="' . append_sid( 'admin_pa_custom.' . $phpEx ) . '">', '</a>' ) . '<br /><br />' . sprintf( $lang['Click_return_admin_index'], '<a href="' . append_sid( 'index.' . $phpEx . '?pane=right' ) . '">', '</a>' ); mx_message_die( GENERAL_MESSAGE, $message ); ! } ! elseif ( $mode == 'do_add' && $field_id ) { $custom_field->update_add_field( $field_type, $field_id ); *************** *** 95,99 **** $message = $lang['Fieldedited'] . '<br /><br />' . sprintf( $lang['Click_return'], '<a href="' . append_sid( 'admin_pa_custom.' . $phpEx ) . '">', '</a>' ) . '<br /><br />' . sprintf( $lang['Click_return_admin_index'], '<a href="' . append_sid( 'index.' . $phpEx . '?pane=right' ) . '">', '</a>' ); mx_message_die( GENERAL_MESSAGE, $message ); ! }elseif ( $mode == 'delete' ) { foreach( $field_ids as $key => $value ) --- 114,119 ---- $message = $lang['Fieldedited'] . '<br /><br />' . sprintf( $lang['Click_return'], '<a href="' . append_sid( 'admin_pa_custom.' . $phpEx ) . '">', '</a>' ) . '<br /><br />' . sprintf( $lang['Click_return_admin_index'], '<a href="' . append_sid( 'index.' . $phpEx . '?pane=right' ) . '">', '</a>' ); mx_message_die( GENERAL_MESSAGE, $message ); ! } ! elseif ( $mode == 'do_delete' ) { foreach( $field_ids as $key => $value ) *************** *** 107,112 **** } ! $pafiledb_template->set_filenames( array( 'admin' => $template_file ) ! ); switch ( $mode ) --- 127,131 ---- } ! $pafiledb_template->set_filenames( array( 'admin' => $template_file ) ); switch ( $mode ) *************** *** 119,122 **** --- 138,144 ---- $l_title = $lang['Efieldtitle']; break; + case 'editfield': + $l_title = $lang['Efieldtitle']; + break; case 'delete': $l_title = $lang['Dfieldtitle']; *************** *** 130,148 **** { $s_hidden_fields = '<input type="hidden" name="mode" value="addfield">'; ! }elseif ( $mode == 'addfield' ) { $s_hidden_fields = '<input type="hidden" name="field_type" value="' . $field_type . '">'; $s_hidden_fields .= '<input type="hidden" name="field_id" value="' . $field_id . '">'; $s_hidden_fields .= '<input type="hidden" name="mode" value="do_add">'; ! }elseif ( $mode == 'edit' ) { ! $s_hidden_fields = '<input type="hidden" name="mode" value="addfield">'; ! }elseif ( $mode == 'delete' ) { ! $s_hidden_fields = '<input type="hidden" name="mode" value="delete">'; } ! $pafiledb_template->assign_vars( array( 'L_FIELD_TITLE' => $l_title, 'L_FIELD_EXPLAIN' => $lang['Fieldexplain'], 'S_HIDDEN_FIELDS' => $s_hidden_fields, --- 152,176 ---- { $s_hidden_fields = '<input type="hidden" name="mode" value="addfield">'; ! } ! elseif ( $mode == 'addfield' || $mode == 'editfield') { $s_hidden_fields = '<input type="hidden" name="field_type" value="' . $field_type . '">'; $s_hidden_fields .= '<input type="hidden" name="field_id" value="' . $field_id . '">'; $s_hidden_fields .= '<input type="hidden" name="mode" value="do_add">'; ! } ! elseif ( $mode == 'edit' ) { ! $s_hidden_fields = '<input type="hidden" name="mode" value="editfield">'; ! } ! elseif ( $mode == 'delete' ) { ! $s_hidden_fields = '<input type="hidden" name="mode" value="do_delete">'; } ! ! $pafiledb_template->assign_vars( array( ! 'L_FIELD_TITLE' => $l_title, 'L_FIELD_EXPLAIN' => $lang['Fieldexplain'], + 'L_SELECT_TITLE' => $lang['Fieldselecttitle'], 'S_HIDDEN_FIELDS' => $s_hidden_fields, *************** *** 150,154 **** ); ! if ( $mode == 'addfield' ) { if ( $field_id ) --- 178,182 ---- ); ! if ( $mode == 'addfield' || $mode == 'editfield') { if ( $field_id ) *************** *** 177,183 **** 'FIELD_ORDER' => $data['field_order'] ) ); ! }elseif ( $mode == 'add' ) { ! $field_types = array( INPUT => $lang['Input'], TEXTAREA => $lang['Textarea'], RADIO => $lang['Radio'], SELECT => $lang['Select'], SELECT_MULTIPLE => $lang['Select_multiple'], CHECKBOX => $lang['Checkbox'] ); $field_type_list = '<select name="field_type">'; --- 205,212 ---- 'FIELD_ORDER' => $data['field_order'] ) ); ! } ! elseif ( $mode == 'add' ) { ! $field_types = array( INPUT => $lang['Field_Input'], TEXTAREA => $lang['Field_Textarea'], RADIO => $lang['Field_Radio'], SELECT => $lang['Field_Select'], SELECT_MULTIPLE => $lang['Field_Select_multiple'], CHECKBOX => $lang['Field_Checkbox'] ); $field_type_list = '<select name="field_type">'; *************** *** 188,198 **** $field_type_list .= '</select>'; ! $pafiledb_template->assign_vars( array( 'S_SELECT_FIELD_TYPE' => $field_type_list ) ! ); ! }elseif ( $mode == 'edit' || $mode == 'delete' || $mode == 'select' ) { foreach( $custom_field->field_rowset as $field_id => $field_data ) { ! $pafiledb_template->assign_block_vars( 'field_row', array( 'FIELD_ID' => $field_id, 'FIELD_NAME' => $field_data['custom_name'], 'FIELD_DESC' => $field_data['custom_description'] ) --- 217,228 ---- $field_type_list .= '</select>'; ! $pafiledb_template->assign_vars( array( 'S_SELECT_FIELD_TYPE' => $field_type_list ) ); ! } ! elseif ( $mode == 'edit' || $mode == 'delete' || $mode == 'select' ) { foreach( $custom_field->field_rowset as $field_id => $field_data ) { ! $pafiledb_template->assign_block_vars( 'field_row', array( ! 'FIELD_ID' => $field_id, 'FIELD_NAME' => $field_data['custom_name'], 'FIELD_DESC' => $field_data['custom_description'] ) *************** *** 201,213 **** } $pafiledb_template->display( 'admin' ); - $pafiledb->_pafiledb(); $cache->unload(); - - /* Original - include('./page_footer_admin.'.$phpEx); - */ - // MX Module include( $mx_root_path . 'admin/page_footer_admin.' . $phpEx ); --- 231,239 ---- } + // Output + include( $mx_root_path . 'admin/page_header_admin.' . $phpEx ); $pafiledb_template->display( 'admin' ); $pafiledb->_pafiledb(); $cache->unload(); include( $mx_root_path . 'admin/page_footer_admin.' . $phpEx ); Index: admin_pa_category.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/admin/admin_pa_category.php,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** admin_pa_category.php 9 Jan 2005 21:44:06 -0000 1.7 --- admin_pa_category.php 11 Apr 2005 17:55:38 -0000 1.8 *************** *** 1,50 **** <?php /** ! * pafiledb mx module * ------------------- ! * copyright : (C) 2002 MX-System ! * begin : oct 23, 2003 ! * email : jon...@ho... ! * based on code by Mohd Basri, and pafilDB * ! * $Id$ */ - /* - orig - define('IN_PHPBB', 1); ! if( !empty($setmodules) ) { ! $file = basename(__FILE__); ! $module['Download']['Cat_manage_title'] = "$file"; ! return; ! } ! ! $phpbb_root_path = './../'; ! ! require($phpbb_root_path . 'extension.inc'); ! ! require('./pagestart.' . $phpEx); ! ! include($phpbb_root_path . 'pafiledb/pafiledb_common.'.$phpEx); ! */ ! // MX ! define( 'IN_PORTAL', 1 ); ! if ( !empty( $setmodules ) ) { ! $file = basename( __FILE__ ); ! $module['pafileDB_Download']['Category: Handling'] = "modules/mx_pafiledb/admin/" . "$file"; ! return; } - $module_root_path = '../'; - $mx_root_path = '../../../'; - - require( $mx_root_path . 'extension.inc' ); - - require( $mx_root_path . 'admin/pagestart.' . $phpEx ); - - include( $module_root_path . 'pafiledb/pafiledb_common.' . $phpEx ); - $pafiledb->init(); --- 1,69 ---- <?php /** ! * mxBB pafileDB adminCP * ------------------- ! * subject : mx-portal, CMS & portal ! * copyright : (C) 2003-2005 mxBB ! * original author : based on code by Mohd Basri & paFileDB 3.0 ©2001/2002 PHP Arena ! * email : jon...@ho... * ! * $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 ( file_exists( './../viewtopic.php' ) ) { ! define( 'IN_PHPBB', 1 ); ! define( 'IN_PORTAL', 1 ); ! define( 'MXBB_MODULE', false ); ! ! if ( !empty( $setmodules ) ) ! { ! $file = basename( __FILE__ ); ! $module['pafileDB_Download']['Cat_manage_title'] = $file; ! return; ! } ! // Load default header ! ! $no_page_header = true; ! $phpbb_root_path = $module_root_path = $mx_root_path = './../'; ! require( $phpbb_root_path . 'extension.inc' ); ! require( './pagestart.' . $phpEx ); ! ! include( $phpbb_root_path . 'includes/functions_admin.'.$phpEx ); ! include( $phpbb_root_path . 'pafiledb/pafiledb_common.' . $phpEx ); ! ! } ! else { ! define( 'IN_PORTAL', 1 ); ! define( 'MXBB_MODULE', true ); ! ! if ( !empty( $setmodules ) ) ! { ! $file = basename( __FILE__ ); ! $module['pafileDB_Download']['Cat_manage_title'] = 'modules/mx_pafiledb/admin/' . $file; ! return; ! } ! ! $no_page_header = true; ! $module_root_path = './../'; ! $mx_root_path = './../../../'; ! ! define( 'MXBB_27x', file_exists( $mx_root_path . 'more_smilies.php' ) ); ! ! require( $mx_root_path . 'extension.inc' ); ! require( $mx_root_path . 'admin/pagestart.' . $phpEx ); ! ! include( $module_root_path . 'pafiledb/pafiledb_common.' . $phpEx ); } $pafiledb->init(); *************** *** 63,67 **** mx_message_die( GENERAL_MESSAGE, $message ); } ! }elseif ( $mode == 'do_add' && $cat_id ) { $cat_id = $pafiledb->update_add_cat( $cat_id ); --- 82,87 ---- mx_message_die( GENERAL_MESSAGE, $message ); } ! } ! elseif ( $mode == 'do_add' && $cat_id ) { $cat_id = $pafiledb->update_add_cat( $cat_id ); *************** *** 72,76 **** mx_message_die( GENERAL_MESSAGE, $message ); } ! }elseif ( $mode == 'do_delete' ) { $pafiledb->delete_cat( $cat_id ); --- 92,97 ---- mx_message_die( GENERAL_MESSAGE, $message ); } ! } ! elseif ( $mode == 'do_delete' ) { $pafiledb->delete_cat( $cat_id ); *************** *** 81,91 **** mx_message_die( GENERAL_MESSAGE, $message ); } ! }elseif ( $mode == 'cat_order' ) { $pafiledb->order_cat( $cat_id_other ); ! }elseif ( $mode == 'sync' ) { $pafiledb->sync( $cat_id_other ); ! }elseif ( $mode == 'sync_all' ) { $pafiledb->sync_all(); --- 102,115 ---- mx_message_die( GENERAL_MESSAGE, $message ); } ! } ! elseif ( $mode == 'cat_order' ) { $pafiledb->order_cat( $cat_id_other ); ! } ! elseif ( $mode == 'sync' ) { $pafiledb->sync( $cat_id_other ); ! } ! elseif ( $mode == 'sync_all' ) { $pafiledb->sync_all(); *************** *** 162,166 **** ); admin_cat_main( $cat_id ); ! }elseif ( $mode == 'add' || $mode == 'edit' ) { if ( $mode == 'add' ) --- 186,191 ---- ); admin_cat_main( $cat_id ); ! } ! elseif ( $mode == 'add' || $mode == 'edit' ) { if ( $mode == 'add' ) *************** *** 264,268 **** 'S_CAT_LIST' => $cat_list ) ); ! }elseif ( $mode == 'delete' ) { $select_cat = $pafiledb->jumpmenu_option( 0, 0, array( $cat_id => 1 ) ); --- 289,294 ---- 'S_CAT_LIST' => $cat_list ) ); ! } ! elseif ( $mode == 'delete' ) { $select_cat = $pafiledb->jumpmenu_option( 0, 0, array( $cat_id => 1 ) ); *************** *** 282,285 **** --- 308,312 ---- } + include( $mx_root_path . 'admin/page_header_admin.' . $phpEx ); $pafiledb_template->display( 'admin' ); *************** *** 287,294 **** $cache->unload(); - /* Original - include('./page_footer_admin.'.$phpEx); - */ - // MX Module include( $mx_root_path . 'admin/page_footer_admin.' . $phpEx ); --- 314,317 ---- Index: admin_pa_file.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/admin/admin_pa_file.php,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** admin_pa_file.php 9 Jan 2005 21:44:07 -0000 1.10 --- admin_pa_file.php 11 Apr 2005 17:55:38 -0000 1.11 *************** *** 1,45 **** <?php /** ! * pafiledb mx module * ------------------- ! * copyright : (C) 2002 MX-System ! * begin : oct 23, 2003 ! * email : jon...@ho... ! * based on code by Mohd Basri, and pafilDB * ! * $Id$ */ - /* - orig - define('IN_PHPBB', 1); ! if( !empty($setmodules) ) { ! $file = basename(__FILE__); ! $module['Download']['File_manage_title'] = "$file"; ! return; } ! ! $phpbb_root_path = './../'; ! ! require($phpbb_root_path . 'extension.inc'); ! require('./pagestart.' . $phpEx); ! include($phpbb_root_path . 'pafiledb/pafiledb_common.'.$phpEx); ! include($phpbb_root_path . 'pafiledb/includes/functions_field.'.$phpEx); ! */ ! // MX ! define( 'IN_PORTAL', 1 ); ! if ( !empty( $setmodules ) ) { ! $file = basename( __FILE__ ); ! $module['pafileDB_Download']['File: Handling'] = "modules/mx_pafiledb/admin/" . "$file"; ! return; } - $module_root_path = '../'; - $mx_root_path = '../../../'; - require( $mx_root_path . 'extension.inc' ); - require( $mx_root_path . 'admin/pagestart.' . $phpEx ); - include( $module_root_path . 'pafiledb/pafiledb_common.' . $phpEx ); - include( $module_root_path . 'pafiledb/includes/functions_field.' . $phpEx ); $custom_field = new custom_field(); --- 1,69 ---- <?php /** ! * mxBB pafileDB adminCP * ------------------- ! * subject : mx-portal, CMS & portal ! * copyright : (C) 2003-2005 mxBB ! * original author : based on code by Mohd Basri & paFileDB 3.0 ©2001/2002 PHP Arena ! * email : jon...@ho... * ! * $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 ( file_exists( './../viewtopic.php' ) ) { ! define( 'IN_PHPBB', 1 ); ! define( 'IN_PORTAL', 1 ); ! define( 'MXBB_MODULE', false ); ! ! if ( !empty( $setmodules ) ) ! { ! $file = basename( __FILE__ ); ! $module['pafileDB_Download']['File_manage_title'] = $file; ! return; ! } ! // Load default header ! ! $no_page_header = true; ! $phpbb_root_path = $module_root_path = $mx_root_path = './../'; ! require( $phpbb_root_path . 'extension.inc' ); ! require( './pagestart.' . $phpEx ); ! ! include( $phpbb_root_path . 'includes/functions_admin.'.$phpEx ); ! include( $phpbb_root_path . 'pafiledb/pafiledb_common.' . $phpEx ); ! include( $phpbb_root_path . 'pafiledb/includes/functions_field.' . $phpEx ); } ! else { ! define( 'IN_PORTAL', 1 ); ! define( 'MXBB_MODULE', true ); ! ! if ( !empty( $setmodules ) ) ! { ! $file = basename( __FILE__ ); ! $module['pafileDB_Download']['File_manage_title'] = 'modules/mx_pafiledb/admin/' . $file; ! return; ! } ! ! $no_page_header = true; ! $module_root_path = './../'; ! $mx_root_path = './../../../'; ! ! define( 'MXBB_27x', file_exists( $mx_root_path . 'more_smilies.php' ) ); ! ! require( $mx_root_path . 'extension.inc' ); ! require( $mx_root_path . 'admin/pagestart.' . $phpEx ); ! ! include( $module_root_path . 'pafiledb/pafiledb_common.' . $phpEx ); ! include( $module_root_path . 'pafiledb/includes/functions_field.' . $phpEx ); } $custom_field = new custom_field(); *************** *** 705,717 **** ); $pafiledb_template->display( 'admin' ); - $pafiledb->_pafiledb(); $cache->unload(); - - /* Original - include('./page_footer_admin.'.$phpEx); - */ - // MX Module include( $mx_root_path . 'admin/page_footer_admin.' . $phpEx ); --- 729,737 ---- ); + // Output + include( $mx_root_path . 'admin/page_header_admin.' . $phpEx ); $pafiledb_template->display( 'admin' ); $pafiledb->_pafiledb(); $cache->unload(); include( $mx_root_path . 'admin/page_footer_admin.' . $phpEx ); Index: admin_pa_settings.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/admin/admin_pa_settings.php,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** admin_pa_settings.php 9 Jan 2005 21:44:07 -0000 1.8 --- admin_pa_settings.php 11 Apr 2005 17:55:39 -0000 1.9 *************** *** 1,48 **** <?php /** ! * pafiledb mx module * ------------------- ! * copyright : (C) 2002 MX-System ! * begin : oct 23, 2003 ! * email : jon...@ho... ! * based on code by Mohd Basri, and pafilDB * ! * $Id$ */ - /* - orig - define('IN_PHPBB', 1); - define('IN_PA_CONFIG_ADMIN', 1); - if( !empty($setmodules) ) - { - $file = basename(__FILE__); - $module['Download'][$lang['Settings']] = "$file"; - return; - } - - $phpbb_root_path = "./../"; - - require($phpbb_root_path . 'extension.inc'); ! require('./pagestart.' . $phpEx); ! include($phpbb_root_path . 'pafiledb/pafiledb_common.'.$phpEx); ! */ ! // MX ! define( 'IN_PORTAL', 1 ); ! define( 'IN_PA_CONFIG_ADMIN', 1 ); ! if ( !empty( $setmodules ) ) { ! $file = basename( __FILE__ ); ! $module['pafileDB_Download']['Configuration'] = 'modules/mx_pafiledb/admin/' . "$file"; ! return; } - $module_root_path = '../'; - $mx_root_path = '../../../'; - require( $mx_root_path . 'extension.inc' ); - - require( $mx_root_path . 'admin/pagestart.' . $phpEx ); - include( $module_root_path . 'pafiledb/pafiledb_common.' . $phpEx ); - // include_once($mx_root_path . 'admin/page_header_admin.' . $phpEx); $submit = ( isset( $_POST['submit'] ) ) ? true : false; $size = ( isset( $_POST['max_size'] ) ) ? $_POST['max_size'] : ''; --- 1,68 ---- <?php /** ! * mxBB pafileDB adminCP * ------------------- ! * subject : mx-portal, CMS & portal ! * copyright : (C) 2003-2005 mxBB ! * original author : based on code by Mohd Basri & paFileDB 3.0 ©2001/2002 PHP Arena ! * email : jon...@ho... * ! * $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 ( file_exists( './../viewtopic.php' ) ) ! { ! define( 'IN_PHPBB', 1 ); ! define( 'IN_PORTAL', 1 ); ! define( 'MXBB_MODULE', false ); ! ! if ( !empty( $setmodules ) ) ! { ! $file = basename( __FILE__ ); ! $module['pafileDB_Download']['Configuration_title'] = $file; ! return; ! } ! // Load default header ! ! $no_page_header = true; ! $phpbb_root_path = $module_root_path = $mx_root_path = './../'; ! require( $phpbb_root_path . 'extension.inc' ); ! require( './pagestart.' . $phpEx ); ! ! include( $phpbb_root_path . 'includes/functions_admin.'.$phpEx ); ! include( $phpbb_root_path . 'pafiledb/pafiledb_common.' . $phpEx ); ! } ! else { ! define( 'IN_PORTAL', 1 ); ! define( 'MXBB_MODULE', true ); ! ! if ( !empty( $setmodules ) ) ! { ! $file = basename( __FILE__ ); ! $module['pafileDB_Download']['Configuration_title'] = 'modules/mx_pafiledb/admin/' . $file; ! return; ! } ! ! $no_page_header = true; ! $module_root_path = './../'; ! $mx_root_path = './../../../'; ! ! define( 'MXBB_27x', file_exists( $mx_root_path . 'more_smilies.php' ) ); ! ! require( $mx_root_path . 'extension.inc' ); ! require( $mx_root_path . 'admin/pagestart.' . $phpEx ); ! ! include( $module_root_path . 'pafiledb/pafiledb_common.' . $phpEx ); } $submit = ( isset( $_POST['submit'] ) ) ? true : false; $size = ( isset( $_POST['max_size'] ) ) ? $_POST['max_size'] : ''; *************** *** 113,117 **** 'admin' => 'admin/pa_admin_settings.tpl' ) ); ! // MX Addon $cat_auth_levels = array( 'ALL', 'REG', 'PRIVATE', 'MOD', 'ADMIN' ); $cat_auth_const = array( AUTH_ALL, AUTH_REG, AUTH_ACL, AUTH_MOD, AUTH_ADMIN ); --- 133,137 ---- 'admin' => 'admin/pa_admin_settings.tpl' ) ); ! $cat_auth_levels = array( 'ALL', 'REG', 'PRIVATE', 'MOD', 'ADMIN' ); $cat_auth_const = array( AUTH_ALL, AUTH_REG, AUTH_ACL, AUTH_MOD, AUTH_ADMIN ); *************** *** 156,167 **** $allow_comment_images_yes = ( $new['allow_comment_images'] ) ? ' selected' : ''; $allow_comment_images_no = ( !$new['allow_comment_images'] ) ? ' selected' : ''; - // MX Addon - $need_validation_yes = ( $new['need_validation'] ) ? ' selected' : ''; - $need_validation_no = ( !$new['need_validation'] ) ? ' selected' : ''; $pm_notify_yes = ( $new['pm_notify'] ) ? ' selected' : ''; $pm_notify_no = ( !$new['pm_notify'] ) ? ' selected' : ''; ! $template->assign_vars( array( 'S_SETTINGS_ACTION' => append_sid( "admin_pa_settings.$phpEx" ), 'L_MAX_FILE_SIZE' => $lang['Max_filesize'], --- 176,185 ---- $allow_comment_images_yes = ( $new['allow_comment_images'] ) ? ' selected' : ''; $allow_comment_images_no = ( !$new['allow_comment_images'] ) ? ' selected' : ''; $pm_notify_yes = ( $new['pm_notify'] ) ? ' selected' : ''; $pm_notify_no = ( !$new['pm_notify'] ) ? ' selected' : ''; ! $template->assign_vars( array( ! 'S_SETTINGS_ACTION' => append_sid( "admin_pa_settings.$phpEx" ), 'L_MAX_FILE_SIZE' => $lang['Max_filesize'], *************** *** 229,241 **** 'L_ASC' => $lang['Sort_Ascending'], 'L_DESC' => $lang['Sort_Descending'], ! // MX Addon 'L_VALIDATION_SETTINGS' => $lang['Validation_settings'], - 'L_NEED_VALIDATION' => $lang['Need_validate'], - 'L_VALIDATOR' => $lang['Validator'], 'L_PM_NOTIFY' => $lang['PM_notify'], - 'L_VALIDATOR_ADMIN_OPTION' => $lang['Validator_admin_option'], - 'L_VALIDATOR_MOD_OPTION' => $lang['Validator_mod_option'], - 'SETTINGS_DBNAME' => $new['settings_dbname'], 'SETTINGS_FILE_PAGE' => $new['settings_file_page'], --- 247,254 ---- 'L_ASC' => $lang['Sort_Ascending'], 'L_DESC' => $lang['Sort_Descending'], ! 'L_VALIDATION_SETTINGS' => $lang['Validation_settings'], 'L_PM_NOTIFY' => $lang['PM_notify'], 'SETTINGS_DBNAME' => $new['settings_dbname'], 'SETTINGS_FILE_PAGE' => $new['settings_file_page'], *************** *** 257,264 **** 'SORT_ASC' => ( $new['sort_order'] == 'ASC' ) ? 'selected="selected"' : '', 'SORT_DESC' => ( $new['sort_order'] == 'DESC' ) ? 'selected="selected"' : '', ! // MX addon ! 'VALIDATOR_ADMIN' => ( $new['validator'] == 'validator_admin' ) ? 'selected="selected"' : '', ! 'VALIDATOR_MOD' => ( $new['validator'] == 'validator_mod' ) ? 'selected="selected"' : '', ! 'MAX_FILE_SIZE' => $new['max_file_size'], 'UPLOAD_DIR' => $new['upload_dir'], --- 270,274 ---- 'SORT_ASC' => ( $new['sort_order'] == 'ASC' ) ? 'selected="selected"' : '', 'SORT_DESC' => ( $new['sort_order'] == 'DESC' ) ? 'selected="selected"' : '', ! 'MAX_FILE_SIZE' => $new['max_file_size'], 'UPLOAD_DIR' => $new['upload_dir'], *************** *** 288,313 **** 'S_ALLOW_LINKS_YES' => $allow_comment_links_yes, 'S_ALLOW_LINKS_NO' => $allow_comment_links_no, ! // MX Addon ! 'S_NEED_VALIDATION_YES' => $need_validation_yes, ! 'S_NEED_VALIDATION_NO' => $need_validation_no, ! 'S_PM_NOTIFY_YES' => $pm_notify_yes, 'S_PM_NOTIFY_NO' => $pm_notify_no, ! 'S_ALLOW_IMAGES_YES' => $allow_comment_images_yes, 'S_ALLOW_IMAGES_NO' => $allow_comment_images_no ) ); $template->pparse( 'admin' ); - - $pafiledb->_pafiledb(); - $cache->unload(); - - /* - orig - include('./page_footer_admin.'.$phpEx); - */ - // MX include( $mx_root_path . 'admin/page_footer_admin.' . $phpEx ); function pa_size_select( $select_name, $size_compare ) { --- 298,315 ---- 'S_ALLOW_LINKS_YES' => $allow_comment_links_yes, 'S_ALLOW_LINKS_NO' => $allow_comment_links_no, ! 'S_PM_NOTIFY_YES' => $pm_notify_yes, 'S_PM_NOTIFY_NO' => $pm_notify_no, ! 'S_ALLOW_IMAGES_YES' => $allow_comment_images_yes, 'S_ALLOW_IMAGES_NO' => $allow_comment_images_no ) ); + // Output + include( $mx_root_path . 'admin/page_header_admin.' . $phpEx ); $template->pparse( 'admin' ); include( $mx_root_path . 'admin/page_footer_admin.' . $phpEx ); + function pa_size_select( $select_name, $size_compare ) { Index: admin_pa_ug_auth.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/admin/admin_pa_ug_auth.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** admin_pa_ug_auth.php 9 Jan 2005 21:44:07 -0000 1.4 --- admin_pa_ug_auth.php 11 Apr 2005 17:55:39 -0000 1.5 *************** *** 1,11 **** <?php /** ! * admin_pa_ug_auth.php * ------------------- ! * begin : Saturday, Feb 13, 2001 ! * copyright : (C) 2001 The phpBB Group ! * email : su...@ph... * ! * $Id$ */ --- 1,12 ---- <?php /** ! * mxBB pafileDB adminCP * ------------------- ! * subject : mx-portal, CMS & portal ! * copyright : (C) 2003-2005 mxBB ! * original author : based on code by Mohd Basri & paFileDB 3.0 ©2001/2002 PHP Arena ! * email : jon...@ho... * ! * $Id$ */ *************** *** 16,54 **** * (at your option) any later version. */ ! /* - orig ! define('IN_PHPBB', 1); ! ! if( !empty($setmodules) ) { ! $filename = basename(__FILE__); ! //$module['Download']['User_Permissions'] = $filename . "?mode=user"; ! //$module['Download']['Group_Permissions'] = $filename . "?mode=group"; ! return; } ! ! $no_page_header = TRUE; ! $phpbb_root_path = './../'; ! require($phpbb_root_path . 'extension.inc'); ! require('./pagestart.' . $phpEx); ! ! include($phpbb_root_path . 'pafiledb/pafiledb_common.'.$phpEx); ! */ ! // MX ! define( 'IN_PORTAL', 1 ); ! define( 'IN_PA_CONFIG_ADMIN', 1 ); ! if ( !empty( $setmodules ) ) { ! $file = basename( __FILE__ ); ! // $module['Download']['Permissions: Users'] = 'modules/mx_pafiledb/admin/' . "$file"; ! return; ! } ! $module_root_path = '../'; ! $mx_root_path = '../../../'; ! require( $mx_root_path . 'extension.inc' ); ! ! require( $mx_root_path . 'admin/pagestart.' . $phpEx ); ! include( $module_root_path . 'pafiledb/pafiledb_common.' . $phpEx ); $pafiledb->init(); --- 17,70 ---- * (at your option) any later version. */ ! ! if ( file_exists( './../viewtopic.php' ) ) { ! define( 'IN_PHPBB', 1 ); ! define( 'IN_PORTAL', 1 ); ! define( 'MXBB_MODULE', false ); ! ! if ( !empty( $setmodules ) ) ! { ! $file = basename( __FILE__ ); ! return; ! } ! // Load default header ! ! $no_page_header = true; ! $phpbb_root_path = $module_root_path = $mx_root_path = './../'; ! require( $phpbb_root_path . 'extension.inc' ); ! require( './pagestart.' . $phpEx ); ! ! include( $phpbb_root_path . 'includes/functions_admin.'.$phpEx ); ! include( $phpbb_root_path . 'pafiledb/pafiledb_common.' . $phpEx ); ! include( $phpbb_root_path . 'includes/functions_search.' . $phpEx ); ! } ! else { ! define( 'IN_PORTAL', 1 ); ! define( 'MXBB_MODULE', true ); ! ! if ( !empty( $setmodules ) ) ! { ! $file = basename( __FILE__ ); ! return; ! } ! ! $no_page_header = true; ! $module_root_path = './../'; ! $mx_root_path = './../../../'; ! ! define( 'MXBB_27x', file_exists( $mx_root_path . 'more_smilies.php' ) ); ! ! require( $mx_root_path . 'extension.inc' ); ! require( $mx_root_path . 'admin/pagestart.' . $phpEx ); ! ! include( $module_root_path . 'pafiledb/pafiledb_common.' . $phpEx ); ! include_once( $mx_root_path . 'admin/page_header_admin.' . $phpEx ); ! ! } $pafiledb->init(); Index: admin_pa_catauth.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/admin/admin_pa_catauth.php,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** admin_pa_catauth.php 9 Jan 2005 21:44:06 -0000 1.6 --- admin_pa_catauth.php 11 Apr 2005 17:55:38 -0000 1.7 *************** *** 1,11 **** <?php /** ! * admin_forumauth.php * ------------------- ! * begin : Saturday, Feb 13, 2001 ! * copyright : (C) 2001 The phpBB Group ! * email : su...@ph... * ! * $Id$ */ --- 1,12 ---- <?php /** ! * mxBB pafileDB adminCP * ------------------- ! * subject : mx-portal, CMS & portal ! * copyright : (C) 2003-2005 mxBB ! * original author : based on code by Mohd Basri & paFileDB 3.0 ©2001/2002 PHP Arena ! * email : jon...@ho... * ! * $Id$ */ *************** *** 17,76 **** */ ! /* Orignial code --------------------------------- ! define('IN_PHPBB', 1); ! ! if( !empty($setmodules) ) ! { ! $filename = basename(__FILE__); ! $module['Download']['Permissions'] = $filename; ! ! return; ! } ! */ ! // MX Module ! define( 'IN_PORTAL', 1 ); ! ! if ( !empty( $setmodules ) ) { ! $filename = basename( __FILE__ ); ! $module['pafileDB_Download']['Permissions'] = 'modules/mx_pafiledb/admin/' . $filename; ! return; } ! ! /* ! // ! // Load default header - orignial code ! // ! $no_page_header = TRUE; ! $phpbb_root_path = './../'; ! require($phpbb_root_path . 'extension.inc'); ! require('./pagestart.' . $phpEx); ! ! include($phpbb_root_path . 'pafiledb/pafiledb_common.'.$phpEx); ! */ ! ! // Load default header - MX module ! ! $no_page_header = true; ! $module_root_path = '../'; ! $mx_root_path = '../../../'; ! require( $mx_root_path . 'extension.inc' ); ! require( $mx_root_path . 'admin/pagestart.' . $phpEx ); ! ! include( $module_root_path . 'pafiledb/pafiledb_common.' . $phpEx ); ! $pafiledb->init(); ! $cat_auth_fields = array( 'auth_view', 'auth_read', 'auth_view_file', 'auth_edit_file', 'auth_delete_file', 'auth_upload', 'auth_download', 'auth_rate', 'auth_email', 'auth_view_comment', 'auth_post_comment', 'auth_edit_comment', 'auth_delete_comment' ); $field_names = array( 'auth_view' => $lang['View'], 'auth_read' => $lang['Read'], 'auth_view_file' => $lang['View_file'], - // MX Addon 'auth_edit_file' => $lang['Edit_file'], 'auth_delete_file' => $lang['Delete_file'], - // End 'auth_upload' => $lang['Upload'], 'auth_download' => $lang['Download_file'], 'auth_rate' => $lang['Rate'], --- 18,79 ---- */ ! if ( file_exists( './../viewtopic.php' ) ) { ! define( 'IN_PHPBB', 1 ); ! define( 'IN_PORTAL', 1 ); ! define( 'MXBB_MODULE', false ); ! ! if ( !empty( $setmodules ) ) ! { ! $file = basename( __FILE__ ); ! $module['pafileDB_Download']['Permissions_title'] = $file; ! return; ! } ! // Load default header ! ! $no_page_header = true; ! $phpbb_root_path = $module_root_path = $mx_root_path = './../'; ! require( $phpbb_root_path . 'extension.inc' ); ! require( './pagestart.' . $phpEx ); ! ! include( $phpbb_root_path . 'includes/functions_admin.'.$phpEx ); ! include( $phpbb_root_path . 'pafiledb/pafiledb_common.' . $phpEx ); } ! else ! { ! define( 'IN_PORTAL', 1 ); ! define( 'MXBB_MODULE', true ); ! ! if ( !empty( $setmodules ) ) ! { ! $file = basename( __FILE__ ); ! $module['pafileDB_Download']['Permissions_title'] = 'modules/mx_pafiledb/admin/' . $file; ! return; ! } ! ! $no_page_header = true; ! $module_root_path = './../'; ! $mx_root_path = './../../../'; ! ! define( 'MXBB_27x', file_exists( $mx_root_path . 'more_smilies.php' ) ); ! ! require( $mx_root_path . 'extension.inc' ); ! require( $mx_root_path . 'admin/pagestart.' . $phpEx ); ! ! include( $module_root_path . 'pafiledb/pafiledb_common.' . $phpEx ); ! } ! $pafiledb->init(); ! $cat_auth_fields = array( 'auth_view', 'auth_read', 'auth_view_file', 'auth_edit_file', 'auth_delete_file', 'auth_upload', 'auth_download', 'auth_rate', 'auth_email', 'auth_view_comment', 'auth_post_comment', 'auth_edit_comment', 'auth_delete_comment', 'auth_approval' ); $field_names = array( 'auth_view' => $lang['View'], 'auth_read' => $lang['Read'], 'auth_view_file' => $lang['View_file'], 'auth_edit_file' => $lang['Edit_file'], 'auth_delete_file' => $lang['Delete_file'], 'auth_upload' => $lang['Upload'], + 'auth_approval' => $lang['Approval'], 'auth_download' => $lang['Download_file'], 'auth_rate' => $lang['Rate'], *************** *** 137,142 **** // specified ! $pafiledb_template->set_filenames( array( 'body' => 'admin/pa_auth_cat_body.tpl' ) ! ); $permissions_menu = array( append_sid( "admin_pa_catauth.$phpEx" ) => $lang['Cat_Permissions'], --- 140,144 ---- // specified ! $pafiledb_template->set_filenames( array( 'body' => 'admin/pa_auth_cat_body.tpl' ) ); $permissions_menu = array( append_sid( "admin_pa_catauth.$phpEx" ) => $lang['Cat_Permissions'], *************** *** 167,171 **** admin_display_cat_auth( $cat_parent ); $cat_name = ''; ! }elseif ( !empty( $cat_id ) ) { $pafiledb_template->assign_block_vars( 'cat_row', array( 'CATEGORY_NAME' => $pafiledb->cat_rowset[$cat_id]['cat_name'], --- 169,174 ---- admin_display_cat_auth( $cat_parent ); $cat_name = ''; ! } ! elseif ( !empty( $cat_id ) ) { $pafiledb_template->assign_block_vars( 'cat_row', array( 'CATEGORY_NAME' => $pafiledb->cat_rowset[$cat_id]['cat_name'], *************** *** 207,227 **** ); ! /* Original code ! include('./page_header_admin.'.$phpEx); ! $pafiledb_template->display('body'); ! ! $pafiledb->_pafiledb(); ! $cache->unload(); ! ! include('./page_footer_admin.'.$phpEx); ! ! */ ! // MX Module include( $mx_root_path . 'admin/page_header_admin.' . $phpEx ); $pafiledb_template->display( 'body' ); - include( $mx_root_path . 'admin/page_footer_admin.' . $phpEx ); - $pafiledb->_pafiledb(); $cache->unload(); function admin_display_cat_auth( $cat_parent = 0, $depth = 0 ) --- 210,219 ---- ); ! // Output include( $mx_root_path . 'admin/page_header_admin.' . $phpEx ); $pafiledb_template->display( 'body' ); $pafiledb->_pafiledb(); $cache->unload(); + include( $mx_root_path . 'admin/page_footer_admin.' . $phpEx ); function admin_display_cat_auth( $cat_parent = 0, $depth = 0 ) Index: admin_pa_license.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/admin/admin_pa_license.php,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** admin_pa_license.php 9 Jan 2005 21:44:07 -0000 1.7 --- admin_pa_license.php 11 Apr 2005 17:55:38 -0000 1.8 *************** *** 1,52 **** <?php /** ! * pafiledb mx module * ------------------- ! * copyright : (C) 2002 MX-System ! * begin : oct 23, 2003 ! * email : jon...@ho... ! * based on code by Mohd Basri, and pafilDB * ! * $Id$ */ - /* - orig - define('IN_PHPBB', 1); ! if( !empty($setmodules) ) { ! $file = basename(__FILE__); ! $module['Download'][$lang['Alicense']] = "$file?license=add"; ! $module['Download'][$lang['Elicense']] = "$file?license=edit"; ! $module['Download'][$lang['Dlicense']] = "$file?license=delete"; ! return; ! } ! ! $phpbb_root_path = "./../"; ! ! require($phpbb_root_path . 'extension.inc'); ! ! require('./pagestart.' . $phpEx); ! ! include($phpbb_root_path . 'pafiledb/pafiledb_common.'.$phpEx); ! */ ! // MX ! define( 'IN_PORTAL', 1 ); ! if ( !empty( $setmodules ) ) ! { ! $file = basename( __FILE__ ); ! $module['pafileDB_Download']['License'] = "modules/mx_pafiledb/admin/" . "$file"; ! // $module['Download']['License: Add'] = "modules/mx_pafiledb/admin/" . "$file?license=add"; ! // $module['Download']['License: Edit'] = "modules/mx_pafiledb/admin/" . "$file?license=edit"; ! // $module['Download']['License: Delete'] = "modules/mx_pafiledb/admin/" . "$file?license=delete"; ! return; } ! $module_root_path = '../'; ! $mx_root_path = '../../../'; ! require( $mx_root_path . 'extension.inc' ); ! ! require( $mx_root_path . 'admin/pagestart.' . $phpEx ); ! ! include( $module_root_path . 'pafiledb/pafiledb_common.' . $phpEx ); if ( isset( $HTTP_GET_VARS['license'] ) || isset( $HTTP_POST_VARS['license'] ) ) --- 1,67 ---- <?php /** ! * mxBB pafileDB adminCP * ------------------- ! * subject : mx-portal, CMS & portal ! * copyright : (C) 2003-2005 mxBB ! * original author : based on code by Mohd Basri & paFileDB 3.0 ©2001/2002 PHP Arena ! * email : jon...@ho... * ! * $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 ( file_exists( './../viewtopic.php' ) ) { ! define( 'IN_PHPBB', 1 ); ! define( 'IN_PORTAL', 1 ); ! define( 'MXBB_MODULE', false ); ! ! if ( !empty( $setmodules ) ) ! { ! $file = basename( __FILE__ ); ! $module['pafileDB_Download']['License_title'] = $file; ! return; ! } ! // Load default header ! ! $no_page_header = true; ! $phpbb_root_path = $module_root_path = $mx_root_path = './../'; ! require( $phpbb_root_path . 'extension.inc' ); ! require( './pagestart.' . $phpEx ); ! ! include( $phpbb_root_path . 'includes/functions_admin.'.$phpEx ); ! include( $phpbb_root_path . 'pafiledb/pafiledb_common.' . $phpEx ); } ! else ! { ! define( 'IN_PORTAL', 1 ); ! define( 'MXBB_MODULE', true ); ! ! if ( !empty( $setmodules ) ) ! { ! $file = basename( __FILE__ ); ! $module['pafileDB_Download']['License_title'] = 'modules/mx_pafiledb/admin/' . $file; ! return; ! } ! ! $no_page_header = true; ! $module_root_path = './../'; ! $mx_root_path = './../../../'; ! ! define( 'MXBB_27x', file_exists( $mx_root_path . 'more_smilies.php' ) ); ! ! require( $mx_root_path . 'extension.inc' ); ! require( $mx_root_path . 'admin/pagestart.' . $phpEx ); ! ! include( $module_root_path . 'pafiledb/pafiledb_common.' . $phpEx ); ! } if ( isset( $HTTP_GET_VARS['license'] ) || isset( $HTTP_POST_VARS['license'] ) ) *************** *** 100,105 **** } - $template->pparse( 'admin' ); - break; } --- 115,118 ---- *************** *** 198,203 **** } - $template->pparse( 'admin' ); - break; } --- 211,214 ---- *************** *** 277,282 **** } - $template->pparse( 'admin' ); - break; } --- 288,291 ---- *************** *** 314,323 **** 'ROW' => $row ) ); - $template->pparse( 'admin' ); } ! /* - orig ! include('./page_footer_admin.'.$phpEx); ! */ ! // MX include( $mx_root_path . 'admin/page_footer_admin.' . $phpEx ); --- 323,331 ---- 'ROW' => $row ) ); } ! ! // Output ! include( $mx_root_path . 'admin/page_header_admin.' . $phpEx ); ! $template->pparse( 'admin' ); include( $mx_root_path . 'admin/page_footer_admin.' . $phpEx ); |