function codes() { return array(USD(), EUR(), GBP(), CNY(), CAD(), JPY(), BTC()); }
$cnt->assign(array('product_id' => $item['id'], 'product_img' => $item['product_fullimg'], 'product_thumb' => $item['product_image'], 'product_name' => $item['product_name'], 'product_name_ascii' => $item['product_name_ascii'], 'cat_name_ascii' => $cat, 'product_info' => $item['product_descrip'], 'product_price' => number($item['product_price']), 'product_free' => number($item['product_free']), 'USD_price' => USD($item['product_price']), 'USD_free' => USD($item['product_free']), 'product_total' => number($item['product_total']))); $item['product_free'] == 0 ? $cnt->parse('lsearch_price') : $cnt->parse('lsearch_free'); $item['product_total'] > 0 ? $cnt->parse('lsearch_addcart') : false; $cnt->parse('lsearch_full'); } } $cnt->assign('paging', paging(get_option('paging'), $cnt->rewrite_page, $total_s, $cnt->rewrite_search, '-page-', false)); $cnt->assign(array('this_key' => str_replace('-', ' ', $cnt->rewrite_search), 'product_all' => $total_s)); $cnt->parse('search'); $this_title .= ' | ' . str_replace('-', ' ', $cnt->rewrite_search . ' Trang ' . $cnt->rewrite_page); break; case 'product': @mysql_query("UPDATE cnt_products SET product_view = product_view + 1 WHERE id = " . $cnt->rewrite_id); $this_product = @mysql_fetch_array(@mysql_query("SELECT * FROM cnt_products WHERE id = " . $cnt->rewrite_id)); $cat = @mysql_fetch_array(@mysql_query("SELECT cat_name, cat_name_ascii FROM cnt_cats WHERE id = " . $this_product['product_cat'])); $cnt->assign(array('product_id' => $cnt->rewrite_id, 'product_name' => $this_product['product_name'], 'product_thumb' => $this_product['product_image'], 'product_img' => $this_product['product_fullimg'], 'product_quality' => $this_product['product_quality'], 'product_warranty' => $this_product['product_warranty'] == 0 ? 'Không' : $this_product['product_warranty'] . ' Tháng', 'product_price' => number($this_product['product_price']), 'USD_price' => USD($this_product['product_price']), 'product_free' => number($this_product['product_free']), 'USD_free' => USD($this_product['product_free']), 'product_total' => number($this_product['product_total']), 'product_info' => $this_product['product_info'])); $descrip = explode(' / ', $this_product['product_descrip']); foreach ($descrip as $item) { $it = explode(': ', $item); $cnt->assign(array('descrip_name' => $it[0], 'descrip_val' => $it[1])); $cnt->parse('product_descrip'); } $list_in = @mysql_query("SELECT product_name, product_image, product_fullimg, product_cat, product_name_ascii, product_price, product_free FROM cnt_products WHERE product_cat = " . $this_product['product_cat'] . " and id != " . $cnt->rewrite_id . " ORDER BY RAND() LIMIT 5"); while ($in_cat = @mysql_fetch_array($list_in)) { $cnt->assign(array('in_cat_img' => $in_cat['product_fullimg'], 'in_cat_thumb' => $in_cat['product_image'], 'in_cat_name' => $in_cat['product_name'], 'in_cat_name_ascii' => $in_cat['product_name_ascii'], 'cat_name_ascii' => $cat['cat_name_ascii'], 'in_cat_price' => $in_cat['product_free'] == 0 ? number($in_cat['product_price']) : number($in_cat['product_free']))); $cnt->parse('in_cat'); } $cnt->parse('view_product'); $this_title = $cat['cat_name'] . ' | ' . $this_product['product_name']; break; case 'news':