📄 config_news.asp
字号:
<!-- #include file="config.asp" -->
<!-- #include file="config_nsort.asp" -->
<!-- #include file="skin.asp" -->
<%
dim atb,news_tu,ispic,topic,nid,sqladd,sk_bar,sk_class
atb=" target=_blank":sk_bar=11:sk_class="end"
news_tu="<font class=gray> <img src='images/small/IMAGE.GIF' border=0 title=图片新闻不想看看么?></font>"
index_url="news":n_sort="news"
tit_fir=format_menu(index_url)
sub news_class_sort(t1,t2)
response.write kong&format_bar("<font class="&sk_class&"><b>新闻分类</b></font>",class_sort(n_sort,index_url,t1,t2),sk_bar,0,0,"||","")
end sub
sub news_fpic(fsql,t_num,w_num,tt)
dim topic,temp1,rs,sql
sql="select top 1 id,topic,comto,word,pic,tim from news where hidden=1 and istop=1 and ispic=1"&fsql&" order by id desc"
set rs=conn.execute(sql)
if not(rs.eof and rs.bof) then
nid=rs("id"):topic=rs("topic")
temp1="<table border=0 width='100%' class=tf>" & _
vbcrlf&"<tr align=center><td width='32%'>" & _
vbcrlf&" <table border=0>" & _
vbcrlf&" <tr><td align=center><img src='"&web_var(web_upload,1)&rs("pic")&"' border=0 title='"&code_html(rs("topic"),1,0)&"' width="&web_var(web_num,7)&" height="&web_var(web_num,8)&"></td></tr>" & _
vbcrlf&" <tr><td height=25 align=center class=btd><a href='news_view.asp?id="&nid&"' target=_blank class=red_3>"&code_html(rs("topic"),1,t_num)&"</a></td></tr>" & _
vbcrlf&" </table>" & _
vbcrlf&"</td><td width='68%'>" & _
vbcrlf&" <table border=0 width='100%' height='100%'>" & _
vbcrlf&" <tr><td class=htd><a href='news_view.asp?id="&nid&"' target=_blank>"&code_html(rs("word"),1,w_num)&"</a></td></tr>" & _
vbcrlf&" <tr><td height=25 class=gray align=right>("&time_type(rs("tim"),tt)&" 摘自:"&rs("comto")&") </td></tr>" & _
vbcrlf&" </table>" & _
vbcrlf&"</td></tr></table>"
end if
rs.close
response.write kong&format_bar("<font class="&sk_class&"><b>今日图片新闻</b></font>",temp1,sk_bar,0,0,"||","")
end sub
sub news_sea()
dim temp1,nid,nid2,rs,sql,rs2,sql2
temp1=vbcrlf&"<table border=0 cellspacing=0 cellpadding=0 align=center>" & _
vbcrlf&"<script language=javascript><!--" & _
vbcrlf&"function news_sea()" & _
vbcrlf&"{" & _
vbcrlf&" if (news_sea_frm.keyword.value==""请输入关键字"")" & _
vbcrlf&" {" & _
vbcrlf&" alert(""请在搜索新闻前先输入要查询的 关键字 !"");" & _
vbcrlf&" news_sea_frm.keyword.focus();" & _
vbcrlf&" return false;" & _
vbcrlf&" }" & _
vbcrlf&"}" & _
vbcrlf&"--></script>" & _
vbcrlf&"<form name=news_sea_frm action='news_list.asp' method=get onsubmit=""return news_sea()"">" & _
vbcrlf&"<tr><td height=3></td></tr>" & _
vbcrlf&"<tr><td>" & _
vbcrlf&" <table border=0><tr>" & _
vbcrlf&" <td><select name=sea_type sizs=1><option value='topic'>新闻标题</option><option value='username'>发布人</option></seelct></td>" & _
vbcrlf&" <td><input type=text name=keyword value='请输入关键字' onfocus=""if (value =='请输入关键字'){value =''}"" onblur=""if (value ==''){value='请输入关键字'}"" size=12 maxlength=20></td>" & _
vbcrlf&" </tr></table>" & _
vbcrlf&"</td></tr><tr><td>" & _
vbcrlf&" <table border=0><tr>" & _
vbcrlf&" <td><select name=c_id sizs=1><option value=''>请选择新闻类别</option>"
sql="select c_id,c_name from jk_class where nsort='"&n_sort&"' order by c_order,c_id"
set rs=conn.execute(sql)
do while not rs.eof
nid=int(rs(0))
temp1=temp1&vbcrlf&"<option value='"&nid&"' class=bg_2"
if cid=nid then temp1=temp1&" selected"
temp1=temp1&">"&rs(1)&"</option>"
sql2="select s_id,s_name from jk_sort where c_id="&nid&" order by s_order,s_id"
set rs2=conn.execute(sql2)
do while not rs2.eof
nid2=rs2(0)
temp1=temp1&vbcrlf&"<option value='"&nid&"&s_id="&nid2&"'"
if sid=nid2 then temp1=temp1&" selected"
temp1=temp1&"> "&rs2(1)&"</option>"
rs2.movenext
loop
rs2.close:set rs2=nothing
rs.movenext
loop
rs.close:set rs=nothing
temp1=temp1&vbcrlf&"</select></td>" & _
vbcrlf&" <td><input type=image src='images/small/search_go.gif' border=0></td>" & _
vbcrlf&" </tr></table>" & _
vbcrlf&"</td></tr>" & _
vbcrlf&"</form><tr><td height=1></td></tr></table>"
response.write kong & "<table border=0 width='96%' cellspacing=0 cellpadding=0 align=center><tr><td align=center>"&format_bar("<font class="&sk_class&"><b>新闻搜索</b></font>",temp1,sk_bar,0,0,"||","")&"</td></tr></table>"
end sub
sub news_scroll(sh,nsql,s_num,c_num,sbg)
dim cnum,temp1
if sbg=1 then
temp1=vbcrlf&"<table border=0 width=176 cellspacing=2 cellpadding=2 height=25 background='images/"&web_var(web_config,5)&"/news_bg_scroll.gif'><tr><td width='13%'></td><td width='86%' valign=bottom>"
else
temp1=vbcrlf&"<table border=0 width='96%'>"
end if
temp1=temp1&"<marquee scrolldelay=120 scrollamount=4 onMouseOut=""if (document.all!=null){this.start()}"" onMouseOver=""if (document.all!=null){this.stop()}"">"
sql="select top "&s_num&" id,topic,ispic from news where hidden=1"&nsql&" order by counter desc,id desc"
set rs=conn.execute(sql)
do while not rs.eof
cnum=c_num:ispic="":topic=rs("topic")
if rs("ispic")=true then cnum=cnum-2:ispic=news_tu
temp1=temp1&" "&img_small(sh)&"<a href='news_view.asp?id="&rs("id")&"'>"&code_html(topic,1,cnum)&"</a>"&ispic
rs.movenext
loop
rs.close
temp1=temp1&"</marquee>"
if sbg=1 then
temp1=temp1&"</td><td width='1%'></td></tr></table>"
else
temp1=temp1&"</td></tr></table>"
end if
response.write temp1
end sub
sub news_new_hot(n_jt,nsql,nt,n_num,c_num,et,ct,tt)
dim htemp,tim,cnum,nhead
if n_jt<>"" then n_jt=img_small(n_jt)
htemp=vbcrlf&"<table border=0 width='100%' cellspacing=0 cellpadding=2 class=tf>"
sql="select top "&n_num&" id,username,topic,tim,counter,ispic from news where hidden=1"&nsql&" order by "
if nt="hot" then
sql=sql&"counter desc,"
nhead="热门新闻"
else
nhead="近期更新"
end if
sql=sql&"id desc"
set rs=conn.execute(sql)
do while not rs.eof
cnum=c_num:ispic="":topic=rs("topic"):tim=rs("tim")
if rs("ispic")=true then cnum=cnum-2:ispic=news_tu
htemp=htemp&vbcrlf&"<tr><td height="&space_mod&" class=bw>"&n_jt&"<a href='news_view.asp?id="&rs("id")&"'"&atb&" title='新闻标题:"&code_html(topic,1,0)&"<br>发 布 人:"&rs("username")&"<br>浏览人次:"&rs("counter")&"<br>整理时间:"&tim&"'>"&code_html(topic,1,cnum)&"</a>"&ispic
if tt>0 then htemp=htemp&format_end(et,time_type(tim,tt))
htemp=htemp&"</td></tr>"
rs.movenext
loop
rs.close
htemp=htemp&vbcrlf&"</table>"
response.write kong & "<table border=0 width='96%' cellspacing=0 cellpadding=0 align=center><tr><td align=center>"&format_bar("<font class="&sk_class&"><b>"&nhead&"</b></font>",htemp,sk_bar,0,0,"||","")&"</td></tr></table>"
end sub
sub news_pic(nsql,n_num,c_num,pc)
dim temp1
temp1="<table border=0 width='100%' cellspacing=2 cellpadding=0><tr><td height=3></td></tr>"
sql="select top "&n_num&" id,topic,pic from news where hidden=1 and ispic=1"&nsql&" order by id desc"
set rs=conn.execute(sql)
do while not rs.eof
topic=rs("topic"):nid=rs("id")
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -