PageRenderTime 53ms CodeModel.GetById 19ms RepoModel.GetById 1ms app.codeStats 0ms

/b2b/core/shop/controller/ctl.gallery.php

http://phpfor.googlecode.com/
PHP | 593 lines | 476 code | 48 blank | 69 comment | 91 complexity | 68c95f59d6fc7fbc308f94171d7dc4b6 MD5 | raw file
  1. <?php
  2. class ctl_gallery extends shopPage{
  3. var $_call = 'index';
  4. var $type='goodsCat';
  5. var $seoTag=array('shopname','goods_amount','goods_cat','goods_cat_p','goods_type','brand','sort_path');
  6. function ctl_gallery(){
  7. parent::shopPage();
  8. $this->title = str_replace("{ENV_path}","{ENV_sort_path}",$this->system->getConf('site.list_title'));
  9. $this->keyWords = str_replace("{ENV_path}","{ENV_sort_path}",$this->system->getConf('site.list_meta_key_words'));
  10. $this->metaDesc = str_replace("{ENV_path}","{ENV_sort_path}",$this->system->getConf('site.list_meta_desc'));
  11. }
  12. function index($view,$cat_id=0,$urlFilter=null,$orderBy=0,$tab=null,$page=1,$cat_type=null) {
  13. // //??URL?????????,???????????????
  14. // if(!preg_match('/.*[text|grid|wholesale|index]\.html$/i',$_SERVER['QUERY_STRING'])) {
  15. // $view = $this->system->getConf('gallery.default_view');
  16. //
  17. // }
  18. $o=$this->system->loadModel('goods/productCat');
  19. if($view == 'default'){
  20. $view = $o->get_gallery_default_view();
  21. }
  22. if($orderBy==5 || $orderBy==6){
  23. $this->noCache = true;
  24. }
  25. if($cat_type){
  26. $this->type='virtualcat';
  27. $this->cat_type=$cat_type;
  28. $virtualCat=$this->system->loadModel('goods/virtualcat');
  29. $vcat=$virtualCat->instance($cat_type);
  30. parse_str($vcat['filter'],$type_filter);
  31. }
  32. $urlFilter=htmlspecialchars(urldecode($urlFilter));
  33. //????? yanglish 2010/7/11
  34. $this->showValideCode('login');
  35. $cat_id = $cat_id?$cat_id:'';
  36. if(!empty($type_filter['cat_id'])){
  37. $cat_id .= empty($cat_id) ? implode(',',$type_filter['cat_id']) : ','.implode(',',$type_filter['cat_id']);
  38. }
  39. if($cat_id){
  40. $cat_id = explode(",",$cat_id);
  41. foreach($cat_id as $k=>$v){
  42. $cat_id[$k]=intval($v);
  43. }
  44. $cat_id = array_unique($cat_id);
  45. $this->id = implode(",",$cat_id);
  46. }
  47. //{{{?????
  48. $pageLimit = 20;
  49. $this->pagedata['pdtPic']=array('width'=>100,'heigth'=>100);
  50. $this->pagedata['args'] = array(implode(",",$cat_id),urlencode($urlFilter),$orderBy,$tab,$page,$cat_type);
  51. $this->pagedata['curView'] = $view;
  52. $productCat = $this->system->loadModel('goods/productCat');
  53. if($cat_type){
  54. $this->pagedata['childnode'] = $virtualCat->getCatParentById($cat_type);
  55. }else{
  56. $this->pagedata['childnode'] = $productCat->getCatParentById($cat_id,$view);
  57. }
  58. $brandGroup=$this->system->loadModel('goods/brand');
  59. $objGoods = $this->system->loadModel('goods/products');
  60. $brandResult=$brandGroup->getBrandGroup($cat_id);
  61. $this->productCat = &$productCat;
  62. $cat = $productCat->get($cat_id,$view,$type_filter['type_id']);
  63. if(!in_array($view,$cat['setting']['list_tpl'])){
  64. header('Location: '.$this->system->mkUrl('gallery',current($cat['setting']['list_tpl']),$this->pagedata['args']),true,301);
  65. }
  66. if($cat_type){
  67. $vcat['addon'] = unserialize($vcat['addon']);
  68. if(trim($vcat['addon']['meta']['keywords'])){
  69. $this->keyWords = trim($vcat['addon']['meta']['keywords']);
  70. }
  71. if(trim($vcat['addon']['meta']['description'])){
  72. $this->metaDesc = trim($vcat['addon']['meta']['description']);
  73. }
  74. }else{
  75. if(trim($cat['addon'])){
  76. $cat['addon'] = unserialize($cat['addon']);
  77. if(trim($cat['addon']['meta']['keywords'])){
  78. $this->keyWords = trim($cat['addon']['meta']['keywords']);
  79. }
  80. if(trim($cat['addon']['meta']['description'])){
  81. $this->metaDesc = trim($cat['addon']['meta']['description']);
  82. }
  83. }
  84. }
  85. if($this->system->getConf('system.seo.noindex_catalog'))
  86. $this->header .= '<meta name="robots" content="noindex,noarchive,follow" />';
  87. $searchtools = &$this->system->loadModel('goods/search');
  88. $path =array();
  89. $filter = $searchtools->decode($urlFilter,$path,$cat);
  90. if($filter['name'][0]){
  91. $filter['name'][0] = str_replace('%xia%','_',$filter['name'][0]);
  92. $filter['name'][0] = str_replace('%zhong%','-',$filter['name'][0]);
  93. }
  94. if($filter['bn'][0]){
  95. $filter['bn'][0] = str_replace('%xia%','_',$filter['bn'][0]);
  96. $filter['bn'][0] = str_replace('%zhong%','-',$filter['bn'][0]);
  97. }
  98. $GLOBALS['search_result'] = $filter['name'][0];
  99. $this->filter = &$filter;
  100. if($GLOBALS['search_result']==''){ //???????title
  101. $this->title = '{ENV_shopname}';
  102. }
  103. else{
  104. $this->title = $GLOBALS['search_result'].'__{ENV_shopname}';
  105. }
  106. if($cat['cat_name']){ //??????title
  107. $this->title = $cat['cat_name'].'__{ENV_shopname}';
  108. }
  109. if($vcat['virtual_cat_name']){ //????????title
  110. $this->title = $vcat['virtual_cat_name'].'__{ENV_shopname}';
  111. }
  112. $filter=array_merge(array('cat_id'=>$cat_id,'marketable'=>'true'),$filter);
  113. //--------?????????
  114. if ($vcat['type_id'])
  115. $type_id = $vcat['type_id'];
  116. else{
  117. if($cat_id){
  118. foreach ($cat_id as $c){
  119. $subcat = $productCat->getSubCatId($c);
  120. $cat_id += array_merge($cat_id,$subcat);
  121. }
  122. }
  123. $type = $productCat->getFieldById($cat_id,array('type_id'));
  124. if ($type){
  125. $tmp_type = array();
  126. foreach($type as $v){
  127. $tmp_type[] = $v['type_id'];
  128. }
  129. $tmp_type = array_unique($tmp_type);
  130. if (count($tmp_type) == 1){
  131. $type_id = $tmp_type[0];
  132. }else{
  133. $type_id = 0;
  134. }
  135. }else{
  136. $type_id = 0;
  137. }
  138. }
  139. $vcat=null;
  140. $gType = $this->system->loadModel('goods/gtype');
  141. $SpecList = $gType->getSpec($type_id,1);
  142. //--------
  143. foreach($path as $p){
  144. $arg = unserialize(serialize($this->pagedata['args']));
  145. $arg[1] = $p['str'];
  146. $title = array();
  147. if(is_numeric($p['type'])){
  148. foreach($p['data'] as $i){
  149. $name = $cat['props'][$p['type']]['options'][$i];
  150. $title[] = $name?$name:$i;
  151. $tip = $cat['props'][$p['type']]['name'];
  152. }
  153. }elseif($p['type']=='brand_id'){
  154. $brand = array();
  155. foreach($cat['brand'] as $b){
  156. $brand[$b['brand_id']] = $b['brand_name'];
  157. }
  158. foreach($p['data'] as $i){
  159. $title[] = $brand[$i];
  160. $tip = "??";
  161. }
  162. unset($brand);
  163. }elseif(substr($p['type'],0,2)=='s_'){
  164. $spec = array();
  165. foreach($p['data'] as $spk => $spv){
  166. $tmp=explode(",",$spv);
  167. $tip = $SpecList[$tmp[0]]['name'];
  168. $title[]=$SpecList[$tmp[0]]['spec_value'][$tmp[1]]['spec_value'];
  169. }
  170. $curSpec[$tmp[0]]=$tmp[1];
  171. }
  172. $title = implode(',',$title);
  173. if($title){
  174. //$this->title=' '.$title;
  175. $this->path[] = array('title'=>" ".$title,'link'=>$this->system->mkUrl('gallery',$view,$arg),'tips'=>$tip);
  176. }
  177. }
  178. $cat_id = array_unique($cat_id); //???? by yangyichao 2012-1-30
  179. //-----------
  180. if($this->system->getConf('system.seo.noindex_catalog'))
  181. $this->header .= '<meta name="robots" content="noindex,noarchive,follow" />';
  182. $filter['cat_id'] = $cat_id;
  183. $filter['goods_type'] = 'normal';
  184. $filter['marketable'] = 'true';
  185. //-----??????????????ID
  186. if ($urlFilter){
  187. if($type_id){
  188. $filter['type_id']=$type_id;
  189. }
  190. }
  191. //--------
  192. $this->pagedata['desc'] = $cat['desc'];
  193. $this->pagedata['tabs'] = $cat['tabs'];
  194. $this->pagedata['cat_id'] = implode(",",$cat_id);
  195. $this->pagedata['views'] = $cat['setting']['list_tpl'];
  196. $this->pagedata['orderBy'] = $objGoods->orderBy();
  197. if($cat['tabs'][$tab]){
  198. parse_str($cat['tabs'][$tab]['filter'],$_filter);
  199. $filter = array_merge($filter,$_filter);
  200. }
  201. if($GLOBALS['runtime']['member_lv']){
  202. $filter['mlevel'] = $GLOBALS['runtime']['member_lv'];
  203. }
  204. if(!isset($this->pagedata['orderBy'][$orderBy])){
  205. $this->system->error(404);
  206. }else{
  207. $orderby = $this->pagedata['orderBy'][$orderBy]['sql'];
  208. }
  209. foreach($brandResult as $v=>$k){
  210. $brand_count[$k['brand_id']]['plus']=$k['brand_cat'];
  211. }
  212. $selector = array();
  213. $search = array();
  214. //echo "<pre>";print_r($filter);exit;
  215. if((!is_array($cat_id) && $cat_id) || $cat_id[0] || $cat_type){
  216. $goods_relate=$objGoods->getList("*",$filter,$pageLimit*($page-1),$pageLimit,$c);//2011.2.21 by-panguodong ????????????????$pageLimit ???????
  217. }
  218. if ($goods_relate){
  219. unset($tmpSpecValue);
  220. foreach($goods_relate as $grk => $grv){
  221. if ($grv['spec_desc']){
  222. $tmpSdesc=unserialize($grv['spec_desc']);
  223. if(is_array($tmpSdesc)){
  224. foreach($tmpSdesc as $tsk => $tsv){
  225. foreach($tsv as $tk => $tv){
  226. if (!in_array($tv['spec_value_id'],$tmpSpecValue))
  227. $tmpSpecValue[]=$tv['spec_value_id'];
  228. }
  229. }
  230. }
  231. }
  232. }
  233. }
  234. /***********************/
  235. if ($SpecList){
  236. if ($curSpec)
  237. $curSpecKey=array_keys($curSpec);
  238. foreach($SpecList as $spk => $spv){
  239. $selected=0;
  240. /*
  241. $existsSV=0;
  242. foreach($spv['spec_value'] as $spvk => $spvv){
  243. if (!in_array($spvk,$tmpSpecValue))
  244. unset($spv['spec_value'][$spvk]);
  245. else
  246. $existsSV=1;
  247. }
  248. if ($existsSV){*/
  249. if ($curSpecKey&&in_array($spk,$curSpecKey)){
  250. $spv['spec_value'][$curSpec[$spk]]['selected']=true;
  251. $selected=1;
  252. }
  253. if ($spv['spec_style']=="select"){ //??
  254. $SpecSelList[$spk] = $spv;
  255. if ($selected)
  256. $SpecSelList[$spk]['selected'] = true;
  257. }elseif ($spv['spec_style']=="flat"){
  258. $SpecFlatList[$spk] = $spv;
  259. if ($selected)
  260. $SpecFlatList[$spk]['selected'] = true;
  261. }
  262. //}
  263. }
  264. }
  265. $this->pagedata['SpecFlatList'] = $SpecFlatList;
  266. $this->pagedata['SpecSelList'] = $SpecSelList;
  267. $this->pagedata['specimagewidth'] = $this->system->getConf('spec.image.width');
  268. $this->pagedata['specimageheight'] = $this->system->getConf('spec.image.height');
  269. /************************/
  270. if(is_array($cat['brand'])){
  271. $filter_b=$filter;
  272. foreach($cat['brand'] as $bk => $bv){
  273. $bCount=0;
  274. $brand = array('name'=>'??','value'=>array_flip($filter['brand_id']));
  275. // foreach($goods_relate as $gk => $gv){
  276. // if ($gv['brand_id'])
  277. // if ($gv['brand_id']==$bv['brand_id']){
  278. // $bCount++;
  279. // }
  280. // }
  281. //by zhoulei 2011-7-11 ????????
  282. $filter_b['brand_id'] = $bv['brand_id'];
  283. $bCount = $objGoods->count($filter_b);
  284. if ($bCount>0){
  285. $tmpOp[$bv['brand_id']]=$bv['brand_name']."<span class='num'>(".$bCount.")</span>";
  286. }
  287. }
  288. $brand['options'] = $tmpOp;
  289. $selector['brand_id'] = $brand;
  290. }
  291. $navselector=0;
  292. foreach($cat['props'] as $prop_id=>$prop){
  293. if($prop['show']){// ???????? by yangbing 2010-04-30
  294. $navselector = 1;
  295. }else{
  296. continue;
  297. }
  298. if($prop['search']=='select'){
  299. $prop['options'] = array_merge($prop['options']);
  300. $prop['value'] = $filter['p_'.$prop_id][0];
  301. $searchSelect[$prop_id] = $prop;
  302. }elseif($prop['search']=='input'){
  303. $prop['value'] = ($filter['p_'.$prop_id][0]);
  304. $searchInput[$prop_id] = $prop;
  305. }elseif($prop['search']=='nav'){
  306. $prop['value'] = array_flip($filter['p_'.$prop_id]);
  307. $plugadd=array();
  308. $pfilter = $filter;
  309. foreach($goods_relate as $k=>$v){
  310. if($v["p_".$prop_id]!=null){
  311. $pfilter["p_".$prop_id] = $v["p_".$prop_id];
  312. // if($plugadd[$v["p_".$prop_id]]){
  313. // $plugadd[$v["p_".$prop_id]]=$plugadd[$v["p_".$prop_id]]+1;
  314. // }else{
  315. // $plugadd[$v["p_".$prop_id]]=1;
  316. // }
  317. }
  318. // $aFilter['goods_id'][] = $v['goods_id']; //????????
  319. }
  320. $plugadd[$pfilter['p_'.$prop_id]] = $objGoods->count($pfilter);
  321. foreach($prop['options'] as $q=>$e){
  322. if($plugadd[$q]){
  323. $prop['options'][$q]=$prop['options'][$q]."<span class='num'>(".$plugadd[$q].")</span>";
  324. }else{
  325. unset($prop['options'][$q]);
  326. }
  327. }
  328. $selector[$prop_id] = $prop;
  329. }
  330. }
  331. // if(count($prop['options']) <= 1){
  332. // $navselector=0;
  333. // }
  334. /*
  335. if ($navselector){
  336. $p_num = 0;
  337. $nsvcount=0;
  338. $noshow=0;
  339. foreach($selector as $sk => $sv){
  340. if ($sv['value']){
  341. $nsvcount++;
  342. }
  343. if (is_numeric($sk)){
  344. $p_num++;
  345. if(!$sv['show']){
  346. $noshow++;
  347. }
  348. }
  349. }
  350. if ($nsvcount==intval($p_num-$noshow))
  351. $navselector=0;
  352. }*/
  353. foreach($cat['spec'] as $spec_id=>$spec_name){
  354. $sId['spec_id'][] = $spec_id;
  355. }
  356. if ($cat['ordernum']){
  357. if ($selector){
  358. foreach($selector as $key => $val){
  359. if(!in_array($key,$cat['ordernum'])&&$val){
  360. $selectorExd[$key]=$val;
  361. }
  362. }
  363. }
  364. }
  365. $selector['ordernum'] = $cat['ordernum'];
  366. $aProduct = $objGoods->getList(null,$filter,$pageLimit*($page-1),$pageLimit,$count,$orderby);
  367. //??????????????????
  368. $mdl_wss = $this->system->loadModel('trading/wholesaleSingle');
  369. foreach($aProduct as $pk=>$pv){
  370. $mdl_wss->process_good_use_rule(&$aProduct[$pk]);
  371. }
  372. //-----------------------------
  373. //?????????
  374. $aProduct = $this->_checkDealerPurview($aProduct);
  375. //echo "<pre>";print_r($selector);exit();
  376. $this->pagedata['mask_webslice'] = $this->system->getConf('system.ui.webslice')?' hslice':null;
  377. $this->pagedata['searchInput'] = &$searchInput;
  378. $this->pagedata['searchSelect'] = &$searchSelect;
  379. $this->pagedata['selector'] = &$selector;
  380. $this->pagedata['selectorExd'] = $selectorExd;
  381. $this->pagedata['navselector'] = &$navselector;
  382. $this->cat_id = $cat_id;
  383. $smarty = &$this->system->loadModel('system/frontend');
  384. $smarty->register_function("selector", array(&$this,'_selector'));
  385. $this->pagedata['pager'] = array(
  386. 'current'=>$page,
  387. 'total'=>ceil($count/$pageLimit),
  388. 'link'=>$this->system->mkUrl('gallery',$view,array(implode(',',$cat_id),urlencode($p['str']),$orderBy,$tab,($tmp = time()),$cat_type)),
  389. 'token'=>$tmp);
  390. if($page != 1 && $page > $this->pagedata['pager']['total']){
  391. $this->system->error(404);
  392. }
  393. if(!count($aProduct)){
  394. $this->pagedata['emtpy_info']=stripslashes($this->system->getConf('errorpage.searchempty'));
  395. }
  396. if($this->system->getConf('site.show_goods_storage')){//??????
  397. $this->pagedata['goodsstorage'] = $this->system->getConf('site.show_goods_storage');
  398. $this->pagedata['goodsstorage_real'] = $this->system->getConf('site.show_goods_storage_real');
  399. $this->pagedata['goodsstorage_alert'] = $this->system->getConf('site.goods_storage_alert');
  400. }
  401. $objImage = $this->system->loadModel('goods/gimage');
  402. $this->pagedata['searchtotal']=$count;
  403. if(is_array($aProduct) && count($aProduct) > 0){
  404. $objGoods->getSparePrice($aProduct, $GLOBALS['runtime']['member_lv']);
  405. $objGoods->extend_product_info($aProduct,$GLOBALS['runtime']['member_lv']);
  406. if($this->system->getConf('site.show_mark_price')){
  407. $setting['mktprice'] = $this->system->getConf('site.market_price');
  408. }else{
  409. $setting['mktprice'] =0;
  410. }
  411. $setting['saveprice'] = $this->system->getConf('site.save_price');
  412. $setting['buytarget'] = $this->system->getConf('site.buy.target');
  413. $this->pagedata['setting'] = $setting;
  414. $this->pagedata['products'] = $aProduct;
  415. }
  416. if($GLOBALS['runtime']['member_lv']<0){
  417. $this->pagedata['LOGIN'] = 'nologin';
  418. }
  419. $this->pagedata['cat_type'] = $cat_type;
  420. $this->pagedata['search_array'] = implode("+",$GLOBALS['search_array']);
  421. $this->pagedata['_PDT_LST_TPL'] = 'file:'.$cat['tpl'];
  422. $this->pagedata['_MAIN_'] = 'gallery/index.html';
  423. $this->path[]=array('title'=>'');
  424. $this->getGlobal($this->seoTag,$this->pagedata);
  425. // if($view != $_COOKIE['GALLERY_VIEW']){
  426. // $this->system->setCookie('GALLERY_VIEW',$view,null);
  427. // }
  428. $this->output();
  429. }
  430. function _selector($params, &$smarty){
  431. $filter = unserialize(serialize($this->filter));
  432. if(is_numeric($params['key'])){
  433. $data = &$filter['p_'.$params['key']];
  434. }elseif ($params['key']=="spec"){
  435. $tmp=explode(",",$params['value']);
  436. $data = &$filter['s_'.$tmp[0]];
  437. }else{
  438. $data = &$filter[$params['key']];
  439. }
  440. if($params['mod']=='append'){
  441. $data[] = $params['value'];
  442. }elseif($params['mod']=='remove'){
  443. $data = array_flip($data);
  444. unset($data[$params['value']]);
  445. $data = array_flip($data);
  446. }else{
  447. if ($params['key']=="spec"){
  448. $tmpData = explode(",",$params['value']);
  449. $data = array($tmpData[1]);
  450. }
  451. else
  452. $data = array($params['value']);
  453. }
  454. $searchtools = &$this->system->loadModel('goods/search');
  455. $args = unserialize(serialize($this->pagedata['args']));
  456. $args[1] = $searchtools->encode($filter);
  457. $args[4]=1;
  458. return $this->system->mkUrl('gallery',$smarty->_tpl_vars['curView'],$args);
  459. }
  460. function _get_schema_template($tpl_name, &$tpl_source, &$smarty) {
  461. $tpl_source = file_get_contents(SCHEMA_DIR.$tpl_name.'/view/gallery.html');
  462. if (!is_bool($tpl_source)) {
  463. return true;
  464. } else {
  465. return false;
  466. }
  467. }
  468. function _get_schema_timestamp($tpl_name, &$tpl_timestamp, &$smarty) {
  469. $tpl_timestamp = filemtime(SCHEMA_DIR.$tpl_name.'/view/gallery.html');
  470. if (!is_bool($tpl_timestamp)) {
  471. return true;
  472. } else {
  473. return false;
  474. }
  475. }
  476. function get_goods_amount(&$result){
  477. return $result['searchtotal'];
  478. }
  479. function get_goods_cat(&$result){
  480. $pcat=$this->system->loadModel('goods/productCat');
  481. $row=$pcat->instance($result['cat_id'],'cat_name');
  482. return $row['cat_name'];
  483. }
  484. function get_goods_cat_p(&$result){
  485. $pcat=$this->system->loadModel('goods/productCat');
  486. $row=$pcat->getpath($result['cat_id']);
  487. if ($row){
  488. foreach($row as $k => $v){
  489. $tmpRow[]=$v['title'];
  490. }
  491. return implode(",",$tmpRow);
  492. }
  493. }
  494. function get_goods_type(&$result){
  495. $pcat=$this->system->loadModel('goods/productCat');
  496. $row=$pcat->instance($result['cat_id'],'type_id');
  497. if ($row['type_id']){
  498. $gtype=$this->system->loadModel('goods/gtype');
  499. $grow=$gtype->instance($row['type_id'],'name');
  500. return $grow['name'];
  501. }
  502. }
  503. function get_brand(&$result){
  504. if($sExd=$result['selectorExd']){
  505. if ($sExdB=$sExd['brand_id']){
  506. if ($sExdB['options']){
  507. foreach($sExdB['options'] as $key => $val){
  508. $brandExd[]=substr($val,0,strpos($val,"<"));
  509. }
  510. return implode(",",$brandExd);
  511. }
  512. }
  513. }
  514. }
  515. function get_sort_path(&$result){
  516. $sitemap = &$this->system->loadModel('content/sitemap');
  517. $path = array_merge($sitemap->getPath('goodsCat',$result['cat_id'],'index'),$this->path);
  518. if ($path){
  519. for($i=count($path)-1;$i>0;$i--){
  520. if ($path[$i]['title'])
  521. $tmpPath[]=$path[$i]['title'];
  522. }
  523. if ($tmpPath)
  524. return implode(",",$tmpPath);
  525. }
  526. }
  527. //????? yanglish 2010/7/11
  528. function showValideCode($tp=''){
  529. switch ($tp){
  530. case "login":
  531. if($this->system->getConf('site.login_valide') == true || $this->system->getConf('site.login_valide') == 'true'){
  532. $this->pagedata['valideCode'] = true;
  533. }
  534. break;
  535. case "signup":
  536. if($this->system->getConf('site.register_valide') == true || $this->system->getConf('site.register_valide') == 'true'){
  537. $this->pagedata['valideCode'] = true;
  538. }
  539. break;
  540. }
  541. }
  542. function _get_secure($tpl_name, &$smarty) { return true; }
  543. function _get_trusted($tpl_name, &$smarty) {;}
  544. }
  545. ?>