home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
221.214.14.186
/
221.214.14.186.tar
/
221.214.14.186
/
wh
/
qim
/
news.asp
< prev
next >
Wrap
Text File
|
2006-06-01
|
5KB
|
160 lines
<%
'==================================
'=╬─ ╝■ ├√ú║news.asp
'=╩╩╙├░µ▒╛ú║FeitecCMS AC V1.21 Free
'=╣ª ─▄ú║╨┬╬┼┴╨▒φ
'=╫≈ ╒▀ú║╙Ω│╟[From to FeitecStudio]
'=╚╒ ╞┌ú║2006-2-19 18:09
'=░µ ╚¿ú║http://www.feitec.com/
'=╝╝╩⌡╠╓┬█ú║6602510íó14040543ú¿╨┬╩╓╚║ú⌐
'==================================
%>
<!--#include file="Ft_config.asp"-->
<!--#include file="Ft_conn.asp"-->
<!--#include file="Ft_format.asp"-->
<!--#include file="Ft_lib.asp"-->
<%
sub_title="╫ε╨┬╢»╠¼"
call head()
call body()
call foot()
sub body()
'==================================
'=╣ª ─▄ú║╚í│÷╡▒╟░─ú░σ
'==================================
StrTemp=split(mb_news,"|||@@@|||")
dim Ft_mbstr
Ft_mbstr=replace(StrTemp(0),"{left_pub}",left_pub())
Ft_mbstr=replace(Ft_mbstr,"$hotnum$",hotnum)
sql="select top "&hotnum&" * from Ft_news order by news_count DESC,news_date desc"
set rs2 = server.createobject("adodb.recordset")
rs2.open sql,conn,1,1
if rs2.bof and rs2.eof then
topnews="<span class=""disable_font"" >─┌╚▌╒²╘┌╕ⁿ╨┬╓«╓╨í¡í¡</span>"
else
do while not rs2.eof
topnews=topnews+"<img src="""&signimgpath&"/biao.gif"" border=""0""> <a href=shownews.asp?id="&rs2("news_id")&">"&rs2("news_title")&"</a><br>"
rs2.movenext
loop
end if
rs2.close
set rs2=nothing
'╫≤└╕
Ft_mbstr=replace(Ft_mbstr,"$topnews$",topnews)
dim totalnews,Currentpage,totalpages,catid,page,catname
'╔Φ╓├╨┬╬┼╧╡═│╬¬─¼╚╧╖╓╥│┤≤╨í╡─▒╢┬╩
pagenum=pagenum*2
if request.querystring("page")<>"" then
page=cint(checksql("╨┬╬┼╖╓╥│",request.querystring("page"),0,8))
end if
if request.querystring("cat_id")<>"" then
catid=checksql("╨┬╬┼╖╓└α",request.querystring("cat_id"),0,4)
sql="select cat_id from Ft_news_cat where cat_id="&catid
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
if rs.eof and rs.bof then
response.redirect("showerr.asp?errmsg=<br><li>├╗╙╨┤╦╖╓└α╗≥╕├╖╓└α╥╤╔╛│²úí</li>")
response.end
end if
rs.close
set rs=nothing
sql="select * from Ft_news where cat_id="&catid&" order by istop=1,news_date DESC"
else
sql="select * from Ft_news order by istop=1,news_date DESC"
end if
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
sql="select * from Ft_news_cat"
set rs2=server.createobject("adodb.recordset")
rs2.open sql,conn,1,1
do while not rs2.eof
catlist=catlist+"<span class=""key_font"">|</span> <a href=""news.asp?cat_id="&rs2("cat_id")&""" >"&rs2("cat_name")&"</a>"
rs2.movenext
loop
if rs2.bof and rs2.eof then
catlist="| ╘▌╬▐╖╓└α"
end if
rs2.close
set rs2=nothing
if request.querystring("cat_id")<>"" then
catname=""
sql="select cat_name from Ft_news_cat where cat_id="&catid
set rscat=conn.execute(sql)
catname=rscat("cat_name")
rscat.close
set rscat=nothing
total_cat="<span class=""key_font"">í╛"&catname&"í┐</span>╖╓└α╣▓╙╨ <span class=""key_font"">"&rs.recordcount&"</span> ╠⌡╨┬╬┼ "
else
total_cat="─┐╟░▒╛╒╛╣▓╙╨ <span class=""key_font"">"&rs.recordcount&"</span> ╠⌡╨┬╬┼ "
end if
'╖╓└α
Ft_mbstr=replace(Ft_mbstr,"$catlist$",catlist)
Ft_mbstr=replace(Ft_mbstr,"$total_cat$",total_cat)
Ft_mbstr_newslist=split(Ft_mbstr,"///")
'╨┬╬┼┴╨▒φ╟░╡──┌╚▌╩Σ│÷
response.write Ft_mbstr_newslist(0)
if not rs.eof then
rs.movefirst
rs.pagesize=pagenum
if trim(request.querystring("page"))<>"" then
currentpage=page
if currentpage>rs.pagecount then
currentpage=rs.pagecount
end if
else
currentpage=1
end if
totalnews=rs.recordcount
if currentpage<>1 then
if(currentpage-1)*pagenum<totalnews then
rs.move(currentpage-1)*pagenum
end if
end if
if (totalnews mod pagenum)=0 then
totalpages=totalnews\pagenum
else
totalpages=totalnews\pagenum+1
end if
i=0
do while not rs.eof and i<pagenum
if rs("istop")=1 then
newsstate="<a href='shownews.asp?id="&rs("news_id")&"' target='_blank'><img src='"&signimgpath&"/ztop.gif' border='0' alt='╓├╢Ñ╨┬╬┼'></a>"
elseif rs("user_view")=1 then
newsstate="<a href='shownews.asp?id="&rs("news_id")&"' target='_blank'><img src='"&signimgpath&"/userview.gif' border='0' alt='╗ß╘▒╨┬╬┼ú¼┤╦╠⌡╨Φ╧√╖╤"&rs("moneypay")&"╕÷╜≡▒╥'></a>"
elseif rs("user_view")=2 then
newsstate="<a href='shownews.asp?id="&rs("news_id")&"' target='_blank'><img src='"&signimgpath&"/vipview.gif' border='0' alt='VIP╗ß╘▒╨┬╬┼ú¼┤╦╠⌡╨Φ╧√╖╤"&rs("moneypay")&"╕÷╜≡▒╥'></a>"
else
newsstate="<a href='shownews.asp?id="&rs("news_id")&"' target='_blank'><img src='"&signimgpath&"/normal.gif' border='0' alt='╞╒═¿╨┬╬┼'></a>"
end if
if DateDiff("d",rs("news_date"),now())<1 then
newnews="<img src='"&signimgpath&"/new.gif' border='0'>"
else
newnews=""
end if
'┴╨▒φ╩Σ│÷
Ft_mbstr=replace( Ft_mbstr_newslist(1),"$newsstate$",newsstate)
Ft_mbstr=replace(Ft_mbstr,"$newsid$",rs("news_id"))
Ft_mbstr=replace(Ft_mbstr,"$newstitle$",rs("news_title"))
Ft_mbstr=replace(Ft_mbstr,"$newnews$",newnews)
Ft_mbstr=replace(Ft_mbstr,"$newsdate$",rs("news_date"))
Ft_mbstr=replace(Ft_mbstr,"$newscount$",rs("news_count"))
response.write Ft_mbstr
i=i+1
rs.movenext
loop
elseif rs.eof and rs.bof then
response.write"<tr class=""tablebody""><td colspan=""4"" height=""70"" align=""center"" class=""disable_font"">╘▌╩▒├╗╙╨┤╦╖╓└α╗≥┤╦└α╨┬╬┼úí</td></tr>"
end if
'╨┬╬┼┴╨▒φ▒φ╕±╬▓▓┐</table>╩Σ│÷
response.write Ft_mbstr_newslist(2)
'╖╓╥│
Ft_mbstr=replace(Ft_mbstr_newslist(3),"$newspage$","")
if totalnews>pagenum then
showpage totalnews,pagenum,"news.asp?"
end if
response.write Ft_mbstr
rs.close
set rs=nothing
end sub
%>