|
From: Jon O. <jon...@us...> - 2006-07-08 16:28:50
|
Update of /cvsroot/mxbb/mx_pafiledb/pafiledb/admin In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv15070/modules/mx_pafiledb/pafiledb/admin Modified Files: admin_cat_manage.php admin_catauth_manage.php admin_custom_manage.php admin_fchecker_manage.php admin_file_manage.php admin_license_manage.php admin_settings.php admin_ug_auth_manage.php Log Message: moved functions and removed files Index: admin_cat_manage.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/pafiledb/admin/admin_cat_manage.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** admin_cat_manage.php 8 Jul 2006 10:23:34 -0000 1.1 --- admin_cat_manage.php 8 Jul 2006 16:28:46 -0000 1.2 *************** *** 18,22 **** function main( $action ) { ! global $db, $images, $template, $lang, $phpEx, $pafiledb_functions, $pafiledb_cache, $pafiledb_config, $phpbb_root_path, $module_root_path, $mx_root_path, $mx_request_vars; // --- 18,22 ---- function main( $action ) { ! global $db, $images, $template, $pafiledb_template, $lang, $phpEx, $pafiledb_functions, $pafiledb_cache, $pafiledb_config, $phpbb_root_path, $module_root_path, $mx_root_path, $mx_request_vars; // *************** *** 31,40 **** if ( $mode == 'do_add' && !$cat_id ) { ! $new_cat_id = $pafiledb->update_add_cat(); $mode = 'add'; ! if ( !sizeof( $pafiledb->error ) ) { ! $pafiledb->_pafiledb(); ! $message = $lang['Catadded'] . '<br /><br />' . sprintf( $lang['Click_return'], '<a href="' . append_sid( "admin_pa_category.$phpEx" ) . '">', '</a>' ) . '<br /><br />' . sprintf( $lang['Click_edit_permissions'], '<a href="' . append_sid( "admin_pa_catauth.$phpEx?cat_id=$new_cat_id" ) . '">', '</a>' ); mx_message_die( GENERAL_MESSAGE, $message ); } --- 31,40 ---- if ( $mode == 'do_add' && !$cat_id ) { ! $new_cat_id = $this->update_add_cat(); $mode = 'add'; ! if ( !sizeof( $this->error ) ) { ! $this->_pafiledb(); ! $message = $lang['Catadded'] . '<br /><br />' . sprintf( $lang['Click_return'], '<a href="' . append_sid( "admin_pafiledb.$phpEx?action=cat_manage" ) . '">', '</a>' ) . '<br /><br />' . sprintf( $lang['Click_edit_permissions'], '<a href="' . append_sid( "admin_pafiledb.$phpEx?action=catauth_manage&cat_id=$new_cat_id" ) . '">', '</a>' ); mx_message_die( GENERAL_MESSAGE, $message ); } *************** *** 43,51 **** elseif ( $mode == 'do_add' && $cat_id ) { ! $new_cat_id = $pafiledb->update_add_cat( $cat_id ); ! if ( !sizeof( $pafiledb->error ) ) { ! $pafiledb->_pafiledb(); ! $message = $lang['Catedited'] . '<br /><br />' . sprintf( $lang['Click_return'], '<a href="' . append_sid( "admin_pa_category.$phpEx" ) . '">', '</a>' ) . '<br /><br />' . sprintf( $lang['Click_edit_permissions'], '<a href="' . append_sid( "admin_pa_catauth.$phpEx?cat_id=$new_cat_id" ) . '">', '</a>' ); mx_message_die( GENERAL_MESSAGE, $message ); } --- 43,51 ---- elseif ( $mode == 'do_add' && $cat_id ) { ! $new_cat_id = $this->update_add_cat( $cat_id ); ! if ( !sizeof( $this->error ) ) { ! $this->_pafiledb(); ! $message = $lang['Catedited'] . '<br /><br />' . sprintf( $lang['Click_return'], '<a href="' . append_sid( "admin_pafiledb.$phpEx?action=cat_manage" ) . '">', '</a>' ) . '<br /><br />' . sprintf( $lang['Click_edit_permissions'], '<a href="' . append_sid( "admin_pafiledb.$phpEx?action=catauth_manage&cat_id=$new_cat_id" ) . '">', '</a>' ); mx_message_die( GENERAL_MESSAGE, $message ); } *************** *** 54,62 **** elseif ( $mode == 'do_delete' ) { ! $pafiledb->delete_cat( $cat_id ); ! if ( !sizeof( $pafiledb->error ) ) { ! $pafiledb->_pafiledb(); ! $message = $lang['Catsdeleted'] . '<br /><br />' . sprintf( $lang['Click_return'], '<a href="' . append_sid( "admin_pa_category.$phpEx" ) . '">', '</a>' ) . '<br /><br />' . sprintf( $lang['Click_return_admin_index'], '<a href="' . append_sid( $mx_root_path . "admin/index.$phpEx?pane=right" ) . '">', '</a>' ); mx_message_die( GENERAL_MESSAGE, $message ); } --- 54,62 ---- elseif ( $mode == 'do_delete' ) { ! $this->delete_cat( $cat_id ); ! if ( !sizeof( $this->error ) ) { ! $this->_pafiledb(); ! $message = $lang['Catsdeleted'] . '<br /><br />' . sprintf( $lang['Click_return'], '<a href="' . append_sid( "admin_pafiledb.$phpEx?action=cat_manage" ) . '">', '</a>' ) . '<br /><br />' . sprintf( $lang['Click_return_admin_index'], '<a href="' . append_sid( $mx_root_path . "admin/index.$phpEx?pane=right" ) . '">', '</a>' ); mx_message_die( GENERAL_MESSAGE, $message ); } *************** *** 64,76 **** 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(); } --- 64,76 ---- elseif ( $mode == 'cat_order' ) { ! $this->order_cat( $cat_id_other ); } elseif ( $mode == 'sync' ) { ! $this->sync( $cat_id_other ); } elseif ( $mode == 'sync_all' ) { ! $this->sync_all(); } *************** *** 109,113 **** $pafiledb_template->set_filenames( array( 'admin' => $template_file ) ); ! if ( sizeof( $pafiledb->error ) ) $pafiledb_template->assign_block_vars( 'pafiledb_error', array() ); $pafiledb_template->assign_vars( array( --- 109,113 ---- $pafiledb_template->set_filenames( array( 'admin' => $template_file ) ); ! if ( sizeof( $this->error ) ) $pafiledb_template->assign_block_vars( 'pafiledb_error', array() ); $pafiledb_template->assign_vars( array( *************** *** 115,121 **** 'L_CAT_EXPLAIN' => $l_explain, ! 'ERROR' => ( sizeof( $pafiledb->error ) ) ? implode( '<br />', $pafiledb->error ) : '', 'S_HIDDEN_FIELDS' => $s_hidden_fields, ! 'S_CAT_ACTION' => append_sid( "admin_pa_category.$phpEx" ) )); --- 115,121 ---- 'L_CAT_EXPLAIN' => $l_explain, ! 'ERROR' => ( sizeof( $this->error ) ) ? implode( '<br />', $this->error ) : '', 'S_HIDDEN_FIELDS' => $s_hidden_fields, ! 'S_CAT_ACTION' => append_sid( "admin_pafiledb.$phpEx?action=cat_manage" ) )); *************** *** 131,135 **** 'L_RESYNC' => $lang['Resync'] )); ! admin_cat_main( $cat_id ); } elseif ( $mode == 'add' || $mode == 'edit' ) --- 131,135 ---- 'L_RESYNC' => $lang['Resync'] )); ! $this->admin_cat_main( $cat_id ); } elseif ( $mode == 'add' || $mode == 'edit' ) *************** *** 146,150 **** } ! $cat_list .= ( !$_POST['cat_parent'] ) ? $pafiledb->generate_jumpbox() : $pafiledb->generate_jumpbox( 0, 0, array( $_POST['cat_parent'] => 1 ) ); $checked_yes = ( $_POST['cat_allow_file'] ) ? ' checked' : ''; $checked_no = ( !$_POST['cat_allow_file'] ) ? ' checked' : ''; --- 146,150 ---- } ! $cat_list .= ( !$_POST['cat_parent'] ) ? $this->generate_jumpbox() : $this->generate_jumpbox( 0, 0, array( $_POST['cat_parent'] => 1 ) ); $checked_yes = ( $_POST['cat_allow_file'] ) ? ' checked' : ''; $checked_no = ( !$_POST['cat_allow_file'] ) ? ' checked' : ''; *************** *** 195,199 **** else { ! if ( !$pafiledb->cat_rowset[$cat_id]['cat_parent'] ) { $cat_list .= '<option value="0" selected>' . $lang['None'] . '</option>\n'; --- 195,199 ---- else { ! if ( !$this->cat_rowset[$cat_id]['cat_parent'] ) { $cat_list .= '<option value="0" selected>' . $lang['None'] . '</option>\n'; *************** *** 203,209 **** $cat_list .= '<option value="0">' . $lang['None'] . '</option>\n'; } ! $cat_list .= $pafiledb->generate_jumpbox( 0, 0, array( $pafiledb->cat_rowset[$cat_id]['cat_parent'] => 1 ) ); ! if ( $pafiledb->cat_rowset[$cat_id]['cat_allow_file'] ) { $checked_yes = ' checked'; --- 203,209 ---- $cat_list .= '<option value="0">' . $lang['None'] . '</option>\n'; } ! $cat_list .= $this->generate_jumpbox( 0, 0, array( $this->cat_rowset[$cat_id]['cat_parent'] => 1 ) ); ! if ( $this->cat_rowset[$cat_id]['cat_allow_file'] ) { $checked_yes = ' checked'; *************** *** 216,262 **** } ! $cat_name = $pafiledb->cat_rowset[$cat_id]['cat_name']; ! $cat_desc = $pafiledb->cat_rowset[$cat_id]['cat_desc']; // // Comments // ! $use_comments_yes = ( $pafiledb->cat_rowset[$cat_id]['cat_allow_comments'] == 1 ) ? "checked=\"checked\"" : ""; ! $use_comments_no = ( $pafiledb->cat_rowset[$cat_id]['cat_allow_comments'] == 0 ) ? "checked=\"checked\"" : ""; ! $use_comments_default = ( $pafiledb->cat_rowset[$cat_id]['cat_allow_comments'] == -1 ) ? "checked=\"checked\"" : ""; ! $internal_comments_internal = ( $pafiledb->cat_rowset[$cat_id]['internal_comments'] == 1 ) ? "checked=\"checked\"" : ""; ! $internal_comments_phpbb = ( $pafiledb->cat_rowset[$cat_id]['internal_comments'] == 0 ) ? "checked=\"checked\"" : ""; ! $internal_comments_default = ( $pafiledb->cat_rowset[$cat_id]['internal_comments'] == -1 ) ? "checked=\"checked\"" : ""; ! $comments_forum_id = $pafiledb->cat_rowset[$cat_id]['comments_forum_id']; ! $autogenerate_comments_yes = ( $pafiledb->cat_rowset[$cat_id]['autogenerate_comments'] == 1 ) ? "checked=\"checked\"" : ""; ! $autogenerate_comments_no = ( $pafiledb->cat_rowset[$cat_id]['autogenerate_comments'] == 0 ) ? "checked=\"checked\"" : ""; ! $autogenerate_comments_default = ( $pafiledb->cat_rowset[$cat_id]['autogenerate_comments'] == -1 ) ? "checked=\"checked\"" : ""; // // Ratings // ! $use_ratings_yes = ( $pafiledb->cat_rowset[$cat_id]['cat_allow_ratings'] == 1 ) ? "checked=\"checked\"" : ""; ! $use_ratings_no = ( $pafiledb->cat_rowset[$cat_id]['cat_allow_ratings'] == 0 ) ? "checked=\"checked\"" : ""; ! $use_ratings_default = ( $pafiledb->cat_rowset[$cat_id]['cat_allow_ratings'] == -1 ) ? "checked=\"checked\"" : ""; // // Instructions // ! $pretext_show = ( $pafiledb->cat_rowset[$cat_id]['show_pretext'] == 1 ) ? "checked=\"checked\"" : ""; ! $pretext_hide = ( $pafiledb->cat_rowset[$cat_id]['show_pretext'] == 0 ) ? "checked=\"checked\"" : ""; ! $pretext_default = ( $pafiledb->cat_rowset[$cat_id]['show_pretext'] == -1 ) ? "checked=\"checked\"" : ""; // // Notification // ! $notify_none = ( $pafiledb->cat_rowset[$cat_id]['notify'] == 0 ) ? "checked=\"checked\"" : ""; ! $notify_pm = ( $pafiledb->cat_rowset[$cat_id]['notify'] == 1 ) ? "checked=\"checked\"" : ""; ! $notify_email = ( $pafiledb->cat_rowset[$cat_id]['notify'] == 2 ) ? "checked=\"checked\"" : ""; ! $notify_default = ( $pafiledb->cat_rowset[$cat_id]['notify'] == -1 ) ? "checked=\"checked\"" : ""; ! $notify_group_list = mx_get_groups($pafiledb->cat_rowset[$cat_id]['notify_group'], 'notify_group'); } --- 216,262 ---- } ! $cat_name = $this->cat_rowset[$cat_id]['cat_name']; ! $cat_desc = $this->cat_rowset[$cat_id]['cat_desc']; // // Comments // ! $use_comments_yes = ( $this->cat_rowset[$cat_id]['cat_allow_comments'] == 1 ) ? "checked=\"checked\"" : ""; ! $use_comments_no = ( $this->cat_rowset[$cat_id]['cat_allow_comments'] == 0 ) ? "checked=\"checked\"" : ""; ! $use_comments_default = ( $this->cat_rowset[$cat_id]['cat_allow_comments'] == -1 ) ? "checked=\"checked\"" : ""; ! $internal_comments_internal = ( $this->cat_rowset[$cat_id]['internal_comments'] == 1 ) ? "checked=\"checked\"" : ""; ! $internal_comments_phpbb = ( $this->cat_rowset[$cat_id]['internal_comments'] == 0 ) ? "checked=\"checked\"" : ""; ! $internal_comments_default = ( $this->cat_rowset[$cat_id]['internal_comments'] == -1 ) ? "checked=\"checked\"" : ""; ! $comments_forum_id = $this->cat_rowset[$cat_id]['comments_forum_id']; ! $autogenerate_comments_yes = ( $this->cat_rowset[$cat_id]['autogenerate_comments'] == 1 ) ? "checked=\"checked\"" : ""; ! $autogenerate_comments_no = ( $this->cat_rowset[$cat_id]['autogenerate_comments'] == 0 ) ? "checked=\"checked\"" : ""; ! $autogenerate_comments_default = ( $this->cat_rowset[$cat_id]['autogenerate_comments'] == -1 ) ? "checked=\"checked\"" : ""; // // Ratings // ! $use_ratings_yes = ( $this->cat_rowset[$cat_id]['cat_allow_ratings'] == 1 ) ? "checked=\"checked\"" : ""; ! $use_ratings_no = ( $this->cat_rowset[$cat_id]['cat_allow_ratings'] == 0 ) ? "checked=\"checked\"" : ""; ! $use_ratings_default = ( $this->cat_rowset[$cat_id]['cat_allow_ratings'] == -1 ) ? "checked=\"checked\"" : ""; // // Instructions // ! $pretext_show = ( $this->cat_rowset[$cat_id]['show_pretext'] == 1 ) ? "checked=\"checked\"" : ""; ! $pretext_hide = ( $this->cat_rowset[$cat_id]['show_pretext'] == 0 ) ? "checked=\"checked\"" : ""; ! $pretext_default = ( $this->cat_rowset[$cat_id]['show_pretext'] == -1 ) ? "checked=\"checked\"" : ""; // // Notification // ! $notify_none = ( $this->cat_rowset[$cat_id]['notify'] == 0 ) ? "checked=\"checked\"" : ""; ! $notify_pm = ( $this->cat_rowset[$cat_id]['notify'] == 1 ) ? "checked=\"checked\"" : ""; ! $notify_email = ( $this->cat_rowset[$cat_id]['notify'] == 2 ) ? "checked=\"checked\"" : ""; ! $notify_default = ( $this->cat_rowset[$cat_id]['notify'] == -1 ) ? "checked=\"checked\"" : ""; ! $notify_group_list = mx_get_groups($this->cat_rowset[$cat_id]['notify_group'], 'notify_group'); } *************** *** 288,292 **** 'L_FORUM_ID' => $lang['Forum_id'], 'L_FORUM_ID_EXPLAIN' => $lang['Forum_id_explain'], ! 'FORUM_LIST' => get_forums( $comments_forum_id, true, 'comments_forum_id' ), 'L_AUTOGENERATE_COMMENTS' => $lang['Autogenerate_comments'], --- 288,292 ---- 'L_FORUM_ID' => $lang['Forum_id'], 'L_FORUM_ID_EXPLAIN' => $lang['Forum_id_explain'], ! 'FORUM_LIST' => $this->get_forums( $comments_forum_id, true, 'comments_forum_id' ), 'L_AUTOGENERATE_COMMENTS' => $lang['Autogenerate_comments'], *************** *** 363,368 **** elseif ( $mode == 'delete' ) { ! $select_cat = $pafiledb->generate_jumpbox( 0, 0, array( $cat_id => 1 ) ); ! $file_to_select_cat = $pafiledb->generate_jumpbox( 0, 0, '', true ); $pafiledb_template->assign_vars( array( --- 363,368 ---- elseif ( $mode == 'delete' ) { ! $select_cat = $this->generate_jumpbox( 0, 0, array( $cat_id => 1 ) ); ! $file_to_select_cat = $this->generate_jumpbox( 0, 0, '', true ); $pafiledb_template->assign_vars( array( *************** *** 382,386 **** $pafiledb_template->display( 'admin' ); ! $pafiledb->_pafiledb(); $pafiledb_cache->unload(); } --- 382,386 ---- $pafiledb_template->display( 'admin' ); ! $this->_pafiledb(); $pafiledb_cache->unload(); } Index: admin_file_manage.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/pafiledb/admin/admin_file_manage.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** admin_file_manage.php 8 Jul 2006 10:23:35 -0000 1.1 --- admin_file_manage.php 8 Jul 2006 16:28:46 -0000 1.2 *************** *** 18,22 **** function main( $action ) { ! global $db, $images, $template, $lang, $phpEx, $pafiledb_functions, $pafiledb_cache, $pafiledb_config, $phpbb_root_path, $module_root_path, $mx_root_path, $mx_request_vars; // --- 18,22 ---- function main( $action ) { ! global $db, $images, $template, $pafiledb_template, $lang, $phpEx, $pafiledb_functions, $pafiledb_cache, $pafiledb_config, $phpbb_root_path, $module_root_path, $mx_root_path, $mx_request_vars; // *************** *** 24,27 **** --- 24,28 ---- // include_once( $phpbb_root_path . 'includes/functions_search.' . $phpEx ); + include_once( $module_root_path . 'pafiledb/includes/functions_field.' . $phpEx ); // *************** *** 31,36 **** $custom_field->init(); - $pafiledb->init(); - $cat_id = ( isset( $_REQUEST['cat_id'] ) ) ? intval( $_REQUEST['cat_id'] ) : 0; $file_id = ( isset( $_REQUEST['file_id'] ) ) ? intval( $_REQUEST['file_id'] ) : 0; --- 32,35 ---- *************** *** 152,158 **** if ( $mode == 'do_add' && !$file_id ) { ! $file_id = $pafiledb->update_add_file(); $custom_field->file_update_data( $file_id ); ! $pafiledb->_pafiledb(); $mode = 'edit'; --- 151,157 ---- if ( $mode == 'do_add' && !$file_id ) { ! $file_id = $this->update_add_file(); $custom_field->file_update_data( $file_id ); ! $this->_pafiledb(); $mode = 'edit'; *************** *** 162,168 **** // Notification // ! $pafiledb->update_add_file_notify($file_id, 'add'); ! $message = $lang['Fileadded'] . '<br /><br />' . sprintf( $lang['Click_return'], '<a href="' . append_sid( "admin_pa_file.php" ) . '">', '</a>' ); mx_message_die( GENERAL_MESSAGE, $message ); } --- 161,167 ---- // Notification // ! $this->update_add_file_notify($file_id, 'add'); ! $message = $lang['Fileadded'] . '<br /><br />' . sprintf( $lang['Click_return'], '<a href="' . append_sid( "admin_pafiledb.$phpEx?action=file_manage" ) . '">', '</a>' ); mx_message_die( GENERAL_MESSAGE, $message ); } *************** *** 170,176 **** elseif ( $mode == 'do_add' && $file_id ) { ! $file_id = $pafiledb->update_add_file( $file_id ); $custom_field->file_update_data( $file_id ); ! $pafiledb->_pafiledb(); $mode = 'edit'; --- 169,175 ---- elseif ( $mode == 'do_add' && $file_id ) { ! $file_id = $this->update_add_file( $file_id ); $custom_field->file_update_data( $file_id ); ! $this->_pafiledb(); $mode = 'edit'; *************** *** 180,186 **** // Notification // ! $pafiledb->update_add_file_notify($file_id, 'edit'); ! $message = $lang['Fileedited'] . '<br /><br />' . sprintf( $lang['Click_return'], '<a href="' . append_sid( "admin_pa_file.$phpEx" ) . '">', '</a>' ) . '<br /><br />' . sprintf( $lang['Click_return_admin_index'], '<a href="' . append_sid( $mx_root_path . "admin/index.$phpEx?pane=right" ) . '">', '</a>' ); mx_message_die( GENERAL_MESSAGE, $message ); } --- 179,185 ---- // Notification // ! $this->update_add_file_notify($file_id, 'edit'); ! $message = $lang['Fileedited'] . '<br /><br />' . sprintf( $lang['Click_return'], '<a href="' . append_sid( "admin_pafiledb.$phpEx?action=file_manage" ) . '">', '</a>' ) . '<br /><br />' . sprintf( $lang['Click_return_admin_index'], '<a href="' . append_sid( $mx_root_path . "admin/index.$phpEx?pane=right" ) . '">', '</a>' ); mx_message_die( GENERAL_MESSAGE, $message ); } *************** *** 205,216 **** // Notification // ! $pafiledb->update_add_file_notify($temp_file_id, 'delete'); // // Comments // ! if ($pafiledb->comments[$file_info['file_catid']]['activated'] && $pafiledb_config['del_topic']) { ! if ( $pafiledb->comments[$file_info['file_catid']]['internal_comments'] ) { $sql = 'DELETE FROM ' . PA_COMMENTS_TABLE . " --- 204,215 ---- // Notification // ! $this->update_add_file_notify($temp_file_id, 'delete'); // // Comments // ! if ($this->comments[$file_info['file_catid']]['activated'] && $pafiledb_config['del_topic']) { ! if ( $this->comments[$file_info['file_catid']]['internal_comments'] ) { $sql = 'DELETE FROM ' . PA_COMMENTS_TABLE . " *************** *** 234,238 **** } ! $pafiledb->delete_files( $temp_file_id ); } } --- 233,237 ---- } ! $this->delete_files( $temp_file_id ); } } *************** *** 251,262 **** // Notification // ! $pafiledb->update_add_file_notify($file_id, 'delete'); // // Comments // ! if ($pafiledb->comments[$file_info['file_catid']]['activated'] && $pafiledb_config['del_topic']) { ! if ( $pafiledb->comments[$file_info['file_catid']]['internal_comments'] ) { $sql = 'DELETE FROM ' . PA_COMMENTS_TABLE . " --- 250,261 ---- // Notification // ! $this->update_add_file_notify($file_id, 'delete'); // // Comments // ! if ($this->comments[$file_info['file_catid']]['activated'] && $pafiledb_config['del_topic']) { ! if ( $this->comments[$file_info['file_catid']]['internal_comments'] ) { $sql = 'DELETE FROM ' . PA_COMMENTS_TABLE . " *************** *** 280,291 **** } ! $pafiledb->delete_files( $file_id ); } ! $pafiledb->_pafiledb(); } elseif ( $mode == 'do_maintenace' ) { ! $pafiledb->file_mainenance(); } elseif ( $mode == 'do_approve' || $mode == 'do_unapprove' ) --- 279,290 ---- } ! $this->delete_files( $file_id ); } ! $this->_pafiledb(); } elseif ( $mode == 'do_maintenace' ) { ! $this->file_mainenance(); } elseif ( $mode == 'do_approve' || $mode == 'do_unapprove' ) *************** *** 295,314 **** foreach( $file_ids as $temp_file_id ) { ! $pafiledb->file_approve( $mode, $temp_file_id ); } // // Notification // ! $pafiledb->update_add_file_notify($file_ids, $mode); } else { ! $pafiledb->file_approve( $mode, $file_id ); // // Notification // ! $pafiledb->update_add_file_notify($file_id, $mode); } ! $pafiledb->_pafiledb(); } --- 294,313 ---- foreach( $file_ids as $temp_file_id ) { ! $this->file_approve( $mode, $temp_file_id ); } // // Notification // ! $this->update_add_file_notify($file_ids, $mode); } else { ! $this->file_approve( $mode, $file_id ); // // Notification // ! $this->update_add_file_notify($file_id, $mode); } ! $this->_pafiledb(); } *************** *** 321,325 **** 'S_HIDDEN_FIELDS' => $s_hidden_fields, ! 'S_FILE_ACTION' => append_sid( "admin_pa_file.$phpEx" ) )); --- 320,324 ---- 'S_HIDDEN_FIELDS' => $s_hidden_fields, ! 'S_FILE_ACTION' => append_sid( "admin_pafiledb.$phpEx?action=file_manage" ) )); *************** *** 476,480 **** $cat_list = '<select name="cat_id">'; ! if ( !$pafiledb->cat_rowset[$cat_id]['cat_parent'] ) { $cat_list .= '<option value="0" selected>' . $lang['None'] . '</option>\n'; --- 475,479 ---- $cat_list = '<select name="cat_id">'; ! if ( !$this->cat_rowset[$cat_id]['cat_parent'] ) { $cat_list .= '<option value="0" selected>' . $lang['None'] . '</option>\n'; *************** *** 484,488 **** $cat_list .= '<option value="0">' . $lang['None'] . '</option>\n'; } ! $cat_list .= $pafiledb->generate_jumpbox( 0, 0, array( $cat_id => 1 ), true ); $cat_list .= '</select>'; --- 483,487 ---- $cat_list .= '<option value="0">' . $lang['None'] . '</option>\n'; } ! $cat_list .= $this->generate_jumpbox( 0, 0, array( $cat_id => 1 ), true ); $cat_list .= '</select>'; *************** *** 500,504 **** 'L_NO_FILES' => $lang['No_file'], ! 'PAGINATION' => generate_pagination( append_sid( "admin_pa_file.$phpEx?mode=$mode&sort_method=$sort_method&sort_order=$sort_order&cat_id=$cat_id" ), $total_files, $pafiledb_config['pagination'], $start ), 'PAGE_NUMBER' => sprintf( $lang['Page_of'], ( floor( $start / $pafiledb_config['pagination'] ) + 1 ), ceil( $total_files / $pafiledb_config['pagination'] ) ), --- 499,503 ---- 'L_NO_FILES' => $lang['No_file'], ! 'PAGINATION' => generate_pagination( append_sid( "admin_pafiledb.$phpEx?action=file_manage&mode=$mode&sort_method=$sort_method&sort_order=$sort_order&cat_id=$cat_id" ), $total_files, $pafiledb_config['pagination'], $start ), 'PAGE_NUMBER' => sprintf( $lang['Page_of'], ( floor( $start / $pafiledb_config['pagination'] ) + 1 ), ceil( $total_files / $pafiledb_config['pagination'] ) ), *************** *** 509,513 **** if ( $total_files > 0 ) { ! $template->assign_block_vars( 'pagination', array() ); } --- 508,512 ---- if ( $total_files > 0 ) { ! $pafiledb_template->assign_block_vars( 'pagination', array() ); } *************** *** 546,552 **** 'FILE_NUMBER' => $i++, 'FILE_ID' => $file_data['file_id'], ! 'U_FILE_EDIT' => append_sid( "admin_pa_file.$phpEx?mode=edit&file_id={$file_data['file_id']}" ), ! 'U_FILE_DELETE' => append_sid( "admin_pa_file.$phpEx?mode=delete&file_id={$file_data['file_id']}" ), ! 'U_FILE_APPROVE' => append_sid( "admin_pa_file.$phpEx?mode=$approve_mode&file_id={$file_data['file_id']}" ), 'L_APPROVE' => ( $file_data['file_approved'] ) ? $lang['Unapprove'] : $lang['Approve'] )); --- 545,551 ---- 'FILE_NUMBER' => $i++, 'FILE_ID' => $file_data['file_id'], ! 'U_FILE_EDIT' => append_sid( "admin_pafiledb.$phpEx?action=file_manage&mode=edit&file_id={$file_data['file_id']}" ), ! 'U_FILE_DELETE' => append_sid( "admin_pafiledb.$phpEx?action=file_manage&mode=delete&file_id={$file_data['file_id']}" ), ! 'U_FILE_APPROVE' => append_sid( "admin_pafiledb.$phpEx?action=file_manage&mode=$approve_mode&file_id={$file_data['file_id']}" ), 'L_APPROVE' => ( $file_data['file_approved'] ) ? $lang['Unapprove'] : $lang['Approve'] )); *************** *** 566,570 **** $file_website = ''; $file_posticons = $pafiledb_functions->post_icons(); ! $file_cat_list = $pafiledb->generate_jumpbox( 0, 0, '', true ); $file_license = $pafiledb_functions->license_list(); $pin_checked_yes = ''; --- 565,569 ---- $file_website = ''; $file_posticons = $pafiledb_functions->post_icons(); ! $file_cat_list = $this->generate_jumpbox( 0, 0, '', true ); $file_license = $pafiledb_functions->license_list(); $pin_checked_yes = ''; *************** *** 597,601 **** $file_website = $file_info['file_docsurl']; $file_posticons = $pafiledb_functions->post_icons( $file_info['file_posticon'] ); ! $file_cat_list = $pafiledb->generate_jumpbox( 0, 0, array( $file_info['file_catid'] => 1 ), true ); $file_license = $pafiledb_functions->license_list( $file_info['file_license'] ); $pin_checked_yes = ( $file_info['file_pin'] ) ? ' checked' : ''; --- 596,600 ---- $file_website = $file_info['file_docsurl']; $file_posticons = $pafiledb_functions->post_icons( $file_info['file_posticon'] ); ! $file_cat_list = $this->generate_jumpbox( 0, 0, array( $file_info['file_catid'] => 1 ), true ); $file_license = $pafiledb_functions->license_list( $file_info['file_license'] ); $pin_checked_yes = ( $file_info['file_pin'] ) ? ' checked' : ''; *************** *** 614,618 **** $pafiledb_template->assign_vars( array( ! 'U_MIRRORS_PAGE' => append_sid( "admin_pa_file.$phpEx?mode=mirrors&file_id=$file_id" ), 'ADD_MIRRORS' => $mirrors, --- 613,617 ---- $pafiledb_template->assign_vars( array( ! 'U_MIRRORS_PAGE' => append_sid( "admin_pafiledb.$phpEx?action=file_manage&mode=mirrors&file_id=$file_id" ), 'ADD_MIRRORS' => $mirrors, *************** *** 698,702 **** if ( !empty( $mirror_ids ) ) { ! $pafiledb->delete_mirror( $mirror_ids ); } } --- 697,701 ---- if ( !empty( $mirror_ids ) ) { ! $this->delete_mirror( $mirror_ids ); } } *************** *** 711,715 **** $mirror_location = ( !empty( $_POST['new_location'] ) ) ? $_POST['new_location'] : ''; ! $pafiledb->mirror_add_update( $file_id, $file_upload, $file_remote_url, $file_local, $file_realname, $file_size, $file_type, $mirror_location ); } --- 710,714 ---- $mirror_location = ( !empty( $_POST['new_location'] ) ) ? $_POST['new_location'] : ''; ! $this->mirror_add_update( $file_id, $file_upload, $file_remote_url, $file_local, $file_realname, $file_size, $file_type, $mirror_location ); } *************** *** 755,759 **** $mirror_location = ( !empty( $mirror_data['location'] ) ) ? $mirror_data['location'] : ''; ! $pafiledb->mirror_add_update( $file_id, $file_upload, $file_remote_url, $file_local, $file_realname, $file_size, $file_type, $mirror_location, $mirror_id ); } --- 754,758 ---- $mirror_location = ( !empty( $mirror_data['location'] ) ) ? $mirror_data['location'] : ''; ! $this->mirror_add_update( $file_id, $file_upload, $file_remote_url, $file_local, $file_realname, $file_size, $file_type, $mirror_location, $mirror_id ); } *************** *** 806,819 **** } ! $pafiledb_template->assign_vars( array( 'ERROR' => ( sizeof( $pafiledb->error ) ) ? implode( '<br />', $pafiledb->error ) : '' ) ); // // Output // - include( $mx_root_path . 'admin/page_header_admin.' . $phpEx ); $pafiledb_template->display( 'admin' ); ! $pafiledb->_pafiledb(); $pafiledb_cache->unload(); - include( $mx_root_path . 'admin/page_footer_admin.' . $phpEx ); } } --- 805,816 ---- } ! $pafiledb_template->assign_vars( array( 'ERROR' => ( sizeof( $this->error ) ) ? implode( '<br />', $this->error ) : '' ) ); // // Output // $pafiledb_template->display( 'admin' ); ! $this->_pafiledb(); $pafiledb_cache->unload(); } } Index: admin_ug_auth_manage.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/pafiledb/admin/admin_ug_auth_manage.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** admin_ug_auth_manage.php 8 Jul 2006 10:23:35 -0000 1.1 --- admin_ug_auth_manage.php 8 Jul 2006 16:28:46 -0000 1.2 *************** *** 18,22 **** function main( $action ) { ! global $db, $images, $template, $lang, $phpEx, $pafiledb_functions, $pafiledb_cache, $pafiledb_config, $phpbb_root_path, $module_root_path, $mx_root_path, $mx_request_vars; // --- 18,23 ---- function main( $action ) { ! global $db, $images, $template, $pafiledb_template, $lang, $phpEx, $pafiledb_functions, $pafiledb_cache, $pafiledb_config, $phpbb_root_path, $module_root_path, $mx_root_path, $mx_request_vars; ! global $cat_auth_fields, $cat_auth_const, $cat_auth_levels; // *************** *** 62,70 **** $permissions_menu = array( ! append_sid( "admin_pa_catauth.$phpEx" ) => $lang['Cat_Permissions'], ! append_sid( "admin_pa_ug_auth.$phpEx?mode=user" ) => $lang['User_Permissions'], ! append_sid( "admin_pa_ug_auth.$phpEx?mode=group" ) => $lang['Group_Permissions'], ! append_sid( "admin_pa_ug_auth.$phpEx?mode=global_user" ) => $lang['User_Global_Permissions'], ! append_sid( "admin_pa_ug_auth.$phpEx?mode=global_group" ) => $lang['Group_Global_Permissions'] ); --- 63,71 ---- $permissions_menu = array( ! append_sid( "admin_pafiledb.$phpEx?action=catauth_manage" ) => $lang['Cat_Permissions'], ! append_sid( "admin_pafiledb.$phpEx?action=ug_auth_manage&mode=user" ) => $lang['User_Permissions'], ! append_sid( "admin_pafiledb.$phpEx?action=ug_auth_manage&mode=group" ) => $lang['Group_Permissions'], ! append_sid( "admin_pafiledb.$phpEx?action=ug_auth_manage&mode=global_user" ) => $lang['User_Global_Permissions'], ! append_sid( "admin_pafiledb.$phpEx?action=ug_auth_manage&mode=global_group" ) => $lang['Group_Global_Permissions'] ); *************** *** 125,129 **** $update_mod_status = array(); ! foreach( $pafiledb->cat_rowset as $cat_id => $cat_data ) { if ( ( isset( $auth_access[$cat_id]['auth_mod'] ) && $change_mod_list[$cat_id]['auth_mod'] != $auth_access[$cat_id]['auth_mod'] ) || --- 126,130 ---- $update_mod_status = array(); ! foreach( $this->cat_rowset as $cat_id => $cat_data ) { if ( ( isset( $auth_access[$cat_id]['auth_mod'] ) && $change_mod_list[$cat_id]['auth_mod'] != $auth_access[$cat_id]['auth_mod'] ) || *************** *** 240,244 **** $l_auth_return = ( $mode == 'user' ) ? $lang['Click_return_userauth'] : $lang['Click_return_groupauth']; ! $message = $lang['Auth_updated'] . '<br /><br />' . sprintf( $l_auth_return, '<a href="' . append_sid( "admin_pa_ug_auth.$phpEx?mode=$mode" ) . '">', '</a>' ) . '<br /><br />' . sprintf( $lang['Click_return_admin_index'], '<a href="' . append_sid( $mx_root_path . "admin/index.$phpEx?pane=right" ) . '">', '</a>' ); mx_message_die( GENERAL_MESSAGE, $message ); } --- 241,245 ---- $l_auth_return = ( $mode == 'user' ) ? $lang['Click_return_userauth'] : $lang['Click_return_groupauth']; ! $message = $lang['Auth_updated'] . '<br /><br />' . sprintf( $l_auth_return, '<a href="' . append_sid( "admin_pafiledb.$phpEx?action=ug_auth_manage&mode=$mode" ) . '">', '</a>' ) . '<br /><br />' . sprintf( $lang['Click_return_admin_index'], '<a href="' . append_sid( $mx_root_path . "admin/index.$phpEx?pane=right" ) . '">', '</a>' ); mx_message_die( GENERAL_MESSAGE, $message ); } *************** *** 290,294 **** if ( $pafiledb_config[$auth_field] == AUTH_ACL && isset( $change_acl_list[$auth_field] ) ) { ! if ( ( !is_moderator( $group_id ) && ( isset( $auth_access[$auth_field] ) && $change_acl_list[$auth_field] != $auth_access[$auth_field] ) || ( !isset( $auth_access[$cat_id][$auth_field] ) && !empty( $change_acl_list[$auth_field] ) ) ) --- 291,295 ---- if ( $pafiledb_config[$auth_field] == AUTH_ACL && isset( $change_acl_list[$auth_field] ) ) { ! if ( ( !$this->is_moderator( $group_id ) && ( isset( $auth_access[$auth_field] ) && $change_acl_list[$auth_field] != $auth_access[$auth_field] ) || ( !isset( $auth_access[$cat_id][$auth_field] ) && !empty( $change_acl_list[$auth_field] ) ) ) *************** *** 310,314 **** } } ! else if ( ( !is_moderator( $auth_access['group_id'] ) && ( isset( $auth_access[$auth_field] ) && $change_acl_list[$auth_field] == $auth_access[$auth_field] ) ) && $global_auth_action == 'delete' ) { --- 311,315 ---- } } ! else if ( ( !$this->is_moderator( $auth_access['group_id'] ) && ( isset( $auth_access[$auth_field] ) && $change_acl_list[$auth_field] == $auth_access[$auth_field] ) ) && $global_auth_action == 'delete' ) { *************** *** 370,374 **** $l_auth_return = ( $mode == 'global_user' ) ? $lang['Click_return_userauth'] : $lang['Click_return_groupauth']; ! $message = $lang['Auth_updated'] . '<br /><br />' . sprintf( $l_auth_return, '<a href="' . append_sid( "admin_pa_ug_auth.$phpEx?mode=$mode" ) . '">', '</a>' ) . '<br /><br />' . sprintf( $lang['Click_return_admin_index'], '<a href="' . append_sid( $mx_root_path . "admin/index.$phpEx?pane=right" ) . '">', '</a>' ); mx_message_die( GENERAL_MESSAGE, $message ); } --- 371,375 ---- $l_auth_return = ( $mode == 'global_user' ) ? $lang['Click_return_userauth'] : $lang['Click_return_groupauth']; ! $message = $lang['Auth_updated'] . '<br /><br />' . sprintf( $l_auth_return, '<a href="' . append_sid( "admin_pafiledb.$phpEx?action=ug_auth_manage&mode=$mode" ) . '">', '</a>' ) . '<br /><br />' . sprintf( $lang['Click_return_admin_index'], '<a href="' . append_sid( $mx_root_path . "admin/index.$phpEx?pane=right" ) . '">', '</a>' ); mx_message_die( GENERAL_MESSAGE, $message ); } *************** *** 417,421 **** $is_admin = ( $mode == 'user' ) ? ( ( $ug_info[0]['user_level'] == ADMIN && $ug_info[0]['user_id'] != ANONYMOUS ) ? 1 : 0 ) : 0; ! foreach( $pafiledb->cat_rowset as $cat_id => $cat_data ) { for( $j = 0; $j < count( $cat_auth_fields ); $j++ ) --- 418,422 ---- $is_admin = ( $mode == 'user' ) ? ( ( $ug_info[0]['user_level'] == ADMIN && $ug_info[0]['user_id'] != ANONYMOUS ) ? 1 : 0 ) : 0; ! foreach( $this->cat_rowset as $cat_id => $cat_data ) { for( $j = 0; $j < count( $cat_auth_fields ); $j++ ) *************** *** 432,441 **** case AUTH_ACL: ! $auth_ug[$cat_id][$key] = ( !empty( $auth_access_count[$cat_id] ) ) ? $pafiledb->auth_check_user( AUTH_ACL, $key, $auth_access[$cat_id], $is_admin ) : 0; $auth_field_acl[$cat_id][$key] = $auth_ug[$cat_id][$key]; break; case AUTH_MOD: ! $auth_ug[$cat_id][$key] = ( !empty( $auth_access_count[$cat_id] ) ) ? $pafiledb->auth_check_user( AUTH_MOD, $key, $auth_access[$cat_id], $is_admin ) : 0; break; --- 433,442 ---- case AUTH_ACL: ! $auth_ug[$cat_id][$key] = ( !empty( $auth_access_count[$cat_id] ) ) ? $this->auth_check_user( AUTH_ACL, $key, $auth_access[$cat_id], $is_admin ) : 0; $auth_field_acl[$cat_id][$key] = $auth_ug[$cat_id][$key]; break; case AUTH_MOD: ! $auth_ug[$cat_id][$key] = ( !empty( $auth_access_count[$cat_id] ) ) ? $this->auth_check_user( AUTH_MOD, $key, $auth_access[$cat_id], $is_admin ) : 0; break; *************** *** 452,456 **** // Is user a moderator? ! $auth_ug[$cat_id]['auth_mod'] = ( !empty( $auth_access_count[$cat_id] ) ) ? $pafiledb->auth_check_user( AUTH_MOD, 'auth_mod', $auth_access[$cat_id], 0 ) : 0; } --- 453,457 ---- // Is user a moderator? ! $auth_ug[$cat_id]['auth_mod'] = ( !empty( $auth_access_count[$cat_id] ) ) ? $this->auth_check_user( AUTH_MOD, 'auth_mod', $auth_access[$cat_id], 0 ) : 0; } *************** *** 464,468 **** $field_name = $cat_auth_fields[$k]; ! if ( $pafiledb->cat_rowset[$cat_id][$field_name] == AUTH_ACL ) { $optionlist_acl_adv[$cat_id][$k] = '<select name="private_' . $field_name . '[' . $cat_id . ']">'; --- 465,469 ---- $field_name = $cat_auth_fields[$k]; ! if ( $this->cat_rowset[$cat_id][$field_name] == AUTH_ACL ) { $optionlist_acl_adv[$cat_id][$k] = '<select name="private_' . $field_name . '[' . $cat_id . ']">'; *************** *** 499,503 **** $optionlist_mod[$cat_id] .= '</select>'; } ! admin_display_cat_auth_ug(); if ( $mode == 'user' ) --- 500,504 ---- $optionlist_mod[$cat_id] .= '</select>'; } ! $this->admin_display_cat_auth_ug(); if ( $mode == 'user' ) *************** *** 528,532 **** $ug = ( $mode == 'user' ) ? 'group&' . POST_GROUPS_URL : 'user&' . POST_USERS_URL; ! $t_usergroup_list .= ( ( $t_usergroup_list != '' ) ? ', ' : '' ) . '<a href="' . append_sid( "admin_pa_ug_auth.$phpEx?mode=$ug=" . $id[$i] ) . '">' . $name[$i] . '</a>'; } } --- 529,533 ---- $ug = ( $mode == 'user' ) ? 'group&' . POST_GROUPS_URL : 'user&' . POST_USERS_URL; ! $t_usergroup_list .= ( ( $t_usergroup_list != '' ) ? ', ' : '' ) . '<a href="' . append_sid( "admin_pafiledb.$phpEx?action=ug_auth_manage&mode=$ug=" . $id[$i] ) . '">' . $name[$i] . '</a>'; } } *************** *** 582,589 **** 'L_CAT' => $lang['Category'], ! 'U_USER_OR_GROUP' => append_sid( "admin_pa_ug_auth.$phpEx" ), 'S_COLUMN_SPAN' => $s_column_span + 2, ! 'S_AUTH_ACTION' => append_sid( "admin_pa_ug_auth.$phpEx" ), 'S_HIDDEN_FIELDS' => $s_hidden_fields )); --- 583,590 ---- 'L_CAT' => $lang['Category'], ! 'U_USER_OR_GROUP' => append_sid( "admin_pafiledb.$phpEx?action=ug_auth_manage" ), 'S_COLUMN_SPAN' => $s_column_span + 2, ! 'S_AUTH_ACTION' => append_sid( "admin_pafiledb.$phpEx?action=ug_auth_manage" ), 'S_HIDDEN_FIELDS' => $s_hidden_fields )); *************** *** 662,671 **** case AUTH_ACL: ! $auth_ug[$key] = ( !empty( $auth_access_count ) ) ? global_auth_check_user( AUTH_ACL, $key, $auth_access, $is_admin ) : 0; $auth_field_acl[$key] = $auth_ug[$key]; break; case AUTH_MOD: ! $auth_ug[$key] = ( !empty( $auth_access_count ) ) ? global_auth_check_user( AUTH_MOD, $key, $auth_access, $is_admin ) : 0; break; --- 663,672 ---- case AUTH_ACL: ! $auth_ug[$key] = ( !empty( $auth_access_count ) ) ? $this->global_auth_check_user( AUTH_ACL, $key, $auth_access, $is_admin ) : 0; $auth_field_acl[$key] = $auth_ug[$key]; break; case AUTH_MOD: ! $auth_ug[$key] = ( !empty( $auth_access_count ) ) ? $this->global_auth_check_user( AUTH_MOD, $key, $auth_access, $is_admin ) : 0; break; *************** *** 688,692 **** $optionlist_acl_adv[$k] = '<select name="private_' . $field_name . '">'; ! if ( isset( $auth_field_acl[$field_name] ) && !( $is_admin || is_moderator( $group_id ) ) ) { if ( !$auth_field_acl[$field_name] ) --- 689,693 ---- $optionlist_acl_adv[$k] = '<select name="private_' . $field_name . '">'; ! if ( isset( $auth_field_acl[$field_name] ) && !( $is_admin || $this->is_moderator( $group_id ) ) ) { if ( !$auth_field_acl[$field_name] ) *************** *** 701,705 **** else { ! if ( $is_admin || is_moderator( $group_id ) ) { $optionlist_acl_adv[$k] .= '<option value="1">' . $lang['ON'] . '</option>'; --- 702,706 ---- else { ! if ( $is_admin || $this->is_moderator( $group_id ) ) { $optionlist_acl_adv[$k] .= '<option value="1">' . $lang['ON'] . '</option>'; *************** *** 720,724 **** 'PRE' => '', ! 'U_CAT' => append_sid( "admin_pa_settings.$phpEx" ) )); --- 721,725 ---- 'PRE' => '', ! 'U_CAT' => append_sid( "admin_pafiledb.$phpEx?action=settings" ) )); *************** *** 755,759 **** $ug = ( $mode == 'global_user' ) ? 'global_group&' . POST_GROUPS_URL : 'global_user&' . POST_USERS_URL; ! $t_usergroup_list .= ( ( $t_usergroup_list != '' ) ? ', ' : '' ) . '<a href="' . append_sid( "admin_pa_ug_auth.$phpEx?mode=$ug=" . $id[$i] ) . '">' . $name[$i] . '</a>'; } } --- 756,760 ---- $ug = ( $mode == 'global_user' ) ? 'global_group&' . POST_GROUPS_URL : 'global_user&' . POST_USERS_URL; ! $t_usergroup_list .= ( ( $t_usergroup_list != '' ) ? ', ' : '' ) . '<a href="' . append_sid( "admin_pafiledb.$phpEx?action=ug_auth_manage&mode=$ug=" . $id[$i] ) . '">' . $name[$i] . '</a>'; } } *************** *** 808,815 **** 'L_CAT' => ( $mode == 'global_user' ) ? $lang['User_Global_Permissions'] : $lang['Group_Global_Permissions'], ! 'U_USER_OR_GROUP' => append_sid( "admin_pa_ug_auth.$phpEx" ), 'S_COLUMN_SPAN' => $s_column_span + 1, ! 'S_AUTH_ACTION' => append_sid( "admin_pa_ug_auth.$phpEx" ), 'S_HIDDEN_FIELDS' => $s_hidden_fields )); --- 809,816 ---- 'L_CAT' => ( $mode == 'global_user' ) ? $lang['User_Global_Permissions'] : $lang['Group_Global_Permissions'], ! 'U_USER_OR_GROUP' => append_sid( "admin_pafiledb.$phpEx?action=ug_auth_manage" ), 'S_COLUMN_SPAN' => $s_column_span + 1, ! 'S_AUTH_ACTION' => append_sid( "admin_pafiledb.$phpEx?action=ug_auth_manage" ), 'S_HIDDEN_FIELDS' => $s_hidden_fields )); *************** *** 866,870 **** 'S_HIDDEN_FIELDS' => $s_hidden_fields, ! 'S_' . $l_type . '_ACTION' => append_sid( "admin_pa_ug_auth.$phpEx" ) )); } --- 867,871 ---- 'S_HIDDEN_FIELDS' => $s_hidden_fields, ! 'S_' . $l_type . '_ACTION' => append_sid( "admin_pafiledb.$phpEx?action=ug_auth_manage" ) )); } *************** *** 872,876 **** $pafiledb_template->display( 'body' ); ! $pafiledb->_pafiledb(); $pafiledb_cache->unload(); } --- 873,877 ---- $pafiledb_template->display( 'body' ); ! $this->_pafiledb(); $pafiledb_cache->unload(); } Index: admin_custom_manage.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/pafiledb/admin/admin_custom_manage.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** admin_custom_manage.php 8 Jul 2006 10:23:34 -0000 1.1 --- admin_custom_manage.php 8 Jul 2006 16:28:46 -0000 1.2 *************** *** 18,22 **** function main( $action ) { ! global $db, $images, $template, $lang, $phpEx, $pafiledb_functions, $pafiledb_cache, $pafiledb_config, $phpbb_root_path, $module_root_path, $mx_root_path, $mx_request_vars; // --- 18,22 ---- function main( $action ) { ! global $db, $images, $template, $pafiledb_template, $lang, $phpEx, $pafiledb_functions, $pafiledb_cache, $pafiledb_config, $phpbb_root_path, $module_root_path, $mx_root_path, $mx_request_vars; // *************** *** 24,27 **** --- 24,28 ---- // include_once( $phpbb_root_path . 'includes/functions_search.' . $phpEx ); + include_once( $module_root_path . 'pafiledb/includes/functions_field.' . $phpEx ); // *************** *** 65,69 **** $custom_field->update_add_field( $field_type ); ! $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 ); } --- 66,70 ---- $custom_field->update_add_field( $field_type ); ! $message = $lang['Fieldadded'] . '<br /><br />' . sprintf( $lang['Click_return'], '<a href="' . append_sid( 'admin_pafiledb.' . $phpEx . '?action=custom_manage' ) . '">', '</a>' ) . '<br /><br />' . sprintf( $lang['Click_return_admin_index'], '<a href="' . append_sid( 'index.' . $phpEx . '?pane=right' ) . '">', '</a>' ); mx_message_die( GENERAL_MESSAGE, $message ); } *************** *** 72,76 **** $custom_field->update_add_field( $field_type, $field_id ); ! $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 ); } --- 73,77 ---- $custom_field->update_add_field( $field_type, $field_id ); ! $message = $lang['Fieldedited'] . '<br /><br />' . sprintf( $lang['Click_return'], '<a href="' . append_sid( 'admin_pafiledb.' . $phpEx . '?action=custom_manage' ) . '">', '</a>' ) . '<br /><br />' . sprintf( $lang['Click_return_admin_index'], '<a href="' . append_sid( 'index.' . $phpEx . '?pane=right' ) . '">', '</a>' ); mx_message_die( GENERAL_MESSAGE, $message ); } *************** *** 82,86 **** } ! $message = $lang['Fieldsdel'] . '<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 ); } --- 83,87 ---- } ! $message = $lang['Fieldsdel'] . '<br /><br />' . sprintf( $lang['Click_return'], '<a href="' . append_sid( 'admin_pafiledb.' . $phpEx . '?action=custom_manage' ) . '">', '</a>' ) . '<br /><br />' . sprintf( $lang['Click_return_admin_index'], '<a href="' . append_sid( 'index.' . $phpEx . '?pane=right' ) . '">', '</a>' ); mx_message_die( GENERAL_MESSAGE, $message ); } *************** *** 134,138 **** 'S_HIDDEN_FIELDS' => $s_hidden_fields, ! 'S_FIELD_ACTION' => append_sid( "admin_pa_custom.$phpEx" ) )); --- 135,139 ---- 'S_HIDDEN_FIELDS' => $s_hidden_fields, ! 'S_FIELD_ACTION' => append_sid( "admin_pafiledb.$phpEx?action=custom_manage" ) )); *************** *** 193,197 **** // Output $pafiledb_template->display( 'admin' ); ! $pafiledb->_pafiledb(); $pafiledb_cache->unload(); } --- 194,198 ---- // Output $pafiledb_template->display( 'admin' ); ! $this->_pafiledb(); $pafiledb_cache->unload(); } Index: admin_settings.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/pafiledb/admin/admin_settings.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** admin_settings.php 8 Jul 2006 10:23:35 -0000 1.1 --- admin_settings.php 8 Jul 2006 16:28:46 -0000 1.2 *************** *** 81,85 **** { $pafiledb_cache->unload(); ! $message = $lang['Settings_changed'] . '<br /><br />' . sprintf( $lang['Click_return'], '<a href="' . append_sid( "admin_pa_settings.$phpEx" ) . '">', '</a>' ) . '<br /><br />' . sprintf( $lang['Click_return_admin_index'], '<a href="' . append_sid( $mx_root_path . "admin/index.$phpEx?pane=right" ) . '">', '</a>' ); mx_message_die( GENERAL_MESSAGE, $message ); } --- 81,85 ---- { $pafiledb_cache->unload(); ! $message = $lang['Settings_changed'] . '<br /><br />' . sprintf( $lang['Click_return'], '<a href="' . append_sid( "admin_pafiledb.$phpEx?action=settings" ) . '">', '</a>' ) . '<br /><br />' . sprintf( $lang['Click_return_admin_index'], '<a href="' . append_sid( $mx_root_path . "admin/index.$phpEx?pane=right" ) . '">', '</a>' ); mx_message_die( GENERAL_MESSAGE, $message ); } *************** *** 266,270 **** $template->assign_vars( array( ! 'S_SETTINGS_ACTION' => append_sid( "admin_pa_settings.$phpEx" ), 'L_CONFIGURATION_TITLE' => $lang['Panel_config_title'], --- 266,270 ---- $template->assign_vars( array( ! 'S_SETTINGS_ACTION' => append_sid( "admin_pafiledb.$phpEx?action=settings" ), 'L_CONFIGURATION_TITLE' => $lang['Panel_config_title'], *************** *** 325,329 **** 'L_MAX_FILE_SIZE_INFO' => $lang['Max_filesize_explain'], 'MAX_FILE_SIZE' => $max_file_size, ! 'S_FILESIZE' => pa_size_select( 'max_size', $size ), 'L_FORBIDDEN_EXTENSIONS' => $lang['Forbidden_extensions'], --- 325,329 ---- 'L_MAX_FILE_SIZE_INFO' => $lang['Max_filesize_explain'], 'MAX_FILE_SIZE' => $max_file_size, ! 'S_FILESIZE' => $this->pa_size_select( 'max_size', $size ), 'L_FORBIDDEN_EXTENSIONS' => $lang['Forbidden_extensions'], *************** *** 385,389 **** 'L_FORUM_ID' => $lang['Forum_id'], 'L_FORUM_ID_EXPLAIN' => $lang['Forum_id_explain'], ! 'FORUM_LIST' => get_forums( $comments_forum_id, false, 'comments_forum_id' ), 'L_AUTOGENERATE_COMMENTS' => $lang['Autogenerate_comments'], --- 385,389 ---- 'L_FORUM_ID' => $lang['Forum_id'], 'L_FORUM_ID_EXPLAIN' => $lang['Forum_id_explain'], ! 'FORUM_LIST' => $this->get_forums( $comments_forum_id, false, 'comments_forum_id' ), 'L_AUTOGENERATE_COMMENTS' => $lang['Autogenerate_comments'], Index: admin_fchecker_manage.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/pafiledb/admin/admin_fchecker_manage.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** admin_fchecker_manage.php 8 Jul 2006 10:23:35 -0000 1.1 --- admin_fchecker_manage.php 8 Jul 2006 16:28:46 -0000 1.2 *************** *** 30,36 **** $html_path = PORTAL_URL . $module_root_path . 'pafiledb/uploads/'; ! if ( isset( $HTTP_GET_VARS['safety'] ) || isset( $HTTP_POST_VARS['safety'] ) ) { ! $safety = ( isset( $HTTP_POST_VARS['safety'] ) ) ? intval( $HTTP_POST_VARS['safety'] ) : intval( $HTTP_GET_VARS['safety'] ); } --- 30,36 ---- $html_path = PORTAL_URL . $module_root_path . 'pafiledb/uploads/'; ! if ( isset( $_GET['safety'] ) || isset( $_POST['safety'] ) ) { ! $safety = ( isset( $_POST['safety'] ) ) ? intval( $_POST['safety'] ) : intval( $_GET['safety'] ); } *************** *** 167,173 **** // Output - include( $mx_root_path . 'admin/page_header_admin.' . $phpEx ); $template->pparse( 'admin' ); - include( $mx_root_path . 'admin/page_footer_admin.' . $phpEx ); } } --- 167,171 ---- Index: admin_catauth_manage.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/pafiledb/admin/admin_catauth_manage.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** admin_catauth_manage.php 8 Jul 2006 10:23:34 -0000 1.1 --- admin_catauth_manage.php 8 Jul 2006 16:28:46 -0000 1.2 *************** *** 18,22 **** function main( $action ) { ! global $db, $images, $template, $lang, $phpEx, $pafiledb_functions, $pafiledb_cache, $pafiledb_config, $phpbb_root_path, $module_root_path, $mx_root_path, $mx_request_vars; // --- 18,23 ---- function main( $action ) { ! global $db, $images, $template, $pafiledb_template, $lang, $phpEx, $pafiledb_functions, $pafiledb_cache, $pafiledb_config, $phpbb_root_path, $module_root_path, $mx_root_path, $mx_request_vars; ! global $cat_auth_fields, $cat_auth_const, $cat_auth_levels; // *************** *** 93,97 **** } ! $message = $lang['Category_auth_updated'] . '<br /><br />' . sprintf( $lang['Click_return_catauth'], '<a href="' . append_sid( "admin_pa_catauth.$phpEx" ) . '">', "</a>" ); mx_message_die( GENERAL_MESSAGE, $message ); } --- 94,98 ---- } ! $message = $lang['Category_auth_updated'] . '<br /><br />' . sprintf( $lang['Click_return_catauth'], '<a href="' . append_sid( "admin_pafiledb.$phpEx?action=catauth_manage" ) . '">', "</a>" ); mx_message_die( GENERAL_MESSAGE, $message ); } *************** *** 104,112 **** $permissions_menu = array( ! append_sid( "admin_pa_catauth.$phpEx" ) => $lang['Cat_Permissions'], ! append_sid( "admin_pa_ug_auth.$phpEx?mode=user" ) => $lang['User_Permissions'], ! append_sid( "admin_pa_ug_auth.$phpEx?mode=group" ) => $lang['Group_Permissions'], ! append_sid( "admin_pa_ug_auth.$phpEx?mode=global_user" ) => $lang['User_Global_Permissions'], ! append_sid( "admin_pa_ug_auth.$phpEx?mode=global_group" ) => $lang['Group_Global_Permissions'] ); --- 105,113 ---- $permissions_menu = array( ! append_sid( "admin_pafiledb.$phpEx?action=catauth_manage" ) => $lang['Cat_Permissions'], ! append_sid( "admin_pafiledb.$phpEx?action=ug_auth_manage&mode=user" ) => $lang['User_Permissions'], ! append_sid( "admin_pafiledb.$phpEx?action=ug_auth_manage&mode=group" ) => $lang['Group_Permissions'], ! append_sid( "admin_pafiledb.$phpEx?action=ug_auth_manage&mode=global_user" ) => $lang['User_Global_Permissions'], ! append_sid( "admin_pafiledb.$phpEx?action=ug_auth_manage&mode=global_group" ) => $lang['Group_Global_Permissions'] ); *************** *** 131,135 **** if ( empty( $cat_id ) ) { ! admin_display_cat_auth( $cat_parent ); $cat_name = ''; } --- 132,136 ---- if ( empty( $cat_id ) ) { ! $this->admin_display_cat_auth( $cat_parent ); $cat_name = ''; } *************** *** 137,143 **** { $pafiledb_template->assign_block_vars( 'cat_row', array( ! 'CATEGORY_NAME' => $pafiledb->cat_rowset[$cat_id]['cat_name'], ! 'IS_HIGHER_CAT' => ( $pafiledb->cat_rowset[$cat_id] ) ? false : true, ! 'U_CAT' => append_sid( "admin_pa_catauth.$phpEx?cat_parent={$pafiledb->cat_rowset[$cat_id]['cat_parent']}" ) )); --- 138,144 ---- { $pafiledb_template->assign_block_vars( 'cat_row', array( ! 'CATEGORY_NAME' => $this->cat_rowset[$cat_id]['cat_name'], ! 'IS_HIGHER_CAT' => ( $this->cat_rowset[$cat_id] ) ? false : true, ! 'U_CAT' => append_sid( "admin_pafiledb.$phpEx?action=catauth_manage&cat_parent={$this->cat_rowset[$cat_id]['cat_parent']}" ) )); *************** *** 148,152 **** for( $k = 0; $k < count( $cat_auth_levels ); $k++ ) { ! $selected = ( $pafiledb->cat_rowset[$cat_id][$cat_auth_fields[$j]] == $cat_auth_const[$k] ) ? ' selected="selected"' : ''; $custom_auth[$j] .= '<option value="' . $cat_auth_const[$k] . '"' . $selected . '>' . $lang['Category_' . $cat_auth_levels[$k]] . '</option>'; } --- 149,153 ---- for( $k = 0; $k < count( $cat_auth_levels ); $k++ ) { ! $selected = ( $this->cat_rowset[$cat_id][$cat_auth_fields[$j]] == $cat_auth_const[$k] ) ? ' selected="selected"' : ''; $custom_auth[$j] .= '<option value="' . $cat_auth_const[$k] . '"' . $selected . '>' . $lang['Category_' . $cat_auth_levels[$k]] . '</option>'; } *************** *** 157,161 **** $s_hidden_fields = '<input type="hidden" name="cat_id" value="' . $cat_id . '">'; ! $cat_name = $pafiledb->cat_rowset[$cat_id]['cat_name']; } --- 158,162 ---- $s_hidden_fields = '<input type="hidden" name="cat_id" value="' . $cat_id . '">'; ! $cat_name = $this->cat_rowset[$cat_id]['cat_name']; } *************** *** 171,175 **** 'L_RESET' => $lang['Reset'], ! 'S_CATAUTH_ACTION' => append_sid( "admin_pa_catauth.$phpEx" ), 'S_COLUMN_SPAN' => $s_column_span, 'S_HIDDEN_FIELDS' => $s_hidden_fields --- 172,176 ---- 'L_RESET' => $lang['Reset'], ! 'S_CATAUTH_ACTION' => append_sid( "admin_pafiledb.$phpEx?action=catauth_manage" ), 'S_COLUMN_SPAN' => $s_column_span, 'S_HIDDEN_FIELDS' => $s_hidden_fields *************** *** 178,182 **** // Output $pafiledb_template->display( 'body' ); ! $pafiledb->_pafiledb(); $pafiledb_cache->unload(); } --- 179,183 ---- // Output $pafiledb_template->display( 'body' ); ! $this->_pafiledb(); $pafiledb_cache->unload(); } Index: admin_license_manage.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/pafiledb/admin/admin_license_manage.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** admin_license_manage.php 8 Jul 2006 10:23:35 -0000 1.1 --- admin_license_manage.php 8 Jul 2006 16:28:46 -0000 1.2 *************** *** 25,31 **** include_once( $phpbb_root_path . 'includes/functions_search.' . $phpEx ); ! if ( isset( $HTTP_GET_VARS['license'] ) || isset( $HTTP_POST_VARS['license'] ) ) { ! $license = ( isset( $HTTP_POST_VARS['license'] ) ) ? $HTTP_POST_VARS['license'] : $HTTP_GET_VARS['license']; switch ( $license ) --- 25,31 ---- include_once( $phpbb_root_path . 'includes/functions_search.' . $phpEx ); ! if ( isset( $_GET['license'] ) || isset( $_POST['license'] ) ) { ! $license = ( isset( $_POST['license'] ) ) ? $_POST['license'] : $_GET['license']; switch ( $license ) *************** *** 35,48 **** $template->set_filenames( array( 'admin' => 'admin/pa_admin_license_add.tpl' ) ); ! if ( isset( $HTTP_GET_VARS['add'] ) || isset( $HTTP_POST_VARS['add'] ) ) { ! $add = ( isset( $HTTP_GET_VARS['add'] ) ) ? $HTTP_GET_VARS['add'] : $HTTP_POST_VARS['add']; } if ( $add == 'do' ) { ! if ( isset( $HTTP_GET_VARS['form'] ) || isset( $HTTP_POST_VARS['form'] ) ) { ! $form = ( isset( $HTTP_GET_VARS['form'] ) ) ? $HTTP_GET_VARS['form'] : $HTTP_POST_VARS['form']; } // $form['text'] = str_replace("\n", "<br>", $form['text']); --- 35,48 ---- $template->set_filenames( array( 'admin' => 'admin/pa_admin_license_add.tpl' ) ); ! if ( isset( $_GET['add'] ) || isset( $_POST['add'] ) ) { ! $add = ( isset( $_GET['add'] ) ) ? $_GET['add'] : $_POST['add']; } if ( $add == 'do' ) { ! if ( isset( $_GET['form'] ) || isset( $_POST['form'] ) ) { ! $form = ( isset( $_GET['form'] ) ) ? $_GET['form'] : $_POST['form']; } // $form['text'] = str_replace("\n", "<br>", $form['text']); *************** *** 54,58 **** } ! $message = $lang['Licenseadded'] . '<br /><br />' . sprintf( $lang['Click_return'], '<a href="' . append_sid( "admin_pa_license.$phpEx" ) . '">', '</a>' ) . '<br /><br />' . sprintf( $lang['Click_return_admin_index'], '<a href="' . append_sid( $mx_root_path . "admin/index.$phpEx?pane=right" ) . '">', '</a>' ); mx_message_die( GENERAL_MESSAGE, $message ); } --- 54,58 ---- } ! $message = $lang['Licenseadded'] . '<br /><br />' . sprintf( $lang['Click_return'], '<a href="' . append_sid( "admin_pafiledb.$phpEx?action=li... [truncated message content] |