<% 
'------------------中间新闻频道 开始------------------- 
'------------------- 幻灯新闻调用 开始 ------------------------------- 
sub news_center_list(cl_type,cl_tnum,cl_cnum) 
dim tmp1,tmp_count,tmp_title,tmp_tit,tmp_record,tmp_where,tmp_table,sort_url,tmp_url,sort_tit,tmp_img,id,topic 
  tmp_img=cl_type 
  tmp_where="hidden=1" 
  select case cl_type 
  case "news" 
    tmp_title="行业动态" 
 tmp_tit="新闻标题" 
 sort_tit="新闻类别" 
 tmp_table="news" 
    tmp_count="浏览次数" 
 tmp_record="id,topic,username,tim,counter" 
 tmp_img="news" 
  end select  
sql="select top "&cl_tnum&" "&tmp_record&",jk_class.c_name,jk_class.c_id from "&tmp_table&" inner JOIN jk_class ON "&tmp_table&".c_id = jk_class.c_id where "&tmp_where&" order by id desc" 
set rs=joekoe_cms.exec(sql,1) 
do while not rs.eof 
sort_url=cl_type&"_list.asp?c_id="&rs("c_id") 
tmp_url=cl_type&"_view.asp?id="&rs(0) 
id=rs("id") 
topic=rs("topic") 
tmp1=tmp1&vbcrlf&" <tr><td height='"&dim_num(6)&"'>· <a href='"&tmp_url&"' target=_blank alt='"&tmp_tit&"："&joekoe_cms.code_html(topic,1,0)&"<br>发 布 人："&rs(2)&"<br>"&tmp_count&"："&rs(4)&" 人次<br>整理时间："&rs(3)&"'>"&joekoe_cms.code_html(topic,1,cl_cnum)&"</a></td><td align=right class=timestyle><font class=gray>"&joekoe_cms.time_type(rs("tim"),4)&"</font></tr><tr><td height=1 background='images/bg_dian.gif' colspan='2'></td></tr>" 
rs.movenext 
loop 
rs.close 
  tmp1="<table border=0 cellspacing=0 cellpadding=0 width='100%'>"&tmp1&vbcrlf&"</table>" 
  response.write vbcrlf&"<table cellspacing=0 cellpadding=0 class=table>" & _ 
                 vbcrlf&"<tr class=bg_td><td align=center>"&tmp1&"</td></tr>" & _ 
                 vbcrlf&"</table>"&ukong 
end sub 

'------------------- 幻灯新闻调用 结束 ------------------------------- 

'------------------- 新闻幻灯调用 开始 ------------------------------- 
sub revealTrans_news_pic() 
dim id,pic,i,id0,pic0,temp2  
i=0 
id0=0 
pic0=joekoe_cms.web_upload&"no_pic.gif" 
sql="select top 5 id,topic,pic from news where hidden=1 and ispic=1 order by id desc" 
set rs=joekoe_cms.exec(sql,1) 
do while not rs.eof 
id=rs("id") 
pic=rs("pic") 
pic=joekoe_cms.code_html(pic,1,0) 
if instr(pic,"://")<1 then 
pic=joekoe_cms.web_upload&pic 
end if 
if i=0 then 
id0=rs("id") 
pic0=rs("pic") 
end if 
temp2= temp2&vbcrlf&" bannerAD["&i&"]="""&pic&""";" 
temp2= temp2&vbcrlf&" bannerADlink["&i&"]=""news_view.asp?id="&id&""";"&vbcrlf 
i=i+1 
rs.movenext 
loop 
rs.close 
pic0=pic_fk(pic0&"' name=bannerADrotator height=200 width=300 style='FILTER: revealTrans(duration=2,transition=20)",2,"javascript:jump2url();") 
if instr(pic0,"target=_blank")>0 then pic0=replace(pic0,"target=_blank","") 
response.write pic0 
%> 
<script language=Javascript> 
<!-- // 新闻图片过渡效果 

var bannerAD=new Array(); 
var bannerADlink=new Array(); 
var adNum=0; 
<% 
if id0=0 then 
%> 
bannerAD[0]="<%=pic0%>"; 
bannerADlink[0]="#"; 

bannerAD[1]="<%=pic0%>"; 
bannerADlink[1]="#"; 
<% 
else 
response.write temp2 
end if 
%> 
var preloadedimages=new Array(); 
for (i=1;i<bannerAD.length;i++){ 
preloadedimages=new Image(); 
preloadedimages.src=bannerAD; 
} 

function setTransition(){ 
if (document.all){ 
bannerADrotator.filters.revealTrans.Transition=Math.floor(Math.random()*23); 
bannerADrotator.filters.revealTrans.apply(); 
} 
} 

function playTransition(){ 
if (document.all) 
bannerADrotator.filters.revealTrans.play() 
} 

function nextAd(){ 
if(adNum<bannerAD.length-1)adNum++  
else adNum=0; 
setTransition(); 
document.images.bannerADrotator.src=bannerAD[adNum]; 
playTransition(); 
theTimer=setTimeout("nextAd()", 6000); 
} 

function jump2url(){ 
jumpUrl=bannerADlink[adNum]; 
jumpTarget=''; 
if (jumpUrl != ''){ 
if (jumpTarget != '')window.open(jumpUrl,jumpTarget); 
else location.href=jumpUrl; 
} 
} 
function displayStatusMsg() {  
status=bannerADlink[adNum]; 
document.returnvalue = true; 
} 
nextAd() 
//--> 

</script> 
<% 
end sub 
'------------------- 新闻幻灯调用 结束 ------------------------------- 
%> 
<table border=0 cellspacing=0 cellpadding=0 width='100%'> 
<tr> 
<td width='100%'><%call revealTrans_news_pic()%></td> 
</tr> 
</table>

