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' ) ? 'selected="selected"' : '', ! 'SORT_DESC' => ( $new['sort_order'] == 'DESC' ) ? 'selected="selected"' : '', ! 'MAX_FILE_SIZE' => $new['max_file_size'], ! 'UPLOAD_DIR' => $new['upload_dir'], ! 'SCREENSHOT_DIR' => $new['screenshots_dir'], ! 'FORBIDDEN_EXTENSIONS' => $new['forbidden_extensions'], ! 'S_FILESIZE' => pa_size_select( 'max_size', $size ), ! 'S_ATUH_SEARCH' => $auth_select['auth_search'], ! 'S_ATUH_STATS' => $auth_select['auth_stats'], ! 'S_ATUH_TOPLIST' => $auth_select['auth_toplist'], ! 'S_ATUH_VIEWALL' => $auth_select['auth_viewall'], ! 'S_VIEW_ALL_YES' => $view_all_yes, ! 'S_VIEW_ALL_NO' => $view_all_no, ! 'S_DISABLE_YES' => $download_disable_yes, ! 'S_DISABLE_NO' => $download_disable_no, ! 'S_PHP_TPL_YES' => $php_template_yes, ! 'S_PHP_TPL_NO' => $php_template_no, ! 'S_HOTLINK_YES' => $hotlink_prevent_yes, ! 'S_HOTLINK_NO' => $hotlink_prevent_no, ! 'S_ALLOW_HTML_YES' => $allow_html_yes, ! 'S_ALLOW_HTML_NO' => $allow_html_no, ! 'S_ALLOW_BBCODE_YES' => $allow_bbcode_yes, ! 'S_ALLOW_BBCODE_NO' => $allow_bbcode_no, ! 'S_ALLOW_SMILIES_YES' => $allow_smilies_yes, ! 'S_ALLOW_SMILIES_NO' => $allow_smilies_no, ! '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' ); --- 156,588 ---- } ! // ! // General Settings ! // ! $module_name = $new['module_name']; ! $enable_module_yes = ( $new['enable_module'] ) ? "checked=\"checked\"" : ""; ! $enable_module_no = ( !$new['enable_module'] ) ? "checked=\"checked\"" : ""; ! $wysiwyg_path = $new['wysiwyg_path']; ! $upload_dir = $new['upload_dir']; ! $screenshots_dir = $new['screenshots_dir']; ! // ! // File ! // ! $hotlink_prevent_yes = ( $new['hotlink_prevent'] ) ? "checked=\"checked\"" : ""; ! $hotlink_prevent_no = ( !$new['hotlink_prevent'] ) ? "checked=\"checked\"" : ""; ! $hotlink_allowed = $new['hotlink_allowed']; ! $php_template_yes = ( $new['settings_tpl_php'] ) ? "checked=\"checked\"" : ""; ! $php_template_no = ( !$new['settings_tpl_php'] ) ? "checked=\"checked\"" : ""; ! $max_file_size = $new['max_file_size']; ! $forbidden_extensions = $new['forbidden_extensions']; ! // ! // Appearance ! // ! $pagination = $new['pagination']; ! $sort_method_options = array(); ! $sort_method_options = array( "file_name", "file_time", "file_rating", "file_dls", "file_update_time" ); ! ! $sort_method_list = '<select name="sort_method">'; ! for( $j = 0; $j < count( $sort_method_options ); $j++ ) ! { ! if ( $new['sort_method'] == $sort_method_options[$j] ) ! { ! $status = "selected"; ! } ! else ! { ! $status = ''; ! } ! $sort_method_list .= '<option value="' . $sort_method_options[$j] . '" ' . $status . '>' . $sort_method_options[$j] . '</option>'; ! } ! $sort_method_list .= '</select>'; ! ! $sort_order_options = array(); ! $sort_order_options = array( "DESC", "ASC" ); ! ! $sort_order_list = '<select name="sort_order">'; ! ! for( $j = 0; $j < count( $sort_order_options ); $j++ ) ! { ! if ( $new['sort_order'] == $sort_order_options[$j] ) ! { ! $status = "selected"; ! } ! else ! { ! $status = ''; ! } ! $sort_order_list .= '<option value="' . $sort_order_options[$j] . '" ' . $status . '>' . $sort_order_options[$j] . '</option>'; ! } ! $sort_order_list .= '</select>'; ! ! $settings_topnumber = $new['settings_topnumber']; ! $settings_newdays = $new['settings_newdays']; ! ! $view_all_yes = ( $new['settings_viewall'] ) ? "checked=\"checked\"" : ""; ! $view_all_no = ( !$new['settings_viewall'] ) ? "checked=\"checked\"" : ""; ! ! // ! // Instructions ! // ! $pretext_show = ( $new['show_pretext'] ) ? "checked=\"checked\"" : ""; ! $pretext_hide = ( !$new['show_pretext'] ) ? "checked=\"checked\"" : ""; ! ! $pt_header = $new['pt_header']; ! $pt_body = $new['pt_body']; ! ! ! // ! // Comments (default settings) ! // ! $use_comments_yes = ( $new['use_comments'] ) ? "checked=\"checked\"" : ""; ! $use_comments_no = ( !$new['use_comments'] ) ? "checked=\"checked\"" : ""; ! ! $internal_comments_internal = ( $new['internal_comments'] ) ? "checked=\"checked\"" : ""; ! $internal_comments_phpbb = ( !$new['internal_comments'] ) ? "checked=\"checked\"" : ""; ! ! $del_topic_yes = ( $new['del_topic'] ) ? "checked=\"checked\"" : ""; ! $del_topic_no = ( !$new['del_topic'] ) ? "checked=\"checked\"" : ""; ! ! $autogenerate_comments_yes = ( $new['autogenerate_comments'] ) ? "checked=\"checked\"" : ""; ! $autogenerate_comments_no = ( !$new['autogenerate_comments'] ) ? "checked=\"checked\"" : ""; ! ! $allow_comment_wysiwyg_yes = ( $new['allow_comment_wysiwyg'] ) ? "checked=\"checked\"" : ""; ! $allow_comment_wysiwyg_no = ( !$new['allow_comment_wysiwyg'] ) ? "checked=\"checked\"" : ""; ! ! $allow_comment_html_yes = ( $new['allow_comment_html'] ) ? "checked=\"checked\"" : ""; ! $allow_comment_html_no = ( !$new['allow_comment_html'] ) ? "checked=\"checked\"" : ""; ! ! $allowed_comment_html_tags = $new['allowed_comment_html_tags']; ! ! $allow_comment_bbcode_yes = ( $new['allow_comment_bbcode'] ) ? "checked=\"checked\"" : ""; ! $allow_comment_bbcode_no = ( !$new['allow_comment_bbcode'] ) ? "checked=\"checked\"" : ""; ! ! $allow_comment_smilies_yes = ( $new['allow_comment_smilies'] ) ? "checked=\"checked\"" : ""; ! $allow_comment_smilies_no = ( !$new['allow_comment_smilies'] ) ? "checked=\"checked\"" : ""; ! ! $allow_comment_links_yes = ( $new['allow_comment_links'] ) ? "checked=\"checked\"" : ""; ! $allow_comment_links_no = ( !$new['allow_comment_links'] ) ? "checked=\"checked\"" : ""; ! ! $allow_comment_images_yes = ( $new['allow_comment_images'] ) ? "checked=\"checked\"" : ""; ! $allow_comment_images_no = ( !$new['allow_comment_images'] ) ? "checked=\"checked\"" : ""; ! ! $no_comment_link_message = $new['no_comment_link_message']; ! $no_comment_image_message = $new['no_comment_image_message']; ! ! $max_comment_chars = $new['max_comment_chars']; ! $max_comment_subject_chars = $new['max_comment_subject_chars']; ! ! $format_comment_truncate_links_yes = ( $new['formatting_comment_truncate_links'] ) ? "checked=\"checked\"" : ""; ! $format_comment_truncate_links_no = ( !$new['formatting_comment_truncate_links'] ) ? "checked=\"checked\"" : ""; ! ! $format_comment_image_resize = $new['formatting_comment_image_resize']; ! ! $format_comment_wordwrap_yes = ( $new['formatting_comment_wordwrap'] ) ? "checked=\"checked\"" : ""; ! $format_comment_wordwrap_no = ( !$new['formatting_comment_wordwrap'] ) ? "checked=\"checked\"" : ""; ! ! $comments_pag = $new['comments_pagination']; ! ! // ! // Ratings (default settings) ! // ! $use_ratings_yes = ( $new['use_ratings'] ) ? "checked=\"checked\"" : ""; ! $use_ratings_no = ( !$new['use_ratings'] ) ? "checked=\"checked\"" : ""; ! ! $votes_check_ip_yes = ( $new['votes_check_ip'] ) ? "checked=\"checked\"" : ""; ! $votes_check_ip_no = ( !$new['votes_check_ip'] ) ? "checked=\"checked\"" : ""; ! ! $votes_check_userid_yes = ( $new['votes_check_userid'] ) ? "checked=\"checked\"" : ""; ! $votes_check_userid_no = ( !$new['votes_check_userid'] ) ? "checked=\"checked\"" : ""; ! ! // ! // Notifications ! // ! $notify_none = ( $new['notify'] == 0 ) ? "checked=\"checked\"" : ""; ! $notify_pm = ( $new['notify'] == 1 ) ? "checked=\"checked\"" : ""; ! $notify_email = ( $new['notify'] == 2 ) ? "checked=\"checked\"" : ""; ! ! $notify_group_list = mx_get_groups($new['notify_group'], 'notify_group'); $template->assign_vars( array( ! 'S_SETTINGS_ACTION' => append_sid( "admin_pa_settings.$phpEx" ), ! 'L_CONFIGURATION_TITLE' => $lang['Panel_config_title'], ! 'L_CONFIGURATION_EXPLAIN' => $lang['Panel_config_explain'], ! ! 'L_RESET' => $lang['Reset'], ! 'L_SUBMIT' => $lang['Submit'], ! 'L_YES' => $lang['Yes'], ! 'L_NO' => $lang['No'], ! // ! // General ! // ! 'L_GENERAL_TITLE' => $lang['General_title'], ! 'L_MODULE_NAME' => $lang['Module_name'], ! 'L_MODULE_NAME_EXPLAIN' => $lang['Module_name_explain'], ! 'MODULE_NAME' => $module_name, ! ! 'L_ENABLE_MODULE' => $lang['Enable_module'], ! 'L_ENABLE_MODULE_EXPLAIN' => $lang['Enable_module_explain'], ! 'S_ENABLE_MODULE_YES' => $enable_module_yes, ! 'S_ENABLE_MODULE_NO' => $enable_module_no, ! ! 'L_WYSIWYG_PATH' => $lang['Wysiwyg_path'], ! 'L_WYSIWYG_PATH_EXPLAIN' => $lang['Wysiwyg_path_explain'], ! 'WYSIWYG_PATH' => $wysiwyg_path, ! ! 'L_UPLOAD_DIR' => $lang['Upload_directory'], ! 'L_UPLOAD_DIR_EXPLAIN' => $lang['Upload_directory_explain'], ! 'UPLOAD_DIR' => $upload_dir, ! 'L_SCREENSHOT_DIR' => $lang['Screenshots_directory'], ! 'L_SCREENSHOT_DIR_EXPLAIN' => $lang['Screenshots_directory_explain'], ! 'SCREENSHOT_DIR' => $screenshots_dir, ! ! // ! // FILE ! // ! 'L_FILE_TITLE' => $lang['File_title'], ! ! 'L_HOTLINK' => $lang['Hotlink_prevent'], ! 'L_HOTLINK_INFO' => $lang['Hotlinl_prevent_info'], ! 'S_HOTLINK_YES' => $hotlink_prevent_yes, ! 'S_HOTLINK_NO' => $hotlink_prevent_no, ! ! 'L_HOTLINK_ALLOWED' => $lang['Hotlink_allowed'], ! 'L_HOTLINK_ALLOWED_INFO' => $lang['Hotlink_allowed_info'], ! 'HOTLINK_ALLOWED' => $hotlink_allowed, ! ! 'L_PHP_TPL' => $lang['Php_template'], ! 'L_PHP_TPL_INFO' => $lang['Php_template_info'], ! 'S_PHP_TPL_YES' => $php_template_yes, ! 'S_PHP_TPL_NO' => $php_template_no, ! ! 'L_MAX_FILE_SIZE' => $lang['Max_filesize'], ! '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'], ! 'L_FORBIDDEN_EXTENSIONS_EXPLAIN' => $lang['Forbidden_extensions_explain'], ! 'FORBIDDEN_EXTENSIONS' => $forbidden_extensions, ! ! ! // ! // Appearance ! // ! 'L_APPEARANCE_TITLE' => $lang['Appearance_title'], ! ! 'L_PAGINATION' => $lang['Article_pag'], ! 'L_PAGINATION_EXPLAIN' => $lang['Article_pag_explain'], ! 'PAGINATION' => $pagination, ! ! 'L_SORT_METHOD' => $lang['Sort_method'], ! 'L_SORT_METHOD_EXPLAIN' => $lang['Sort_method_explain'], ! 'SORT_METHOD' => $sort_method_list, ! 'L_SORT_ORDER' => $lang['Sort_order'], ! 'L_SORT_ORDER_EXPLAIN' => $lang['Sort_order_explain'], ! 'SORT_ORDER' => $sort_order_list, ! ! 'L_TOPNUM' => $lang['Topnum'], ! 'L_TOPNUMINFO' => $lang['Topnuminfo'], ! 'SETTINGS_TOPNUMBER' => $settings_topnumber, ! ! 'L_NFDAYS' => $lang['Nfdays'], ! 'L_NFDAYSINFO' => $lang['Nfdaysinfo'], ! 'SETTINGS_NEWDAYS' => $settings_newdays, ! 'L_SHOW_VIEWALL' => $lang['Showva'], ! 'L_VIEWALL_INFO' => $lang['Showvainfo'], ! 'S_VIEW_ALL_YES' => $view_all_yes, ! 'S_VIEW_ALL_NO' => $view_all_no, ! ! // ! // Comments ! // ! 'L_COMMENTS_TITLE' => $lang['Comments_title'], ! 'L_COMMENTS_TITLE_EXPLAIN' => $lang['Comments_title_explain'], ! ! '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, ! ! '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, ! 'L_INTERNAL_COMMENTS_INTERNAL' => $lang['Internal_comments_internal'], ! 'L_INTERNAL_COMMENTS_PHPBB' => $lang['Internal_comments_phpBB'], ! '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, ! ! 'L_ALLOW_COMMENT_WYSIWYG' => $lang['Allow_Wysiwyg'], ! 'L_ALLOW_COMMENT_WYSIWYG_EXPLAIN' => $lang['Allow_Wysiwyg_explain'], ! 'S_ALLOW_COMMENT_WYSIWYG_YES' => $allow_comment_wysiwyg_yes, ! 'S_ALLOW_COMMENT_WYSIWYG_NO' => $allow_comment_wysiwyg_no, ! 'L_ALLOW_COMMENT_HTML' => $lang['Allow_HTML'], ! 'L_ALLOW_COMMENT_HTML_EXPLAIN' => $lang['Allow_html_explain'], ! 'S_ALLOW_COMMENT_HTML_YES' => $allow_comment_html_yes, ! 'S_ALLOW_COMMENT_HTML_NO' => $allow_comment_html_no, ! 'L_ALLOW_COMMENT_BBCODE' => $lang['Allow_BBCode'], ! 'L_ALLOW_COMMENT_BBCODE_EXPLAIN' => $lang['Allow_bbcode_explain'], ! 'S_ALLOW_COMMENT_BBCODE_YES' => $allow_comment_bbcode_yes, ! 'S_ALLOW_COMMENT_BBCODE_NO' => $allow_comment_bbcode_no, ! 'L_ALLOW_COMMENT_SMILIES' => $lang['Allow_smilies'], ! 'L_ALLOW_COMMENT_SMILIES_EXPLAIN' => $lang['Allow_smilies_explain'], ! 'S_ALLOW_COMMENT_SMILIES_YES' => $allow_comment_smilies_yes, ! 'S_ALLOW_COMMENT_SMILIES_NO' => $allow_comment_smilies_no, ! ! 'L_ALLOWED_COMMENT_HTML_TAGS' => $lang['Allowed_tags'], ! 'L_ALLOWED_COMMENT_HTML_TAGS_EXPLAIN' => $lang['Allowed_tags_explain'], ! 'ALLOWED_COMMENT_HTML_TAGS' => $allowed_comment_html_tags, ! ! 'L_ALLOW_COMMENT_IMAGES' => $lang['Allow_images'], ! 'L_ALLOW_COMMENT_IMAGES_EXPLAIN' => $lang['Allow_images_explain'], ! 'S_ALLOW_COMMENT_IMAGES_YES' => $allow_comment_images_yes, ! 'S_ALLOW_COMMENT_IMAGES_NO' => $allow_comment_images_no, ! ! 'L_ALLOW_COMMENT_LINKS' => $lang['Allow_links'], ! 'L_ALLOW_COMMENT_LINKS_EXPLAIN' => $lang['Allow_links_explain'], ! 'S_ALLOW_COMMENT_LINKS_YES' => $allow_comment_links_yes, ! 'S_ALLOW_COMMENT_LINKS_NO' => $allow_comment_links_no, ! ! 'L_COMMENT_LINKS_MESSAGE' => $lang['Allow_links_message'], ! 'L_COMMENT_LINKS_MESSAGE_EXPLAIN' => $lang['Allow_links_message_explain'], ! 'COMMENT_MESSAGE_LINK' => $no_comment_link_message, ! ! 'L_COMMENT_IMAGES_MESSAGE' => $lang['Allow_images_message'], ! 'L_COMMENT_IMAGES_MESSAGE_EXPLAIN' => $lang['Allow_images_message_explain'], ! 'COMMENT_MESSAGE_IMAGE' => $no_comment_image_message, ! ! 'L_COMMENT_MAX_SUBJECT_CHAR' => $lang['Max_subject_char'], ! 'L_COMMENT_MAX_SUBJECT_CHAR_EXPLAIN' => $lang['Max_subject_char_explain'], ! 'COMMENT_MAX_SUBJECT_CHAR' => $max_comment_subject_chars, ! ! 'L_COMMENT_MAX_CHAR' => $lang['Max_char'], ! 'L_COMMENT_MAX_CHAR_EXPLAIN' => $lang['Max_char_explain'], ! 'COMMENT_MAX_CHAR' => $max_comment_chars, ! ! 'L_COMMENT_FORMAT_WORDWRAP' => $lang['Format_wordwrap'], ! 'L_COMMENT_FORMAT_WORDWRAP_EXPLAIN' => $lang['Format_wordwrap_explain'], ! 'S_COMMENT_FORMAT_WORDWRAP_YES' => $format_comment_wordwrap_yes, ! 'S_COMMENT_FORMAT_WORDWRAP_NO' => $format_comment_wordwrap_no, ! ! 'L_COMMENT_FORMAT_IMAGE_RESIZE' => $lang['Format_image_resize'], ! 'L_COMMENT_FORMAT_IMAGE_RESIZE_EXPLAIN' => $lang['Format_image_resize_explain'], ! 'COMMENT_FORMAT_IMAGE_RESIZE' => $format_comment_image_resize, ! ! 'L_COMMENT_FORMAT_TRUNCATE_LINKS' => $lang['Format_truncate_links'], ! 'L_COMMENT_FORMAT_TRUNCATE_LINKS_EXPLAIN' => $lang['Format_truncate_links_explain'], ! 'S_COMMENT_FORMAT_TRUNCATE_LINKS_YES' => $format_comment_truncate_links_yes, ! 'S_COMMENT_FORMAT_TRUNCATE_LINKS_NO' => $format_comment_truncate_links_no, ! ! 'L_COMMENTS_PAG' => $lang['Comments_pag'], ! 'L_COMMENTS_PAG_EXPLAIN' => $lang['Comments_pag_explain'], ! 'COMMENTS_PAG' => $comments_pag, ! ! 'L_DEL_TOPIC' => $lang['Del_topic'], ! 'L_DEL_TOPIC_EXPLAIN' => $lang['Del_topic_explain'], ! 'S_DEL_TOPIC_YES' => $del_topic_yes, ! 'S_DEL_TOPIC_NO' => $del_topic_no, ! // ! // Ratings ! // ! 'L_RATINGS_TITLE' => $lang['Ratings_title'], ! 'L_RATINGS_TITLE_EXPLAIN' => $lang['Ratings_title_explain'], + '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, + + 'L_VOTES_CHECK_IP' => $lang['Votes_check_ip'], + 'L_VOTES_CHECK_IP_EXPLAIN' => $lang['Votes_check_ip_explain'], + 'S_VOTES_CHECK_IP_YES' => $votes_check_ip_yes, + 'S_VOTES_CHECK_IP_NO' => $votes_check_ip_no, + + 'L_VOTES_CHECK_USERID' => $lang['Votes_check_userid'], + 'L_VOTES_CHECK_USERID_EXPLAIN' => $lang['Votes_check_userid_explain'], + 'S_VOTES_CHECK_USERID_YES' => $votes_check_userid_yes, + 'S_VOTES_CHECK_USERID_NO' => $votes_check_userid_no, + + // + // Instructions + // + 'L_INSTRUCTIONS_TITLE' => $lang['Instructions_title'], + + 'L_SHOW' => $lang['Show'], + 'L_HIDE' => $lang['Hide'], + 'L_PRE_TEXT_NAME' => $lang['Pre_text_name'], + 'L_PRE_TEXT_HEADER' => $lang['Pre_text_header'], + 'L_PRE_TEXT_BODY' => $lang['Pre_text_body'], + 'L_PRE_TEXT_EXPLAIN' => $lang['Pre_text_explain'], + 'S_SHOW_PRETEXT' => $pretext_show, + 'S_HIDE_PRETEXT' => $pretext_hide, + 'L_PT_HEADER' => $pt_header, + 'L_PT_BODY' => $pt_body, + + // + // 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, + + 'L_NOTIFY_GROUP' => $lang['Notify_group'], + 'L_NOTIFY_GROUP_EXPLAIN' => $lang['Notify_group_explain'], + 'NOTIFY_GROUP' => $notify_group_list, + + // + // Permissions + // + 'L_PERMISSION_SETTINGS' => $lang['Permission_settings'], + + 'L_ATUH_SEARCH' => $lang['Auth_search'], + 'L_ATUH_SEARCH_INFO' => $lang['Auth_search_explain'], + 'S_ATUH_SEARCH' => $auth_select['auth_search'], + + 'L_ATUH_STATS' => $lang['Auth_stats'], + 'L_ATUH_STATS_INFO' => $lang['Auth_stats_explain'], + 'S_ATUH_STATS' => $auth_select['auth_stats'], + + 'L_ATUH_TOPLIST' => $lang['Auth_toplist'], + 'S_ATUH_TOPLIST' => $auth_select['auth_toplist'], + 'L_ATUH_TOPLIST_INFO' => $lang['Auth_toplist_explain'], + + 'L_ATUH_VIEWALL' => $lang['Auth_viewall'], + 'L_ATUH_VIEWALL_INFO' => $lang['Auth_viewall_explain'], + 'S_ATUH_VIEWALL' => $auth_select['auth_viewall'], + + )); + + // // Output + // include( $mx_root_path . 'admin/page_header_admin.' . $phpEx ); $template->pparse( 'admin' ); Index: admin_pa_catauth.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/admin/admin_pa_catauth.php,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** admin_pa_catauth.php 1 Oct 2005 14:15:19 -0000 1.11 --- admin_pa_catauth.php 8 Dec 2005 15:15:11 -0000 1.12 *************** *** 226,230 **** $pafiledb_template->display( 'body' ); $pafiledb->_pafiledb(); ! $cache->unload(); include( $mx_root_path . 'admin/page_footer_admin.' . $phpEx ); --- 226,230 ---- $pafiledb_template->display( 'body' ); $pafiledb->_pafiledb(); ! $pafiledb_cache->unload(); include( $mx_root_path . 'admin/page_footer_admin.' . $phpEx ); Index: mx_module_defs.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/admin/mx_module_defs.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** mx_module_defs.php 24 Oct 2005 20:16:56 -0000 1.3 --- mx_module_defs.php 8 Dec 2005 15:15:11 -0000 1.4 *************** *** 121,125 **** // $data = ( !empty( $parameter_data['parameter_value'] ) ) ? $parameter_data['parameter_value'] : ''; ! $parameter_datas = $this->jumpmenu_option( 0, 0, array( $data => 1 ), false ); // --- 121,125 ---- // $data = ( !empty( $parameter_data['parameter_value'] ) ) ? $parameter_data['parameter_value'] : ''; ! $parameter_datas = $this->generate_jumpbox( 0, 0, array( $data => 1 ), false ); // *************** *** 237,241 **** // Get varaibles // ! $pa_map_cat = $this->jumpmenu_option( 0, 0, '', true ); $pa_map_dynid = get_list_formatted( 'block_list', 0, 'map_dyn_id' ); --- 237,241 ---- // Get varaibles // ! $pa_map_cat = $this->generate_jumpbox( 0, 0, '', true ); $pa_map_dynid = get_list_formatted( 'block_list', 0, 'map_dyn_id' ); *************** *** 292,296 **** for( $i = 0; $i < $total_maps; $i++ ) { ! $pa_map_cat_tmp = $this->jumpmenu_option( 0, 0, array( $pa_mapping_data[$i]['map_cat_id'] => 1 ), false ); $pa_map_dynid_id = 'map_dyn_id_'.$i; $pa_map_dynid_tmp = get_list_formatted( 'block_list', $pa_mapping_data[$i]['map_dyn_id'], $pa_map_dynid_id ); --- 292,296 ---- for( $i = 0; $i < $total_maps; $i++ ) { ! $pa_map_cat_tmp = $this->generate_jumpbox( 0, 0, array( $pa_mapping_data[$i]['map_cat_id'] => 1 ), false ); $pa_map_dynid_id = 'map_dyn_id_'.$i; $pa_map_dynid_tmp = get_list_formatted( 'block_list', $pa_mapping_data[$i]['map_dyn_id'], $pa_map_dynid_id ); *************** *** 460,464 **** // $check_upload: if true permission for upload will be checked // =================================================== ! function jumpmenu_option( $cat_id = 0, $depth = 0, $default = '', $for_file = false, $check_upload = false ) { global $db; --- 460,464 ---- // $check_upload: if true permission for upload will be checked // =================================================== ! function generate_jumpbox( $cat_id = 0, $depth = 0, $default = '', $for_file = false, $check_upload = false ) { global $db; *************** *** 515,519 **** $cat_class = ( !$cat['cat_allow_file'] ) ? 'class="greyed"' : ''; $cat_list .= '<option value="' . $sub_cat_id . '"' . $sel . ' ' . $cat_class . ' />' . $pre . $cat_pre . $cat['cat_name'] . '</option>'; ! $cat_list .= $this->jumpmenu_option( $cat['cat_id'], $depth + 1, $default, $for_file, $check_upload ); } } --- 515,519 ---- $cat_class = ( !$cat['cat_allow_file'] ) ? 'class="greyed"' : ''; $cat_list .= '<option value="' . $sub_cat_id . '"' . $sel . ' ' . $cat_class . ' />' . $pre . $cat_pre . $cat['cat_name'] . '</option>'; ! $cat_list .= $this->generate_jumpbox( $cat['cat_id'], $depth + 1, $default, $for_file, $check_upload ); } } Index: admin_pa_custom.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/admin/admin_pa_custom.php,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** admin_pa_custom.php 1 Oct 2005 14:15:19 -0000 1.13 --- admin_pa_custom.php 8 Dec 2005 15:15:11 -0000 1.14 *************** *** 247,251 **** $pafiledb_template->display( 'admin' ); $pafiledb->_pafiledb(); ! $cache->unload(); include( $mx_root_path . 'admin/page_footer_admin.' . $phpEx ); --- 247,251 ---- $pafiledb_template->display( 'admin' ); $pafiledb->_pafiledb(); ! $pafiledb_cache->unload(); include( $mx_root_path . 'admin/page_footer_admin.' . $phpEx ); Index: admin_pa_ug_auth.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/admin/admin_pa_ug_auth.php,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** admin_pa_ug_auth.php 1 Oct 2005 14:15:19 -0000 1.9 --- admin_pa_ug_auth.php 8 Dec 2005 15:15:11 -0000 1.10 *************** *** 941,945 **** $pafiledb->_pafiledb(); ! $cache->unload(); /* - orig --- 941,945 ---- $pafiledb->_pafiledb(); ! $pafiledb_cache->unload(); /* - orig |