Files
2017-03-02 20:30:40 -06:00

54 lines
2.3 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
+--------------------------------------------------------------------------
| search.inc.php
| ========================================
| Advanced Product Search
+--------------------------------------------------------------------------
*/
if(!defined('CC_INI_SET')){ die("Access Denied"); }
$lang = getLang("includes".CC_DS."content".CC_DS."search.inc.php");
$content = new XTemplate ("content".CC_DS."search.tpl");
$sql = sprintf("SELECT cat_id, cat_father_id, cat_name FROM %sCubeCart_category WHERE hide = 0 AND cat_desc != '##HIDDEN##' AND noProducts >= 1 GROUP BY cat_father_id, cat_id", $glob['dbprefix']);
$results = $db->select($sql);
for ($i=0; $i<count($results); $i++) {
$content->assign('OPTION_VALUE', $results[$i]['cat_id']);
$content->assign('OPTION_TITLE', getCatDir($results[$i]['cat_name'], $results[$i]['cat_father_id'], $results[$i]['cat_id']));
$content->parse("adv_search.adv_search_category");
}
$content->assign('LANG_SEARCH_TITLE', $lang['search']['search_title']);
$content->assign('LANG_SEARCH_KEYWORD', $lang['search']['search_keyword']);
$content->assign('LANG_SEARCH_PRICE', $lang['search']['search_price']);
$content->assign('LANG_SEARCH_INSTOCK', $lang['search']['search_instock']);
$content->assign('LANG_SEARCH_CATEGORY', $lang['search']['search_category']);
$content->assign('LANG_SEARCH_CATEGORY_HELP', $lang['search']['search_category_help']);
$content->assign('LANG_SEARCH_SUBMIT', $lang['search']['search_submit']);
$content->assign('LANG_SEARCH_RESET', $lang['search']['search_reset']);
$content->parse("adv_search");
$page_content = $content->text("adv_search");
?>