home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 1998 February
/
CHIP_2_98.iso
/
software
/
pelne
/
optionp
/
iis4_03.cab
/
iiamaphd.asp
< prev
next >
Wrap
Text File
|
1997-11-12
|
8KB
|
384 lines
<%@ LANGUAGE=VBScript%>
<% Option Explicit %>
<% Response.Expires = 0 %>
<% if Session("FONTSIZE") = "" then %>
<!--#include file="iito.inc"-->
<% else %>
<%
Const L_ENTERINTEGER_ERRORMESSAGE = "Please enter an integer"
Const L_APPMAPP_TEXT = "Application Mappings"
Const L_CACHEISAPI_TEXT = "Cache ISAPI Applications"
Const L_EXTENSION_TEXT = "Ext"
Const L_EXEPATH_TEXT = "Executable Path"
Const L_EXCLUSIONS_TEXT = "Exclusions"
Const L_SCRIPTENGINE_TEXT = "Script Engine"
Const L_CHKFILE_TEXT = "Check that file exists"
Const L_SELECTITEM_TEXT="Select a application mapping to delete."
Const L_LOADED_TEXT = "Loaded"
Const L_LOADING_TEXT = "Loading"
Const L_UNLOADED_TEXT = "Unloaded"
Const L_UNLOADING_TEXT = "Unloading"
On Error Resume Next
dim path, currentobj
path = Session("dpath")
Session("path") = path
Set currentobj = GetObject(path)
Session("SpecObj")=""
Session("SpecProps")=""
function heading(width,thestring)
dim i
width = width - len(thestring)
for i = width to 0 step -1
thestring = thestring & " "
Next
heading = thestring
end function
%>
<!--#include file="iiset.inc"-->
<HTML>
<HEAD>
<TITLE></TITLE>
<FONT SIZE=1 FACE="Helv,ARIAL">
<SCRIPT LANGUAGE="JavaScript">
function loadHelp(){
top.title.Global.helpFileName="iipy_34";
}
function SetList(){
self.location.href = "iiapphd.asp"
}
function isNum(txtcntrl) {
str = txtcntrl.value;
for (var i = 0; i < str.length; i++) {
var ch = str.substring(i, i + 1);
if ((ch < "0" || "9" < ch) && ch != ',') {
alert("Please enter an integer.");
txtcntrl.focus()
return false;
}
}
return true;
}
function disableDefault(dir,fromCntrl, toCntrl){
if (!dir){
if (fromCntrl.value != ""){
toCntrl.value = fromCntrl.value;
fromCntrl.value = "";
}
}
else{
if (toCntrl.value != ""){
fromCntrl.value = toCntrl.value;
toCntrl.value = "";
}
}
}
function enableDefault(chkCntrl){
chkCntrl.checked = true;
}
</SCRIPT>
</HEAD>
<BODY BGCOLOR="#CCCCCC" TOPMARGIN=5 TEXT="#000000" onLoad="loadList();loadHelp();" LINK="#000000" VLINK="#000000" STYLE="font-face: Helv,Arial; font-size:10pt;">
<B><%= L_APPMAPP_TEXT %></B><P>
<FORM NAME="userform" onSubmit="return false"><FONT SIZE=1 FACE="Helv,ARIAL">
<%= L_CACHEISAPI_TEXT %><P>
<TABLE BORDER = 1 BORDERCOLOR="#CCCCCC" BORDERCOLORDARK="#CCCCCC" BORDERCOLORLIGHT="#CCCCCC" CELLPADDING = 2 CELLSPACING = 0>
<TR>
<TD WIDTH = 25 BORDERCOLOR="#CCCCCC" BORDERCOLORDARK="#FFFFFF" BORDERCOLORLIGHT="#000000"><FONT SIZE=1 FACE='HELV,ARIAL'>
<A HREF = "javascript:sortList('ext');">
<%= heading(9,L_EXTENSION_TEXT) %>
</A>
</TD>
<TD WIDTH = 125 BORDERCOLOR="#CCCCCC" BORDERCOLORDARK="#FFFFFF" BORDERCOLORLIGHT="#000000"><FONT SIZE=1 FACE='HELV,ARIAL'>
<A HREF = "javascript:sortList('path');">
<%= heading(9,L_EXEPATH_TEXT) %>
</A>
</TD>
<TD WIDTH = 80 BORDERCOLOR="#CCCCCC" BORDERCOLORDARK="#FFFFFF" BORDERCOLORLIGHT="#000000" ><FONT SIZE=1 FACE='HELV,ARIAL'>
<A HREF = "javascript:sortList('exclusions');">
<%= heading(15,L_EXCLUSIONS_TEXT) %>
</A>
</TD>
<TD WIDTH = 75 BORDERCOLOR="#CCCCCC" BORDERCOLORDARK="#FFFFFF" BORDERCOLORLIGHT="#000000"><FONT SIZE=1 FACE='HELV,ARIAL'>
<A HREF = "javascript:sortList('scripteng');">
<%= heading(10,L_SCRIPTENGINE_TEXT) %>
</A>
</TD>
<TD WIDTH = 125 BORDERCOLOR="#CCCCCC" BORDERCOLORDARK="#FFFFFF" BORDERCOLORLIGHT="#000000"><FONT SIZE=1 FACE='HELV,ARIAL'>
<A HREF = "javascript:sortList('checkfiles');">
<%= heading(10,L_CHKFILE_TEXT) %>
</A>
</TD>
</TR>
</TABLE>
<SCRIPT LANGUAGE="JavaScript">
function loadList(){
parent.list.location.href = "iiamapls.asp";
}
function setLastSel(id){
for (var i=0; i < cachedList.length; i++) {
if (cachedList[i].id == id){
listFunc.sel = i;
return;
}
}
}
function sortList(sortby)
{
i=eval(listFunc.sel);
if ( i != -1)
{
lastsel = cachedList[i].id
}
if (sortby != listFunc.sortby)
{
listFunc.sortby = sortby;
listFunc.sortAsc = true;
}
else
{
listFunc.sortAsc = !listFunc.sortAsc;
}
var num = parseFloat(cachedList[sortby]);
if (isNaN(num))
{
cachedList.sort(sortOrder);
}
else
{
cachedList.sort(numOrder);
}
if (!listFunc.sortAsc)
{
cachedList.reverse();
}
if ( i != -1)
{
setLastSel(lastsel);
}
loadList();
}
function sortOrder(a,b)
{
if (a[listFunc.sortby] < b[listFunc.sortby])
{
return -1;
}
else
{
if (a[listFunc.sortby] > b[listFunc.sortby])
{
return 1;
}
else
{
return 0;
}
}
}
function addItem(){
i = cachedList.length
cachedList[i] = new listObj(i,"", "", 0, "");
cachedList[i].newitem = true;
cachedList[i].updated = true;
listFunc.sel = i;
loadList();
}
function delItem(){
if (listFunc.sel >= 0){
sel = eval(listFunc.sel);
cachedList[sel].deleted = true;
cachedList[sel].updated = true;
sel = sel-1;
<% 'run through the list to find the Next non-deleted item %>
for (var j = sel; j >=0; j--) {
if (cachedList[j].deleted){
}
else{
break
}
}
listFunc.sel = j;
loadList();
}
else{
alert("<%= L_SELECTITEM_TEXT %>");
}
}
function crop(thestring,size){
<% if Session("FONTSIZE") = "LARGE" then %>
size = size-10;
<% end if %>
if (thestring.length > size)
{
thestring = thestring.substring(0,size) + "...";
}
return thestring;
}
function buildListForm(){
numrows = 0;
for (var i = 0; i < cachedList.length; i++) {
if (!cachedList[i].deleted){
numrows = numrows + 1;
}
}
qstr = "numrows="+numrows;
qstr = qstr+"&cols=ScriptMaps";
parent.parent.hlist.location.href = "iihdn.asp?"+qstr;
<% 'the list values will be grabbed by the hiddenlistform script... %>
}
function SetListVals(){
listForm = parent.parent.hlist.document.hiddenlistform;
j = 0;
for (var i = 0; i < cachedList.length; i++) {
sm = 0;
cf = 0;
if (!cachedList[i].deleted){
str = cachedList[i].ext + ",";
str += cachedList[i].path + ",";
if (cachedList[i].scripteng){
sm = 1;
}
if (cachedList[i].checkfiles){
cf = 4;
}
str += (sm + cf);
if (cachedList[i].exclusions != ""){
str += "," + cachedList[i].exclusions;
}
listForm.elements[j++].value = str;
cachedList[i].updated = false;
}
}
}
function listFuncs(){
this.sel = 0;
this.sortList = sortList;
this.sortby = "fname";
this.sortAsc = true;
this.addItem = addItem;
this.delItem = delItem;
this.writeList = buildListForm;
this.SetListVals = SetListVals;
this.mainframe = top.opener.top;
}
function listObj(i,ext,p,f,e){
this.id = i;
this.ext = ext;
this.displaypath = crop(p,18);
this.path = p;
this.exclusions=e;
this.checkfiles = (f & 4) > 0;
this.scripteng = (f & 1) > 0;
this.deleted = false;
this.newitem = false;
this.updated = false;
this.crop = crop;
}
cachedList = new Array();
<%
dim i,Script,aScriptMap,aScript
aScriptMap = currentobj.ScriptMaps
i = 0
For Each Script in aScriptMap
if Script <> "" then
aScript = GetScriptArray(Script)
%>cachedList[<%= i %>] = new listObj(<%= i %>,"<%= aScript(0) %>","<%= Replace(aScript(1),"\","\\") %>",<%= aScript(2) %>,"<%= aScript(3) %>");<%
i = i+1
end if
Next
function GetScriptArray(ScriptStr)
dim a,b,c,d,one,two,three
a = ""
b = ""
c = 0
d = ""
one=Instr(ScriptStr,",")
two=Instr((one+1),ScriptStr,",")
three=Instr((two+1),ScriptStr,",")
if one > 0 then
a=Mid(ScriptStr,1,(one-1))
b=Mid(ScriptStr,(one+1),((two-one)-1))
if three <> 0 then
c=Mid(ScriptStr,(two+1),((three-two)-1))
d=Mid(ScriptStr,(three+1))
else
c=Mid(ScriptStr,(two+1))
end if
end if
GetScriptArray=Array(a,b,c,d)
end function
%>
listFunc = new listFuncs();
</SCRIPT>
</BODY>
</HTML>
<% end if %>