array('m'=>'store','c'=>'pages','a'=>'content'), 'channel'=>array('m'=>'store','c'=>'pages','a'=>'newslist'), ); if (isset($_GET['type'])&&in_array($_GET['type'],array_keys($newActionArr))){//新模式 include ABS_PATH.'config.inc.php'; include ABS_PATH.MANAGE_DIR.DIRECTORY_SEPARATOR.'base.php'; define('ROUTE_MODEL', $newActionArr[$_GET['type']]['m']); define('ROUTE_CONTROL', $newActionArr[$_GET['type']]['c']); define('ROUTE_ACTION', $newActionArr[$_GET['type']]['a']); bpBase::creatApp(); }else { require_once(ABS_PATH.'/includes.php'); $autoCf=new autoClassification(); $storeChannel=new storeChannel(); $storeContent=new storeContent(); $autoPrice=new autoPrice(); $storeMessage=new storeMessage(); $store=new store(); require_once(ABS_PATH.'/store/include/include.php'); require_once(ABS_PATH.'/store/include/card.include.php'); $smarty->assign('storeConfig',loadConfig('store')); //user //$storeID=intval($_GET['id']); if ($thisStore&&$thisStore->verified){ $smarty->assign('storeExist',1); $smarty->assign('googleMapJs',googleMapJs()); if (!$thisStore->website){ $thisStore->website=$thisStore->url; } $smarty->assign('store',$thisStore); $smarty->assign('user',$user); //channels by id $channelsByID=array(); if ($storeChannels){ foreach ($storeChannels as $sc){ $channelsByID[$sc->id]=$sc; } } $qqs=explode(' ',$thisStore->qq); $smarty->assign('qqs',$qqs); //其他頁面 $smarty->assign('infoType',$_GET['type']); switch ($_GET['type']){ case 'branchStore': $branchStore=$store->getStore($_GET['branchStoreID']); $smarty->assign('branchStore',$branchStore); //qqs $qqs=explode(' ',$branchStore->qq); $smarty->assign('qqs',$qqs); break; case 'price': /***************************card*********************************/ // $requestAutoID=isset($_REQUEST['autoid'])?abs(intval($_REQUEST['autoid'])):0; // $thisAutoCf=$autoCf->getCfByID($_REQUEST['autoid']); $smarty->assign('thisAutoCf',$thisAutoCf); $pageSize=10; $page=isset($_REQUEST['page'])?abs(intval($_REQUEST['page'])):1; // $start=($page-1)*$pageSize; // $saleAutos=$autoPrice->autosOfStore($storeID); $k=0;//總數 //按照指定的第三級車型過濾 $saleAutosFiltered=array(); if ($requestAutoID){ $ka=0;//具體車型下的總數 foreach ($saleAutos as $a){ switch ($thisAutoCf->grade){ case 1: $specifiedID=intval($a['g1id']); break; case 2: $specifiedID=intval($a['g2id']); break; case 3: $specifiedID=intval($a['parentid']); break; } if ($specifiedID==$requestAutoID){//計算某指定車型下的車型 array_push($saleAutosFiltered,$a); $ka++;//計算某指定車型下的總數 } } }else { $saleAutosFiltered=$saleAutos; } // $count=0;//控制顯示個數 $pageAutos=array();//分頁顯示 if ($saleAutosFiltered){ foreach ($saleAutosFiltered as $a){ $parentid=intval($a['parentid']); if (($k==$start||$k>$start)&&$count<$pageSize){ $pageAutos[$count]=$a; $pageAutos[$count]['show']=1; $count++;//控制顯示每頁顯示的個數 } $k++; } } $smarty->assign('autosArr',$pageAutos); //pagination if (!$requestAutoID){ $total=$k; }else { $total=$ka; } $smarty->assign('total',$total); $pagination=foregroundPage($total,$page,$pageSize,STORE_URL_ROOT.'/info.php?id='.$storeID.'&type=price&autoid='.$requestAutoID.'&page='); $smarty->assign('pagination',$pagination); break; case 'intro': /***************************card*********************************/ if (!$thisStore->latitude){ $geo=new geo(); $defaultLocaiton=$geo->getDefaultLocation(); $thisStore->latitude=$defaultLocaiton->latitude; $thisStore->longitude=$defaultLocaiton->longitude; } $smarty->assign('store',$thisStore); $thisStore->intro=str_replace('"/upload','"'.MAIN_URL_ROOT.'/upload',$thisStore->intro); // $smarty->assign('intro',$thisStore->intro); break; case 'consultant': /***************************card*********************************/ // $consultants=$user->consultantsOfStore($thisStore->id,1); $count=count($consultants); $cArr=array(); //include ABS_PATH.'/config.inc.php'; if (SYNC_WITH_UC){ include ABS_PATH.'/uc_client/client.php'; } for ($i=0;$i<$count;$i++){ if ($consultants[$i]->realname!=null){ $cArr[$i]['realname']=$consultants[$i]->realname; $cArr[$i]['qq']=$consultants[$i]->qq; $cArr[$i]['mp']=$consultants[$i]->mp; $cArr[$i]['duty']=$consultants[$i]->duty; $cArr[$i]['eidos']=$consultants[$i]->eidos; if (file_exists(ABS_PATH.'./upload/consultant/'.$consultants[$i]->consultantID.'.'.$consultants[$i]->portraitext)){ $cArr[$i]['portrait']='/upload/consultant/'.$consultants[$i]->consultantID.'_small.'.$consultants[$i]->portraitext; $cArr[$i]['bigportrait']='/upload/consultant/'.$consultants[$i]->consultantID.'_big.'.$consultants[$i]->portraitext; }else { $cArr[$i]['portrait']=''; $cArr[$i]['bigportrait']=''; } } } $smarty->assign('cArr',$cArr); break; case 'message': /***************************card*********************************/ if (!defined('STORE_MESSAGE_PAGESIZE')){ define('STORE_MESSAGE_PAGESIZE',20); } // $page=isset($_REQUEST['page'])?$_REQUEST['page']:1; $storeMessage=new storeMessage(); if (loadConfig('system','storeMessageCheck')){ global $autoDB; $storeType=1; $start=($page-1)*STORE_MESSAGE_PAGESIZE; $messages=$autoDB->get_results('SELECT * FROM '.AUTO_TABLE_PREFIX.'store_messageboard WHERE storetype='.$storeType.' AND replied=1 AND storeid='.$storeID.' ORDER BY time DESC LIMIT '.$start.','.STORE_MESSAGE_PAGESIZE); $total=$autoDB->get_var('SELECT COUNT(id) FROM '.AUTO_TABLE_PREFIX.'store_messageboard WHERE storetype='.$storeType.' AND replied=1 AND storeid='.$storeID); }else { $messages=$storeMessage->messagesOfStore($storeID,$page); $total=$storeMessage->messagesOfStoreCount($storeID); } $mArr=array(); $v=0; if ($messages){ foreach ($messages as $m){ $thisUser=$user->getUserByUID($m->uid); $mArr[$v]['id']=$m->id; $mArr[$v]['uid']=$m->uid; if ($m->uid){ $mArr[$v]['username']=$thisUser->username; }else { $mArr[$v]['username']=$m->name; } $mArr[$v]['portrait']=MAIN_URL_ROOT.$user->getPortrait($m->uid,'s'); $mArr[$v]['message']=$m->message; $mArr[$v]['anonymity']=intval($m->anonymity); $mArr[$v]['time']=$m->time; $reply=$storeMessage->getReplyByMessageID($m->id); $replyUser=$user->getUserByUID($reply->uid); if (intval($reply->uid)==intval($thisStore->uid)){ $mArr[$v]['replier']='店主'; }else { $mArr[$v]['replier']=$reply->name; } $mArr[$v]['reply']=$reply->reply; $mArr[$v]['replytime']=$reply->time; $mArr[$v]['replyID']=$reply->id; $mArr[$v]['canReply']=$storeMessage->canReplyStoreMessage($user->uid,$storeID,$m->id); $mArr[$v]['canUpdateReply']=$storeMessage->canUpdateStoreMessageReply($user->uid,$storeID,$m->id); $v++; } } $smarty->assign('messageArr',$mArr); if (URL_REWRITE){ $pagination=foregroundPage($total,$page,$pageSize,STORE_URL_ROOT.'/'.$_REQUEST['id'].'/message-p','.html'); }else { $pagination=foregroundPage($total,$page,$pageSize,STORE_URL_ROOT.'/info.php?id='.$_REQUEST['id'].'&type=message&page=',''); } $smarty->assign('total',$total); $smarty->assign('pagination',$pagination); //valide code require_once(ABS_PATH.'./core/img.php'); $img=new img(); $randStr=autoRrandStr(4); $_SESSION['validCode']=$randStr; session_regenerate_id(); $img->generalConfirmCode($randStr); $smarty->assign('randStr',$randStr); break; } /************************************meta*************************/ include_once(ABS_PATH.'/meta/'.META_DIR.'/'.STORE_DIR.'/info.php'); //extension if (file_exists(ABS_PATH.'/extension/'.AUTO_SKIN.$_SERVER['PHP_SELF'])){ include_once(ABS_PATH.'/extension/'.AUTO_SKIN.$_SERVER['PHP_SELF']); } //template include_once(ABS_PATH.'/constant/storeTemplates.php'); $templateid=$thisStore->templateid; $smarty->assign('cssName',$storeTemplates[$templateid]['index']); $smarty->display('store/info.tpl'); }else { $smarty->assign('storeExist',0); smarty404($smarty); } } ?>波叔一波中特第8期2017 欧洲快乐赛车计划 黑龙江十一选五下载 贵州快三走势图表 金博棋牌送10元网址 威廉希尔足球指数欧洲 小鱼赚钱怎么查询提现 股票分析专家排行榜 手机捕鱼棋牌 北京赛车pk拾开奖记录 3d官方yuce