assign('topTabType',$autoInfoType); //auto if (isset($_REQUEST['autoid'])){ $id=isset($_REQUEST['autoid'])?abs(intval($_REQUEST['autoid'])):0; }else { $id=isset($_REQUEST['id'])?abs(intval($_REQUEST['id'])):0; } if ($id){ $thisAuto=$autoCf->getCfByID($id); $smarty->assign('thisAuto',$thisAuto); } $smarty->assign('bigTabs',autoBigTabs('storemap',$id)); //geo $smarty->assign('googleMapJs',googleMapJs()); if (isset($_REQUEST['geoid'])){ $geoid=isset($_REQUEST['geoid'])?abs(intval($_REQUEST['geoid'])):0;//當前地區 }else { $geoid=isset($_REQUEST['geo'])?abs(intval($_REQUEST['geo'])):0;//當前地區 } if ($geoid){ $currentGeo=$geo->getGeoByID($geoid); }else { $currentGeo=$geo->getGeoByID($defaultLocation->id); } $smarty->assign('currentGeo',$currentGeo); //areas /********************geo select*****************************/ $smarty->assign('cityGradeCount',CITY_CHANNEL_GRADE_COUNT); if (CITY_CHANNEL_GRADE_COUNT!=3){ //$geos=$geo->getChildGeo($defaultLocation->id); $geos=$geo->citys(); /* if ($geoid==$defaultLocation->id){ $geoOptions=''; }else { $geoOptions=''; } */ $currentGeo=$geos[$geoid]; if ($geos){ foreach ($geos as $ga){ if ($geoid==$ga->id){ $geoOptions.=''; }else { $geoOptions.=''; } } } $smarty->assign('geoOptions',$geoOptions); }else { $smarty->assign('geoSelect',$geo->geoSelect($_GET['geoid'],CITY_CHANNEL_GRADE_COUNT)); } //keyword $keyword=$_REQUEST['keyword']; $smarty->assign('keyword',$keyword); //stores $page=isset($_REQUEST['page'])?intval($_REQUEST['page']):1; $page=$page>0?$page:1; $pageSize=10; if ($page>1){ $start=($page-1)*$pageSize; } $stores=$store->storesOfGeo($geoid,1,$pageSize,null,$id,$start,$keyword); $storesArr=array(); if ($stores){ include_once(ABS_PATH.'/core/traffic.php'); $traffic=new traffic(1); foreach ($stores as $s){ //sale brands $brands=explode(',',$s->brand); $brandStr=''; if ($brands){ foreach ($brands as $b){ if (intval($b)){ $thisBrand=$autoCf->getCfByID($b); $brandStr.=$thisBrand->name.' '; } } } //geo $thisGeo=$geo->getGeoByID($s->geo_id); $parentGeo=$geo->getGeoByID($thisGeo->parentid); //400 if ($s->sale400||$s->service400){ $web400num=loadConfig('webCall','400num'); if ($s->sale400){ $s->tel=$web400num.'轉'.$s->sale400; } if ($s->service400){ $s->servicetel=$web400num.'轉'.$s->service400; } } $storesArr[]=array('id'=>$s->id,'name'=>$s->name,'shortname'=>$s->shortname,'tel'=>$s->tel,'address'=>$s->address,'longitude'=>$s->longitude,'latitude'=>$s->latitude,'brands'=>$brandStr,'area'=>$parentGeo->name.$thisGeo->name,'class'=>$s->class,'url'=>$s->url); } } $smarty->assign('stores',$storesArr); //$pagination $total=$store->storesCountOfGeo($geoid,1,null,$id,$keyword,0,1); $smarty->assign('total',$total); $pagination=foregroundPage($total,$page,$pageSize,CAR_URL_ROOT.'/tstore.php?geoid='.$_GET['geoid'].'&autoid='.$id.'&page='); $smarty->assign('pagination',$pagination); //caches if ($user->isAdmin){ $caches=array( array('name'=>'autosTree'.$autoInfoType,'type'=>'permanentCache','des'=>'汽車樹'), ); $smarty->assign('caches',$caches); } // //meta if (file_exists(ABS_PATH.'/meta/'.META_DIR.'/'.CAR_DIR.'/tstore.php')){ include_once(ABS_PATH.'/meta/'.META_DIR.'/'.CAR_DIR.'/tstore.php'); } //compare $smarty->display('auto/tstore.tpl'); ?>十或更好5手救援彩金 快乐赛车开奖官网 五分快三免费计划软件 上班要赚钱吗 九龙二肖中特123期 上海天天彩选4中2个号 福彩湖北30选5开奖号 云南快乐10分钟开奖结果 种植樱桃萝卜赚钱吗 北京pk10两个平台对刷 美人捕鱼游戏下载安装 金牛棋牌游戏下载网址 恋战打银月赚钱吗 365棋牌游戏大厅官网 幸运飞艇怎么玩容易赢 重庆时时采360 陕西十一选五历史开奖