Ejemplo n.º 1
0
 * adapted 2005 for xoops by FlinkUX <http://www.flinkux.de>
 * @package xosC
 * @subpackage admin
 * @author Michael Hammelmann <*****@*****.**>
**/
include '../../../include/cp_header.php';
require 'includes/application_top.php';
require DIR_WS_CLASSES . 'currencies.php';
$currencies = new currencies();
$action = isset($HTTP_GET_VARS['action']) ? $HTTP_GET_VARS['action'] : '';
if (tep_not_null($action)) {
    switch ($action) {
        case 'setflag':
            if ($HTTP_GET_VARS['flag'] == '0' || $HTTP_GET_VARS['flag'] == '1') {
                if (isset($HTTP_GET_VARS['pID'])) {
                    tep_set_product_status($HTTP_GET_VARS['pID'], $HTTP_GET_VARS['flag']);
                }
                if (USE_CACHE == 'true') {
                    tep_reset_cache_block('categories');
                    tep_reset_cache_block('also_purchased');
                }
            }
            tep_redirect(tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $HTTP_GET_VARS['cPath'] . '&pID=' . $HTTP_GET_VARS['pID']));
            break;
        case 'setcategoriesflag':
            if ($HTTP_GET_VARS['flag'] == '0' || $HTTP_GET_VARS['flag'] == '1') {
                if (isset($HTTP_GET_VARS['cID'])) {
                    tep_set_categories_status($HTTP_GET_VARS['cID'], $HTTP_GET_VARS['flag']);
                }
                if (USE_CACHE == 'true') {
                    tep_reset_cache_block('categories');
Ejemplo n.º 2
0
require 'includes/application_top.php';
require DIR_WS_CLASSES . 'currencies.php';
$currencies = new currencies();
$action = isset($_GET['action']) ? $_GET['action'] : '';
// Ultimate SEO URLs BEGIN
// If the action will affect the cache entries
if (eregi("(insert|update|setflag)", $action)) {
    include_once 'includes/reset_seo_cache.php';
}
// Ultimate SEO URLs END
if (tep_not_null($action)) {
    switch ($action) {
        case 'setflag':
            if ($_GET['flag'] == '0' || $_GET['flag'] == '1') {
                if (isset($_GET['pID'])) {
                    tep_set_product_status($_GET['pID'], $_GET['flag']);
                }
                if (USE_CACHE == 'true') {
                    tep_reset_cache_block('categories');
                    tep_reset_cache_block('also_purchased');
                }
            }
            tep_redirect(tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $_GET['cPath'] . '&pID=' . $_GET['pID']));
            break;
        case 'insert_category':
        case 'update_category':
            if (isset($_POST['categories_id'])) {
                $categories_id = tep_db_prepare_input($_POST['categories_id']);
            }
            $sort_order = tep_db_prepare_input($_POST['sort_order']);
            $sql_data_array = array('sort_order' => $sort_order);