褰撳墠浣嶇疆錛?/span>
158鏈哄簥緗?/a>
- 鍝佺墝鍒楄〃
- '>
锘??php require_once '../../WebSiteConfig.php'; $mysql = new Mysql(); $brandid = intval("744"); if (empty($brandid)) $brandid = intval($_GET['brandid']); $sql = "select brand.*,city.name as cityname from brand left join city on brand.cityid = city.ID where brand.ID = " . $brandid; $link_info = $mysql->getRow($sql); if(empty($link_info)) exit("data not find"); $type3_list_type = 1; $sql = "select type3.*,type2.othername as type2_othername from type3 left join type2 on type2.ID = type3.type2id where type3.brands like '%," . $brandid . ",%' or type3.brands like '%" . $brandid . ",'"; $type3_list = $mysql->getAll($sql); if (count($type3_list) == 0) { $sql = "select * from type2"; $type3_list = $mysql->getAll($sql); $type3_list_type = 2; } // $link = array(); // $sql = "select ID,name,pic1,url from link ORDER BY RAND() LIMIT 5"; // $link = $mysql->getRow($sql); $sql = "select ID,name,othername from city ORDER BY RAND() LIMIT 32"; $city_list = $mysql->getAll($sql); $page = isset($_GET['page']) ? intval($_GET['page']) : 1; $pagesize = 20; $paging = new Paging(); $idstab = $mysql->tab("select id from product where ID>0 and brandid=" . $brandid . " order by id desc"); $pagedata = $paging->getPageIds($idstab, $page, $pagesize); $sql = "select * from product where ID in (" . implode(",", $pagedata["onePageIds"]) . ") order by ID desc"; $product_list = $mysql->getALL($sql); foreach ($product_list as $key => $value) { $product_list[$key]['url'] = '/product-detail/' . explode(".", $value['ID'] / 1000)[0] . '/' . $value['ID'] . '.html'; } $p = new Page($pagedata["totalNum"], 6, $page, 20); ?>