public static function getqrcode() { $result = array(); if ($result['html'] = lC_Template::getQRCode()) { $result['rpcStatus'] = RPC_STATUS_SUCCESS; } echo json_encode($result); }
public function initialize() { global $lC_Session; $data = array(); // added to allow a reset to the DEFAULT_TEMPLATE database setting $reset = array(); $reset[] = array('id' => 'reset', 'text' => 'Clear Template Selection'); foreach (lC_Template::getTemplates() as $template) { $data[] = array('id' => $template['code'], 'text' => $template['title']); } // merge the reset option into the templates dropdown selection array $data = array_merge($reset, $data); if (sizeof($data) > 1) { $hidden_get_variables = ''; foreach ($_GET as $key => $value) { if ($key != 'template' && $key != $lC_Session->getName() && $key != 'x' && $key != 'y') { $hidden_get_variables .= lc_draw_hidden_field($key, $value); } } $this->_content = '<li class="box-templates-selection">' . $hidden_get_variables . lc_draw_pull_down_menu('template', $data, $_SESSION['template']['code'], 'class="box-templates-select" onchange="$(this).closest(\'form\').submit();"') . lc_draw_hidden_session_id_field() . '</li>'; } }
<?php /** @package catalog @author Loaded Commerce @copyright Copyright 2003-2014 Loaded Commerce, LLC @copyright Portions Copyright 2003 osCommerce @license https://github.com/loadedcommerce/loaded7/blob/master/LICENSE.txt @version $Id: info.php v1.0 2013-08-08 datazen $ */ $_SERVER['SCRIPT_FILENAME'] = __FILE__; require 'includes/application_top.php'; $lC_Language->load('info'); if ($lC_Services->isStarted('breadcrumb')) { $lC_Breadcrumb->add($lC_Language->get('breadcrumb_information'), lc_href_link(FILENAME_INFO)); } $lC_Template = lC_Template::setup('info'); require $lC_Vqmod->modCheck('templates/' . $lC_Template->getCode() . '.php'); require $lC_Vqmod->modCheck('includes/application_bottom.php');
public function lC_Index_Index() { global $lC_Database, $lC_Services, $lC_Language, $lC_Breadcrumb, $cPath, $cPath_array, $current_category_id, $lC_CategoryTree, $lC_Category, $lC_Session; $this->_page_title = sprintf($lC_Language->get('index_heading'), STORE_NAME); $template_code = isset($_SESSION['template']['code']) && $_SESSION['template']['code'] != NULL ? $_SESSION['template']['code'] : 'core'; // attempting to match categories url capability to get data from permalink if (empty($_GET) === false) { $id = false; // PHP < 5.0.2; array_slice() does not preserve keys and will not work with numerical key values, so foreach() is used foreach ($_GET as $key => $value) { $key = end(explode("/", $key)); if ((preg_match('/^[0-9]+(#?([0-9]+:?[0-9]+)+(;?([0-9]+:?[0-9]+)+)*)*$/', $key) || preg_match('/^[a-zA-Z0-9 -_]*$/', $key)) && $key != $lC_Session->getName()) { $id = $key; } break; } } if (empty($cPath_array) && $_GET['cPath'] == '' && isset($lC_Services) && $lC_Services->isStarted('seo')) { foreach ($_GET as $cats => $values) { $cats = explode("/", $cats); foreach ($cats as $cat) { $Qcid = $lC_Database->query('select item_id from :table_permalinks where permalink = :permalink and type = 1 and language_id = :language_id'); $Qcid->bindTable(':table_permalinks', TABLE_PERMALINKS); $Qcid->bindValue(':permalink', $cat); $Qcid->bindInt(':language_id', $lC_Language->getID()); $Qcid->execute(); $cPath_array[] = $Qcid->valueInt('item_id'); } } } if (isset($lC_Services) && $lC_Services->isStarted('seo') && $_GET['cpath'] == '') { $id = $lC_CategoryTree->getID($id); $cData = $lC_CategoryTree->getData($id); $cPath = end(explode("_", $cData['query'])); $current_category_id = $cData['item_id']; } else { $cPath = $_GET['cPath']; } if (isset($cPath) && empty($cPath) === false) { if ($lC_Services->isStarted('breadcrumb')) { $Qcategories = $lC_Database->query('select categories_id, categories_name from :table_categories_description where categories_id in (:categories_id) and language_id = :language_id'); $Qcategories->bindTable(':table_categories_description', TABLE_CATEGORIES_DESCRIPTION); $Qcategories->bindTable(':categories_id', implode(',', $cPath_array)); $Qcategories->bindInt(':language_id', $lC_Language->getID()); $Qcategories->execute(); $categories = array(); while ($Qcategories->next()) { $categories[$Qcategories->value('categories_id')] = $Qcategories->valueProtected('categories_name'); } $Qcategories->freeResult(); if ($lC_Services->isStarted('breadcrumb')) { if (isset($_GET['cPath']) && $_GET['cPath'] != '') { $path = $_GET['cPath']; } else { $path = implode("_", $cPath_array); } $lC_Breadcrumb->add(null, null, $path); } } $lC_Category = new lC_Category($current_category_id); // added to check for category status and show not found page if ($lC_CategoryTree->getStatus($current_category_id) == 1) { // categry is enabled move on $this->_page_title = $lC_Category->getTitle(); if ($lC_Category->hasImage()) { $this->_page_image = 'categories/' . $lC_Category->getImage(); } $Qproducts = $lC_Database->query('select products_id from :table_products_to_categories where categories_id = :categories_id limit 1'); $Qproducts->bindTable(':table_products_to_categories', TABLE_PRODUCTS_TO_CATEGORIES); $Qproducts->bindInt(':categories_id', $current_category_id); $Qproducts->execute(); if ($Qproducts->numberOfRows() > 0) { $this->_page_contents = 'product_listing.php'; $this->_process(); } else { $Qparent = $lC_Database->query('select categories_id from :table_categories where parent_id = :parent_id limit 1'); $Qparent->bindTable(':table_categories', TABLE_CATEGORIES); $Qparent->bindInt(':parent_id', $current_category_id); $Qparent->execute(); // VQMOD-hookpoint; DO NOT MODIFY OR REMOVE THE LINE BELOW $this->_page_contents = 'category_listing.php'; $this->_process(); } // ogp tags $this->addOGPTags('site_name', STORE_NAME); $this->addOGPTags('type', 'website'); $this->addOGPTags('title', $this->_page_title); $this->addOGPTags('description', $this->_page_title); $this->addOGPTags('url', lc_href_link(FILENAME_DEFAULT, 'cPath=' . $_GET['cPath'], 'NONSSL', false, true, true)); $this->addOGPTags('image', HTTP_SERVER . DIR_WS_CATALOG . 'templates/' . $template_code . '/images/logo.png'); if ($lC_Category->hasImage()) { $this->addOGPTags('image', HTTP_SERVER . DIR_WS_CATALOG . DIR_WS_IMAGES . $this->_page_image); } } else { // category is disabled, show not found content $this->_page_contents = 'category_not_found.php'; } } else { $this->addOGPTags('site_name', STORE_NAME); $this->addOGPTags('type', 'website'); $this->addOGPTags('title', $this->_page_title); $this->addOGPTags('description', lC_Template::getBranding('meta_description') != '' ? lC_Template::getBranding('meta_description') : $this->_page_title); $this->addOGPTags('url', lc_href_link(FILENAME_DEFAULT, '', 'NONSSL', false, true, true)); if ($this->getBranding('og_image') && $this->getBranding('og_image') != 'no_image.png') { $this->addOGPTags('image', HTTP_SERVER . DIR_WS_CATALOG . DIR_WS_IMAGES . 'branding/' . $this->getBranding('og_image')); } else { $this->addOGPTags('image', HTTP_SERVER . DIR_WS_CATALOG . DIR_WS_IMAGES . 'no_image.png'); } } }
<?php /** @package catalog @author Loaded Commerce @copyright Copyright 2003-2014 Loaded Commerce, LLC @copyright Portions Copyright 2003 osCommerce @license https://github.com/loadedcommerce/loaded7/blob/master/LICENSE.txt @version $Id: search.php v1.0 2013-08-08 datazen $ */ $_SERVER['SCRIPT_FILENAME'] = __FILE__; require 'includes/application_top.php'; $lC_Language->load('search'); if ($lC_Services->isStarted('breadcrumb')) { $lC_Breadcrumb->add($lC_Language->get('breadcrumb_search'), lc_href_link(FILENAME_SEARCH)); } $lC_Template = lC_Template::setup('search'); require $lC_Vqmod->modCheck('templates/' . $lC_Template->getCode() . '.php'); require $lC_Vqmod->modCheck('includes/application_bottom.php');
<?php /** @package catalog @author Loaded Commerce @copyright Copyright 2003-2014 Loaded Commerce, LLC @copyright Portions Copyright 2003 osCommerce @license https://github.com/loadedcommerce/loaded7/blob/master/LICENSE.txt @version $Id: index.php v1.0 2013-08-08 datazen $ */ $_SERVER['SCRIPT_FILENAME'] = __FILE__; require 'includes/application_top.php'; $lC_Language->load('index'); $lC_Template = lC_Template::setup('index'); require $lC_Vqmod->modCheck('templates/' . $lC_Template->getCode() . '.php'); require $lC_Vqmod->modCheck('includes/application_bottom.php');
/** @package catalog @author Loaded Commerce @copyright Copyright 2003-2014 Loaded Commerce, LLC @copyright Portions Copyright 2003 osCommerce @license https://github.com/loadedcommerce/loaded7/blob/master/LICENSE.txt @version $Id: account.php v1.0 2013-08-08 datazen $ */ $_SERVER['SCRIPT_FILENAME'] = __FILE__; require 'includes/application_top.php'; if ($lC_Customer->isLoggedOn() === false) { if (!empty($_GET)) { $first_array = array_slice($_GET, 0, 1); } if (empty($_GET) || !empty($_GET) && !in_array(lc_sanitize_string(basename(key($first_array))), array('login', 'create', 'password_forgotten'))) { $lC_NavigationHistory->setSnapshot(); lc_redirect(lc_href_link(FILENAME_ACCOUNT, 'login', 'SSL')); } } // VQMOD-hookpoint; DO NOT MODIFY OR REMOVE THE LINE BELOW $lC_Language->load('account'); if ($lC_Services->isStarted('breadcrumb')) { $lC_Breadcrumb->add($lC_Language->get('breadcrumb_my_account'), lc_href_link(FILENAME_ACCOUNT, null, 'SSL')); } $lC_Template = lC_Template::setup('account'); $countries_array = array(array('id' => '', 'text' => $lC_Language->get('pull_down_default'))); foreach (lC_Address::getCountries() as $country) { $countries_array[] = array('id' => $country['id'], 'text' => $country['name']); } require $lC_Vqmod->modCheck('templates/' . $lC_Template->getCode() . '.php'); require $lC_Vqmod->modCheck('includes/application_bottom.php');
<?php /** @package catalog @author Loaded Commerce @copyright Copyright 2003-2014 Loaded Commerce, LLC @copyright Portions Copyright 2003 osCommerce @license https://github.com/loadedcommerce/loaded7/blob/master/LICENSE.txt @version $Id: products.php v1.0 2013-08-08 datazen $ */ $_SERVER['SCRIPT_FILENAME'] = __FILE__; require 'includes/application_top.php'; $lC_Language->load('products'); $lC_Template = lC_Template::setup('products'); require $lC_Vqmod->modCheck('templates/' . $lC_Template->getCode() . '.php'); require $lC_Vqmod->modCheck('includes/application_bottom.php');
<?php /** @package catalog @author Loaded Commerce @copyright Copyright 2003-2014 Loaded Commerce, LLC @copyright Portions Copyright 2003 osCommerce @license https://github.com/loadedcommerce/loaded7/blob/master/LICENSE.txt @version $Id: checkout.php v1.0 2013-08-08 datazen $ */ $_SERVER['SCRIPT_FILENAME'] = __FILE__; require 'includes/application_top.php'; $lC_Language->load('checkout'); if ($lC_Services->isStarted('breadcrumb')) { $lC_Breadcrumb->add($lC_Language->get('breadcrumb_checkout'), lc_href_link(FILENAME_CHECKOUT, null, 'SSL')); } $lC_Template = lC_Template::setup('cart'); $countries_array = array(array('id' => '', 'text' => $lC_Language->get('pull_down_default'))); foreach (lC_Address::getCountries() as $country) { $countries_array[] = array('id' => $country['id'], 'text' => $country['name']); } require $lC_Vqmod->modCheck('templates/' . $lC_Template->getCode() . '.php'); require $lC_Vqmod->modCheck('includes/application_bottom.php');