%@ Language=JScript %>
<%
Response.Buffer;
function notUndefined(item) {
if (item == Request.Form("NullValue"))
return " ";
else
return item;
}
function readMinimum() {
var fso, f, ts;
fso = new ActiveXObject("Scripting.FileSystemObject");
if (fso.FileExists(Application("aspDIR") + "Minimum.stay")){
var status = "";
var count=0;
f = fso.GetFile(Application("aspDIR") + "Minimum.stay");
ts = f.OpenAsTextStream(1, 0);
var errTrapped = false;
var re = "="; ///+\ /g;
while (!ts.AtEndOfStream) {
lineVal = ts.ReadLine();
arrLine = lineVal.split(re);
//if (arrLine[3] != "")
Response.Write("
| \n");
Response.Write(" | \n");
Response.Write(" | \n");
Response.Write(" | \n");
Response.Write(" |
\n");
count++;
}
ts.Close();
return count;
} else
return 0;
}
function writeMinimum(locCount) {
var localDir = Application("aspDIR");
var fso, f, ts, s;
var ForReading = 1, ForWriting = 2, ForAppending = 8;
var TristateUseDefault = -2, TristateTrue = -1, TristateFalse = 0;
fso = new ActiveXObject("Scripting.FileSystemObject");
try {
fso.DeleteFile(localDir + "Minimum.stay");
} catch(e) {
//Response.Write("");
}
fso.CreateTextFile(localDir + "Minimum.stay"); // Create a file.
f = fso.GetFile(localDir + "Minimum.stay");
ts = f.OpenAsTextStream(ForWriting, TristateUseDefault);
for (var count = 0; count <= locCount; count++) {
if (notUndefined(Request.Form("Start" + count)) != " " && notUndefined(Request.Form("End" + count)) != "")
ts.WriteLine(Request.Form("Start" + count) + "=" + Request.Form("End" + count) + "=" + Request.Form("Min" + count) + "=" + Request.Form("Unittype" + count) + "=" + Request.Form("Value" + count));
}
}
var Referer = new String(Request.ServerVariables('HTTP_REFERER'));
Referer = Referer.substr(Referer.lastIndexOf('/') + 1);
Referer = Referer.toUpperCase();
if ( Referer == "MINIMUM.ASP") {
writeMinimum(Request.Form("Counter"));
Response.Write("");
}
%>
<%=Application("PAGETITLE")%> Search Page
" Link="<%=Application("Link")%>" VLink="<%=Application("VLink")%>">
" size=<%=Application("fontSize")%>> " size="<%=Application("fontSize")%>">