caching = true; $smarty->cache_lifetime = 30*60; if(!$smarty->is_cached('News/Topic/index.htm')){ $smarty->assign('newssortjslist',$news->NewsSortJsList()); $smarty->assign('com0046',ComInfo0046());//推荐信息 $smarty->assign('com0047',ComInfo0047());//推荐信息 $smarty->assign('com0047_20',ComInfo0048("1401"));//推荐信息 $smarty->assign('com0047_21',ComInfo0048("1402"));//推荐信息 $smarty->assign('com0047_22',ComInfo0048("1403"));//推荐信息 $smarty->assign('info_20',InfoList("1401"));//推荐信息 $smarty->assign('info_21',InfoList("1402"));//推荐信息 $smarty->assign('info_22',InfoList("1403"));//推荐信息 $smarty->assign('ad_1',ReadFileContentAndRet(WEB_ROOT."/Ad/Topic_A486x60D.htm"));// } //print_r(InfoList(20)); $smarty->display('News/Topic/index.htm'); //重点推荐信息 function ComInfo0048($Category=''){ global $news; $arr = array(); $row = $news->infolist("SetUrl,StaticFile,Title,SpeImage,Remark"," CommendFlag LIKE '%0048%' AND Category LIKE '%$Category%' AND Flag > 0 ",2); if($row[0]['Title']=="") return $arr; $i = 0; foreach($row as $info){//MAIN_WEB_URL $arr[$i]['StaticFile'] = $info['StaticFile']; $arr[$i]['Remark'] = $info['Remark']; $arr[$i]['Title'] = $info['Title']; $arr[$i]['SpeImage'] = $info['SpeImage']; $seturl = trim($info['SetUrl']); if($seturl!=""){ $arr[$i]['StaticFile'] = $seturl; }else{ $arr[$i]['StaticFile'] = $news->inforoot.$info['StaticFile']; } $i++; } unset($row); return $arr; } //信息列表 function InfoList($Category=''){ global $news; $arr = array(); $row = $news->infolist("SetUrl,StaticFile,Title,SpeImage,Remark,AddDate"," Category LIKE '%$Category%' AND Flag > 0 ",10); if($row[0]['Title']=="") return $arr; $i = 0; foreach($row as $info){//MAIN_WEB_URL $arr[$i]['StaticFile'] = $info['StaticFile']; $arr[$i]['Remark'] = $info['Remark']; $arr[$i]['Title'] = $info['Title']; $arr[$i]['SpeImage'] = $info['SpeImage']; $arr[$i]['AddDate'] = $info['AddDate']; $seturl = trim($info['SetUrl']); if($seturl!=""){ $arr[$i]['StaticFile'] = $seturl; }else{ $arr[$i]['StaticFile'] = $news->inforoot.$info['StaticFile']; } $i++; } unset($row); return $arr; } ?>