Ejemplo n.º 1
0
 private function _Common_Cache()
 {
     $Common_Cache = array();
     $Common_Cache['catetree'] = get_indexcate_arr();
     $Common_Cache['toptenviews'] = $this->ProModel->order("viewcount desc")->limit('0,3')->select();
     //热门类别
     self::$Model = D('Cate');
     $Common_Cache['HotClass'] = self::$Model->where("ishot=1")->order("id desc")->limit('0,5')->select();
     //首页幻灯片
     $list = get_ad_arr("flash");
     for ($row = 0; $row < count($list); $row++) {
         $flashpic[$row] = __ROOT__ . "/" . $list[$row]['img_url'];
         $flashlink[$row] = $list[$row]['link'];
         $flashremark[$row] = $list[$row]['remark'];
     }
     $Common_Cache['flashpic'] = implode("|", $flashpic);
     $Common_Cache['flashlink'] = implode("|", $flashlink);
     $Common_Cache['flashremark'] = implode("|", $flashremark);
     //是否显示幻灯片描述
     $Common_Cache['brandlist'] = get_brand_tree();
     /**
      * 广告部分
      */
     //调用方法img_url图片content文字//remark标题get_ad('leftad','img_url');
     //$Common_Cache['leftad'] = get_ad('leftad');//单个
     $Common_Cache['ads'] = get_ad_arr("img");
     //广告组
     //文章类别
     self::$Model = D('Article_cate');
     $Common_Cache['Article'] = self::$Model->select();
     self::$Model = D('Article');
     foreach ($Common_Cache['Article'] as $k => $v) {
         $Common_Cache['Article'][$v['name']] = self::$Model->where(array('pid' => $v['id'], 'status' => 1))->limit(10)->order('sort desc')->select();
     }
     $Common_Cache['News'] =& $Common_Cache['Article']['新闻中心'];
     $Common_Cache['art_sys'] =& $Common_Cache['Article']['系统文章'];
     $Common_Cache['Footer'] = GetValue('footer_content');
     $Common_Cache['footcode'] = GetValue('footcode');
     $Common_Cache['tel'] = build_url(GetValue('tel'), 'tel');
     $Common_Cache['Hotmail'] = build_url(GetValue('hotmail'), 'hotmail');
     $Common_Cache['Yahoo'] = build_url(GetValue('yahoo'), 'yahoo');
     $Common_Cache['Skype'] = build_url(GetValue('skype'), 'skype');
     $Common_Cache['Email'] = build_url(GetValue('email'), 'email');
     //产品说明
     $Common_Cache['allpro_remark'] = GetValue('allpro_remark');
     $Common_Cache['newpro_remark'] = GetValue('newpro_remark');
     $Common_Cache['hotpro_remark'] = GetValue('hotpro_remark');
     $Common_Cache['recpro_remark'] = GetValue('recpro_remark');
     $Common_Cache['spepro_remark'] = GetValue('spepro_remark');
     $Common_Cache['proinfo_remark'] = GetValue('proinfo_remark');
     $Common_Cache['cart_remark'] = GetValue('cart_remark');
     //热门搜索
     $hotsearch = GetValue('hotsearch');
     foreach (explode(',', $hotsearch) as $v) {
         $Common_Cache['hotsearch'] .= "<a href='" . U('Search/index', array('key' => $v)) . "'>" . $v . "</a>&nbsp;";
     }
     //导航
     self::$Model = D('Nav');
     $Common_Cache['nav'] = self::$Model->where('status=1')->order('sort asc')->select();
     //历史订单
     self::$Model = D('Orders');
     $Common_Cache['orders'] = self::$Model->order('id desc')->limit(10)->select();
     return $Common_Cache;
 }
Ejemplo n.º 2
0
 function movepro()
 {
     $id = $_GET['id'];
     $this->list = $this->dao->find($id);
     $this->catetree = get_indexcate_arr();
     $this->assign('ispro', 1);
     $this->display('Cate-move');
 }