/** * @package admin * @copyright Copyright 2003-2006 Zen Cart Development Team * @copyright Portions Copyright 2003 osCommerce * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0 * @version $Id: init_category_path.php 3001 2006-02-09 21:45:06Z wilt $ */ if (!defined('IS_ADMIN_FLAG')) { die('Illegal Access'); } // calculate category path if (isset($_GET['cPath'])) { $cPath = $_GET['cPath']; } else { $cPath = ''; } if (zen_not_null($cPath)) { $cPath_array = zen_parse_category_path($cPath); $cPath = implode('_', $cPath_array); $current_category_id = $cPath_array[sizeof($cPath_array) - 1]; } else { $current_category_id = 0; } // default open navigation box if (!$_SESSION['selected_box']) { $_SESSION['selected_box'] = 'configuration'; } if (isset($_GET['selected_box'])) { $_SESSION['selected_box'] = $_GET['selected_box']; }
if (!defined('IS_ADMIN_FLAG')) { die('Illegal Access'); } if (!(basename($PHP_SELF) == FILENAME_LOGIN . ".php")) { $page = basename($PHP_SELF, ".php"); if ($page != FILENAME_DEFAULT && $page != FILENAME_PRODUCT && $page != FILENAME_LOGOFF && $page != FILENAME_ALT_NAV && $page != FILENAME_PASSWORD_FORGOTTEN && $page != 'denied') { if (check_page($page) == 'false') { header("location: denied.php"); } } if (!isset($_SESSION['admin_id'])) { if (!(basename($PHP_SELF) == FILENAME_PASSWORD_FORGOTTEN . '.php')) { zen_redirect(zen_href_link(FILENAME_LOGIN, '', 'SSL')); } } } // BOF - Admin Profile's Categories // If we're on the categories page and the category, which user want to see is not // allowed for him - redirect to main catrgory $cPath = $_GET['cPath']; $cid = zen_parse_category_path($cPath); $cid = end($cid); // echo '>>> '.$cid; if ($page == FILENAME_CATEGORIES && category_allowed($cid) == 'false' && $cPath != '0') { //header("location: denied.php"); zen_redirect(zen_href_link(FILENAME_CATEGORIES, 'cPath=0')); } // EOF - Admin Profile's Categories if (basename($PHP_SELF) == FILENAME_LOGIN . '.php' and (substr_count(dirname($PHP_SELF), '//') > 0 or substr_count(dirname($PHP_SELF), '.php') > 0)) { zen_redirect(zen_href_link(FILENAME_LOGIN, '', 'SSL')); }