|
From: Jon O. <jon...@us...> - 2006-08-01 21:02:24
|
Update of /cvsroot/mxbb/mx_linkdb/linkdb/admin In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv22573/modules/mx_linkdb/linkdb/admin Modified Files: admin_auth_manage.php admin_cat_manage.php admin_setting.php Added Files: admin_custom_manage.php Removed Files: admin_link_manage.php Log Message: massive update --- NEW FILE: admin_custom_manage.php --- <?php /** * * @package mxBB Portal Module - mx_kb * @version $Id: admin_custom_manage.php,v 1.1 2006/08/01 21:02:19 jonohlsson Exp $ * @copyright (c) 2002-2006 [wGEric, Jon Ohlsson] mxBB Project Team * @license http://opensource.org/licenses/gpl-license.php GNU General Public License v2 * */ if ( !defined( 'IN_PORTAL' ) || !defined( 'IN_ADMIN' ) ) { die( "Hacking attempt" ); } class linkdb_custom_manage extends linkdb_admin { function main( $action ) { global $db, $images, $template, $lang, $phpEx, $linkdb_functions, $linkdb_cache, $link_config, $phpbb_root_path, $module_root_path, $mx_root_path, $mx_request_vars; // // Includes // include_once( $phpbb_root_path . 'includes/functions_search.' . $phpEx ); $this_custom_field = new mx_custom_field(LINK_CUSTOM_TABLE, LINK_CUSTOM_DATA_TABLE); $this_custom_field->init(); $mode = ( isset( $_REQUEST['mode'] ) ) ? htmlspecialchars( $_REQUEST['mode'] ) : 'select'; $field_id = ( isset( $_REQUEST['field_id'] ) ) ? intval( $_REQUEST['field_id'] ) : 0; $field_type = ( isset( $_REQUEST['field_type'] ) ) ? intval( $_REQUEST['field_type'] ) : $this_custom_field->field_rowset[$field_id]['field_type']; $field_ids = ( isset( $_REQUEST['field_ids'] ) ) ? $_REQUEST['field_ids'] : ''; $submit = ( isset( $_POST['submit'] ) ) ? true : false; switch ( $mode ) { case 'addfield': $template_file = 'admin/linkdb_field_add.tpl'; break; case 'editfield': $template_file = 'admin/linkdb_field_add.tpl'; break; case 'edit': $template_file = 'admin/linkdb_select_field_edit.tpl'; break; case 'add': $template_file = 'admin/linkdb_select_field_type.tpl'; break; case 'delete': $template_file = 'admin/linkdb_select_field_delete.tpl'; break; case 'select': $template_file = 'admin/linkdb_select.tpl'; break; } if ( $submit ) { if ( $mode == 'do_add' && !$field_id ) { $this_custom_field->update_add_field( $field_type ); $message = $lang['Fieldadded'] . '<br /><br />' . sprintf( $lang['Click_return'], '<a href="' . append_sid( 'admin_linkdb.' . $phpEx . '?action=custom_manage' ) . '">', '</a>' ) . '<br /><br />' . sprintf( $lang['Click_return_admin_index'], '<a href="' . append_sid( 'index.' . $phpEx . '?pane=right' ) . '">', '</a>' ); mx_message_die( GENERAL_MESSAGE, $message ); } elseif ( $mode == 'do_add' && $field_id ) { $this_custom_field->update_add_field( $field_type, $field_id ); $message = $lang['Fieldedited'] . '<br /><br />' . sprintf( $lang['Click_return'], '<a href="' . append_sid( 'admin_linkdb.' . $phpEx . '?action=custom_manage' ) . '">', '</a>' ) . '<br /><br />' . sprintf( $lang['Click_return_admin_index'], '<a href="' . append_sid( 'index.' . $phpEx . '?pane=right' ) . '">', '</a>' ); mx_message_die( GENERAL_MESSAGE, $message ); } elseif ( $mode == 'do_delete' ) { foreach( $field_ids as $key => $value ) { $this_custom_field->delete_field( $key ); } $message = $lang['Fieldsdel'] . '<br /><br />' . sprintf( $lang['Click_return'], '<a href="' . append_sid( 'admin_linkdb.' . $phpEx . '?action=custom_manage' ) . '">', '</a>' ) . '<br /><br />' . sprintf( $lang['Click_return_admin_index'], '<a href="' . append_sid( 'index.' . $phpEx . '?pane=right' ) . '">', '</a>' ); mx_message_die( GENERAL_MESSAGE, $message ); } } $template->set_filenames( array( 'admin' => $template_file ) ); switch ( $mode ) { case 'add': case 'addfield': $l_title = $lang['Afieldtitle']; break; case 'edit': $l_title = $lang['Efieldtitle']; break; case 'editfield': $l_title = $lang['Efieldtitle']; break; case 'delete': $l_title = $lang['Dfieldtitle']; break; case 'select': $l_title = $lang['Mfieldtitle']; break; } if ( $mode == 'add' ) { $s_hidden_fields = '<input type="hidden" name="mode" value="addfield">'; } elseif ( $mode == 'addfield' || $mode == 'editfield') { $s_hidden_fields = '<input type="hidden" name="field_type" value="' . $field_type . '">'; $s_hidden_fields .= '<input type="hidden" name="field_id" value="' . $field_id . '">'; $s_hidden_fields .= '<input type="hidden" name="mode" value="do_add">'; } elseif ( $mode == 'edit' ) { $s_hidden_fields = '<input type="hidden" name="mode" value="editfield">'; } elseif ( $mode == 'delete' ) { $s_hidden_fields = '<input type="hidden" name="mode" value="do_delete">'; } $template->assign_vars( array( 'L_FIELD_TITLE' => $l_title, 'L_FIELD_EXPLAIN' => $lang['Fieldexplain'], 'L_SELECT_TITLE' => $lang['Fieldselecttitle'], 'S_HIDDEN_FIELDS' => $s_hidden_fields, 'S_FIELD_ACTION' => append_sid( "admin_linkdb.$phpEx?action=custom_manage" ) )); if ( $mode == 'addfield' || $mode == 'editfield') { if ( $field_id ) { $data = $this_custom_field->get_field_data( $field_id ); } $template->assign_vars( array( 'L_FIELD_NAME' => $lang['Fieldname'], 'L_FIELD_NAME_INFO' => $lang['Fieldnameinfo'], 'L_FIELD_DESC' => $lang['Fielddesc'], 'L_FIELD_DESC_INFO' => $lang['Fielddescinfo'], 'L_FIELD_DATA' => $lang['Field_data'], 'L_FIELD_DATA_INFO' => $lang['Field_data_info'], 'L_FIELD_REGEX' => $lang['Field_regex'], 'L_FIELD_REGEX_INFO' => sprintf( $lang['Field_regex_info'], '<a href="http://www.php.net/manual/en/function.preg-match.php" target="_blank">', '</a>' ), 'L_FIELD_ORDER' => $lang['Field_order'], //'DATA' => ( $field_type != INPUT && $field_type != TEXTAREA ) ? true : false, //'REGEX' => ( $field_type == INPUT || $field_type == TEXTAREA ) ? true : false, //'ORDER' => ( $field_id ) ? true : false, 'FIELD_NAME' => $data['custom_name'], 'FIELD_DESC' => $data['custom_description'], 'FIELD_DATA' => $data['data'], 'FIELD_REGEX' => $data['regex'], 'FIELD_ORDER' => $data['field_order'] )); if ( $field_type != INPUT && $field_type != TEXTAREA ) { $template->assign_block_vars( 'data', array() ); } if ( $field_type == INPUT || $field_type == TEXTAREA ) { $template->assign_block_vars( 'regex', array() ); } if ( $field_id ) { $template->assign_block_vars( 'order', array() ); } } elseif ( $mode == 'add' ) { $field_types = array( INPUT => $lang['Field_Input'], TEXTAREA => $lang['Field_Textarea'], RADIO => $lang['Field_Radio'], SELECT => $lang['Field_Select'], SELECT_MULTIPLE => $lang['Field_Select_multiple'], CHECKBOX => $lang['Field_Checkbox'] ); $field_type_list = '<select name="field_type">'; foreach( $field_types as $key => $value ) { $field_type_list .= '<option value="' . $key . '">' . $value . '</option>'; } $field_type_list .= '</select>'; $template->assign_vars( array( 'S_SELECT_FIELD_TYPE' => $field_type_list ) ); } elseif ( $mode == 'edit' || $mode == 'delete' || $mode == 'select' ) { foreach( $this_custom_field->field_rowset as $field_id => $field_data ) { $template->assign_block_vars( 'field_row', array( 'FIELD_ID' => $field_id, 'FIELD_NAME' => $field_data['custom_name'], 'FIELD_DESC' => $field_data['custom_description'] )); } } $template->pparse( 'admin' ); } } ?> Index: admin_cat_manage.php =================================================================== RCS file: /cvsroot/mxbb/mx_linkdb/linkdb/admin/admin_cat_manage.php,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** admin_cat_manage.php 8 Jul 2006 10:22:38 -0000 1.8 --- admin_cat_manage.php 1 Aug 2006 21:02:19 -0000 1.9 *************** *** 189,199 **** // $this->cat_rowset[$cat_id]['auth_view'] = 0; - $this->cat_rowset[$cat_id]['auth_post'] = 1; - $this->cat_rowset[$cat_id]['auth_rate'] = 1; - $this->cat_rowset[$cat_id]['auth_comment'] = 1; $this->cat_rowset[$cat_id]['auth_edit'] = 1; $this->cat_rowset[$cat_id]['auth_delete'] = 2; ! $this->cat_rowset[$cat_id]['auth_approval'] = 5; ! $this->cat_rowset[$cat_id]['auth_approval_edit'] = 5; } else --- 189,203 ---- // $this->cat_rowset[$cat_id]['auth_view'] = 0; $this->cat_rowset[$cat_id]['auth_edit'] = 1; $this->cat_rowset[$cat_id]['auth_delete'] = 2; ! $this->cat_rowset[$cat_id]['auth_post'] = 1; ! $this->cat_rowset[$cat_id]['auth_approval'] = 0; ! $this->cat_rowset[$cat_id]['auth_approval_edit'] = 0; ! ! $this->cat_rowset[$cat_id]['auth_rate'] = 1; ! $this->cat_rowset[$cat_id]['auth_view_comment'] = 1; ! $this->cat_rowset[$cat_id]['auth_post_comment'] = 1; ! $this->cat_rowset[$cat_id]['auth_edit_comment'] = 1; ! $this->cat_rowset[$cat_id]['auth_delete_comment'] = 1; } else *************** *** 269,274 **** $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(); foreach( $global_auth as $auth ) --- 273,285 ---- $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(); foreach( $global_auth as $auth ) *************** *** 278,286 **** { $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> '; } $template->assign_vars( array( 'CAT_NAME' => $cat_name, --- 289,308 ---- { $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 = ( $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> '; + } + $template->assign_vars( array( 'CAT_NAME' => $cat_name, *************** *** 288,291 **** --- 310,315 ---- 'CHECKED_YES' => $checked_yes, 'CHECKED_NO' => $checked_no, + 'L_CAT_ALLOWLINK' => $lang['Allow_link'], + 'L_CAT_ALLOWLINK_INFO' => $lang['Allow_link_info'], // *************** *** 368,373 **** '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'], --- 392,396 ---- 'L_CAT_PARENT' => $lang['Catparent'], 'L_CAT_PARENT_INFO' => $lang['Catparentinfo'], ! 'L_CAT_ALLOWCOMMENTS' => $lang['Allow_comments'], 'L_CAT_ALLOWCOMMENTS_INFO' => $lang['Allow_comments_info'], *************** *** 390,402 **** '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'], --- 413,416 ---- *************** *** 405,413 **** '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'], --- 419,445 ---- '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'], Index: admin_auth_manage.php =================================================================== RCS file: /cvsroot/mxbb/mx_linkdb/linkdb/admin/admin_auth_manage.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** admin_auth_manage.php 8 Jul 2006 10:22:38 -0000 1.2 --- admin_auth_manage.php 1 Aug 2006 21:02:19 -0000 1.3 *************** *** 30,34 **** if ( !isset( $_POST['submit'] ) ) { ! $s_auth_cat_list = $this->generate_jumpbox( 0, 0, '', true ); $template->set_filenames( array( 'body' => 'admin/linkdb_admin_select_body.tpl' ) ); --- 30,34 ---- if ( !isset( $_POST['submit'] ) ) { ! $s_auth_cat_list = $this->generate_jumpbox( 0, 0, '' ); $template->set_filenames( array( 'body' => 'admin/linkdb_admin_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'], --- 61,72 ---- '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 cat_id, cat_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 " . LINK_CATEGORIES_TABLE . " WHERE cat_id = '$cat_id'"; --- 94,98 ---- // Get info of this cat // ! $sql = "SELECT * FROM " . LINK_CATEGORIES_TABLE . " WHERE cat_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'] ); --- 105,116 ---- $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"' : '' )); } --- 121,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 " . LINK_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 cat_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 " . LINK_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 cat_id = '$cat_id'"; if ( !$result = $db->sql_query( $sql ) ) --- admin_link_manage.php DELETED --- Index: admin_setting.php =================================================================== RCS file: /cvsroot/mxbb/mx_linkdb/linkdb/admin/admin_setting.php,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** admin_setting.php 8 Jul 2006 10:22:38 -0000 1.11 --- admin_setting.php 1 Aug 2006 21:02:19 -0000 1.12 *************** *** 110,113 **** --- 110,116 ---- $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 *************** *** 229,235 **** 'SITE_URL' => $new['site_url'], - 'L_SETTINGS_LINK_PAGE' => $lang['settings_link_page'], - 'SETTINGS_LINK_PAGE' => $new['settings_link_page'], - 'L_LOCK_SUBMIT_SITE' => $lang['lock_submit_site'], 'LOCK_SUBMIT_SITE_YES' => ( $new['lock_submit_site'] ) ? "checked=\"checked\"" : "", --- 232,235 ---- *************** *** 279,283 **** 'CAT_COL' => $cat_col, ! 'L_CAT_COL' => $lang['cat_col'], 'L_NFDAYS' => $lang['Nfdays'], --- 279,288 ---- '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'], |