Update of /cvsroot/mxbb/mx_pafiledb/admin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5653/modules/mx_pafiledb/admin Modified Files: admin_pa_catauth.php admin_pa_category.php admin_pa_custom.php admin_pa_file.php admin_pa_settings.php admin_pa_ug_auth.php mx_module_defs.php Log Message: in progress commit for mx_pafiledb Index: admin_pa_category.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/admin/admin_pa_category.php,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** admin_pa_category.php 1 Oct 2005 14:15:19 -0000 1.12 --- admin_pa_category.php 8 Dec 2005 15:15:11 -0000 1.13 *************** *** 134,151 **** case 'sync': default: - /* - orig - $template_file = 'admin/pa_admin_cat.tpl'; - */ - // MX $template_file = 'admin/pa_admin_cat.tpl'; ! $l_title = $lang['Cat_manage_title']; ! $l_explain = $lang['Catexplain']; $s_hidden_fields = '<input type="hidden" name="mode" value="add">'; break; case 'add': - /* - orig - $template_file = 'admin/pa_admin_cat_edit.tpl'; - */ - // MX $template_file = 'admin/pa_admin_cat_edit.tpl'; $l_title = $lang['Acattitle']; --- 134,143 ---- case 'sync': default: $template_file = 'admin/pa_admin_cat.tpl'; ! $l_title = $lang['Panel_cat_title']; ! $l_explain = $lang['Panel_cat_explain']; $s_hidden_fields = '<input type="hidden" name="mode" value="add">'; break; case 'add': $template_file = 'admin/pa_admin_cat_edit.tpl'; $l_title = $lang['Acattitle']; *************** *** 154,161 **** break; case 'edit': - /* - orig - $template_file = 'admin/pa_admin_cat_edit.tpl'; - */ - // MX $template_file = 'admin/pa_admin_cat_edit.tpl'; $l_title = $lang['Ecattitle']; --- 146,149 ---- *************** *** 165,172 **** break; case 'delete': - /* - orig - $template_file = 'admin/pa_admin_cat_delete.tpl'; - */ - // MX $template_file = 'admin/pa_admin_cat_delete.tpl'; $l_title = $lang['Dcattitle']; --- 153,156 ---- *************** *** 179,200 **** ); ! $pafiledb_template->assign_vars( array( 'L_CAT_TITLE' => $l_title, ! '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" ) ) ! ); if ( $mode == '' || $mode == 'cat_order' || $mode == 'sync' || $mode == 'sync_all' ) { ! $pafiledb_template->assign_vars( array( 'L_CREATE_CATEGORY' => $lang['Create_category'], ! 'L_EDIT' => $lang['Edit'], ! 'L_DELETE' => $lang['Delete'], ! 'L_MOVE_UP' => $lang['Move_up'], ! 'L_MOVE_DOWN' => $lang['Move_down'], ! 'L_SUB_CAT' => $lang['Sub_category'], ! 'L_RESYNC' => $lang['Resync'] ) ! ); admin_cat_main( $cat_id ); } --- 163,186 ---- ); ! $pafiledb_template->assign_vars( array( ! 'L_CAT_TITLE' => $l_title, ! '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" ) ) ! ); if ( $mode == '' || $mode == 'cat_order' || $mode == 'sync' || $mode == 'sync_all' ) { ! $pafiledb_template->assign_vars( array( ! 'L_CREATE_CATEGORY' => $lang['Create_category'], ! 'L_EDIT' => $lang['Edit'], ! 'L_DELETE' => $lang['Delete'], ! 'L_MOVE_UP' => $lang['Move_up'], ! 'L_MOVE_DOWN' => $lang['Move_down'], ! 'L_SUB_CAT' => $lang['Sub_category'], ! 'L_RESYNC' => $lang['Resync'] ) ! ); admin_cat_main( $cat_id ); } *************** *** 211,224 **** $cat_list .= '<option value="0">' . $lang['None'] . '</option>'; } ! $cat_list .= ( !$_POST['cat_parent'] ) ? $pafiledb->jumpmenu_option() : $pafiledb->jumpmenu_option( 0, 0, array( $_POST['cat_parent'] => 1 ) ); $checked_yes = ( $_POST['cat_allow_file'] ) ? ' checked' : ''; $checked_no = ( !$_POST['cat_allow_file'] ) ? ' checked' : ''; - // MX Addon - $checked_comments_yes = ( $_POST['cat_allow_comments'] ) ? ' checked' : ''; - $checked_comments_no = ( !$_POST['cat_allow_comments'] ) ? ' checked' : ''; - $checked_ratings_yes = ( $_POST['cat_allow_ratings'] ) ? ' checked' : ''; - $checked_ratings_no = ( !$_POST['cat_allow_ratings'] ) ? ' checked' : ''; $cat_name = ( !empty( $_POST['cat_name'] ) ) ? $_POST['cat_name'] : ''; $cat_desc = ( !empty( $_POST['cat_desc'] ) ) ? $_POST['cat_desc'] : ''; } else --- 197,247 ---- $cat_list .= '<option value="0">' . $lang['None'] . '</option>'; } ! ! $cat_list .= ( !$_POST['cat_parent'] ) ? $pafiledb->generate_jumpbox() : $pafiledb-generate_jumpboxn( 0, 0, array( $_POST['cat_parent'] => 1 ) ); $checked_yes = ( $_POST['cat_allow_file'] ) ? ' checked' : ''; $checked_no = ( !$_POST['cat_allow_file'] ) ? ' checked' : ''; $cat_name = ( !empty( $_POST['cat_name'] ) ) ? $_POST['cat_name'] : ''; $cat_desc = ( !empty( $_POST['cat_desc'] ) ) ? $_POST['cat_desc'] : ''; + + // + // Comments + // + $use_comments_yes = ""; + $use_comments_no = ""; + $use_comments_default = "checked=\"checked\""; + + $internal_comments_internal = ""; + $internal_comments_phpbb = ""; + $internal_comments_default = "checked=\"checked\""; + + $autogenerate_comments_yes = ""; + $autogenerate_comments_no = ""; + $autogenerate_comments_default = "checked=\"checked\""; + + $comments_forum_id = 0; + + // + // Ratings + // + $use_ratings_yes = ""; + $use_ratings_no = ""; + $use_ratings_default = "checked=\"checked\""; + + // + // Instructions + // + $pretext_show = ""; + $pretext_hide = ""; + $pretext_default = "checked=\"checked\""; + + // + // Notification + // + $notify_none = ""; + $notify_pm = ""; + $notify_email = ""; + $notify_default = "checked=\"checked\""; + + $notify_group_list = mx_get_groups('', 'notify_group'); } else *************** *** 232,236 **** $cat_list .= '<option value="0">' . $lang['None'] . '</option>\n'; } ! $cat_list .= $pafiledb->jumpmenu_option( 0, 0, array( $pafiledb->cat_rowset[$cat_id]['cat_parent'] => 1 ) ); if ( $pafiledb->cat_rowset[$cat_id]['cat_allow_file'] ) --- 255,259 ---- $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'] ) *************** *** 245,321 **** } - if ( $pafiledb->cat_rowset[$cat_id]['cat_allow_comments'] ) - { - $checked_comments_yes = ' checked'; - $checked_comments_no = ''; - } - else - { - $checked_comments_yes = ''; - $checked_comments_no = ' checked'; - } - - if ( $pafiledb->cat_rowset[$cat_id]['cat_allow_ratings'] ) - { - $checked_ratings_yes = ' checked'; - $checked_ratings_no = ''; - } - else - { - $checked_ratings_yes = ''; - $checked_ratings_no = ' checked'; - } - $cat_name = $pafiledb->cat_rowset[$cat_id]['cat_name']; $cat_desc = $pafiledb->cat_rowset[$cat_id]['cat_desc']; } ! $pafiledb_template->assign_vars( array( 'CAT_NAME' => $cat_name, ! 'CAT_DESC' => $cat_desc, ! 'CHECKED_YES' => $checked_yes, ! 'CHECKED_NO' => $checked_no, ! // MX ADDON ! 'CHECKED_ALLOWCOMMENTS_YES' => $checked_comments_yes, ! 'CHECKED_ALLOWCOMMENTS_NO' => $checked_comments_no, ! 'CHECKED_ALLOWRATINGS_YES' => $checked_ratings_yes, ! 'CHECKED_ALLOWRATINGS_NO' => $checked_ratings_no, ! 'L_CAT_NAME' => $lang['Catname'], ! 'L_CAT_NAME_INFO' => $lang['Catnameinfo'], ! 'L_CAT_DESC' => $lang['Catdesc'], ! 'L_CAT_DESC_INFO' => $lang['Catdescinfo'], ! 'L_CAT_PARENT' => $lang['Catparent'], ! 'L_CAT_PARENT_INFO' => $lang['Catparentinfo'], ! 'L_CAT_ALLOWFILE' => $lang['Allow_file'], ! 'L_CAT_ALLOWFILE_INFO' => $lang['Allow_file_info'], ! // MX Addon ! 'L_CAT_ALLOWCOMMENTS' => $lang['Allow_comments'], ! 'L_CAT_ALLOWCOMMENTS_INFO' => $lang['Allow_comments_info'], ! 'L_CAT_ALLOWRATINGS' => $lang['Allow_ratings'], ! 'L_CAT_ALLOWRATINGS_INFO' => $lang['Allow_ratings_info'], ! 'L_NONE' => $lang['None'], ! 'L_YES' => $lang['Yes'], ! 'L_NO' => $lang['No'], ! 'L_CAT_NAME_FIELD_EMPTY' => $lang['Cat_name_missing'], ! 'S_CAT_LIST' => $cat_list ) ! ); } elseif ( $mode == 'delete' ) { ! $select_cat = $pafiledb->jumpmenu_option( 0, 0, array( $cat_id => 1 ) ); ! $file_to_select_cat = $pafiledb->jumpmenu_option( 0, 0, '', true ); ! $pafiledb_template->assign_vars( array( 'S_SELECT_CAT' => $select_cat, ! 'S_FILE_SELECT_CAT' => $file_to_select_cat, ! 'L_DELETE' => $lang['Delete'], ! 'L_DO_FILE' => $lang['Delfiles'], ! 'L_DO_CAT' => $lang['Do_cat'], ! 'L_MOVE_TO' => $lang['Move_to'], ! 'L_SELECT_CAT' => $lang['Select_a_Category'], ! 'L_DELETE' => $lang['Delete'], ! 'L_MOVE' => $lang['Move'] ) ! ); } --- 268,433 ---- } $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'); } ! $pafiledb_template->assign_vars( array( ! 'CAT_NAME' => $cat_name, ! 'CAT_DESC' => $cat_desc, ! 'CHECKED_YES' => $checked_yes, ! 'CHECKED_NO' => $checked_no, ! ! // ! // Comments ! // ! 'L_COMMENTS_TITLE' => $lang['Comments_title'], ! ! 'L_USE_COMMENTS' => $lang['Use_comments'], ! 'L_USE_COMMENTS_EXPLAIN' => $lang['Use_comments_explain'], ! 'S_USE_COMMENTS_YES' => $use_comments_yes, ! 'S_USE_COMMENTS_NO' => $use_comments_no, ! 'S_USE_COMMENTS_DEFAULT' => $use_comments_default, ! ! 'L_INTERNAL_COMMENTS' => $lang['Internal_comments'], ! 'L_INTERNAL_COMMENTS_EXPLAIN' => $lang['Internal_comments_explain'], ! 'S_INTERNAL_COMMENTS_INTERNAL' => $internal_comments_internal, ! 'S_INTERNAL_COMMENTS_PHPBB' => $internal_comments_phpbb, ! 'S_INTERNAL_COMMENTS_DEFAULT' => $internal_comments_default, ! 'L_INTERNAL_COMMENTS_INTERNAL' => $lang['Internal_comments_internal'], ! 'L_INTERNAL_COMMENTS_PHPBB' => $lang['Internal_comments_phpBB'], ! 'L_FORUM_ID' => $lang['Forum_id'], ! 'L_FORUM_ID_EXPLAIN' => $lang['Forum_id_explain'], ! 'FORUM_LIST' => get_forums( $comments_forum_id ), ! ! 'L_AUTOGENERATE_COMMENTS' => $lang['Autogenerate_comments'], ! 'L_AUTOGENERATE_COMMENTS_EXPLAIN' => $lang['Autogenerate_comments_explain'], ! 'S_AUTOGENERATE_COMMENTS_YES' => $autogenerate_comments_yes, ! 'S_AUTOGENERATE_COMMENTS_NO' => $autogenerate_comments_no, ! 'S_AUTOGENERATE_COMMENTS_DEFAULT' => $autogenerate_comments_default, ! ! // ! // Ratings ! // ! 'L_RATINGS_TITLE' => $lang['Ratings_title'], ! ! 'L_USE_RATINGS' => $lang['Use_ratings'], ! 'L_USE_RATINGS_EXPLAIN' => $lang['Use_ratings_explain'], ! 'S_USE_RATINGS_YES' => $use_ratings_yes, ! 'S_USE_RATINGS_NO' => $use_ratings_no, ! 'S_USE_RATINGS_DEFAULT' => $use_ratings_default, ! ! // ! // Instructions ! // ! 'L_INSTRUCTIONS_TITLE' => $lang['Instructions_title'], ! ! 'L_PRE_TEXT_NAME' => $lang['Pre_text_name'], ! 'L_PRE_TEXT_EXPLAIN' => $lang['Pre_text_explain'], ! 'S_SHOW_PRETEXT' => $pretext_show, ! 'S_HIDE_PRETEXT' => $pretext_hide, ! 'S_DEFAULT_PRETEXT' => $pretext_default, ! ! 'L_SHOW' => $lang['Show'], ! 'L_HIDE' => $lang['Hide'], ! // ! // Notifications ! // ! 'L_NOTIFICATIONS_TITLE' => $lang['Notifications_title'], ! ! 'L_NOTIFY' => $lang['Notify'], ! 'L_NOTIFY_EXPLAIN' => $lang['Notify_explain'], ! 'L_EMAIL' => $lang['Email'], ! 'L_PM' => $lang['PM'], ! ! 'S_NOTIFY_NONE' => $notify_none, ! 'S_NOTIFY_EMAIL' => $notify_email, ! 'S_NOTIFY_PM' => $notify_pm, ! 'S_NOTIFY_DEFAULT' => $notify_default, ! ! 'L_NOTIFY_GROUP' => $lang['Notify_group'], ! 'L_NOTIFY_GROUP_EXPLAIN' => $lang['Notify_group_explain'], ! 'NOTIFY_GROUP' => $notify_group_list, ! ! 'L_CAT_NAME' => $lang['Catname'], ! 'L_CAT_NAME_INFO' => $lang['Catnameinfo'], ! 'L_CAT_DESC' => $lang['Catdesc'], ! 'L_CAT_DESC_INFO' => $lang['Catdescinfo'], ! 'L_CAT_PARENT' => $lang['Catparent'], ! 'L_CAT_PARENT_INFO' => $lang['Catparentinfo'], ! 'L_CAT_ALLOWFILE' => $lang['Allow_file'], ! 'L_CAT_ALLOWFILE_INFO' => $lang['Allow_file_info'], ! 'L_CAT_ALLOWCOMMENTS' => $lang['Allow_comments'], ! 'L_CAT_ALLOWCOMMENTS_INFO' => $lang['Allow_comments_info'], ! 'L_CAT_ALLOWRATINGS' => $lang['Allow_ratings'], ! 'L_CAT_ALLOWRATINGS_INFO' => $lang['Allow_ratings_info'], ! ! 'L_DEFAULT' => $lang['Use_default'], ! 'L_NONE' => $lang['None'], ! 'L_YES' => $lang['Yes'], ! 'L_NO' => $lang['No'], ! 'L_CAT_NAME_FIELD_EMPTY' => $lang['Cat_name_missing'], ! 'S_CAT_LIST' => $cat_list ) ! ); } 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( ! 'S_SELECT_CAT' => $select_cat, ! 'S_FILE_SELECT_CAT' => $file_to_select_cat, ! 'L_DELETE' => $lang['Delete'], ! 'L_DO_FILE' => $lang['Delfiles'], ! 'L_DO_CAT' => $lang['Do_cat'], ! 'L_MOVE_TO' => $lang['Move_to'], ! 'L_SELECT_CAT' => $lang['Select_a_Category'], ! 'L_DELETE' => $lang['Delete'], ! 'L_MOVE' => $lang['Move'] ) ! ); } *************** *** 324,328 **** $pafiledb->_pafiledb(); ! $cache->unload(); include( $mx_root_path . 'admin/page_footer_admin.' . $phpEx ); --- 436,440 ---- $pafiledb->_pafiledb(); ! $pafiledb_cache->unload(); include( $mx_root_path . 'admin/page_footer_admin.' . $phpEx ); *************** *** 354,356 **** --- 466,505 ---- } + function get_forums( $sel_id = 0 ) + { + global $db; + + $sql = "SELECT forum_id, forum_name + FROM " . FORUMS_TABLE; + + if ( !$result = $db->sql_query( $sql ) ) + { + mx_message_die( GENERAL_ERROR, "Couldn't get list of forums", "", __LINE__, __FILE__, $sql ); + } + + $forumlist = '<select name="forum_id">'; + + if ( $sel_id == 0 ) + { + $forumlist .= '<option value="0" selected > Select a Forum !</option>'; + } + + while ( $row = $db->sql_fetchrow( $result ) ) + { + if ( $sel_id == $row['forum_id'] ) + { + $status = "selected"; + } + else + { + $status = ''; + } + $forumlist .= '<option value="' . $row['forum_id'] . '" ' . $status . '>' . $row['forum_name'] . '</option>'; + } + + $forumlist .= '</select>'; + + return $forumlist; + } + ?> \ No newline at end of file Index: admin_pa_file.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/admin/admin_pa_file.php,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** admin_pa_file.php 1 Oct 2005 14:15:19 -0000 1.15 --- admin_pa_file.php 8 Dec 2005 15:15:11 -0000 1.16 *************** *** 303,307 **** } ! if ( !( $result = $pafiledb_functions->sql_query_limit( $sql, $pafiledb_config['settings_file_page'], $start ) ) ) { mx_message_die( GENERAL_ERROR, 'Couldn\'t get file info', '', __LINE__, __FILE__, $sql ); --- 303,307 ---- } ! if ( !( $result = $pafiledb_functions->sql_query_limit( $sql, $pafiledb_config['pagination'], $start ) ) ) { mx_message_die( GENERAL_ERROR, 'Couldn\'t get file info', '', __LINE__, __FILE__, $sql ); *************** *** 322,326 **** else { ! $limit = $pafiledb_config['settings_file_page']; $temp_start = $start; } --- 322,326 ---- else { ! $limit = $pafiledb_config['pagination']; $temp_start = $start; } *************** *** 431,435 **** $cat_list .= '<option value="0">' . $lang['None'] . '</option>\n'; } ! $cat_list .= $pafiledb->jumpmenu_option( 0, 0, array( $cat_id => 1 ), true ); $cat_list .= '</select>'; --- 431,435 ---- $cat_list .= '<option value="0">' . $lang['None'] . '</option>\n'; } ! $cat_list .= $pafiledb->generate_jumpbox( 0, 0, array( $cat_id => 1 ), true ); $cat_list .= '</select>'; *************** *** 446,451 **** '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['settings_file_page'], $start ), ! 'PAGE_NUMBER' => sprintf( $lang['Page_of'], ( floor( $start / $pafiledb_config['settings_file_page'] ) + 1 ), ceil( $total_files / $pafiledb_config['settings_file_page'] ) ), 'S_CAT_LIST' => $cat_list, --- 446,451 ---- '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'] ) ), 'S_CAT_LIST' => $cat_list, *************** *** 507,511 **** $file_website = ''; $file_posticons = $pafiledb_functions->post_icons(); ! $file_cat_list = $pafiledb->jumpmenu_option( 0, 0, '', true ); $file_license = $pafiledb_functions->license_list(); $pin_checked_yes = ''; --- 507,511 ---- $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 = ''; *************** *** 538,542 **** $file_website = $file_info['file_docsurl']; $file_posticons = $pafiledb_functions->post_icons( $file_info['file_posticon'] ); ! $file_cat_list = $pafiledb->jumpmenu_option( 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' : ''; --- 538,542 ---- $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' : ''; *************** *** 750,754 **** $pafiledb_template->display( 'admin' ); $pafiledb->_pafiledb(); ! $cache->unload(); include( $mx_root_path . 'admin/page_footer_admin.' . $phpEx ); --- 750,754 ---- $pafiledb_template->display( 'admin' ); $pafiledb->_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.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** admin_pa_settings.php 1 Oct 2005 14:15:19 -0000 1.13 --- admin_pa_settings.php 8 Dec 2005 15:15:11 -0000 1.14 *************** *** 93,103 **** $config_name = $row['config_name']; $config_value = $row['config_value']; ! $default_config[$config_name] = $config_value; ! $new[$config_name] = ( isset( $_POST[$config_name] ) ) ? $_POST[$config_name] : $default_config[$config_name]; if ( ( empty( $size ) ) && ( !$submit ) && ( $config_name == 'max_file_size' ) ) { ! $size = ( intval( $default_config[$config_name] ) >= 1048576 ) ? 'mb' : ( ( intval( $default_config[$config_name] ) >= 1024 ) ? 'kb' : 'b' ); } --- 93,103 ---- $config_name = $row['config_name']; $config_value = $row['config_value']; ! $pa_config[$config_name] = $config_value; ! $new[$config_name] = ( isset( $_POST[$config_name] ) ) ? $_POST[$config_name] : $pa_config[$config_name]; if ( ( empty( $size ) ) && ( !$submit ) && ( $config_name == 'max_file_size' ) ) { ! $size = ( intval( $pa_config[$config_name] ) >= 1048576 ) ? 'mb' : ( ( intval( $pa_config[$config_name] ) >= 1024 ) ? 'kb' : 'b' ); } *************** *** 121,125 **** } ! if ( $config_name == 'tpl_php' && isset( $_POST[$config_name] ) && $new[$config_name] != $default_config[$config_name] ) { $pafiledb_template->compile_cache_clear(); --- 121,125 ---- } ! if ( $config_name == 'tpl_php' && isset( $_POST[$config_name] ) && $new[$config_name] != $pa_config[$config_name] ) { $pafiledb_template->compile_cache_clear(); *************** *** 132,136 **** if ( $submit ) { ! $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 ); --- 132,136 ---- if ( $submit ) { ! $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 ); *************** *** 138,148 **** } ! $template->set_filenames( array( ! /* - orig ! 'admin' => 'admin/pa_admin_settings.tpl') ! */ ! // MX ! 'admin' => 'admin/pa_admin_settings.tpl' ) ! ); $cat_auth_levels = array( 'ALL', 'REG', 'PRIVATE', 'MOD', 'ADMIN' ); --- 138,142 ---- } ! $template->set_filenames( array( 'admin' => 'admin/pa_admin_settings.tpl' ) ); $cat_auth_levels = array( 'ALL', 'REG', 'PRIVATE', 'MOD', 'ADMIN' ); *************** *** 162,322 **** } ! $view_all_yes = ( $new['settings_viewall'] ) ? ' selected' : ''; ! $view_all_no = ( !$new['settings_viewall'] ) ? ' selected' : ''; ! $download_disable_yes = ( $new['settings_disable'] ) ? ' selected' : ''; ! $download_disable_no = ( !$new['settings_disable'] ) ? ' selected' : ''; ! $hotlink_prevent_yes = ( $new['hotlink_prevent'] ) ? ' selected' : ''; ! $hotlink_prevent_no = ( !$new['hotlink_prevent'] ) ? ' selected' : ''; ! $php_template_yes = ( $new['settings_tpl_php'] ) ? ' selected' : ''; ! $php_template_no = ( !$new['settings_tpl_php'] ) ? ' selected' : ''; ! $allow_html_yes = ( $new['allow_html'] ) ? ' selected' : ''; ! $allow_html_no = ( !$new['allow_html'] ) ? ' selected' : ''; ! $allow_bbcode_yes = ( $new['allow_bbcode'] ) ? ' selected' : ''; ! $allow_bbcode_no = ( !$new['allow_bbcode'] ) ? ' selected' : ''; ! $allow_smilies_yes = ( $new['allow_smilies'] ) ? ' selected' : ''; ! $allow_smilies_no = ( !$new['allow_smilies'] ) ? ' selected' : ''; ! $allow_comment_links_yes = ( $new['allow_comment_links'] ) ? ' selected' : ''; ! $allow_comment_links_no = ( !$new['allow_comment_links'] ) ? ' selected' : ''; ! $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'], ! 'L_MAX_FILE_SIZE_INFO' => $lang['Max_filesize_explain'], ! 'L_UPLOAD_DIR' => $lang['Upload_directory'], ! 'L_UPLOAD_DIR_EXPLAIN' => $lang['Upload_directory_explain'], ! 'L_SCREENSHOT_DIR' => $lang['Screenshots_directory'], ! 'L_SCREENSHOT_DIR_EXPLAIN' => $lang['Screenshots_directory_explain'], ! 'L_FORBIDDEN_EXTENSIONS' => $lang['Forbidden_extensions'], ! 'L_FORBIDDEN_EXTENSIONS_EXPLAIN' => $lang['Forbidden_extensions_explain'], ! 'L_PERMISSION_SETTINGS' => $lang['Permission_settings'], ! 'L_ATUH_SEARCH' => $lang['Auth_search'], ! 'L_ATUH_SEARCH_INFO' => $lang['Auth_search_explain'], ! 'L_ATUH_STATS' => $lang['Auth_stats'], ! 'L_ATUH_STATS_INFO' => $lang['Auth_stats_explain'], ! 'L_ATUH_TOPLIST' => $lang['Auth_toplist'], ! 'L_ATUH_TOPLIST_INFO' => $lang['Auth_toplist_explain'], ! 'L_ATUH_VIEWALL' => $lang['Auth_viewall'], ! 'L_ATUH_VIEWALL_INFO' => $lang['Auth_viewall_explain'], ! 'L_FILE_IN_PAGE' => $lang['File_per_page'], ! 'L_FILE_IN_PAGE_INFO' => $lang['File_per_page_info'], ! 'L_HOTLINK' => $lang['Hotlink_prevent'], ! 'L_HOTLINK_INFO' => $lang['Hotlinl_prevent_info'], ! 'L_HOTLINK_ALLOWED' => $lang['Hotlink_allowed'], ! 'L_HOTLINK_ALLOWED_INFO' => $lang['Hotlink_allowed_info'], ! 'L_SETTINGS' => $lang['Settings'], ! 'L_SETTINGSTITLE' => $lang['Settingstitle'], ! 'L_SETTINGSEXPLAIN' => $lang['Settingsexplain'], ! 'L_PHP_TPL' => $lang['Php_template'], ! 'L_PHP_TPL_INFO' => $lang['Php_template_info'], ! 'L_DBNAME' => $lang['Dbname'], ! 'L_DBNAMEINFO' => $lang['Dbnameinfo'], ! 'L_TOPNUM' => $lang['Topnum'], ! 'L_TOPNUMINFO' => $lang['Topnuminfo'], ! 'L_NFDAYS' => $lang['Nfdays'], ! 'L_NFDAYSINFO' => $lang['Nfdaysinfo'], ! 'L_COMMENT_SETTINGS' => $lang['Com_settings'], ! 'L_SHOW_VIEWALL' => $lang['Showva'], ! 'L_VIEWALL_INFO' => $lang['Showvainfo'], ! 'L_DISABLE' => $lang['Dbdl'], ! 'L_DISABLE_INFO' => $lang['Dbdlinfo'], ! 'L_ALLOW_HTML' => $lang['Com_allowh'], ! 'L_ALLOW_BBCODE' => $lang['Com_allowb'], ! 'L_ALLOW_SMILIES' => $lang['Com_allows'], ! 'L_ALLOW_LINKS' => $lang['Com_allowl'], ! 'L_LINKS_MESSAGE' => $lang['Com_messagel'], ! 'L_LINKS_MESSAGE_INFO' => $lang['Com_messagel_info'], ! 'L_ALLOW_IMAGE' => $lang['Com_allowi'], ! 'L_IMAGE_MESSAGE' => $lang['Com_messagei'], ! 'L_MAX_CHAR' => $lang['Max_char'], ! 'L_MAX_CHAR_INFO' => $lang['Max_char_info'], ! 'L_IMAGE_MESSAGE_INFO' => $lang['Com_messagei_info'], ! 'L_RESET' => $lang['Reset'], ! 'L_SUBMIT' => $lang['Submit'], ! 'L_YES' => $lang['Yes'], ! 'L_NO' => $lang['No'], ! 'L_DEFAULT_SORT_METHOD' => $lang['Default_sort_method'], ! 'L_DEFAULT_SORT_ORDER' => $lang['Default_sort_order'], ! 'L_RATING' => $lang['DlRating'], ! 'L_DOWNLOADS' => $lang['Dls'], ! 'L_DATE' => $lang['Date'], ! 'L_NAME' => $lang['Name'], ! 'L_UPDATE_TIME' => $lang['Update_time'], ! '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'], ! 'HOTLINK_ALLOWED' => $new['hotlink_allowed'], ! 'SETTINGS_TOPNUMBER' => $new['settings_topnumber'], ! 'SETTINGS_NEWDAYS' => $new['settings_newdays'], ! 'SETTINGS_TOPNUMBER' => $new['settings_topnumber'], ! 'MESSAGE_LINK' => $new['no_comment_link_message'], ! 'MAX_CHAR' => $new['max_comment_chars'], ! 'MESSAGE_IMAGE' => $new['no_comment_image_message'], ! 'SORT_NAME' => ( $new['sort_method'] == 'file_name' ) ? 'selected="selected"' : '', ! 'SORT_TIME' => ( $new['sort_method'] == 'file_time' ) ? 'selected="selected"' : '', ! 'SORT_RATING' => ( $new['sort_method'] == 'file_rating' ) ? 'selected="selected"' : '', ! 'SORT_DOWNLOADS' => ( $new['sort_method'] == 'file_dls' ) ? 'selected="selected"' : '', ! 'SORT_UPDATE_TIME' => ( $new['sort_method'] == 'file_update_time' ) ? 'selected="selected"' : '', ! 'SORT_ASC' => ( $new['sort_order'] == 'ASC' ... [truncated message content] |