|
From: Jon O. <jon...@us...> - 2007-05-31 19:53:31
|
Update of /cvsroot/mxbb/mx_linkdb/linkdb/admin In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv23973/admin Modified Files: admin_auth_manage.php admin_cat_manage.php Log Message: minor fixes Index: admin_cat_manage.php =================================================================== RCS file: /cvsroot/mxbb/mx_linkdb/linkdb/admin/admin_cat_manage.php,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** admin_cat_manage.php 18 Aug 2006 08:02:45 -0000 1.11 --- admin_cat_manage.php 31 May 2007 19:53:27 -0000 1.12 *************** *** 26,30 **** if ( $mode == 'do_add' && !$cat_id ) { ! $cat_id = $this->update_add_cat(); $mode = 'add'; if ( !sizeof( $this->error ) ) --- 26,30 ---- if ( $mode == 'do_add' && !$cat_id ) { ! $new_cat_id = $this->update_add_cat(); $mode = 'add'; if ( !sizeof( $this->error ) ) *************** *** 37,41 **** elseif ( $mode == 'do_add' && $cat_id ) { ! $cat_id = $this->update_add_cat( $cat_id ); if ( !sizeof( $this->error ) ) { --- 37,41 ---- elseif ( $mode == 'do_add' && $cat_id ) { ! $new_cat_id = $this->update_add_cat( $cat_id ); if ( !sizeof( $this->error ) ) { *************** *** 44,47 **** --- 44,48 ---- mx_message_die( GENERAL_MESSAGE, $message ); } + $mode = 'edit'; } elseif ( $mode == 'do_delete' ) *************** *** 471,563 **** $template->pparse( 'body' ); } - - function admin_cat_main( $cat_parent = 0, $depth = 0 ) - { - global $template, $phpEx; - static $i; - - $pre = str_repeat( ' ', $depth ); - if ( isset( $this->subcat_rowset[$cat_parent] ) ) - { - foreach( $this->subcat_rowset[$cat_parent] as $subcat_id => $cat_data ) - { - if ( $cat_parent == 0 ) - { - $i = 0; - $str = "cat"; - } - else - { - $i++; - $str = ( $i % 2 ) ? "row1" : "row2"; - } - $template->assign_block_vars( 'cat_row', array( - 'COLOR' => $str, - 'U_CAT' => append_sid( "admin_linkdb.$phpEx?action=cat_manage&cat_id" . $subcat_id ), - 'U_CAT_EDIT' => append_sid( "admin_linkdb.$phpEx?action=cat_manage&mode=edit&cat_id=$subcat_id" ), - 'U_CAT_DELETE' => append_sid( "admin_linkdb.$phpEx?action=cat_manage&mode=delete&cat_id=$subcat_id" ), - 'U_CAT_MOVE_UP' => append_sid( "admin_linkdb.$phpEx?action=cat_manage&mode=cat_order&move=-15&cat_id_other=$subcat_id" ), - 'U_CAT_MOVE_DOWN' => append_sid( "admin_linkdb.$phpEx?action=cat_manage&mode=cat_order&move=15&cat_id_other=$subcat_id" ), - 'U_CAT_RESYNC' => append_sid( "admin_linkdb.$phpEx?action=cat_manage&mode=sync&cat_id_other=$subcat_id" ), - 'CAT_NAME' => $cat_data['cat_name'], - 'PRE' => $pre ) - ); - $this->admin_cat_main( $subcat_id, $depth + 1 ); - } - return; - } - return; - } - - /** - * Enter description here... - * - * @param unknown_type $sel_id - * @param unknown_type $use_default_option - * @param unknown_type $select_name - * @return unknown - */ - function get_forums( $sel_id = 0, $use_default_option = false, $select_name = 'forum_id' ) - { - global $db, $lang; - - $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="'.$select_name.'">'; - - if ( $sel_id == 0 ) - { - $forumlist .= '<option value="0" selected >'.$lang['Select_topic_id'].'</option>'; - } - - if ( $use_default_option ) - { - $status = $sel_id == "-1" ? "selected" : ""; - $forumlist .= '<option value="-1" '.$status.' >::'.$lang['Use_default'].'::</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 --- 472,475 ---- Index: admin_auth_manage.php =================================================================== RCS file: /cvsroot/mxbb/mx_linkdb/linkdb/admin/admin_auth_manage.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** admin_auth_manage.php 28 Apr 2007 19:58:25 -0000 1.5 --- admin_auth_manage.php 31 May 2007 19:53:27 -0000 1.6 *************** *** 86,92 **** } ! while ( $kb_row = $db->sql_fetchrow( $result ) ) { ! $groupdata[] = $kb_row; } --- 86,92 ---- } ! while ( $linkdb_row = $db->sql_fetchrow( $result ) ) { ! $groupdata[] = $linkdb_row; } *************** *** 97,100 **** --- 97,101 ---- FROM " . LINK_CATEGORIES_TABLE . " WHERE cat_id = '$cat_id'"; + if ( !$result = $db->sql_query( $sql ) ) { |