%
on error resume next
Dim Conn
Dim ConnStr
Set Conn = Server.CreateObject("ADODB.Connection")
ConnStr = "DRIVER={SQL Server};SERVER=127.0.0.1;UID=zhong$2006*zhao;PWD=zv8*^zhao#3xtoo*2006!zhou;Database=shangyi"
Conn.Open ConnStr
%>
<%
function gettext(str,strlen)
if IsNull(str) then
gettext=""
exit function
end if
dim l,t,c,i
l=len(str)
t=0
for i=1 to l
c=Abs(Asc(Mid(str,i,1)))
if c>255 then
t=t+2
else
t=t+1
end if
if t>=strlen then
walkgotTopic=left(str,i)
exit for
else
walkgotTopic=str
end if
next
gettext=walkgotTopic
end function
function urlstr(str)
urlstr=year(str) & month(str) & day(str) & hour(str) & minute(str) & second(str)
end function
function yearstr(str)
yearstr=year(str) & "-" & month(str) & "-" & day(str)
end function
%>