Update of /cvsroot/mxbb/mx_kb/kb/admin In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv21873/modules/mx_kb/kb/admin Modified Files: admin_auth_manage.php admin_cat_manage.php admin_custom_manage.php admin_settings.php admin_types_manage.php Removed Files: admin_article_manage.php Log Message: Index: admin_cat_manage.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/kb/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:21:36 -0000 1.1 --- admin_cat_manage.php 1 Aug 2006 21:00:37 -0000 1.2 *************** *** 25,29 **** include_once( $phpbb_root_path . 'includes/functions_search.' . $phpEx ); - $mode = $mx_request_vars->request('mode', MX_TYPE_NO_TAGS, ''); --- 25,28 ---- *************** *** 50,55 **** $cat_auth_levels = array( 'ALL', 'REG', 'PRIVATE', 'MOD', 'ADMIN' ); $cat_auth_const = array( AUTH_ALL, AUTH_REG, AUTH_ACL, AUTH_MOD, AUTH_ADMIN ); ! $global_auth = array( 'auth_view', 'auth_post', 'auth_rate', 'auth_comment', 'auth_edit', 'auth_delete', 'auth_approval', 'auth_approval_edit' ); $auth_select = array(); switch ( $mode ) --- 49,61 ---- $cat_auth_levels = array( 'ALL', 'REG', 'PRIVATE', 'MOD', 'ADMIN' ); $cat_auth_const = array( AUTH_ALL, AUTH_REG, AUTH_ACL, AUTH_MOD, AUTH_ADMIN ); ! ! $cat_auth_approval_levels = array( 'NONE', 'MOD', 'ADMIN' ); ! $cat_auth_approval_const = array( AUTH_ALL, AUTH_MOD, AUTH_ADMIN ); ! ! $global_auth = array( 'auth_view', 'auth_edit', 'auth_delete', 'auth_post', 'auth_rate', 'auth_view_comment', 'auth_post_comment', 'auth_edit_comment', 'auth_delete_comment' ); ! $global_approval_auth = array( 'auth_approval', 'auth_approval_edit' ); ! $auth_select = array(); + $auth_select_approval = array(); switch ( $mode ) *************** *** 61,64 **** --- 67,73 ---- $new_cat_name = stripslashes( $_POST['new_cat_name'] ); + $checked_yes = ' checked'; + $checked_no = ''; + // // Comments *************** *** 107,116 **** $cat_rowset['auth_view'] = 0; $cat_rowset['auth_post'] = 1; - $cat_rowset['auth_rate'] = 1; - $cat_rowset['auth_comment'] = 1; $cat_rowset['auth_edit'] = 1; $cat_rowset['auth_delete'] = 2; ! $cat_rowset['auth_approval'] = 5; ! $cat_rowset['auth_approval_edit'] = 5; foreach( $global_auth as $auth ) --- 116,128 ---- $cat_rowset['auth_view'] = 0; $cat_rowset['auth_post'] = 1; $cat_rowset['auth_edit'] = 1; $cat_rowset['auth_delete'] = 2; ! $cat_rowset['auth_approval'] = 0; ! $cat_rowset['auth_approval_edit'] = 0; ! $cat_rowset['auth_rate'] = 1; ! $cat_rowset['auth_view_comment'] = 1; ! $cat_rowset['auth_post_comment'] = 1; ! $cat_rowset['auth_edit_comment'] = 1; ! $cat_rowset['auth_delete_comment'] = 5; foreach( $global_auth as $auth ) *************** *** 120,128 **** { $selected = ( $cat_rowset[$auth] == $cat_auth_const[$k] ) ? ' selected="selected"' : ''; ! $auth_select[$auth] .= '<option value="' . $cat_auth_const[$k] . '"' . $selected . '>' . $lang['Forum_' . $cat_auth_levels[$k]] . '</option>'; } $auth_select[$auth] .= '</select> '; } // // Generate page --- 132,151 ---- { $selected = ( $cat_rowset[$auth] == $cat_auth_const[$k] ) ? ' selected="selected"' : ''; ! $auth_select[$auth] .= '<option value="' . $cat_auth_const[$k] . '"' . $selected . '>' . $lang['Cat_' . $cat_auth_levels[$k]] . '</option>'; } $auth_select[$auth] .= '</select> '; } + foreach( $global_approval_auth as $auth ) + { + $auth_select_approval[$auth] = ' <select name="' . $auth . '">'; + for( $k = 0; $k < count( $cat_auth_approval_levels ); $k++ ) + { + $selected = ( $cat_rowset[$auth] == $cat_auth_approval_const[$k] ) ? ' selected="selected"' : ''; + $auth_select_approval[$auth] .= '<option value="' . $cat_auth_approval_const[$k] . '"' . $selected . '>' . $lang['Cat_' . $cat_auth_approval_levels[$k]] . '</option>'; + } + $auth_select_approval[$auth] .= '</select> '; + } + // // Generate page *************** *** 145,149 **** 'L_NONE' => $lang['None'], ! 'PARENT_LIST' => $this->generate_jumpbox( '', 0, 0, 0, true ), 'CAT_NAME' => $new_cat_name, 'DESC' => '', --- 168,178 ---- 'L_NONE' => $lang['None'], ! 'CHECKED_YES' => $checked_yes, ! 'CHECKED_NO' => $checked_no, ! 'L_CAT_ALLOWFILE' => $lang['Allow_file'], ! 'L_CAT_ALLOWFILE_INFO' => $lang['Allow_file_info'], ! ! //'PARENT_LIST' => $this->generate_jumpbox( '', 0, 0, 0, true ), ! 'PARENT_LIST' => $this->generate_jumpbox( ), 'CAT_NAME' => $new_cat_name, 'DESC' => '', *************** *** 236,248 **** 'S_VIEW_LEVEL' => $auth_select['auth_view'], - 'L_UPLOAD_LEVEL' => $lang['Upload_level'], - 'S_UPLOAD_LEVEL' => $auth_select['auth_post'], - - 'L_RATE_LEVEL' => $lang['Rate_level'], - 'S_RATE_LEVEL' => $auth_select['auth_rate'], - - 'L_COMMENT_LEVEL' => $lang['Comment_level'], - 'S_COMMENT_LEVEL' => $auth_select['auth_comment'], - 'L_EDIT_LEVEL' => $lang['Edit_level'], 'S_EDIT_LEVEL' => $auth_select['auth_edit'], --- 265,268 ---- *************** *** 251,259 **** 'S_DELETE_LEVEL' => $auth_select['auth_delete'], 'L_APPROVAL_LEVEL' => $lang['Approval_level'], ! 'S_APPROVAL_LEVEL' => $auth_select['auth_approval'], 'L_APPROVAL_EDIT_LEVEL' => $lang['Approval_edit_level'], ! 'S_APPROVAL_EDIT_LEVEL' => $auth_select['auth_approval_edit'], 'L_DISABLED' => $lang['Disabled'], --- 271,297 ---- 'S_DELETE_LEVEL' => $auth_select['auth_delete'], + 'L_UPLOAD_LEVEL' => $lang['Upload_level'], + 'S_UPLOAD_LEVEL' => $auth_select['auth_post'], + 'L_APPROVAL_LEVEL' => $lang['Approval_level'], ! 'S_APPROVAL_LEVEL' => $auth_select_approval['auth_approval'], 'L_APPROVAL_EDIT_LEVEL' => $lang['Approval_edit_level'], ! 'S_APPROVAL_EDIT_LEVEL' => $auth_select_approval['auth_approval_edit'], ! ! 'L_RATE_LEVEL' => $lang['Rate_level'], ! 'S_RATE_LEVEL' => $auth_select['auth_rate'], ! ! 'L_VIEW_COMMENT_LEVEL' => $lang['View_Comment_level'], ! 'S_VIEW_COMMENT_LEVEL' => $auth_select['auth_view_comment'], ! ! 'L_POST_COMMENT_LEVEL' => $lang['Post_Comment_level'], ! 'S_POST_COMMENT_LEVEL' => $auth_select['auth_post_comment'], ! ! 'L_EDIT_COMMENT_LEVEL' => $lang['Edit_Comment_level'], ! 'S_EDIT_COMMENT_LEVEL' => $auth_select['auth_edit_comment'], ! ! 'L_DELETE_COMMENT_LEVEL' => $lang['Delete_Comment_level'], ! 'S_DELETE_COMMENT_LEVEL' => $auth_select['auth_delete_comment'], 'L_DISABLED' => $lang['Disabled'], *************** *** 272,275 **** --- 310,314 ---- $cat_desc = $_POST['catdesc']; $parent = intval( $_POST['parent'] ); + $cat_allow_file = intval( $_POST['cat_allow_file'] ); $cat_use_comments = ( isset( $_POST['cat_allow_comments'] ) ) ? intval( $_POST['cat_allow_comments'] ) : 0; *************** *** 291,302 **** $view_level = intval( $_POST['auth_view'] ); - $post_level = intval( $_POST['auth_post'] ); - $rate_level = intval( $_POST['auth_rate'] ); - $comment_level = intval( $_POST['auth_comment'] ); $edit_level = intval( $_POST['auth_edit'] ); $delete_level = intval( $_POST['auth_delete'] ); $approval_level = intval( $_POST['auth_approval'] ); $approval_edit_level = intval( $_POST['auth_approval_edit'] ); $sql = "SELECT MAX(cat_order) AS cat_order FROM " . KB_CATEGORIES_TABLE . " WHERE parent = $parent"; --- 330,345 ---- $view_level = intval( $_POST['auth_view'] ); $edit_level = intval( $_POST['auth_edit'] ); $delete_level = intval( $_POST['auth_delete'] ); + $post_level = intval( $_POST['auth_post'] ); $approval_level = intval( $_POST['auth_approval'] ); $approval_edit_level = intval( $_POST['auth_approval_edit'] ); + $rate_level = intval( $_POST['auth_rate'] ); + $comment_view_level = intval( $_POST['auth_view_comment'] ); + $comment_post_level = intval( $_POST['auth_post_comment'] ); + $comment_edit_level = intval( $_POST['auth_edit_comment'] ); + $comment_delete_level = intval( $_POST['auth_delete_comment'] ); + $sql = "SELECT MAX(cat_order) AS cat_order FROM " . KB_CATEGORIES_TABLE . " WHERE parent = $parent"; *************** *** 314,319 **** $cat_order = $id['cat_order'] + 10; ! $sql = "INSERT INTO " . KB_CATEGORIES_TABLE . " ( category_name, category_details, number_articles, parent, cat_order, auth_view, auth_post, auth_rate, auth_comment, auth_edit, auth_delete, auth_approval, auth_approval_edit, cat_allow_comments, internal_comments, autogenerate_comments, comments_forum_id, cat_allow_ratings, show_pretext, notify, notify_group )" . " VALUES ! ( '$cat_name', ' $cat_desc', '0', '$parent', '$cat_order', '$view_level', '$post_level', '$rate_level', '$comment_level', '$edit_level', '$delete_level', '$approval_level', '$approval_edit_level', '$cat_use_comments', '$cat_internal_comments', '$cat_autogenerate_comments', '$comments_forum_id', '$cat_use_ratings', '$cat_show_pretext', '$cat_notify', '$cat_notify_group')"; if ( !( $results = $db->sql_query( $sql ) ) ) --- 357,362 ---- $cat_order = $id['cat_order'] + 10; ! $sql = "INSERT INTO " . KB_CATEGORIES_TABLE . " ( category_name, category_details, number_articles, cat_allow_file, parent, cat_order, auth_view, auth_post, auth_rate, auth_view_comment, auth_post_comment, auth_edit_comment, auth_delete_comment, auth_edit, auth_delete, auth_approval, auth_approval_edit, cat_allow_comments, internal_comments, autogenerate_comments, comments_forum_id, cat_allow_ratings, show_pretext, notify, notify_group )" . " VALUES ! ( '$cat_name', '$cat_desc', '0', '$cat_allow_file', '$parent', '$cat_order', '$view_level', '$post_level', '$rate_level', '$comment_view_level', '$comment_post_level', '$comment_edit_level', '$comment_delete_level', '$edit_level', '$delete_level', '$approval_level', '$approval_edit_level', '$cat_use_comments', '$cat_internal_comments', '$cat_autogenerate_comments', '$comments_forum_id', '$cat_use_ratings', '$cat_show_pretext', '$cat_notify', '$cat_notify_group')"; if ( !( $results = $db->sql_query( $sql ) ) ) *************** *** 332,397 **** if ( !$_POST['submit'] ) { ! $cat_id = intval( $_GET['cat'] ); ! $cat_name = $this->cat_rowset[$cat_id]['category_name']; ! $cat_desc = $this->cat_rowset[$cat_id]['category_details']; ! $number_articles = $this->article_in_cat($cat_id); ! $parent = $this->cat_rowset[$cat_id]['parent']; ! // ! // 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'); ! // ! // Permissions ! // ! foreach( $global_auth as $auth ) { ! $auth_select[$auth] = ' <select name="' . $auth . '">'; ! for( $k = 0; $k < count( $cat_auth_levels ); $k++ ) ! { ! $selected = ( $this->cat_rowset[$cat_id][$auth] == $cat_auth_const[$k] ) ? ' selected="selected"' : ''; ! $auth_select[$auth] .= '<option value="' . $cat_auth_const[$k] . '"' . $selected . '>' . $lang['Forum_' . $cat_auth_levels[$k]] . '</option>'; ! } ! $auth_select[$auth] .= '</select> '; } // --- 375,454 ---- if ( !$_POST['submit'] ) { ! $cat_id = intval( $_GET['cat'] ); ! $cat_name = $this->cat_rowset[$cat_id]['category_name']; ! $cat_desc = $this->cat_rowset[$cat_id]['category_details']; ! $checked_yes = ( $this->cat_rowset[$cat_id]['cat_allow_file'] ) ? ' checked' : ''; ! $checked_no = ( !$this->cat_rowset[$cat_id]['cat_allow_file'] ) ? ' checked' : ''; ! $number_articles = $this->items_in_cat($cat_id); ! $parent = $this->cat_rowset[$cat_id]['parent']; ! // ! // 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'); ! ! // ! // Permissions ! // ! foreach( $global_auth as $auth ) ! { ! $auth_select[$auth] = ' <select name="' . $auth . '">'; ! for( $k = 0; $k < count( $cat_auth_levels ); $k++ ) { ! $selected = ( $this->cat_rowset[$cat_id][$auth] == $cat_auth_const[$k] ) ? ' selected="selected"' : ''; ! $auth_select[$auth] .= '<option value="' . $cat_auth_const[$k] . '"' . $selected . '>' . $lang['Cat_' . $cat_auth_levels[$k]] . '</option>'; } + $auth_select[$auth] .= '</select> '; + } + + foreach( $global_approval_auth as $auth ) + { + $auth_select_approval[$auth] = ' <select name="' . $auth . '">'; + for( $k = 0; $k < count( $cat_auth_approval_levels ); $k++ ) + { + $selected = ( $this->cat_rowset[$cat_id][$auth] == $cat_auth_approval_const[$k] ) ? ' selected="selected"' : ''; + $auth_select_approval[$auth] .= '<option value="' . $cat_auth_approval_const[$k] . '"' . $selected . '>' . $lang['Cat_' . $cat_auth_approval_levels[$k]] . '</option>'; + } + $auth_select_approval[$auth] .= '</select> '; + } // *************** *** 415,419 **** 'L_NONE' => $lang['None'], ! 'PARENT_LIST' => $this->generate_jumpbox( '', $cat_id, $parent, true, true ), 'S_ACTION' => append_sid( "admin_kb.$phpEx?action=cat_manage&mode=edit" ), --- 472,482 ---- 'L_NONE' => $lang['None'], ! 'CHECKED_YES' => $checked_yes, ! 'CHECKED_NO' => $checked_no, ! 'L_CAT_ALLOWFILE' => $lang['Allow_file'], ! 'L_CAT_ALLOWFILE_INFO' => $lang['Allow_file_info'], ! ! //'PARENT_LIST' => $this->generate_jumpbox( '', $cat_id, $parent, true, true ), ! 'PARENT_LIST' => $this->generate_jumpbox( 0, 0, array( $parent => 1 )), 'S_ACTION' => append_sid( "admin_kb.$phpEx?action=cat_manage&mode=edit" ), *************** *** 509,521 **** 'S_VIEW_LEVEL' => $auth_select['auth_view'], - 'L_UPLOAD_LEVEL' => $lang['Upload_level'], - 'S_UPLOAD_LEVEL' => $auth_select['auth_post'], - - 'L_RATE_LEVEL' => $lang['Rate_level'], - 'S_RATE_LEVEL' => $auth_select['auth_rate'], - - 'L_COMMENT_LEVEL' => $lang['Comment_level'], - 'S_COMMENT_LEVEL' => $auth_select['auth_comment'], - 'L_EDIT_LEVEL' => $lang['Edit_level'], 'S_EDIT_LEVEL' => $auth_select['auth_edit'], --- 572,575 ---- *************** *** 524,532 **** 'S_DELETE_LEVEL' => $auth_select['auth_delete'], 'L_APPROVAL_LEVEL' => $lang['Approval_level'], ! 'S_APPROVAL_LEVEL' => $auth_select['auth_approval'], 'L_APPROVAL_EDIT_LEVEL' => $lang['Approval_edit_level'], ! 'S_APPROVAL_EDIT_LEVEL' => $auth_select['auth_approval_edit'], 'L_DISABLED' => $lang['Disabled'], --- 578,604 ---- 'S_DELETE_LEVEL' => $auth_select['auth_delete'], + 'L_UPLOAD_LEVEL' => $lang['Upload_level'], + 'S_UPLOAD_LEVEL' => $auth_select['auth_post'], + 'L_APPROVAL_LEVEL' => $lang['Approval_level'], ! 'S_APPROVAL_LEVEL' => $auth_select_approval['auth_approval'], 'L_APPROVAL_EDIT_LEVEL' => $lang['Approval_edit_level'], ! 'S_APPROVAL_EDIT_LEVEL' => $auth_select_approval['auth_approval_edit'], ! ! 'L_RATE_LEVEL' => $lang['Rate_level'], ! 'S_RATE_LEVEL' => $auth_select['auth_rate'], ! ! 'L_VIEW_COMMENT_LEVEL' => $lang['View_Comment_level'], ! 'S_VIEW_COMMENT_LEVEL' => $auth_select['auth_view_comment'], ! ! 'L_POST_COMMENT_LEVEL' => $lang['Post_Comment_level'], ! 'S_POST_COMMENT_LEVEL' => $auth_select['auth_post_comment'], ! ! 'L_EDIT_COMMENT_LEVEL' => $lang['Edit_Comment_level'], ! 'S_EDIT_COMMENT_LEVEL' => $auth_select['auth_edit_comment'], ! ! 'L_DELETE_COMMENT_LEVEL' => $lang['Delete_Comment_level'], ! 'S_DELETE_COMMENT_LEVEL' => $auth_select['auth_delete_comment'], 'L_DISABLED' => $lang['Disabled'], *************** *** 542,545 **** --- 614,618 ---- $number_articles = intval( $_POST['number_articles'] ); $parent = intval( $_POST['parent'] ); + $cat_allow_file = intval( $_POST['cat_allow_file'] ); $cat_use_comments = ( isset( $_POST['cat_allow_comments'] ) ) ? intval( $_POST['cat_allow_comments'] ) : 0; *************** *** 556,567 **** $view_level = intval( $_POST['auth_view'] ); - $post_level = intval( $_POST['auth_post'] ); - $rate_level = intval( $_POST['auth_rate'] ); - $comment_level = intval( $_POST['auth_comment'] ); $edit_level = intval( $_POST['auth_edit'] ); $delete_level = intval( $_POST['auth_delete'] ); $approval_level = intval( $_POST['auth_approval'] ); $approval_edit_level = intval( $_POST['auth_approval_edit'] ); if ( !$cat_name ) { --- 629,644 ---- $view_level = intval( $_POST['auth_view'] ); $edit_level = intval( $_POST['auth_edit'] ); $delete_level = intval( $_POST['auth_delete'] ); + $post_level = intval( $_POST['auth_post'] ); $approval_level = intval( $_POST['auth_approval'] ); $approval_edit_level = intval( $_POST['auth_approval_edit'] ); + $rate_level = intval( $_POST['auth_rate'] ); + $comment_view_level = intval( $_POST['auth_view_comment'] ); + $comment_post_level = intval( $_POST['auth_post_comment'] ); + $comment_edit_level = intval( $_POST['auth_edit_comment'] ); + $comment_delete_level = intval( $_POST['auth_delete_comment'] ); + if ( !$cat_name ) { *************** *** 569,573 **** } ! $sql = "UPDATE " . KB_CATEGORIES_TABLE . " SET category_name = '" . $cat_name . "', category_details = '" . $cat_desc . "', number_articles = '" . $number_articles . "', parent = '" . $parent . "', auth_view = '" . $view_level . "', auth_post = '" . $post_level . "', auth_rate = '" . $rate_level . "', auth_comment = '" . $comment_level . "', auth_edit = '" . $edit_level . "', auth_delete = '" . $delete_level . "', auth_approval = '" . $approval_level . "', auth_approval_edit = '" . $approval_edit_level . "', cat_allow_comments = '" . $cat_use_comments . "', internal_comments = '" . $cat_internal_comments . "', autogenerate_comments = '" . $cat_autogenerate_comments . "', cat_allow_ratings = '" . $cat_use_ratings . "', notify = '" . $cat_notify . "', notify_group = '" . $cat_notify_group . "', show_pretext = '" . $cat_show_pretext . "', comments_forum_id = '" . $comments_forum_id . "' WHERE category_id = " . $cat_id; if ( !( $results = $db->sql_query( $sql ) ) ) --- 646,650 ---- } ! $sql = "UPDATE " . KB_CATEGORIES_TABLE . " SET category_name = '" . $cat_name . "', category_details = '" . $cat_desc . "', number_articles = '" . $number_articles . "', cat_allow_file = '" . $cat_allow_file . "', parent = '" . $parent . "', auth_view = '" . $view_level . "', auth_post = '" . $post_level . "', auth_rate = '" . $rate_level . "', auth_view_comment = '" . $comment_view_level . "', auth_post_comment = '" . $comment_post_level . "', auth_edit_comment = '" . $comment_edit_level . "', auth_delete_comment = '" . $comment_delete_level . "', auth_edit = '" . $edit_level . "', auth_delete = '" . $delete_level . "', auth_approval = '" . $approval_level . "', auth_approval_edit = '" . $approval_edit_level . "', cat_allow_comments = '" . $cat_use_comments . "', internal_comments = '" . $cat_internal_comments . "', autogenerate_comments = '" . $cat_autogenerate_comments . "', cat_allow_ratings = '" . $cat_use_ratings . "', notify = '" . $cat_notify . "', notify_group = '" . $cat_notify_group . "', show_pretext = '" . $cat_show_pretext . "', comments_forum_id = '" . $comments_forum_id . "' WHERE category_id = " . $cat_id; if ( !( $results = $db->sql_query( $sql ) ) ) *************** *** 617,621 **** 'S_HIDDEN_FIELDS' => '<input type="hidden" name="catid" value="' . $cat_id . '">', ! 'S_SELECT_TO' => $this->generate_jumpbox( '', $cat_id, 0, true, true ), 'S_ACTION' => append_sid( "admin_kb.$phpEx?action=cat_manage&mode=delete" ), --- 694,699 ---- 'S_HIDDEN_FIELDS' => '<input type="hidden" name="catid" value="' . $cat_id . '">', ! //'S_SELECT_TO' => $this->generate_jumpbox( '', $cat_id, 0, true, true ), ! 'S_SELECT_TO' => $this->generate_jumpbox( 0, 0, array( $cat_id => 1 )), 'S_ACTION' => append_sid( "admin_kb.$phpEx?action=cat_manage&mode=delete" ), *************** *** 797,801 **** break; - } --- 875,878 ---- Index: admin_settings.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/kb/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:21:36 -0000 1.1 --- admin_settings.php 1 Aug 2006 21:00:37 -0000 1.2 *************** *** 116,120 **** $sort_method_options = array(); ! $sort_method_options = array( "Latest", "Creation", "Id", "Userrank", "Alphabetic" ); $sort_method_list = '<select name="sort_method">'; --- 116,120 ---- $sort_method_options = array(); ! $sort_method_options = array( "Alphabetic", "Latest", "Toprated", "Most_popular", "Userrank", "Id" ); $sort_method_list = '<select name="sort_method">'; *************** *** 161,164 **** --- 161,167 ---- $cat_col = $new['cat_col']; + $use_simple_navigation_yes = ( $new['use_simple_navigation'] ) ? "checked=\"checked\"" : ""; + $use_simple_navigation_no = ( !$new['use_simple_navigation'] ) ? "checked=\"checked\"" : ""; + // // Instructions *************** *** 377,381 **** 'CAT_COL' => $cat_col, ! 'L_CAT_COL' => $lang['cat_col'], 'L_NFDAYS' => $lang['Nfdays'], --- 380,389 ---- 'CAT_COL' => $cat_col, ! 'L_CAT_COL' => $lang['Cat_col'], ! ! 'S_USE_SIMPLE_NAVIGATION_YES' => $use_simple_navigation_yes, ! 'S_USE_SIMPLE_NAVIGATION_NO' => $use_simple_navigation_no, ! 'L_USE_SIMPLE_NAVIGATION' => $lang['Use_simple_navigation'], ! 'L_USE_SIMPLE_NAVIGATION_EXPLAIN' => $lang['Use_simple_navigation_explain'], 'L_NFDAYS' => $lang['Nfdays'], Index: admin_auth_manage.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/kb/admin/admin_auth_manage.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** admin_auth_manage.php 8 Jul 2006 10:21:36 -0000 1.1 --- admin_auth_manage.php 1 Aug 2006 21:00:37 -0000 1.2 *************** *** 30,34 **** if ( !isset( $_POST['submit'] ) ) { ! $s_kb_cat_list = $this->generate_jumpbox( '', 0, 0, 0, true ); $template->set_filenames( array( 'body' => 'admin/kb_cat_select_body.tpl' ) ); --- 30,35 ---- if ( !isset( $_POST['submit'] ) ) { ! //$s_kb_cat_list = $this->generate_jumpbox( '', 0, 0, 0, true ); ! $s_kb_cat_list = $this->generate_jumpbox( ); $template->set_filenames( array( 'body' => 'admin/kb_cat_select_body.tpl' ) ); *************** *** 61,71 **** 'L_VIEW' => $lang['View'], - 'L_UPLOAD' => $lang['Upload'], - 'L_RATE' => $lang['Rate'], - 'L_COMMENT' => $lang['Comment'], 'L_EDIT' => $lang['Edit'], 'L_DELETE' => $lang['Delete'], ! // 'L_APPROVAL' => $lang['Approval'], ! // 'L_APPROVAL_EDIT' => $lang['Approval_edit'], 'L_IS_MODERATOR' => $lang['Is_Moderator'], --- 62,73 ---- 'L_VIEW' => $lang['View'], 'L_EDIT' => $lang['Edit'], 'L_DELETE' => $lang['Delete'], ! 'L_UPLOAD' => $lang['Upload'], ! 'L_RATE' => $lang['Rate'], ! 'L_VIEW_COMMENT' => $lang['View_Comment_level'], ! 'L_POST_COMMENT' => $lang['Post_Comment_level'], ! 'L_EDIT_COMMENT' => $lang['Edit_Comment_level'], ! 'L_DELETE_COMMENT' => $lang['Delete_Comment_level'], 'L_IS_MODERATOR' => $lang['Is_Moderator'], *************** *** 93,97 **** // Get info of this cat // ! $sql = "SELECT category_id, category_name, auth_view_groups, auth_post_groups, auth_rate_groups, auth_comment_groups, auth_edit_groups, auth_delete_groups, auth_approval_groups, auth_approval_edit_groups, auth_moderator_groups FROM " . KB_CATEGORIES_TABLE . " WHERE category_id = '$cat_id'"; --- 95,99 ---- // Get info of this cat // ! $sql = "SELECT * FROM " . KB_CATEGORIES_TABLE . " WHERE category_id = '$cat_id'"; *************** *** 104,114 **** $view_groups = @explode( ',', $thiscat['auth_view_groups'] ); - $post_groups = @explode( ',', $thiscat['auth_post_groups'] ); - $rate_groups = @explode( ',', $thiscat['auth_rate_groups'] ); - $comment_groups = @explode( ',', $thiscat['auth_comment_groups'] ); $edit_groups = @explode( ',', $thiscat['auth_edit_groups'] ); $delete_groups = @explode( ',', $thiscat['auth_delete_groups'] ); ! // $approval_groups = @explode( ',', $thiscat['auth_approval_groups'] ); ! // $approval_edit_groups = @explode( ',', $thiscat['auth_approval_edit_groups'] ); $moderator_groups = @explode( ',', $thiscat['auth_moderator_groups'] ); --- 106,117 ---- $view_groups = @explode( ',', $thiscat['auth_view_groups'] ); $edit_groups = @explode( ',', $thiscat['auth_edit_groups'] ); $delete_groups = @explode( ',', $thiscat['auth_delete_groups'] ); ! $post_groups = @explode( ',', $thiscat['auth_post_groups'] ); ! $rate_groups = @explode( ',', $thiscat['auth_rate_groups'] ); ! $comment_view_groups = @explode( ',', $thiscat['auth_view_comment_groups'] ); ! $comment_post_groups = @explode( ',', $thiscat['auth_post_comment_groups'] ); ! $comment_edit_groups = @explode( ',', $thiscat['auth_edit_comment_groups'] ); ! $comment_delete_groups = @explode( ',', $thiscat['auth_delete_comment_groups'] ); $moderator_groups = @explode( ',', $thiscat['auth_moderator_groups'] ); *************** *** 119,131 **** 'GROUP_ID' => $groupdata[$i]['group_id'], 'GROUP_NAME' => $groupdata[$i]['group_name'], ! 'VIEW_CHECKED' => ( in_array( $groupdata[$i]['group_id'], $view_groups ) ) ? 'checked="checked"' : '', ! 'POST_CHECKED' => ( in_array( $groupdata[$i]['group_id'], $post_groups ) ) ? 'checked="checked"' : '', ! 'RATE_CHECKED' => ( in_array( $groupdata[$i]['group_id'], $rate_groups ) ) ? 'checked="checked"' : '', ! 'COMMENT_CHECKED' => ( in_array( $groupdata[$i]['group_id'], $comment_groups ) ) ? 'checked="checked"' : '', ! 'EDIT_CHECKED' => ( in_array( $groupdata[$i]['group_id'], $edit_groups ) ) ? 'checked="checked"' : '', ! 'DELETE_CHECKED' => ( in_array( $groupdata[$i]['group_id'], $delete_groups ) ) ? 'checked="checked"' : '', ! // 'APPROVAL_CHECKED' => ( in_array( $groupdata[$i]['group_id'], $approval_groups ) ) ? 'checked="checked"' : '', ! // 'APPROVAL_EDIT_CHECKED' => ( in_array( $groupdata[$i]['group_id'], $approval_edit_groups ) ) ? 'checked="checked"' : '', ! 'MODERATOR_CHECKED' => ( in_array( $groupdata[$i]['group_id'], $moderator_groups ) ) ? 'checked="checked"' : '' )); } --- 122,135 ---- 'GROUP_ID' => $groupdata[$i]['group_id'], 'GROUP_NAME' => $groupdata[$i]['group_name'], ! 'VIEW_CHECKED' => $thiscat['auth_view'] != AUTH_ACL ? 'disabled' : (( in_array( $groupdata[$i]['group_id'], $view_groups ) ) ? 'checked="checked"' : ''), ! 'EDIT_CHECKED' => $thiscat['auth_edit'] != AUTH_ACL ? 'disabled' : (( in_array( $groupdata[$i]['group_id'], $edit_groups ) ) ? 'checked="checked"' : ''), ! 'DELETE_CHECKED' => $thiscat['auth_delete'] != AUTH_ACL ? 'disabled' : (( in_array( $groupdata[$i]['group_id'], $delete_groups ) ) ? 'checked="checked"' : ''), ! 'POST_CHECKED' => $thiscat['auth_post'] != AUTH_ACL ? 'disabled' : (( in_array( $groupdata[$i]['group_id'], $post_groups ) ) ? 'checked="checked"' : ''), ! 'RATE_CHECKED' => $thiscat['auth_rate'] != AUTH_ACL ? 'disabled' : (( in_array( $groupdata[$i]['group_id'], $rate_groups ) ) ? 'checked="checked"' : ''), ! 'COMMENT_VIEW_CHECKED' => $thiscat['auth_view_comment'] != AUTH_ACL ? 'disabled' : (( in_array( $groupdata[$i]['group_id'], $comment_view_groups ) ) ? 'checked="checked"' : ''), ! 'COMMENT_POST_CHECKED' => $thiscat['auth_post_comment'] != AUTH_ACL ? 'disabled' : (( in_array( $groupdata[$i]['group_id'], $comment_post_groups ) ) ? 'checked="checked"' : ''), ! 'COMMENT_EDIT_CHECKED' => $thiscat['auth_edit_comment'] != AUTH_ACL ? 'disabled' : (( in_array( $groupdata[$i]['group_id'], $comment_edit_groups ) ) ? 'checked="checked"' : ''), ! 'COMMENT_DELETE_CHECKED' => $thiscat['auth_delete_comment'] != AUTH_ACL ? 'disabled' : (( in_array( $groupdata[$i]['group_id'], $comment_delete_groups ) ) ? 'checked="checked"' : ''), ! 'MODERATOR_CHECKED' => (( in_array( $groupdata[$i]['group_id'], $moderator_groups ) ) ? 'checked="checked"' : '') )); } *************** *** 138,152 **** $view_groups = @implode( ',', $_POST['view'] ); - $post_groups = @implode( ',', $_POST['post'] ); - $rate_groups = @implode( ',', $_POST['rate'] ); - $comment_groups = @implode( ',', $_POST['comment'] ); $edit_groups = @implode( ',', $_POST['edit'] ); $delete_groups = @implode( ',', $_POST['delete'] ); ! // $approval_groups = @implode( ',', $_POST['approval'] ); ! // $approval_edit_groups = @implode( ',', $_POST['approval_edit'] ); $moderator_groups = @implode( ',', $_POST['moderator'] ); $sql = "UPDATE " . KB_CATEGORIES_TABLE . " ! SET auth_view_groups = '$view_groups', auth_post_groups = '$post_groups', auth_rate_groups = '$rate_groups', auth_comment_groups = '$comment_groups', auth_edit_groups = '$edit_groups', auth_delete_groups = '$delete_groups', auth_approval_groups = '$approval_groups', auth_approval_edit_groups = '$approval_edit_groups', auth_moderator_groups = '$moderator_groups' WHERE category_id = '$cat_id'"; if ( !$result = $db->sql_query( $sql ) ) --- 142,157 ---- $view_groups = @implode( ',', $_POST['view'] ); $edit_groups = @implode( ',', $_POST['edit'] ); $delete_groups = @implode( ',', $_POST['delete'] ); ! $post_groups = @implode( ',', $_POST['post'] ); ! $rate_groups = @implode( ',', $_POST['rate'] ); ! $comment_view_groups = @implode( ',', $_POST['view_comment'] ); ! $comment_post_groups = @implode( ',', $_POST['post_comment'] ); ! $comment_edit_groups = @implode( ',', $_POST['edit_comment'] ); ! $comment_delete_groups = @implode( ',', $_POST['delete_comment'] ); $moderator_groups = @implode( ',', $_POST['moderator'] ); $sql = "UPDATE " . KB_CATEGORIES_TABLE . " ! SET auth_view_groups = '$view_groups', auth_post_groups = '$post_groups', auth_rate_groups = '$rate_groups', auth_view_comment_groups = '$comment_view_groups', auth_post_comment_groups = '$comment_post_groups', auth_edit_comment_groups = '$comment_edit_groups', auth_delete_comment_groups = '$comment_delete_groups', auth_edit_groups = '$edit_groups', auth_delete_groups = '$delete_groups', auth_approval_groups = '$approval_groups', auth_approval_edit_groups = '$approval_edit_groups', auth_moderator_groups = '$moderator_groups' WHERE category_id = '$cat_id'"; if ( !$result = $db->sql_query( $sql ) ) Index: admin_types_manage.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/kb/admin/admin_types_manage.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** admin_types_manage.php 8 Jul 2006 10:21:36 -0000 1.1 --- admin_types_manage.php 1 Aug 2006 21:00:37 -0000 1.2 *************** *** 149,154 **** } // Generate page ! $template->set_filenames( array( 'body' => 'admin/kb_cat_del_body.tpl' ) ); --- 149,155 ---- } + // // Generate page ! // $template->set_filenames( array( 'body' => 'admin/kb_cat_del_body.tpl' ) ); --- admin_article_manage.php DELETED --- Index: admin_custom_manage.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/kb/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:21:36 -0000 1.1 --- admin_custom_manage.php 1 Aug 2006 21:00:37 -0000 1.2 *************** *** 25,30 **** include_once( $phpbb_root_path . 'includes/functions_search.' . $phpEx ); ! include_once( $module_root_path . 'kb/includes/functions_field.' . $phpEx ); ! $this_custom_field = new mx_kb_custom_field(); $this_custom_field->init(); --- 25,29 ---- include_once( $phpbb_root_path . 'includes/functions_search.' . $phpEx ); ! $this_custom_field = new mx_custom_field(KB_CUSTOM_TABLE, KB_CUSTOM_DATA_TABLE); $this_custom_field->init(); |