} // 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);
// 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();
* @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();