Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

183 lines
4.7 KiB

<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Developer Studio">
<META HTTP-EQUIV="Content-Type" content="text/html; charset=iso-8859-1">
<OBJECT ID=pchealth classid=CLSID:FC7D9E02-3F9E-11d3-93C0-00C04F72DAF7></OBJECT>
<TITLE>Connection Test</TITLE>
</HEAD>
<BODY>
<SCRIPT LANGUAGE=javascript>
<!--
var g_cn;
function Common_ClearTable( tbl )
{
if(tbl == null) return;
var i;
var lCount = tbl.rows.length;
for(i=0; i<lCount; i++)
{
tbl.deleteRow(0);
}
}
function Common_UnescapeURL( url )
{
return unescape( url.replace( /\+/g , " " ) );
}
function Common_EscapeHTMLTag( str )
{
str = str.replace( /&/g , "&amp;" );
str = str.replace( /\"/g, "&quot;" ); // "
str = str.replace( /</g , "&lt;" );
str = str.replace( />/g , "&gt;" );
return str;
}
function Common_AddQuotes( str )
{
return '"' + str.replace( /\"/g, "&quot;" ) + '"'; // '
}
function cn_onCheckDone( cn, lStatus, hr, url, vCtx )
{
var tblTaxonomy = document.all.TaxonomyTable;
var elemRow;
elemRow = tblTaxonomy.rows[vCtx];
if(lStatus == 1)
{
elemRow.cells[1].innerHTML = "***";
elemRow.cells[1].style.background = "green"
}
if(lStatus == 2)
{
elemRow.cells[1].innerHTML = "---";
elemRow.cells[1].style.background = "red"
}
if(lStatus == 3)
{
elemRow.cells[1].innerHTML = "???";
elemRow.cells[1].style.background = "yellow"
}
Print( "onCheckDone " + url + " Status : " + lStatus + " lIndex : " + vCtx );
Print( "Change = " + cn.Status );
}
function cn_onStatusChange( cn, lStatus )
{
Print( "onStatusChange " + lStatus );
}
function Print( line )
{
out.innerHTML = out.innerHTML + line + "<BR>";
}
function button_exec()
{
var strArray = new Array( "http://www.microsoft.com" ,
"http://www.junkmicrosoft.com" ,
"hcp://system/test5_connection.htm" ,
"hcp://system/homepage.htm" ,
"ftp://ftp.test.org" ,
"ms-its:C:\\WINNT\\Help\\Gstart.chm::/getting_started_with_Windows_2000_server.htm",
"http://www.cnn.com" ,
"http://www.junkmicrosoft.com" ,
"ms-its:C:\\WINNT\\Help\\Gstart.chm::/getting_started_with_Windows_2000_pro.htm" );
var numArray = strArray.length;
var tblTaxonomy = document.all.TaxonomyTable;
var elemRow;
var elemCell;
var strInnerHTML;
//
// Clear stuff
//
Common_ClearTable( tblTaxonomy );
out.innerHTML = "";
g_cn = pchealth.Connectivity.CreateObject_ConnectionCheck();
g_cn.onCheckDone = cn_onCheckDone;
g_cn.onStatusChange = cn_onStatusChange;
if(pchealth.NetworkAlive())
{
Print('Network Alive');
}
else
{
Print('Network not alive');
}
for( i = 0 ; i < numArray ; i++ )
{
elemRow = tblTaxonomy.insertRow();
elemCell = elemRow.insertCell(0);
elemCell.style.width = "200px";
elemCell.innerHTML = "URL-" + (i+1) ;
elemCell = elemRow.insertCell(1);
elemCell.style.width = "25px";
elemCell.style.background = "gray"
elemCell.innerHTML = "---";
elemCell = elemRow.insertCell(2);
elemCell.style.width = "100%";
strInnerHTML = "<A tabIndex=300 href=" + Common_AddQuotes( strArray[i]);
strInnerHTML += " >";
strInnerHTML += Common_EscapeHTMLTag( strArray[i] );
strInnerHTML += "</A>";
elemCell.innerHTML = strInnerHTML ;
g_cn.StartUrlCheck( strArray[i], i );
}
}
function button_abort()
{
if(g_cn != null)
{
g_cn.Abort();
Print("Aborted");
}
}
function Print( line )
{
out.innerHTML = out.innerHTML + line + "<BR>";
}
//-->
</SCRIPT>
<INPUT type="button" value="Start" onClick="button_exec();">&nbsp;
<INPUT type="button" value="Abort" onClick="button_abort();"><P>
<TABLE BORDER=1 WIDTH="100%" ID="TaxonomyTable">
<TBODY>
</TBODY>
</TABLE>
<DIV ID=out></DIV>
</BODY>
</HTML>