setFile("main", "main.html");
$tpl->setFile("product", "product.html");
$tpl->setFile("mailto", "mailto.html");
$tpl->setFile("contactUs", "ContactUs.html");
$tpl->setBlock("product","proinfo","proinfos");
$tpl->setBlock("product","caption","captions");
$tpl->setBlock("product","caption2","caption2s");
$tpl->setVar('page_title',"产品案例 - {$CFG['web_name']}");
$db = conn();
//显示网站作品菜单
$type=getNum(fget('type'),1);
if($type!=2)$type=1;
$sql="select id,picture,content,caption,links from {$CFG['tabs']['news']} where type=2 and sub_type={$type} order by order_nums desc";
$rs = $db->query($sql);
foreach( $rs as $v) {
if ($v['links']){
$p = "{$v['caption']} (".str_replace('http://','',$v['links']).")";
$img = "
";
}else{
$p = $v['caption'];
$img = "
";
}
$tpl->setVar(array(
'picture' => $img,
'neirong' => nl2br($v['content']),
'show_procaption' => $p,
'procaption' => $v['caption'],
'id' => $v['id'],
));
$tpl->parse("proinfos","proinfo",true);
$tpl->parse("captions","caption",true);
}
$tpl->parse('contactUs', 'contactUs');
$tpl->parse('mailto', 'mailto');
$tpl->parse('main_content', 'product');
$tpl->p("main");
?>