當前位置: 首頁>>代碼示例>>PHP>>正文


PHP order::move_down方法代碼示例

本文整理匯總了PHP中order::move_down方法的典型用法代碼示例。如果您正苦於以下問題:PHP order::move_down方法的具體用法?PHP order::move_down怎麽用?PHP order::move_down使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在order的用法示例。


在下文中一共展示了order::move_down方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: order

}
// Get Settings
$query_settings = $database->query("SELECT sort_topics FROM " . TABLE_PREFIX . "mod_" . $tablename . "_settings WHERE section_id = '{$section_id}'");
$settings_fetch = $query_settings->fetchRow();
$sort_topics = $settings_fetch['sort_topics'];
// Include the ordering class
require WB_PATH . '/framework/class.order.php';
// Create new order object an reorder
$order = new order($table, 'position', $id_field, 'section_id');
$back_url = ADMIN_URL . '/pages/modify.php?page_id=' . $page_id . '&hl=' . $id . '#tpid' . $id;
if ($fredit == 1) {
    $back_url = WB_URL . '/modules/' . $mod_dir . '/modify_fe.php?page_id=' . $page_id . '&section_id=' . $section_id . '&fredit=1&hl=' . $id . '#tpid' . $id;
}
if ($sort_topics == 0) {
    if ($_GET['move'] == 'up') {
        $ok = $order->move_down($id);
    }
    if ($_GET['move'] == 'down') {
        $ok = $order->move_up($id);
    }
}
if ($sort_topics == -1) {
    if ($_GET['move'] == 'down') {
        $ok = $order->move_down($id);
    }
    if ($_GET['move'] == 'up') {
        $ok = $order->move_up($id);
    }
}
if ($ok) {
    $admin->print_success($TEXT['SUCCESS'], $back_url);
開發者ID:wyg3958,項目名稱:WebsiteBaker_CommunityEdition,代碼行數:31,代碼來源:move.php

示例2: isset

// Include WB admin wrapper script
require WB_PATH . '/modules/admin.php';
$backlink = ADMIN_URL . '/pages/modify.php?page_id=' . (int) $page_id;
// Get id
$pid = isset($aRequestVars['post_id']) ? $admin->checkIDKEY('post_id', false, 'GET') : 0;
$gid = isset($aRequestVars['group_id']) ? $admin->checkIDKEY('group_id', false, 'GET') : 0;
if (!$pid) {
    if (!$gid) {
        $admin->print_error($MESSAGE['GENERIC_SECURITY_ACCESS'], $backlink);
        exit;
    } else {
        $id = $gid;
        $id_field = 'group_id';
        $table = TABLE_PREFIX . 'mod_news_groups';
    }
} else {
    $id = $pid;
    $id_field = 'post_id';
    $table = TABLE_PREFIX . 'mod_news_posts';
}
// Include the ordering class
require WB_PATH . '/framework/class.order.php';
// Create new order object an reorder
$order = new order($table, 'position', $id_field, 'section_id');
if ($order->move_down($id)) {
    $admin->print_success($TEXT['SUCCESS'], $backlink);
} else {
    $admin->print_error($TEXT['ERROR'], $backlink);
}
// Print admin footer
$admin->print_footer();
開發者ID:WebsiteBaker-modules,項目名稱:WB-Portable,代碼行數:31,代碼來源:move_down.php

示例3: order

 * @author          WebsiteBaker Project
 * @copyright       2004-2009, Ryan Djurovich
 * @copyright       2009-2011, Website Baker Org. e.V.
 * @link			http://www.websitebaker2.org/
 * @license         http://www.gnu.org/licenses/gpl.html
 * @platform        WebsiteBaker 2.8.x
 * @requirements    PHP 5.2.2 and higher
 * @version         $Id: move_down.php 1457 2011-06-25 17:18:50Z Luisehahne $
 * @filesource		$HeadURL: svn://isteam.dynxs.de/wb_svn/wb280/branches/2.8.x/wb/modules/form/move_down.php $
 * @lastmodified    $Date: 2011-06-25 19:18:50 +0200 (Sa, 25. Jun 2011) $
 * @description     
 */
require '../../config.php';
// Include WB admin wrapper script
require WB_PATH . '/modules/admin.php';
// Get id
$field_id = $admin->checkIDKEY('field_id', false, 'GET');
if (!$field_id) {
    $admin->print_error($MESSAGE['GENERIC_SECURITY_ACCESS'], ADMIN_URL . '/pages/modify.php?page_id=' . $page_id);
}
// Include the ordering class
require WB_PATH . '/framework/class.order.php';
// Create new order object an reorder
$order = new order(TABLE_PREFIX . 'mod_form_fields', 'position', 'field_id', 'section_id');
if ($order->move_down($field_id)) {
    $admin->print_success($TEXT['SUCCESS'], ADMIN_URL . '/pages/modify.php?page_id=' . $page_id);
} else {
    $admin->print_error($TEXT['ERROR'], ADMIN_URL . '/pages/modify.php?page_id=' . $page_id);
}
// Print admin footer
$admin->print_footer();
開發者ID:WBCE,項目名稱:form,代碼行數:31,代碼來源:move_down.php


注:本文中的order::move_down方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。