62 lines
2.2 KiB
PHP
62 lines
2.2 KiB
PHP
<?php
|
|
/*
|
|
+--------------------------------------------------------------------------
|
|
| CubeCart 4
|
|
| ========================================
|
|
| CubeCart is a registered trade mark of Devellion Limited
|
|
| Copyright Devellion Limited 2006. All rights reserved.
|
|
| Devellion Limited,
|
|
| 5 Bridge Street,
|
|
| Bishops Stortford,
|
|
| HERTFORDSHIRE.
|
|
| CM23 2JU
|
|
| UNITED KINGDOM
|
|
| http://www.devellion.com
|
|
| UK Private Limited Company No. 5323904
|
|
| ========================================
|
|
| Web: http://www.cubecart.com
|
|
| Email: info (at) cubecart (dot) com
|
|
| License Type: CubeCart is NOT Open Source Software and Limitations Apply
|
|
| Licence Info: http://www.cubecart.com/site/faq/license.php
|
|
+--------------------------------------------------------------------------
|
|
| info.inc.php
|
|
| ========================================
|
|
| Info & Stats Box
|
|
+--------------------------------------------------------------------------
|
|
*/
|
|
|
|
if (!defined('CC_INI_SET')) die("Access Denied");
|
|
|
|
// include lang file
|
|
$lang = getLang("includes".CC_DS."boxes".CC_DS."info.inc.php");
|
|
|
|
// query database
|
|
$cache = new cache('boxes.info.noProducts');
|
|
$noProducts = $cache->readCache();
|
|
if (!$cache->cacheStatus) {
|
|
$noProducts = $db->select("SELECT count(productId) as no FROM ".$glob['dbprefix']."CubeCart_inventory WHERE cat_id > 0");
|
|
$cache->writeCache($noProducts);
|
|
}
|
|
|
|
// query database
|
|
$cache = new cache('boxes.info.noCategories');
|
|
$noCategories = $cache->readCache();
|
|
if (!$cache->cacheStatus) {
|
|
$noCategories = $db->select("SELECT count(cat_id) as no FROM ".$glob['dbprefix']."CubeCart_category WHERE hide = 0");
|
|
$cache->writeCache($noCategories);
|
|
}
|
|
|
|
$box_content = new XTemplate ("boxes".CC_DS."info.tpl");
|
|
|
|
$box_content->assign("LANG_INFO_TITLE", $lang['info']['information']);
|
|
$box_content->assign("LANG_INFO_PRODUCTS", $lang['info']['products']);
|
|
$box_content->assign("DATA_NO_PRODUCTS", $noProducts[0]['no']);
|
|
$box_content->assign("LANG_INFO_CATEGORIES", $lang['info']['categories']);
|
|
$box_content->assign("DATA_NO_CATEGORIES", $noCategories[0]['no']);
|
|
$box_content->assign("LANG_INFO_PRICES", $lang['info']['prices']);
|
|
$box_content->assign("DATA_CURRENCY", $currencyVars[0]['name']);
|
|
|
|
$box_content->parse("info");
|
|
|
|
$box_content = $box_content->text("info");
|
|
?>
|