% set objFSO=CreateObject("Scripting.FileSystemObject") cur_day=int(datediff("d","01/01/2002",now)) set rs1=cn.execute("select cur_day as store_day, cur_value as store_value from rot_home where category='stamps'") if rs1.eof then cn.execute("insert into rot_home (category, cur_day, cur_value) values ('stamps', " & cur_day & ", 1)") rot_stamps="001.gif" else store_day=int(rs1("store_day")) store_value=int(rs1("store_value")) if int(cur_day)=int(store_day) then rot_stamps=cstr(store_value) do until len(rot_stamps)=3 rot_stamps="0" & rot_stamps loop rot_stamps=rot_stamps & ".gif" else store_value=store_value+1 cur_value=store_value rot_stamps=cstr(store_value) do until len(rot_stamps)=3 rot_stamps="0" & rot_stamps loop rot_stamps=rot_stamps & ".gif" if not(objFSO.FileExists("E:\ericjackson\stamprotate\" & rot_stamps)) then rot_stamps="001.gif" cur_value=1 end if cn.execute("delete from rot_home where category='stamps'") cn.execute("insert into rot_home (category, cur_day, cur_value) values ('stamps', " & cur_day & ", " & cur_value & ")") end if end if cur_day=int(datediff("d","01/01/2002",now)) set rs1=cn.execute("select cur_day as store_day, cur_value as store_value from rot_home where category='paper'") if rs1.eof then cn.execute("insert into rot_home (category, cur_day, cur_value) values ('paper', " & cur_day & ", 1)") rot_paper="001.gif" else store_day=int(rs1("store_day")) store_value=int(rs1("store_value")) if int(cur_day)=int(store_day) then rot_paper=cstr(store_value) do until len(rot_paper)=3 rot_paper="0" & rot_paper loop rot_paper=rot_paper & ".gif" else store_value=store_value+1 cur_value=store_value rot_paper=cstr(store_value) do until len(rot_paper)=3 rot_paper="0" & rot_paper loop rot_paper=rot_paper & ".gif" if not(objFSO.FileExists("E:\ericjackson\PaperRotate\" & rot_paper)) then rot_paper="001.gif" cur_value=1 end if cn.execute("delete from rot_home where category='paper'") cn.execute("insert into rot_home (category, cur_day, cur_value) values ('paper', " & cur_day & ", " & cur_value & ")") end if end if cur_day=int(datediff("d","01/01/2002",now)) set rs1=cn.execute("select cur_day as store_day, cur_value as store_value from rot_home where category='lit'") if rs1.eof then cn.execute("insert into rot_home (category, cur_day, cur_value) values ('lit', " & cur_day & ", 1)") rot_lit="001.gif" else store_day=int(rs1("store_day")) store_value=int(rs1("store_value")) if int(cur_day)=int(store_day) then rot_lit=cstr(store_value) do until len(rot_lit)=3 rot_lit="0" & rot_lit loop rot_lit=rot_lit & ".gif" else store_value=store_value+1 cur_value=store_value rot_lit=cstr(store_value) do until len(rot_lit)=3 rot_lit="0" & rot_lit loop rot_lit=rot_lit & ".gif" if not(objFSO.FileExists("E:\ericjackson\BookRotate\" & rot_lit)) then rot_lit="001.gif" cur_value=1 end if cn.execute("delete from rot_home where category='lit'") cn.execute("insert into rot_home (category, cur_day, cur_value) values ('lit', " & cur_day & ", " & cur_value & ")") end if end if set objFSO=nothing %>
|