%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<%const dbpath="../"%>
<%'funpath=request.querystring("funpath")%>
<%
Server.ScriptTimeout=600
charbm="utf-8"
'istrhavenews=false
If CLng(DateDiff(autohtmlperioddw910309, firstautohtmltime910309, FormatDate(Now(), 1)))>CLng(autohtmlperiod910309) Then
tmpidgroup910309=""
tmplistidgroup910309=""
if isopenindexhtml910309=1 then call defaulthtml()
if (isopenlisthtml910309=1 and ishtml=2) or (isopenshowhtml910309=1 and ishtml=2) then
if data_type="access" then
sql="select top 5000 id,columnid from tr_article where ispass=1 and isdel=0 and addtime > #"&FormatDatebefore910309(DateAdd("d", -autohtmldays910309, now()),1)&"# "
elseif data_type="mssql" then
sql="select top 5000 id,columnid from tr_article where ispass=1 and isdel=0 and addtime > '"&FormatDatebefore910309(DateAdd("d", -autohtmldays910309, now()),1)&"' "
end if
'response.write sql
rs.open sql,conn,0,1
if not rs.eof then
do while not rs.eof
if tmpidgroup910309="" then
tmpidgroup910309=rs("id")
else
tmpidgroup910309=tmpidgroup910309&","&rs("id")
end if
if tmplistidgroup910309="" then
tmplistidgroup910309=","&rs("columnid")&","
else
if instr(tmplistidgroup910309,","&rs("columnid")&",")<1 then
tmplistidgroup910309=tmplistidgroup910309&rs("columnid")&","
end if
end if
rs.movenext
loop
end if
rs.close
if tmplistidgroup910309<>"" then
tmplistidgroup910309=mid(tmplistidgroup910309,2,len(tmplistidgroup910309)-2)
end if
'response.write tmplistidgroup910309&"
"
'response.write tmpidgroup910309&"
"
if isopenlisthtml910309=1 and tmplistidgroup910309<>"" then call listhtml(tmplistidgroup910309)
if isopenshowhtml910309=1 and tmpidgroup910309<>"" then call showhtml(tmpidgroup910309)
call crautohtmllasttime910309(charbm)
End If
end if
Public Function FormatDatebefore910309(DateAndTime, para)
' On Error Resume Next
Dim y, m, d, h, mi, s, strDateTime
FormatDatebefore910309 = DateAndTime
If Not IsNumeric(para) Then Exit Function
If Not IsDate(DateAndTime) Then Exit Function
y = CStr(Year(DateAndTime))
m = CStr(Month(DateAndTime))
If Len(m) = 1 Then m = "0" & m
d = CStr(Day(DateAndTime))
If Len(d) = 1 Then d = "0" & d
h = CStr(Hour(DateAndTime))
If Len(h) = 1 Then h = "0" & h
mi = CStr(Minute(DateAndTime))
If Len(mi) = 1 Then mi = "0" & mi
s = CStr(Second(DateAndTime))
If Len(s) = 1 Then s = "0" & s
Select Case para
Case "1"
strDateTime = y & "-" & m & "-" & d & " " & h & ":" & mi & ":" & s
Case "2"
strDateTime = y & "-" & m & "-" & d
Case "3"
strDateTime = y & "/" & m & "/" & d
Case "4"
strDateTime = y & "年" & m & "月" & d & "日"
Case "5"
strDateTime = m & "-" & d & " " & h & ":" & mi
Case "6"
strDateTime = m & "/" & d
Case "7"
strDateTime = m & "月" & d & "日"
Case "8"
strDateTime = y & "年" & m & "月"
Case "9"
strDateTime = y & "-" & m
Case "10"
strDateTime = y & "/" & m
Case "11"
strDateTime = Right(y, 2) & "-" &m & "-" & d & " " & h & ":" & mi
Case "12"
strDateTime = Right(y, 2) & "-" &m & "-" & d
Case "13"
strDateTime = m & "-" & d
Case "14"
strDateTime = y & m & d & h & mi & s
Case Else
strDateTime = DateAndTime
End Select
FormatDatebefore910309 = strDateTime
End Function
function crautohtmllasttime910309(trcharset910309)
tmpkfstr3 = tmpkfstr3& "<%" & vbCrLf
tmpkfstr3 = tmpkfstr3& "firstautohtmltime910309="""&FormatDate(Now(), 1)&"""" & vbCrLf
tmpkfstr3 = tmpkfstr3& ""&Chr(37)&">"
Call createfile(tmpkfstr3, "../crinc/trautohtmllasttime910309.asp", 2, trcharset910309)
end function
%>