function start() { global $breadcrumb, $osC_Database, $osC_Language, $cPath, $cPath_array; include 'includes/classes/breadcrumb.php'; $breadcrumb = new breadcrumb(); $breadcrumb->add($osC_Language->get('breadcrumb_top'), HTTP_SERVER); $breadcrumb->add($osC_Language->get('breadcrumb_shop'), osc_href_link(FILENAME_DEFAULT)); return true; }
function start() { if (PHP_VERSION < 4.1) { global $_GET; } global $breadcrumb, $osC_Session, $osC_Database, $cPath, $cPath_array; include 'includes/classes/breadcrumb.php'; $breadcrumb = new breadcrumb(); $breadcrumb->add(HEADER_TITLE_TOP, HTTP_SERVER); $breadcrumb->add(HEADER_TITLE_CATALOG, tep_href_link(FILENAME_DEFAULT)); // add category names or the manufacturer name to the breadcrumb trail if (isset($cPath_array) && sizeof($cPath_array) > 0) { $Qcategories = $osC_Database->query('select categories_id, categories_name from :table_categories_description where categories_id in (:categories_id) and language_id = :language_id'); $Qcategories->bindRaw(':table_categories_description', TABLE_CATEGORIES_DESCRIPTION); $Qcategories->bindRaw(':categories_id', implode(',', $cPath_array)); $Qcategories->bindInt(':language_id', $osC_Session->value('languages_id')); $Qcategories->execute(); $categories = array(); while ($Qcategories->next()) { $categories[$Qcategories->value('categories_id')] = $Qcategories->valueProtected('categories_name'); } $Qcategories->freeResult(); for ($i = 0, $n = sizeof($cPath_array); $i < $n; $i++) { $breadcrumb->add($categories[$cPath_array[$i]], tep_href_link(FILENAME_DEFAULT, 'cPath=' . implode('_', array_slice($cPath_array, 0, $i + 1)))); } } elseif (isset($_GET['manufacturers_id']) && is_numeric($_GET['manufacturers_id'])) { $Qmanufacturers = $osC_Database->query('select manufacturers_name from :table_manufacturers where manufacturers_id = :manufacturers_id'); $Qmanufacturers->bindRaw(':table_manufacturers', TABLE_MANUFACTURERS); $Qmanufacturers->bindInt(':manufacturers_id', $_GET['manufacturers_id']); $Qmanufacturers->execute(); if ($Qmanufacturers->numberOfRows()) { $breadcrumb->add($Qmanufacturers->valueProtected('manufacturers_name'), tep_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . $_GET['manufacturers_id'])); } $Qmanufacturers->freeResult(); } // add the products model to the breadcrumb trail if (isset($_GET['products_id']) && is_numeric($_GET['products_id'])) { $Qmodel = $osC_Database->query('select products_model from :table_products where products_id = :products_id'); $Qmodel->bindRaw(':table_products', TABLE_PRODUCTS); $Qmodel->bindInt(':products_id', $_GET['products_id']); $Qmodel->execute(); if ($Qmodel->numberOfRows() > 0) { $breadcrumb->add($Qmodel->valueProtected('products_model'), tep_href_link(FILENAME_PRODUCT_INFO, 'cPath=' . $cPath . '&products_id=' . $_GET['products_id'])); } $Qmodel->freeResult(); } return true; }
function create_plugin_instance() { global $oBreadcrumb, $aLang, $aCategoryPath; $dbconn =& oosDBGetConn(); $oostable =& oosDBGetTables(); $aFilename = oos_get_filename(); $aModules = oos_get_modules(); // include the breadcrumb class and start the breadcrumb trail MyOOS_CoreApi::requireOnce('classes/class_breadcrumb.php'); $oBreadcrumb = new breadcrumb(); $oBreadcrumb->add($aLang['header_title_top'], oos_href_link($aModules['main'], $aFilename['main'])); // add category names or the manufacturer name to the breadcrumb trail if (isset($aCategoryPath) && count($aCategoryPath) > 0) { $nLanguageID = isset($_SESSION['language_id']) ? $_SESSION['language_id'] + 0 : 1; for ($i = 0, $n = count($aCategoryPath); $i < $n; $i++) { $categories_descriptiontable = $oostable['categories_description']; $categories_sql = "SELECT categories_name\n FROM {$categories_descriptiontable}\n WHERE categories_id = '" . intval($aCategoryPath[$i]) . "'\n AND categories_languages_id = '" . intval($nLanguageID) . "'"; $categories = $dbconn->Execute($categories_sql); if ($categories->RecordCount() > 0) { $oBreadcrumb->add($categories->fields['categories_name'], oos_href_link($aModules['main'], $aFilename['shop'], 'categories=' . implode('_', array_slice($aCategoryPath, 0, $i + 1)))); } else { break; } } } elseif (isset($_GET['manufacturers_id']) && is_numeric($_GET['manufacturers_id'])) { $manufacturers_id = intval($_GET['manufacturers_id']); $manufacturerstable = $oostable['manufacturers']; $manufacturers_sql = "SELECT manufacturers_name\n FROM {$manufacturerstable}\n WHERE manufacturers_id = '" . intval($manufacturers_id) . "'"; $manufacturers = $dbconn->Execute($manufacturers_sql); if ($manufacturers->RecordCount() > 0) { $oBreadcrumb->add($aLang['header_title_catalog'], oos_href_link($aModules['main'], $aFilename['shop'])); $oBreadcrumb->add($manufacturers->fields['manufacturers_name'], oos_href_link($aModules['main'], $aFilename['shop'], 'manufacturers_id=' . $_GET['manufacturers_id'])); } } return true; }
<?php require_once '../init.inc.php'; require_once ROOT . '/class/breadcrumb.class.php'; $breadcrumb = new breadcrumb(); $breadcrumb->add('Home', 'home.php'); $breadcrumb->add('Clients', 'clients.php'); $breadcrumb->add('Acme Production', 'clients.php?id=7'); // adding a crumb without url will render it without url $breadcrumb->add('Acme Production Details'); echo $breadcrumb->render();
$current_category_id = $cPath_array[sizeof($cPath_array) - 1]; } else { $current_category_id = 0; } require DIR_WS_CLASSES . 'spath_setup.php'; $spath_setup = new spath_setup(); // calculate store_category path $sPath = $spath_setup->smn_set_sPath($sPath); if (smn_not_null($sPath)) { $sPath_array = $spath_setup->smn_parse_store_category_path($sPath); } $current_store_category_id = $spath_setup->smn_set_store_category_id($sPath); // include the breadcrumb class and start the breadcrumb trail require DIR_WS_CLASSES . 'breadcrumb.php'; $breadcrumb = new breadcrumb(); $breadcrumb->add(MALL_NAME, smn_href_link(FILENAME_DEFAULT, 'ID=1')); $breadcrumb->add($store->get_store_name(), smn_href_link(FILENAME_DEFAULT, 'ID=' . $store_id)); // add category names or the manufacturer name to the breadcrumb trail if (isset($cPath_array)) { for ($i = 0, $n = sizeof($cPath_array); $i < $n; $i++) { $categories_query = smn_db_query("select categories_name from " . TABLE_CATEGORIES_DESCRIPTION . " where categories_id = '" . (int) $cPath_array[$i] . "' and language_id = '" . (int) $languages_id . "'"); if (smn_db_num_rows($categories_query) > 0) { $categories = smn_db_fetch_array($categories_query); $breadcrumb->add($categories['categories_name'], smn_href_link(FILENAME_DEFAULT, 'cPath=' . implode('_', array_slice($cPath_array, 0, $i + 1)))); } else { break; } } } elseif (isset($_GET['manufacturers_id'])) { $manufacturers_query = smn_db_query("select manufacturers_name from " . TABLE_MANUFACTURERS . " where manufacturers_id = '" . (int) $_GET['manufacturers_id'] . "'"); if (smn_db_num_rows($manufacturers_query)) {
if (!isset($cPath_array) || sizeof($cPath_array) != 1) { $cat_row = tep_db_fetch_array(tep_db_query("select * from " . TABLE_CATEGORIES . " where parent_id=0 AND products_class='{$pClass}'")); if (!$cat_row) { tep_db_query("INSERT INTO " . TABLE_CATEGORIES . " (parent_id,date_added,categories_status,products_class) VALUES (0,NOW(),1,'{$pClass}')"); $cat_row = array('categories_id' => tep_db_insert_id()); tep_db_query("INSERT INTO " . TABLE_CATEGORIES_DESCRIPTION . " (categories_id,categories_name,language_id) VALUES ('" . $cat_row['categories_id'] . "','Gift Certificates','{$languages_id}')"); } tep_redirect(HTTP_SERVER . DIR_WS_ADMIN . 'gift_certs.php?cPath=' . $cat_row['categories_id']); } // add category names to the breadcrumb trail if (isset($cPath_array)) { for ($i = 0, $n = sizeof($cPath_array); $i < $n; $i++) { $categories_query = tep_db_query("select categories_name from " . TABLE_CATEGORIES_DESCRIPTION . " where categories_id = '" . (int) $cPath_array[$i] . "' and language_id = '" . (int) $languages_id . "'"); if (tep_db_num_rows($categories_query) > 0) { $categories = tep_db_fetch_array($categories_query); $breadcrumb->add($categories['categories_name'], tep_href_link(FILENAME_CATEGORIES, 'pclass=' . $pClass . '&cPath=' . implode('_', array_slice($cPath_array, 0, $i + 1)))); } else { break; } } } require DIR_WS_CLASSES . 'currencies.php'; $currencies = new currencies(); // By MegaJim require DIR_WS_CLASSES . 'url_rewrite.php'; $url_rewrite = new url_rewrite(); $ModelFieldsList = array('quantity'); $action = isset($HTTP_GET_VARS['action']) ? $HTTP_GET_VARS['action'] : ''; $cus_groups = tep_get_customer_groups(); if (tep_not_null($action)) { if ($action == 'new_product_preview' && (isset($HTTP_POST_VARS['express_update']) || isset($HTTP_POST_VARS['express_update_x']))) {
} elseif (isset($HTTP_GET_VARS['products_id']) && !isset($HTTP_GET_VARS['manufacturers_id'])) { $cPath = tep_get_product_path($HTTP_GET_VARS['products_id']); } else { $cPath = ''; } if (tep_not_null($cPath)) { $cPath_array = tep_parse_category_path($cPath); $cPath = implode('_', $cPath_array); $current_category_id = $cPath_array[sizeof($cPath_array) - 1]; } else { $current_category_id = 0; } // include the breadcrumb class and start the breadcrumb trail require DIR_WS_CLASSES . 'breadcrumb.php'; $breadcrumb = new breadcrumb(); $breadcrumb->add(HEADER_TITLE_TOP, HTTP_SERVER); $breadcrumb->add(HEADER_TITLE_CATALOG, tep_href_link(FILENAME_DEFAULT)); /*** Begin Header Tags SEO ***/ // add category names or the manufacturer name to the breadcrumb trail if (isset($cPath_array)) { for ($i = 0, $n = sizeof($cPath_array); $i < $n; $i++) { $categories_query = tep_db_query("select categories_htc_title_tag from " . TABLE_CATEGORIES_DESCRIPTION . " where categories_id = '" . (int) $cPath_array[$i] . "' and language_id = '" . (int) $languages_id . "' LIMIT 1"); if (tep_db_num_rows($categories_query) > 0) { $categories = tep_db_fetch_array($categories_query); $breadcrumb->add($categories['categories_htc_title_tag'], tep_href_link(FILENAME_DEFAULT, 'cPath=' . implode('_', array_slice($cPath_array, 0, $i + 1)))); } else { break; } } } elseif (isset($_GET['manufacturers_id'])) { $manufacturers_query = tep_db_query("select manufacturers_htc_title_tag from " . TABLE_MANUFACTURERS_INFO . " where manufacturers_id = '" . (int) $_GET['manufacturers_id'] . "' AND languages_id = '" . (int) $languages_id . "' LIMIT 1");
protected function init() { global $PHP_SELF, $currencies, $messageStack, $oscTemplate, $breadcrumb; $OSCOM_Cookies = new Cookies(); Registry::set('Cookies', $OSCOM_Cookies); try { $OSCOM_Db = Db::initialize(); Registry::set('Db', $OSCOM_Db); } catch (\Exception $e) { include OSCOM::getConfig('dir_root') . 'includes/error_documents/maintenance.php'; exit; } Registry::set('Hooks', new Hooks()); // set the application parameters $Qcfg = $OSCOM_Db->get('configuration', ['configuration_key as k', 'configuration_value as v']); //, null, null, null, 'configuration'); // TODO add cache when supported by admin while ($Qcfg->fetch()) { define($Qcfg->value('k'), $Qcfg->value('v')); } // set php_self in the global scope $req = parse_url($_SERVER['SCRIPT_NAME']); $PHP_SELF = substr($req['path'], strlen(OSCOM::getConfig('http_path', 'Shop'))); $OSCOM_Session = Session::load(); Registry::set('Session', $OSCOM_Session); // start the session $OSCOM_Session->start(); $this->ignored_actions[] = session_name(); $OSCOM_Language = new Language(); // $OSCOM_Language->setUseCache(true); Registry::set('Language', $OSCOM_Language); // create the shopping cart if (!isset($_SESSION['cart']) || !is_object($_SESSION['cart']) || get_class($_SESSION['cart']) != 'shoppingCart') { $_SESSION['cart'] = new \shoppingCart(); } // include currencies class and create an instance $currencies = new \currencies(); // set the language if (!isset($_SESSION['language']) || isset($_GET['language'])) { if (isset($_GET['language']) && !empty($_GET['language']) && $OSCOM_Language->exists($_GET['language'])) { $OSCOM_Language->set($_GET['language']); } $_SESSION['language'] = $OSCOM_Language->get('code'); } // include the language translations $OSCOM_Language->loadDefinitions('main'); // Prevent LC_ALL from setting LC_NUMERIC to a locale with 1,0 float/decimal values instead of 1.0 (see bug #634) $system_locale_numeric = setlocale(LC_NUMERIC, 0); setlocale(LC_ALL, explode(';', OSCOM::getDef('system_locale'))); setlocale(LC_NUMERIC, $system_locale_numeric); // currency if (!isset($_SESSION['currency']) || isset($_GET['currency']) || USE_DEFAULT_LANGUAGE_CURRENCY == 'true' && OSCOM::getDef('language_currency') != $_SESSION['currency']) { if (isset($_GET['currency']) && $currencies->is_set($_GET['currency'])) { $_SESSION['currency'] = $_GET['currency']; } else { $_SESSION['currency'] = USE_DEFAULT_LANGUAGE_CURRENCY == 'true' && $currencies->is_set(OSCOM::getDef('language_currency')) ? OSCOM::getDef('language_currency') : DEFAULT_CURRENCY; } } // navigation history if (!isset($_SESSION['navigation']) || !is_object($_SESSION['navigation']) || get_class($_SESSION['navigation']) != 'navigationHistory') { $_SESSION['navigation'] = new \navigationHistory(); } $_SESSION['navigation']->add_current_page(); $messageStack = new \messageStack(); tep_update_whos_online(); tep_activate_banners(); tep_expire_banners(); tep_expire_specials(); $oscTemplate = new \oscTemplate(); $breadcrumb = new \breadcrumb(); $breadcrumb->add(OSCOM::getDef('header_title_top'), OSCOM::getConfig('http_server', 'Shop')); $breadcrumb->add(OSCOM::getDef('header_title_catalog'), OSCOM::link('index.php')); }
protected function init() { global $request_type, $cookie_domain, $cookie_path, $PHP_SELF, $SID, $currencies, $messageStack, $oscTemplate, $breadcrumb; Registry::set('Cache', new Cache()); $OSCOM_Db = Db::initialize(); Registry::set('Db', $OSCOM_Db); // set the application parameters $Qcfg = $OSCOM_Db->get('configuration', ['configuration_key as k', 'configuration_value as v']); //, null, null, null, 'configuration'); // TODO add cache when supported by admin while ($Qcfg->fetch()) { define($Qcfg->value('k'), $Qcfg->value('v')); } // set the type of request (secure or not) if (isset($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) == 'on' || isset($_SERVER['SERVER_PORT']) && $_SERVER['SERVER_PORT'] == 443) { $request_type = 'SSL'; define('DIR_WS_CATALOG', DIR_WS_HTTPS_CATALOG); $cookie_domain = HTTPS_COOKIE_DOMAIN; $cookie_path = HTTPS_COOKIE_PATH; } else { $request_type = 'NONSSL'; define('DIR_WS_CATALOG', DIR_WS_HTTP_CATALOG); $cookie_domain = HTTP_COOKIE_DOMAIN; $cookie_path = HTTP_COOKIE_PATH; } // set php_self in the global scope $req = parse_url($_SERVER['SCRIPT_NAME']); $PHP_SELF = substr($req['path'], $request_type == 'NONSSL' ? strlen(DIR_WS_HTTP_CATALOG) : strlen(DIR_WS_HTTPS_CATALOG)); // set the session name and save path session_name('oscomid'); session_save_path(SESSION_WRITE_DIRECTORY); // set the session cookie parameters session_set_cookie_params(0, $cookie_path, $cookie_domain); if (function_exists('ini_set')) { ini_set('session.use_only_cookies', SESSION_FORCE_COOKIE_USE == 'True' ? 1 : 0); } // set the session ID if it exists if (SESSION_FORCE_COOKIE_USE == 'False') { if (isset($_GET[session_name()]) && (!isset($_COOKIE[session_name()]) || $_COOKIE[session_name()] != $_GET[session_name()])) { session_id($_GET[session_name()]); } elseif (isset($_POST[session_name()]) && (!isset($_COOKIE[session_name()]) || $_COOKIE[session_name()] != $_POST[session_name()])) { session_id($_POST[session_name()]); } } // start the session if (SESSION_FORCE_COOKIE_USE == 'True') { tep_setcookie('cookie_test', 'please_accept_for_session', time() + 60 * 60 * 24 * 30); if (isset($_COOKIE['cookie_test'])) { tep_session_start(); } } elseif (SESSION_BLOCK_SPIDERS == 'True') { $user_agent = ''; if (isset($_SERVER['HTTP_USER_AGENT'])) { $user_agent = strtolower($_SERVER['HTTP_USER_AGENT']); } $spider_flag = false; if (!empty($user_agent)) { foreach (file(OSCOM::BASE_DIR . 'spiders.txt') as $spider) { if (!empty($spider)) { if (strpos($user_agent, $spider) !== false) { $spider_flag = true; break; } } } } if ($spider_flag === false) { tep_session_start(); } } else { tep_session_start(); } $this->ignored_actions[] = session_name(); // initialize a session token if (!isset($_SESSION['sessiontoken'])) { $_SESSION['sessiontoken'] = md5(tep_rand() . tep_rand() . tep_rand() . tep_rand()); } // set SID once, even if empty $SID = defined('SID') ? SID : ''; // verify the ssl_session_id if the feature is enabled if ($request_type == 'SSL' && SESSION_CHECK_SSL_SESSION_ID == 'True' && ENABLE_SSL == true && session_status() === PHP_SESSION_ACTIVE) { if (!isset($_SESSION['SSL_SESSION_ID'])) { $_SESSION['SESSION_SSL_ID'] = $_SERVER['SSL_SESSION_ID']; } if ($_SESSION['SESSION_SSL_ID'] != $_SERVER['SSL_SESSION_ID']) { tep_session_destroy(); OSCOM::redirect('ssl_check.php'); } } // verify the browser user agent if the feature is enabled if (SESSION_CHECK_USER_AGENT == 'True') { if (!isset($_SESSION['SESSION_USER_AGENT'])) { $_SESSION['SESSION_USER_AGENT'] = $_SERVER['HTTP_USER_AGENT']; } if ($_SESSION['SESSION_USER_AGENT'] != $_SERVER['HTTP_USER_AGENT']) { tep_session_destroy(); OSCOM::redirect('index.php', 'Account&LogIn'); } } // verify the IP address if the feature is enabled if (SESSION_CHECK_IP_ADDRESS == 'True') { if (!isset($_SESSION['SESSION_IP_ADDRESS'])) { $_SESSION['SESSION_IP_ADDRESS'] = tep_get_ip_address(); } if ($_SESSION['SESSION_IP_ADDRESS'] != tep_get_ip_address()) { tep_session_destroy(); OSCOM::redirect('index.php', 'Account&LogIn'); } } // create the shopping cart if (!isset($_SESSION['cart']) || !is_object($_SESSION['cart']) || get_class($_SESSION['cart']) != 'shoppingCart') { $_SESSION['cart'] = new \shoppingCart(); } // include currencies class and create an instance $currencies = new \currencies(); // set the language if (!isset($_SESSION['language']) || isset($_GET['language'])) { $lng = new \language(); if (isset($_GET['language']) && !empty($_GET['language'])) { $lng->set_language($_GET['language']); } else { $lng->get_browser_language(); } $_SESSION['language'] = $lng->language['directory']; $_SESSION['languages_id'] = $lng->language['id']; } // include the language translations $system_locale_numeric = setlocale(LC_NUMERIC, 0); include OSCOM::BASE_DIR . 'languages/' . $_SESSION['language'] . '.php'; setlocale(LC_NUMERIC, $system_locale_numeric); // Prevent LC_ALL from setting LC_NUMERIC to a locale with 1,0 float/decimal values instead of 1.0 (see bug #634) // currency if (!isset($_SESSION['currency']) || isset($_GET['currency']) || USE_DEFAULT_LANGUAGE_CURRENCY == 'true' && LANGUAGE_CURRENCY != $_SESSION['currency']) { if (isset($_GET['currency']) && $currencies->is_set($_GET['currency'])) { $_SESSION['currency'] = $_GET['currency']; } else { $_SESSION['currency'] = USE_DEFAULT_LANGUAGE_CURRENCY == 'true' && $currencies->is_set(LANGUAGE_CURRENCY) ? LANGUAGE_CURRENCY : DEFAULT_CURRENCY; } } // navigation history if (!isset($_SESSION['navigation']) || !is_object($_SESSION['navigation']) || get_class($_SESSION['navigation']) != 'navigationHistory') { $_SESSION['navigation'] = new \navigationHistory(); } $_SESSION['navigation']->add_current_page(); $messageStack = new \messageStack(); tep_update_whos_online(); tep_activate_banners(); tep_expire_banners(); tep_expire_specials(); $oscTemplate = new \oscTemplate(); $breadcrumb = new \breadcrumb(); $breadcrumb->add(HEADER_TITLE_TOP, HTTP_SERVER); $breadcrumb->add(HEADER_TITLE_CATALOG, OSCOM::link('index.php')); Registry::set('Hooks', new Hooks()); }
if (isset($HTTP_GET_VARS['hPath'])) { $hPath = $HTTP_GET_VARS['hPath']; } else { $hPath = ''; } if (tep_not_null($hPath)) { $hPath_array = tep_parse_header_path($hPath); $hPath = implode('_', $hPath_array); $current_header_id = $hPath_array[sizeof($hPath_array) - 1]; } else { $current_header_id = 0; } // include the breadcrumb class and start the breadcrumb trail require DIR_WS_CLASSES . 'breadcrumb.php'; $breadcrumb = new breadcrumb(); $breadcrumb->add('Top', tep_href_link(FILENAME_BTS_HEADER_BUILDER)); // add header names to the breadcrumb trail if (isset($hPath_array)) { for ($i = 0, $n = sizeof($hPath_array); $i < $n; $i++) { $headers_query = tep_db_query("select headers_name from " . TABLE_HEADERS_DESCRIPTION . " where headers_id = '" . (int) $hPath_array[$i] . "' and language_id = '" . (int) $languages_id . "'"); if (tep_db_num_rows($headers_query) > 0) { $headers = tep_db_fetch_array($headers_query); $breadcrumb->add($headers['headers_name'], tep_href_link(FILENAME_BTS_HEADER_BUILDER, 'hPath=' . implode('_', array_slice($hPath_array, 0, $i + 1)))); } else { break; } } } // initialize configuration modules require DIR_WS_CLASSES . 'cfg_modules.php'; $cfgModules = new cfg_modules();
$show_welcome = 'false'; $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; $cPath_array = array(); } // include the breadcrumb class and start the breadcrumb trail require DIR_WS_CLASSES . 'breadcrumb.php'; $breadcrumb = new breadcrumb(); $breadcrumb->add(HEADER_TITLE_CATALOG, zen_href_link(FILENAME_DEFAULT)); // add category names or the manufacturer name to the breadcrumb trail if (isset($cPath_array)) { for ($i = 0, $n = sizeof($cPath_array); $i < $n; $i++) { $categories_query = "select categories_name\r\n from " . TABLE_CATEGORIES_DESCRIPTION . "\r\n where categories_id = '" . (int) $cPath_array[$i] . "'\r\n and language_id = '" . (int) $_SESSION['languages_id'] . "'"; $categories = $db->Execute($categories_query); if ($categories->RecordCount() > 0) { $breadcrumb->add($categories->fields['categories_name'], zen_href_link(FILENAME_DEFAULT, 'cPath=' . implode('_', array_slice($cPath_array, 0, $i + 1)))); } else { break; } } } // split to add manufacturers_name to the display if (isset($_GET['manufacturers_id'])) { $manufacturers_query = "select manufacturers_name\r\n from " . TABLE_MANUFACTURERS . "\r\n where manufacturers_id = '" . (int) $_GET['manufacturers_id'] . "'";
$messageStack = new messageStack(); // include the who's online functions require DIR_WS_FUNCTIONS . 'whos_online.php'; zen_update_whos_online(); // include the password crypto functions require DIR_WS_FUNCTIONS . 'password_funcs.php'; // include validation functions (right now only email address) // require(DIR_WS_FUNCTIONS . 'validations.php'); // split-page-results require DIR_WS_CLASSES . 'split_page_results.php'; // auto activate and expire banners require DIR_WS_FUNCTIONS . 'banner.php'; zen_activate_banners(); zen_expire_banners(); // auto expire special products require DIR_WS_FUNCTIONS . 'specials.php'; zen_start_specials(); zen_expire_specials(); // auto expire featured products require DIR_WS_FUNCTIONS . 'featured.php'; zen_start_featured(); zen_expire_featured(); // auto expire salemaker sales require DIR_WS_FUNCTIONS . 'salemaker.php'; zen_start_salemaker(); zen_expire_salemaker(); // include the breadcrumb class and start the breadcrumb trail require DIR_WS_CLASSES . 'breadcrumb.php'; $breadcrumb = new breadcrumb(); $breadcrumb->add(HEADER_TITLE_CATALOG, zen_href_link(FILENAME_DEFAULT));
if (!tep_session_is_registered('customer_id')) { include 'includes/modules/autologon.php'; } } } else { setcookie("email_address", "", time() - 3600, $cookie_path); //no, delete email_address cookie setcookie("password", "", time() - 3600, $cookie_path); //no, delete password cookie } } /*autologin*/ // include the breadcrumb class and start the breadcrumb trail require DIR_WS_CLASSES . 'breadcrumb.php'; $breadcrumb = new breadcrumb(); $breadcrumb->add(Translate('Home'), tep_href_link(FILENAME_DEFAULT)); // START STS 4.5.8 if (!strstr($_SERVER['SCRIPT_NAME'], 'rewrite.php') && !strstr($_SERVER['SCRIPT_NAME'], 'checkout.php')) { require DIR_WS_CLASSES . 'sts.php'; $sts = new sts(); $sts->start_capture(); } // END STS 4.5.8 // initialize the message stack for output messages require DIR_WS_CLASSES . 'message_stack.php'; $messageStack = new messageStack(); require_once DIR_WS_CLASSES . 'cross_selling.php'; // set which precautions should be checked define('WARN_INSTALL_EXISTENCE', 'true'); define('WARN_CONFIG_WRITEABLE', 'true'); define('WARN_SESSION_DIRECTORY_NOT_WRITEABLE', 'true');
} elseif (isset($_GET['products_id']) && !isset($_GET['manufacturers_id'])) { $cPath = tep_get_product_path($_GET['products_id']); } else { $cPath = ''; } if (tep_not_null($cPath)) { $cPath_array = tep_parse_category_path($cPath); $cPath = implode('_', $cPath_array); $current_category_id = $cPath_array[sizeof($cPath_array) - 1]; } else { $current_category_id = 0; } // include the breadcrumb class and start the breadcrumb trail require DIR_WS_CLASSES . 'breadcrumb.php'; $breadcrumb = new breadcrumb(); $breadcrumb->add(HEADER_TITLE_TOP, HTTP_SERVER); $breadcrumb->add(HEADER_TITLE_CATALOG, tep_href_link(FILENAME_DEFAULT)); // add category names or the manufacturer name to the breadcrumb trail // if (isset($cPath_array)) { // for ($i=0, $n=sizeof($cPath_array); $i<$n; $i++) { // $categories_query = tep_db_query("select categories_name from " . TABLE_CATEGORIES_DESCRIPTION . " where categories_id = '" . (int)$cPath_array[$i] . "' and language_id = '" . (int)$languages_id . "'"); // add category names or the manufacturer name to the breadcrumb trail // BOF SPPC Hide products and categories from groups if (isset($cPath_array)) { for ($i = 0, $n = sizeof($cPath_array); $i < $n; $i++) { $categories_query = tep_db_query("select categories_name from " . TABLE_CATEGORIES_DESCRIPTION . " cd left join " . TABLE_CATEGORIES . " c using(categories_id) where cd.categories_id = '" . (int) $cPath_array[$i] . "' and language_id = '" . (int) $languages_id . "' and find_in_set('" . $customer_group_id . "', categories_hide_from_groups) = 0"); // EOF SPPC Hide products and categories from groups if (tep_db_num_rows($categories_query) > 0) { $categories = tep_db_fetch_array($categories_query); $breadcrumb->add($categories['categories_name'], tep_href_link(FILENAME_DEFAULT, 'cPath=' . implode('_', array_slice($cPath_array, 0, $i + 1)))); } else {
<? include('application.php'); if(!$_SESSION['user_logged_in'] || !isset($_SESSION['client'])){ addError('Your session has timed out please login again'); redirect(PAGE_LOGIN); } $trail = new breadcrumb();//start breadcrumb class $trail->add("Dashboard", PAGE_DEFAULT); $trail->add("Publish", ""); //save the differet types of content here =) if(isset($_POST['action'])) { switch($_POST['action']){ case 'podcasts': $publish = explode('/', $_POST['pod_casts_publish_date']); $publishDateStart = mktime(0,0,0, $publish[0], $publish[1], $publish[2]); if($_POST['feature'] == '1') { //delete existing and make this one featured. dbQuery('UPDATE pod_casts SET pod_casts_feature = 0'); $row['pod_casts_feature'] = 1; } $row['pod_casts_title'] = input($_POST['pod_casts_title']); $row['pod_casts_desc'] = $_POST['pod_casts_desc']; $row['pod_casts_publish_date'] = $publishDateStart; $row['pod_casts_url'] = $_POST['pod_casts_url']; $row['pod_casts_date_updated'] = time(); $row['pod_casts_author'] = $_SERVER['user_id'];
<? include('application.php'); if(!$_SESSION['user_logged_in'] || !isset($_SESSION['client'])){ addError('Your session has timed out please login again'); redirect(PAGE_LOGIN); } $trail = new breadcrumb();//start breadcrumb class $trail->add("Dashboard", PAGE_DEFAULT); $trail->add("Manage", ""); //save the differet types of content here =) switch($_POST['action']){ case 'add': case 'downloadables_category': $row['page_downloads_category_title'] = input($_POST['title']); dbPerform('page_downloads_category', $row, 'insert'); addMessage('Added category successfully'); redirect(PAGE_MANAGE.'?section=downloadables'); break; case 'update': switch($_POST['section']) { case 'downloadables_category': $row['page_downloads_category_title'] = input($_POST['title']); dbPerform('page_downloads_category', $row, 'update', 'page_downloads_category_id = ' . $_POST['id']); addMessage('Saved category successfully'); redirect(PAGE_MANAGE.'?section=downloadables'); break; case 'downloadables': $row['page_downloads_title'] = input($_POST['page_downloads_title']);
<? include('application.php'); /* Array ( [action] => edit [id] => 11 [user_name] => sherdog@gmail.com [user_password] => mike [user_first_name] => Mike [user_last_name] => Sheridan [check_all_access] => ALL [access] => Array ( [0] => 6 [1] => 7 [2] => 8 [3] => 9 [4] => 10 [5] => 11 [6] => 12 [7] => 13 [8] => 14 [9] => 15 [10] => 16 [11] => 17 [12] => 18 [13] => 19 [14] => 4 [15] => 5 ) [ */ if(!$_SESSION['user_logged_in'] || !isset($_SESSION['client'])){ addError('Your session has timed out please login again'); redirect(PAGE_LOGIN); } $trail = new breadcrumb();//start breadcrumb class $trail->add("Dashboard", PAGE_DEFAULT); $trail->add("Users", ""); $page = $_GET['section']; if($_GET['action'] == 'delete') { if(!isset($_GET['id'])) { addError('Whoops no user was selected'); redirect(PAGE_USERS); } else { dbQuery('DELETE FROM user_information WHERE user_id = ' . $_GET['id']); dbQuery('DELETE FROM user WHERE user_id = ' . $_GET['id']); dbQuery('DELETE FROM user_access_pages WHERE user_id = ' . $_GET['id'] . ' AND user_access_pages_type = "manager"'); dbQuery('DELETE FROM user_access_pages WHERE user_id = ' . $_GET['id'] . ' AND user_access_pages_type = "publisher"'); addMessage('User was deleted successfully'); redirect(PAGE_USERS); }
<? include('application.php'); if(!$_SESSION['user_logged_in'] || !isset($_SESSION['client'])){ addError('Your session has timed out please login again'); redirect(PAGE_LOGIN); } $trail = new breadcrumb();//start breadcrumb class $trail->add("Dashboard", PAGE_DEFAULT); $trail->add("Communication", ""); if($_GET['action'] == 'senditout') { //we are going to send out the newsletter now! sendNewsletter($_GET['id']); } if($_GET['action'] == 'pause_message') { pauseMessage($_GET['id']); addMessage("The message you selected has been put on hold"); redirect(PAGE_COMMUNICATION); } if($_GET['action'] == 'unpause_message') { unpauseMessage($_GET['id']); addMessage("The message you selected has been put back into queue"); redirect(PAGE_COMMUNICATION); } if($_GET['action'] == 'deletemessage') { deleteFromQueue($_GET['id']); addMessage("The message you selected has been deleted"); redirect(PAGE_COMMUNICATION);
} elseif (isset($HTTP_GET_VARS['products_id']) && !isset($HTTP_GET_VARS['manufacturers_id'])) { $cPath = tep_get_product_path($HTTP_GET_VARS['products_id']); } else { $cPath = ''; } if (tep_not_null($cPath)) { $cPath_array = tep_parse_category_path($cPath); $cPath = implode('_', $cPath_array); $current_category_id = $cPath_array[sizeof($cPath_array) - 1]; } else { $current_category_id = 0; } // include the breadcrumb class and start the breadcrumb trail require DIR_WS_CLASSES . 'breadcrumb.php'; $breadcrumb = new breadcrumb(); $breadcrumb->add(HEADER_TITLE_CATALOG, tep_href_link(FILENAME_DEFAULT)); // add category names or the manufacturer name to the breadcrumb trail if (isset($cPath_array)) { for ($i = 0, $n = sizeof($cPath_array); $i < $n; $i++) { $categories_query = tep_db_query("select categories_name from " . TABLE_CATEGORIES_DESCRIPTION . " where categories_id = '" . (int) $cPath_array[$i] . "' and language_id = '" . (int) $languages_id . "'"); if (tep_db_num_rows($categories_query) > 0) { $categories = tep_db_fetch_array($categories_query); $breadcrumb->add($categories['categories_name'], tep_href_link(FILENAME_DEFAULT, 'cPath=' . implode('_', array_slice($cPath_array, 0, $i + 1)))); } else { break; } } } elseif (isset($HTTP_GET_VARS['manufacturers_id'])) { $manufacturers_query = tep_db_query("select manufacturers_name from " . TABLE_MANUFACTURERS . " where manufacturers_id = '" . (int) $HTTP_GET_VARS['manufacturers_id'] . "'"); if (tep_db_num_rows($manufacturers_query)) { $manufacturers = tep_db_fetch_array($manufacturers_query);
} else { $cPath = ''; } if (tep_not_null($cPath)) { $cPath_array = tep_parse_category_path($cPath); $cPath = implode('_', $cPath_array); $current_category_id = end($cPath_array); } else { $current_category_id = 0; } // include category tree class require 'includes/classes/category_tree.php'; // include the breadcrumb class and start the breadcrumb trail require 'includes/classes/breadcrumb.php'; $breadcrumb = new breadcrumb(); $breadcrumb->add(HEADER_TITLE_TOP, HTTP_SERVER); $breadcrumb->add(HEADER_TITLE_CATALOG, tep_href_link('index.php')); // add category names or the manufacturer name to the breadcrumb trail if (isset($cPath_array)) { $n = sizeof($cPath_array); for ($i = 0; $i < $n; $i++) { if (defined('MODULE_HEADER_TAGS_CATEGORY_TITLE_SEO_BREADCRUMB_OVERRIDE') && MODULE_HEADER_TAGS_CATEGORY_TITLE_SEO_BREADCRUMB_OVERRIDE == 'True') { $categories_query = tep_db_query("select coalesce(NULLIF(categories_seo_title, ''), categories_name) as categories_name from categories_description where categories_id = '" . (int) $cPath_array[$i] . "' and language_id = '" . (int) $languages_id . "'"); } else { $categories_query = tep_db_query("select categories_name from categories_description where categories_id = '" . (int) $cPath_array[$i] . "' and language_id = '" . (int) $languages_id . "'"); } if (tep_db_num_rows($categories_query) > 0) { $categories = tep_db_fetch_array($categories_query); $breadcrumb->add($categories['categories_name'], tep_href_link('index.php', 'cPath=' . implode('_', array_slice($cPath_array, 0, $i + 1)))); } else { break;
} } else { $cPath = ''; } if (vam_not_null($cPath)) { $cPath_array = vam_parse_category_path($cPath); $cPath = implode('_', $cPath_array); $current_category_id = $cPath_array[sizeof($cPath_array) - 1]; } else { $current_category_id = 0; } // include the breadcrumb class and start the breadcrumb trail require DIR_WS_CLASSES . 'breadcrumb.php'; $breadcrumb = new breadcrumb(); //$breadcrumb->add(HEADER_TITLE_TOP, HTTP_SERVER); $breadcrumb->add(HEADER_TITLE_CATALOG, HTTP_SERVER . DIR_WS_CATALOG); // add category names or the manufacturer name to the breadcrumb trail if (isset($cPath_array)) { for ($i = 0, $n = sizeof($cPath_array); $i < $n; $i++) { if (GROUP_CHECK == 'true') { $group_check = "and c.group_permission_" . $_SESSION['customers_status']['customers_status_id'] . "=1 "; } else { $group_check = ''; } $categories_query = vamDBquery("select\n\t\t\t\t cd.categories_name\n\t\t\t\t from " . TABLE_CATEGORIES_DESCRIPTION . " cd,\n\t\t\t\t " . TABLE_CATEGORIES . " c\n\t\t\t\t where cd.categories_id = '" . $cPath_array[$i] . "'\n\t\t\t\t and c.categories_id=cd.categories_id\n\t\t\t\t " . $group_check . "\n\t\t\t\t and cd.language_id='" . (int) $_SESSION['languages_id'] . "'"); if (vam_db_num_rows($categories_query, true) > 0) { $categories = vam_db_fetch_array($categories_query, true); if ($i < $n - 1) { $breadcrumb->add($categories['categories_name'], vam_href_link(FILENAME_DEFAULT, vam_category_link($cPath_array[$i], $categories['categories_name']))); } else { if ($product->isProduct()) {
<? include('application.php'); if(!$_SESSION['user_logged_in'] || !isset($_SESSION['client'])){ addError('Your session has timed out please login again'); redirect(PAGE_LOGIN); } $trail = new breadcrumb();//start breadcrumb class $trail->add("Dashboard", PAGE_DEFAULT); $trail->add("Storefront", PAGE_STORE); $page = $_GET['section']; if(isset($_GET['action']) && $_GET['action'] == 'deleteproductimage') { //remove it from the db and remove the images ;) $id = $_GET['id']; $productID = $_GET['pid']; //get the image name. $imgRes = dbQuery('SELECT products_images_filename FROM store_products_images WHERE products_images_id = ' . $id); if(dbNumRows($imgRes)) { $img = dbFetchArray($imgRes); if(file_exists(STORE_IMAGE_URL . $img['products_images_filename'])) { $filename = $img['products_images_filename']; foreach($galleryImageSizes as $name => $size)
} elseif (isset($_GET['products_id']) && !isset($_GET['manufacturers_id'])) { $cPath = tep_get_product_path($_GET['products_id']); } else { $cPath = ''; } if (!empty($cPath)) { $cPath_array = tep_parse_category_path($cPath); $cPath = implode('_', $cPath_array); $current_category_id = $cPath_array[sizeof($cPath_array) - 1]; } else { $current_category_id = 0; } // include the breadcrumb class and start the breadcrumb trail require 'includes/classes/breadcrumb.php'; $breadcrumb = new breadcrumb(); $breadcrumb->add(HEADER_TITLE_TOP, HTTP_SERVER); $breadcrumb->add(HEADER_TITLE_CATALOG, tep_href_link(FILENAME_DEFAULT)); // add category names or the manufacturer name to the breadcrumb trail if (isset($cPath_array)) { for ($i = 0, $n = sizeof($cPath_array); $i < $n; $i++) { $categories_query = tep_db_query("select categories_name from " . TABLE_CATEGORIES_DESCRIPTION . " where categories_id = '" . (int) $cPath_array[$i] . "' and language_id = '" . (int) $_SESSION['languages_id'] . "'"); if (tep_db_num_rows($categories_query) > 0) { $categories = tep_db_fetch_array($categories_query); $breadcrumb->add($categories['categories_name'], tep_href_link(FILENAME_DEFAULT, 'cPath=' . implode('_', array_slice($cPath_array, 0, $i + 1)))); } else { break; } } } elseif (isset($_GET['manufacturers_id'])) { $manufacturers_query = tep_db_query("select manufacturers_name from " . TABLE_MANUFACTURERS . " where manufacturers_id = '" . (int) $_GET['manufacturers_id'] . "'"); if (tep_db_num_rows($manufacturers_query)) {
// auto activate and expire banners require DIR_WS_FUNCTIONS . 'banner.php'; tep_activate_banners(); tep_expire_banners(); // auto expire special products // require(DIR_WS_FUNCTIONS . 'specials.php'); // tep_expire_specials(); // include the breadcrumb class and start the breadcrumb trail require DIR_WS_CLASSES . 'breadcrumb.php'; $breadcrumb = new breadcrumb(); // initialize the message stack for output messages require DIR_WS_CLASSES . 'message_stack.php'; $messageStack = new messageStack(); $default_page_query = tep_db_query("select pages_name from " . TABLE_PAGES . " where pages_filename = '" . tep_db_input(FILENAME_DEFAULT) . "' and language_id = '" . (int) $languages_id . "'"); $default_page = tep_db_fetch_array($default_page_query); $breadcrumb->add($default_page['pages_name'], tep_href_link(FILENAME_DEFAULT)); if (substr($HTTP_GET_VARS['action'], 0, 11) == 'desactivate' || substr($HTTP_GET_VARS['action'], 0, 8) == 'activate') { list($product_action, $product_code, $product_type) = explode('_', $HTTP_GET_VARS['action']); if ($product_action == 'desactivate') { $product_new_status = 0; } elseif ($product_action == 'activate') { $product_new_status = 1; } else { $product_new_status = ''; } if (($product_new_status == 0 || $product_new_status == 1) && (int) $product_code > 0) { $product_code = 'bbk' . sprintf('%010d', (int) $product_code); $product_check_query = tep_db_query("select products_id from " . TABLE_PRODUCTS . " where products_code = '" . tep_db_input($product_code) . "' and products_types_id = '" . (int) $product_type . "'"); $product_check = tep_db_fetch_array($product_check_query); if ($product_check['products_id'] > 0) { $shops_query = tep_db_query("select shops_database from " . TABLE_SHOPS . " where shops_database <> ''");
require_once OWP_FUNCTIONS_DIR . 'general.php'; require_once OWP_CLASSES_DIR . 'owp_object_info.php'; require_once OWP_CLASSES_DIR . 'owp_split_page_results.php'; require_once OWP_CLASSES_DIR . 'owp_table_block.php'; require_once OWP_CLASSES_DIR . 'owp_text_tool.php'; require_once OWP_CLASSES_DIR . 'owp_box.php'; require_once OWP_CLASSES_DIR . 'owp_message_stack.php'; $messageStack = new messageStack(); if (EMAIL_TRANSPORT == 'sendmail') { include OWP_MAILER_DIR . 'class.phpmailer.php'; } if (EMAIL_TRANSPORT == 'smtp') { include OWP_MAILER_DIR . 'class.smtp.php'; } // user input if (isset($_POST)) { foreach ($_POST as $k => $v) { ${$k} = owpPrepareInput($v); } } // include the who's online functions require_once OWP_FUNCTIONS_DIR . 'owp_whos_online.php'; opwUpdateWhosOnline(); require_once OWP_CLASSES_DIR . 'owp_breadcrumb.php'; $breadcrumb = new breadcrumb(); $breadcrumb->add(HEADER_TITLE_TOP, owpLink($owpFilename['index'])); // set which precautions should be checked define('WARN_INSTALL_EXISTENCE', 'true'); define('WARN_CONFIG_WRITEABLE', 'true'); define('WARN_SESSION_DIRECTORY_NOT_WRITEABLE', 'true'); define('WARN_SESSION_AUTO_START', 'true');
} else { $cPath = ''; } if (!empty($cPath)) { $cPath_array = tep_parse_category_path($cPath); $cPath = implode('_', $cPath_array); $current_category_id = $cPath_array[sizeof($cPath_array) - 1]; } else { $current_category_id = 0; } // include category tree class require 'includes/classes/category_tree.php'; // include the breadcrumb class and start the breadcrumb trail require 'includes/classes/breadcrumb.php'; $breadcrumb = new breadcrumb(); $breadcrumb->add(HEADER_TITLE_TOP, HTTP_SERVER); $breadcrumb->add(HEADER_TITLE_CATALOG, OSCOM::link('index.php')); // add category names or the manufacturer name to the breadcrumb trail if (isset($cPath_array)) { for ($i = 0, $n = sizeof($cPath_array); $i < $n; $i++) { $Qcategories = $OSCOM_Db->get('categories_description', 'categories_name', ['categories_id' => $cPath_array[$i], 'language_id' => $_SESSION['languages_id']]); if ($Qcategories->fetch() !== false) { $breadcrumb->add($Qcategories->value('categories_name'), OSCOM::link('index.php', 'cPath=' . implode('_', array_slice($cPath_array, 0, $i + 1)))); } else { break; } } } elseif (isset($_GET['manufacturers_id'])) { $Qmanufacturer = $OSCOM_Db->get('manufacturers', 'manufacturers_name', ['manufacturers_id' => $_GET['manufacturers_id']]); if ($Qmanufacturer->fetch() !== false) { $breadcrumb->add($Qmanufacturer->value('manufacturers_name'), OSCOM::link('index.php', 'manufacturers_id=' . $_GET['manufacturers_id']));
require_once DIR_FS_INC . 'olc_href_link.inc.php'; require_once DIR_FS_INC . 'olc_onclick_link.inc.php'; require_once DIR_FS_INC . 'olc_image.inc.php'; require_once DIR_FS_INC . 'olc_parse_category_path.inc.php'; require_once DIR_FS_INC . 'olc_redirect.inc.php'; require_once DIR_FS_INC . 'olc_remove_non_numeric.inc.php'; olc_smarty_init($smarty, $cacheid); // include shopping cart class require_once $catalog_class_dir . 'shopping_cart.php'; if (CURRENT_SCRIPT == FILENAME_DEFAULT) { include DIR_FS_INC . 'olc_get_slideshows.inc.php'; } // include the breadcrumb class and start the breadcrumb trail require_once DIR_WS_CLASSES . 'breadcrumb.php'; $breadcrumb = new breadcrumb(); $breadcrumb->add(HEADER_TITLE_TOP, olc_href_link(FILENAME_DEFAULT)); if (SHOW_CHANGE_SKIN) { if (!$_SESSION['template_check']) { //Check for more templates $_SESSION['template_check'] = true; $templates_dir = TEMPLATE_PATH; $illegal_templates = CURRENT_TEMPLATE . 'CVS.common.powertemplates'; $templates_count = 0; $dh = opendir($templates_dir); while ($this_template = readdir($dh)) { if (substr($this_template, 0, 1) != DOT) { if ($this_template != UNDERSCORE) { if (strpos($illegal_templates, $this_template) === false) { $templates_count++; } }