电话: 86 10 51663231
传真: 86 10 51663239

地址:北京市朝阳区北土城西路7号国恒基业大厦D座804室 100029

 
京ICP备05027906号-1

<% Set conn = Server.CreateObject("ADODB.Connection") DBPath = Server.MapPath("\mdb\mdb.mdb") conn.Open "driver={Microsoft Access Driver (*.mdb)};dbq=" & DBPath SET Rs = Server.CreateObject("ADODB.Recordset") Rs.Open "Select * From counters" , conn,1,3 IF CSTR(Month(Rs("DATE"))) <> CSTR(Month(DATE())) THEN Rs("DATE") = DATE() Rs("YESTERDAY") = RS("TODAY") Rs("BMONTH") = Rs("MONTH") Rs("MONTH") = 1 Rs("TODAY") = 1 Rs.Update ELSE IF CSTR(Day(RS("DATE"))) <> CSTR(Day(DATE())) THEN Rs("DATE") = DATE() Rs("YESTERDAY") = Rs("TODAY") Rs("TODAY") = 1 Rs.Update END IF END IF Rs("TOTAL")=Rs("TOTAL") + 1 Rs("TODAY") =Rs("TODAY") + 1 Rs("MONTH")=Rs("MONTH") + 1 Rs.Update MyCounter( Rs("TOTAL") ) CONN.CLOSE Function MyCounter( counter ) Dim S, i, G S = CStr( counter ) for i = 1 to 8-Len(S) G = G & "" next For i = 1 to Len(S) G = G & "" Next Response.write G End Function %>