%@ LANGUAGE = VBScript %> <% Option Explicit %> <% if Session("FONTSIZE") = "" then %> <% else %> <% On Error Resume Next Dim path, currentobj, httpexp Dim timeUnitSelect Dim expireStaticNumber Dim expireSet timeUnitSelect="" & L_SECONDS_TEXT & "" & L_MINUTES_TEXT & "" & L_HOURS_TEXT & "" & L_DAYS_TEXT expireStaticNumber = "" expireSet = "" path=Session("dpath") Session("path")=path Set currentobj=GetObject(path) Session("SpecObj")=path Session("SpecProps")="HttpExpires" httpexp=currentobj.HttpExpires if err <> 0 then httpexp="d,-1" else ' We got some sort of expiration date, set default values accordingly httpexp = UCase(trim(httpexp)) InitControlValues end if ' set all the default values based on httpexpires sub InitControlValues() Dim numsecs, timeelapse, strExpires, thisdate if len(httpexp) = 0 then ' Empty string elseif httpexp="D,-1" then ' ??? elseif Left(httpexp,2)="S," then ' The value is a string expireSet = "CHECKED" SetLocale = True ' Note: we aren't actually setting anything here, we'll wait until ' SetLocale() is called on the client to convert httpexpires into ' into an actual date elseif Left(httpexp,2)="D," then ' Number of seconds expireSet = "CHECKED" numsecs = Trim(Mid(httpexp,Instr(httpexp,",")+1)) ' Convert to decimal if instr(numsecs,"X") then numsecs=hexToDec(Trim(Mid(numsecs, Instr(numsecs,"X")+1))) end if ' Set our selection control string timeelapse=numsecs if numsecs mod 86400=0 then timeelapse=numsecs/86400 timeUnitSelect="" & L_SECONDS_TEXT & "" & L_MINUTES_TEXT & "" & L_HOURS_TEXT & "" & L_DAYS_TEXT elseif numsecs mod 3600=0 then timeelapse=numsecs/3600 timeUnitSelect="" & L_SECONDS_TEXT & "" & L_MINUTES_TEXT & "" & L_HOURS_TEXT & "" & L_DAYS_TEXT elseif numsecs mod 60=0 then timeelapse=numsecs/60 timeUnitSelect="" & L_SECONDS_TEXT & "" & L_MINUTES_TEXT & "" & L_HOURS_TEXT & "" & L_DAYS_TEXT end if ' Set our static time value if timeelapse > 0 then expireStaticNumber=timeelapse end if else ' Use our default values end if end sub function expireType(thisbutton) Dim typestr, etype typestr=Mid(httpexp,1,4) if typestr="" then etype="" elseif Mid(httpexp,1,2)="D," then if len(httpexp) > 4 then etype=1 else etype=0 end if elseif Mid(httpexp,1,2)="S," then etype=2 else etype="" end if if thisbutton=etype then expireType="" else expireType="" end if end function function hexToDec(hexstr) hexToDec = CLng("&H" & hexstr) end function %> " TOPMARGIN=5 TEXT="#000000" LINK="#FFFFFF" onLoad="loadList();" > <%= sFont("","","",True) %> <%= L_HTTPHEADERS_TEXT %> OnClick='SetExp(null);top.title.Global.updated=true;'> <%= L_ENABLEEXPIRE_TEXT %> HEIGHT=2 BORDER=0 ALIGN="middle"> <%= sFont("","","",True) %> <%= L_CONTENTSHOULD_TEXT %> > <%= sFont("","","",True) %> <%= expireType(0) %> <%= sFont("","","",True) %> <%= L_EXPIMM_TEXT %> <%= sFont("","","",True) %> <%= expireType(1) %> <%= sFont("","","",True) %> <%= L_EXPAFT_TEXT %> <%= inputboxfixed(0,"TEXT", "hdnHttpExpiresSeconds", expireStaticNumber, 5, 5,"","","isNum(this,0,'');SetSeconds();",true,false,false) %> <%= writeSelect("hdnHttpExpiresTimeUnit", "", "SetSeconds();top.title.Global.updated=true;", false) %> <%= timeUnitSelect %> <%= sFont("","","",True) %> <%= expireType(2) %> <%= sFont("","","",True) %> <%= L_EXPON_TEXT %> <%= sFont("","","",True) %> <%= inputboxfixed(0,"TEXT", "hdnHttpExpiresDate", "", L_EXPIREDATE_NUM, L_EXPIREDATE_NUM,"","","updateDateControls();",false,false,true) %> <%= sFont("","","",True) %> <%= inputboxfixed(0,"TEXT", "hdnHttpExpiresHours", "", L_EXPIRETIME_NUM, L_EXPIRETIME_NUM,"","","isNum(this,0,'');updateDateControls();",false,false,false) %> : <%= inputboxfixed(0,"TEXT", "hdnHttpExpiresMinutes", "", L_EXPIRETIME_NUM, L_EXPIRETIME_NUM,"","","isNum(this,0,'');updateDateControls();",false,false,false) %> <%= sFont("","","",True) %> <%= L_TIME_TEXT %> <% end if %>
OnClick='SetExp(null);top.title.Global.updated=true;'> <%= L_ENABLEEXPIRE_TEXT %> HEIGHT=2 BORDER=0 ALIGN="middle">
<%= sFont("","","",True) %> <%= L_CONTENTSHOULD_TEXT %>