% option explicit %>
<%
'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
%>
|
|
| 2007年全市中小学生排球比赛在市三中圆满落幕
|
|||||||
|
为促进全民健身运动,提高我市中小学生的身体素质,由市教育局、市体育局举办和市三中承办的全市中小学生排球比赛于2007年7月10-11日在市三中举行。 经过两天紧张、激烈的比赛,高中组:第一名空缺,埭头中学、市三中分获男、女组第二名;初中组:埭头中学、市三中分获男、女组第一名,别桥中学获初中男、女组第二名;小学组:新昌小学勇夺男、女组第一名,埭头小学、别桥小学分获男、女组第二名。比赛结束后,市教育局、市体育局和市三中的领导为获胜代表队颁奖,并祝愿各校代表队今后取得更辉煌的成绩。
2007年7月11日
|
|||||||
|
双击自动滚屏
|
||||
|
||||
|
   
|
||||
|
溧阳市第三中学 版权所有 © 2001-2007 |