% today = date()
y=year(today)
m=month(today)
d=day(today)
v=weekday(today)
%>
<%
dim countfile
dim fileobj
dim out
dim visitors
dim ct
countfile=Server.MapPath("counter\page.txt")
set fileobj=Server.CreateObject("scripting.filesystemobject")
set out=fileobj.OpenTextFile(countfile,1,false,false)
visitors=out.readLine
visitors=visitors+1
ct=""
ct=visitors
out.close
set out=fileobj.CreateTextfile(countfile,true)
out.writeline(visitors)
out.close
%>
<%
Dim CurPage
If Request.QueryString("CurPage") = "" then
CurPage = 1
Else
CurPage = CINT(Request.QueryString("CurPage"))
End If
display = CurPage
set classified_ad_rs=server.createobject("adodb.recordset")
dim yq_date
dim yq_date1
classified_ad_date_sql="select top 1 ad_new_date from classified_ad order by ad_new_date desc"
classified_ad_rs.open classified_ad_date_sql,sql_conn,1,1
yq_date1=classified_ad_rs("ad_new_date")
if request.querystring("date")="" then
yq_date=yq_date1
else
yq_date=request.querystring("date")
end if
classified_ad_rs.close
if yq_date>="2002-02-01" then
%>
<%
dim pre_date1_year
pre_date1_year=""
dim pre_date1_month
pre_date1_month=""
dim pre_date1_date
pre_date1_date=""
dim yq_var1
yq_var1=1
'do while mid(yq_date,yq_var1,1)<>""
do while mid(yq_date,yq_var1,1)<>"-"
pre_date1_year=pre_date1_year&mid(yq_date,yq_var1,1)
yq_var1=yq_var1+1
loop
' response.write "yq_var1:"&yq_var1&"
"
' response.write "pre_date1_year:"&pre_date1_year&"
"
yq_var1=yq_var1+1
do while mid(yq_date,yq_var1,1)<>"-"
pre_date1_month=pre_date1_month&mid(yq_date,yq_var1,1)
yq_var1=yq_var1+1
loop
' response.write "pre_date1_month:"&pre_date1_month&"
"
yq_var1=yq_var1+1
do while mid(yq_date,yq_var1,1)<>""
pre_date1_date=pre_date1_date&mid(yq_date,yq_var1,1)
yq_var1=yq_var1+1
loop
' response.write "pre_date1_date:"&pre_date1_date&"
"
'yq_var1=yq_var1+1
'loop
pre_date1_temp=pre_date1_month&"/"&pre_date1_date&"/"&pre_date1_year
'response.write pre_date1_temp
pre_date1=datevalue(pre_date1_temp)-1
next_date1=datevalue(pre_date1_temp)+1
'response.write pre_date1
%>
<%
dim pre_date_year
pre_date_year=""
dim pre_date_month
pre_date_month=""
dim pre_date_date
pre_date_date=""
dim yq_var_pre
yq_var_pre=1
do while mid(pre_date1,yq_var_pre,1)<>"-"
pre_date_year=pre_date_year&mid(pre_date1,yq_var_pre,1)
yq_var_pre=yq_var_pre+1
loop
' response.write "yq_var_pre:"&yq_var_pre&"
"
' response.write "pre_date_year:"&pre_date_year&"
"
yq_var_pre=yq_var_pre+1
do while mid(pre_date1,yq_var_pre,1)<>"-"
pre_date_month=pre_date_month&mid(pre_date1,yq_var_pre,1)
yq_var_pre=yq_var_pre+1
loop
' response.write "pre_date_month:"&pre_date_month&"
"
if len(pre_date_month)=1 then
pre_date_month="0"&pre_date_month
end if
yq_var_pre=yq_var_pre+1
do while mid(pre_date1,yq_var_pre,1)<>""
pre_date_date=pre_date_date&mid(pre_date1,yq_var_pre,1)
yq_var_pre=yq_var_pre+1
loop
' response.write "pre_date_date:"&pre_date_date&"
"
if len(pre_date_date)=1 then
pre_date_date="0"&pre_date_date
end if
pre_date=pre_date_year&"-"&pre_date_month&"-"&pre_date_date
%>
<%
dim next_date_year
next_date_year=""
dim next_date_month
next_date_month=""
dim next_date_date
next_date_date=""
dim yq_var_next
yq_var_next=1
do while mid(next_date1,yq_var_next,1)<>"-"
next_date_year=next_date_year&mid(next_date1,yq_var_next,1)
yq_var_next=yq_var_next+1
loop
' response.write "yq_var_next:"&yq_var_next&"
"
' response.write "next_date_year:"&next_date_year&"
"
yq_var_next=yq_var_next+1
do while mid(next_date1,yq_var_next,1)<>"-"
next_date_month=next_date_month&mid(next_date1,yq_var_next,1)
yq_var_next=yq_var_next+1
loop
' response.write "next_date_month:"&next_date_month&"
"
if len(next_date_month)=1 then
next_date_month="0"&next_date_month
end if
yq_var_next=yq_var_next+1
do while mid(next_date1,yq_var_next,1)<>""
next_date_date=next_date_date&mid(next_date1,yq_var_next,1)
yq_var_next=yq_var_next+1
loop
' response.write "next_date_date:"&next_date_date&"
"
if len(next_date_date)=1 then
next_date_date="0"&next_date_date
end if
next_date=next_date_year&"-"&next_date_month&"-"&next_date_date
%>
|
Copyright 2006 sznews.com, Shenzhen Press Group. All Rights Reserved. |