コード例 #1
0
ファイル: admin_forums.php プロジェクト: puring0815/OpenKore
                message_die(GENERAL_ERROR, "Couldn't change category order", "", __LINE__, __FILE__, $sql);
            }
            renumber_order('forum', $forum_info['cat_id']);
            $show_index = TRUE;
            break;
        case 'cat_order':
            //
            // Change order of categories in the DB
            //
            $move = intval($HTTP_GET_VARS['move']);
            $cat_id = intval($HTTP_GET_VARS[POST_CAT_URL]);
            $sql = "UPDATE " . CATEGORIES_TABLE . "\n\t\t\t\tSET cat_order = cat_order + {$move}\n\t\t\t\tWHERE cat_id = {$cat_id}";
            if (!($result = $db->sql_query($sql))) {
                message_die(GENERAL_ERROR, "Couldn't change category order", "", __LINE__, __FILE__, $sql);
            }
            renumber_order('category');
            $show_index = TRUE;
            break;
        case 'forum_sync':
            sync('forum', intval($HTTP_GET_VARS[POST_FORUM_URL]));
            $show_index = TRUE;
            break;
        default:
            message_die(GENERAL_MESSAGE, $lang['No_mode']);
            break;
    }
    if ($show_index != TRUE) {
        include './page_footer_admin.' . $phpEx;
        exit;
    }
}
コード例 #2
0
ファイル: admin_forums.php プロジェクト: nmpetkov/ZphpBB2
     // End PNphpBB2 Categories Hierarchie Mod
     message_die(GENERAL_MESSAGE, $message);
     break;
 case 'forum_order':
     //
     // Change order of forums in the DB
     //
     $move = intval($_GET['move']);
     $forum_id = intval($_GET[POST_FORUM_URL]);
     $forum_info = get_info('forum', $forum_id);
     $cat_id = $forum_info['cat_id'];
     $sql = "UPDATE " . FORUMS_TABLE . "\n\t\t\t\tSET forum_order = forum_order + {$move}\n\t\t\t\tWHERE forum_id = {$forum_id}";
     if (!($result = $db->sql_query($sql))) {
         message_die(GENERAL_ERROR, "Couldn't change category order", "", __LINE__, __FILE__, $sql);
     }
     renumber_order('forum', $forum_info['cat_id']);
     $show_index = TRUE;
     break;
 case 'cat_order':
     //
     // Change order of categories in the DB
     //
     $move = intval($_GET['move']);
     $cat_id = intval($_GET[POST_CAT_URL]);
     // Begin PNphpBB2 Categories Hierarchie Mod
     /*			
     			$sql = "UPDATE " . CATEGORIES_TABLE . "
     				SET cat_order = cat_order + $move
     				WHERE cat_id = $cat_id";
     			if( !$result = $db->sql_query($sql) )
     			{