php
require('path.inc.php');
$page->addWebJs('rolling.js');
$page->addWebJs('simSelect.js');
$page->name = 'index'; //页面名字,和文件名相同
$sign = 0;
$newsList = $isClass->getAll(' rid=2 ', '*', ' order by list_order desc,id desc limit 4');
foreach($newsList as $key => $item)
{
$newsList[$key]['url'] = $cfg['url'] . 'news_view.php?id=' . $item['id'];
$newsList[$key]['f_title'] = cnsubstr($item['title'], 12);
$newsList[$key]['s_title'] = cnsubstr($item['title'], 18);
$newsList[$key]['s_intro'] = cnsubstr($item['introduce'], 30);
$newsList[$key]['updatetime'] = date('Y-m-d', $item['updatetime']);
$temppic = $item['pic_path'] ? $cfg['path']['upfile'] . $item['pic_path'] : $cfg['path']['images'] . 'nopic.gif';
$newsList[$key]['pic'] = '
';
}
$equipmentList = $isClass->getAll(' rid=4 ', '*', ' order by list_order desc,id desc limit 6');
foreach($equipmentList as $key => $item)
{
$equipmentList[$key]['url'] = $cfg['url'] . 'equipment_view.php?id=' . $item['id'];
$equipmentList[$key]['s_title'] = cnsubstr($item['title'], 18);
$equipmentList[$key]['updatetime'] = date('Y-m-d', $item['updatetime']);
}
$productList = $isClass->getAll(' rid=1 ', '*', ' order by list_order desc,id desc limit 5');
foreach($productList as $key => $item)
{
$productList[$key]['url'] = $cfg['url'] . 'product_view.php?id=' . $item['id'];
$productList[$key]['s_title'] = cnsubstr($item['title'], 7);
$temppic = $item['pic_path'] ? $cfg['path']['upfile'] . $item['pic_path'] : $cfg['path']['images'] . 'nopic.gif';
$productList[$key]['pic'] = '
';
}
$caseList = $isClass->getAll(' rid=3 ', '*', ' order by list_order desc,id desc limit 8');
foreach($caseList as $key => $item)
{
$caseList[$key]['url'] = $cfg['url'] . 'case_view.php?id=' . $item['id'];
$caseList[$key]['s_title'] = cnsubstr($item['title'], 12);
$temppic = $item['pic_path'] ? $cfg['path']['upfile'] . $item['pic_path'] : $cfg['path']['images'] . 'nopic.gif';
$caseList[$key]['pic'] = '
';
}
$aboutIntro = cnsubstr($common->getInfo(1,'introduce'),180);
$aboutPicpath = $common->getInfo(1,'pic_path');
$aboutPic = $aboutPicpath ? $cfg['path']['upfile'] . $aboutPicpath : $cfg['path']['images'] . 'nopic.gif';
/*
* 页面标题
* 页面关键?
* 页面描述
*/
$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));
?>