require_once('phplib/mobile_redirect.php'); require_once('phplib/common.php'); require_once('phplib/template.php'); require_once('phplib/product_lib.php'); if(isset($_GET['id'])) { $brand = addslashes($_GET['id']); if($brand == 'SK' && $_SERVER['REQUEST_URI'] == '/brand.php?id=SK') { // 2015/05/19 Dragoon. Hannah 提出轉址需求 // start header("Location: http://gift.teascovery.com/brand.php?id=TC"); die(); //redirect('./shakingtea'); //exit(); // end } $img_path = "images/brand/$brand"; foreach(array('jpg', 'png', 'gif') as $ext) { if(file_exists("$img_path/banner.$ext")) { $banner_path = "$img_path/banner.$ext"; break; } } if(! isset($BRAND[$brand]) || $BRAND[$brand]['enable'] != 1) { ShowMsg("$brand: 不正確的參數!"); } mysql_open(); $sql = "SELECT * FROM `brand` WHERE `id`='$brand'"; $brand_data = mysql_fetch_one($sql); $sql = "SELECT * FROM `products` WHERE `brand`='$brand' and `enable`=1 ORDER BY `id` ASC"; $products = mysql_fetch_all($sql); mysql_close(); if($brand == 'SK') { $link_url = './shakingtea'; } else { $link_url = "{$php_self}?id={$brand}"; } html_header_1('', array('brand.js'), array('find.css', 'brand.css'), $BRAND[$brand]['name']); html_upstartdna(); html_header_2(array( $link_url => $BRAND[$brand]['name'] )); ?>
$show_content = ($brand_data['content'] != ''); $show_promo = ($brand_data['promotion'] != '' && check_period($brand_data['promo_start_date'], $brand_data['promo_end_date'])); if($show_content || $show_promo) { ?>