Files
web.ems/wxc2_omc/fault/good_status/sccp_status.php
agtuser 16a3fd1e1b init
2024-11-11 17:56:00 +08:00

227 lines
5.0 KiB
PHP
Executable File

<?php
require("../../inc/header.inc");
require("../serverStatusImprove/function.inc");
?>
<body onload="javascript:adjust();" onresize="javascript:adjust();" leftmargin="15" style="overflow:hidden;overflow-x:hidden;overflow-y:hidden;">
<?php
$global_id=0;
function AssignID()
{
global $global_id;
$id="ID_{$global_id}";
$global_id++;
return $id;
}
?>
<?php
adjust_head();
adjust_title_head();
echo "<FORM NAME=\"downForm\">";
echo "<table id=\"table_up\" border=\"0\" width=\"100%\">";
echo "<tr>";
echo "<td width=\"50%\">";
echo "Advanced > SCCP Status";
echo "</td>";
echo "<td width=\"50%\" align=\"right\" title=\"Help\">";
//showHelp($helpId);
echo "</td>";
echo "</tr>";
echo "<tr>";
echo "<td width=\"50%\">";
echo "&nbsp;";
echo "</td>";
echo "<td width=\"50%\" align=\"right\" title=\"Clear\">";
echo "<a href=\"./plat_test_status.php\"><img align=absBottom border=0 src=\"../../images/left.gif\" width=\"14\" height=\"14\">Back</a>";
echo "</td>";
echo "</tr>";
echo "</table>";
adjust_title_tail();
adjust_content_head();
if(0)
{
echo "subSysNo=$subSysNo,platID=$platID<br>";
}
$config=parse_ini_file("config.ini",true);
$config_count=sizeof($config);
$platDetailInfo=GetDetailPlatInfo($sysNo,$subSysNo,2);
if(0)
{
echo "<pre>";
print_r($plat);
echo "</pre>";
}
$table_title="<font color=\"#0000FF\">SCCP</font>( Version:";
$id=AssignID();
$table_title.="<span id=\"{$id}\" style=\"color:#000000;\">--</span>";
$table_title.=",";
$table_title.=" Status:";
$id=AssignID();
$table_title.="<span id=\"{$id}\" style=\"color:#000000;\">--</span>";
$table_title.=",";
$table_title.="RefreshTime:";
$id=AssignID();
$table_title.="<span id=\"{$id}\" style=\"color:#000000;\">--</span>";
$table_title.=")";
echo "<br><center>$table_title</center>";
echo "<table width=\"100%\" border=\"1\" cellpadding=\"2\" cellspacing=\"0\" bordercolor=\"#666666\" bordercolordark=\"#FFFFFF\" bgcolor=\"#FFFFFF\">";
echo "<tr bgcolor=\"#E6E6E6\">";
echo "<td align=\"left\" >Num</td>";
echo "<td align=\"left\" >Name</td>";
echo "</tr>";
for($i=0;$i<256;$i++)
{
echo "<tr id=\"$i\">";
$id=AssignID();
echo "<td><span id=\"{$id}\" style=\"color:#000000;\">--</span></td>";
$id=AssignID();
echo "<td><span id=\"{$id}\" style=\"color:#000000;\">--</span></td>";
echo "</tr>";
}
echo "</table>";
//Remark Table
echo "<table border=\"0\" width=\"100%\" cellpadding=1 cellspacing=0>";
echo "<tr>";
echo "<td width=\"50%\" align=\"left\">";
echo "Remarks: <font color=\"blue\">Y</font> = Normal, <font color=\"red\">N</font> = Abnormal, -- = None.";
echo "</td>";
//echo "<td width=\"50%\" align=\"right\" title=\"Clear\">";
//echo "<a href=\"plat_test_status.php\"><img align=absBottom border=0 src=\"../../images/left.gif\" width=\"14\" height=\"14\">Back</a>";
//echo "</td>";
echo "</tr>";
echo "</table>";
adjust_content_tail();
?>
<script language="JavaScript">
function updateStatus(sysNo,subSysNo)
{
var fixurl="./sccp_status_update.php?sysNo="+sysNo+"&subSysNo="+subSysNo;
var browserr = navigator.appName;
if(browserr == "Microsoft Internet Explorer")
{
request_oo = new ActiveXObject("Microsoft.XMLHTTP");
}
else
{
request_oo = new XMLHttpRequest();
}
request_oo.open("GET",fixurl,"false");
request_oo.onreadystatechange=function()
{
checUpdateState();
}
request_oo.send(null);
setTimeout("updateStatus('"+sysNo+"','"+subSysNo+"')", 10000);
}
function checUpdateState()
{
//not
if(request_oo.readyState == 3)
{
//alert("not finish");
}
if(request_oo.readyState == 4)
{
var response = request_oo.responseText;
response=response.replace(/(^\s*)|(\s*$)/g, "");
//alert(response);
if(response == "")
return;
var objects=response.split(';');
//alert(objects.length);
for(i=0;i<objects.length;i++)
{
var items=objects[i].split(',');
var item_id=items[0].replace(/(^\s*)|(\s*$)/g, "");
if(document.getElementById(item_id) == null)
continue;
var item_display=items[1].replace(/(^\s*)|(\s*$)/g, "");
var item_value=items[2].replace(/(^\s*)|(\s*$)/g, "");
var item_color=items[3].replace(/(^\s*)|(\s*$)/g, "");
if(item_display == 'Rect')
{
document.getElementById(item_id).value=GetLabel(item_value);
document.getElementById(item_id).style.color='#3366aa';
}
else if(item_display == 'layerShow')
{
document.getElementById(item_id).style.display='';
}
else if(item_display == 'layerHide')
{
document.getElementById(item_id).style.display='none';
}
else
{
document.getElementById(item_id).style.color=item_color;
document.getElementById(item_id).innerHTML=item_value;
if(item_display == 'none')
{
document.getElementById(item_id).style.display='none';
}
else
{
document.getElementById(item_id).style.display='';
}
}
}
}
}
</script>
<?php
echo "\n<script language=\"JavaScript\">\n";
echo "updateStatus('$sysNo','$subSysNo');\n";
echo "</script>\n";
?>