home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
DOS/V Power Report 2000 March
/
VPR0003B.ISO
/
nec98
/
iimltils.asp
< prev
next >
Wrap
Text File
|
1999-10-14
|
13KB
|
334 lines
<%@ LANGUAGE=VBScript %>
<% Option Explicit %>
<% Response.Expires = 0 %>
<%
Const L_BROWSE_TEXT="参照"
Const L_FILE_TEXT="ファイル"
Const L_URL_TEXT="URL"
Const L_ALLUNASSIGNED_TEXT="未使用の IP アドレスすべて"
Const L_NA_TEXT="N/A"
Const L_SECURE_TEXT="セキュリティ結合"
Const L_SERVER_TEXT="サーバー結合"
%>
<HTML>
<HEAD>
<TITLE></TITLE>
<SCRIPT LANGUAGE="JavaScript">
function chgStatus(indexnum){
parent.head.document.hiddenform.index.value=indexnum;
parent.head.document.hiddenform.MustDisplayFirstTime.value=1;
self.location.href="iimltils.asp";
}
function SetUpdated(){
if (parent.head.listFunc.noupdate){
parent.head.listFunc.noupdate = false;
}
else{
if (parent.head.document.hiddenform != null){
if (parent.head.document.hiddenform.index.value != -1){
i=parent.head.document.hiddenform.index.value
reSort = setVals(parent.head.cachedList[i],"ipaddress",document.listform.editMe);
reSort = reSort || setVals(parent.head.cachedList[i],"ipport",document.listform.ipport);
reSort = reSort || setVals(parent.head.cachedList[i],"sslport",document.listform.sslport);
reSort = reSort || setVals(parent.head.cachedList[i],"host",document.listform.host);
parent.head.cachedList[i].updated=true;
if (reSort){
parent.head.listFunc.reSort();
}
}
}
}
}
function setVals(cachedItem, propName, formCntrl){
if (cachedItem[propName] != formCntrl.value){
cachedItem[propName] = formCntrl.value;
return (parent.head.listFunc.sortby == propName);
}
else{
return false;
}
}
function SetSecure(item,formCntrl,isSecure)
{
if (formCntrl.value != "")
{
parent.head.cachedList[item].isSecure = isSecure;
}
}
</SCRIPT>
</HEAD>
<BODY BGCOLOR="#FFFFFF" LEFTMARGIN=0 TOPMARGIN=0>
<FORM NAME="listform">
<SCRIPT LANGUAGE="JavaScript">
editOK=false;
writeSecHdr = true;
writeHdr = true;
sel=eval(parent.head.document.hiddenform.index.value);
list = writeList();
writeLine(list);
function writeList(){
<% if Session("IsIE") then %>
<% if Session("FONTSIZE") = "LARGE" then %>
// writestr = "<TABLE WIDTH=580 BORDER=0 CELLPADDING=2 CELLSPACING=0>";
writestr = "<TABLE WIDTH=600 BORDER=0 CELLPADDING=2 CELLSPACING=0>";
<% else %>
writestr = "<TABLE BORDER=0 CELLPADDING=2 CELLSPACING=0>";
<% end if %>
<% else %>
<% if Session("FONTSIZE") = "LARGE" then %>
writestr = "<TABLE WIDTH=553 BORDER=0 CELLPADDING=2 CELLSPACING=0>";
<% else %>
writestr = "<TABLE WIDTH=444 BORDER=0 CELLPADDING=2 CELLSPACING=0>";
<% end if %>
<% end if %>
//Create a new Array to store the list in a resonable order
var tmpArray;
tmpArray = new Array();
var CurrentPos,PosSeparator;
CurrentPos=0;
PosSeparator=0;
for (var j=0;j < parent.head.cachedList.length; j++) {
// first of all the ServerBindings
if (!((parent.head.cachedList[j].ipport == "") &&
(parent.head.cachedList[j].sslport == "") &&
(parent.head.cachedList[j].host == "") &&
(parent.head.cachedList[j].deleted == false) &&
(parent.head.cachedList[j].newitem == false) ))
{
// ipport BUT NOT sslport
if ((parent.head.cachedList[j].ipport != "") &&
(parent.head.cachedList[j].sslport == ""))
{
tmpArray[CurrentPos]=parent.head.cachedList[j];
CurrentPos++;
}
}
};
// now aggregate SSL Bindings
for (var j=0;j < parent.head.cachedList.length; j++) {
if (!((parent.head.cachedList[j].ipport == "") &&
(parent.head.cachedList[j].sslport == "") &&
(parent.head.cachedList[j].host == "") &&
(parent.head.cachedList[j].deleted == false) &&
(parent.head.cachedList[j].newitem == false) ))
{
// sllport BUT NOT ipport AND NOT host
if ((parent.head.cachedList[j].sllport != "") &&
(parent.head.cachedList[j].ipport == "") &&
(parent.head.cachedList[j].host == ""))
{
tmpArray[CurrentPos]=parent.head.cachedList[j];
CurrentPos++;
}
}
};
// now the most important thing, exchange the arrays
parent.head.cachedList = tmpArray;
for (var i=0;i < parent.head.cachedList.length; i++) {
if (parent.head.cachedList[i].sslport != ""){
if (writeSecHdr){
writestr += "<TR>"
writestr += writeCol(4,466," ");
writestr += "</TR>";
writestr += "<TR BGCOLOR=#CCCCCC>"
writestr += writeCol(4,466,"<B><%= L_SECURE_TEXT %></B>");
writestr += "</TR>";
writeSecHdr = false;
}
}
else{
if (writeHdr){
writestr += "<TR BGCOLOR=#CCCCCC>"
writestr += writeCol(4,466,"<B><%= L_SERVER_TEXT %></B>");
writestr += "</TR>";
writeHdr = false;
}
}
if(parent.head.document.hiddenform.MustDisplayFirstTime.value == 0){
if (parent.head.cachedList[i].deleted){
}
else{
<% if Session("IsIE") then %>
<% if Session("FONTSIZE") = "LARGE" then %>
writestr += "<TR>"
writestr += writeCol(1,150,"<A HREF='javascript:chgStatus("+i+");'>" + displayVal(parent.head.cachedList[i].ipaddress,"<%= L_ALLUNASSIGNED_TEXT %>") + "</A>");
writestr += writeCol(1,65,displayVal(parent.head.cachedList[i].ipport,"<%= L_NA_TEXT %>"));
writestr += writeCol(1,65,displayVal(parent.head.cachedList[i].sslport,"<%= L_NA_TEXT %>"));
writestr += writeCol(1,190,parent.head.cachedList[i].host);
writestr += "</TR>";
<% else %>
writestr += "<TR>"
writestr += writeCol(1,110,"<A HREF='javascript:chgStatus("+i+");'>" + displayVal(parent.head.cachedList[i].ipaddress,"<%= L_ALLUNASSIGNED_TEXT %>") + "</A>");
writestr += writeCol(1,50,displayVal(parent.head.cachedList[i].ipport,"<%= L_NA_TEXT %>"));
writestr += writeCol(1,50,displayVal(parent.head.cachedList[i].sslport,"<%= L_NA_TEXT %>"));
writestr += writeCol(1,140,parent.head.cachedList[i].host);
writestr += "</TR>";
<% end if %>
<% else %>
<% if Session("FONTSIZE") = "LARGE" then %>
writestr += "<TR>"
writestr += writeCol(1,150,"<A HREF='javascript:chgStatus("+i+");'>" + displayVal(parent.head.cachedList[i].ipaddress,"<%= L_ALLUNASSIGNED_TEXT %>") + "</A>");
writestr += writeCol(1,60,parent.head.cachedList[i].ipport);
writestr += writeCol(1,60,displayVal(parent.head.cachedList[i].sslport,"N/A"));
writestr += writeCol(1,195,parent.head.cachedList[i].host);
writestr += "</TR>";
<% else %>
writestr += "<TR>"
writestr += writeCol(1,116,"<A HREF='javascript:chgStatus("+i+");'>" + displayVal(parent.head.cachedList[i].ipaddress,"<%= L_ALLUNASSIGNED_TEXT %>") + "</A>");
writestr += writeCol(1,43,parent.head.cachedList[i].ipport);
writestr += writeCol(1,47,displayVal(parent.head.cachedList[i].sslport,"N/A"));
writestr += writeCol(1,148,parent.head.cachedList[i].host);
writestr += "</TR>";
<% end if %>
<% end if %>
}
}
else // use the old code
{
if (parent.head.document.hiddenform.index.value !=i) {
if (parent.head.cachedList[i].deleted){
}
else{
<% if Session("IsIE") then %>
<% if Session("FONTSIZE") = "LARGE" then %>
writestr += "<TR>"
writestr += writeCol(1,240,"<A HREF='javascript:chgStatus("+i+");'>" + displayVal(parent.head.cachedList[i].ipaddress,"<%= L_ALLUNASSIGNED_TEXT %>") + "</A>");
writestr += writeCol(1,80,displayVal(parent.head.cachedList[i].ipport,"<%= L_NA_TEXT %>"));
writestr += writeCol(1,80,displayVal(parent.head.cachedList[i].sslport,"<%= L_NA_TEXT %>"));
writestr += writeCol(1,153,parent.head.cachedList[i].host);
writestr += "</TR>";
<% else %>
writestr += "<TR>"
writestr += writeCol(1,240,"<A HREF='javascript:chgStatus("+i+");'>" + displayVal(parent.head.cachedList[i].ipaddress,"<%= L_ALLUNASSIGNED_TEXT %>") + "</A>");
writestr += writeCol(1,80,displayVal(parent.head.cachedList[i].ipport,"<%= L_NA_TEXT %>"));
writestr += writeCol(1,80,displayVal(parent.head.cachedList[i].sslport,"<%= L_NA_TEXT %>"));
writestr += writeCol(1,153,parent.head.cachedList[i].host);
writestr += "</TR>";
<% end if %>
<% else %>
<% if Session("FONTSIZE") = "LARGE" then %>
writestr += "<TR>"
writestr += writeCol(1,240,"<A HREF='javascript:chgStatus("+i+");'>" + displayVal(parent.head.cachedList[i].ipaddress,"<%= L_ALLUNASSIGNED_TEXT %>") + "</A>");
writestr += writeCol(1,80,parent.head.cachedList[i].ipport);
writestr += writeCol(1,80,displayVal(parent.head.cachedList[i].sslport,"N/A"));
writestr += writeCol(1,153,parent.head.cachedList[i].host);
writestr += "</TR>";
<% else %>
writestr += "<TR>"
writestr += writeCol(1,240,"<A HREF='javascript:chgStatus("+i+");'>" + displayVal(parent.head.cachedList[i].ipaddress,"<%= L_ALLUNASSIGNED_TEXT %>") + "</A>");
writestr += writeCol(1,80,parent.head.cachedList[i].ipport);
writestr += writeCol(1,80,displayVal(parent.head.cachedList[i].sslport,"N/A"));
writestr += writeCol(1,153,parent.head.cachedList[i].host);
writestr += "</TR>";
<% end if %>
<% end if %>
}
}
else{
editOK=true;
<% if Session("IsIE") then %>
writestr += "<TR>"
writestr += writeCol(1,200,"<INPUT NAME='editMe' VALUE='"+parent.head.cachedList[i].ipaddress +"' SIZE=23 onBlur='SetUpdated();'>");
writestr += writeCol(1,100,"<INPUT NAME='ipport' VALUE='"+parent.head.cachedList[i].ipport +"' SIZE=5 onBlur='SetUpdated();'>");
writestr += writeCol(1,100,"<INPUT NAME='sslport' VALUE='"+parent.head.cachedList[i].sslport +"' SIZE=5 onBlur='SetUpdated();'>");
writestr += writeCol(1,153,"<INPUT NAME='host' VALUE='"+parent.head.cachedList[i].host +"' SIZE=23 onBlur='SetUpdated();'>");
writestr += "</TR>";
<% else %>
<% if Session("FONTSIZE") = "LARGE" then %>
writestr += "<TR>"
writestr += writeCol(1,100,"<INPUT NAME='editMe' VALUE='"+parent.head.cachedList[i].ipaddress +"' SIZE=13 onBlur='SetUpdated();'>");
writestr += writeCol(1,100,"<INPUT NAME='ipport' VALUE='"+parent.head.cachedList[i].ipport +"' SIZE=5 onBlur='SetUpdated();'>");
writestr += writeCol(1,100,"<INPUT NAME='sslport' VALUE='"+parent.head.cachedList[i].sslport +"' SIZE=5 onBlur='SetUpdated();'>");
writestr += writeCol(1,175,"<INPUT NAME='host' VALUE='"+parent.head.cachedList[i].host +"' SIZE=25 onBlur='SetUpdated();'>");
writestr += "</TR>";
<% else %>
writestr += "<TR>"
writestr += writeCol(1,100,"<INPUT NAME='editMe' VALUE='"+parent.head.cachedList[i].ipaddress +"' SIZE=15 onBlur='SetUpdated();'>");
writestr += writeCol(1,80,"<INPUT NAME='ipport' VALUE='"+parent.head.cachedList[i].ipport +"' SIZE=10 onBlur='SetUpdated();'>");
writestr += writeCol(1,80,"<INPUT NAME='sslport' VALUE='"+parent.head.cachedList[i].sslport +"' SIZE=10 onBlur='SetUpdated();'>");
writestr += writeCol(1,175,"<INPUT NAME='host' VALUE='"+parent.head.cachedList[i].host +"' SIZE=25 onBlur='SetUpdated();'>");
writestr += "</TR>";
<% end if %>
<% end if %>
}
} // end if on testing for displaying the first time
}
writestr += "</TABLE>";
return writestr;
}
function displayVal(dispstr, altstr){
if (dispstr == ""){
dispstr = altstr;
}
return dispstr;
}
function writeCol(colspan,w,str){
var writestr = "<TD";
if (colspan != ""){
writestr += " COLSPAN = " + colspan
}
if (w != ""){
writestr += " WIDTH = " + w;
}
<% if Session("IsIE") then %>
writestr += " STYLE = ' font-size: 10pt;'";
<% end if %>
writestr += "><FONT SIZE = 2>" + str + "</FONT></TD>";
return writestr;
}
function writeLine(str){
document.write(str);
}
</SCRIPT>
<P>
<P>
</FORM>
<SCRIPT LANGUAGE="JavaScript">
if (editOK){
document.listform.editMe.focus();
document.listform.editMe.select();
}
</SCRIPT>
</BODY>
</HTML>