require('path.inc.php'); $page->name = 'index'; //页面名字,和文件名相同 //关于我们 $aboutinfo = $common->getInfo(1,"introduce,pic_path"); //售后服务 $serviceinfo = $common->getInfo(7,"introduce"); //产品分类 $proclass = $moreClass->getAll($where.' and rid = 1 and parent_id=0', 'id,class_name,pic_path', ' order by list_root,list_order limit 3'); //产品展示 $productList1 = $isClass->getAll($where.' and rid=1 ', 'id,title,pic_thumb_path,addtime', ' order by list_order desc,id desc limit 8'); foreach($productList1 as $key => $item) { $productList1[$key]['url'] = $cfg['url'] . 'product_view.php?id=' . $item['id']; $productList1[$key]['s_title'] = cnsubstr($item['title'], 30); $productList1[$key]['updatetime'] = date("Y-m-d",$item["addtime"]); } //新闻资讯 $newsList = $isClass->getAll($where.' and rid=2 ', 'id,title,updatetime,introduce,pic_thumb_path,class_id', ' order by list_order desc,id desc limit 3'); foreach($newsList as $key => $item) { $newsList[$key]['url'] = $cfg['url'] . 'news_view.php?id=' . $item['id']; $newsList[$key]['s_intro'] = cnsubstr($item['introduce'], 43); $newsList[$key]['class_name'] = $moreClass->getinfo($item["class_id"],"class_name"); $newsList[$key]['s_title'] = cnsubstr($item['title'], 18); $newsList[$key]['year'] = date('Y', $item['updatetime']); $newsList[$key]['updatetime'] = date('d', $item['updatetime']); $newsList[$key]['updatetimex'] = date('M', $item['updatetime']); } //安装案例 $caseList = $isClass->getAll($where.' and rid=8 ', 'id,title,pic_thumb_path,addtime,introduce', ' order by list_order desc,id desc limit 4'); foreach($caseList as $key => $item) { $caseList[$key]['url'] = $cfg['url'] . 'case_view.php?id=' . $item['id']; $caseList[$key]['s_title'] = cnsubstr($item['title'], 15); $caseList[$key]['s_introduce'] = cnsubstr($item['introduce'], 30); } // 幻灯?$adsList = $ads->getAll(' place_id=5 and status=0','*',' order by list_order desc limit 1'); foreach($adsList as $key=>$item){ $temppic = $item['pic_path'] ? $cfg['path']['upfile'] . $item['pic_path'] : $cfg['path']['images'] . 'nopic.gif'; $adsList[$key]['pic'] = $temppic; } /* * 页面标题 * 页面关键? * 页面描述 */ $page->title = $webConfig['site_name'] . '_' . $webConfig['site_title']; $page->keywords = !empty($webConfig['keywords_index'])?$webConfig['keywords_index']:$webConfig['site_name']; $page->description = !empty($webConfig['description_index'])?$webConfig['description_index']:$webConfig['site_name']; require_once($page->display($page->name)); ?>