本文整理汇总了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 . '§ion_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);
示例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();
示例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();