loadtemplate("main","article_righter2.html"); $line = 2; $num = 6; require("../include/recommend_brand.inc.php"); //ent $sql = "select id,custname from ".$tableHead."w_customer where recommend = 1 order by postdate desc limit 10"; $db->query($sql); $template->set_block("main","cominfo","cominfos"); while($db->next_record()){ $data = $db->Record; $template->set_var(array( 'custname'=>strlen($data["custname"])>30?chopstring($data["custname"],15)."...":$data["custname"], 'cid'=>$data["id"] )); $template->parse("cominfos","cominfo",true); } //hangye news $template->set_block("main","hangyeNewsList","hangyeNewsLists"); $sql = "select location,subject from ".$tableHead."w_article where fcid = '2' or cid = '2' order by postDate desc limit 10"; $db->query($sql); while ($db->next_record()){ $data = $db->Record; $template->set_var(array( 'artUrl'=>$data["location"], 'subject'=>$data['subject'] )); $template->parse('hangyeNewsLists','hangyeNewsList',true); } //guojiguonei $template->set_block("main","ggList","ggLists"); $sql = "select location,subject from ".$tableHead."w_article where fcid = '10' or cid = '10' or fcid = '11' or cid = '11' order by postDate desc limit 10"; $db->query($sql); while ($db->next_record()){ $data = $db->Record; $template->set_var(array( 'artUrl'=>$data["location"], 'subject'=>$data['subject'] )); $template->parse('ggLists','ggList',true); } require('../include/global_end.inc.php'); ?>