%
'on error resume next
if trim(Application("ConnectionString"))="" or trim(Application("ConnectionString"))<>"driver={Microsoft Access Driver (*.mdb)};DBQ=" & server.MapPath("bvnews.asp") & ";uid=;PWD=;" then
Application("ConnectionString")="driver={Microsoft Access Driver (*.mdb)};DBQ=" & server.MapPath("bvnews.asp") & ";uid=;PWD=;"
end if
Function LinkURLs(strInput)
Dim iCurrentLocation
Dim iLinkStart
Dim iLinkEnd
Dim strLinkText
Dim strOutPut
strLinkText=""
strOutput=""
iCurrentLocation=1
Do while Instr(iCurrentLocation,strInput,"[url]",1)<>0
iLinkStart=Instr(iCurrentLocation,strInput,"[url]",1)
iLinkEnd=Instr(iCurrentLocation+1,strInput,"[/url]",1)
If iLinkEnd=0 then iLinkEnd=len(strINput)+1
select case Mid(strInput,iLinkEnd-1,1)
case ".","!","?"
iLinkEnd=iLinkEnd-1
end select
stroutput=strOutput & Mid(strInput,iCurrentLocation,iLinkStart-iCurrentLocation)
strLinkText=replace(Mid(strInput,iLinkStart+5,iLinkEnd-iLinkStart-5),"[/url]","")
strOutput=strOutput & "" & strLinkText & ""
iCurrentLocation=iLinkEnd
Loop
strOutput=strOutput & Mid(strInput,iCurrentLocation)
LinkURLs=replace(strOutput,"[/url]","",1,-1,1)
End Function
Function LinkIMGs(strInput)
Dim iCurrentLocation
Dim iLinkStart
Dim iLinkEnd
Dim strLinkText
Dim strOutPut
strLinkText=""
strOutput=""
iCurrentLocation=1
Do while Instr(iCurrentLocation,strInput,"[img]",1)<>0
iLinkStart=Instr(iCurrentLocation,strInput,"[img]",1)
iLinkEnd=Instr(iCurrentLocation+1,strInput,"[/img]",1)
If iLinkEnd=0 then iLinkEnd=len(strINput)+1
select case Mid(strInput,iLinkEnd-1,1)
case ".","!","?"
iLinkEnd=iLinkEnd-1
end select
stroutput=strOutput & Mid(strInput,iCurrentLocation,iLinkStart-iCurrentLocation)
strLinkText=replace(Mid(strInput,iLinkStart+5,iLinkEnd-iLinkStart-5),"[/img]","")
strOutput=strOutput & ""
iCurrentLocation=iLinkEnd
Loop
strOutput=strOutput & Mid(strInput,iCurrentLocation)
LinkIMGs=replace(strOutput,"[/img]","",1,-1,1)
End Function
Function LinkEmail(strInput)
Dim iCurrentLocation
Dim iLinkStart
Dim iLinkEnd
Dim strLinkText
Dim strOutPut
strLinkText=""
strOutput=""
iCurrentLocation=1
Do while Instr(iCurrentLocation,strInput,"[email]",1)<>0
iLinkStart=Instr(iCurrentLocation,strInput,"[email]",1)
iLinkEnd=Instr(iCurrentLocation+1,strInput,"[/email]",1)
If iLinkEnd=0 then iLinkEnd=len(strINput)+1
select case Mid(strInput,iLinkEnd-1,1)
case ".","!","?"
iLinkEnd=iLinkEnd-1
end select
stroutput=strOutput & Mid(strInput,iCurrentLocation,iLinkStart-iCurrentLocation)
strLinkText=replace(Mid(strInput,iLinkStart+7,iLinkEnd-iLinkStart-7),"[/email]","")
strOutput=strOutput & "" & strLinkText & ""
iCurrentLocation=iLinkEnd
Loop
strOutput=strOutput & Mid(strInput,iCurrentLocation)
LinkEmail=replace(strOutput,"[/email]","",1,-1,1)
End Function
function encrypt(ecode)
Dim texts
dim i
for i=1 to len(ecode)
texts=texts & chr(asc(mid(ecode,i,1))+i)
next
encrypt = texts
end function
function UBB(str)
str=LinkURLs(str)
str=LinkIMGs(str)
str=LinkEmail(str)
UBB=str
end function
%>
<%
dim sql,rs,rsc,thedate
dim reviewable,aboutnews
set rs=server.createobject("adodb.recordset") '²éÕÒÏÔʾÏà¹ØÐÂÎÅÊýÄ¿¼°ÊÇ·ñ¿ª·ÅÆÀÂÛȨÏÞ
rs.open "select * from news_parameter where parameterid=1",conn,1,1
if not rs.bof and not rs.eof then
aboutnews=rs("aboutnews")
if rs("reviewable")=1 then
reviewable=1
else
reviewable=0
end if
else
aboutnews=5
reviewable=1
end if
rs.close
set rs=nothing
set rs=server.createobject("adodb.recordset")
sql="update news set hits=hits+1 where newsid=" & cstr(request("newsid"))
conn.execute sql
if session("purview")="" then
rs.open "select * from news where newsid=" & cstr(request("newsid")) & " and audit=1",conn,1,1
else
rs.open "select * from news where newsid=" & cstr(request("newsid")),conn,1,1
end if
if err.number <> 0 then
response.write "Êý¾Ý¿â³ö´í"
else
if rs.bof and rs.eof then
rs.close
response.write "¸ÃÐÂÎŲ»´æÔÚ»òδ¾¹ýÉóºË"
else
%>
![]() |
|
¹ØÓڲμӡ°2006ÑÇÌ«¹ú¼ÊʳƷչ ʳƷ¹¤Òµ¶«ÄÏÑÇÊг¡ÕÐÉÌ¡±µÄ֪ͨ |
|
|
·¢±íʱ¼ä£º<%=rs("ntime")%>    
<% if trim(rs("nfrom"))<>"" then
response.write "ÎÄÕÂÀ´Ô´£º" & trim(rs("nfrom"))
end if %>
<% if trim(rs("writer"))<>"" then response.write "ÎÄÕÂ×÷Õߣº" & trim(rs("writer")) end if %>     ä¯ÀÀ´ÎÊý£º<%=cstr(rs("hits"))%> |
|
| Ë«»÷×Ô¶¯¹öÆÁ
|
||||
|
||||
|
<% if reviewable=1 then
response.write "¡¾·¢±íÆÀÂÛ¡¿"
end if %>
    |
||||
|
| ÍøÕ¾¼ò½é|È«¹úµØÏØÅ©ÒµÍøÕ¾¼¯½õ|ÁªÏµÎÒÃÇ|·¨ÂɹËÎÊ£ºÑԶ|ÓÑÇéÁ´½Ó |
|
°æÈ¨ËùÓУºÖйúũҵͶ×ÊÍø ÇëʹÓÃIE5.0»òÒÔÉϰ汾ä¯ÀÀÆ÷ | ||
| E-mail£ºchinanytz@vip.sina.com ÈÈÏߵ绰£º 86-10-83032881 ;63438531; ´«Õ棺010-63261880 | ||
| ÉùÃ÷£º±¾Õ¾ÖеIJ¿·Ö×ÊÔ´À´×ÔÏà¹ØÍøÂ磬ÈçÓÐÇÖȨ£¬Çë¸æÖª£¡±¾Õ¾»á¼°Ê±É¾³ý¡£ | ||