init web ems all
316
wxc2_omc/configuration/bssomc/]
Executable file
@@ -0,0 +1,316 @@
|
||||
<?php
|
||||
include("nmicommand.inc"); /* Include this when you need to process nmi command */
|
||||
|
||||
if (!isset($debug))
|
||||
$debug=0;
|
||||
|
||||
/*
|
||||
* Retieve the parameters from database and create the NMI "Set" command
|
||||
*/
|
||||
function create_sql_string_from_meta_table($db,$bssid,$objectid,$tablename,&$sqlstring, &$parameters, &$attribute_type)
|
||||
{
|
||||
$name = explode("_",$tablename);
|
||||
$sqlstring = "SELECT Attribute_Name,Attribute_Type " .
|
||||
"FROM OMCR_Meta_Table WHERE Attribute_Type<>0 AND Object_Name='$name[1]'";
|
||||
if ($debug) echo "$sqlstring <BR>"; else echo ".";
|
||||
$res = mysql_query($sqlstring, $db) or
|
||||
die("Invalid query:$sqlstring\n" . mysqli_error($pubConn));
|
||||
while ( $row = mysqli_fetch_row($res) )
|
||||
{
|
||||
list($parameters[],$attribute_type[]) = $row;
|
||||
}
|
||||
mysql_free_result($res);
|
||||
|
||||
$sqlstring = "SELECT " . join(",",$parameters) . " FROM $tablename WHERE bssid=$bssid AND ObjectId='$objectid'";
|
||||
}
|
||||
|
||||
/*
|
||||
* Create NMI Set Command for paramter upload
|
||||
*/
|
||||
function create_nmi_command($db,$sqlstring,$parameters,$attribute_type, &$nmicommand)
|
||||
{
|
||||
if ($debug) echo "$sqlstring <BR>"; else echo ".";
|
||||
$res = mysql_query($sqlstring, $db) or
|
||||
die("Invalid query:$sqlstring\n" . mysqli_error($pubConn));
|
||||
$value = mysqli_fetch_row($res);
|
||||
mysql_free_result($res);
|
||||
$nmicommand = "set";
|
||||
for ($i=0;$i<sizeof($parameters);$i++)
|
||||
{
|
||||
if ($attribute_type[$i] == 1)
|
||||
$nmicommand .= " $parameters[$i]=$value[$i]";
|
||||
else if ($attribute_type[$i] == 2)
|
||||
$nmicommand .= " $parameters[$i]=\"$value[$i]\"";
|
||||
else if ($attribute_type[$i] == 3)
|
||||
{
|
||||
$param = explode("_",$parameters[$i]);
|
||||
$nmicommand .= " $param[0]=[$param[1]=$value[$i]]";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Return 0 if success, otherwise -1
|
||||
*/
|
||||
function download_parameters($db,$bssid)
|
||||
{
|
||||
$resultcode = $responsecode = $response = null;
|
||||
$retval = 0;
|
||||
if ($debug) echo "==) oid BssFunc" . "<BR>"; else echo ".";
|
||||
$retval = send_nmicommand($db,$bssid,"oid BssFunc",$resultcode, $responsecode,$response,$debug);
|
||||
if (($retval != 0) || ($resultcode[0] != 0))
|
||||
return (set_download_in_progress_zero($db,$bssid,-1));
|
||||
flush();
|
||||
if ($debug) echo "==) set DownLoadInProgress=1" . "<BR>"; else echo ".";
|
||||
$retval = send_nmicommand($db,$bssid,"set DownLoadInProgress=1",$resultcode, $responsecode,$response,$debug);
|
||||
if (($retval != 0) || ($resultcode[0] != 0))
|
||||
return (set_download_in_progress_zero($db,$bssid,-1));
|
||||
flush();
|
||||
|
||||
$objectlist = Array(
|
||||
"Card.0.10",
|
||||
"Bsc.0",
|
||||
"AIf.0",
|
||||
"ALinkSet.0.0",
|
||||
"ALink.0.0.0"
|
||||
);
|
||||
$tablenamelist = Array(
|
||||
"OMCR_ClockMod",
|
||||
"OMCR_Bsc",
|
||||
"OMCR_AIf",
|
||||
"OMCR_ALinkSet",
|
||||
"OMCR_ALink"
|
||||
);
|
||||
|
||||
$sqlstring = "SELECT ObjectId FROM OMCR_BSSTREE WHERE bssid=$bssid AND Presence=1 AND ObjectId='ALink.0.0.1'";
|
||||
$res = mysql_query($sqlstring, $db) or
|
||||
die("Invalid query: $sqlstring\n" . mysqli_error($pubConn));
|
||||
if (list($row) = mysqli_fetch_row($res))
|
||||
{
|
||||
if ($debug) echo "==) oid ALinkSet.0.0" . "<BR>"; else echo ".";
|
||||
$retval = send_nmicommand($db,$bssid,"oid ALinkSet.0.0",$resultcode, $responsecode,$response,$debug);
|
||||
if (($retval != 0) || ($resultcode[0] != 0))
|
||||
return (set_download_in_progress_zero($db,$bssid,-1));
|
||||
flush();
|
||||
if ($debug) echo "==) create ALink 1" . "<BR>"; else echo ".";
|
||||
$retval = send_nmicommand($db,$bssid,"create ALink 1",$resultcode, $responsecode,$response,$debug);
|
||||
if (($retval != 0) || ($resultcode[0] != 0))
|
||||
return (set_download_in_progress_zero($db,$bssid,-1));
|
||||
flush();
|
||||
$objectlist = array_merge($objectlist, Array ( "ALink.0.0.1"));
|
||||
$tablenamelist = array_merge($tablenamelist, Array("OMCR_ALink"));
|
||||
|
||||
}
|
||||
|
||||
$sqlstring = "SELECT ObjectId FROM OMCR_BSSTREE WHERE bssid=$bssid AND Presence=1 AND ObjectId REGEXP 'Card.0.[1-8]$'";
|
||||
$res = mysql_query($sqlstring, $db) or
|
||||
die("Invalid query: $sqlstring\n" . mysqli_error($pubConn));
|
||||
$e1trmod_id_list = null;
|
||||
while ( list($row) = mysqli_fetch_row($res) )
|
||||
{
|
||||
$id = explode(".",$row);
|
||||
$e1trmod_id_list[] = $id[2];
|
||||
}
|
||||
//echo "==) oid Shelf.0" . "<BR>";
|
||||
//$retval = send_nmicommand($db,$bssid,"oid Shelf.0",$resultcode, $responsecode,$response,$debug);
|
||||
//if (($retval != 0) || ($resultcode[0] != 0))
|
||||
// return (set_download_in_progress_zero($db,$bssid,-1));
|
||||
//flush();
|
||||
|
||||
for ($i=0; $i<sizeof($e1trmod_id_list); $i++)
|
||||
{
|
||||
$objectlist = array_merge($objectlist,
|
||||
Array ( "Port.0.$e1trmod_id_list[$i].0",
|
||||
"Port.0.$e1trmod_id_list[$i].1")
|
||||
);
|
||||
$tablenamelist = array_merge($tablenamelist, Array("OMCR_E1port", "OMCR_E1port"));
|
||||
|
||||
//echo "==) create E1trmod $e1trmod_id_list[$i]" . "<BR>";
|
||||
//$retval = send_nmicommand($db,$bssid,"create E1trmod $e1trmod_id_list[$i]",$resultcode, $responsecode,$response,$debug);
|
||||
//if (($retval != 0) || ($resultcode[0] != 0))
|
||||
// return (set_download_in_progress_zero($db,$bssid,-1));
|
||||
//flush();
|
||||
}
|
||||
|
||||
for ($i=0; $i<sizeof($objectlist); $i++)
|
||||
{
|
||||
$parameters=$attribute_type=$nmicommand=null;
|
||||
|
||||
$objectid = $objectlist[$i];
|
||||
$tablename = $tablenamelist[$i];
|
||||
if ($debug) echo "==) oid $objectid" . "<BR>"; else echo ".";
|
||||
$retval = send_nmicommand($db,$bssid,"oid $objectid",$resultcode, $responsecode,$response,$debug);
|
||||
if (($retval != 0) || ($resultcode[0] != 0))
|
||||
return (set_download_in_progress_zero($db,$bssid,-1));
|
||||
flush();
|
||||
create_sql_string_from_meta_table($db,$bssid,$objectid,$tablename,$sqlstring,$parameters,$attribute_type);
|
||||
create_nmi_command($db,$sqlstring,$parameters,$attribute_type,$nmicommand);
|
||||
if ($debug) echo "==) $nmicommand" . "<BR>"; else echo ".";
|
||||
$retval = send_nmicommand($db,$bssid,"$nmicommand",$resultcode, $responsecode,$response,$debug);
|
||||
if (($retval != 0) || ($resultcode[0] != 0))
|
||||
return (set_download_in_progress_zero($db,$bssid,-1));
|
||||
flush();
|
||||
}
|
||||
|
||||
/*********************************************
|
||||
* For each BtsMgr, download parameters
|
||||
*********************************************/
|
||||
$sqlstring = "SELECT ObjectId FROM OMCR_BSSTREE WHERE bssid=$bssid AND Presence=1 AND ObjectId Like 'BtsMgr.%'";
|
||||
if ($debug) echo "$sqlstring<BR>\n"; else echo ".";
|
||||
$res = mysql_query($sqlstring, $db) or
|
||||
die("Invalid query: $sqlstring\n" . mysqli_error($pubConn));
|
||||
|
||||
$btsmgr_list=null;
|
||||
while ( list($objectid) = mysqli_fetch_row($res) )
|
||||
{
|
||||
$id = explode(".",$objectid);
|
||||
$btsmgr_list[] = $id[1];
|
||||
}
|
||||
mysql_free_result($res);
|
||||
|
||||
for ($i=0; $i<sizeof($btsmgr_list); $i++)
|
||||
{
|
||||
$btsid = $btsmgr_list[$i];
|
||||
|
||||
$objectlist = Array(
|
||||
"AbisMgr.$btsid.0", "Bts.$btsid.0",
|
||||
"AdjHand.$btsid.0.0", "AdjHand.$btsid.0.1", "AdjHand.$btsid.0.2", "AdjHand.$btsid.0.3",
|
||||
"AdjHand.$btsid.0.4", "AdjHand.$btsid.0.5", "AdjHand.$btsid.0.6", "AdjHand.$btsid.0.7",
|
||||
"AdjHand.$btsid.0.8", "AdjHand.$btsid.0.9", "AdjHand.$btsid.0.10", "AdjHand.$btsid.0.11",
|
||||
"AdjHand.$btsid.0.12", "AdjHand.$btsid.0.13", "AdjHand.$btsid.0.14", "AdjHand.$btsid.0.15",
|
||||
"AdjHand.$btsid.0.16", "AdjHand.$btsid.0.17", "AdjHand.$btsid.0.18", "AdjHand.$btsid.0.19",
|
||||
"AdjHand.$btsid.0.20", "AdjHand.$btsid.0.21", "AdjHand.$btsid.0.22", "AdjHand.$btsid.0.23",
|
||||
"AdjHand.$btsid.0.24", "AdjHand.$btsid.0.25", "AdjHand.$btsid.0.26", "AdjHand.$btsid.0.27",
|
||||
"AdjHand.$btsid.0.28", "AdjHand.$btsid.0.29", "AdjHand.$btsid.0.30", "AdjHand.$btsid.0.31",
|
||||
"BtsMgr_Shelf.$btsid.0"
|
||||
);
|
||||
$tablenamelist = Array(
|
||||
"OMCR_AbisMgr", "OMCR_Bts",
|
||||
"OMCR_AdjHand", "OMCR_AdjHand", "OMCR_AdjHand", "OMCR_AdjHand",
|
||||
"OMCR_AdjHand", "OMCR_AdjHand", "OMCR_AdjHand", "OMCR_AdjHand",
|
||||
"OMCR_AdjHand", "OMCR_AdjHand", "OMCR_AdjHand", "OMCR_AdjHand",
|
||||
"OMCR_AdjHand", "OMCR_AdjHand", "OMCR_AdjHand", "OMCR_AdjHand",
|
||||
"OMCR_AdjHand", "OMCR_AdjHand", "OMCR_AdjHand", "OMCR_AdjHand",
|
||||
"OMCR_AdjHand", "OMCR_AdjHand", "OMCR_AdjHand", "OMCR_AdjHand",
|
||||
"OMCR_AdjHand", "OMCR_AdjHand", "OMCR_AdjHand", "OMCR_AdjHand",
|
||||
"OMCR_AdjHand", "OMCR_AdjHand", "OMCR_AdjHand", "OMCR_AdjHand",
|
||||
"OMCR_Wavex"
|
||||
);
|
||||
|
||||
if ($debug) echo "<HR>";
|
||||
if ($debug) echo "==) oid BssFunc" . "<BR>"; else echo ".";
|
||||
$retval = send_nmicommand($db,$bssid,"oid BssFunc",$resultcode, $responsecode,$response,$debug);
|
||||
if (($retval != 0) || ($resultcode[0] != 0))
|
||||
return (set_download_in_progress_zero($db,$bssid,-1));
|
||||
flush();
|
||||
if ($debug) echo "==) create BtsMgr $btsid" . "<BR>"; else echo ".";
|
||||
$retval = send_nmicommand($db,$bssid,"create BtsMgr $btsid",$resultcode, $responsecode,$response,$debug);
|
||||
if (($retval != 0) || ($resultcode[0] != 0))
|
||||
return (set_download_in_progress_zero($db,$bssid,-1));
|
||||
flush();
|
||||
//echo "==) oid BtsMgr_Shelf.$btsid.0" . "<BR>";
|
||||
//$retval = send_nmicommand($db,$bssid,"oid BtsMgr_Shelf.$btsid.0",$resultcode, $responsecode,$response,$debug);
|
||||
//if (($retval != 0) || ($resultcode[0] != 0))
|
||||
// return (set_download_in_progress_zero($db,$bssid,-1));
|
||||
//flush();
|
||||
|
||||
|
||||
/*************************
|
||||
* Create E1TrMod
|
||||
*************************/
|
||||
$sqlstring = "SELECT ObjectId FROM OMCR_BSSTREE WHERE bssid=$bssid AND Presence=1 AND ObjectId REGEXP 'BtsMgr_Shelf_Card.$btsid.0.[1-8]$'";
|
||||
$res = mysql_query($sqlstring, $db) or
|
||||
die("Invalid query: $sqlstring\n" . mysqli_error($pubConn));
|
||||
$card_id_list = null;
|
||||
while ( $row = mysqli_fetch_row($res) )
|
||||
{
|
||||
list($card_list) = $row;
|
||||
$id = explode(".",$card_list);
|
||||
$card_id_list[] = $id[3];
|
||||
}
|
||||
mysql_free_result($res);
|
||||
|
||||
for ($i=0; $i<sizeof($card_id_list); $i++)
|
||||
{
|
||||
if ($debug) echo "==) oid BtsMgr_Shelf.$btsid.0" . "<BR>"; else echo "<BR>.";
|
||||
$retval = send_nmicommand($db,$bssid,"oid BtsMgr_Shelf.$btsid.0",$resultcode, $responsecode,$response,$debug);
|
||||
if (($retval != 0) || ($resultcode[0] != 0))
|
||||
return (set_download_in_progress_zero($db,$bssid,-1));
|
||||
flush();
|
||||
if ($card_id_list[$i] == 1)
|
||||
{
|
||||
$objectlist = array_merge($objectlist,
|
||||
Array ( "BtsMgr_Shelf_Card_Port.$btsid.0.$card_id_list[$i].0",
|
||||
"BtsMgr_Shelf_Card_Port.$btsid.0.$card_id_list[$i].1")
|
||||
);
|
||||
$tablenamelist = array_merge($tablenamelist, Array("OMCR_E1port", "OMCR_E1port"));
|
||||
|
||||
if ($debug) echo "==) create E1trmod $card_id_list[$i]" . "<BR>"; else echo ".";
|
||||
$retval = send_nmicommand($db,$bssid,"create E1trmod $card_id_list[$i]",$resultcode, $responsecode,$response,$debug);
|
||||
}
|
||||
else
|
||||
{
|
||||
$objectlist = array_merge($objectlist,
|
||||
Array ( "Trx.$btsid.0.$card_id_list[$i]",
|
||||
"RCarrier.$btsid.0.$card_id_list[$i]",
|
||||
"TrxCh.$btsid.0.$card_id_list[$i].0",
|
||||
"TrxCh.$btsid.0.$card_id_list[$i].1",
|
||||
"TrxCh.$btsid.0.$card_id_list[$i].2",
|
||||
"TrxCh.$btsid.0.$card_id_list[$i].3",
|
||||
"TrxCh.$btsid.0.$card_id_list[$i].4",
|
||||
"TrxCh.$btsid.0.$card_id_list[$i].5",
|
||||
"TrxCh.$btsid.0.$card_id_list[$i].6",
|
||||
"TrxCh.$btsid.0.$card_id_list[$i].7")
|
||||
);
|
||||
$tablenamelist = array_merge($tablenamelist,
|
||||
Array ( "OMCR_Trx", "OMCR_RCarrier",
|
||||
"OMCR_TrxCh","OMCR_TrxCh",
|
||||
"OMCR_TrxCh","OMCR_TrxCh",
|
||||
"OMCR_TrxCh","OMCR_TrxCh",
|
||||
"OMCR_TrxCh","OMCR_TrxCh")
|
||||
);
|
||||
|
||||
if ($debug) echo "==) create TrxMod $card_id_list[$i]" . "<BR>"; else echo ".";
|
||||
$retval = send_nmicommand($db,$bssid,"create TrxMod $card_id_list[$i]",$resultcode, $responsecode,$response,$debug);
|
||||
}
|
||||
if (($retval != 0) || ($resultcode[0] != 0))
|
||||
return (set_download_in_progress_zero($db,$bssid,-1));
|
||||
flush();
|
||||
}
|
||||
|
||||
for ($i=0; $i<sizeof($objectlist); $i++)
|
||||
{
|
||||
$parameters=$attribute_type=$nmicommand=null;
|
||||
|
||||
$objectid = $objectlist[$i];
|
||||
$tablename = $tablenamelist[$i];
|
||||
if ($debug) echo "==) oid $objectid" . "<BR>"; else echo ".";
|
||||
$retval = send_nmicommand($db,$bssid,"oid $objectid",$resultcode, $responsecode,$response,$debug);
|
||||
if (($retval != 0) || ($resultcode[0] != 0))
|
||||
return (set_download_in_progress_zero($db,$bssid,-1));
|
||||
flush();
|
||||
create_sql_string_from_meta_table(
|
||||
$db,$bssid,$objectid,$tablename,$sqlstring,$parameters,$attribute_type);
|
||||
create_nmi_command($db,$sqlstring,$parameters,$attribute_type,$nmicommand);
|
||||
if ($debug) echo "==) $nmicommand" . "<BR>"; else echo ".";
|
||||
$retval = send_nmicommand($db,$bssid,"$nmicommand",$resultcode, $responsecode,$response,$debug);
|
||||
if (($retval != 0) || ($resultcode[0] != 0))
|
||||
return (set_download_in_progress_zero($db,$bssid,-1));
|
||||
flush();
|
||||
}
|
||||
}
|
||||
if ($debug) echo "==) oid BssFunc" . "<BR>"; else echo ".";
|
||||
$retval = send_nmicommand($db,$bssid,"oid BssFunc",$resultcode, $responsecode,$response,$debug);
|
||||
if (($retval != 0) || ($resultcode[0] != 0))
|
||||
return -1;
|
||||
flush();
|
||||
if ($debug) echo "==) set DownLoadInProgress=0" . "<BR>"; else echo ".";
|
||||
$retval = send_nmicommand($db,$bssid,"set DownLoadInProgress=0",$resultcode, $responsecode,$response,$debug);
|
||||
if (($retval != 0) || ($resultcode[0] != 0))
|
||||
return -1;
|
||||
flush();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
?>
|
||||
44
wxc2_omc/configuration/bssomc/adjhand.inc
Executable file
@@ -0,0 +1,44 @@
|
||||
<?php
|
||||
$gbnamearray = Array(
|
||||
rowno => "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>",
|
||||
cellname => "С<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>",
|
||||
mcc => "<EFBFBD>ƶ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ҵ<EFBFBD><EFBFBD><EFBFBD>",
|
||||
mnc => "<EFBFBD>ƶ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>",
|
||||
cellid => "С<EFBFBD><EFBFBD>ʶ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>",
|
||||
lac => "λ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>",
|
||||
bcch => "BCCH",
|
||||
bsic => "<EFBFBD><EFBFBD>վʶ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>",
|
||||
neighbortype=> "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>С<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>",
|
||||
celltype => "С<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>",
|
||||
control => "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>",
|
||||
noneighbor => "û<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>С<EFBFBD><EFBFBD>",
|
||||
delete => "ɾ<EFBFBD><EFBFBD>",
|
||||
modify => "<EFBFBD>༭",
|
||||
activeonly => "DEDICATED MODE ONLY",
|
||||
activeidle => "DEDICATED & IDLE MODE",
|
||||
idleonly => "IDLE MODE ONLY",
|
||||
addneighbor => "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>С<EFBFBD><EFBFBD>",
|
||||
selneighbor => "ѡ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>С<EFBFBD><EFBFBD>"
|
||||
);
|
||||
$engnamearray = Array(
|
||||
rowno => "NO.",
|
||||
cellname => "NAME",
|
||||
mcc => "MCC",
|
||||
mnc => "MNC",
|
||||
cellid => "CELL ID",
|
||||
lac => "LAC",
|
||||
bcch => "BCCH",
|
||||
bsic => "BSIC",
|
||||
neighbortype=> "NEIGHBOUR TYPE",
|
||||
celltype => "Cell Type",
|
||||
control => "CONTROL",
|
||||
noneighbor => "No Neighbour found",
|
||||
delete => "DELETE",
|
||||
modify => "MODIFY",
|
||||
activeonly => "DEDICATED MODE ONLY",
|
||||
activeidle => "DEDICATED & IDLE MODE",
|
||||
idleonly => "IDLE MODE ONLY",
|
||||
addneighbor => "Add Neighbor Cell",
|
||||
selneighbor => "Select Neighbor Cell"
|
||||
);
|
||||
?>
|
||||
190
wxc2_omc/configuration/bssomc/adjhand.php
Executable file
@@ -0,0 +1,190 @@
|
||||
<?php include("nocache.inc"); ?>
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<?php include("header.inc"); ?>
|
||||
</HEAD>
|
||||
<SCRIPT language="javascript" type="text/javascript">
|
||||
function show_status(status,alarm)
|
||||
{
|
||||
//
|
||||
// alarm and status display
|
||||
if ((typeof(alarm) != "undefined") && (alarm != ""))
|
||||
{
|
||||
window.status=alarm;
|
||||
alert(alarm);
|
||||
}
|
||||
else if ((typeof(status) != "undefined") && (status != ""))
|
||||
{
|
||||
window.status=status;
|
||||
}
|
||||
|
||||
}
|
||||
//window.status = "";
|
||||
</SCRIPT>
|
||||
<BODY onLoad='show_status("<?=$status?>","<?=$alarm?>");'>
|
||||
|
||||
<?php
|
||||
if (!isset($language))
|
||||
$language = "eng";
|
||||
$parameter="{$language}namearray";
|
||||
if (!isset($bssid) || !isset($objectid))
|
||||
{
|
||||
echo "The required information for this page is invalid.<br>\n";
|
||||
echo "</BODY>\n</HTML>";
|
||||
exit();
|
||||
}
|
||||
|
||||
/************************************************
|
||||
* Retrieve the Bts Manager ID from object ID
|
||||
* AdjHand.11.0.12 --substr--> 11.0.12 --> 11
|
||||
************************************************/
|
||||
$btsmgrid = substr($objectid,8);
|
||||
if ($btsmgrid[1] == '.')
|
||||
{
|
||||
$btsmgrid=substr($btsmgrid,0,1);
|
||||
}
|
||||
else if ($btsmgrid[2] == '.')
|
||||
{
|
||||
$btsmgrid=substr($btsmgrid,0,2);
|
||||
}
|
||||
else
|
||||
{
|
||||
echo strlen($objectid) . ":Error Object ID:" . $objectid . "\n";
|
||||
return 0;
|
||||
}
|
||||
|
||||
include("adjhand.inc");
|
||||
include("login_parm.inc");
|
||||
$db = mysql_connect($hostname, $username, $password);
|
||||
mysql_select_db($dbname,$db);
|
||||
echo "<U><FONT color=#0000FF size=+3pt>=)AdjHand.$btsmgrid.0.*<FONT></U>";
|
||||
echo "<HR SIZE=1>\n";
|
||||
|
||||
if (!isset($modified_data))
|
||||
{
|
||||
/************************************************
|
||||
* Step 1: Display the present neighbor list
|
||||
************************************************/
|
||||
|
||||
/************************************************
|
||||
* Generate the Neighbor cell list from SQL DB
|
||||
************************************************/
|
||||
$sqlstring = "select Label,CellGlobalIdentityLaiMcc,CellGlobalIdentityLaiMnc," .
|
||||
"LocationAreaCodes,CellGlobalIdentityCi,BcchFrequency,BsIdentityCode," .
|
||||
"NeighbourType,ObjectId from OMCR_AdjHand " .
|
||||
"where bssid=$bssid and BcchFrequency<>-1 and CellGlobalIdentityLaiMcc<>0 " .
|
||||
"and CellGlobalIdentityLaiMnc<>0 and CellGlobalIdentityCi<>0 " .
|
||||
"and LocationAreaCodes<>0 and ObjectId LIKE 'AdjHand.$btsmgrid.0.%' " .
|
||||
"ORDER BY (0+SUBSTRING_INDEX(ObjectId,'.',-1))";
|
||||
//echo $sqlstring . "<BR>";
|
||||
$result = mysql_query($sqlstring,$db) or
|
||||
die("Invalid query: $sqlstring\n" . mysqli_error($pubConn));
|
||||
$no_of_fields=mysql_num_fields($result);
|
||||
echo "<TABLE border=1 cellspacing=0 cellpadding=0" .
|
||||
"bordercolor=#000000 bordercolordark=#FFFFFF bordercolorlight=#000000 width=100%>\n";
|
||||
|
||||
echo "<TR>\n";
|
||||
echo "<TD width=15%>{${$parameter}[cellname]}</TD>\n";
|
||||
echo "<TD width=12%>{${$parameter}[mcc]}</TD>\n";
|
||||
echo "<TD width=10%>{${$parameter}[mnc]}</TD>\n";
|
||||
echo "<TD width=10%>{${$parameter}[lac]}</TD>\n";
|
||||
echo "<TD width=10%>{${$parameter}[cellid]}</TD>\n";
|
||||
echo "<TD width=5%>{${$parameter}[bcch]}</TD>\n";
|
||||
echo "<TD width=10%>{${$parameter}[bsic]}</TD>\n";
|
||||
echo "<TD width=20%>{${$parameter}[neighbortype]}</TD>\n";
|
||||
echo "<TD width=8%>{${$parameter}[control]}</TD>\n";
|
||||
echo "</TR>\n";
|
||||
$num=0;
|
||||
while ( $row = mysqli_fetch_row($result) )
|
||||
{
|
||||
$num++;
|
||||
echo "<TR>\n";
|
||||
//echo "<TD>$num</TD>\n";
|
||||
echo "<TD>" . ($row[0]==''?"-":rawurldecode($row[0])) . "</TD>\n";
|
||||
//echo "<TD>$row[0]</TD>\n";
|
||||
echo "<TD>$row[1]</TD>\n";
|
||||
echo "<TD>$row[2]</TD>\n";
|
||||
echo "<TD>$row[3]</TD>\n";
|
||||
echo "<TD>$row[4]</TD>\n";
|
||||
echo "<TD>$row[5]</TD>\n";
|
||||
echo "<TD>$row[6]</TD>\n";
|
||||
switch($row[7])
|
||||
{
|
||||
case 0:
|
||||
echo "<TD>{${$parameter}[activeonly]}</TD>\n";
|
||||
break;
|
||||
case 1:
|
||||
echo "<TD>{${$parameter}[activeidle]}</TD>\n";
|
||||
break;
|
||||
case 2:
|
||||
echo "<TD>{${$parameter}[idleonly]}</TD>\n";
|
||||
break;
|
||||
}
|
||||
echo "<TD><A href='javascript:window.location.href=\"modify.php?" .
|
||||
"url=adjhand.php" .
|
||||
"&language=$language" .
|
||||
"&bssid=$bssid" .
|
||||
"&objectid=$row[8]" .
|
||||
"&nmicommand=set CellGlobalIdentityLaiMcc=0 CellGlobalIdentityLaiMnc=0 CellGlobalIdentityCi=0 LocationAreaCodes=0 BcchFrequency=-1\"" .
|
||||
"'>{${$parameter}[delete]}</A>|" .
|
||||
"<A href='javascript:window.location.href=\"objects.php?" .
|
||||
"url=adjhand.php" .
|
||||
"&language=$language" .
|
||||
"&bssid=$bssid" .
|
||||
"&objectid=$row[8]" .
|
||||
(isset($x)?"&x=$x":"") .
|
||||
(isset($y)?"&y=$y":"") .
|
||||
"&tablename=OMCR_AdjHand\"" .
|
||||
"'>{${$parameter}[modify]}</A></TD>\n";
|
||||
echo "</TR>\n";
|
||||
}
|
||||
if (mysqli_num_rows($result) == 0)
|
||||
{
|
||||
$no_of_fields += 1;
|
||||
echo "<TR><TD align=center colspan=$no_of_fields><FONT color=cyan>" .
|
||||
${$parameter}[noneighbor] . "</FONT></TD></TR>";
|
||||
}
|
||||
echo "</TABLE>";
|
||||
|
||||
/************************************************
|
||||
* Find out the next available Adjhand object ID
|
||||
************************************************/
|
||||
if (mysqli_num_rows($result)<32)
|
||||
{
|
||||
$sqlstring = "select MIN(0+SUBSTRING_INDEX(ObjectId,'.',-1)) from OMCR_AdjHand where bssid=$bssid and (BcchFrequency=-1 or CellGlobalIdentityLaiMcc=0 or CellGlobalIdentityLaiMnc=0 or CellGlobalIdentityCi=0 or LocationAreaCodes=0) and ObjectId LIKE 'AdjHand.$btsmgrid.0.%'";
|
||||
//echo $sqlstring . "<BR>";
|
||||
$result = mysql_query($sqlstring,$db) or
|
||||
die("Invalid query: $sqlstring\n" . mysqli_error($pubConn));
|
||||
$row = mysqli_fetch_row($result);
|
||||
echo "<HR size=1>\n";
|
||||
echo "<FORM name=neighbor_form>";
|
||||
echo "<INPUT type=button name=addneighbor value='{${$parameter}[addneighbor]}'" .
|
||||
" onClick='javascript:location.href=\"objects.php?" .
|
||||
"language=$language" .
|
||||
"&bssid=$bssid" .
|
||||
"&objectid=AdjHand.$btsmgrid.0.$row[0]" .
|
||||
(isset($x)?"&x=$x":"") .
|
||||
(isset($y)?"&y=$y":"") .
|
||||
"&tablename=OMCR_AdjHand" .
|
||||
"\"'>\n";
|
||||
|
||||
echo "<INPUT type=button name='add_neighbor_from_list' value='{${$parameter}[selneighbor]}'" .
|
||||
" onClick='javascript:location.href=\"adjhandlist.php?" .
|
||||
"language=$language" .
|
||||
"&bssid=$bssid" .
|
||||
"&objectid=AdjHand.$btsmgrid.0.$row[0]" .
|
||||
(isset($x)?"&x=$x":"") .
|
||||
(isset($y)?"&y=$y":"") .
|
||||
"&tablename=OMCR_AdjHand" .
|
||||
"\"'>\n";
|
||||
|
||||
echo "<INPUT type=hidden name='modified_data' value=''>\n";
|
||||
echo "<INPUT type=hidden name='bssid' value=$bssid>\n";
|
||||
echo "<INPUT type=hidden name='objectid' value=AdjHand.$btsmgrid.0.$row[0]>\n";
|
||||
echo "<INPUT type=hidden name='tablename' value=OMCR_AdjHand>\n";
|
||||
echo "</FORM>";
|
||||
}
|
||||
}
|
||||
?>
|
||||
</BODY>
|
||||
</HTML>
|
||||
46
wxc2_omc/configuration/bssomc/adjhandlist.inc
Executable file
@@ -0,0 +1,46 @@
|
||||
<?php
|
||||
$gbnamearray = Array(
|
||||
rowno => "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>",
|
||||
cellname => "С<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>",
|
||||
mcc => "<EFBFBD>ƶ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ҵ<EFBFBD><EFBFBD><EFBFBD>",
|
||||
mnc => "<EFBFBD>ƶ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>",
|
||||
cellid => "С<EFBFBD><EFBFBD>ʶ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>",
|
||||
lac => "λ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>",
|
||||
bcch => "BCCH",
|
||||
bsic => "<EFBFBD><EFBFBD>վʶ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>",
|
||||
neighbortype=> "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>С<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>",
|
||||
celltype => "С<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>",
|
||||
control => "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>",
|
||||
noneighbor => "û<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>С<EFBFBD><EFBFBD>",
|
||||
delete => "ɾ<EFBFBD><EFBFBD>",
|
||||
modify => "<EFBFBD>༭",
|
||||
activeonly => "active only",
|
||||
activeidle => "active+idle",
|
||||
idleonly => "idle only",
|
||||
title => "OMC<EFBFBD><EFBFBD><EFBFBD><EFBFBD>С<EFBFBD><EFBFBD><EFBFBD><EFBFBD>",
|
||||
back => "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>",
|
||||
addneighbor => "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>С<EFBFBD><EFBFBD>"
|
||||
);
|
||||
$engnamearray = Array(
|
||||
rowno => "NO.",
|
||||
cellname => "NAME",
|
||||
mcc => "MCC",
|
||||
mnc => "MNC",
|
||||
cellid => "CELL ID",
|
||||
lac => "LAC",
|
||||
bcch => "BCCH",
|
||||
bsic => "BSIC",
|
||||
neighbortype=> "NEIGHBOUR TYPE",
|
||||
celltype => "Cell Type",
|
||||
control => "CONTROL",
|
||||
noneighbor => "No Neighbour found",
|
||||
delete => "DELETE",
|
||||
modify => "MODIFY",
|
||||
activeonly => "DEDICATED MODE ONLY",
|
||||
activeidle => "DEDICATED & IDLE MODE",
|
||||
idleonly => "IDLE MODE ONLY",
|
||||
title => "Defined Neighbor List In OMC",
|
||||
back => "Back",
|
||||
addneighbor => "Add Neighbor"
|
||||
);
|
||||
?>
|
||||
202
wxc2_omc/configuration/bssomc/adjhandlist.php
Executable file
@@ -0,0 +1,202 @@
|
||||
<?php
|
||||
//
|
||||
// Created on: 17 Mar 2002
|
||||
// Usage : adjhandlist.php?bssid=0
|
||||
// [&language="eng|gb"]
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
?>
|
||||
<?php include("nocache.inc"); ?>
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<?php include("header.inc"); ?>
|
||||
</HEAD>
|
||||
<SCRIPT language="javascript" type="text/javascript">
|
||||
window.status = "";
|
||||
</SCRIPT>
|
||||
<BODY>
|
||||
|
||||
<?php
|
||||
if (!isset($language))
|
||||
$language = "eng";
|
||||
$parameter="{$language}namearray";
|
||||
if (!isset($bssid) || !isset($objectid))
|
||||
{
|
||||
echo "The required information for this page is invalid.<br>\n";
|
||||
echo "</BODY>\n</HTML>";
|
||||
exit();
|
||||
}
|
||||
|
||||
/************************************************
|
||||
* Retrieve the Bts Manager ID from object ID
|
||||
* AdjHand.11.0.12 --substr--> 11.0.12 --> 11
|
||||
************************************************/
|
||||
$btsmgrid = substr($objectid,8);
|
||||
if ($btsmgrid[1] == '.')
|
||||
{
|
||||
$btsmgrid=substr($btsmgrid,0,1);
|
||||
}
|
||||
else if ($btsmgrid[2] == '.')
|
||||
{
|
||||
$btsmgrid=substr($btsmgrid,0,2);
|
||||
}
|
||||
else
|
||||
{
|
||||
echo strlen($objectid) . "Error Object ID:" . $objectid . "\n";
|
||||
return 0;
|
||||
}
|
||||
|
||||
include("adjhandlist.inc");
|
||||
include("meta_table_type.inc");
|
||||
include("login_parm.inc");
|
||||
$db = mysql_connect($hostname, $username, $password);
|
||||
mysql_select_db($dbname,$db);
|
||||
//echo "<U><FONT color=#0000FF size=+3pt>=)AdjHand.$btsmgrid.0.*<FONT></U>";
|
||||
echo "<U><FONT color=#0000FF size=+3pt>{${$parameter}[title]}<FONT></U>";
|
||||
echo "<p>\n";
|
||||
|
||||
|
||||
/********************************************************
|
||||
* Step 1: Find out the next available Adjhand object ID
|
||||
********************************************************/
|
||||
$sqlstring = "select MIN(0+SUBSTRING_INDEX(ObjectId,'.',-1)) from OMCR_AdjHand where bssid=$bssid" .
|
||||
" and (BcchFrequency=-1 or CellGlobalIdentityLaiMcc=0" .
|
||||
" or CellGlobalIdentityLaiMnc=0 or CellGlobalIdentityCi=0 or LocationAreaCodes=0)" .
|
||||
" and ObjectId LIKE 'AdjHand.$btsmgrid.0.%'";
|
||||
//echo $sqlstring . "<BR>";
|
||||
$result = mysql_query($sqlstring,$db) or
|
||||
die("Invalid query: $sqlstring\n" . mysqli_error($pubConn));
|
||||
$row = mysqli_fetch_row($result);
|
||||
if ($row[0] == null)
|
||||
{
|
||||
echo "\nThere are no space for new neighbour cell.";
|
||||
return;
|
||||
}
|
||||
$new_neighbor_id = "AdjHand.$btsmgrid.0.$row[0]";
|
||||
mysql_free_result($result);
|
||||
|
||||
/************************************************
|
||||
* Step 2: Display the present neighbor list
|
||||
************************************************/
|
||||
|
||||
/************************************************
|
||||
* Generate the Neighbor cell list from SQL DB
|
||||
************************************************/
|
||||
$sqlstring = "CREATE TEMPORARY TABLE tmp SELECT t1.Label AS NAME," .
|
||||
"t1.MobileCountryCode AS MCC,t1.MobileNetworkCode AS MNC,t1.LocationAreaCode AS LAC," .
|
||||
"t1.CellIdentity AS CI,t1.CellAllocation_0 AS BCCH,t1.BsIdentityCode AS BSIC " .
|
||||
"FROM OMCR_Bts AS t1, OMCR_BSSTREE AS t2 WHERE " .
|
||||
"t2.Presence=1 AND t1.ObjectId=t2.ObjectId AND t1.ObjectId<>'Bts.$btsmgrid.0' AND " .
|
||||
"t1.MobileCountryCode>0 AND t1.MobileNetworkCode>0 AND t1.LocationAreaCode>0 AND " .
|
||||
"t1.CellIdentity>0 AND t1.CellAllocation_0>0 AND t1.BsIdentityCode>=0";
|
||||
//echo $sqlstring . "<BR>";
|
||||
$result = mysql_query($sqlstring,$db) or
|
||||
die("Invalid query: $sqlstring\n" . mysqli_error($pubConn));
|
||||
$sqlstring = "INSERT INTO tmp SELECT t1.Label AS NAME," .
|
||||
"t1.CellGlobalIdentityLaiMcc AS MCC,t1.CellGlobalIdentityLaiMnc AS MNC,t1.LocationAreaCodes AS LAC," .
|
||||
"t1.CellGlobalIdentityCi AS CI,t1.BcchFrequency AS BCCH,t1.BsIdentityCode AS BSIC " .
|
||||
"FROM OMCR_AdjHand AS t1, OMCR_BSSTREE AS t2 " .
|
||||
"WHERE t2.Presence=1 AND t1.ObjectId=t2.ObjectId AND " .
|
||||
"t1.ObjectId NOT LIKE 'AdjHand.$btsmgrid.0.%' AND t1.CellGlobalIdentityLaiMcc>0 AND " .
|
||||
"t1.CellGlobalIdentityLaiMnc>0 AND t1.LocationAreaCodes>0 AND " .
|
||||
"t1.CellGlobalIdentityCi>0 AND t1.BcchFrequency>0 AND t1.BsIdentityCode>=0";
|
||||
//echo $sqlstring . "<BR>";
|
||||
$result = mysql_query($sqlstring,$db) or
|
||||
die("Invalid query: $sqlstring\n" . mysqli_error($pubConn));
|
||||
$sqlstring = "SELECT DISTINCT * FROM tmp";
|
||||
//echo $sqlstring . "<BR>";
|
||||
$result = mysql_query($sqlstring,$db) or
|
||||
die("Invalid query: $sqlstring\n" . mysqli_error($pubConn));
|
||||
|
||||
/*
|
||||
$sqlstring = "select DISTINCT Label,CellGlobalIdentityLaiMcc,CellGlobalIdentityLaiMnc," .
|
||||
"LocationAreaCodes,CellGlobalIdentityCi,BcchFrequency,BsIdentityCode from OMCR_AdjHand " .
|
||||
"where BcchFrequency<>-1 and CellGlobalIdentityLaiMcc<>0 and CellGlobalIdentityLaiMnc<>0 " .
|
||||
"and CellGlobalIdentityCi<>0 and LocationAreaCodes<>0 and (bssid<>$bssid OR " .
|
||||
"(bssid=$bssid AND ObjectId NOT LIKE 'AdjHand.$btsmgrid.0.%')) ORDER BY CellGlobalIdentityCi";
|
||||
*/
|
||||
//echo $sqlstring . "<BR>";
|
||||
$result = mysql_query($sqlstring,$db) or
|
||||
die("Invalid query: $sqlstring\n" . mysqli_error($pubConn));
|
||||
$no_of_fields=mysql_num_fields($result);
|
||||
echo "<TABLE border=1 cellspacing=0 cellpadding=0" .
|
||||
"bordercolor=#000000 bordercolordark=#FFFFFF bordercolorlight=#000000 width=100%>\n";
|
||||
|
||||
echo "<TR>\n";
|
||||
echo "<TD width=15%>{${$parameter}[cellname]}</TD>\n";
|
||||
echo "<TD width=12%>{${$parameter}[mcc]}</TD>\n";
|
||||
echo "<TD width=11%>{${$parameter}[mnc]}</TD>\n";
|
||||
echo "<TD width=11%>{${$parameter}[lac]}</TD>\n";
|
||||
echo "<TD width=11%>{${$parameter}[cellid]}</TD>\n";
|
||||
echo "<TD width=11%>{${$parameter}[bcch]}</TD>\n";
|
||||
echo "<TD width=10%>{${$parameter}[bsic]}</TD>\n";
|
||||
echo "<TD width=19%>{${$parameter}[control]}</TD>\n";
|
||||
echo "</TR>\n";
|
||||
$num=0;
|
||||
while ( $row = mysqli_fetch_row($result) )
|
||||
{
|
||||
$num++;
|
||||
echo "<TR>\n";
|
||||
echo "<FORM action='modify.php'>\n";
|
||||
//echo "<TD>$num</TD>\n";
|
||||
echo "<INPUT type=hidden name=language value=$language>\n";
|
||||
echo "<INPUT type=hidden name=bssid value=$bssid>\n";
|
||||
echo "<INPUT type=hidden name=objectid value=$new_neighbor_id>\n";
|
||||
echo "<INPUT type=hidden name=Label value=\"" . rawurldecode($row[0]) . "\">\n";
|
||||
echo "<INPUT type=hidden name=CellGlobalIdentityLaiMcc value=$row[1]>\n";
|
||||
echo "<INPUT type=hidden name=CellGlobalIdentityLaiMnc value=$row[2]>\n";
|
||||
echo "<INPUT type=hidden name=LocationAreaCodes value=$row[3]>\n";
|
||||
echo "<INPUT type=hidden name=CellGlobalIdentityCi value=$row[4]>\n";
|
||||
echo "<INPUT type=hidden name=BcchFrequency value=$row[5]>\n";
|
||||
echo "<INPUT type=hidden name=BsIdentityCode value=$row[6]>\n";
|
||||
|
||||
echo "<INPUT type=hidden name=url value=adjhand.php>";
|
||||
echo "<INPUT type=hidden name=modified_data value=" .
|
||||
"Label,CellGlobalIdentityLaiMcc,CellGlobalIdentityLaiMnc," .
|
||||
"CellGlobalIdentityCi,LocationAreaCodes,BcchFrequency,BsIdentityCode" . ">\n";
|
||||
echo "<INPUT type=hidden name=tLabel value=" . STRINGS . ">\n";
|
||||
echo "<INPUT type=hidden name=tCellGlobalIdentityLaiMcc value=" . NUMBERS . ">\n";
|
||||
echo "<INPUT type=hidden name=tCellGlobalIdentityLaiMnc value=" . NUMBERS . ">\n";
|
||||
echo "<INPUT type=hidden name=tCellGlobalIdentityCi value=" . NUMBERS . ">\n";
|
||||
echo "<INPUT type=hidden name=tLocationAreaCodes value=" . NUMBERS . ">\n";
|
||||
echo "<INPUT type=hidden name=tBcchFrequency value=" . NUMBERS . ">\n";
|
||||
echo "<INPUT type=hidden name=tBsIdentityCode value=" . NUMBERS . ">\n";
|
||||
|
||||
echo "<TD>" . ($row[0]==''?"-":rawurldecode($row[0])) . "</TD>\n";
|
||||
echo "<TD>$row[1]</TD>\n";
|
||||
echo "<TD>$row[2]</TD>\n";
|
||||
echo "<TD>$row[3]</TD>\n";
|
||||
echo "<TD>$row[4]</TD>\n";
|
||||
echo "<TD>$row[5]</TD>\n";
|
||||
echo "<TD>$row[6]</TD>\n";
|
||||
echo "<TD><INPUT type=submit value={${$parameter}[addneighbor]}></TD>\n";
|
||||
echo "</FORM>\n";
|
||||
echo "</TR>\n";
|
||||
}
|
||||
if (mysqli_num_rows($result) == 0)
|
||||
{
|
||||
$no_of_fields += 1;
|
||||
echo "<TR><TD align=center colspan=$no_of_fields><FONT color=cyan>" .
|
||||
${$parameter}[noneighbor] . "</FONT></TD></TR>";
|
||||
}
|
||||
echo "</TABLE>";
|
||||
echo "<HR SIZE=1>\n";
|
||||
echo "<INPUT type=button name=back value='{${$parameter}[back]}'" .
|
||||
" onClick='javascript:location.href=\"adjhand.php?" .
|
||||
"language=$language" .
|
||||
"&bssid=$bssid" .
|
||||
"&objectid=AdjHand.$btsmgrid.0.0" .
|
||||
(isset($x)?"&x=$x":"") .
|
||||
(isset($y)?"&y=$y":"") .
|
||||
"\"'>\n";
|
||||
$sqlstring = "DROP TABLE tmp";
|
||||
//echo $sqlstring . "<BR>";
|
||||
$result = mysql_query($sqlstring,$db) or
|
||||
die("Invalid query: $sqlstring\n" . mysqli_error($pubConn));
|
||||
|
||||
?>
|
||||
</BODY>
|
||||
</HTML>
|
||||
42
wxc2_omc/configuration/bssomc/alarmevent.inc
Executable file
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
$gbnamearray = Array(
|
||||
go => "ȥ",
|
||||
bssid => "BSS<EFBFBD><EFBFBD><EFBFBD><EFBFBD>",
|
||||
objectid => "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>",
|
||||
description => "<EFBFBD>澯<EFBFBD><EFBFBD><EFBFBD><EFBFBD>",
|
||||
severity => "<EFBFBD>澯<EFBFBD>ȼ<EFBFBD>",
|
||||
eventtime => "<EFBFBD>澯ʱ<EFBFBD><EFBFBD>",
|
||||
cleartime => "<EFBFBD>澯<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><EFBFBD>",
|
||||
pages => "ҳ",
|
||||
record => "<EFBFBD><EFBFBD>",
|
||||
total => "<EFBFBD>Ϲ<EFBFBD>",
|
||||
back => "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>",
|
||||
remove => "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>",
|
||||
clear => "<EFBFBD>澯<EFBFBD><EFBFBD><EFBFBD><EFBFBD>",
|
||||
critical => "һ<EFBFBD><EFBFBD><EFBFBD>澯",
|
||||
major => "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>澯",
|
||||
minor => "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>澯",
|
||||
note => "ע<EFBFBD><EFBFBD>ֻ<EFBFBD><EFBFBD>ʾһСʱ֮<EFBFBD>ڼ<EFBFBD>δ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>֮<EFBFBD>澯<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>鿴<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>澯<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѡ<EFBFBD><EFBFBD><EFBFBD>ʺϵĹ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>",
|
||||
norecord => "-- <20>Ҳ<EFBFBD><D2B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ؼ<EFBFBD>¼ --"
|
||||
);
|
||||
$engnamearray = Array(
|
||||
go => "GO",
|
||||
bssid => "BSS ID",
|
||||
objectid => "OBJECT ID",
|
||||
description => "DESCRIPTION",
|
||||
severity => "SEVERITY",
|
||||
eventtime => "EVENT TIME",
|
||||
cleartime => "CLEAR TIME",
|
||||
pages => "PAGES",
|
||||
record => "RECORDS",
|
||||
total => "TOTAL",
|
||||
back => "Back",
|
||||
remove => "REMOVE",
|
||||
clear => "CLEARED",
|
||||
critical => "CRITICAL",
|
||||
major => "MAJOR",
|
||||
minor => "MINOR",
|
||||
note => "Note: Only show alarm that is not clear or within 1 hour. Use alarm filter for more events.",
|
||||
norecord => "-- No Record Found --"
|
||||
);
|
||||
?>
|
||||
376
wxc2_omc/configuration/bssomc/alarmevent.php
Executable file
@@ -0,0 +1,376 @@
|
||||
<?php
|
||||
//
|
||||
// Created on:
|
||||
// Usage: alarmevent.php
|
||||
// alarmevent.php?language="eng|gb"
|
||||
// [&bssid=0]
|
||||
// [&perBssid=XXX]
|
||||
// [&perSeverity=XXX]
|
||||
// [&perObjectid=XXX]
|
||||
// [&perStartPeriod=XXX]
|
||||
// [&perEndPeriod=XXX]
|
||||
//
|
||||
// The following is used for alarm clearing
|
||||
// [&rmBssid=XXX]
|
||||
// [&rmObjectid=XXX]
|
||||
// [&rmEventtime=XXX]
|
||||
//
|
||||
// The following is used for page display
|
||||
// [&offset=XXX]
|
||||
//
|
||||
// The following is used for displaying a specific signaling element
|
||||
// [&perSignal_Element=XXX]
|
||||
//
|
||||
// Function: Display alarm from offset to offset+stepsize
|
||||
// Stepsize for each page ($stepsize) is default to 13
|
||||
//
|
||||
// Filter : Support filter per bssid, objectid, event time and severity
|
||||
//
|
||||
// MySQL table involved: OMCR_ALARMEVENT
|
||||
//
|
||||
?>
|
||||
<?php
|
||||
include("nocache.inc");
|
||||
include("alarmevent.inc");
|
||||
if (!isset($language))
|
||||
$language="eng";
|
||||
$parameter = "${language}namearray"; // use of variable variables
|
||||
include("login_parm.inc");
|
||||
$stepsize=13;
|
||||
|
||||
$db = mysql_connect($hostname, $username, $password);
|
||||
mysql_select_db($dbname,$db);
|
||||
|
||||
if (isset($rmBssid) && isset($rmObjectid) && isset($rmEventtime))
|
||||
{
|
||||
//
|
||||
// Clear this alarm in OMCR_ALARMEVENT and OMCR_BSSTREE
|
||||
//
|
||||
$sqlstring = "UPDATE OMCR_ALARMEVENT SET Severity=0, ClearTime=NOW()" .
|
||||
" WHERE bssid=$rmBssid" .
|
||||
" AND ObjectId='$rmObjectid'" .
|
||||
" AND EventTime='$rmEventtime'";
|
||||
echo $sqlstring . "<BR><br>";
|
||||
$result = mysql_query($sqlstring,$db) or
|
||||
die("Invalid query: $sqlstring\n" . mysqli_error($pubConn));
|
||||
|
||||
$sqlstring = "SELECT min(Severity) FROM OMCR_ALARMEVENT" .
|
||||
" WHERE bssid=$rmBssid" .
|
||||
" AND ObjectId='$rmObjectid'" .
|
||||
" AND Severity>0 AND Severity<=3";
|
||||
echo $sqlstring . "<BR><br>";
|
||||
$result = mysql_query($sqlstring,$db) or
|
||||
die("Invalid query: $sqlstring\n" . mysqli_error($pubConn));
|
||||
$row = mysqli_fetch_row($result);
|
||||
|
||||
if ( $row[0] == null ) // All alarm cleared
|
||||
$row[0] = 0;
|
||||
|
||||
$sqlstring = "UPDATE OMCR_BSSTREE SET MaxSeverity=" . $row[0] .
|
||||
" WHERE bssid=$rmBssid" .
|
||||
" AND ObjectId='$rmObjectid'";
|
||||
echo $sqlstring . "<BR>";
|
||||
$result = mysql_query($sqlstring,$db) or
|
||||
die("Invalid query: $sqlstring\n" . mysqli_error($pubConn));
|
||||
|
||||
header("Location: " .
|
||||
"alarmevent.php?" .
|
||||
"language=$language" .
|
||||
(isset($bssid)? "&bssid=$bssid":"") .
|
||||
(isset($perBssid)? "&perBssid=$perBssid":"") .
|
||||
(isset($perSeverity)? "&perSeverity=$perSeverity":"") .
|
||||
(isset($perObjectid)? "&perObjectid=$perObjectid":"") .
|
||||
(isset($perStartPeriod)? "&perStartPeriod=$perStartPeriod":"") .
|
||||
(isset($perEndPeriod)? "&perEndPeriod=$perEndPeriod":"") .
|
||||
(isset($perSignal_Element)? "&perSignal_Element=$perSignal_Element":"") .
|
||||
"&offset=$offset"
|
||||
//"&offset=" . ($offset-$stepsize)
|
||||
);
|
||||
}
|
||||
?>
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<META HTTP-EQUIV="Refresh" content="60">
|
||||
<?php include("header.inc"); ?>
|
||||
<SCRIPT language="JavaScript" type="text/javascript">
|
||||
<!--
|
||||
function show_status(status, alarm)
|
||||
{
|
||||
if (typeof(status) == "undefined" );
|
||||
}
|
||||
|
||||
|
||||
function go_to_webpage(myForm)
|
||||
{
|
||||
if (myForm.gotopage.value == '')
|
||||
myForm.gotopage.value = 1;
|
||||
else if (myForm.gotopage.value <= 0)
|
||||
myForm.gotopage.value = 1;
|
||||
|
||||
<?php
|
||||
echo "window.location.href=\"alarmevent.php?language=$language";
|
||||
echo (isset($bssid)? "&bssid=$bssid":"") .
|
||||
(isset($perBssid)? "&perBssid=$perBssid":"") .
|
||||
(isset($perSeverity)? "&perSeverity=$perSeverity":"") .
|
||||
(isset($perObjectid)? "&perObjectid=$perObjectid":"") .
|
||||
(isset($perStartPeriod)? "&perStartPeriod=$perStartPeriod":"") .
|
||||
(isset($perEndPeriod)? "&perEndPeriod=$perEndPeriod":"");
|
||||
echo "&offset=\" + $stepsize * (myForm.gotopage.value - 1);";
|
||||
?>
|
||||
|
||||
}
|
||||
//-->
|
||||
</SCRIPT>
|
||||
<TITLE> ALARM EVENT </TITLE>
|
||||
</HEAD>
|
||||
<BODY onLoad='show_status("<?=$status?>","<?=$alarm?>");'>
|
||||
<FORM name='alarmtable' method=post
|
||||
onSubmit='return submit_form(this.document.alarmtable)'>
|
||||
<?php
|
||||
|
||||
$alarm_to_show=2; // =SV_MAJOR
|
||||
$status="";
|
||||
|
||||
if (!isset($offset))
|
||||
{
|
||||
$offset = 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* Create string like "ObjectId=Trx.1.0.4 OR ObjectId=Bts.1.0" from Signal_Element
|
||||
*/
|
||||
if (isset($perSignal_Element))
|
||||
{
|
||||
$sqlstring = "SELECT DISTINCT ObjectId FROM OMCR_BSSTREE WHERE Signal_Element=$perSignal_Element";
|
||||
$result = mysql_query($sqlstring,$db) or
|
||||
die("Invalid query: $sqlstring\n" . mysqli_error($pubConn));
|
||||
|
||||
$firstterm=0;
|
||||
while ( list($objects) = mysqli_fetch_row($result) )
|
||||
{
|
||||
if ($firstterm)
|
||||
$XXX .= " OR ";
|
||||
else
|
||||
$XXX = "";
|
||||
|
||||
$XXX .= "t1.ObjectId='$objects'";
|
||||
$firstterm++;
|
||||
}
|
||||
|
||||
mysql_free_result($result);
|
||||
}
|
||||
|
||||
$sqlstring = "SELECT t1.bssid,t1.ObjectId," .
|
||||
"t2." . $language . "EventInfo," .
|
||||
"t1.Severity,t1.EventTime," .
|
||||
"t1.ClearTime," .
|
||||
"t1.Cause " .
|
||||
" FROM OMCR_ALARMEVENT AS t1, OMCR_ALARMCODE AS t2" .
|
||||
" WHERE t1.GlobalEventNumber>0" .
|
||||
(isset($perBssid)?" AND t1.bssid=$perBssid":"") .
|
||||
(isset($perObjectid)?" AND t1.ObjectId REGEXP '$perObjectid'":"") .
|
||||
(isset($perSeverity)?" AND t1.Severity$perSeverity":"") .
|
||||
(isset($perStartPeriod)?" AND t1.EventTime>='$perStartPeriod'":"") .
|
||||
(isset($perEndPeriod)? " AND t1.EventTime<='$perEndPeriod'":"") .
|
||||
(
|
||||
( isset($perBssid) || isset($perObjectid) ||
|
||||
isset($perSeverity) ||
|
||||
isset($perStartPeriod) || isset($perEndPeriod)
|
||||
)? "":" AND (t1.Severity>0 OR t1.ClearTime >= NOW()-INTERVAL 60 MINUTE)"
|
||||
) .
|
||||
(isset($XXX)? " AND ($XXX)":"") .
|
||||
" AND t1.Severity <= $alarm_to_show AND t1.Cause = t2.Cause ";
|
||||
|
||||
|
||||
//echo $sqlstring . "<BR>";
|
||||
$result = mysql_query($sqlstring,$db) or
|
||||
die("Invalid query: $sqlstring\n" . mysqli_error($pubConn));
|
||||
|
||||
$no_of_records=mysqli_num_rows($result);
|
||||
|
||||
echo "<TABLE border=1 cellspacing=0 cellpadding=0 bordercolor=#000000 " .
|
||||
"bordercolordark=#FFFFFF bordercolorlight=#000000 width=100%>\n";
|
||||
echo "<TR>\n";
|
||||
echo "<TD width=20%>\n";
|
||||
echo ${$parameter}[total] . ": " .$no_of_records . " " . ${$parameter}[record];
|
||||
echo "</TD>\n";
|
||||
echo "<TD width=20%>\n";
|
||||
echo "$stepsize " . ${$parameter}[record] . "/" . ${$parameter}[pages];
|
||||
echo "</TD>\n";
|
||||
echo "<TD width=30%>\n";
|
||||
if ($no_of_records)
|
||||
echo (floor($offset/$stepsize) + 1) . "/" .
|
||||
(ceil($no_of_records/$stepsize)) . " " . ${$parameter}[pages];
|
||||
else
|
||||
echo "0/0 " . ${$parameter}[pages];
|
||||
echo "</TD>\n";
|
||||
echo "<TD width=30%> ";
|
||||
echo "<INPUT type=button value={${$parameter}[go]} onClick='go_to_webpage(this.document.alarmtable);'>";
|
||||
echo "<INPUT type=TEXT name=gotopage size=4> ";
|
||||
echo "{${$parameter}[pages]}   ";
|
||||
|
||||
if ($offset > $stepsize-1)
|
||||
{
|
||||
echo "<A href=\"alarmevent.php?" .
|
||||
"language=$language" .
|
||||
(isset($bssid)? "&bssid=$bssid":"") .
|
||||
(isset($perBssid)? "&perBssid=$perBssid":"") .
|
||||
(isset($perSeverity)? "&perSeverity=$perSeverity":"") .
|
||||
(isset($perObjectid)? "&perObjectid=$perObjectid":"") .
|
||||
(isset($perStartPeriod)? "&perStartPeriod=$perStartPeriod":"") .
|
||||
(isset($perEndPeriod)? "&perEndPeriod=$perEndPeriod":"") .
|
||||
(isset($perSignal_Element)? "&perSignal_Element=$perSignal_Element":"") .
|
||||
"&offset=" . ($offset-$stepsize) . "\">";
|
||||
echo "<IMG align=absbottom src='images/st_minus.gif'>";
|
||||
echo "</A>\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "<A href=\"alarmevent.php?" .
|
||||
"language=$language" .
|
||||
(isset($bssid)? "&bssid=$bssid":"") .
|
||||
(isset($perBssid)? "&perBssid=$perBssid":"") .
|
||||
(isset($perSeverity)? "&perSeverity=$perSeverity":"") .
|
||||
(isset($perObjectid)? "&perObjectid=$perObjectid":"") .
|
||||
(isset($perStartPeriod)? "&perStartPeriod=$perStartPeriod":"") .
|
||||
(isset($perEndPeriod)? "&perEndPeriod=$perEndPeriod":"") .
|
||||
(isset($perSignal_Element)? "&perSignal_Element=$perSignal_Element":"") .
|
||||
"&offset=" . $offset . "\">";
|
||||
echo "<IMG align=absbottom src='images/gt_minus.gif'>";
|
||||
echo "</A>\n";
|
||||
}
|
||||
if ($no_of_records > $offset + $stepsize)
|
||||
{
|
||||
echo "<A href=\"alarmevent.php?" .
|
||||
"language=$language" .
|
||||
(isset($bssid)? "&bssid=$bssid":"") .
|
||||
(isset($perBssid)? "&perBssid=$perBssid":"") .
|
||||
(isset($perSeverity)? "&perSeverity=$perSeverity":"") .
|
||||
(isset($perObjectid)? "&perObjectid=$perObjectid":"") .
|
||||
(isset($perStartPeriod)? "&perStartPeriod=$perStartPeriod":"") .
|
||||
(isset($perEndPeriod)? "&perEndPeriod=$perEndPeriod":"") .
|
||||
(isset($perSignal_Element)? "&perSignal_Element=$perSignal_Element":"") .
|
||||
"&offset=" . ($offset+$stepsize) . "\">";
|
||||
echo "<IMG align=absbottom src='images/minus_gt.gif'>";
|
||||
echo "</A>\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "<A href=\"alarmevent.php?" .
|
||||
"language=$language" .
|
||||
(isset($bssid)? "&bssid=$bssid":"") .
|
||||
(isset($perBssid)? "&perBssid=$perBssid":"") .
|
||||
(isset($perSeverity)? "&perSeverity=$perSeverity":"") .
|
||||
(isset($perObjectid)? "&perObjectid=$perObjectid":"") .
|
||||
(isset($perStartPeriod)? "&perStartPeriod=$perStartPeriod":"") .
|
||||
(isset($perEndPeriod)? "&perEndPeriod=$perEndPeriod":"") .
|
||||
(isset($perSignal_Element)? "&perSignal_Element=$perSignal_Element":"") .
|
||||
"&offset=" . $offset . "\">";
|
||||
echo "<IMG align=absbottom src='images/minus_st.gif'>";
|
||||
echo "</A>\n";
|
||||
}
|
||||
echo "</TD>\n";
|
||||
echo "</TR>\n";
|
||||
echo "<TR><TD colspan=4>\n";
|
||||
|
||||
//
|
||||
// Only show alarm with Severity <= $alarm_to_show
|
||||
if ($offset >= 0)
|
||||
{
|
||||
$sqlstring .= "ORDER BY EventTime DESC,GlobalEventNumber DESC LIMIT $offset,$stepsize";
|
||||
}
|
||||
else
|
||||
{
|
||||
$sqlstring .= "ORDER BY EventTime DESC,GlobalEventNumber DESC LIMIT 0," .
|
||||
($stepsize+$offset);
|
||||
}
|
||||
|
||||
//echo $sqlstring . "<BR>";
|
||||
$result = mysql_query($sqlstring,$db) or
|
||||
die("Invalid query: $sqlstring\n" . mysqli_error($pubConn));
|
||||
|
||||
$no_of_fields = mysql_num_fields($result);
|
||||
|
||||
echo "<TABLE border=1 cellspacing=0 cellpadding=0 bordercolor=#000000 " .
|
||||
"bordercolordark=#FFFFFF bordercolorlight=#000000 width=100%>\n";
|
||||
echo "<TR>\n";
|
||||
echo "<TD nowrap height=30 bgcolor=#D0D0D0>{${$parameter}[bssid]}</TD>\n";
|
||||
echo "<TD nowrap height=30 bgcolor=#D0D0D0>{${$parameter}[objectid]}</TD>\n";
|
||||
echo "<TD nowrap height=30 bgcolor=#D0D0D0>{${$parameter}[description]}</TD>\n";
|
||||
echo "<TD nowrap height=30 bgcolor=#D0D0D0>{${$parameter}[severity]}</TD>\n";
|
||||
echo "<TD nowrap height=30 bgcolor=#D0D0D0>{${$parameter}[eventtime]}</TD>\n";
|
||||
echo "<TD nowrap height=30 bgcolor=#D0D0D0>{${$parameter}[cleartime]}</TD>\n";
|
||||
echo "<TD nowrap height=30 bgcolor=#D0D0D0>- -</TD>\n";
|
||||
echo "</TR>\n";
|
||||
|
||||
while ( $row = mysqli_fetch_row($result) )
|
||||
{
|
||||
list($mybssid,$myobjectid,$myeventinfo,$myseverity,
|
||||
$myeventtime,$mycleartime, $cause)=$row;
|
||||
echo "<TR>";
|
||||
for ($i=0;$i<$no_of_fields;$i++)
|
||||
{
|
||||
if (!strcmp(mysql_field_name($result, $i),"Severity"))
|
||||
{
|
||||
$severity_field_no = $i;
|
||||
echo "<TD height=30>";
|
||||
switch ($row[$i])
|
||||
{
|
||||
case 0: echo ${$parameter}[clear] . "</TD>\n";
|
||||
break;
|
||||
case 1: echo "<FONT color=#FF0000>" .
|
||||
${$parameter}[critical] . "</FONT></TD>\n";
|
||||
break;
|
||||
case 2: echo "<FONT color=#FFA500>" .
|
||||
${$parameter}[major] . "</FONT></TD>\n";
|
||||
break;
|
||||
case 3: echo ${$parameter}[minor] . "</TD>\n";
|
||||
break;
|
||||
case 4: echo ${$parameter}[minor] . "</TD>\n";
|
||||
break;
|
||||
default: echo $row[$i] . "</TD>\n";
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if (!strcmp(mysql_field_name($result, $i),"Cause"))
|
||||
{
|
||||
// Not need to display
|
||||
}
|
||||
else // Is not Severity or Cause
|
||||
{
|
||||
printf("<TD height=30>%s</TD>\n",(isset($row[$i])? $row[$i]:"-"));
|
||||
}
|
||||
} // end_of_for ()
|
||||
|
||||
// Manual clear button for non-clear alarm
|
||||
if ($row[$severity_field_no] > 0)
|
||||
echo "<TD title=$cause><INPUT type=button value='{${$parameter}[remove]}'" .
|
||||
" onClick='javascript:window.location.href=\"alarmevent.php?" .
|
||||
"language=$language" .
|
||||
(isset($bssid)? "&bssid=$bssid":"") .
|
||||
(isset($perBssid)? "&perBssid=$perBssid":"") .
|
||||
(isset($perSeverity)? "&perSeverity=$perSeverity":"") .
|
||||
(isset($perObjectid)? "&perObjectid=$perObjectid":"") .
|
||||
(isset($perStartPeriod)? "&perStartPeriod=$perStartPeriod":"") .
|
||||
(isset($perEndPeriod)? "&perEndPeriod=$perEndPeriod":"") .
|
||||
(isset($perSignal_Element)? "&perSignal_Element=$perSignal_Element":"") .
|
||||
"&offset=" . $offset .
|
||||
"&rmBssid=" . $mybssid .
|
||||
"&rmObjectid=" . $myobjectid .
|
||||
"&rmEventtime=" . $myeventtime .
|
||||
"\"'></TD>";
|
||||
else
|
||||
echo "<TD title=$cause>-</TD>";
|
||||
echo "</TR>\n";
|
||||
}
|
||||
echo "</TABLE>\n";
|
||||
if (mysqli_num_rows($result) == 0)
|
||||
echo "<BR><CENTER><FONT color=cyan>{${$parameter}[norecord]}</FONT></CENTER><BR>";
|
||||
echo "</TD>\n";
|
||||
echo "</TR>\n";
|
||||
echo "</TABLE>\n";
|
||||
echo "<FONT color=cyan>{${$parameter}[note]}</FONT>\n";
|
||||
mysql_free_result($result);
|
||||
?>
|
||||
</BODY>
|
||||
</HTML>
|
||||
32
wxc2_omc/configuration/bssomc/alarmfilter.inc
Executable file
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
$gbnamearray = Array(
|
||||
bssid => "BSS <20><><EFBFBD><EFBFBD>",
|
||||
objectid => "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>",
|
||||
severity => "<EFBFBD>澯<EFBFBD>ȼ<EFBFBD>",
|
||||
startperiod=> "<EFBFBD><EFBFBD>ʼʱ<EFBFBD><EFBFBD>",
|
||||
endperiod => "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><EFBFBD>",
|
||||
find => "<EFBFBD>鿴",
|
||||
back => "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>",
|
||||
clear => "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>",
|
||||
unclear => "δ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>",
|
||||
all => "δ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>",
|
||||
critical => "һ<EFBFBD><EFBFBD><EFBFBD>澯",
|
||||
major => "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>澯",
|
||||
minor => "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>澯"
|
||||
);
|
||||
$engnamearray = Array(
|
||||
bssid => "BSS ID",
|
||||
objectid => "OBJECT ID",
|
||||
severity => "SEVERITY",
|
||||
startperiod=> "START TIME",
|
||||
endperiod => "END TIME",
|
||||
find => "FIND",
|
||||
back => "BACK",
|
||||
clear => "CLEARED",
|
||||
unclear => "UNCLEAR",
|
||||
all => "ALL",
|
||||
critical => "CRITICAL",
|
||||
major => "MAJOR",
|
||||
minor => "MINOR"
|
||||
);
|
||||
?>
|
||||
92
wxc2_omc/configuration/bssomc/alarmfilter.php
Executable file
@@ -0,0 +1,92 @@
|
||||
<?php
|
||||
//
|
||||
// Created on: 15 Mar 2001
|
||||
// Usage : alarmfilter.php?language="eng|gb"&bssid=3
|
||||
//
|
||||
// Function : Display the filter options
|
||||
//
|
||||
//
|
||||
?>
|
||||
<?php
|
||||
include("nocache.inc");
|
||||
include("alarmfilter.inc");
|
||||
if (!isset($language))
|
||||
$language="eng";
|
||||
$parameter="${language}namearray";
|
||||
$curr_time = date("Y-m-d H:i:s",time());
|
||||
?>
|
||||
<HTML>
|
||||
<?include("header.inc");?>
|
||||
<HEAD>
|
||||
<SCRIPT language="JavaScript" type="text/javascript">
|
||||
<!--
|
||||
function alarmfind()
|
||||
{
|
||||
var perbssid=document.alarmfilterform.perbssid.value;
|
||||
|
||||
url="alarmevent.php?language=<?=$language?>";
|
||||
if ((perbssid < 12) && (perbssid >= 0) && ( document.alarmfilterform.perbssid.value != '' ))
|
||||
url += "&perBssid=" + document.alarmfilterform.perbssid.value;
|
||||
else
|
||||
document.alarmfilterform.perbssid.value='';
|
||||
if ( document.alarmfilterform.perobjectid.value != '' )
|
||||
url += "&perObjectid=" + document.alarmfilterform.perobjectid.value;
|
||||
if ( document.alarmfilterform.perseverity.value != '' )
|
||||
url += "&perSeverity=" + document.alarmfilterform.perseverity.value;
|
||||
if (( document.alarmfilterform.perstartperiod.value != '<?=$curr_time?>' ) ||
|
||||
( document.alarmfilterform.perendperiod.value != '<?=$curr_time?>' ))
|
||||
{
|
||||
url += "&perStartPeriod=" + document.alarmfilterform.perstartperiod.value;
|
||||
url += "&perEndPeriod=" + document.alarmfilterform.perendperiod.value;
|
||||
}
|
||||
parent.bottom.location.href=url;
|
||||
}
|
||||
//-->
|
||||
</SCRIPT>
|
||||
</HEAD>
|
||||
<TABLE border=1 cellpadding=0 cellspacing=0
|
||||
bordercolor=#000000 bordercolordark=#FFFFFF bordercolorlight=#000000 width=100%>
|
||||
<FORM name=alarmfilterform>
|
||||
<TR>
|
||||
<TD> <?=${$parameter}[bssid]?><br>
|
||||
<INPUT type=text name=perbssid size=2>
|
||||
</TD>
|
||||
<TD> <?=${$parameter}[objectid]?>(e.g Bts.*.0)<br>
|
||||
<INPUT type=text name=perobjectid size=12>
|
||||
</TD>
|
||||
<TD> <?=${$parameter}[severity]?><br>
|
||||
<SELECT name=perseverity>
|
||||
<OPTION selected></OPTION>
|
||||
<OPTION value='=1'> <?=${$parameter}[critical]?> </OPTION>
|
||||
<OPTION value='=2'> <?=${$parameter}[major]?> </OPTION>
|
||||
<!--OPTION value='=3'> <?=${$parameter}[minor]?> </OPTION-->
|
||||
<OPTION value='=0'> <?=${$parameter}[clear]?> </OPTION>
|
||||
<OPTION value='>0'> <?=${$parameter}[unclear]?> </OPTION>
|
||||
<OPTION value='>=0'> <?=${$parameter}[all]?> </OPTION>
|
||||
</SELECT>
|
||||
</TD>
|
||||
<TD> <?=${$parameter}[startperiod]?><br>
|
||||
<!--INPUT type=text name=perstartperiod size=19 value='2001-01-01 00:00:00'-->
|
||||
<INPUT type=text name=perstartperiod size=19 value='<?=$curr_time?>'>
|
||||
</TD>
|
||||
<TD> <?=${$parameter}[endperiod]?><br>
|
||||
<INPUT type=text name=perendperiod size=19 value='<?=$curr_time?>'>
|
||||
</TD>
|
||||
<TD><BR>
|
||||
<?php
|
||||
echo "<INPUT type=button value='{${$parameter}[find]}' " .
|
||||
"onClick='javascript:alarmfind()'>";
|
||||
if (isset($bssid))
|
||||
echo "<INPUT type=button value='{${$parameter}[back]}' " .
|
||||
"onClick='javascript:parent.location.href=" .
|
||||
"\"modifyBssParam.php?language=$language&bssid=$bssid\"'>";
|
||||
else
|
||||
echo "<INPUT type=button value='{${$parameter}[back]}' " .
|
||||
"onClick='javascript:parent.location.href=" .
|
||||
"\"GUI/PACS OMC_files/sys_status_index_files/sys_status_down.html\"'>";
|
||||
?>
|
||||
</TD>
|
||||
</TR>
|
||||
</FORM>
|
||||
</TABLE>
|
||||
</HTML>
|
||||
49
wxc2_omc/configuration/bssomc/alarmframe.php
Executable file
@@ -0,0 +1,49 @@
|
||||
<?php
|
||||
//
|
||||
// Created on: 15 Mar 2001
|
||||
// Usage : alarmframe.php?language="eng|gb"&bssid=0
|
||||
//
|
||||
// Function : Contain the alarmfilter.php and alarmevent.php frame
|
||||
//
|
||||
// alarmframe.php ___ alarmfilter.php(upper)
|
||||
// \__ alarmevent.php (bottom)
|
||||
//
|
||||
?>
|
||||
<?php
|
||||
include("nocache.inc");
|
||||
if (!isset($language))
|
||||
$language="eng";
|
||||
?>
|
||||
<html>
|
||||
<head>
|
||||
</head>
|
||||
<frameset rows="16%,*" frameborder=no border=0 framespacing=0>
|
||||
<frame frameborder=no framespacing=0 name=contents noresize target='upper'
|
||||
src='alarmfilter.php?language=<?=$language?>&bssid=<?=$bssid?>'>;
|
||||
<?php
|
||||
/*
|
||||
* Transfer filter parameters to alarmevent.php
|
||||
*/
|
||||
echo "<frame frameborder=no framespacing=0 name=bottom src=alarmevent.php?language=$language&bssid=$bssid";
|
||||
if (isset($perBssid))
|
||||
echo "&perBssid=$perBssid";
|
||||
if (isset($perSeverity))
|
||||
echo htmlspecialchars("&perSeverity=$perSeverity");
|
||||
if (isset($perObjectid))
|
||||
echo "&perObjectid=$perObjectid";
|
||||
if (isset($perStartPeriod))
|
||||
echo "&perStartPeriod=$perStartPeriod";
|
||||
if (isset($perEndPeriod))
|
||||
echo "&perEndPeriod=$perEndPeriod";
|
||||
if (isset($perSignal_Element))
|
||||
echo "&perSignal_Element=$perSignal_Element";
|
||||
echo ">";
|
||||
?>
|
||||
<noframes>
|
||||
<body>
|
||||
<p>This page uses frames, but your browser doesn't support them.</p>
|
||||
</body>
|
||||
</noframes>
|
||||
</frameset>
|
||||
</frameset>
|
||||
</html>
|
||||
294
wxc2_omc/configuration/bssomc/alarmimage.inc
Executable file
@@ -0,0 +1,294 @@
|
||||
<?php
|
||||
//
|
||||
// Created on: 22 Feb 2001
|
||||
//
|
||||
// Remarks : define the image to show on bssstatus.php with the following numbers
|
||||
// .-----.-----.-----.
|
||||
// | 100 | 200 | 300 |
|
||||
// .-----+-----+-----.
|
||||
// | 110 | 210 | 310 |
|
||||
// . ................
|
||||
//
|
||||
?>
|
||||
<?php
|
||||
$img000_up ="<IMG border=0 src=images/bsciwp_up.gif>";
|
||||
$img000_down="<IMG border=0 src=images/bsciwp_down.gif>";
|
||||
$img000_warn="<IMG border=0 src=images/bsciwp_warn.gif>";
|
||||
$img010_up ="<IMG border=0 src=images/card1_up.gif>";
|
||||
$img010_down="<IMG border=0 src=images/card1_down.gif>";
|
||||
$img010_warn="<IMG border=0 src=images/card1_warn.gif>";
|
||||
$img020_up ="<IMG border=0 src=images/card2_up.gif>";
|
||||
$img020_down="<IMG border=0 src=images/card2_down.gif>";
|
||||
$img020_warn="<IMG border=0 src=images/card2_warn.gif>";
|
||||
$img030_up ="<IMG border=0 src=images/card3_up.gif>";
|
||||
$img030_down="<IMG border=0 src=images/card3_down.gif>";
|
||||
$img030_warn="<IMG border=0 src=images/card3_warn.gif>";
|
||||
$img040_up ="<IMG border=0 src=images/card4_up.gif>";
|
||||
$img040_down="<IMG border=0 src=images/card4_down.gif>";
|
||||
$img040_warn="<IMG border=0 src=images/card4_warn.gif>";
|
||||
$img050_up ="<IMG border=0 src=images/card5_up.gif>";
|
||||
$img050_down="<IMG border=0 src=images/card5_down.gif>";
|
||||
$img050_warn="<IMG border=0 src=images/card5_warn.gif>";
|
||||
$img060_up ="<IMG border=0 src=images/card6_up.gif>";
|
||||
$img060_down="<IMG border=0 src=images/card6_down.gif>";
|
||||
$img060_warn="<IMG border=0 src=images/card6_warn.gif>";
|
||||
$img070_up ="<IMG border=0 src=images/card7_up.gif>";
|
||||
$img070_down="<IMG border=0 src=images/card7_down.gif>";
|
||||
$img070_warn="<IMG border=0 src=images/card7_warn.gif>";
|
||||
$img080_up ="<IMG border=0 src=images/card8_up.gif>";
|
||||
$img080_down="<IMG border=0 src=images/card8_down.gif>";
|
||||
$img080_warn="<IMG border=0 src=images/card8_warn.gif>";
|
||||
|
||||
$img011_up ="<IMG border=0 src=images/aif0_up.gif>";
|
||||
$img011_down="<IMG border=0 src=images/aif0_down.gif>";
|
||||
$img011_warn="<IMG border=0 src=images/aif0_warn.gif>";
|
||||
$img012_up ="<IMG border=0 src=images/aif1_up.gif>";
|
||||
$img012_down="<IMG border=0 src=images/aif1_down.gif>";
|
||||
$img012_warn="<IMG border=0 src=images/aif1_warn.gif>";
|
||||
|
||||
//$img021_up ="<IMG border=0 src=images/abis0_up.gif>";
|
||||
//$img021_down="<IMG border=0 src=images/abis0_down.gif>";
|
||||
//$img021_warn="<IMG border=0 src=images/abis0_warn.gif>";
|
||||
//$img022_up ="<IMG border=0 src=images/abis1_up.gif>";
|
||||
//$img022_down="<IMG border=0 src=images/abis1_down.gif>";
|
||||
//$img022_warn="<IMG border=0 src=images/abis1_warn.gif>";
|
||||
|
||||
//$img030_up ="<IMG border=0 src=images/trx4_up.gif>";
|
||||
//$img030_down="<IMG border=0 src=images/trx4_down.gif>";
|
||||
//$img030_warn="<IMG border=0 src=images/trx4_warn.gif>";
|
||||
//$img040_up ="<IMG border=0 src=images/trx6_up.gif>";
|
||||
//$img040_down="<IMG border=0 src=images/trx6_down.gif>";
|
||||
//$img040_warn="<IMG border=0 src=images/trx6_warn.gif>";
|
||||
|
||||
$img100_up ="<IMG border=0 src=images/btsiwp_up.gif>";
|
||||
$img100_down="<IMG border=0 src=images/btsiwp_down.gif>";
|
||||
$img100_warn="<IMG border=0 src=images/btsiwp_warn.gif>";
|
||||
$img110_up ="<IMG border=0 src=images/card1_up.gif>";
|
||||
$img110_down="<IMG border=0 src=images/card1_down.gif>";
|
||||
$img110_warn="<IMG border=0 src=images/card1_warn.gif>";
|
||||
$img111_up ="<IMG border=0 src=images/abis0_up.gif>";
|
||||
$img111_down="<IMG border=0 src=images/abis0_down.gif>";
|
||||
$img111_warn="<IMG border=0 src=images/abis0_warn.gif>";
|
||||
$img120_up ="<IMG border=0 src=images/trx2_up.gif>";
|
||||
$img120_down="<IMG border=0 src=images/trx2_down.gif>";
|
||||
$img120_warn="<IMG border=0 src=images/trx2_warn.gif>";
|
||||
$img130_up ="<IMG border=0 src=images/trx4_up.gif>";
|
||||
$img130_down="<IMG border=0 src=images/trx4_down.gif>";
|
||||
$img130_warn="<IMG border=0 src=images/trx4_warn.gif>";
|
||||
$img140_up ="<IMG border=0 src=images/trx6_up.gif>";
|
||||
$img140_down="<IMG border=0 src=images/trx6_down.gif>";
|
||||
$img140_warn="<IMG border=0 src=images/trx6_warn.gif>";
|
||||
|
||||
$img200_up ="<IMG border=0 src=images/btsiwp_up.gif>";
|
||||
$img200_down="<IMG border=0 src=images/btsiwp_down.gif>";
|
||||
$img200_warn="<IMG border=0 src=images/btsiwp_warn.gif>";
|
||||
$img210_up ="<IMG border=0 src=images/card1_up.gif>";
|
||||
$img210_down="<IMG border=0 src=images/card1_down.gif>";
|
||||
$img210_warn="<IMG border=0 src=images/card1_warn.gif>";
|
||||
$img211_up ="<IMG border=0 src=images/abis0_up.gif>";
|
||||
$img211_down="<IMG border=0 src=images/abis0_down.gif>";
|
||||
$img211_warn="<IMG border=0 src=images/abis0_warn.gif>";
|
||||
$img220_up ="<IMG border=0 src=images/trx2_up.gif>";
|
||||
$img220_down="<IMG border=0 src=images/trx2_down.gif>";
|
||||
$img220_warn="<IMG border=0 src=images/trx2_warn.gif>";
|
||||
$img230_up ="<IMG border=0 src=images/trx4_up.gif>";
|
||||
$img230_down="<IMG border=0 src=images/trx4_down.gif>";
|
||||
$img230_warn="<IMG border=0 src=images/trx4_warn.gif>";
|
||||
$img240_up ="<IMG border=0 src=images/trx6_up.gif>";
|
||||
$img240_down="<IMG border=0 src=images/trx6_down.gif>";
|
||||
$img240_warn="<IMG border=0 src=images/trx6_warn.gif>";
|
||||
|
||||
$img300_up ="<IMG border=0 src=images/btsiwp_up.gif>";
|
||||
$img300_down="<IMG border=0 src=images/btsiwp_down.gif>";
|
||||
$img300_warn="<IMG border=0 src=images/btsiwp_warn.gif>";
|
||||
$img310_up ="<IMG border=0 src=images/card1_up.gif>";
|
||||
$img310_down="<IMG border=0 src=images/card1_down.gif>";
|
||||
$img310_warn="<IMG border=0 src=images/card1_warn.gif>";
|
||||
$img311_up ="<IMG border=0 src=images/abis0_up.gif>";
|
||||
$img311_down="<IMG border=0 src=images/abis0_down.gif>";
|
||||
$img311_warn="<IMG border=0 src=images/abis0_warn.gif>";
|
||||
$img320_up ="<IMG border=0 src=images/trx2_up.gif>";
|
||||
$img320_down="<IMG border=0 src=images/trx2_down.gif>";
|
||||
$img320_warn="<IMG border=0 src=images/trx2_warn.gif>";
|
||||
$img330_up ="<IMG border=0 src=images/trx4_up.gif>";
|
||||
$img330_down="<IMG border=0 src=images/trx4_down.gif>";
|
||||
$img330_warn="<IMG border=0 src=images/trx4_warn.gif>";
|
||||
$img340_up ="<IMG border=0 src=images/trx6_up.gif>";
|
||||
$img340_down="<IMG border=0 src=images/trx6_down.gif>";
|
||||
$img340_warn="<IMG border=0 src=images/trx6_warn.gif>";
|
||||
|
||||
$img400_up ="<IMG border=0 src=images/btsiwp_up.gif>";
|
||||
$img400_down="<IMG border=0 src=images/btsiwp_down.gif>";
|
||||
$img400_warn="<IMG border=0 src=images/btsiwp_warn.gif>";
|
||||
$img410_up ="<IMG border=0 src=images/card1_up.gif>";
|
||||
$img410_down="<IMG border=0 src=images/card1_down.gif>";
|
||||
$img410_warn="<IMG border=0 src=images/card1_warn.gif>";
|
||||
$img411_up ="<IMG border=0 src=images/abis0_up.gif>";
|
||||
$img411_down="<IMG border=0 src=images/abis0_down.gif>";
|
||||
$img411_warn="<IMG border=0 src=images/abis0_warn.gif>";
|
||||
$img420_up ="<IMG border=0 src=images/trx2_up.gif>";
|
||||
$img420_down="<IMG border=0 src=images/trx2_down.gif>";
|
||||
$img420_warn="<IMG border=0 src=images/trx2_warn.gif>";
|
||||
$img430_up ="<IMG border=0 src=images/trx4_up.gif>";
|
||||
$img430_down="<IMG border=0 src=images/trx4_down.gif>";
|
||||
$img430_warn="<IMG border=0 src=images/trx4_warn.gif>";
|
||||
$img440_up ="<IMG border=0 src=images/trx6_up.gif>";
|
||||
$img440_down="<IMG border=0 src=images/trx6_down.gif>";
|
||||
$img440_warn="<IMG border=0 src=images/trx6_warn.gif>";
|
||||
|
||||
$img500_up ="<IMG border=0 src=images/btsiwp_up.gif>";
|
||||
$img500_down="<IMG border=0 src=images/btsiwp_down.gif>";
|
||||
$img500_warn="<IMG border=0 src=images/btsiwp_warn.gif>";
|
||||
$img510_up ="<IMG border=0 src=images/card1_up.gif>";
|
||||
$img510_down="<IMG border=0 src=images/card1_down.gif>";
|
||||
$img510_warn="<IMG border=0 src=images/card1_warn.gif>";
|
||||
$img511_up ="<IMG border=0 src=images/abis0_up.gif>";
|
||||
$img511_down="<IMG border=0 src=images/abis0_down.gif>";
|
||||
$img511_warn="<IMG border=0 src=images/abis0_warn.gif>";
|
||||
$img520_up ="<IMG border=0 src=images/trx2_up.gif>";
|
||||
$img520_down="<IMG border=0 src=images/trx2_down.gif>";
|
||||
$img520_warn="<IMG border=0 src=images/trx2_warn.gif>";
|
||||
$img530_up ="<IMG border=0 src=images/trx4_up.gif>";
|
||||
$img530_down="<IMG border=0 src=images/trx4_down.gif>";
|
||||
$img530_warn="<IMG border=0 src=images/trx4_warn.gif>";
|
||||
$img540_up ="<IMG border=0 src=images/trx6_up.gif>";
|
||||
$img540_down="<IMG border=0 src=images/trx6_down.gif>";
|
||||
$img540_warn="<IMG border=0 src=images/trx6_warn.gif>";
|
||||
|
||||
$img600_up ="<IMG border=0 src=images/btsiwp_up.gif>";
|
||||
$img600_down="<IMG border=0 src=images/btsiwp_down.gif>";
|
||||
$img600_warn="<IMG border=0 src=images/btsiwp_warn.gif>";
|
||||
$img610_up ="<IMG border=0 src=images/card1_up.gif>";
|
||||
$img610_down="<IMG border=0 src=images/card1_down.gif>";
|
||||
$img610_warn="<IMG border=0 src=images/card1_warn.gif>";
|
||||
$img611_up ="<IMG border=0 src=images/abis0_up.gif>";
|
||||
$img611_down="<IMG border=0 src=images/abis0_down.gif>";
|
||||
$img611_warn="<IMG border=0 src=images/abis0_warn.gif>";
|
||||
$img620_up ="<IMG border=0 src=images/trx2_up.gif>";
|
||||
$img620_down="<IMG border=0 src=images/trx2_down.gif>";
|
||||
$img620_warn="<IMG border=0 src=images/trx2_warn.gif>";
|
||||
$img630_up ="<IMG border=0 src=images/trx4_up.gif>";
|
||||
$img630_down="<IMG border=0 src=images/trx4_down.gif>";
|
||||
$img630_warn="<IMG border=0 src=images/trx4_warn.gif>";
|
||||
$img640_up ="<IMG border=0 src=images/trx6_up.gif>";
|
||||
$img640_down="<IMG border=0 src=images/trx6_down.gif>";
|
||||
$img640_warn="<IMG border=0 src=images/trx6_warn.gif>";
|
||||
|
||||
$img700_up ="<IMG border=0 src=images/btsiwp_up.gif>";
|
||||
$img700_down="<IMG border=0 src=images/btsiwp_down.gif>";
|
||||
$img700_warn="<IMG border=0 src=images/btsiwp_warn.gif>";
|
||||
$img710_up ="<IMG border=0 src=images/card1_up.gif>";
|
||||
$img710_down="<IMG border=0 src=images/card1_down.gif>";
|
||||
$img710_warn="<IMG border=0 src=images/card1_warn.gif>";
|
||||
$img711_up ="<IMG border=0 src=images/abis0_up.gif>";
|
||||
$img711_down="<IMG border=0 src=images/abis0_down.gif>";
|
||||
$img711_warn="<IMG border=0 src=images/abis0_warn.gif>";
|
||||
$img720_up ="<IMG border=0 src=images/trx2_up.gif>";
|
||||
$img720_down="<IMG border=0 src=images/trx2_down.gif>";
|
||||
$img720_warn="<IMG border=0 src=images/trx2_warn.gif>";
|
||||
$img730_up ="<IMG border=0 src=images/trx4_up.gif>";
|
||||
$img730_down="<IMG border=0 src=images/trx4_down.gif>";
|
||||
$img730_warn="<IMG border=0 src=images/trx4_warn.gif>";
|
||||
$img740_up ="<IMG border=0 src=images/trx6_up.gif>";
|
||||
$img740_down="<IMG border=0 src=images/trx6_down.gif>";
|
||||
$img740_warn="<IMG border=0 src=images/trx6_warn.gif>";
|
||||
|
||||
$img800_up ="<IMG border=0 src=images/btsiwp_up.gif>";
|
||||
$img800_down="<IMG border=0 src=images/btsiwp_down.gif>";
|
||||
$img800_warn="<IMG border=0 src=images/btsiwp_warn.gif>";
|
||||
$img810_up ="<IMG border=0 src=images/card1_up.gif>";
|
||||
$img810_down="<IMG border=0 src=images/card1_down.gif>";
|
||||
$img810_warn="<IMG border=0 src=images/card1_warn.gif>";
|
||||
$img811_up ="<IMG border=0 src=images/abis0_up.gif>";
|
||||
$img811_down="<IMG border=0 src=images/abis0_down.gif>";
|
||||
$img811_warn="<IMG border=0 src=images/abis0_warn.gif>";
|
||||
$img820_up ="<IMG border=0 src=images/trx2_up.gif>";
|
||||
$img820_down="<IMG border=0 src=images/trx2_down.gif>";
|
||||
$img820_warn="<IMG border=0 src=images/trx2_warn.gif>";
|
||||
$img830_up ="<IMG border=0 src=images/trx4_up.gif>";
|
||||
$img830_down="<IMG border=0 src=images/trx4_down.gif>";
|
||||
$img830_warn="<IMG border=0 src=images/trx4_warn.gif>";
|
||||
$img840_up ="<IMG border=0 src=images/trx6_up.gif>";
|
||||
$img840_down="<IMG border=0 src=images/trx6_down.gif>";
|
||||
$img840_warn="<IMG border=0 src=images/trx6_warn.gif>";
|
||||
|
||||
$img900_up ="<IMG border=0 src=images/btsiwp_up.gif>";
|
||||
$img900_down="<IMG border=0 src=images/btsiwp_down.gif>";
|
||||
$img900_warn="<IMG border=0 src=images/btsiwp_warn.gif>";
|
||||
$img910_up ="<IMG border=0 src=images/card1_up.gif>";
|
||||
$img910_down="<IMG border=0 src=images/card1_down.gif>";
|
||||
$img910_warn="<IMG border=0 src=images/card1_warn.gif>";
|
||||
$img911_up ="<IMG border=0 src=images/abis0_up.gif>";
|
||||
$img911_down="<IMG border=0 src=images/abis0_down.gif>";
|
||||
$img911_warn="<IMG border=0 src=images/abis0_warn.gif>";
|
||||
$img920_up ="<IMG border=0 src=images/trx2_up.gif>";
|
||||
$img920_down="<IMG border=0 src=images/trx2_down.gif>";
|
||||
$img920_warn="<IMG border=0 src=images/trx2_warn.gif>";
|
||||
$img930_up ="<IMG border=0 src=images/trx4_up.gif>";
|
||||
$img930_down="<IMG border=0 src=images/trx4_down.gif>";
|
||||
$img930_warn="<IMG border=0 src=images/trx4_warn.gif>";
|
||||
$img940_up ="<IMG border=0 src=images/trx6_up.gif>";
|
||||
$img940_down="<IMG border=0 src=images/trx6_down.gif>";
|
||||
$img940_warn="<IMG border=0 src=images/trx6_warn.gif>";
|
||||
|
||||
$img1000_up ="<IMG border=0 src=images/btsiwp_up.gif>";
|
||||
$img1000_down="<IMG border=0 src=images/btsiwp_down.gif>";
|
||||
$img1000_warn="<IMG border=0 src=images/btsiwp_warn.gif>";
|
||||
$img1010_up ="<IMG border=0 src=images/card1_up.gif>";
|
||||
$img1010_down="<IMG border=0 src=images/card1_down.gif>";
|
||||
$img1010_warn="<IMG border=0 src=images/card1_warn.gif>";
|
||||
$img1011_up ="<IMG border=0 src=images/abis0_up.gif>";
|
||||
$img1011_down="<IMG border=0 src=images/abis0_down.gif>";
|
||||
$img1011_warn="<IMG border=0 src=images/abis0_warn.gif>";
|
||||
$img1020_up ="<IMG border=0 src=images/trx2_up.gif>";
|
||||
$img1020_down="<IMG border=0 src=images/trx2_down.gif>";
|
||||
$img1020_warn="<IMG border=0 src=images/trx2_warn.gif>";
|
||||
$img1030_up ="<IMG border=0 src=images/trx4_up.gif>";
|
||||
$img1030_down="<IMG border=0 src=images/trx4_down.gif>";
|
||||
$img1030_warn="<IMG border=0 src=images/trx4_warn.gif>";
|
||||
$img1040_up ="<IMG border=0 src=images/trx6_up.gif>";
|
||||
$img1040_down="<IMG border=0 src=images/trx6_down.gif>";
|
||||
$img1040_warn="<IMG border=0 src=images/trx6_warn.gif>";
|
||||
|
||||
$img1100_up ="<IMG border=0 src=images/btsiwp_up.gif>";
|
||||
$img1100_down="<IMG border=0 src=images/btsiwp_down.gif>";
|
||||
$img1100_warn="<IMG border=0 src=images/btsiwp_warn.gif>";
|
||||
$img1110_up ="<IMG border=0 src=images/card1_up.gif>";
|
||||
$img1110_down="<IMG border=0 src=images/card1_down.gif>";
|
||||
$img1110_warn="<IMG border=0 src=images/card1_warn.gif>";
|
||||
$img1111_up ="<IMG border=0 src=images/abis0_up.gif>";
|
||||
$img1111_down="<IMG border=0 src=images/abis0_down.gif>";
|
||||
$img1111_warn="<IMG border=0 src=images/abis0_warn.gif>";
|
||||
$img1120_up ="<IMG border=0 src=images/trx2_up.gif>";
|
||||
$img1120_down="<IMG border=0 src=images/trx2_down.gif>";
|
||||
$img1120_warn="<IMG border=0 src=images/trx2_warn.gif>";
|
||||
$img1130_up ="<IMG border=0 src=images/trx4_up.gif>";
|
||||
$img1130_down="<IMG border=0 src=images/trx4_down.gif>";
|
||||
$img1130_warn="<IMG border=0 src=images/trx4_warn.gif>";
|
||||
$img1140_up ="<IMG border=0 src=images/trx6_up.gif>";
|
||||
$img1140_down="<IMG border=0 src=images/trx6_down.gif>";
|
||||
$img1140_warn="<IMG border=0 src=images/trx6_warn.gif>";
|
||||
|
||||
$img1200_up ="<IMG border=0 src=images/btsiwp_up.gif>";
|
||||
$img1200_down="<IMG border=0 src=images/btsiwp_down.gif>";
|
||||
$img1200_warn="<IMG border=0 src=images/btsiwp_warn.gif>";
|
||||
$img1210_up ="<IMG border=0 src=images/card1_up.gif>";
|
||||
$img1210_down="<IMG border=0 src=images/card1_down.gif>";
|
||||
$img1210_warn="<IMG border=0 src=images/card1_warn.gif>";
|
||||
$img1211_up ="<IMG border=0 src=images/abis0_up.gif>";
|
||||
$img1211_down="<IMG border=0 src=images/abis0_down.gif>";
|
||||
$img1211_warn="<IMG border=0 src=images/abis0_warn.gif>";
|
||||
$img1220_up ="<IMG border=0 src=images/trx2_up.gif>";
|
||||
$img1220_down="<IMG border=0 src=images/trx2_down.gif>";
|
||||
$img1220_warn="<IMG border=0 src=images/trx2_warn.gif>";
|
||||
$img1230_up ="<IMG border=0 src=images/trx4_up.gif>";
|
||||
$img1230_down="<IMG border=0 src=images/trx4_down.gif>";
|
||||
$img1230_warn="<IMG border=0 src=images/trx4_warn.gif>";
|
||||
$img1240_up ="<IMG border=0 src=images/trx6_up.gif>";
|
||||
$img1240_down="<IMG border=0 src=images/trx6_down.gif>";
|
||||
$img1240_warn="<IMG border=0 src=images/trx6_warn.gif>";
|
||||
|
||||
$whiteslot="<IMG border=0 src=images/whiteslot.gif>";
|
||||
$white="<IMG border=0 src=images/white.gif>";
|
||||
$slot ="<IMG border=0 src=images/slot.gif>";
|
||||
?>
|
||||
286
wxc2_omc/configuration/bssomc/bssConf.php
Executable file
@@ -0,0 +1,286 @@
|
||||
<?php
|
||||
/*********************************************************
|
||||
<20><><EFBFBD><EFBFBD>˵<EFBFBD><CBB5>:
|
||||
<20><><EFBFBD><EFBFBD>˵<EFBFBD><CBB5>:
|
||||
<20><><EFBFBD>ù<EFBFBD>ϵ:<3A><><EFBFBD><EFBFBD>:
|
||||
<20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:
|
||||
<20><><EFBFBD><EFBFBD>˵<EFBFBD><CBB5>:
|
||||
<20><><EFBFBD><EFBFBD>ֵ:<3A><>
|
||||
<20><><EFBFBD><EFBFBD>:
|
||||
<EFBFBD><EFBFBD>ע<EFBFBD><EFBFBD>:
|
||||
NO.1
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD>:
|
||||
ʱ<EFBFBD><EFBFBD>:
|
||||
<EFBFBD><EFBFBD>˵<EFBFBD><EFBFBD>:
|
||||
*********************************************************/
|
||||
require("../../inc/header.inc");
|
||||
?>
|
||||
<body leftmargin="15" rightmargin="10" onload="javascript:adjust_frame('down');" onresize="javascript:adjust_frame('down');" style="overflow:hidden;overflow-x:hidden;overflow-y:hidden;">
|
||||
|
||||
<?php
|
||||
adjust_head_frame("down");
|
||||
adjust_title_head_frame("down");
|
||||
adjust_title_tail_frame("down");
|
||||
adjust_content_head_frame("down");
|
||||
echo "<br>";
|
||||
|
||||
$DEBUG = 0;
|
||||
|
||||
if($DEBUG) echo "<br>mode=$mode";
|
||||
$sysConfTable = 'OMC_PUB.sysConf';
|
||||
$sysInfoTable = 'OMC_PUB.sysInfo';
|
||||
$pubDb ='OMC_PUB';
|
||||
$netIdDefArr=array(
|
||||
array('0', "International"),
|
||||
array('1', "international Spare"),
|
||||
array('2', "National"),
|
||||
array('3', "National Spare")
|
||||
);
|
||||
|
||||
function alertMsg($msg)
|
||||
{
|
||||
echo "<script LANGUAGE=\"JavaScript\">";
|
||||
echo "\n alert('$msg');";
|
||||
echo "\n window.history.go(-1);";
|
||||
echo "\n </script>";
|
||||
exit();
|
||||
}
|
||||
|
||||
function sendBssCommand($bssid,$ip,$sysAlias,$add=1)
|
||||
{
|
||||
$DEBUG = 0;
|
||||
$db = "BssOmcDb";
|
||||
$remark = $sysAlias;
|
||||
if($add==1)
|
||||
$nmicmd="newbss $bssid $ip";
|
||||
else
|
||||
$nmicmd = "dropbss $bssid $ip";
|
||||
|
||||
/* Old MySql */
|
||||
$sqlstring = "SELECT row_no FROM OMCR_COMMAND WHERE status=0 " .
|
||||
"ORDER BY seqNum ASC LIMIT 10";
|
||||
//echo "$sqlstring<BR>";
|
||||
$res = mysqli_query($pubConn,$sqlstring) or
|
||||
die("Invalid query:$sqlstring\n" . mysqli_error($pubConn));
|
||||
while (list($row_no[]) = mysqli_fetch_row($res));
|
||||
$no_of_rows = mysqli_num_rows($res);
|
||||
mysql_free_result($res);
|
||||
if ( $no_of_rows <= 0 || ($no_of_rows > 10) )
|
||||
{
|
||||
//
|
||||
// No available row in OMCR_COMMAND
|
||||
// Send error to MySQL()
|
||||
//
|
||||
$errorInfo = "Command table is full: Wait and send the command again";
|
||||
if($DEBUG) echo "<br>errorInfo=$errorInfo";
|
||||
alertMsg($errorInfo);
|
||||
|
||||
}
|
||||
if($add==1)
|
||||
{
|
||||
//
|
||||
// Save "Name and remark" in OMCR_BSSTABLE
|
||||
// A non-null IP field in OMCR_BSSTABLE means the entry is valid
|
||||
//
|
||||
$sqlstring = "UPDATE OMCR_BSSTABLE SET name='$remark', ip='$ip'," .
|
||||
"remark='$remark' WHERE bssid=$bssid";
|
||||
if($DEBUG) echo "$sqlstring<BR>";
|
||||
$res = mysqli_query($pubConn,$sqlstring) or
|
||||
die("Invalid query:$sqlstring\n" . mysqli_error($pubConn));
|
||||
|
||||
$sqlstring = "UPDATE OMCR_BssFunc SET Label='$remark' " .
|
||||
"WHERE bssid=$bssid";
|
||||
if($DEBUG) echo "$sqlstring<BR>";
|
||||
$res = mysqli_query($pubConn,$sqlstring) or
|
||||
die("Invalid query:$sqlstring\n" . mysqli_error($pubConn));
|
||||
}
|
||||
//
|
||||
// Insert 1 commands in OMCR_COMMAND out of 10 possible available rows
|
||||
//
|
||||
$i=0;
|
||||
do
|
||||
{
|
||||
if ($row_no[$i] != '')
|
||||
{
|
||||
$sqlstring = "REPLACE INTO OMCR_COMMAND VALUES(" .
|
||||
$row_no[$i] . ",-1,'$nmicmd',null,255,-1,null,null,null)";
|
||||
if($DEBUG) echo "$sqlstring<BR>";
|
||||
$res = mysqli_query($pubConn,$sqlstring) or
|
||||
die("Invalid query:$sqlstring\n" . mysqli_error($pubConn));
|
||||
}
|
||||
$i++;
|
||||
} while ($i<10 && mysql_affected_rows() != 2); //replace=delete+insert (2 task)
|
||||
|
||||
$cmd1_row_no = $row_no[$i-1];
|
||||
|
||||
//
|
||||
// Wait for response: timeout after 500ms x 20 = 10 secs
|
||||
//
|
||||
$i=0;
|
||||
while ($i<20)
|
||||
{
|
||||
usleep(500000);
|
||||
$sqlstring = "SELECT resultcode,result,responsecode,response from OMCR_COMMAND WHERE status=0 AND " .
|
||||
"row_no=$cmd1_row_no ORDER BY seqNum ASC";
|
||||
if($DEBUG) echo "$sqlstring<BR>";
|
||||
$res = mysqli_query($pubConn,$sqlstring) or
|
||||
die("Invalid query:$sqlstring\n" . mysqli_error($pubConn));
|
||||
while ( $mydata = mysqli_fetch_row($res) )
|
||||
list($resultcode,$result,$responsecode,$response) = $mydata;
|
||||
//list($a[],$b[],$c[],$d[],$e[],$f[],$result[],$response[]) = $mydata;
|
||||
$no_of_rows = mysqli_num_rows($res);
|
||||
mysql_free_result($res);
|
||||
|
||||
if ($no_of_rows == 1)
|
||||
{
|
||||
if($add==1)//add
|
||||
{
|
||||
if ($result != 'ok')
|
||||
{
|
||||
// Create/Delete failed !!!
|
||||
$errorInfo = "$result: $response";
|
||||
if($DEBUG) echo "<br>errorInfo=$errorInfo";
|
||||
//$errorInfo=rawurlencode($errorInfo);
|
||||
alertMsg($errorInfo);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
else//delete
|
||||
{
|
||||
if ($resultcode != 0)
|
||||
{
|
||||
$errorInfo = "dropbss command failed: ".$response;
|
||||
if($DEBUG) echo "<br>errorInfo=$errorInfo";
|
||||
//$errorInfo=rawurlencode($errorInfo);
|
||||
alertMsg($errorInfo);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
echo "<img border=\"0\" src=\"../../images/arrow.gif\" width=\"10\" height=\"10\">";
|
||||
flush();
|
||||
$i++;
|
||||
}
|
||||
return 1;
|
||||
}//end sendBssCommand
|
||||
|
||||
|
||||
?>
|
||||
<?php
|
||||
if($mode == 'add'){
|
||||
if(isset($save)){
|
||||
$tmpSysType = 500;
|
||||
if(!isset($sysNo))
|
||||
$sysNo = 0;
|
||||
$subSysNo = 0;
|
||||
$isRemote = 0;
|
||||
|
||||
$return_result=sendBssCommand($sysNo,$bssIP,$sysAlias);
|
||||
/* if($return_result==1){
|
||||
?>
|
||||
<script LANGUAGE="JavaScript">;
|
||||
window.location.href = "modify.php?url=bssListDown.php" +
|
||||
"&language=<?=$language?>" +
|
||||
"&bssid=<?=$sysNo?>" +
|
||||
"&objectid=BssFunc" +
|
||||
"&nmicommand=set"+
|
||||
"&modified_data=Label"+
|
||||
"&tLabel=2"+
|
||||
"&Label=<?=$sysAlias?>" +
|
||||
"&timeout=30";
|
||||
</script>;
|
||||
<?php
|
||||
}*/
|
||||
//=============================================================
|
||||
$addSql = "REPLACE INTO $sysInfoTable (sysTypeNo,sysNo,subSysNo,isRemote,netId,DPC,ip,baseStat,sysAlias,updateTime )
|
||||
VALUES('500','$sysNo','$subSysNo','$isRemote','$ni','$dpc','$bssIP','1','$sysAlias',CURRENT_TIMESTAMP)";
|
||||
|
||||
if($DEBUG) echo "<br>addSql = $addSql";
|
||||
$result = mysqli_query($pubConn,$addSql);
|
||||
echo mysqli_error($pubConn);
|
||||
|
||||
echo "<br><font size=3 color=blue>Add ok</font>";
|
||||
echo " <meta http-equiv=\"refresh\" content=\"1; url=./bssListDown.php\"> ";
|
||||
}
|
||||
}else if($mode == 'delete'){
|
||||
$tmpSysType = 500;
|
||||
$tmpSubSysNo = 0;
|
||||
$delSql = "DELETE FROM $sysInfoTable WHERE sysTypeNo='$tmpSysType' AND sysNo = '$sysNo'
|
||||
AND subSysNo = '$tmpSubSysNo'";
|
||||
if($DEBUG) echo "<br>delSql = $delSql";
|
||||
mysqli_query($pubConn,$delSql);
|
||||
|
||||
$bssTable = "BssOmcDb.OMCR_BSSTABLE";
|
||||
$selSql = "select ip from $bssTable where bssid='$sysNo'";
|
||||
$result = mysqli_query($pubConn,$selSql);
|
||||
if($row = mysqli_fetch_array($result))
|
||||
{
|
||||
$bssIP = $row[ip];
|
||||
$bssid=$sysNo;
|
||||
if(strlen($bssIP)>0)
|
||||
sendBssCommand($bssid,$bssIP,'',0);
|
||||
}
|
||||
echo "<br>Deleted Successful";
|
||||
exit();
|
||||
}
|
||||
?>
|
||||
|
||||
<form method="POST" name=confForm action="<?php echo"$PHP_SELF";?>" >
|
||||
<table border="1" width="100%" cellpadding="2" cellspacing="0" bordercolor="#666666" bordercolordark="#FFFFFF" bgcolor="#FFFFFF" >
|
||||
<tr bgcolor="#E6E6E6">
|
||||
<td width="100%" colspan="6" align="center">
|
||||
<font size=3><b><?php echo "BSS"; ?></b></font>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
echo "<tr bgcolor=#E6E6E6>";
|
||||
echo "<td width=\"25%\">System No.</td>";
|
||||
echo "<td>";
|
||||
|
||||
$sysNoSql ="SELECT maxSysNum FROM $sysConfTable WHERE sysTypeNo='500'";
|
||||
if($DEBUG) echo "<br>$sysNoSql";
|
||||
$sysNoResult = mysqli_query($pubConn,$sysNoSql);
|
||||
$sysNoRows = @mysqli_fetch_array($sysNoResult);
|
||||
$maxSysNum = $sysNoRows[maxSysNum];
|
||||
|
||||
//Get the valid BSS object
|
||||
unset($bssIDList);
|
||||
$bssTable = "BssOmcDb.OMCR_BSSTABLE";
|
||||
$selSql = "select * from $bssTable order by bssid";
|
||||
$result = mysqli_query($pubConn,$selSql);
|
||||
while($row = mysqli_fetch_array($result))
|
||||
{
|
||||
$bssid_tmp=$row[bssid]+0;
|
||||
if(strlen(trim($row[ip])) > 0)
|
||||
$bssIDList[$bssid_tmp]=1;
|
||||
else
|
||||
$bssIDList[$bssid_tmp]=0;
|
||||
}
|
||||
|
||||
echo "<select size=\"1\" name=\"sysNo\">";
|
||||
for($i=0;$i<$maxSysNum;$i++){
|
||||
if($bssIDList[$i] == 0)
|
||||
echo "<option value=\"$i\">$i</option>";
|
||||
}
|
||||
echo "</select>";
|
||||
echo "</td>";
|
||||
echo "</tr>";
|
||||
|
||||
//===ip==
|
||||
echo "<tr><td><nobr>IP:</td>";
|
||||
echo "<td><input type=\"text\" name=\"bssIP\" value=\"\" length=\"15\"></td>";
|
||||
echo "</tr>";
|
||||
/*
|
||||
echo "<tr>";
|
||||
echo "<td>Alias:</td>";
|
||||
echo "<td colspan=\"2\"><input type=\"text\" name=\"sysAlias\" value=\"$sysListRows[sysAlias]\" length=\"25\" maxlength=\"20\"></td>";
|
||||
echo "</tr>";
|
||||
*/
|
||||
echo "</table>";
|
||||
echo " ";
|
||||
echo "<input type=\"submit\" name=\"save\" value=\"Save\"> ";
|
||||
echo "<input type=\"hidden\" name=\"mode\" value=\"$mode\">";
|
||||
echo "</FROM>";
|
||||
adjust_content_tail("down");
|
||||
?>
|
||||
105
wxc2_omc/configuration/bssomc/bssListDown.php
Executable file
@@ -0,0 +1,105 @@
|
||||
<?php
|
||||
/*********************************************************
|
||||
<20><><EFBFBD><EFBFBD>˵<EFBFBD><CBB5>:
|
||||
<20><><EFBFBD><EFBFBD>˵<EFBFBD><CBB5>:
|
||||
<20><><EFBFBD>ù<EFBFBD>ϵ:
|
||||
<20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:
|
||||
<20><><EFBFBD><EFBFBD>˵<EFBFBD><CBB5>:
|
||||
<20><><EFBFBD><EFBFBD>ֵ:<3A><>
|
||||
<20><><EFBFBD><EFBFBD>:
|
||||
<EFBFBD><EFBFBD>ע<EFBFBD><EFBFBD>:
|
||||
NO.1
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD>:
|
||||
ʱ<EFBFBD><EFBFBD>:
|
||||
<EFBFBD><EFBFBD>˵<EFBFBD><EFBFBD>:
|
||||
*********************************************************/
|
||||
$selectedLanguage=$userInfo[language];
|
||||
require("../../inc/header.inc");
|
||||
?>
|
||||
<body leftmargin="15" rightmargin="10" onload="javascript:adjust_frame('down');" onresize="javascript:adjust_frame('down');" style="overflow:hidden;overflow-x:hidden;overflow-y:hidden;">
|
||||
|
||||
<?php
|
||||
adjust_head_frame("down");
|
||||
adjust_title_head_frame("down");
|
||||
adjust_title_tail_frame("down");
|
||||
|
||||
adjust_content_head_frame("down");
|
||||
echo "<br>";
|
||||
|
||||
$DEBUG = 0;
|
||||
$sysInfoTable = 'OMC_PUB.sysInfo';
|
||||
$sysInfoDefTable = 'OMC_PUB.sysInfoDef';
|
||||
$pubDb ='OMC_PUB';
|
||||
$listSql = "SELECT a.bssid,a.ip,b.Label as name,a.connected FROM BssOmcDb.OMCR_BSSTABLE as a, BssOmcDb.OMCR_BssFunc as b" .
|
||||
" WHERE a.ip!='' AND a.bssid=b.bssid ORDER BY bssid";
|
||||
if($DEBUG) echo "<br>listSql = $listSql<br>";
|
||||
$listResult = mysqli_query($pubConn,$listSql);
|
||||
echo mysqli_error($pubConn);
|
||||
?>
|
||||
|
||||
|
||||
<script LANGUAGE="JavaScript">
|
||||
function delFirm(sysNo)
|
||||
{
|
||||
//alert(elementNo);
|
||||
if(confirm('Do you want to delete the selected?')!=true)
|
||||
{
|
||||
delcheckbox.checked=false;
|
||||
}
|
||||
else
|
||||
{
|
||||
window.location.href='<?php echo "./bssConf.php";?>'+"?sysNo="+sysNo+"&mode=delete";
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<form method="POST" name=confForm action="./bssConf.php" >
|
||||
<table border="1" width="100%" cellpadding="2" cellspacing="0" bordercolor="#666666" bordercolordark="#FFFFFF" bgcolor="#FFFFFF" >
|
||||
<?php
|
||||
if ($selectedLanguage == 'eng'){
|
||||
echo "<tr bgcolor=\"#E6E6E6\">";
|
||||
echo "<td>Name</td>";
|
||||
echo "<td>Alias</td>";
|
||||
echo "<td>IP</td>";
|
||||
echo "<td>Connect Status</td>";
|
||||
echo "<td>Delete</td>";
|
||||
echo "</tr>";
|
||||
}elseif($selectedLanguage == 'chn'){
|
||||
echo "<tr bgcolor=\"#E6E6E6\">";
|
||||
echo "<td><3E><><EFBFBD><EFBFBD></td>";
|
||||
echo "<td><3E><><EFBFBD><EFBFBD></td>";
|
||||
echo "<td>IP</td>";
|
||||
echo "<td><3E><><EFBFBD><EFBFBD>״̬</td>";
|
||||
echo "<td>ɾ<><C9BE></td>";
|
||||
echo "</tr>";
|
||||
}
|
||||
while($listRows=@mysqli_fetch_array($listResult)){
|
||||
$bssid=$listRows[bssid];
|
||||
$sysName="BSS".$listRows[bssid];
|
||||
echo "<tr>";
|
||||
echo "<td><a href=\"./modifyBssParam.php?bssid=$listRows[bssid]\">$sysName</a></td>";
|
||||
if(strlen($listRows[name]) > 0 ){
|
||||
echo "<td>$listRows[name]</td>";
|
||||
}else{
|
||||
echo "<td> -- </td>";
|
||||
}
|
||||
|
||||
echo "<td>$listRows[ip] </td>";
|
||||
|
||||
if($listRows[connected]==255){
|
||||
echo "<td>Connected</td>";
|
||||
}else if($listRows[connected]==0){
|
||||
echo "<td>Broken</td>";
|
||||
}else{
|
||||
echo "<td>BSC is booting up or cannot be connected</td>";
|
||||
}
|
||||
|
||||
echo "<td align=\"right\"><input type=\"checkbox\" name=\"delete\" value=\"ON\" onClick=\"javascript:delFirm($bssid)\"></td>";
|
||||
|
||||
echo "</tr>";
|
||||
}
|
||||
echo "</table>";
|
||||
echo " ";
|
||||
echo "</FORM>";
|
||||
|
||||
adjust_content_tail("down");
|
||||
?>
|
||||
16
wxc2_omc/configuration/bssomc/bssListIndex.php
Executable file
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
require("../../inc/header.inc");
|
||||
?>
|
||||
<frameset rows="75,*" frameborder="0" framespacing="0" border="0">
|
||||
<frame name="header" scrolling="no" noresize target="main" src="bssListUp.php" marginwidth="0" marginheight="0" >
|
||||
<frame name="main" src="bssListDown.php" scrolling="auto">
|
||||
|
||||
<noframes>
|
||||
<body>
|
||||
<p><3E><><EFBFBD><EFBFBD>ҳʹ<D2B3><CAB9><EFBFBD>˿<EFBFBD><CBBF>ܣ<EFBFBD><DCA3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>֧<EFBFBD>ֿ<EFBFBD><D6BF>ܡ<EFBFBD></p>
|
||||
</body>
|
||||
</noframes>
|
||||
|
||||
</frameset>
|
||||
</html>
|
||||
|
||||
61
wxc2_omc/configuration/bssomc/bssListUp.php
Executable file
@@ -0,0 +1,61 @@
|
||||
<?php
|
||||
/*********************************************************
|
||||
<20><><EFBFBD><EFBFBD>˵<EFBFBD><CBB5><EFBFBD><EFBFBD>
|
||||
<20><><EFBFBD><EFBFBD>˵<EFBFBD><CBB5><EFBFBD><EFBFBD>
|
||||
<20><><EFBFBD>ù<EFBFBD>ϵ<EFBFBD><CFB5>
|
||||
<20><><EFBFBD><EFBFBD>˵<EFBFBD><CBB5><EFBFBD><EFBFBD>
|
||||
<20><><EFBFBD><EFBFBD>ֵ<EFBFBD><D6B5><EFBFBD><EFBFBD>
|
||||
|
||||
<20><><EFBFBD>ߣ<EFBFBD>
|
||||
|
||||
<EFBFBD><EFBFBD>ע<EFBFBD>ͣ<EFBFBD>
|
||||
NO.1
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
ʱ<EFBFBD>䣺
|
||||
<EFBFBD><EFBFBD>˵<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
*********************************************************/
|
||||
$selectedLanguage=$userInfo[language];
|
||||
require("../../inc/header.inc");
|
||||
?>
|
||||
<base target="main">
|
||||
<body topmargin=16 leftmargin="15" rightmargin="10" onload="javascript:adjust_frame('up');" onresize="javascript:adjust_frame('up');" style="overflow:hidden;overflow-x:hidden;overflow-y:hidden;">
|
||||
|
||||
<form method="post" name="theform" id="theform" action="bssListDown.php" >
|
||||
<?php
|
||||
adjust_head_frame("up");
|
||||
adjust_title_head_frame("up");
|
||||
echo "<table id=\"table_up\" border=\"0\" width=\"100%\">";
|
||||
echo "<tr>";
|
||||
echo "<td width=\"50%\" align=\"left\">";
|
||||
echo $strTitleConfiguration." > BSS";
|
||||
echo "</td>";
|
||||
echo "<td width=\"50%\" align=\"right\" title=\"Help\"> ";
|
||||
$helpId="2.1.1";
|
||||
showHelp($helpId);
|
||||
echo "</td>";
|
||||
echo "</tr>";
|
||||
echo "<tr>";
|
||||
echo "<td align=\"left\">";
|
||||
?>
|
||||
<a href="./bssConf.php?mode=add">
|
||||
<IMG align=absBottom border=0 src="../../images/add.gif" ><?php echo "$strAdd"; ?>
|
||||
</a>
|
||||
<?php
|
||||
echo "</td>";
|
||||
echo "<td align=\"right\"> ";
|
||||
$helpId="6";
|
||||
//showHelp($helpId);
|
||||
echo "</td>";
|
||||
echo "</tr>";
|
||||
echo "</table>";
|
||||
|
||||
adjust_title_tail_frame("up");
|
||||
adjust_content_head_frame("up");
|
||||
adjust_content_tail_frame("up");
|
||||
?>
|
||||
|
||||
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
8
wxc2_omc/configuration/bssomc/bssfunc.inc
Executable file
@@ -0,0 +1,8 @@
|
||||
<?php
|
||||
$gbnamearray = Array(
|
||||
actioniscompleted => "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
|
||||
);
|
||||
$engnamearray = Array(
|
||||
actioniscompleted => "Action is completed"
|
||||
);
|
||||
?>
|
||||
96
wxc2_omc/configuration/bssomc/bssfunc.php
Executable file
@@ -0,0 +1,96 @@
|
||||
<?php
|
||||
//
|
||||
// Created on: 22 Feb 2001
|
||||
// Usage : bssfunc.php?language="eng|gb"&bssid=0&mode=newbss
|
||||
//
|
||||
// Function : Contain the bssstatus.php and bssfuncinfo.php frame
|
||||
//
|
||||
// bssfunc.php ___ bssstatus.php (upper)
|
||||
// \__ bssfuncinfo.php (bottom)
|
||||
//
|
||||
?>
|
||||
<?php
|
||||
include("nocache.inc");
|
||||
include("bssfunc.inc");
|
||||
include("header.inc");
|
||||
if (!isset($language))
|
||||
$language="eng";
|
||||
$parameter="${language}namearray";
|
||||
?>
|
||||
<html>
|
||||
<head>
|
||||
<title>BSS Status</title>
|
||||
<SCRIPT Language="javascript" type="text/javascript">
|
||||
<!--
|
||||
var no_of_refresh=0;
|
||||
var refresh_bsstree_string="<?=${$parameter}[actioniscompleted]?>";
|
||||
function show_status(status,alarm,mode)
|
||||
{
|
||||
//
|
||||
// refresh the bsstree in the left hand side
|
||||
|
||||
if (no_of_refresh <= 0)
|
||||
{
|
||||
url = parent.contents.location + ""; // force it to string
|
||||
if ((pos = url.search("&x=")) != -1)
|
||||
{
|
||||
parent.contents.location.href = url.substr(0,pos) + "&x=<?=$x?>&y=<?=$y?>";
|
||||
}
|
||||
else
|
||||
{
|
||||
parent.contents.location.href = url + "&x=<?=$x?>&y=<?=$y?>";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if ((typeof(alarm) != "undefined") && (alarm != ""))
|
||||
{
|
||||
window.status=alarm;
|
||||
alert(alarm);
|
||||
window.status="";
|
||||
}
|
||||
if (typeof(status) != "undefined")
|
||||
{
|
||||
window.status=status;
|
||||
if (status == refresh_bsstree_string)
|
||||
no_of_refresh=5;
|
||||
}
|
||||
if ((typeof(mode) != "undefined") && (mode == "newbss"))
|
||||
{
|
||||
no_of_refresh=1;
|
||||
}
|
||||
|
||||
if (no_of_refresh > 0)
|
||||
{
|
||||
if (no_of_refresh++ < 10)
|
||||
{
|
||||
//refresh every 5 seconds and repeat for X times
|
||||
timeout_handle = setTimeout(show_status,5000); // 5 sec
|
||||
parent.contents.location.href=parent.contents.location;
|
||||
}
|
||||
else
|
||||
{
|
||||
clearTimeout(timeout_handle);
|
||||
timeout_handle = null;
|
||||
}
|
||||
}
|
||||
//else
|
||||
// window.status="";
|
||||
}
|
||||
//-->
|
||||
</SCRIPT>
|
||||
</head>
|
||||
<frameset rows="71%,*" frameborder=0 framespacing=0 onLoad='show_status("<?=$status?>","<?=$alarm?>","<?=$mode?>")'>
|
||||
<!-- <frame name=contents framespacing=0 marginwidth=5 marginheight=0 noresize target='upper'
|
||||
src='bssstatus.php?language=<?=$language?>&bssid=<?=$bssid?>'>;-->
|
||||
<frame name=contents framespacing=0 marginwidth=5 marginheight=0 noresize target='upper'
|
||||
src=''>;
|
||||
<frame name="bottom" framespacing=0 marginwidth=5 marginheight=0 src="bssfuncinfo.php?language=<?=$language?>&bssid=<?=$bssid?>">
|
||||
<noframes>
|
||||
<body>
|
||||
<p>This page uses frames, but your browser doesn't support them.</p>
|
||||
</body>
|
||||
</noframes>
|
||||
</frameset>
|
||||
</frameset>
|
||||
</html>
|
||||
40
wxc2_omc/configuration/bssomc/bssfuncinfo.inc
Executable file
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
$gbnamearray = Array(
|
||||
confirmquestionbegin => "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ҫ",
|
||||
confirmquestionend => "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>",
|
||||
name => "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>",
|
||||
ipaddress => "IP <20><>ַ",
|
||||
swversion => "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>汾",
|
||||
remarks => "<EFBFBD><EFBFBD>ע",
|
||||
delbts => "ɾ<EFBFBD><EFBFBD> BTS",
|
||||
addbts => "<EFBFBD><EFBFBD><EFBFBD><EFBFBD> BTS",
|
||||
upload => "<EFBFBD><EFBFBD><EFBFBD>ز<EFBFBD><EFBFBD><EFBFBD>",
|
||||
download => "<EFBFBD><EFBFBD><EFBFBD>ز<EFBFBD><EFBFBD><EFBFBD>",
|
||||
cfgupload => "<EFBFBD><EFBFBD><EFBFBD>ݿⱸ<EFBFBD><EFBFBD>",
|
||||
cfgdownload => "<EFBFBD><EFBFBD><EFBFBD>ݿ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>",
|
||||
swdownload => "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>",
|
||||
deletebss => "ɾ <20><> BSS ",
|
||||
backupdb => "BSC<EFBFBD><EFBFBD><EFBFBD>ݿⱸ<EFBFBD><EFBFBD>",
|
||||
//statistics => "<22><><EFBFBD><EFBFBD>ͳ<EFBFBD><CDB3>",
|
||||
showalarm => "<EFBFBD>鿴<EFBFBD>澯"
|
||||
);
|
||||
$engnamearray = Array(
|
||||
confirmquestionbegin => "Are you sure you want to ",
|
||||
confirmquestionend => "?",
|
||||
name => "Name",
|
||||
ipaddress => "IP Address",
|
||||
swversion => "Software Version",
|
||||
remarks => "Remarks",
|
||||
delbts => "DEL BTS",
|
||||
addbts => "ADD BTS",
|
||||
upload => "Get All",
|
||||
download => "Data Dnload",
|
||||
cfgupload => "Back Up",
|
||||
cfgdownload => "Restore",
|
||||
swdownload => "SW Upload",
|
||||
deletebss => "Delete BSS",
|
||||
backupdb => "Backup DB",
|
||||
//statistics => "Statistics",
|
||||
showalarm => "Show Alarm"
|
||||
);
|
||||
?>
|
||||
197
wxc2_omc/configuration/bssomc/bssfuncinfo.php
Executable file
@@ -0,0 +1,197 @@
|
||||
<?php
|
||||
//
|
||||
// Created on: 22 Feb 2001
|
||||
// Usage : bssstatusinfo.php?language="eng|gb"&bssid=0
|
||||
//
|
||||
// Function : Special operation for BssFunc including
|
||||
// -> BTS creation/deletion
|
||||
// -> Show Alarms
|
||||
//
|
||||
// bssfunc.php ___ bssstatus.php (upper)
|
||||
// \__ bssfuncinfo.php (bottom)
|
||||
//
|
||||
?>
|
||||
<?php
|
||||
include("nocache.inc");
|
||||
include("bssfuncinfo.inc");
|
||||
if (!isset($language))
|
||||
$language="eng";
|
||||
$parameter="${language}namearray";
|
||||
|
||||
?>
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<?php
|
||||
include("header.inc");
|
||||
include("login_parm.inc");
|
||||
|
||||
$db = mysql_connect($hostname, $username, $password);
|
||||
mysql_select_db($dbname,$db);
|
||||
$sqlstring = "SELECT a.ip,b.Label as name,a.connected from OMCR_BSSTABLE as a, OMCR_BssFunc as b " .
|
||||
"WHERE a.bssid=$bssid and b.bssid=$bssid";
|
||||
//echo "$sqlstring <BR>";
|
||||
$result = mysql_query($sqlstring,$db) or
|
||||
die("Invalid query: $sqlstring\n" . mysqli_error($pubConn));
|
||||
while ( $row = mysqli_fetch_row($result) )
|
||||
{
|
||||
list($ip,$name,$connected) = $row;
|
||||
}
|
||||
if (mysqli_num_rows($result) != 1)
|
||||
{
|
||||
echo "Problem in OMCR database\n";
|
||||
return;
|
||||
}
|
||||
|
||||
$sqlstring = "SELECT ObjectId,Presence from OMCR_BSSTREE " .
|
||||
"WHERE bssid=$bssid and ObjectId REGEXP 'BtsMgr.[1-9]'";//read BtsMgr.1~12 from BssTree
|
||||
//echo "$sqlstring <BR>";
|
||||
$result = mysql_query($sqlstring,$db) or
|
||||
die("Invalid query: $sqlstring\n" . mysqli_error($pubConn));
|
||||
while ( $row = mysqli_fetch_row($result) )
|
||||
{
|
||||
list($btsid[],$presence[]) = $row;
|
||||
}
|
||||
|
||||
$sqlstring = "SELECT CurrentBuildDir from OMCR_Software WHERE bssid=$bssid";
|
||||
//echo "$sqlstring <BR>";
|
||||
$result = mysql_query($sqlstring,$db) or
|
||||
die("Invalid query: $sqlstring\n" . mysqli_error($pubConn));
|
||||
list($build) = mysqli_fetch_row($result);
|
||||
if ($build == "''")
|
||||
{
|
||||
echo "<META HTTP-EQUIV=Refresh content=2>";
|
||||
}
|
||||
//else
|
||||
// echo "ABCD${build}EFG";
|
||||
?>
|
||||
<SCRIPT Language="JavaScript" type="text/javascript">
|
||||
<!--
|
||||
function modify(obj,nmicmd,nmiinput)
|
||||
{
|
||||
window.status = "<?=${$parameter}[confirmquestionbegin]?>"
|
||||
+ obj.value + "<?=${$parameter}[confirmquestionend]?>";
|
||||
answer = confirm("<?=${$parameter}[confirmquestionbegin]?>"
|
||||
+ obj.value + "<?=${$parameter}[confirmquestionend]?>");
|
||||
window.status = "";
|
||||
if (answer == true)
|
||||
{
|
||||
if(typeof(nmiinput) == 'object')
|
||||
nmicmd=nmicmd+"\""+nmiinput.value+"\"";
|
||||
|
||||
window.parent.location.href = "modify.php?url=bssfunc.php" +
|
||||
"&language=<?=$language?>" +
|
||||
"&bssid=<?=$bssid?>" +
|
||||
"&objectid=BssFunc" +
|
||||
"&nmicommand=" + nmicmd +
|
||||
"&timeout=90";
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
//-->
|
||||
</SCRIPT>
|
||||
<title>BS Plus</title>
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<TABLE border=1 bordercolor=#FFFFFF width=124 cellspacing=0>
|
||||
<FORM name=object_form method=post action=modify.php>
|
||||
<TR>
|
||||
<TD width="57" valign="top"><?=${$parameter}[name]?></TD>
|
||||
<TD valign="top"><INPUT name=bssname type=text size=20 value='<?=$name?>'>
|
||||
<INPUT type=button value='Set' name=setbssname style='width: 30' class=chinese onClick='modify(this.document.object_form.setbssname, "set Label=",this.document.object_form.bssname);'></TD>
|
||||
<TD bordercolor=#00FFFF valign=top rowspan=4>
|
||||
<?php
|
||||
$no_of_bts = count($btsid);
|
||||
echo "<TABLE border=0>\n";
|
||||
echo "<TR>";
|
||||
for ($i=0; $i<$no_of_bts; $i++)
|
||||
{
|
||||
echo "<TD>";
|
||||
$id=substr($btsid[$i],7);
|
||||
if ($presence[$i])
|
||||
echo "<INPUT type=button value='" . ${$parameter}[delbts] .
|
||||
" " . $id . "' name=delbts$id style='width: 95' class=chinese" .
|
||||
" onClick='modify(this.document.object_form.delbts$id, \"delete BtsMgr \" + $id);'>";
|
||||
//" onClick='javascript:parent.location.href=\"modify.php?" .
|
||||
//"url=bssfunc.php&language=$language" .
|
||||
//"&bssid=$bssid&objectid=BssFunc&nmicommand=delete BtsMgr $id&timeout=30\";'>";
|
||||
else
|
||||
echo "<INPUT type=button value='" . ${$parameter}[addbts] .
|
||||
" " . $id . "' name=addbts$id style='width: 95' class=chinese" .
|
||||
" onClick='modify(this.document.object_form.addbts$id, \"create BtsMgr \" + $id);'>";
|
||||
//" onClick='javascript:parent.location.href=\"modify.php?" .
|
||||
//"url=bssfunc.php&language=$language" .
|
||||
//"&bssid=$bssid&objectid=BssFunc&nmicommand=create BtsMgr $id&timeout=30\";'>";
|
||||
echo "</TD>";
|
||||
//if ($i && $i%2)
|
||||
if (! (($i+1)%3))
|
||||
echo "</TR><TR>\n";
|
||||
}
|
||||
echo "</TR></TABLE>\n";
|
||||
echo "</TD>";
|
||||
|
||||
?>
|
||||
</TR>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD width="57" valign="top"><?=${$parameter}[ipaddress]?></TD>
|
||||
<TD valign="top">
|
||||
<INPUT type="text" size="20" value='<?=$ip?>' readonly></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD width="57" valign="top" nowrap><?=${$parameter}[swversion]?></TD>
|
||||
<TD valign="top"><?=$build?></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD width="57" valign="top"></TD>
|
||||
<TD valign="top">
|
||||
<NOBR>
|
||||
<!--INPUT type=button style='width: 85' value='<?=${$parameter}[statistics]?>' name=statistics
|
||||
class=chinese onClick='javascript:window.parent.parent.location.href=
|
||||
"btsmeasframe.php?language=<?=$language?>&bssid=<?=$bssid?>";'-->
|
||||
<!--INPUT type=button style='width: 85' value='<?=${$parameter}[upload]?>'
|
||||
class=chinese onClick='javascript:parent.location.href=
|
||||
"modify.php?url=bssfunc.php&language=<?=$language?>&bssid=<?=$bssid?>&objectid=BssFunc&nmicommand=upload <?=$bssid?>&timeout=15";'-->
|
||||
<!--INPUT type=button style='width: 85' value='<?=${$parameter}[upload]?>'
|
||||
class=chinese onClick='javascript:window.parent.parent.location.href=
|
||||
"data_upload.php?language=<?=$language?>&bssid=<?=$bssid?>";'-->
|
||||
<?php
|
||||
|
||||
echo "<INPUT type=button style='width: 85' value='" . ${$parameter}[upload] .
|
||||
"' name=upload style='width: 95' class=chinese" .
|
||||
" onClick='modify(this.document.object_form.upload, \"upload \" + $id);'>";
|
||||
?>
|
||||
<!--INPUT type=button style='width: 85' value='<?=${$parameter}[download]?>' name=download
|
||||
class=chinese onClick='javascript:window.parent.parent.location.href=
|
||||
"data_download.php?language=<?=$language?>&bssid=<?=$bssid?>";'>
|
||||
<INPUT type=button style='width: 85' value='<?=${$parameter}[showalarm]?>' class=chinese
|
||||
onClick='javascript:window.parent.parent.location.href="alarmframe.php?language=<?=$language?>&bssid=<?=$bssid?>";'-->
|
||||
<INPUT type=button style='width: 85' value='--' class=chinese disabled>
|
||||
<!--<INPUT type=button style='width: 85' value='<?=${$parameter}[swdownload]?>' class=chinese onClick='javascript:parent.location.href="sw_download.php?language=<?=$language?>&bssid=<?=$bssid?>&version=<?
|
||||
if ($build == "''")
|
||||
echo "-";
|
||||
else
|
||||
echo "$build";
|
||||
?>";'>-->
|
||||
</NOBR>
|
||||
<HR size=1 color=#00FFFF>
|
||||
<INPUT type=button style='width: 85' value='<?=${$parameter}[cfgupload]?>' class=chinese onClick='javascript:parent.location.href="cfg_upload.php?language=<?=$language?>&bssid=<?=$bssid?>&version=<?
|
||||
if ($build == "''")
|
||||
echo "-";
|
||||
else
|
||||
echo "$build";
|
||||
?>";'>
|
||||
<INPUT type=button style='width: 85' value='<?=${$parameter}[cfgdownload]?>' class=chinese onClick='javascript:parent.location.href="cfg_download.php?language=<?=$language?>&bssid=<?=$bssid?>&version=<?
|
||||
if ($build == "''")
|
||||
echo "-";
|
||||
else
|
||||
echo "$build";
|
||||
?>";'>
|
||||
|
||||
</TD>
|
||||
</TD>
|
||||
</TR>
|
||||
</FORM>
|
||||
</TABLE>
|
||||
</BODY>
|
||||
</HTML>
|
||||
14
wxc2_omc/configuration/bssomc/bssstatus.inc
Executable file
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
$gbnamearray = Array(
|
||||
bssstatus => "BSS ״̬",
|
||||
critical => "һ<EFBFBD><EFBFBD><EFBFBD>澯",
|
||||
major => "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>澯",
|
||||
normal => "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
|
||||
);
|
||||
$engnamearray = Array(
|
||||
bssstatus => "BSS STATUS",
|
||||
critical => "-CRITICAL-",
|
||||
major => "-MAJOR-",
|
||||
normal => "-NORMAL-"
|
||||
);
|
||||
?>
|
||||
331
wxc2_omc/configuration/bssomc/bssstatus.php
Executable file
@@ -0,0 +1,331 @@
|
||||
<?php
|
||||
//
|
||||
// Created on: 22 Feb 2001
|
||||
// Usage : bssstatus.php?bssid=0
|
||||
//
|
||||
// Function : To display updated alarm status for a BSS
|
||||
//
|
||||
// Remarks : 1. This page is required to refresh until dismiss
|
||||
// 2. Critical and major alarms are represented by "down" image.
|
||||
// Minor alarms are represented by "warning" image.
|
||||
// Warning is not seen on the status diagram.
|
||||
//
|
||||
// bssfunc.php ___ bssstatus.php (upper)
|
||||
// \__ bssfuncinfo.php (bottom)
|
||||
//
|
||||
// ________________________ ____ ___
|
||||
// |100|101|200|201|300|301| .. |k01| ^
|
||||
// | |102| |202| |302| |k02| |
|
||||
// ------------------------ --- |
|
||||
// |110|111|210|211|310|311| |k11| |
|
||||
// | |112| |212| |312| |k12| j rows
|
||||
// .. .. .. .. .. .. |
|
||||
// .. .. .. .. .. .. |
|
||||
// |1j0|1j1|2j0|2j1|3j0|3j1| |kj1| |
|
||||
// | |1j2| |2j2| |3j2| |kj2| v
|
||||
// `------------------------ ---- ---
|
||||
//
|
||||
// ________________________ ____ ___
|
||||
// |400|401|500|501|600|601| .. |k01| ^
|
||||
// | |402| |502| |602| |k02| |
|
||||
// ------------------------ --- |
|
||||
// |410|411|510|511|610|611| |k11| |
|
||||
// | |412| |512| |612| |k12| j rows
|
||||
// .. .. .. .. .. .. |
|
||||
// .. .. .. .. .. .. |
|
||||
// |4j0|4j1|5j0|5j1|6j0|6j1| |kj1| |
|
||||
// | |4j2| |5j2| |6j2| |kj2| v
|
||||
// `------------------------ ---- ---
|
||||
?>
|
||||
<?php
|
||||
include("nocache.inc");
|
||||
include("bssstatus.inc");
|
||||
if (!isset($language))
|
||||
$language="eng";
|
||||
$parameter="${language}namearray";
|
||||
include("header.inc");
|
||||
?>
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<META HTTP-EQUIV="Refresh" content="10">
|
||||
<title>BSS Status</title>
|
||||
</HEAD>
|
||||
<BODY>
|
||||
|
||||
<B><FONT color="#0000FF"><?=${$parameter}[bssstatus]?></FONT></B><BR>
|
||||
<?php
|
||||
include("login_parm.inc");
|
||||
include("alarmimage.inc");
|
||||
|
||||
$db = mysql_connect($hostname, $username, $password);
|
||||
mysql_select_db($dbname,$db);
|
||||
|
||||
$sqlstring = "SELECT ObjectId, Signal_Element, MaxSeverity " .
|
||||
"from OMCR_BSSTREE WHERE bssid=$bssid AND Presence=1";
|
||||
//echo "$sqlstring <BR>";
|
||||
$result = mysql_query($sqlstring,$db) or
|
||||
die("Invalid query: $sqlstring\n" . mysqli_error($pubConn));
|
||||
while ( $row = mysqli_fetch_row($result) )
|
||||
{
|
||||
list($objectid[],$signal_element[],$maxseverity[]) = $row;
|
||||
}
|
||||
$no_of_objects = mysqli_num_rows($result);
|
||||
|
||||
// Get the max severity for each display entity
|
||||
for ($i=0;$i<$no_of_objects;$i++)
|
||||
{
|
||||
//
|
||||
// if not exist, simple set it
|
||||
// or update alarm level if there is no alarm now
|
||||
// or update the alarm level if more severity alarm is found
|
||||
//
|
||||
if (!isset($alarmslot[$signal_element[$i]]))
|
||||
$alarmslot[$signal_element[$i]] = $maxseverity[$i];
|
||||
else if ($alarmslot[$signal_element[$i]] == 0)
|
||||
$alarmslot[$signal_element[$i]] = $maxseverity[$i];
|
||||
else if (($alarmslot[$signal_element[$i]] > $maxseverity[$i]) && ($maxseverity[$i] <>0))
|
||||
$alarmslot[$signal_element[$i]] = $maxseverity[$i];
|
||||
}
|
||||
if (!isset($alarmslot))
|
||||
return;
|
||||
|
||||
//while (list($key,$val) = each($alarmslot))
|
||||
// echo "$key => $val <br>";
|
||||
|
||||
$no_of_daisychain=4;
|
||||
$no_of_iwbox=3; // BSC+BTS1+BTS2+BTS3
|
||||
$no_of_slots=5; // IWP+E1+E1+TRX4+TRX6 = 5 slots
|
||||
$no_of_bsc_slots=9;
|
||||
echo "<TABLE border=0 cellspacing=0 cellpadding=0>\n";
|
||||
echo "<TR>";
|
||||
echo "<TD width=25%>";
|
||||
echo "<TABLE border=0 cellspacing=0 cellpadding=0>\n";
|
||||
|
||||
$i=0;
|
||||
for ($j=0;$j<$no_of_bsc_slots;$j++)
|
||||
{
|
||||
echo "<TR>\n";
|
||||
for ($k=0;$k<=1;$k++)
|
||||
{
|
||||
$persignal_element[$k]=""; // reset to empty in each round
|
||||
$perseverity[$k]=""; // reset to empty in each round
|
||||
$index="${i}${j}${k}";
|
||||
//echo "index=$index;";
|
||||
if ( !isset($alarmslot[$index]) ) // Not presence
|
||||
$image[$k] = "";
|
||||
//$image[$k] = $white;
|
||||
else if (( $alarmslot[$index] == 0) || // No alarm/warning/minor
|
||||
($alarmslot[$index] > 2))
|
||||
{
|
||||
$imagename = "img${index}_up";
|
||||
$image[$k] = ${$imagename};
|
||||
}
|
||||
else if ( $alarmslot[$index] == 1) // Alarmed if Critical
|
||||
{
|
||||
$imagename = "img${index}_down";
|
||||
//echo "imagename=$imagename";
|
||||
$image[$k] = ${$imagename};
|
||||
$persignal_element[$k]="&perSignal_Element=$index";
|
||||
//$perseverity[$k]="&perSeverity=1";
|
||||
$perseverity[$k]=htmlspecialchars("&perSeverity==1");
|
||||
}
|
||||
else if ( $alarmslot[$index] == 2) // warned if Major
|
||||
{
|
||||
$imagename = "img${index}_warn";
|
||||
$image[$k] = ${$imagename};
|
||||
$persignal_element[$k]="&perSignal_Element=$index";
|
||||
//$perseverity[$k]="&perSeverity=2";
|
||||
$perseverity[$k]=htmlspecialchars("&perSeverity==2");
|
||||
}
|
||||
}
|
||||
|
||||
// if the machine exist, print empty slot for not existing object
|
||||
if (( $image[0] == "") && isset($alarmslot["${i}00"]))
|
||||
{
|
||||
echo "<TD rowspan=2 width=87 height=15>$slot</TD>\n";
|
||||
//echo "<TD rowspan=2 width=87 height=15>${i}00</TD>\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($persignal_element[0] == "")
|
||||
echo "<TD rowspan=2 width=87 height=15>$image[0]</TD>\n";
|
||||
else
|
||||
echo "<TD rowspan=2 width=87 height=15><A onClick='javascript:parent.parent.location.href=\"alarmframe.php?language=$language&bssid=$bssid&perBssid=$bssid$persignal_element[0]$perseverity[0]\"'>$image[0]</A></TD>\n";
|
||||
}
|
||||
if ($persignal_element[1] == "")
|
||||
echo "<TD width=87 height=7>$image[1]</TD>\n";
|
||||
else
|
||||
echo "<TD width=87 height=7><A onClick='javascript:parent.parent.location.href=\"alarmframe.php?language=$language&bssid=$bssid&perBssid=$bssid$persignal_element[1]$perseverity[1]\"'>$image[1]</A></TD>\n";
|
||||
|
||||
echo "</TR>\n";
|
||||
echo "<TR>\n";
|
||||
|
||||
$k = 2;
|
||||
$index="${i}${j}${k}";
|
||||
if ( !isset($alarmslot[$index]) ) // Not presence
|
||||
$image[$k] = "";
|
||||
//$image[$k] = $white;
|
||||
else if (( $alarmslot[$index] == 0) || // No alarm
|
||||
( $alarmslot[$index] >= 3))
|
||||
{
|
||||
$imagename = "img${index}_up";
|
||||
$image[$k] = ${$imagename};
|
||||
}
|
||||
else if ( $alarmslot[$index] < 3) // Alarmed
|
||||
{
|
||||
$imagename = "img${index}_down";
|
||||
$image[$k] = ${$imagename};
|
||||
}
|
||||
else if ( $alarmslot[$index] > 0) // warning
|
||||
{
|
||||
$imagename = "img${index}_warn";
|
||||
$image[$k] = ${$imagename};
|
||||
}
|
||||
echo "<TD width=87 height=7>$image[2]</TD>\n";
|
||||
echo "</TR>\n";
|
||||
}
|
||||
|
||||
echo "</TABLE>\n";
|
||||
echo "</TD>";
|
||||
echo "<TD>";
|
||||
echo "<TABLE border=0 cellspacing=0 cellpadding=0>\n";
|
||||
for ($l=0;$l<$no_of_daisychain;$l++)
|
||||
{
|
||||
for ($j=0;$j<$no_of_slots;$j++)
|
||||
{
|
||||
echo "<TR>\n";
|
||||
for ($i=1;$i<=$no_of_iwbox;$i++)
|
||||
{
|
||||
for ($k=0;$k<=1;$k++)
|
||||
{
|
||||
$persignal_element[$k]=""; // reset to empty in each round
|
||||
$btsno=$i+$l*$no_of_iwbox;
|
||||
$index="${btsno}${j}${k}";
|
||||
if ( !isset($alarmslot[$index]) ) // Not presence
|
||||
$image[$k] = "";
|
||||
//$image[$k] = $white;
|
||||
else if (( $alarmslot[$index] == 0) || // No alarm/warning/minor
|
||||
($alarmslot[$index] > 2))
|
||||
{
|
||||
$imagename = "img${index}_up";
|
||||
$image[$k] = ${$imagename};
|
||||
}
|
||||
else if ( $alarmslot[$index] == 1) // Alarmed if Critical
|
||||
{
|
||||
$imagename = "img${index}_down";
|
||||
$image[$k] = ${$imagename};
|
||||
$persignal_element[$k]="&perSignal_Element=$index";
|
||||
//$perseverity[$k]="&perSeverity=1";
|
||||
$perseverity[$k]=htmlspecialchars("&perSeverity==1");
|
||||
}
|
||||
else if ( $alarmslot[$index] == 2) // warned if Major
|
||||
{
|
||||
$imagename = "img${index}_warn";
|
||||
$image[$k] = ${$imagename};
|
||||
$persignal_element[$k]="&perSignal_Element=$index";
|
||||
//$perseverity[$k]="&perSeverity=2";
|
||||
$perseverity[$k]=htmlspecialchars("&perSeverity==2");
|
||||
}
|
||||
}
|
||||
|
||||
// if the machine exist, print empty slot for not existing object
|
||||
if ( $image[0] == "")
|
||||
{
|
||||
if (isset($alarmslot["${btsno}00"]))
|
||||
{
|
||||
echo "<TD rowspan=2 width=87 height=15>$slot</TD>\n";
|
||||
//echo "<TD rowspan=2 width=87 height=15>${i}00</TD>\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($j == 0)
|
||||
echo "<TD rowspan=2>$whiteslot</TD>\n";
|
||||
else
|
||||
echo "<TD rowspan=2 width=87 height=15></TD>\n";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($persignal_element[0] == "")
|
||||
echo "<TD rowspan=2 width=87 height=15>$image[0]</TD>\n";
|
||||
else
|
||||
echo "<TD rowspan=2 width=87 height=15><A onClick='javascript:parent.parent.location.href=\"alarmframe.php?language=$language&bssid=$bssid&perBssid=$bssid$persignal_element[0]$perseverity[0]\"'>$image[0]</A></TD>\n";
|
||||
}
|
||||
|
||||
if ( $image[1] == "")
|
||||
{
|
||||
if ($j == 0)
|
||||
echo "<TD width=87>$white</TD>\n";
|
||||
else
|
||||
echo "<TD width=87 height=7></TD>\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($persignal_element[1] == "")
|
||||
echo "<TD width=87 height=7>$image[1]</TD>\n";
|
||||
else
|
||||
echo "<TD width=87 height=7><A onClick='javascript:parent.parent.location.href=\"alarmframe.php?language=$language&bssid=$bssid&perBssid=$bssid$persignal_element[1]$perseverity[1]\"'>$image[1]</A></TD>\n";
|
||||
}
|
||||
}
|
||||
/* end_of_for ($i=1;$i<=$no_of_iwbox;$i++) */
|
||||
|
||||
echo "</TR>\n";
|
||||
echo "<TR>\n";
|
||||
for ($i=1;$i<=$no_of_iwbox;$i++)
|
||||
{
|
||||
$k = 2;
|
||||
$index="${i}${j}${k}";
|
||||
if ( !isset($alarmslot[$index]) ) // Not presence
|
||||
{
|
||||
$image[$k] = "";
|
||||
//$image[$k] = $white;
|
||||
}
|
||||
else if (( $alarmslot[$index] == 0) || ( $alarmslot[$index] >= 3)) // No alarm
|
||||
{
|
||||
$imagename = "img${index}_up";
|
||||
$image[$k] = ${$imagename};
|
||||
}
|
||||
else if ( $alarmslot[$index] < 3) // Alarmed
|
||||
{
|
||||
$imagename = "img${index}_down";
|
||||
$image[$k] = ${$imagename};
|
||||
}
|
||||
else if ( $alarmslot[$index] > 0) // warning
|
||||
{
|
||||
$imagename = "img${index}_warn";
|
||||
$image[$k] = ${$imagename};
|
||||
}
|
||||
echo "<TD width=87 height=7>$image[2]</TD>\n";
|
||||
}
|
||||
/* end_of_for ($i=1;$i<=$no_of_iwbox;$i++) */
|
||||
echo "</TR>\n";
|
||||
}
|
||||
/* end_of_for ($j=0;$j<$no_of_slots;$j++) */
|
||||
|
||||
echo "<TR>\n";
|
||||
//if (isset($alarmslot["100"]))
|
||||
// echo "<TD align=center>BSC</TD><TD></TD>\n";
|
||||
//else
|
||||
// echo "<TD></TD><TD></TD>\n";
|
||||
|
||||
for ($i=1;$i<=$no_of_iwbox;$i++)
|
||||
{
|
||||
$btsno=$i+$l*$no_of_iwbox;
|
||||
if (isset($alarmslot["${btsno}00"]))
|
||||
echo "<TD align=center>BTS " . $btsno . "</TD><TD></TD>\n";
|
||||
else
|
||||
echo "<TD></TD><TD></TD>\n";
|
||||
}
|
||||
echo "</TR>";
|
||||
}
|
||||
echo "</TABLE>";
|
||||
echo "</TD>";
|
||||
echo "</TR>";
|
||||
echo "</TABLE>";
|
||||
echo "<CENTER>";
|
||||
//echo "______________________<BR>";
|
||||
echo "|<FONT color=red>{${$parameter}[critical]}</FONT>|<FONT color=orange>{${$parameter}[major]}</FONT>|<FONT color=blue>{${$parameter}[normal]}</FONT>|";
|
||||
echo "</CENTER>";
|
||||
?>
|
||||
</BODY>
|
||||
</HTML>
|
||||
201
wxc2_omc/configuration/bssomc/bsstable.php
Executable file
@@ -0,0 +1,201 @@
|
||||
<?php
|
||||
//
|
||||
// Created on: 22 Feb 2001
|
||||
// Usage : bsstable.php?language="eng|gb"
|
||||
// &local_sys_id=0
|
||||
// &remote_sys_id=0 <-- This is bssid
|
||||
// &start_ip=0 <-- This is BSS IP
|
||||
// &remark=0
|
||||
// &local_E1=0
|
||||
// [&ReturnURL=abc.php]
|
||||
//
|
||||
// Function : Connect to a new BSS and update OMCR_BSSTABLE
|
||||
//
|
||||
//
|
||||
// MySQL table: OMCR_BSSTABLE
|
||||
// ../switch_keep/device_list/device_list.php -->
|
||||
// bsstable.php --> device_list.php --> modifyBssParam.php
|
||||
//
|
||||
// Return:
|
||||
// device_list.php?save=1
|
||||
// &local_sys_id=0
|
||||
// &remote_sys_id=x <-- This is bssid
|
||||
// &start_ip=x <-- This is BSS IP
|
||||
// &remark=x
|
||||
// &local_E1=x
|
||||
// OR
|
||||
// device_list.php?save=-1
|
||||
// &local_sys_id=0
|
||||
// &remote_sys_id=x <-- This is bssid
|
||||
// &start_ip=x <-- This is BSS IP
|
||||
// &remark=x
|
||||
// &local_E1=x
|
||||
// &err_info=Wrong IP|Wrong BSSID
|
||||
//
|
||||
?>
|
||||
<?php
|
||||
include("nocache.inc");
|
||||
$DEBUG = 0;
|
||||
|
||||
$bssIdArr=explode('_',$sysId);
|
||||
$bssid = $bssIdArr[1] -0; // convert to integer
|
||||
|
||||
|
||||
if($DEBUG)
|
||||
{
|
||||
echo "Incomplete information<BR>";
|
||||
echo "mode=$mode<BR>";
|
||||
echo "sysId=$sysId<BR>";
|
||||
echo "ip=$ip<BR>";
|
||||
echo "bssid = $bssid<BR>";
|
||||
}
|
||||
|
||||
$baseUrl="../configuration/systemList/systemConf.php?bssId=$bssid&mode=add&sysId=$sysId&ip=$ip&sysAlias=$remark";
|
||||
|
||||
//check in url
|
||||
if(strlen($sysId) < 5 || $bssIdArr[1] == '' || $mode !='add'){
|
||||
$errorInfo = "This url's value error!";
|
||||
if($DEBUG) echo "<br>errorInfo=$errorInfo";
|
||||
$errorInfo=rawurlencode($errorInfo);
|
||||
$returnUrl=$baseUrl.'&errorInfo='.$errorInfo;
|
||||
if($DEBUG) echo "<br>returnUrl=$returnUrl";
|
||||
if(!$DEBUG) echo " <meta http-equiv=\"refresh\" content=\"0; url=$returnUrl\"> ";
|
||||
exit();
|
||||
}
|
||||
|
||||
include("login_parm.inc");
|
||||
$db = mysql_connect($hostname, $username, $password);
|
||||
mysql_select_db($dbname,$db);
|
||||
|
||||
//check ip and bssid if have be created
|
||||
$sqlstring = "SELECT bssid,ip FROM OMCR_BSSTABLE WHERE ip!='' AND bssid ='$bssid'";
|
||||
if($DEBUG) echo "$sqlstring<BR>";
|
||||
$resultSet = @mysql_query($sqlstring,$db);
|
||||
$resultRowNum = @mysqli_num_rows($resultSet);
|
||||
if($resultRowNum > 0){
|
||||
$resultRows=mysqli_fetch_array($resultSet);
|
||||
$bssId=$resultRows[bssid];
|
||||
$ip=$resultRows[ip];
|
||||
$sysId='500_'. $bssid.'_0';
|
||||
$returnUrl=$baseUrl;
|
||||
if($DEBUG) echo "<br>returnUrl=$returnUrl";
|
||||
if(!$DEBUG) echo " <meta http-equiv=\"refresh\" content=\"0; url=$returnUrl\"> ";
|
||||
exit();
|
||||
}
|
||||
|
||||
//
|
||||
// Find the available row in OMCR_COMMAND to insert nmi commands
|
||||
// Get 10 available and insert 1 nmi commands
|
||||
// 1. newbss <bssid> <ip addr>
|
||||
//
|
||||
|
||||
$parm_name = split(",",$modified_data);
|
||||
$nmicmd="newbss $bssid $ip";
|
||||
|
||||
/* Old MySql */
|
||||
$sqlstring = "SELECT row_no FROM OMCR_COMMAND WHERE status=0 " .
|
||||
"ORDER BY seqNum ASC LIMIT 10";
|
||||
//echo "$sqlstring<BR>";
|
||||
$res = mysql_query($sqlstring ,$db) or
|
||||
die("Invalid query:$sqlstring\n" . mysqli_error($pubConn));
|
||||
while (list($row_no[]) = mysqli_fetch_row($res));
|
||||
$no_of_rows = mysqli_num_rows($res);
|
||||
mysql_free_result($res);
|
||||
|
||||
if ( $no_of_rows <= 0 || ($no_of_rows > 10) )
|
||||
{
|
||||
//
|
||||
// No available row in OMCR_COMMAND
|
||||
// Send error to MySQL()
|
||||
//
|
||||
$errorInfo = "Command table is full: Wait and send the command again";
|
||||
if($DEBUG) echo "<br>errorInfo=$errorInfo";
|
||||
$errorInfo=rawurlencode($errorInfo);
|
||||
$returnUrl=$baseUrl.'&errorInfo='.$errorInfo;
|
||||
if($DEBUG) echo "<br>returnUrl=$returnUrl";
|
||||
if(!$DEBUG) echo " <meta http-equiv=\"refresh\" content=\"0; url=$returnUrl\"> ";
|
||||
exit();
|
||||
}
|
||||
|
||||
//
|
||||
// Save "Name and remark" in OMCR_BSSTABLE
|
||||
// A non-null IP field in OMCR_BSSTABLE means the entry is valid
|
||||
//
|
||||
$sqlstring = "UPDATE OMCR_BSSTABLE SET name='BSS$bssid', ip='$ip'," .
|
||||
"remark='$remark' WHERE bssid=$bssid";
|
||||
if($DEBUG) echo "$sqlstring<BR>";
|
||||
$res = mysql_query($sqlstring ,$db) or
|
||||
die("Invalid query:$sqlstring\n" . mysqli_error($pubConn));
|
||||
|
||||
//
|
||||
// Insert 1 commands in OMCR_COMMAND out of 10 possible available rows
|
||||
//
|
||||
$i=0;
|
||||
do
|
||||
{
|
||||
if ($row_no[$i] != '')
|
||||
{
|
||||
$sqlstring = "REPLACE INTO OMCR_COMMAND VALUES(" .
|
||||
$row_no[$i] . ",-1,'$nmicmd',null,255,-1,null,null,null)";
|
||||
if($DEBUG) echo "$sqlstring<BR>";
|
||||
$res = mysql_query($sqlstring ,$db) or
|
||||
die("Invalid query:$sqlstring\n" . mysqli_error($pubConn));
|
||||
}
|
||||
$i++;
|
||||
} while ($i<10 && mysql_affected_rows() != 2); //replace=delete+insert (2 task)
|
||||
|
||||
$cmd1_row_no = $row_no[$i-1];
|
||||
|
||||
//
|
||||
// Wait for response: timeout after 500ms x 20 = 10 secs
|
||||
//
|
||||
$i=0;
|
||||
while ($i<20)
|
||||
{
|
||||
usleep(500000);
|
||||
$sqlstring = "SELECT result,response from OMCR_COMMAND WHERE status=0 AND " .
|
||||
"row_no=$cmd1_row_no ORDER BY seqNum ASC";
|
||||
if($DEBUG) echo "$sqlstring<BR>";
|
||||
$res = mysql_query($sqlstring ,$db) or
|
||||
die("Invalid query:$sqlstring\n" . mysqli_error($pubConn));
|
||||
while ( $mydata = mysqli_fetch_row($res) )
|
||||
list($result[],$response[]) = $mydata;
|
||||
//list($a[],$b[],$c[],$d[],$e[],$f[],$result[],$response[]) = $mydata;
|
||||
$no_of_rows = mysqli_num_rows($res);
|
||||
mysql_free_result($res);
|
||||
|
||||
if ($no_of_rows == 1)
|
||||
{
|
||||
if ($result[0] != 'ok')
|
||||
{
|
||||
// Create/Delete failed !!!
|
||||
$errorInfo = "$result[0]: $response[0]";
|
||||
if($DEBUG) echo "<br>errorInfo=$errorInfo";
|
||||
$errorInfo=rawurlencode($errorInfo);
|
||||
$returnUrl=$baseUrl.'&errorInfo='.$errorInfo;
|
||||
if($DEBUG) echo "<br>returnUrl=$returnUrl";
|
||||
if(!$DEBUG) echo " <meta http-equiv=\"refresh\" content=\"0; url=$returnUrl\"> ";
|
||||
exit();
|
||||
}else{
|
||||
// Success !!!
|
||||
$returnUrl=$baseUrl;
|
||||
echo " <meta http-equiv=\"refresh\" content=\"0; url=$returnUrl\"> ";
|
||||
exit();
|
||||
}
|
||||
return;
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
|
||||
//
|
||||
// Server has no response
|
||||
// OMCR_COMMAND.status did not change to zero before timeout
|
||||
//
|
||||
$errorInfo = "No response";
|
||||
if($DEBUG) echo "<br>errorInfo=$errorInfo";
|
||||
$errorInfo=rawurlencode($errorInfo);
|
||||
$returnUrl=$baseUrl.'&errorInfo='.$errorInfo;
|
||||
if($DEBUG) echo "<br>returnUrl=$returnUrl";
|
||||
if(!$DEBUG) echo " <meta http-equiv=\"refresh\" content=\"0; url=$returnUrl\"> ";
|
||||
exit();
|
||||
?>
|
||||
158
wxc2_omc/configuration/bssomc/bsstable_old.php
Executable file
@@ -0,0 +1,158 @@
|
||||
<?php
|
||||
//
|
||||
// Created on: 22 Feb 2001
|
||||
// Usage : bsstable.php?language="eng|gb"&bssid=0
|
||||
// [&modified_data="Save is Completed]
|
||||
// Function : Connect to a new BSS and update OMCR_BSSTABLE
|
||||
//
|
||||
//
|
||||
// MySQL table: OMCR_BSSTABLE
|
||||
// newbss.php --> bsstable.php --> modifyBssParam.php
|
||||
//
|
||||
?>
|
||||
<?php
|
||||
include("nocache.inc");
|
||||
|
||||
//
|
||||
// if nothing has been modified, reload the original page
|
||||
//
|
||||
if ($modified_data == '')
|
||||
{
|
||||
header("Location: " .
|
||||
"newbss.php?language=$language&bssid=$bssid" .
|
||||
"&objectid=$objectid&tablename=$tablename" .
|
||||
"&status='Save not needed'"
|
||||
);
|
||||
return;
|
||||
}
|
||||
if (!$ip && !$bssid)
|
||||
{
|
||||
header("Location: " .
|
||||
"newbss.php?language=$language&bssid=$bssid" .
|
||||
"&objectid=$objectid&tablename=$tablename" .
|
||||
"&status='Too few parametes'"
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
//
|
||||
// Find the available row in OMCR_COMMAND to insert nmi commands
|
||||
// Get 10 available and insert 1 nmi commands
|
||||
// 1. newbss <bssid> <ip addr>
|
||||
//
|
||||
include("login_parm.inc");
|
||||
$db = mysql_connect($hostname, $username, $password);
|
||||
mysql_select_db($dbname,$db);
|
||||
|
||||
//$parm_name = split(",",$modified_data);
|
||||
$parm_name = explode(",",$modified_data);
|
||||
$nmicmd="newbss $bssid $ip";
|
||||
|
||||
$sqlstring = "SELECT row_no FROM OMCR_COMMAND WHERE status=0 " .
|
||||
"ORDER BY seqNum ASC LIMIT 10";
|
||||
//echo "$sqlstring<BR>";
|
||||
$res = mysql_query($sqlstring ,$db) or
|
||||
die("Invalid query:$sqlstring\n" . mysqli_error($pubConn));
|
||||
while (list($row_no[]) = mysqli_fetch_row($res));
|
||||
$no_of_rows = mysqli_num_rows($res);
|
||||
mysql_free_result($res);
|
||||
|
||||
if ( $no_of_rows <= 0 || ($no_of_rows > 10) )
|
||||
{
|
||||
//
|
||||
// No available row in OMCR_COMMAND
|
||||
// Send error to MySQL()
|
||||
//
|
||||
header("Location: " .
|
||||
"newbss.php?language=$language&bssid=$bssid" .
|
||||
"&objectid=$objectid&tablename=$tablename" .
|
||||
"&status='Command table is full: Wait and send the command again'"
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
//
|
||||
// Save "Name and remark" in OMCR_BSSTABLE
|
||||
// A non-null IP field in OMCR_BSSTABLE means the entry is valid
|
||||
//
|
||||
$sqlstring = "UPDATE OMCR_BSSTABLE SET name='$name',remark='$remark' " .
|
||||
"WHERE bssid=$bssid";
|
||||
//echo "$sqlstring<BR>";
|
||||
$res = mysql_query($sqlstring ,$db) or
|
||||
die("Invalid query:$sqlstring\n" . mysqli_error($pubConn));
|
||||
|
||||
//
|
||||
// Insert 1 commands in OMCR_COMMAND out of 10 possible available rows
|
||||
//
|
||||
$i=0;
|
||||
do
|
||||
{
|
||||
if ($row_no[$i] != '')
|
||||
{
|
||||
$sqlstring = "REPLACE INTO OMCR_COMMAND VALUES(" .
|
||||
$row_no[$i] . ",-1,'$nmicmd',null,255,-1,null,null,null)";
|
||||
//echo "$sqlstring<BR>";
|
||||
$res = mysql_query($sqlstring ,$db) or
|
||||
die("Invalid query:$sqlstring\n" . mysqli_error($pubConn));
|
||||
}
|
||||
$i++;
|
||||
} while ($i<10 && mysql_affected_rows() != 2);
|
||||
|
||||
$cmd1_row_no = $row_no[$i-1];
|
||||
|
||||
//
|
||||
// Wait for response: timeout after 500ms x 10 = 5 secs
|
||||
//
|
||||
$i=0;
|
||||
while ($i<20)
|
||||
{
|
||||
usleep(500000);
|
||||
$sqlstring = "SELECT result,response from OMCR_COMMAND WHERE status=0 AND " .
|
||||
"row_no=$cmd1_row_no ORDER BY seqNum ASC";
|
||||
//echo "$sqlstring<BR>";
|
||||
$res = mysql_query($sqlstring ,$db) or
|
||||
die("Invalid query:$sqlstring\n" . mysqli_error($pubConn));
|
||||
while ( $mydata = mysqli_fetch_row($res) )
|
||||
list($result[],$response[]) = $mydata;
|
||||
//list($a[],$b[],$c[],$d[],$e[],$result[],$response[]) = $mydata;
|
||||
$no_of_rows = mysqli_num_rows($res);
|
||||
mysql_free_result($res);
|
||||
|
||||
if ($no_of_rows == 1)
|
||||
{
|
||||
if ($result[0] != 'ok')
|
||||
{
|
||||
// Create/Delete failed !!!
|
||||
header("Location: " .
|
||||
"newbss.php?language=$language&bssid=$bssid" .
|
||||
"&objectid=$objectid" .
|
||||
"&tablename=$tablename" .
|
||||
"&status=$result[0]: $response[0]"
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Success !!!
|
||||
header("Location: " .
|
||||
"modifyBssParam.php?language=$language&bssid=$bssid" .
|
||||
"&objectid=$objectid" .
|
||||
"&tablename=$tablename" .
|
||||
"&mode=newbss" .
|
||||
"&status=Creation command is sent"
|
||||
);
|
||||
}
|
||||
return;
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
|
||||
//
|
||||
// Server has no response
|
||||
// OMCR_COMMAND.status did not change to zero before timeout
|
||||
//
|
||||
header("Location: " .
|
||||
"newbss.php?language=$language&bssid=$bssid" .
|
||||
"&objectid=$objectid&tablename=$tablename" .
|
||||
"&status=No response"
|
||||
);
|
||||
?>
|
||||
22
wxc2_omc/configuration/bssomc/bsstree.inc
Executable file
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
$gbnamearray = Array(
|
||||
noobj => "û<EFBFBD>ж<EFBFBD><EFBFBD><EFBFBD>",
|
||||
noobjcreated=> "û<EFBFBD>ж<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>",
|
||||
broken => "ʧȥ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>",
|
||||
contacted => "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>",
|
||||
connected => "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>",
|
||||
bssid => "<EFBFBD><EFBFBD>վ<EFBFBD><EFBFBD>ϵͳ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>",
|
||||
statistics => "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͳ<EFBFBD><EFBFBD>",
|
||||
showalarm => "<EFBFBD>鿴<EFBFBD>澯"
|
||||
);
|
||||
$engnamearray = Array(
|
||||
noobj => "No Object",
|
||||
noobjcreated=> "No Object created",
|
||||
broken => "NOT CONNECTED",
|
||||
contacted => "CONTACTED",
|
||||
connected => "CONNECTED",
|
||||
bssid => "BSS ID",
|
||||
statistics => "STATISTICS",
|
||||
showalarm => "SHOW ALARM"
|
||||
);
|
||||
?>
|
||||
432
wxc2_omc/configuration/bssomc/bsstree.php
Executable file
@@ -0,0 +1,432 @@
|
||||
<?php
|
||||
//
|
||||
// Created on: 22 Feb 2001
|
||||
// Usage : bsstree.php?language="eng|gb"&bssid=0
|
||||
//
|
||||
// Function : Show the BSS Object in Tree form
|
||||
//
|
||||
// MySQL table: OMCR_BSSTREE
|
||||
//
|
||||
// modifyBssParam.php ___ bsstree.php (contents)
|
||||
// \__ objects.php (main1)
|
||||
//
|
||||
//
|
||||
?>
|
||||
<?php
|
||||
include("nocache.inc");
|
||||
include("login_parm.inc");
|
||||
include("bsstree.inc");
|
||||
define("NO_IMAGE",0);
|
||||
define("I_IMAGE",1);
|
||||
define("LPLUS_IMAGE",2);
|
||||
define("TPLUS_IMAGE",3);
|
||||
define("N_IMAGE",4);
|
||||
define("L_IMAGE",5);
|
||||
define("T_IMAGE",6);
|
||||
define("LMINUS_IMAGE",7);
|
||||
define("TMINUS_IMAGE",8);
|
||||
|
||||
define("MAX_LAYER",6);
|
||||
define("BASE",16);
|
||||
// 0 - white, 1 - I.gif, 2 - L.gif, 3 - T.gif
|
||||
$image = Array (
|
||||
"",
|
||||
"<IMG alt='' height=16 src=images/line.gif width=16 align=absBottom border=0>",
|
||||
"<IMG alt='' height=16 src=images/lastplus.gif width=16 align=absBottom border=0>",
|
||||
"<IMG alt='' height=16 src=images/midplus.gif width=16 align=absBottom border=0>",
|
||||
"<IMG alt='' height=16 src=images/none.gif width=16 align=absBottom border=0>",
|
||||
"<IMG alt='' height=16 src=images/lastblk.gif width=16 align=absBottom border=0>",
|
||||
"<IMG alt='' height=16 src=images/midblk.gif width=16 align=absBottom border=0>",
|
||||
"<IMG alt='' height=16 src=images/lastminus.gif width=16 align=absBottom border=0>",
|
||||
"<IMG alt='' height=16 src=images/midminus.gif width=16 align=absBottom border=0>"
|
||||
);
|
||||
|
||||
$db = mysql_connect($hostname, $username, $password);
|
||||
mysql_select_db($dbname,$db);
|
||||
|
||||
if (!isset($language))
|
||||
$language = "eng";
|
||||
$parameter = "${language}namearray";
|
||||
|
||||
$sqlstring = "SELECT connected from OMCR_BSSTABLE where bssid=$bssid";
|
||||
//echo $sqlstring;
|
||||
$result = mysql_query($sqlstring,$db) or die("Invalid query:" . mysqli_error($pubConn));
|
||||
if (mysqli_num_rows($result) == 1)
|
||||
{
|
||||
list($connected) = mysqli_fetch_row($result);
|
||||
}
|
||||
|
||||
/*if(isset($sleep_seconds))
|
||||
{
|
||||
echo "sleep_seconds=$sleep_seconds<br>";
|
||||
sleep($sleep_seconds);
|
||||
}*/
|
||||
|
||||
//READ FROM BSSTREE
|
||||
$sqlstring = "select ObjectId, ${language}DisplayName,MaxSeverity,Url,Layer from OMCR_BSSTREE " .
|
||||
"where Url<>'Notshown' and bssid=$bssid and Presence=1";
|
||||
|
||||
//echo "sqlstring=$sqlstring";
|
||||
$result = mysql_query($sqlstring,$db) or die("Invalid query" . mysqli_error($pubConn));
|
||||
$no_of_objects=mysqli_num_rows($result);
|
||||
if ($no_of_objects < 1)
|
||||
{
|
||||
if (!isset($mode) || !($mode=="newbss"))
|
||||
{
|
||||
include("header.inc");
|
||||
printf("<CENTER>{${$parameter}[noobj]}</CENTER><BR>\n");
|
||||
echo "</BODY></HTML>";
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if ($connected == 1)
|
||||
echo "<META HTTP-EQUIV=Refresh content=6>";
|
||||
else if ($connected == 0)
|
||||
echo "<META HTTP-EQUIV=Refresh content=60>"; // 1 min
|
||||
else if ($connected == 254)
|
||||
echo "<META HTTP-EQUIV=Refresh content=600>"; // 10 mins
|
||||
|
||||
include("header.inc");
|
||||
echo <<< _EOT_
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<SCRIPT Language="javascript1.2" type="text/javascript">
|
||||
<!--
|
||||
var x=0, y=0;
|
||||
var isExpanded;
|
||||
|
||||
image1 = new Image();
|
||||
image2 = new Image();
|
||||
image3 = new Image();
|
||||
image4 = new Image();
|
||||
image5 = new Image();
|
||||
image6 = new Image();
|
||||
image1.src = "images/line.gif";
|
||||
image2.src = "images/midplus.gif";
|
||||
image3.src = "images/none.gif";
|
||||
image4.src = "images/lastblk.gif";
|
||||
image5.src = "images/midblk.gif";
|
||||
image6.src = "images/midminus.gif";
|
||||
|
||||
//
|
||||
// send scroll bar (x,y) to objects.php so that it can refresh
|
||||
// bsstree.php without moving the scroll bar
|
||||
function object_onclick(data)
|
||||
{
|
||||
x = document.body.scrollLeft;
|
||||
y = document.body.scrollTop;
|
||||
parent.main1.location.href = data + "&x=" + x + "&y=" + y;
|
||||
}
|
||||
|
||||
//
|
||||
// Show or hide a <DIV> tags
|
||||
// isExpanded[] is a global variable which keep trace of the state
|
||||
// of a branch in the folder tree
|
||||
//
|
||||
// start_id is here for recusion in later implementation
|
||||
//
|
||||
function show_or_hide(id,layers,start_id)
|
||||
{
|
||||
var imgsrc;
|
||||
var disptype="", origimg="", newimg="";
|
||||
var expand_flag=false;
|
||||
var re;
|
||||
var temp = document.all.tags("DIV");
|
||||
var str_id = "obj" + id;
|
||||
var div_id = eval(str_id);
|
||||
|
||||
//alert(str_id.substr(0,layers+str_id.length-5));
|
||||
for (i=start_id;i<temp.length;i++)
|
||||
{
|
||||
if (temp(i).id == str_id)
|
||||
{
|
||||
expand_flag = !isExpanded[i];
|
||||
//isExpanded[i] = !isExpanded[i];
|
||||
//if ((imgsrc=document.images["img" + str_id.substr(3,6)]) != "undefined")
|
||||
//{
|
||||
// if (imgsrc.src.indexOf("mid" + origimg) != -1)
|
||||
// imgsrc.src = "images/mid" + newimg;
|
||||
// else if (imgsrc.src.indexOf("last" + origimg) != -1)
|
||||
// imgsrc.src = "images/last" + newimg;
|
||||
//}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
id_prefix = str_id.substr(0,layers+str_id.length-5);
|
||||
re = new RegExp(id_prefix+"[0-9a-f]"+str_id.substr(4+layers,str_id.length-layers-5));
|
||||
for (i=start_id;i<temp.length;i++)
|
||||
{
|
||||
if (temp(i).id.indexOf(id_prefix) != -1) // if it is affected row, then
|
||||
{
|
||||
if (temp(i).id.search(re) != -1) // if it is the affected 1st/2nd layer
|
||||
{
|
||||
if (temp(i).id == str_id) // if it is the clicked <DIV>
|
||||
{
|
||||
if (expand_flag) // if expand leaves
|
||||
{
|
||||
disptype="block";
|
||||
isExpanded[i] = true;
|
||||
origimg="plus";
|
||||
newimg="minus.gif";
|
||||
}
|
||||
else // if hide leaves
|
||||
{
|
||||
disptype="block";
|
||||
isExpanded[i] = false;
|
||||
origimg="minus";
|
||||
newimg="plus.gif";
|
||||
}
|
||||
}
|
||||
else // else if it is the 2nd layer
|
||||
{
|
||||
if (expand_flag) // if expand it
|
||||
{
|
||||
disptype="block";
|
||||
isExpanded[i] = false;
|
||||
origimg="minus"; // don't care
|
||||
newimg="plus.gif"; // don't care
|
||||
}
|
||||
else // if hide it
|
||||
{
|
||||
disptype="none";
|
||||
isExpanded[i] = false; // don't care
|
||||
origimg="minus"; // don't care
|
||||
newimg="plus.gif"; // don't care
|
||||
}
|
||||
}
|
||||
}
|
||||
else // else if if it is not the affected 1st/2nd layer
|
||||
{
|
||||
if (expand_flag) // if expand it
|
||||
{
|
||||
disptype="none";
|
||||
isExpanded[i] = false; // don't care
|
||||
origimg="minus";
|
||||
newimg="plus.gif";
|
||||
}
|
||||
}
|
||||
|
||||
//if (temp(i).id != str_id)
|
||||
//{
|
||||
temp(i).style.display = disptype;
|
||||
//}
|
||||
|
||||
//imgsrc=document.images["img" + temp(i).id.substr(3,6)];
|
||||
//if (typeof(imgsrc) != "undefined")
|
||||
if (typeof(imgsrc=document.images["img" + temp(i).id.substr(3,6)]) != "undefined")
|
||||
{
|
||||
if (imgsrc.src.indexOf("mid" + origimg) != -1)
|
||||
imgsrc.src = "images/mid" + newimg;
|
||||
else if (imgsrc.src.indexOf("last" + origimg) != -1)
|
||||
imgsrc.src = "images/last" + newimg;
|
||||
}
|
||||
//} /* End of if (temp(i).id */
|
||||
}
|
||||
} /* End of for (i=0;i<temp.length;i++) */
|
||||
}
|
||||
|
||||
function initIt()
|
||||
{
|
||||
var i;
|
||||
var div_obj = document.all.tags("DIV");
|
||||
|
||||
isExpanded = new Array(div_obj.length);
|
||||
for (i=0;i<div_obj.length;i++)
|
||||
{
|
||||
isExpanded[i] = false;
|
||||
if (div_obj(i).id.substr(5,4) != "0000")
|
||||
{
|
||||
div_obj(i).style.display = "none";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// scroll when the page is loaded.
|
||||
function compensate_scroll(scroll_x, scroll_y)
|
||||
{
|
||||
initIt();
|
||||
if ((typeof(scroll_x) != "undefined") && (typeof(scroll_y) != "undefined")
|
||||
&& (scroll_y != "") && (scroll_y != ""))
|
||||
{
|
||||
self.scrollBy(scroll_x, scroll_y);
|
||||
}
|
||||
return;
|
||||
}
|
||||
//-->
|
||||
</SCRIPT>
|
||||
</HEAD>
|
||||
<BODY onLoad='compensate_scroll("$x","$y");'>
|
||||
<CENTER>
|
||||
{${$parameter}[bssid]} $bssid <BR>
|
||||
<INPUT type=button value='{${$parameter}[showalarm]}' name=showalarm
|
||||
class=chinese style='width: 100'
|
||||
onClick='javascript:window.parent.location.href=
|
||||
"alarmframe.php?language=$language&bssid=$bssid"'
|
||||
//<INPUT type=button value='{${$parameter}[statistics]}' name=statistics
|
||||
// class=chinese style='width: 100'
|
||||
// onClick='javascript:window.parent.location.href=
|
||||
// "btsmeasframe.php?language=$language&bssid=$bssid"'>
|
||||
<BR>
|
||||
</CENTER>
|
||||
_EOT_;
|
||||
echo "<CENTER>\n";
|
||||
if ( $connected == 0 )
|
||||
echo "<font color=red>{${$parameter}[broken]}</font>";
|
||||
else if ($connected == 1)
|
||||
echo "<font color=orange>{${$parameter}[contacted]}</font>";
|
||||
else
|
||||
echo "<font color=blue>{${$parameter}[connected]}</font>";
|
||||
echo "</CENTER>\n";
|
||||
echo "<HR SIZE=1>\n";
|
||||
|
||||
|
||||
$max_layer=0;
|
||||
while (list($objectid[], $displayname[], $maxseverity[], $url[], $this_layer)
|
||||
= mysqli_fetch_row($result))
|
||||
{
|
||||
$layer[] = $this_layer;
|
||||
if ( $this_layer > $max_layer ) { $max_layer=$this_layer; }
|
||||
}
|
||||
|
||||
//
|
||||
// Initialize rowarray and make it contains $max_layer elements
|
||||
//
|
||||
for ($x=0;$x<=$max_layer;$x++)
|
||||
{
|
||||
$rowarray[]=NO_IMAGE;
|
||||
}
|
||||
|
||||
for ($y=0;$y<$no_of_objects;$y++)
|
||||
{
|
||||
if ($y != 0)
|
||||
{
|
||||
if ($layer[$y] >= $layer[$y-1])
|
||||
$this_value[$y] = $last_value + pow(BASE,MAX_LAYER-$layer[$y]-1);
|
||||
else if ($layer[$y] < $layer[$y-1])
|
||||
$this_value[$y] = (floor($last_value/pow(BASE,MAX_LAYER-$layer[$y]-1))+1) * pow(BASE,MAX_LAYER-$layer[$y]-1);
|
||||
}
|
||||
else
|
||||
{
|
||||
$this_value[$y]=pow(BASE,MAX_LAYER-1);
|
||||
}
|
||||
$last_value=$this_value[$y];
|
||||
}
|
||||
|
||||
for ($y=0;$y<$no_of_objects;$y++)
|
||||
{
|
||||
if($layer[$y]==0)
|
||||
continue;
|
||||
if($layer[$y]==1)
|
||||
$parent_objectid[$y]='BssFunc';
|
||||
else{
|
||||
for($yy=$y-1;$yy>=0;$yy--){
|
||||
if($layer[$y]-1==$layer[$yy]){
|
||||
$parent_objectid[$y]=$objectid[$yy];
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for ($y=$no_of_objects-1;$y>=0;$y--)
|
||||
{
|
||||
$tablearray[$y] = "<DIV ID=" . sprintf("obj%x",$this_value[$y]) . "><NOBR>";
|
||||
|
||||
//$tablearray[$y] = "<DIV><NOBR>";
|
||||
for ($x=0;$x<=$max_layer;$x++)
|
||||
{
|
||||
if ( $x > $layer[$y] )
|
||||
{
|
||||
$rowarray[$x] = NO_IMAGE;
|
||||
}
|
||||
else if ( $x == $layer[$y] - 1 )
|
||||
{
|
||||
if (($rowarray[$x] == NO_IMAGE ) || ($rowarray[$x] == N_IMAGE ))
|
||||
{
|
||||
if (($rowarray[$x+1] == N_IMAGE) || ($rowarray[$x+1] == NO_IMAGE)) // is description
|
||||
$rowarray[$x] = L_IMAGE;
|
||||
else
|
||||
$rowarray[$x] = LPLUS_IMAGE;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (($rowarray[$x+1] == N_IMAGE) || ($rowarray[$x+1] == NO_IMAGE)) // is description
|
||||
$rowarray[$x] = T_IMAGE;
|
||||
else
|
||||
$rowarray[$x] = TPLUS_IMAGE;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (($rowarray[$x] == NO_IMAGE ) || ($rowarray[$x] == N_IMAGE ))
|
||||
$rowarray[$x] = N_IMAGE;
|
||||
else
|
||||
$rowarray[$x] = I_IMAGE;
|
||||
}
|
||||
|
||||
if ( $x == $layer[$y] )
|
||||
{
|
||||
//$tablearray[$y] .= "<FONT color=red>";
|
||||
$rowarray[$x] = N_IMAGE;
|
||||
if ( !strcmp($url[$y],"Nolink") )
|
||||
{
|
||||
$tablearray[$y] .= "$displayname[$y]";
|
||||
}
|
||||
elseif ( !strcmp($url[$y],"null") )
|
||||
{
|
||||
$tablename=strtok($objectid[$y],".");
|
||||
$tablearray[$y] .=
|
||||
"<A HREF='javascript:void(0)' onClick=\"javascript:object_onclick('" .
|
||||
"objects.php?language=$language&bssid=$bssid&objectid=" .
|
||||
$objectid[$y] . "&parent_objectid=" . $parent_objectid[$y] . "&tablename=OMCR_" . $tablename . "');\">" .
|
||||
$displayname[$y] . "</A>";
|
||||
}
|
||||
elseif ( !strncmp($url[$y],"OMCR_",5) )
|
||||
{
|
||||
$tablearray[$y] .=
|
||||
"<A HREF='javascript:void(0)' onClick=\"javascript:object_onclick('" .
|
||||
"objects.php?language=$language&bssid=$bssid&objectid=" .
|
||||
$objectid[$y] . "&parent_objectid=" . $parent_objectid[$y] . "&tablename=" . $url[$y] . "');\">" .
|
||||
$displayname[$y] . "</A>";
|
||||
}
|
||||
else // URL is specified
|
||||
{
|
||||
$tablearray[$y] .=
|
||||
"<A HREF='javascript:void(0)' onClick=\"javascript:object_onclick('" .
|
||||
"$url[$y]?language=$language&bssid=$bssid&objectid=" .
|
||||
$objectid[$y] . "&parent_objectid=" . $parent_objectid[$y] . "');\">" .
|
||||
$displayname[$y] . "</A>";
|
||||
}
|
||||
//$tablearray[$y] .= "</FONT>";
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($rowarray[$x] == LPLUS_IMAGE)
|
||||
$tablearray[$y] .= "<A href='javascript:show_or_hide(" . sprintf("\"%x\",",$this_value[$y])
|
||||
. $layer[$y] . ",0);'>" . "<IMG name=" . sprintf("\"img%x\",",$this_value[$y])
|
||||
. " alt='' height=16 src=images/midplus.gif width=16 align=absBottom border=0>" . "</A>";
|
||||
else if ($rowarray[$x] == TPLUS_IMAGE)
|
||||
$tablearray[$y] .= "<A href='javascript:show_or_hide(" . sprintf("\"%x\",",$this_value[$y])
|
||||
. $layer[$y] . ",0);'>" . "<IMG name=" . sprintf("\"img%x\",",$this_value[$y])
|
||||
. " alt='' height=16 src=images/midplus.gif width=16 align=absBottom border=0>" . "</A>";
|
||||
else
|
||||
$tablearray[$y] .= $image[$rowarray[$x]];
|
||||
}
|
||||
}
|
||||
$tablearray[$y] .= "</NOBR></DIV>\n";
|
||||
}
|
||||
|
||||
//
|
||||
// Draw the table now after determining the hierachy
|
||||
//
|
||||
for ($i=0;$i<$no_of_objects;$i++)
|
||||
{
|
||||
echo $tablearray[$i];
|
||||
}
|
||||
?>
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
3
wxc2_omc/configuration/bssomc/bssversion.inc
Executable file
@@ -0,0 +1,3 @@
|
||||
<?php
|
||||
$version="iw05_01.050";
|
||||
?>
|
||||
18
wxc2_omc/configuration/bssomc/btsmeasfilter.inc
Executable file
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
$gbnamearray = Array(
|
||||
bssid => "BSS <20><><EFBFBD><EFBFBD>",
|
||||
cellid => "С<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>",
|
||||
startperiod=> "<EFBFBD><EFBFBD>ʼʱ<EFBFBD><EFBFBD>",
|
||||
endperiod => "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><EFBFBD>",
|
||||
find => "<EFBFBD>鿴",
|
||||
back => "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
|
||||
);
|
||||
$engnamearray = Array(
|
||||
bssid => "BSS ID",
|
||||
cellid => "CELL ID",
|
||||
startperiod=> "START TIME",
|
||||
endperiod => "END TIME",
|
||||
find => "FIND",
|
||||
back => "BACK"
|
||||
);
|
||||
?>
|
||||
75
wxc2_omc/configuration/bssomc/btsmeasfilter.php
Executable file
@@ -0,0 +1,75 @@
|
||||
<?php
|
||||
//
|
||||
// Created on: 15 Mar 2001
|
||||
// Usage : btsmeasfilter.php?language="eng|gb"&bssid=3
|
||||
//
|
||||
// Function : Display the filter options
|
||||
//
|
||||
//
|
||||
?>
|
||||
<?php
|
||||
include("nocache.inc");
|
||||
include("btsmeasfilter.inc");
|
||||
if (!isset($language))
|
||||
$language="eng";
|
||||
$parameter="${language}namearray";
|
||||
?>
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<SCRIPT language="JavaScript" type="text/javascript">
|
||||
<!--
|
||||
function btsmeasfind()
|
||||
{
|
||||
var perbssid=document.btsmeasfilterform.perbssid.value;
|
||||
|
||||
url="btsmeasurements.php?language=<?=$language?>";
|
||||
if ((perbssid < 12) && (perbssid >= 0) && ( document.btsmeasfilterform.perbssid.value != '' ))
|
||||
url += "&perBssid=" + document.btsmeasfilterform.perbssid.value;
|
||||
else
|
||||
document.btsmeasfilterform.perbssid.value='';
|
||||
if ( document.btsmeasfilterform.percellid.value != '' )
|
||||
url += "&perCellid=" + document.btsmeasfilterform.percellid.value;
|
||||
if ( document.btsmeasfilterform.perstartperiod.value != '2001-01-01 00:00:00' )
|
||||
url += "&perStartPeriod=" + document.btsmeasfilterform.perstartperiod.value;
|
||||
if ( document.btsmeasfilterform.perendperiod.value != '2001-01-01 00:00:00' )
|
||||
url += "&perEndPeriod=" + document.btsmeasfilterform.perendperiod.value;
|
||||
parent.bottom.location.href=url;
|
||||
}
|
||||
//-->
|
||||
</SCRIPT>
|
||||
</HEAD>
|
||||
<?include("header.inc");?>
|
||||
<TABLE border=1 cellpadding=0 cellspacing=0
|
||||
bordercolor=#000000 bordercolordark=#FFFFFF bordercolorlight=#000000 width=800>
|
||||
<FORM name=btsmeasfilterform>
|
||||
<TR>
|
||||
<TD> <?=${$parameter}[bssid]?><br>
|
||||
<INPUT type=text name=perbssid size=2>
|
||||
</TD>
|
||||
<TD> <?=${$parameter}[cellid]?><br>
|
||||
<INPUT type=text name=percellid size=12>
|
||||
</TD>
|
||||
<TD> <?=${$parameter}[startperiod]?><br>
|
||||
<INPUT type=text name=perstartperiod size=19 value='2001-01-01 00:00:00'>
|
||||
</TD>
|
||||
<TD> <?=${$parameter}[endperiod]?><br>
|
||||
<INPUT type=text name=perendperiod size=19 value='2001-01-01 00:00:00'>
|
||||
</TD>
|
||||
<TD><BR>
|
||||
<?php
|
||||
echo "<INPUT type=button value='{${$parameter}[find]}' " .
|
||||
"onClick='javascript:btsmeasfind()'>";
|
||||
if (isset($bssid))
|
||||
echo "<INPUT type=button value='{${$parameter}[back]}' " .
|
||||
"onClick='javascript:parent.location.href=" .
|
||||
"\"modifyBssParam.php?language=$language&bssid=$bssid\"'>";
|
||||
else
|
||||
echo "<INPUT type=button value='{${$parameter}[back]}' " .
|
||||
"onClick='javascript:parent.location.href=" .
|
||||
"\"GUI/PACS OMC_files/sys_status_index_files/sys_status_down.html\"'>";
|
||||
?>
|
||||
</TD>
|
||||
</TR>
|
||||
</FORM>
|
||||
</TABLE>
|
||||
</HTML>
|
||||
31
wxc2_omc/configuration/bssomc/btsmeasframe.php
Executable file
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
//
|
||||
// Created on: 15 Mar 2001
|
||||
// Usage : btsmeasframe.php?language="eng|gb"&bssid=0
|
||||
//
|
||||
// Function : Contain the btsmeasfilter.php and btsmeasurements.php frame
|
||||
//
|
||||
// btsmeasframe.php ___ btsmeasfilter.php(upper)
|
||||
// \__ btsmeasurement.php (bottom)
|
||||
//
|
||||
?>
|
||||
<?php
|
||||
include("nocache.inc");
|
||||
if (!isset($language))
|
||||
$language="eng";
|
||||
?>
|
||||
<html>
|
||||
<head>
|
||||
</head>
|
||||
<frameset rows="16%,*" frameborder=no border=0 framespacing=0>
|
||||
<frame frameborder=no framespacing=0 name=contents noresize target='upper'
|
||||
src='btsmeasfilter.php?language=<?=$language?>&bssid=<?=$bssid?>'>;
|
||||
<frame frameborder=no framespacing=0 name="bottom" src="btsmeasurements.php?language=<?=$language?>&bssid=<?=$bssid?>">
|
||||
<noframes>
|
||||
<body>
|
||||
<p>This page uses frames, but your browser doesn't support them.</p>
|
||||
</body>
|
||||
</noframes>
|
||||
</frameset>
|
||||
</frameset>
|
||||
</html>
|
||||
24
wxc2_omc/configuration/bssomc/btsmeasurements.inc
Executable file
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
$gbnamearray = Array(
|
||||
go => "ȥ",
|
||||
bssid => "BSS<EFBFBD><EFBFBD><EFBFBD><EFBFBD>",
|
||||
pages => "ҳ",
|
||||
record => "<EFBFBD><EFBFBD>",
|
||||
total => "<EFBFBD>Ϲ<EFBFBD>",
|
||||
back => "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>",
|
||||
cellidentity=> "С<EFBFBD><EFBFBD>ʶ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>",
|
||||
time => "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͳ<EFBFBD><EFBFBD>ʱ<EFBFBD><EFBFBD>",
|
||||
norecord => "-- <20>Ҳ<EFBFBD><D2B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ؼ<EFBFBD>¼ --"
|
||||
);
|
||||
$engnamearray = Array(
|
||||
go => "GO",
|
||||
bssid => "BSS ID",
|
||||
pages => "PAGES",
|
||||
record => "RECORDS",
|
||||
total => "TOTAL",
|
||||
back => "BACK",
|
||||
cellidentity=> "CELLID",
|
||||
time => "STATISTICS TIME",
|
||||
norecord => "-- No Record Found --"
|
||||
);
|
||||
?>
|
||||
228
wxc2_omc/configuration/bssomc/btsmeasurements.php
Executable file
@@ -0,0 +1,228 @@
|
||||
<?php
|
||||
//
|
||||
// Created on: 22 Feb 2001
|
||||
// Usage: btsmeasurements.php
|
||||
// btsmeasurements.php?language="eng|gb"
|
||||
// [&bssid=0]
|
||||
// [&offset=XXX]
|
||||
// [&perBssid=XXX]
|
||||
// [&perCellid=XXX]
|
||||
// [&perStartPeriod=XXX]
|
||||
// [&perEndPeriod=XXX]
|
||||
//
|
||||
// Function: Display BSS Statistics from offset to offset+stepsize
|
||||
// Stepsize for each page ($stepsize) is default to 14
|
||||
//
|
||||
// Filter : Support filter per bssid, per cellid, time
|
||||
//
|
||||
// MySQL table involved: OMCR_GeneralReport, OMCR_Meta_Statistics
|
||||
//
|
||||
?>
|
||||
<?php
|
||||
include("nocache.inc");
|
||||
include("btsmeasurements.inc");
|
||||
if (!isset($language))
|
||||
$language="eng";
|
||||
$parameter = "${language}namearray"; // use of variable variables
|
||||
$stepsize=14;
|
||||
?>
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<META HTTP-EQUIV="Refresh" content="10">
|
||||
<?php include("header.inc"); ?>
|
||||
<SCRIPT language="JavaScript" type="text/javascript">
|
||||
<!--
|
||||
function show_status(status, alarm)
|
||||
{
|
||||
if (typeof(status) == "undefined" );
|
||||
}
|
||||
|
||||
|
||||
function go_to_webpage(myForm)
|
||||
{
|
||||
if (myForm.gotopage.value == '')
|
||||
myForm.gotopage.value = 1;
|
||||
else if (myForm.gotopage.value <= 0)
|
||||
myForm.gotopage.value = 1;
|
||||
|
||||
<?php
|
||||
echo "window.location.href=\"btsmeasurements.php?language=$language";
|
||||
echo (isset($bssid)? "&bssid=$bssid":"") .
|
||||
(isset($perBssid)? "&perBssid=$perBssid":"") .
|
||||
(isset($perCellid)? "&perCellid=$perCellid":"") .
|
||||
(isset($perStartPeriod)? "&perStartPeriod=$perStartPeriod":"") .
|
||||
(isset($perEndPeriod)? "&perEndPeriod=$perEndPeriod":"");
|
||||
echo "&offset=\" + $stepsize * (myForm.gotopage.value - 1);";
|
||||
?>
|
||||
|
||||
}
|
||||
//-->
|
||||
</SCRIPT>
|
||||
<TITLE> ALARM EVENT </TITLE>
|
||||
</HEAD>
|
||||
<BODY onLoad='show_status("<?=$status?>","<?=$alarm?>");'>
|
||||
<FORM name='stattable'>
|
||||
<?php
|
||||
|
||||
$status="";
|
||||
|
||||
include("login_parm.inc");
|
||||
|
||||
$db = mysql_connect($hostname, $username, $password);
|
||||
mysql_select_db($dbname,$db);
|
||||
|
||||
$sqlstring = "select count(*) from OMCR_GeneralReport WHERE Cellid>0 and Time>0" .
|
||||
(isset($perBssid)? " AND Bssid=$perBssid":"") .
|
||||
(isset($perCellid)? " AND Cellid=$perCellid":"") .
|
||||
(isset($perStartPeriod)? " AND Time>='$perStartPeriod'":"") .
|
||||
(isset($perEndPeriod)? " AND Time<='$perEndPeriod'":"");
|
||||
echo $sqlstring . "<BR>";
|
||||
$result = mysql_query($sqlstring,$db) or
|
||||
die("Invalid query: $sqlstring\n" . mysqli_error($pubConn));
|
||||
list($no_of_records) = mysqli_fetch_row($result);
|
||||
mysql_free_result($result);
|
||||
|
||||
if (!isset($offset))
|
||||
{
|
||||
$offset = 0;
|
||||
}
|
||||
|
||||
echo "<TABLE border=1 cellspacing=0 cellpadding=0 bordercolor=#000000 " .
|
||||
"bordercolordark=#FFFFFF bordercolorlight=#000000 width=800>\n";
|
||||
echo "<TR>\n";
|
||||
echo "<TD width=20%>\n";
|
||||
echo ${$parameter}[total] . ": " .$no_of_records . " " . ${$parameter}[pages];
|
||||
echo "</TD>\n";
|
||||
echo "<TD width=15%>\n";
|
||||
echo "$stepsize " . ${$parameter}[record] . "/" . ${$parameter}[pages];
|
||||
echo "</TD>\n";
|
||||
echo "<TD width=35%>\n";
|
||||
if ($no_of_records)
|
||||
echo (floor($offset/$stepsize) + 1) . "/" .
|
||||
(ceil($no_of_records/$stepsize)) . " " . ${$parameter}[pages];
|
||||
else
|
||||
echo "0/0 " . ${$parameter}[pages];
|
||||
echo "</TD>\n";
|
||||
echo "<TD width=30%>\n";
|
||||
echo "<INPUT type=button value={${$parameter}[go]} onClick='go_to_webpage(this.document.stattable);'>";
|
||||
echo "<INPUT type=TEXT name=gotopage size=4> ";
|
||||
echo "{${$parameter}[pages]}   ";
|
||||
|
||||
//echo $offset . "-" . $stepsize;
|
||||
if ($offset > $stepsize-1)
|
||||
{
|
||||
//if ($offset < $stepsize) $offset=0;
|
||||
echo "<INPUT type=image value='<-' src='images/st_minus.gif' onClick='" .
|
||||
"javascript:window.location.href=\"btsmeasurements.php?" .
|
||||
"language=$language" .
|
||||
(isset($bssid)? "&bssid=$bssid":"") .
|
||||
(isset($perBssid)? "&perBssid=$perBssid":"") .
|
||||
(isset($perCellid)? "&perCellid=$perCellid":"") .
|
||||
(isset($perStartPeriod)? "&perStartPeriod=$perStartPeriod":"") .
|
||||
(isset($perEndPeriod)? "&perEndPeriod=$perEndPeriod":"") .
|
||||
"&offset=" . ($offset-$stepsize) . "\"'>";
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "<INPUT type=image value='>-' src='images/gt_minus.gif' onClick='" .
|
||||
"javascript:window.location.href=\"btsmeasurements.php?" .
|
||||
"language=$language" .
|
||||
(isset($bssid)? "&bssid=$bssid":"") .
|
||||
(isset($perBssid)? "&perBssid=$perBssid":"") .
|
||||
(isset($perCellid)? "&perCellid=$perCellid":"") .
|
||||
(isset($perStartPeriod)? "&perStartPeriod=$perStartPeriod":"") .
|
||||
(isset($perEndPeriod)? "&perEndPeriod=$perEndPeriod":"") .
|
||||
"&offset=" . $offset . "\"'>";
|
||||
}
|
||||
//echo $offset . "-" . $stepsize;
|
||||
if ($no_of_records > $offset + $stepsize)
|
||||
{
|
||||
echo "<INPUT type=image value='->' src='images/minus_gt.gif' onClick='" .
|
||||
"javascript:window.location.href=\"btsmeasurements.php?" .
|
||||
"language=$language" .
|
||||
(isset($bssid)? "&bssid=$bssid":"") .
|
||||
(isset($perBssid)? "&perBssid=$perBssid":"") .
|
||||
(isset($perCellid)? "&perCellid=$perCellid":"") .
|
||||
(isset($perStartPeriod)? "&perStartPeriod=$perStartPeriod":"") .
|
||||
(isset($perEndPeriod)? "&perEndPeriod=$perEndPeriod":"") .
|
||||
"&offset=" . ($offset+$stepsize) . "\"'>";
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "<INPUT type=image value='-<' src='images/minus_st.gif' onClick='" .
|
||||
"javascript:window.location.href=\"btsmeasurements.php?" .
|
||||
"language=$language" .
|
||||
(isset($bssid)? "&bssid=$bssid":"") .
|
||||
(isset($perBssid)? "&perBssid=$perBssid":"") .
|
||||
(isset($perCellid)? "&perCellid=$perCellid":"") .
|
||||
(isset($perStartPeriod)? "&perStartPeriod=$perStartPeriod":"") .
|
||||
(isset($perEndPeriod)? "&perEndPeriod=$perEndPeriod":"") .
|
||||
"&offset=" . $offset . "\"'>";
|
||||
}
|
||||
echo "</TD>\n";
|
||||
echo "</TR>\n";
|
||||
//echo "</TABLE>\n";
|
||||
echo "<TR><TD colspan=4>\n";
|
||||
echo "<TABLE border=1 cellspacing=0 cellpadding=0 bordercolor=#000000 " .
|
||||
"bordercolordark=#FFFFFF bordercolorlight=#000000 width=800>\n";
|
||||
|
||||
$sqlstring = "select ${language}DisplayName,FieldName,${language}Remarks " .
|
||||
"from OMCR_Meta_Statistics";
|
||||
//echo "$sqlstring<BR>";
|
||||
$result = mysql_query($sqlstring,$db) or
|
||||
die("Invalid query: $sqlstring\n" . mysqli_error($pubConn));
|
||||
echo "<TR>\n";
|
||||
echo "<TD nowrap bgcolor=#D0D0D0>{${$parameter}[bssid]}</TD>";
|
||||
echo "<TD nowrap bgcolor=#D0D0D0>{${$parameter}[cellidentity]}</TD>";
|
||||
echo "<TD nowrap bgcolor=#D0D0D0>{${$parameter}[time]}</TD>";
|
||||
while ( $row = mysqli_fetch_row($result) )
|
||||
{
|
||||
$fieldname[] = $row[1];
|
||||
echo "<TD nowrap bgcolor=#D0D0D0 title='{$row[2]}'>";
|
||||
echo "$row[0]";
|
||||
echo "</TD>\n";
|
||||
}
|
||||
echo "</TR>\n";
|
||||
mysql_free_result($result);
|
||||
|
||||
$sqlstring = "select Bssid,Cellid,Time," . join(",",$fieldname) .
|
||||
" from OMCR_GeneralReport where Cellid>0 and Time>0" .
|
||||
(isset($perBssid)? " AND Bssid=$perBssid":"") .
|
||||
(isset($perCellid)? " AND Cellid=$perCellid":"") .
|
||||
(isset($perStartPeriod)? " AND Time>='$perStartPeriod'":"") .
|
||||
(isset($perEndPeriod)? " AND Time<='$perEndPeriod'":"");
|
||||
if ($offset >= 0)
|
||||
{
|
||||
$sqlstring .= " ORDER BY Time DESC LIMIT $offset,$stepsize";
|
||||
}
|
||||
else
|
||||
{
|
||||
$sqlstring .= " ORDER BY Time DESC LIMIT 0," . ($stepsize+$offset);
|
||||
}
|
||||
|
||||
//echo $sqlstring . "<BR>";
|
||||
$result = mysql_query($sqlstring,$db) or
|
||||
die("Invalid query: $sqlstring\n" . mysqli_error($pubConn));
|
||||
$no_of_fields = mysql_num_fields($result);
|
||||
|
||||
while ( $row = mysqli_fetch_row($result) )
|
||||
{
|
||||
echo "<TR>";
|
||||
for ($i=0;$i<$no_of_fields;$i++)
|
||||
{
|
||||
printf("<TD height=30>%s</TD>\n",(isset($row[$i])? $row[$i]:"-"));
|
||||
}
|
||||
echo "</TR>\n";
|
||||
}
|
||||
echo "</TABLE>\n";
|
||||
if (mysqli_num_rows($result) == 0)
|
||||
echo "<BR><CENTER><FONT color=cyan>{${$parameter}[norecord]}</FONT></CENTER><BR>";
|
||||
echo "</TD>\n";
|
||||
echo "</TR>\n";
|
||||
echo "</TABLE>\n";
|
||||
echo "</FORM>\n";
|
||||
|
||||
mysql_free_result($result);
|
||||
?>
|
||||
</BODY>
|
||||
</HTML>
|
||||
4
wxc2_omc/configuration/bssomc/c.php
Executable file
@@ -0,0 +1,4 @@
|
||||
<?php
|
||||
echo "This is just a test<br>";
|
||||
?>
|
||||
|
||||
55
wxc2_omc/configuration/bssomc/cfg_download.inc
Executable file
@@ -0,0 +1,55 @@
|
||||
<?php
|
||||
$gbnamearray = Array(
|
||||
availfile => "<EFBFBD>ŷ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>±<EFBFBD><EFBFBD><EFBFBD>",
|
||||
no_backup => "<EFBFBD>Ҳ<EFBFBD><EFBFBD><EFBFBD>BSC<EFBFBD><EFBFBD><EFBFBD>ݵ<EFBFBD>",
|
||||
selectfile => "<EFBFBD><EFBFBD>ѡ<EFBFBD><EFBFBD>BSC<EFBFBD><EFBFBD><EFBFBD>ݵ<EFBFBD>",
|
||||
err_msg => "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>",
|
||||
heading => "<EFBFBD><EFBFBD><EFBFBD>ݿ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>֮<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>BSC",
|
||||
remind => "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><EFBFBD><EFBFBD>浵<EFBFBD><EFBFBD><EFBFBD><EFBFBD>С<EFBFBD><EFBFBD><EFBFBD>ı<EFBFBD>",
|
||||
cleanup => "<EFBFBD>ͷ<EFBFBD><EFBFBD><EFBFBD>Դ",
|
||||
checkexist => "<EFBFBD>鿴",
|
||||
rename => "<EFBFBD><EFBFBD><EFBFBD>ĵ<EFBFBD><EFBFBD><EFBFBD>",
|
||||
copy => "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>",
|
||||
ok => "<EFBFBD>ɹ<EFBFBD>",
|
||||
not_ok => "<EFBFBD><EFBFBD><EFBFBD>ɹ<EFBFBD>",
|
||||
done => "<EFBFBD><EFBFBD><EFBFBD>ݿ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɣ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>BSC",
|
||||
rebootbsc => "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>BSC",
|
||||
failed => "ʧ<EFBFBD><EFBFBD>",
|
||||
create_dir => "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ŀ¼",
|
||||
rmdir => "ɾ<EFBFBD><EFBFBD>Ŀ¼",
|
||||
chdir => "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ŀ¼",
|
||||
untar => "<EFBFBD><EFBFBD>ѹ",
|
||||
submit => "ȷ<EFBFBD><EFBFBD>",
|
||||
back => "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>",
|
||||
ping => "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>",
|
||||
mounting => "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>",
|
||||
umounting => "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
|
||||
);
|
||||
|
||||
$engnamearray = Array(
|
||||
availfile => "Available BSC database backup",
|
||||
no_backup => "No database backup file is found",
|
||||
selectfile => "Please select BSC database backup here",
|
||||
err_msg => "Please make sure you have input the correct parameters",
|
||||
heading => "After downloading BSS software, you have to reboot BSC",
|
||||
remind => "The software download time may vary with the file size",
|
||||
cleanup => "Cleaning up allocated resources",
|
||||
checkexist => "Checking the existent of",
|
||||
rename => "Renaming",
|
||||
copy => "Copying",
|
||||
ok => "OK",
|
||||
not_ok => "Not OK",
|
||||
done => "Database download is complete. Reboot BSC is required",
|
||||
rebootbsc => "Reboot BSC",
|
||||
failed => "Failed",
|
||||
create_dir => "Creating directory",
|
||||
rmdir => "Removing directory",
|
||||
chdir => "Changing directory",
|
||||
untar => "Decompressing",
|
||||
submit => "CONFIRM",
|
||||
back => "BACK",
|
||||
ping => "Pinging",
|
||||
mounting => "Mounting",
|
||||
umounting => "Unmounting"
|
||||
);
|
||||
?>
|
||||
326
wxc2_omc/configuration/bssomc/cfg_download.php
Executable file
@@ -0,0 +1,326 @@
|
||||
<?php
|
||||
//
|
||||
// Created on: 11 Sep 2001
|
||||
// Usage: cfg_download.php?[language="eng|gb"]
|
||||
// &bssid=0
|
||||
// &version=iw05_01.048
|
||||
// &tarfile=/usr/local/apache/htdocs/bss_db/bss0_20010914_0.tgz
|
||||
//
|
||||
// Function: Transfer BSS software from OMC Server
|
||||
// to BSC harddisk based on bssdist.fls file
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
// Remarks:
|
||||
// - Use explode() as a faster split()
|
||||
// - Function like tar, mount, umount return 0 if there is no error
|
||||
//
|
||||
?>
|
||||
<?php
|
||||
include("nocache.inc");
|
||||
include("header.inc");
|
||||
include("ip2name.inc");
|
||||
include("read_bssdist.inc");
|
||||
include("cfg_download.inc");
|
||||
|
||||
//$debug=1;
|
||||
|
||||
if (!isset($language))
|
||||
$language="eng";
|
||||
$parameter="${language}namearray";
|
||||
|
||||
|
||||
if (!isset($version) || !isset($bssid))
|
||||
{
|
||||
echo "<font color=red size=+1>{${$parameter}["err_msg"]}</font>";
|
||||
return;
|
||||
}
|
||||
if ($version=='')
|
||||
{
|
||||
include("bssversion.inc");
|
||||
}
|
||||
|
||||
/*****************************************
|
||||
* Locate tar file if it is not given
|
||||
*
|
||||
*****************************************/
|
||||
if (!isset($tarfile))
|
||||
{
|
||||
echo "<HTML>\n";
|
||||
?>
|
||||
|
||||
<SCRIPT language="javascript" type="text/javascript">
|
||||
<!--
|
||||
function submit_check(myForm)
|
||||
{
|
||||
if (myForm.selectfile.value == "")
|
||||
{
|
||||
alert("Please select a backup file");
|
||||
return (false);
|
||||
}
|
||||
myForm.tarfile.value = "/usr/local/apache/htdocs/bss_db/" + myForm.selectfile.value;
|
||||
return (true);
|
||||
}
|
||||
//-->
|
||||
</SCRIPT>
|
||||
|
||||
<?php
|
||||
echo "<font color=blue size=+1>{${$parameter}["availfile"]}:</font>";
|
||||
echo "<HR>\n";
|
||||
echo "<PRE>\n";
|
||||
if (is_dir("/usr/local/apache/htdocs/bss_db"))
|
||||
{
|
||||
//$backuplist = Array();
|
||||
exec("ls -1t /usr/local/apache/htdocs/bss_db",$backuplist,$retval);
|
||||
$backupcount = count($backuplist);
|
||||
if ($backupcount <= 0)
|
||||
echo "{${$parameter}["no_backup"]}\n";
|
||||
else
|
||||
system("ls -1lht /usr/local/apache/htdocs/bss_db");
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "{${$parameter}["no_backup"]}\n";
|
||||
}
|
||||
echo "</PRE>\n";
|
||||
|
||||
|
||||
|
||||
echo "<BR>\n";
|
||||
echo "<FORM action=cfg_download.php method=post onSubmit='return submit_check(this);'>\n";
|
||||
echo "<font color=blue size=+1>{${$parameter}["selectfile"]}: </font>";
|
||||
echo "<SELECT name=selectfile size=1 style='width: 200'>\n";
|
||||
echo "<OPTION value=''></OPTION>\n";
|
||||
foreach ($backuplist as $value)
|
||||
echo "<OPTION value=\"$value\">$value</OPTION>\n";
|
||||
echo "</SELECT>\n";
|
||||
echo "<HR>\n";
|
||||
echo "<INPUT type=hidden name=language value=$language>\n";
|
||||
echo "<INPUT type=hidden name=bssid value=$bssid>\n";
|
||||
echo "<INPUT type=hidden name=version value=$version>\n";
|
||||
echo "<INPUT type=hidden name=tarfile>\n";
|
||||
|
||||
echo "<INPUT type=submit value={${$parameter}["submit"]} style='width: 80'>\n";
|
||||
if (isset($bssid))
|
||||
echo "<INPUT type=button value='{${$parameter}[back]}' " .
|
||||
"onClick='javascript:parent.location.href=" .
|
||||
"\"modifyBssParam.php?language=$language&bssid=$bssid\"'>";
|
||||
echo "</FORM>\n";
|
||||
echo "</HTML>\n";
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
/******************************************
|
||||
* Mount the BSC /hd0 to /tmp/$$ directory
|
||||
*******************************************/
|
||||
$tmpdir = sprintf("%.3f",time()/1000);
|
||||
$iwbox = "bss${bssid}";
|
||||
$ip = name2ip($iwbox);
|
||||
$path_prefix = "tmp";
|
||||
|
||||
//---------------FTP BSS Config,EMS -> BSS-----------------------
|
||||
$bscLoginName="www";
|
||||
$bscLoginPassword="123456";
|
||||
$remote_dir="/hd0/{$version}/compile/cfg";
|
||||
|
||||
flush();
|
||||
echo "Please wait, the operation will take some time<br>";
|
||||
ob_flush();
|
||||
flush();
|
||||
|
||||
system("rm -rf /$path_prefix/$iwbox");
|
||||
mkdir("/$path_prefix/$iwbox",0755);
|
||||
system("cp $tarfile /$path_prefix/$iwbox");
|
||||
chdir("/$path_prefix/$iwbox");
|
||||
system("tar zxf *.tar.gz");
|
||||
system("rm -rf *.tar.gz");
|
||||
|
||||
|
||||
$conn_id=ftp_connect($ip);
|
||||
if($conn_id == FALSE)
|
||||
{
|
||||
echo "<b>FTP:connect to $ip <font color=red>failed</font>.</b><br>";
|
||||
back();
|
||||
}
|
||||
if(FALSE == ftp_login($conn_id,$bscLoginName,$bscLoginPassword))
|
||||
{
|
||||
echo "<b>FTP:login to $ip <font color=red>failed</font>.</b><br>";
|
||||
back();
|
||||
}
|
||||
|
||||
|
||||
clearstatcache();
|
||||
ftp_put_whole_dir("/$path_prefix/$iwbox",$remote_dir,$conn_id);
|
||||
|
||||
ftp_close($conn_id);
|
||||
|
||||
system("rm -rf /$path_prefix/$iwbox");
|
||||
|
||||
function ftp_put_whole_dir($local_dir,$remote_dir,$conn_id)
|
||||
{
|
||||
if($handle = opendir($local_dir))
|
||||
{
|
||||
while(false !== ($file = readdir($handle)))
|
||||
{
|
||||
if($file != "." && $file != "..")
|
||||
{
|
||||
if(strlen(trim($file))<=0)
|
||||
continue;
|
||||
|
||||
if(is_dir($file))
|
||||
{
|
||||
ftp_put_whole_dir($local_dir."/$file",$remote_dir."/$file",$conn_id);
|
||||
}
|
||||
else
|
||||
{
|
||||
flush();
|
||||
echo "<img border=\"0\" src=\"../../images/arrow.gif\" width=\"10\" height=\"10\">";
|
||||
ob_flush();
|
||||
flush();
|
||||
|
||||
ftp_put($conn_id,$remote_dir."/$file",$local_dir."/$file",FTP_BINARY);
|
||||
//echo "$local_dir $remote_dir $file<br>";
|
||||
}
|
||||
}
|
||||
}
|
||||
closedir($handle);
|
||||
}
|
||||
}
|
||||
|
||||
echo "<br>Download completely<br>";
|
||||
echo "</PRE>\n";
|
||||
echo "<INPUT type=button value={${$parameter}["rebootbsc"]} " .
|
||||
"onClick='javascript:window.location.href=\"modify.php?bssid=$bssid&url=bssfunc.php&language=$language&nmicommand=action 7:2&objectid=Bsc.0\"'>";
|
||||
|
||||
|
||||
exit();
|
||||
//-------------------------------------------------------
|
||||
|
||||
/***************************************************************************************
|
||||
* PHP state machine
|
||||
*
|
||||
* Rename original build and create directory
|
||||
* Format: it is a 2D array
|
||||
* Array(
|
||||
* Array('function','description','next state if success','next state if fail'
|
||||
* )
|
||||
****************************************************************************************/
|
||||
$cmdlist = Array(
|
||||
's00' => Array ('system("/bin/ping -q -c 1 $ip >> /dev/null", $retval);return($retval);',
|
||||
"{${$parameter}["ping"]} $iwbox ($ip) ...",
|
||||
"kickout","s01"),
|
||||
|
||||
's01' => Array ('return(is_dir("$path_prefix/$iwbox"));',
|
||||
"{${$parameter}["checkexist"]} $path_prefix/$iwbox",
|
||||
"s03","s02"),
|
||||
|
||||
's02' => Array ('return(mkdir("$path_prefix/$iwbox",0700));',
|
||||
"{${$parameter}["create_dir"]} $path_prefix/$iwbox",
|
||||
"s03","halt"),
|
||||
|
||||
's03' => Array ('system("umount $path_prefix/$iwbox", $retval);return($retval);',
|
||||
"",
|
||||
//"{${$parameter}["umounting"]} $path_prefix/$iwbox",
|
||||
"s04","s03"),
|
||||
|
||||
's04' => Array ('system("mount $path_prefix/$iwbox", $retval);return($retval);',
|
||||
"{${$parameter}["mounting"]} $path_prefix/$iwbox",
|
||||
"halt","s40"),
|
||||
|
||||
's40' => Array ('return(is_dir(sprintf("$path_prefix/$iwbox/%s/compile/cfg",strtoupper($version))));',
|
||||
"{${$parameter}["checkexist"]} $path_prefix/$iwbox/$version/compile/cfg",
|
||||
"s41","halt"),
|
||||
|
||||
's41' => Array ('return(chdir (sprintf("$path_prefix/$iwbox/%s/compile/cfg",strtoupper($version))));',
|
||||
"{${$parameter}["chdir"]} $path_prefix/$iwbox/$version/compile/cfg",
|
||||
"s60","halt"),
|
||||
|
||||
's60' => Array ('return(is_file("$tarfile"));',
|
||||
"{${$parameter}["checkexist"]} $tarfile",
|
||||
"s61","halt"),
|
||||
|
||||
's61' => Array ('system("tar zxf $tarfile", $retval);return($retval);',
|
||||
"{${$parameter}["untar"]} $tarfile ...",
|
||||
"halt","cleanup"),
|
||||
|
||||
"cleanup" => Array('return(is_dir("$path_prefix/$iwbox"));',
|
||||
"{${$parameter}["checkexist"]} $path_prefix/$iwbox",
|
||||
"chroot","getout"),
|
||||
|
||||
'chroot' => Array ('return(chdir("/"));',
|
||||
"{${$parameter}["chdir"]} $path_prefix/$iwbox/$version/compile/cfg",
|
||||
"umount","getout"),
|
||||
|
||||
"umount" => Array('system("umount $path_prefix/$iwbox", $retval);return($retval);',
|
||||
"{${$parameter}["umounting"]} $path_prefix/$iwbox",
|
||||
"umount","rmdir"),
|
||||
|
||||
"rmdir" => Array('return(rmdir("$path_prefix/$iwbox"));',
|
||||
"{${$parameter}["rmdir"]} $path_prefix/$iwbox",
|
||||
"getout","getout")
|
||||
);
|
||||
|
||||
|
||||
if (isset($debug))
|
||||
{
|
||||
foreach ($cmdlist as $key => $value)
|
||||
{
|
||||
echo "$key,$value[0],$value[1],$value[2],$value[3]<BR>";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*********************************************
|
||||
* Execute the state machine here
|
||||
*********************************************/
|
||||
echo "<font color=red size=+1>{${$parameter}["heading"]}<BR></font>";
|
||||
echo "<PRE>";
|
||||
for ($state="s00" ; ; )
|
||||
{
|
||||
if (isset($debug))
|
||||
echo "{$cmdlist[$state][0]}\n$state: ";
|
||||
|
||||
echo "{${cmdlist}[$state][1]}";
|
||||
flush();
|
||||
if (@eval(${cmdlist}["$state"][0]))
|
||||
$state = $cmdlist[$state][2];
|
||||
else
|
||||
$state = $cmdlist[$state][3];
|
||||
|
||||
|
||||
if ($state == "getout")
|
||||
{
|
||||
echo " ... {${$parameter}["ok"]}\n";
|
||||
break;
|
||||
}
|
||||
else if ($state == "kickout")
|
||||
{
|
||||
echo " ... {${$parameter}["not_ok"]}\n";
|
||||
echo "</PRE><font color=red size=+1>... {${$parameter}["failed"]}<BR></font>";
|
||||
echo "<PRE>";
|
||||
break;
|
||||
}
|
||||
else if ($state == "halt")
|
||||
{
|
||||
echo " ... {${$parameter}["not_ok"]}\n";
|
||||
echo "</PRE><font color=red size=+1>... {${$parameter}["failed"]}<BR></font>";
|
||||
echo "<PRE>";
|
||||
$state = "cleanup";
|
||||
}
|
||||
else
|
||||
{
|
||||
if (${cmdlist}[$state][1] != "")
|
||||
echo " ... {${$parameter}["ok"]}\n";
|
||||
}
|
||||
}
|
||||
|
||||
echo "</PRE>\n";
|
||||
echo "<font color=blue>... {${$parameter}["done"]}<BR></font>";
|
||||
echo "<INPUT type=button value={${$parameter}["rebootbsc"]} " .
|
||||
"onClick='javascript:window.location.href=\"modify.php?bssid=$bssid&url=bssfunc.php&language=$language&nmicommand=action 7:2&objectid=Bsc.0\"'>";
|
||||
|
||||
|
||||
?>
|
||||
53
wxc2_omc/configuration/bssomc/cfg_upload.inc
Executable file
@@ -0,0 +1,53 @@
|
||||
<?php
|
||||
$gbnamearray = Array(
|
||||
availfile => "<EFBFBD>ŷ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>±<EFBFBD><EFBFBD><EFBFBD>",
|
||||
no_backup => "<EFBFBD>Ҳ<EFBFBD><EFBFBD><EFBFBD>BSC<EFBFBD><EFBFBD><EFBFBD>ݵ<EFBFBD>",
|
||||
selectfile => "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>BSC<EFBFBD><EFBFBD><EFBFBD>ݵ<EFBFBD>",
|
||||
err_msg => "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>",
|
||||
heading => "<EFBFBD><EFBFBD><EFBFBD>ݿⱸ<EFBFBD><EFBFBD>",
|
||||
remind => "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><EFBFBD><EFBFBD>浵<EFBFBD><EFBFBD><EFBFBD><EFBFBD>С<EFBFBD><EFBFBD><EFBFBD>ı<EFBFBD>",
|
||||
cleanup => "<EFBFBD>ͷ<EFBFBD><EFBFBD><EFBFBD>Դ",
|
||||
checkexist => "<EFBFBD>鿴",
|
||||
rename => "<EFBFBD><EFBFBD><EFBFBD>ĵ<EFBFBD><EFBFBD><EFBFBD>",
|
||||
copy => "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>",
|
||||
ok => "<EFBFBD>ɹ<EFBFBD>",
|
||||
not_ok => "<EFBFBD><EFBFBD><EFBFBD>ɹ<EFBFBD>",
|
||||
done => "<EFBFBD><EFBFBD><EFBFBD>ݿⱸ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>",
|
||||
failed => "ʧ<EFBFBD><EFBFBD>",
|
||||
create_dir => "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ŀ¼",
|
||||
rmdir => "ɾ<EFBFBD><EFBFBD>Ŀ¼",
|
||||
chdir => "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ŀ¼",
|
||||
tar => "<EFBFBD><EFBFBD>ѹ",
|
||||
submit => "ȷ<EFBFBD><EFBFBD>",
|
||||
back => "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>",
|
||||
ping => "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>",
|
||||
mounting => "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>",
|
||||
umounting => "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
|
||||
);
|
||||
|
||||
$engnamearray = Array(
|
||||
availfile => "Previous BSC database backup",
|
||||
no_backup => "No database backup file is found",
|
||||
selectfile => "Please input a backup filename",
|
||||
err_msg => "Please make sure you have input the correct parameters",
|
||||
heading => "BSS database backup",
|
||||
remind => "The database backup time may vary with the file size",
|
||||
cleanup => "Cleaning up allocated resources",
|
||||
checkexist => "Checking the existent of",
|
||||
rename => "Renaming",
|
||||
copy => "Copying",
|
||||
ok => "OK",
|
||||
not_ok => "Not OK",
|
||||
done => "Database backup is complete.",
|
||||
failed => "Failed",
|
||||
create_dir => "Creating directory",
|
||||
rmdir => "Removing directory",
|
||||
chdir => "Changing directory",
|
||||
tar => "Compressing",
|
||||
submit => "CONFIRM",
|
||||
back => "BACK",
|
||||
ping => "Pinging",
|
||||
mounting => "Mounting",
|
||||
umounting => "Unmounting"
|
||||
);
|
||||
?>
|
||||
326
wxc2_omc/configuration/bssomc/cfg_upload.php
Executable file
@@ -0,0 +1,326 @@
|
||||
<?php
|
||||
//
|
||||
// Created on: 11 Sep 2001
|
||||
// Usage: cfg_upload.php?[language="eng|gb"]
|
||||
// &bssid=0
|
||||
// &version=iw05_01.048
|
||||
// &tarfile=/usr/local/apache/htdocs/bss_db/bss0_20010914_0.tar.gz
|
||||
//
|
||||
// Function: Transfer BSS software from OMC Server
|
||||
// to BSC harddisk based on bssdist.fls file
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
// Remarks:
|
||||
// - Use explode() as a faster split()
|
||||
// - Function like tar, mount, umount return 0 if there is no error
|
||||
//
|
||||
?>
|
||||
|
||||
<?php
|
||||
include("nocache.inc");
|
||||
include("header.inc");
|
||||
include("ip2name.inc");
|
||||
include("read_bssdist.inc");
|
||||
include("cfg_upload.inc");
|
||||
?>
|
||||
|
||||
<?
|
||||
//$debug=1;
|
||||
|
||||
if (!isset($language))
|
||||
$language="eng";
|
||||
$parameter="${language}namearray";
|
||||
|
||||
|
||||
if (!isset($version) || !isset($bssid))
|
||||
{
|
||||
echo "<font color=red size=+1>{${$parameter}["err_msg"]}</font>";
|
||||
return;
|
||||
}
|
||||
//$url_temp=$_SERVER["REQUEST_URI"];
|
||||
//echo "This page URL:$url_temp<br>";
|
||||
|
||||
/*****************************************
|
||||
* Locate tar file if it is not given
|
||||
*
|
||||
*****************************************/
|
||||
if (!isset($tarfile))
|
||||
{
|
||||
echo "<HTML>\n";
|
||||
?>
|
||||
|
||||
<script language="JavaScript">
|
||||
<!--
|
||||
function submit_check(myForm)
|
||||
{
|
||||
if (myForm.selectfile.value == "")
|
||||
{
|
||||
alert("No filename found");
|
||||
return (false);
|
||||
}
|
||||
myForm.tarfile.value = "/usr/local/apache/htdocs/bss_db/" + myForm.selectfile.value + ".tar.gz";
|
||||
return (true);
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
|
||||
<?php
|
||||
echo "<font color=blue size=+1>{${$parameter}["availfile"]}:</font>";
|
||||
echo "<HR>\n";
|
||||
|
||||
echo "<PRE>\n";
|
||||
if (is_dir("/usr/local/apache/htdocs/bss_db"))
|
||||
{
|
||||
//$backuplist = Array();
|
||||
exec("ls -1t /usr/local/apache/htdocs/bss_db",$backuplist,$retval);
|
||||
$backupcount = count($backuplist);
|
||||
if ($backupcount <= 0)
|
||||
echo "{${$parameter}["no_backup"]}\n";
|
||||
else
|
||||
system("ls -1lht /usr/local/apache/htdocs/bss_db");
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "{${$parameter}["no_backup"]}\n";
|
||||
}
|
||||
echo "</PRE>\n";
|
||||
|
||||
|
||||
|
||||
echo "<BR>\n";
|
||||
echo "<FORM action=cfg_upload.php method=post onSubmit='return submit_check(this);'>\n";
|
||||
echo "<font color=blue size=+1>{${$parameter}["selectfile"]}: </font>";
|
||||
echo "<INPUT type=text name=selectfile value=\"bss${bssid}_" . date("Y_m_d_H") . "\">\n";
|
||||
echo ".tar.gz";
|
||||
|
||||
echo "<HR>\n";
|
||||
echo "<INPUT type=hidden name=language value=$language>\n";
|
||||
echo "<INPUT type=hidden name=bssid value=$bssid>\n";
|
||||
echo "<INPUT type=hidden name=version value=$version>\n";
|
||||
echo "<INPUT type=hidden name=tarfile>\n";
|
||||
|
||||
echo "<INPUT type=submit value={${$parameter}["submit"]} style='width: 80'>\n";
|
||||
if (isset($bssid))
|
||||
echo "<INPUT type=button value='{${$parameter}[back]}' " .
|
||||
"onClick='javascript:parent.location.href=" .
|
||||
"\"modifyBssParam.php?language=$language&bssid=$bssid\"'>";
|
||||
echo "</FORM>\n";
|
||||
echo "</HTML>\n";
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
/******************************************
|
||||
* Mount the BSC /hd0 to /tmp/$$ directory
|
||||
*******************************************/
|
||||
$tmpdir = sprintf("%.3f",time()/1000);
|
||||
$iwbox = "bss${bssid}";
|
||||
$ip = name2ip($iwbox);
|
||||
$path_prefix = "/tmp";
|
||||
|
||||
//-----------------FTP BSC Config,BSS -> EMS ---------------------
|
||||
$bscLoginName="www";
|
||||
$bscLoginPassword="123456";
|
||||
$file_list_name="/tmp/file_list.txt";
|
||||
|
||||
flush();
|
||||
echo "Please wait, the operation will take some time<br>";
|
||||
ob_flush();
|
||||
flush();
|
||||
|
||||
system("rm -rf $path_prefix/$iwbox");
|
||||
|
||||
mkdir("$path_prefix/$iwbox", 0755);
|
||||
|
||||
system("./ftpGetList $ip $bscLoginName $bscLoginPassword /hd0/{$version}/compile/cfg $path_prefix/$iwbox 1>/dev/null 2>&1");
|
||||
|
||||
$conn_id=ftp_connect($ip);
|
||||
if($conn_id == FALSE)
|
||||
{
|
||||
echo "<b>FTP:connect to $ip <font color=red>failed</font>.</b><br>";
|
||||
back();
|
||||
}
|
||||
if(FALSE == ftp_login($conn_id,$bscLoginName,$bscLoginPassword))
|
||||
{
|
||||
echo "<b>FTP:login to $ip <font color=red>failed</font>.</b><br>";
|
||||
back();
|
||||
}
|
||||
|
||||
$handle = @fopen($file_list_name, "r");
|
||||
|
||||
if ($handle) {
|
||||
while (!feof($handle)) {
|
||||
$buffer = fgets($handle, 4096);
|
||||
if(strlen(trim($buffer)) < 8)
|
||||
continue;
|
||||
$sp=explode(",",$buffer);
|
||||
$remote_dir=trim($sp[0]);
|
||||
$local_dir=trim($sp[1]);
|
||||
$ftpfile=trim($sp[2]);
|
||||
|
||||
|
||||
flush();
|
||||
echo "<img border=\"0\" src=\"../../images/arrow.gif\" width=\"10\" height=\"10\">";
|
||||
ob_flush();
|
||||
flush();
|
||||
|
||||
|
||||
//ftp_chdir($conn_id,$remote_dir);
|
||||
$tmp1=$local_dir."/".$ftpfile;
|
||||
$tmp2=$remote_dir."/".$ftpfile;
|
||||
//echo "Get {$tmp2} from $iwbox ";
|
||||
ftp_get($conn_id,$tmp1,$tmp2,FTP_BINARY);
|
||||
}
|
||||
fclose($handle);
|
||||
}
|
||||
ftp_close($conn_id);
|
||||
|
||||
unlink($file_list_name);
|
||||
|
||||
flush();
|
||||
echo "<br>Compress $tarfile<br>";
|
||||
ob_flush();
|
||||
flush();
|
||||
|
||||
chdir("$path_prefix/$iwbox");
|
||||
system("tar zcf $tarfile .");
|
||||
system("rm -rf $path_prefix/$iwbox");
|
||||
|
||||
echo "Backup $tarfile completely<br>";
|
||||
back();
|
||||
exit();
|
||||
//-----------------FTP BSC Config END---------------------------
|
||||
|
||||
/***************************************************************************************
|
||||
* PHP state machine
|
||||
*
|
||||
* Rename original build and create directory
|
||||
* Format: it is a 2D array
|
||||
* Array(
|
||||
* Array('function','description','next state if success','next state if fail'
|
||||
* )
|
||||
****************************************************************************************/
|
||||
$cmdlist = Array(
|
||||
's00' => Array ('system("/bin/ping -q -c 1 $ip >> /dev/null", $retval);return($retval);',
|
||||
"{${$parameter}["ping"]} $iwbox ($ip) ...",
|
||||
"kickout","s01"),
|
||||
|
||||
's01' => Array ('return(is_dir("$path_prefix/$iwbox"));',
|
||||
"{${$parameter}["checkexist"]} $path_prefix/$iwbox",
|
||||
"s03","s02"),
|
||||
|
||||
's02' => Array ('return(mkdir("$path_prefix/$iwbox",0700));',
|
||||
"{${$parameter}["create_dir"]} $path_prefix/$iwbox",
|
||||
"s03","halt"),
|
||||
|
||||
's03' => Array ('system("/bin/umount $path_prefix/$iwbox", $retval);return($retval);',
|
||||
"",
|
||||
//"{${$parameter}["umounting"]} $path_prefix/$iwbox",
|
||||
"s04","s03"),
|
||||
|
||||
's04' => Array ('system("/bin/mount -t nfs $ip:/hd0 $path_prefix/$iwbox", $retval);return($retval);',
|
||||
"{${$parameter}["mounting"]} -t nfs $ip:/hd0 $path_prefix/$iwbox",
|
||||
"s40","halt"),
|
||||
|
||||
's40' => Array ('return(is_dir(sprintf("$path_prefix/$iwbox/%s/compile/cfg",strtoupper($version))));',
|
||||
"{${$parameter}["checkexist"]} $path_prefix/$iwbox/$version/compile/cfg",
|
||||
"s41","halt"),
|
||||
|
||||
's41' => Array ('return(chdir (sprintf("$path_prefix/$iwbox/%s/compile/cfg",strtoupper($version))));',
|
||||
"{${$parameter}["chdir"]} $path_prefix/$iwbox/$version/compile/cfg",
|
||||
"s60","halt"),
|
||||
|
||||
's60' => Array ('return(is_file("$tarfile"));',
|
||||
"{${$parameter}["checkexist"]} $tarfile",
|
||||
"halt","s61"),
|
||||
|
||||
's61' => Array ('system("tar zcf $tarfile .", $retval);return($retval);',
|
||||
"{${$parameter}["tar"]} $tarfile ...",
|
||||
"halt","cleanup"),
|
||||
|
||||
"cleanup" => Array('return(is_dir("$path_prefix/$iwbox"));',
|
||||
"{${$parameter}["checkexist"]} $path_prefix/$iwbox",
|
||||
"chroot","getout"),
|
||||
|
||||
'chroot' => Array ('return(chdir("/"));',
|
||||
"{${$parameter}["chdir"]} $path_prefix/$iwbox/$version/compile/cfg",
|
||||
"umount","getout"),
|
||||
|
||||
"umount" => Array('system("/bin/umount -v $path_prefix/$iwbox", $retval);return($retval);',
|
||||
"{${$parameter}["umounting"]} $path_prefix/$iwbox",
|
||||
"rmdir","umount"),
|
||||
|
||||
"rmdir" => Array('return(rmdir("$path_prefix/$iwbox"));',
|
||||
"{${$parameter}["rmdir"]} $path_prefix/$iwbox",
|
||||
"getout","getout")
|
||||
);
|
||||
|
||||
|
||||
if (isset($debug))
|
||||
{
|
||||
foreach ($cmdlist as $key => $value)
|
||||
{
|
||||
echo "$key,$value[0],$value[1],$value[2],$value[3]<BR>";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*********************************************
|
||||
* Execute the state machine here
|
||||
*********************************************/
|
||||
echo "<font color=red size=+1>{${$parameter}["heading"]}<BR></font>";
|
||||
echo "<PRE>";
|
||||
for ($state="s00" ; ; )
|
||||
{
|
||||
if (isset($debug))
|
||||
echo "{$cmdlist[$state][0]}\n$state: ";
|
||||
|
||||
echo "{${cmdlist}[$state][1]}";
|
||||
flush();
|
||||
if (@eval(${cmdlist}["$state"][0]))
|
||||
$state = $cmdlist[$state][2];
|
||||
else
|
||||
$state = $cmdlist[$state][3];
|
||||
|
||||
|
||||
if ($state == "getout")
|
||||
{
|
||||
echo " ... {${$parameter}["ok"]}\n";
|
||||
break;
|
||||
}
|
||||
else if ($state == "kickout")
|
||||
{
|
||||
echo " ... {${$parameter}["not_ok"]}\n";
|
||||
echo "</PRE><font color=red size=+1>... {${$parameter}["failed"]}<BR></font>";
|
||||
echo "<PRE>";
|
||||
break;
|
||||
}
|
||||
else if ($state == "halt")
|
||||
{
|
||||
echo " ... {${$parameter}["not_ok"]}\n";
|
||||
echo "</PRE><font color=red size=+1>... {${$parameter}["failed"]}<BR></font>";
|
||||
echo "<PRE>";
|
||||
$state = "cleanup";
|
||||
}
|
||||
else
|
||||
{
|
||||
if (${cmdlist}[$state][1] != "")
|
||||
echo " ... {${$parameter}["ok"]}\n";
|
||||
}
|
||||
}
|
||||
|
||||
echo "</PRE><font color=blue>... {${$parameter}["done"]}<BR></font>";
|
||||
|
||||
function back()
|
||||
{
|
||||
global $bssid,$language;
|
||||
|
||||
if (isset($bssid))
|
||||
echo "<INPUT type=button value='Back' " .
|
||||
"onClick='javascript:parent.location.href=" .
|
||||
"\"modifyBssParam.php?language=$language&bssid=$bssid\"'>";
|
||||
}
|
||||
?>
|
||||
460
wxc2_omc/configuration/bssomc/create_objects.php
Executable file
@@ -0,0 +1,460 @@
|
||||
<?php
|
||||
//
|
||||
// Created on: 29 Dec 2009
|
||||
// Usage : create_objects.php?language="eng|gb"&bssid=0&objectid=ALINKSET.0.0
|
||||
// &tablename=OMCR_ALinkSet
|
||||
// [&status="Save is Completed][&alarm=attr value rejected]
|
||||
// Function : Create a Object based on OMCR_Meta_Table
|
||||
// and displaytype.inc.
|
||||
// Remarks : If objectid=BssFunc, it will redirect to another php file.
|
||||
// If $status is defined, the status will show in the status bar of browser.
|
||||
// If $alarm is defined, the text in $alarm will show in popup box.
|
||||
// Attributes has HTML object name as the <attribute name>
|
||||
// Attributes has type as the t<attribute name>
|
||||
//
|
||||
// MySQL table: OMCR_Meta_Table and table specified by $tablename
|
||||
//
|
||||
// modifyBssParam.php ___ bsstree.php (contents)
|
||||
// \__ objects.php (main1)
|
||||
// \create_objects.php
|
||||
//
|
||||
?>
|
||||
<?php
|
||||
if (!isset($language))
|
||||
{
|
||||
$language = "eng";
|
||||
}
|
||||
|
||||
$parameter="${language}namearray";
|
||||
include("nocache.inc");
|
||||
include("objects.inc");
|
||||
?>
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<?php include("header.inc"); ?>
|
||||
<?php
|
||||
function CheckObjExist($objectid,$Object_Name,$bssid)
|
||||
{
|
||||
$sp1=explode(".",$objectid);
|
||||
$replaced=$sp1[0];
|
||||
$sp2=explode("_",$Object_Name);
|
||||
$replacing=$sp2[1];
|
||||
$new_objectid=str_replace($replaced,$replacing,$objectid);
|
||||
|
||||
unset($objExistFlagSet);
|
||||
|
||||
$sql="select * from BssOmcDb.OMCR_BSSTREE where ObjectId like '{$new_objectid}%' and bssid='{$bssid}' ";
|
||||
$res=@mysqli_query($pubConn,$sql);
|
||||
$num=@mysqli_num_rows($res);
|
||||
for($i=0;$i<$num;$i++)
|
||||
{
|
||||
$row=@mysqli_fetch_array($res);
|
||||
$tmp_objectid=$row[ObjectId];
|
||||
$sp3=explode(".",$tmp_objectid);
|
||||
$no=$sp3[count($sp3)-1]-0;
|
||||
$objExistFlagSet[$no]=$row[Presence]-0;
|
||||
}
|
||||
return $objExistFlagSet;
|
||||
}
|
||||
?>
|
||||
<STYLE type="text/ccs">
|
||||
td {height: 24}
|
||||
</STYLE>
|
||||
<SCRIPT language="JavaScript" type="text/javascript">
|
||||
<!--
|
||||
var alerting=false;
|
||||
var oldvalue=0;
|
||||
var no_of_refresh=0;
|
||||
var timeout_handle = null;
|
||||
var refresh_bsstree_string="<?=${$parameter}[actioniscompleted]?>";
|
||||
|
||||
function actions(obj,nmicmd,need_confirm)
|
||||
{
|
||||
if (need_confirm)
|
||||
{
|
||||
window.status = "<?=${$parameter}[confirmquestionbegin]?>"
|
||||
+ obj.value + "<?=${$parameter}[confirmquestionend]?>";
|
||||
answer = confirm("<?=${$parameter}[confirmquestionbegin]?>"
|
||||
+ obj.value + "<?=${$parameter}[confirmquestionend]?>");
|
||||
window.status = "";
|
||||
if (answer != true)
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (nmicmd != '')
|
||||
{
|
||||
//this.document.object_form.modified_data.value = '';
|
||||
this.document.object_form.nmicommand.value = nmicmd;
|
||||
}
|
||||
this.document.object_form.submit();
|
||||
}
|
||||
function show_status(status,alarm)
|
||||
{
|
||||
//
|
||||
// alarm and status display
|
||||
if ((typeof(alarm) != "undefined") && (alarm != ""))
|
||||
{
|
||||
window.status=alarm;
|
||||
alert(alarm);
|
||||
window.status="";
|
||||
}
|
||||
if ((typeof(status) != "undefined") && (status != ""))
|
||||
{
|
||||
window.status=status;
|
||||
if ((no_of_refresh < 5) && (status == refresh_bsstree_string))
|
||||
{
|
||||
if (no_of_refresh++ < 5)
|
||||
{
|
||||
//refresh every 2 seconds and repeat for 5 times
|
||||
timeout_handle = setTimeout(show_status,2);
|
||||
parent.contents.location.href=parent.contents.location;
|
||||
}
|
||||
else
|
||||
{
|
||||
clearTimeout(timeout_handle);
|
||||
timeout_handle = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
function submit_form(data)
|
||||
{
|
||||
if (( data.modified_data.value == '') && ( data.nmicommand.value == ''))
|
||||
{
|
||||
window.status="<?=${$parameter}[savenotneed]?>";
|
||||
return(false);
|
||||
}
|
||||
else
|
||||
return(true);
|
||||
}
|
||||
function b4_change(data)
|
||||
{
|
||||
if (alerting)
|
||||
return;
|
||||
|
||||
if ( data.value != '' )
|
||||
{
|
||||
oldvalue=data.value;
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( oldvalue!=0 )
|
||||
data.value=oldvalue;
|
||||
}
|
||||
}
|
||||
function change_made(data)
|
||||
{
|
||||
var parm_string=this.document.object_form.modified_data.value;
|
||||
|
||||
if ( data.value == '')
|
||||
{
|
||||
if ( oldvalue!=0 )
|
||||
{
|
||||
alerting = true; // True if alert() dialogue box is displayed.
|
||||
alert("<?=${$parameter}[entervalidvalue]?>");
|
||||
data.value = oldvalue;
|
||||
data.focus();
|
||||
alerting = false;
|
||||
}
|
||||
return;
|
||||
}
|
||||
else if (data.value == oldvalue) //no Change
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if ( parm_string == '' )
|
||||
{
|
||||
this.document.object_form.modified_data.value = data.name;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (parm_string.search(data.name) == -1)
|
||||
this.document.object_form.modified_data.value += ","+data.name;
|
||||
}
|
||||
}
|
||||
//-->
|
||||
</SCRIPT>
|
||||
<TITLE>
|
||||
|
||||
BSS OMC -> <?=$objectid;?>
|
||||
</TITLE>
|
||||
</HEAD>
|
||||
<BODY onLoad='show_status("<?=$status?>","<?=$alarm?>");'>
|
||||
<?php
|
||||
//echo "<br>saved=$saved";
|
||||
echo "<font color=red size=+1>$alarm</font>";
|
||||
echo "<HR SIZE=1>";
|
||||
$status="";
|
||||
|
||||
if (!isset($bssid) || !isset($objectid) || !isset($tablename))
|
||||
{
|
||||
echo "The required information for this page is invalid.<br>\n";
|
||||
echo "</BODY>\n</HTML>";
|
||||
exit();
|
||||
}
|
||||
|
||||
include("meta_table_type.inc");
|
||||
include("login_parm.inc");
|
||||
|
||||
//
|
||||
// Translate the value to string
|
||||
// e.g. AdminState=2 --> AdminState=Unlocked
|
||||
//
|
||||
function translate($input,$data)
|
||||
{
|
||||
$found=-1;
|
||||
if ($data)
|
||||
{
|
||||
$items=split("[;=]",$data);
|
||||
$no_of_items=count($items);
|
||||
|
||||
for ($i=0;$i<$no_of_items;$i+=2) {
|
||||
if ( $input == $items[$i+1] ) {
|
||||
$found=$i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if ($found != -1)
|
||||
return($items[$found]);
|
||||
}
|
||||
return($input);
|
||||
}
|
||||
|
||||
$db = mysql_connect($hostname, $username, $password);
|
||||
mysql_select_db($dbname,$db);
|
||||
|
||||
// LOOK UP OMCR_META_TABLE for display parameters and buttons
|
||||
//
|
||||
// Display different xxxDisplay_Name base on the language selected
|
||||
//
|
||||
//
|
||||
|
||||
|
||||
$sqlstring = "select Object_Name,Attribute_Name,Attribute_Id,Attribute_Type,Display_Type,Default_Value," .
|
||||
"${language}Display_Name,${language}Lookup,${language}Help_Text" .
|
||||
" from OMCR_Meta_Table " .
|
||||
"where Display_Type<> 0 AND Object_Name='" . substr($tablename,5) . "'";
|
||||
|
||||
//echo $sqlstring . "<BR>";
|
||||
$objExistFlagSet=CheckObjExist($objectid,substr($tablename,5),$bssid);
|
||||
ksort($objExistFlagSet);
|
||||
$haveElementFlag=0;
|
||||
if(0)
|
||||
{
|
||||
echo "<pre>";
|
||||
print_r($objExistFlagSet);
|
||||
echo "</pre>";
|
||||
}
|
||||
$result = mysql_query($sqlstring,$db) or
|
||||
die("Invalid query: $sqlstring\n" . mysqli_error($pubConn));
|
||||
while ( $row = mysqli_fetch_row($result) )
|
||||
{
|
||||
if (($row[4] == PUSH_BUTTON) || ($row[4] == CONFIRM_PUSH_BUTTON)) //For action item in NMI
|
||||
list($act_object_name[], $act_attribute_name[], $act_attribute_id[], $act_attribute_type[],
|
||||
$act_display_type[], $act_default_value[],$act_display_name[], $act_lookup[],
|
||||
$act_help_text[]) = $row;
|
||||
else
|
||||
list($object_name[],$attribute_name[],$attribute_id[],$attribute_type[],$display_type[],$default_value[],
|
||||
$display_name[],$lookup[],$help_text[]) = $row;
|
||||
}
|
||||
$no_of_parms = count($attribute_name);
|
||||
|
||||
echo "<U><FONT color=#00FF0F size=+3pt>=) " . strtoupper($objectid) . "</FONT></U><BR>\n";
|
||||
echo "<FORM action=modify.php name='object_form' method=post\n" .
|
||||
"onSubmit='return submit_form(this.document.object_form);'>";
|
||||
|
||||
if ($no_of_parms == 0)
|
||||
{
|
||||
echo "<BR>";
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "<TABLE border=0 cellspacing=0 cellpadding=0 width=400>\n";
|
||||
echo "<INPUT type=hidden name='modified_data' value=''>\n";
|
||||
for ($i=0; $i<$no_of_parms; $i++)
|
||||
{
|
||||
//printf("%s%s %s\n",$display_type[$i],$attribute_name[$i],$lookup[$i]);
|
||||
switch($display_type[$i])
|
||||
{
|
||||
case DO_NOT_DISPLAY: //do not display
|
||||
$widget="";
|
||||
continue;
|
||||
case PULLDOWN_MENU: //pulldown menu
|
||||
$widget="<SELECT size=1 name='" . $attribute_name[$i] .
|
||||
"' onFocus='b4_change(this.document.object_form." .
|
||||
$attribute_name[$i] .
|
||||
")' onBlur='change_made(this.document.object_form." .
|
||||
$attribute_name[$i] .")' style='font-size: 10pt; border: 1 solid #646464'>";
|
||||
$existed=0;
|
||||
|
||||
$menu_items=split("[;=]", $lookup[$i]);
|
||||
$no_of_menu_items=count($menu_items);
|
||||
/*
|
||||
for($j=0;$j<$no_of_menu_items;$j+=2)
|
||||
{
|
||||
if($objExistFlagSet[$menu_items[$j]] == 1)
|
||||
continue;
|
||||
$widget.="<option value=" . $menu_items[$j+1];
|
||||
if ($default_value[$i] == $menu_items[$j+1])
|
||||
{
|
||||
$widget.=" selected>";
|
||||
$existed=1;
|
||||
}
|
||||
else
|
||||
{
|
||||
$widget.=">";
|
||||
}
|
||||
$widget.=$menu_items[$j] . "</option>\n";
|
||||
}
|
||||
*/
|
||||
$isSelected=0;
|
||||
foreach($objExistFlagSet as $key => $value)
|
||||
{
|
||||
if($value == 0)
|
||||
$haveElementFlag=1;
|
||||
if($value != 1)
|
||||
{
|
||||
$widget.="<option value=\"{$key}\" ";
|
||||
if($isSelected == 0)
|
||||
{
|
||||
$isSelected=1;
|
||||
$widget.=" selected>";
|
||||
$existed=1;
|
||||
}
|
||||
else
|
||||
{
|
||||
$widget.=">";
|
||||
}
|
||||
$widget.=$key . "</option>\n";
|
||||
}
|
||||
}
|
||||
|
||||
$widget.="</SELECT>";
|
||||
?>
|
||||
<SCRIPT language="JavaScript" type="text/javascript">
|
||||
var parm_string=this.document.object_form.modified_data.value;
|
||||
if ( parm_string == '' )
|
||||
{
|
||||
this.document.object_form.modified_data.value = <?php echo "'".$attribute_name[$i]."'" ?>;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (parm_string.search(<?php echo "'".$attribute_name[$i]."'" ?>) == -1)
|
||||
this.document.object_form.modified_data.value += ","+<?php echo "'".$attribute_name[$i]."'" ?>;
|
||||
}
|
||||
</SCRIPT>
|
||||
<?php
|
||||
// if (!$existed)
|
||||
// $widget="* Unknown value ($default_value[$i]) *";
|
||||
break;
|
||||
case TEXTBOX: //text box
|
||||
$widget="<INPUT type=text name=" . $attribute_name[$i] .
|
||||
" size=20 value='" . rawurldecode($default_value[$i]) .
|
||||
"' onFocus='b4_change(this.document.object_form." .
|
||||
$attribute_name[$i] .
|
||||
")' onBlur='change_made(this.document.object_form." .
|
||||
$attribute_name[$i] .")' style='font-size: 10pt; border: 1 solid #646464'>";
|
||||
break;
|
||||
case LABEL: //label
|
||||
if (!strcasecmp($attribute_name[$i], "adminstate"))
|
||||
$adminstate = $default_value[$i];
|
||||
$widget=translate($default_value[$i],$lookup[$i]);
|
||||
$widget.="<INPUT type=hidden name='$attribute_name[$i]' value='$default_value[$i]'>\n";
|
||||
break;
|
||||
case RADIO_BUTTON: //radio button
|
||||
$widget="<INPUT type=radio name=" . $attribute_name .
|
||||
" value='" . translate($default_value[$i],$lookup[$i]) .
|
||||
"' onBlur='change_made(this.document.object_form." .
|
||||
$attribute_name[$i] . ")'>" .
|
||||
$default_value[$i] . "\n";
|
||||
break;
|
||||
case CHECKBOX: //check box
|
||||
$widget="<INPUT type=checkbox name=" . $attribute_name[$i] .
|
||||
" value=1" . ($default_value[$i]? " CHECKED ":" ") .
|
||||
"onBlur='change_made(this.document.object_form." .
|
||||
$attribute_name[$i] . ")'>";
|
||||
break;
|
||||
case TEXTAREA: //text area
|
||||
$widget="<TEXTAREA name=" . $attribute_name[$i] .
|
||||
" rows=4 cols=45" .
|
||||
"onBlur='change_made(this.document.object_form." .
|
||||
$attribute_name[$i] . ")'>" . rawurldecode($default_value[$i]) . "</TEXTAREA>";
|
||||
break;
|
||||
}
|
||||
|
||||
if (strstr($saved,$attribute_name[$i]) != false)
|
||||
$color="#00F0FF";
|
||||
else
|
||||
$color="#FFFFFF";
|
||||
|
||||
$widget_type = "<INPUT type=hidden name=t$attribute_name[$i] value=$attribute_type[$i]>";
|
||||
|
||||
printf(" <TR><TD bgcolor=%s title='%s'>%s%s</TD><TD>%s</TD></TR>\n",
|
||||
$color, $help_text[$i], $display_name[$i], $widget_type, $widget);
|
||||
}
|
||||
echo "</TABLE>\n";
|
||||
}
|
||||
|
||||
//
|
||||
// Display the action buttons & confirmed action buttons
|
||||
//
|
||||
//
|
||||
$no_of_actions = count($act_attribute_name);
|
||||
for ($i=0;$i<$no_of_actions;$i++)
|
||||
{
|
||||
if (!strncasecmp($act_lookup[$i],"javascript:",11)) // Direct to another webpage
|
||||
{
|
||||
echo "<INPUT type=submit value='" . $act_display_name[$i] .
|
||||
"' name='" . $act_attribute_name[$i] .
|
||||
"' onClick='" . $act_lookup[$i] . "'>\n";
|
||||
}
|
||||
else if ($act_lookup[$i] != '') // NMI Actions
|
||||
{
|
||||
if ($act_display_type[$i] == CONFIRM_PUSH_BUTTON)
|
||||
$need_confirm = "true";
|
||||
else
|
||||
$need_confirm = "false";
|
||||
|
||||
echo "<INPUT type=button value='" . $act_display_name[$i] .
|
||||
"' name='" . $act_attribute_name[$i] .
|
||||
"' onClick='actions(this.document.object_form." .
|
||||
$act_attribute_name[$i] . ",\"" . $act_lookup[$i] . "\",$need_confirm)' ";
|
||||
|
||||
if(stristr($act_display_name[$i],"create"))
|
||||
{
|
||||
if($haveElementFlag == 0)
|
||||
echo "disabled";
|
||||
}
|
||||
|
||||
|
||||
echo ">\n";
|
||||
}
|
||||
else if ($act_attribute_name[$i] == "Revert") // Reset Webpage input the original value
|
||||
{
|
||||
echo "<INPUT type=reset value='" . $act_display_name[$i] .
|
||||
"' name='Revert'>\n";
|
||||
}
|
||||
else // Simply Save the altered values
|
||||
{
|
||||
echo "<INPUT type=submit value='" . $act_display_name[$i] .
|
||||
"' name='" . $act_attribute_name[$i] . "'>\n";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
echo "<INPUT type=hidden name='nmicommand' value=''>\n";
|
||||
echo "<INPUT type=hidden name='bssid' value=$bssid>\n";
|
||||
echo "<INPUT type=hidden name='objectid' value=$objectid>\n";
|
||||
echo "<INPUT type=hidden name='tablename' value=$tablename>\n";
|
||||
echo "<INPUT type=hidden name='language' value=$language>\n";
|
||||
echo "<INPUT type=hidden name='x' value=$x>\n";
|
||||
echo "<INPUT type=hidden name='y' value=$y>\n";
|
||||
echo "<HR size=1>\n";
|
||||
?>
|
||||
|
||||
</FORM>
|
||||
</BODY>
|
||||
</HTML>
|
||||
26
wxc2_omc/configuration/bssomc/data_download.inc
Executable file
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
$gbnamearray = Array(
|
||||
header => "OMC<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>",
|
||||
confirm_qu => "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>OMC<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>BSC<EFBFBD><EFBFBD>",
|
||||
step1 => "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>һ: <20><><EFBFBD>ز<EFBFBD><D8B2><EFBFBD><EFBFBD><EFBFBD>BSC",
|
||||
step2 => "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: ͬ<><CDAC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>",
|
||||
step3 => "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD><D6B6><EFBFBD><EFBFBD><EFBFBD>ϵͳ<CFB5><CDB3><EFBFBD><EFBFBD><EFBFBD><EFBFBD>",
|
||||
confirm => "ȷ<EFBFBD><EFBFBD>",
|
||||
back => "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>",
|
||||
dnloadfail => "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʧ<EFBFBD><EFBFBD>",
|
||||
done => "<EFBFBD><EFBFBD><EFBFBD>ɡ<EFBFBD>"
|
||||
|
||||
);
|
||||
|
||||
$engnamearray = Array(
|
||||
header => "Download Parameters to BSC",
|
||||
confirm_qu => "Are you sure you want to download paremeters from OMC to BSC?",
|
||||
step1 => "Step 1: Download parameters to BSC",
|
||||
step2 => "Step 2: Update Gui parameters",
|
||||
step3 => "Step 3: Finished. You need to unlock system objects manually.",
|
||||
confirm => "CONFIRM",
|
||||
back => "BACK",
|
||||
dnloadfail => "Download is Failed.",
|
||||
done => "Done."
|
||||
);
|
||||
?>
|
||||
145
wxc2_omc/configuration/bssomc/data_download.php
Executable file
@@ -0,0 +1,145 @@
|
||||
<?php
|
||||
//
|
||||
// Created on: 25 Dec 2001
|
||||
// Usage: data_download.php?[language="eng|gb"]
|
||||
// &bssid=0
|
||||
//
|
||||
// Function: Download OMC parameters from OMC Server to BSC
|
||||
//
|
||||
//
|
||||
// curr_step 0: Display a confirm dialogue
|
||||
// curr_step 1: Download parameters to BSC
|
||||
// curr_step 2: Upload the updated parameters from BSC to OMC
|
||||
//
|
||||
//
|
||||
?>
|
||||
<?php
|
||||
//$debug=1;
|
||||
|
||||
include("nocache.inc");
|
||||
include("header.inc");
|
||||
include("login_parm.inc");
|
||||
//include("ip2name.inc");
|
||||
//include("read_bssdist.inc");
|
||||
include("data_download.inc");
|
||||
include("download.inc");
|
||||
|
||||
|
||||
if (!isset($language))
|
||||
$language="eng";
|
||||
if (!isset($curr_step))
|
||||
$curr_step=0;
|
||||
if (!isset($debug))
|
||||
$debug=0;
|
||||
$parameter="${language}namearray";
|
||||
|
||||
$db = mysql_connect($hostname, $username, $password);
|
||||
mysql_select_db($dbname,$db);
|
||||
?>
|
||||
<HTML>
|
||||
<HEAD>
|
||||
|
||||
<SCRIPT Language="JavaScript" type="text/javascript">
|
||||
<!--
|
||||
function refresh_screen()
|
||||
{
|
||||
if (document.myForm.reload_it.value == 1)
|
||||
{
|
||||
window.location.href =
|
||||
"data_download.php?language=<?=$language?>&bssid=<?=$bssid?>&curr_step=<?=($curr_step+1)?>";
|
||||
}
|
||||
return;
|
||||
}
|
||||
//-->
|
||||
</SCRIPT>
|
||||
|
||||
</HEAD>
|
||||
|
||||
<?php
|
||||
|
||||
/*******************************************************
|
||||
Display Text in each Step
|
||||
*******************************************************/
|
||||
$steps = Array(
|
||||
1 => ${$parameter}[step1],
|
||||
2 => ${$parameter}[step2],
|
||||
3 => ${$parameter}[step3]
|
||||
);
|
||||
|
||||
|
||||
echo "<BODY onLoad='refresh_screen();'>\n";
|
||||
echo "<font size=+2 color=blue>{${$parameter}[header]}</font><HR>\n";
|
||||
|
||||
if ($curr_step == 0)
|
||||
{
|
||||
echo "{${$parameter}[confirm_qu]}<BR>\n";
|
||||
echo "<FORM name=myForm>\n";
|
||||
echo "<INPUT type=button value={${$parameter}[confirm]} onClick='javascript:location.href=\"data_download.php?language=$language&bssid=$bssid&curr_step=1\"'>\n";
|
||||
echo "<INPUT type=button value={${$parameter}[back]} onClick='javascript:location.href=\"modifyBssParam.php?language=$language&bssid=$bssid\"'>\n";
|
||||
echo "<INPUT type=hidden name=reload_it value=0>\n";
|
||||
echo "</FORM>\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
/*****************************************
|
||||
* Display pre-defined text
|
||||
*****************************************/
|
||||
for ($i=1; $i<$curr_step; $i++)
|
||||
{
|
||||
echo "{$steps[$i]} ... {${$parameter}[done]}<BR>\n";
|
||||
flush();
|
||||
}
|
||||
|
||||
echo "{$steps[$curr_step]}<BR>\n";
|
||||
flush();
|
||||
$retval=-1;
|
||||
switch ($curr_step)
|
||||
{
|
||||
case 1: $retval = download_parameters($db,$bssid,$language,$debug);
|
||||
flush();
|
||||
sleep(2);
|
||||
break;
|
||||
case 2: $retval = upload_parameters($db,$bssid,$debug);
|
||||
flush();
|
||||
sleep(2);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*****************************************
|
||||
* Stop refreshing when all tasks finished
|
||||
*****************************************/
|
||||
if ($curr_step >= sizeof($steps))
|
||||
{
|
||||
echo "<FORM name=myForm>\n";
|
||||
echo "<HR><INPUT type=button value={${$parameter}[back]} onClick='javascript:location.href=\"modifyBssParam.php?language=$language&bssid=$bssid\"'>\n";
|
||||
echo "<INPUT type=hidden name=reload_it value=0>\n";
|
||||
echo "</FORM>\n";
|
||||
}
|
||||
else if ($curr_step > 0)
|
||||
{
|
||||
if ($retval == 0)
|
||||
{
|
||||
echo "<FORM name=myForm>\n";
|
||||
if ($debug)
|
||||
echo "<INPUT type=hidden name=reload_it value=0>\n";
|
||||
else
|
||||
echo "<INPUT type=hidden name=reload_it value=1>\n";
|
||||
echo "</FORM>\n";
|
||||
}
|
||||
else /* Failed */
|
||||
{
|
||||
echo "<font size=+1 color=red> ... {${$parameter}[dnloadfail]} </font><BR>\n";
|
||||
echo "<FORM name=myForm>\n";
|
||||
echo "<HR><INPUT type=button value={${$parameter}[back]} onClick='javascript:location.href=\"modifyBssParam.php?language=$language&bssid=$bssid\"'>\n";
|
||||
echo "<INPUT type=hidden name=reload_it value=0>\n";
|
||||
echo "</FORM>\n";
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
26
wxc2_omc/configuration/bssomc/data_upload.inc
Executable file
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
$gbnamearray = Array(
|
||||
header => "BSC<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>",
|
||||
confirm_qu => "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>BSC<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>OMC<EFBFBD><EFBFBD>",
|
||||
step1 => "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>һ: <20><><EFBFBD>ز<EFBFBD><D8B2><EFBFBD><EFBFBD><EFBFBD>OMC",
|
||||
step2 => "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: ͬ<><CDAC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>",
|
||||
step3 => "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>",
|
||||
confirm => "ȷ<EFBFBD><EFBFBD>",
|
||||
back => "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>",
|
||||
uploadfail => "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʧ<EFBFBD><EFBFBD>",
|
||||
done => "<EFBFBD><EFBFBD><EFBFBD>ɡ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϵͳ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
|
||||
|
||||
);
|
||||
|
||||
$engnamearray = Array(
|
||||
header => "Upload Parameters to OMC",
|
||||
confirm_qu => "Are you sure you want to upload paremeters from BSC to OMC?",
|
||||
step1 => "Step 1: Upload parameters to OMC",
|
||||
step2 => "Step 2: Update Gui parameters",
|
||||
step3 => "Step 3: Finished.",
|
||||
confirm => "CONFIRM",
|
||||
back => "BACK",
|
||||
uploadfail => "Upload is Failed.",
|
||||
done => "Done. You need to unlock system objects manually."
|
||||
);
|
||||
?>
|
||||
135
wxc2_omc/configuration/bssomc/data_upload.php
Executable file
@@ -0,0 +1,135 @@
|
||||
<?php
|
||||
//
|
||||
// Created on: 25 Dec 2001
|
||||
// Usage: data_upload.php?[language="eng|gb"]
|
||||
// &bssid=0
|
||||
//
|
||||
// Function: Upload BSC parameters to OMC progressively
|
||||
//
|
||||
//
|
||||
// curr_step 0: Display a confirm dialogue
|
||||
// curr_step 2: Upload the updated parameters from BSC to OMC
|
||||
//
|
||||
//
|
||||
?>
|
||||
<?php
|
||||
$debug=1;
|
||||
|
||||
include("nocache.inc");
|
||||
include("header.inc");
|
||||
include("login_parm.inc");
|
||||
//include("ip2name.inc");
|
||||
//include("read_bssdist.inc");
|
||||
include("data_upload.inc");
|
||||
include("upload.inc");
|
||||
|
||||
|
||||
if (!isset($language))
|
||||
$language="eng";
|
||||
if (!isset($curr_step))
|
||||
$curr_step=0;
|
||||
$parameter="${language}namearray";
|
||||
|
||||
$db = mysql_connect($hostname, $username, $password);
|
||||
mysql_select_db($dbname,$db);
|
||||
?>
|
||||
<HTML>
|
||||
<HEAD>
|
||||
|
||||
<SCRIPT Language="JavaScript" type="text/javascript">
|
||||
<!--
|
||||
function refresh_screen()
|
||||
{
|
||||
if (document.myForm.reload_it.value == 1)
|
||||
{
|
||||
window.location.href =
|
||||
"data_upload.php?language=<?=$language?>&bssid=<?=$bssid?>&curr_step=<?=($curr_step+1)?>";
|
||||
}
|
||||
return;
|
||||
}
|
||||
//-->
|
||||
</SCRIPT>
|
||||
|
||||
</HEAD>
|
||||
|
||||
<?php
|
||||
|
||||
/*******************************************************
|
||||
Display Text in each Step
|
||||
*******************************************************/
|
||||
$steps = Array(
|
||||
1 => ${$parameter}[step1],
|
||||
2 => ${$parameter}[step2],
|
||||
3 => ${$parameter}[step3]
|
||||
);
|
||||
|
||||
|
||||
echo "<BODY onLoad='refresh_screen();'>\n";
|
||||
echo "<font size=+2 color=blue>{${$parameter}[header]}</font><HR>\n";
|
||||
|
||||
if ($curr_step == 0)
|
||||
{
|
||||
echo "{${$parameter}[confirm_qu]}<BR>\n";
|
||||
echo "<FORM name=myForm>\n";
|
||||
echo "<INPUT type=button value={${$parameter}[confirm]} onClick='javascript:location.href=\"data_upload.php?language=$language&bssid=$bssid&curr_step=1\"'>\n";
|
||||
echo "<INPUT type=button value={${$parameter}[back]} onClick='javascript:location.href=\"modifyBssParam.php?language=$language&bssid=$bssid\"'>\n";
|
||||
echo "<INPUT type=hidden name=reload_it value=0>\n";
|
||||
echo "</FORM>\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
/*****************************************
|
||||
* Display pre-defined text
|
||||
*****************************************/
|
||||
for ($i=1; $i<$curr_step; $i++)
|
||||
{
|
||||
echo $steps[$i] . " ... {${$parameter}[done]}<BR>\n";
|
||||
flush();
|
||||
}
|
||||
|
||||
echo $steps[$curr_step] . "<BR>\n";
|
||||
flush();
|
||||
$retval=-1;
|
||||
switch ($curr_step)
|
||||
{
|
||||
case 1: $retval = upload_parameters($db,$bssid,$debug);
|
||||
flush();
|
||||
sleep(2);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*****************************************
|
||||
* Stop refreshing when all tasks finished
|
||||
*****************************************/
|
||||
if ($curr_step >= sizeof($steps))
|
||||
{
|
||||
echo "<FORM name=myForm>\n";
|
||||
echo "<HR><INPUT type=button value={${$parameter}[back]} onClick='javascript:location.href=\"modifyBssParam.php?language=$language&bssid=$bssid\"'>\n";
|
||||
echo "<INPUT type=hidden name=reload_it value=0>\n";
|
||||
echo "</FORM>\n";
|
||||
}
|
||||
else if ($curr_step > 0)
|
||||
{
|
||||
if ($retval == 0)
|
||||
{
|
||||
echo "<FORM name=myForm>\n";
|
||||
echo "<INPUT type=hidden name=reload_it value=1>\n";
|
||||
echo "</FORM>\n";
|
||||
}
|
||||
else /* Failed */
|
||||
{
|
||||
echo "<font size=+1 color=red> ... {${$parameter}[uploadfail]} </font><BR>\n";
|
||||
echo "<FORM name=myForm>\n";
|
||||
echo "<HR><INPUT type=button value={${$parameter}[back]} onClick='javascript:location.href=\"modifyBssParam.php?language=$language&bssid=$bssid\"'>\n";
|
||||
echo "<INPUT type=hidden name=reload_it value=0>\n";
|
||||
echo "</FORM>\n";
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
10
wxc2_omc/configuration/bssomc/display_type.inc
Executable file
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
define("DO_NOT_DISPLAY",0);
|
||||
define("PULLDOWN_MENU",1);
|
||||
define("TEXTBOX",2);
|
||||
define("LABEL",3);
|
||||
define("RADIO_BUTTON",4);
|
||||
define("PUSH_BUTTON",5);
|
||||
define("CHECKBOX",6);
|
||||
define("TEXTAREA",7);
|
||||
?>
|
||||
395
wxc2_omc/configuration/bssomc/download.inc
Executable file
@@ -0,0 +1,395 @@
|
||||
<?php
|
||||
include("nmicommand.inc"); /* Include this when you need to process nmi command */
|
||||
|
||||
/*
|
||||
* Retieve the parameters from database and create the NMI "Set" command
|
||||
*/
|
||||
function create_sql_string_from_meta_table($db,$bssid,$objectid,$tablename,
|
||||
&$sqlstring, &$parameters, &$attribute_id, &$attribute_type, &$default_value, $debug)
|
||||
{
|
||||
$name = explode("_",$tablename);
|
||||
$sqlstring = "SELECT Attribute_Name,Attribute_Id,Attribute_Type,Default_Value " .
|
||||
"FROM OMCR_Meta_Table WHERE Attribute_Type<>0 AND Attribute_Id<>'' AND Object_Name='$name[1]'";
|
||||
if ($debug) echo "$sqlstring <BR>"; else echo ".";
|
||||
echo "sql>$sqlstring <BR>";
|
||||
$res = mysql_query($sqlstring, $db) or
|
||||
die("Invalid query:$sqlstring\n" . mysqli_error($pubConn));
|
||||
while ( $row = mysqli_fetch_row($res) )
|
||||
{
|
||||
list($parameters[],$attribute_id[],$attribute_type[],$default_value[]) = $row;
|
||||
|
||||
}
|
||||
mysql_free_result($res);
|
||||
|
||||
$sqlstring = "SELECT " . join(",",$parameters) . " FROM $tablename WHERE bssid=$bssid AND ObjectId='$objectid'";
|
||||
echo "$sqlstring <BR>";
|
||||
}
|
||||
|
||||
/*
|
||||
* Create NMI Set Command for paramter download
|
||||
*/
|
||||
function create_nmi_command($db,$sqlstring,$parameters,$attribute_id,$attribute_type,$default_value,&$nmicommand,$debug)
|
||||
{
|
||||
if ($debug) echo "$sqlstring <BR>"; else echo ".";
|
||||
$res = mysql_query($sqlstring, $db) or
|
||||
die("Invalid query:$sqlstring\n" . mysqli_error($pubConn));
|
||||
$value = mysqli_fetch_row($res);
|
||||
mysql_free_result($res);
|
||||
$nmicommand = "set";
|
||||
for ($i=0;$i<sizeof($attribute_id);$i++)
|
||||
{
|
||||
if ($default_value[$i] != $value[$i])
|
||||
{
|
||||
if ($attribute_type[$i] == 1)
|
||||
$nmicommand .= " $attribute_id[$i]=$value[$i]";
|
||||
else if ($attribute_type[$i] == 2)
|
||||
$nmicommand .= " $attribute_id[$i]=\"$value[$i]\"";
|
||||
else if ($attribute_type[$i] == 3)
|
||||
{
|
||||
$param = explode("_",$attribute_id[$i]);
|
||||
$nmicommand .= " $param[0]=[$param[1]=$value[$i]]";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
echo "nmicmd = $nmicommand<BR>";
|
||||
}
|
||||
|
||||
/*
|
||||
* Set BssFunc->DownLoadInProgress parameters to zero and return the given return value
|
||||
*/
|
||||
function set_download_in_progress_zero($db,$bssid,$language,$return_value,$debug)
|
||||
{
|
||||
if ($debug) echo "==) oid BssFunc" . "<BR>"; else echo ".";
|
||||
$retval = send_nmicommand($db,$bssid,$language,"oid BssFunc",$resultcode, $responsecode,$response,$debug);
|
||||
if (($retval != 0) || ($resultcode[0] != 0))
|
||||
return -1;
|
||||
flush();
|
||||
if ($debug) echo "==) set DownLoadInProgress=0" . "<BR>"; else echo ".";
|
||||
$retval = send_nmicommand($db,$bssid,$language,"set DownLoadInProgress=0",
|
||||
$resultcode, $responsecode,$response,$debug);
|
||||
if (($retval != 0) || ($resultcode[0] != 0))
|
||||
return -1;
|
||||
flush();
|
||||
|
||||
return ($return_value);
|
||||
}
|
||||
|
||||
/*
|
||||
* Return 0 if success, otherwise -1
|
||||
*/
|
||||
function download_parameters($db,$bssid,$language,$debug)
|
||||
{
|
||||
$resultcode = $responsecode = $response = null;
|
||||
$retval = 0;
|
||||
if ($debug) echo "==) oid BssFunc" . "<BR>"; else echo ".";
|
||||
$retval = send_nmicommand($db,$bssid,$language,"oid BssFunc",$resultcode, $responsecode,$response,$debug);
|
||||
if (($retval != 0) || ($resultcode[0] != 0))
|
||||
return (set_download_in_progress_zero($db,$bssid,$language,-1,$debug));
|
||||
flush();
|
||||
if ($debug) echo "==) set DownLoadInProgress=1" . "<BR>"; else echo ".";
|
||||
$retval = send_nmicommand($db,$bssid,$language,"set DownLoadInProgress=1",
|
||||
$resultcode, $responsecode,$response,$debug);
|
||||
if (($retval != 0) || ($resultcode[0] != 0))
|
||||
return (set_download_in_progress_zero($db,$bssid,$language,-1,$debug));
|
||||
flush();
|
||||
|
||||
$objectlist = Array(
|
||||
"Card.0.10",
|
||||
"Bsc.0",
|
||||
"AIf.0",
|
||||
"ALinkSet.0.0",
|
||||
"ALink.0.0.0"
|
||||
);
|
||||
$tablenamelist = Array(
|
||||
"OMCR_ClockMod",
|
||||
"OMCR_Bsc",
|
||||
"OMCR_AIf",
|
||||
"OMCR_ALinkSet",
|
||||
"OMCR_ALink"
|
||||
);
|
||||
|
||||
/*********************************************************
|
||||
* For each ALink object, download ALink object parameters
|
||||
*********************************************************/
|
||||
$sqlstring = "SELECT SUBSTRING_INDEX(ObjectId,'.',-1) FROM OMCR_BSSTREE WHERE bssid=$bssid" .
|
||||
" AND Presence=1 AND ObjectId='ALink.0.0.%'" .
|
||||
" AND ObjectId<>'ALink.0.0.0'";
|
||||
$res = mysql_query($sqlstring, $db) or
|
||||
die("Invalid query: $sqlstring\n" . mysqli_error($pubConn));
|
||||
while ((list($row) = mysqli_fetch_row($res)) != null)
|
||||
{
|
||||
if ($debug) echo "==) oid ALinkSet.0.0" . "<BR>"; else echo ".";
|
||||
$retval = send_nmicommand($db,$bssid,$language,"oid ALinkSet.0.0",
|
||||
$resultcode, $responsecode,$response,$debug);
|
||||
if (($retval != 0) || ($resultcode[0] != 0))
|
||||
return (set_download_in_progress_zero($db,$bssid,$language,-1,$debug));
|
||||
flush();
|
||||
if ($debug) echo "==) create ALink $row" . "<BR>"; else echo ".";
|
||||
$retval = send_nmicommand($db,$bssid,$language,"create ALink $row",
|
||||
$resultcode, $responsecode,$response,$debug);
|
||||
if (($retval != 0) || ($resultcode[0] != 0))
|
||||
return (set_download_in_progress_zero($db,$bssid,$language,-1,$debug));
|
||||
flush();
|
||||
$objectlist = array_merge($objectlist, Array ( "ALink.0.0.$row"));
|
||||
$tablenamelist = array_merge($tablenamelist, Array("OMCR_ALink"));
|
||||
}
|
||||
|
||||
/*********************************************************
|
||||
* For each E1 Card, download E1port object parameters
|
||||
*********************************************************/
|
||||
$sqlstring = "SELECT SUBSTRING_INDEX(ObjectId,'.',-1) FROM OMCR_BSSTREE WHERE bssid=$bssid" .
|
||||
" AND Presence=1 AND ObjectId REGEXP 'Card.0.[1-8]$'";
|
||||
$res = mysql_query($sqlstring, $db) or
|
||||
die("Invalid query: $sqlstring\n" . mysqli_error($pubConn));
|
||||
$e1trmod_id_list = null;
|
||||
while ( $row = mysqli_fetch_row($res) )
|
||||
{
|
||||
list($e1trmod_id_list[]) = $row;
|
||||
}
|
||||
for ($i=0; $i<sizeof($e1trmod_id_list); $i++)
|
||||
{
|
||||
$objectlist = array_merge($objectlist,
|
||||
Array ( "Port.0.$e1trmod_id_list[$i].0",
|
||||
"Port.0.$e1trmod_id_list[$i].1")
|
||||
);
|
||||
$tablenamelist = array_merge($tablenamelist, Array("OMCR_E1port", "OMCR_E1port"));
|
||||
}
|
||||
|
||||
/*********************************************************
|
||||
* For each DCard in E1 Card, download Dsp parameters
|
||||
*********************************************************/
|
||||
// $sqlstring = "SELECT ObjectId FROM OMCR_BSSTREE WHERE bssid=$bssid" .
|
||||
// " AND Presence=1 AND ObjectId REGEXP 'Dsp.0.[1-8].0.[0-3]$'";
|
||||
// $res = mysql_query($sqlstring, $db) or
|
||||
// die("Invalid query: $sqlstring\n" . mysqli_error($pubConn));
|
||||
// $dsp_list = null;
|
||||
// while ( $row = mysqli_fetch_row($res) )
|
||||
// {
|
||||
// list($dsp_list[]) = $row;
|
||||
// }
|
||||
// foreach ($dsp_list as $dsp)
|
||||
// {
|
||||
// array_push($objectlist, $dsp);
|
||||
// array_push($tablenamelist, "OMCR_TrauDsp");
|
||||
// }
|
||||
|
||||
/***************************************************************************************
|
||||
* Download parameters to BSC based on OMCR_Meta_Table for the objects in $objectlist[]
|
||||
***************************************************************************************/
|
||||
for ($i=0; $i<sizeof($objectlist); $i++)
|
||||
{
|
||||
$parameters=$attribute_type=$default_value=$nmicommand=null;
|
||||
|
||||
$objectid = $objectlist[$i];
|
||||
$tablename = $tablenamelist[$i];
|
||||
create_sql_string_from_meta_table(
|
||||
$db,$bssid,$objectid,$tablename,$sqlstring,$parameters,$attribute_id,$attribute_type,$default_value,$debug);
|
||||
create_nmi_command($db,$sqlstring,$parameters,$attribute_id,$attribute_type,$default_value,$nmicommand,$debug);
|
||||
if (strcmp($nmicommand,"set"))
|
||||
{
|
||||
if ($debug) echo "==) oid $objectid" . "<BR>"; else echo ".";
|
||||
$retval = send_nmicommand($db,$bssid,$language,"oid $objectid",
|
||||
$resultcode, $responsecode,$response,$debug);
|
||||
if (($retval != 0) || ($resultcode[0] != 0))
|
||||
return (set_download_in_progress_zero($db,$bssid,$language,-1,$debug));
|
||||
flush();
|
||||
if ($debug) echo "==) $nmicommand" . "<BR>"; else echo ".";
|
||||
$retval = send_nmicommand($db,$bssid,$language,"$nmicommand",
|
||||
$resultcode, $responsecode,$response,$debug);
|
||||
if (($retval != 0) || ($resultcode[0] != 0))
|
||||
return (set_download_in_progress_zero($db,$bssid,$language,-1,$debug));
|
||||
flush();
|
||||
}
|
||||
}
|
||||
|
||||
/*********************************************
|
||||
* For each BtsMgr, download parameters
|
||||
*********************************************/
|
||||
$sqlstring = "SELECT SUBSTRING_INDEX(ObjectId,'.',-1) FROM OMCR_BSSTREE" .
|
||||
" WHERE bssid=$bssid AND Presence=1 AND ObjectId Like 'BtsMgr.%'";
|
||||
if ($debug) echo "$sqlstring<BR>\n"; else echo ".";
|
||||
$res = mysql_query($sqlstring, $db) or
|
||||
die("Invalid query: $sqlstring\n" . mysqli_error($pubConn));
|
||||
|
||||
$btsmgr_list=null;
|
||||
while ( $row = mysqli_fetch_row($res) )
|
||||
{
|
||||
list($btsmgr_list[]) = $row;
|
||||
}
|
||||
mysql_free_result($res);
|
||||
|
||||
//for ($i=0; $i<sizeof($btsmgr_list); $i++)
|
||||
foreach ($btsmgr_list as $btsid)
|
||||
{
|
||||
//$btsid = $btsmgr_list[$i];
|
||||
|
||||
$objectlist = Array(
|
||||
"AbisMgr.$btsid.0", "Bts.$btsid.0",
|
||||
"AdjHand.$btsid.0.0", "AdjHand.$btsid.0.1", "AdjHand.$btsid.0.2", "AdjHand.$btsid.0.3",
|
||||
"AdjHand.$btsid.0.4", "AdjHand.$btsid.0.5", "AdjHand.$btsid.0.6", "AdjHand.$btsid.0.7",
|
||||
"AdjHand.$btsid.0.8", "AdjHand.$btsid.0.9", "AdjHand.$btsid.0.10", "AdjHand.$btsid.0.11",
|
||||
"AdjHand.$btsid.0.12", "AdjHand.$btsid.0.13", "AdjHand.$btsid.0.14", "AdjHand.$btsid.0.15",
|
||||
"AdjHand.$btsid.0.16", "AdjHand.$btsid.0.17", "AdjHand.$btsid.0.18", "AdjHand.$btsid.0.19",
|
||||
"AdjHand.$btsid.0.20", "AdjHand.$btsid.0.21", "AdjHand.$btsid.0.22", "AdjHand.$btsid.0.23",
|
||||
"AdjHand.$btsid.0.24", "AdjHand.$btsid.0.25", "AdjHand.$btsid.0.26", "AdjHand.$btsid.0.27",
|
||||
"AdjHand.$btsid.0.28", "AdjHand.$btsid.0.29", "AdjHand.$btsid.0.30", "AdjHand.$btsid.0.31",
|
||||
"BtsMgr_Shelf.$btsid.0"
|
||||
);
|
||||
$tablenamelist = Array(
|
||||
"OMCR_AbisMgr", "OMCR_Bts",
|
||||
"OMCR_AdjHand", "OMCR_AdjHand", "OMCR_AdjHand", "OMCR_AdjHand",
|
||||
"OMCR_AdjHand", "OMCR_AdjHand", "OMCR_AdjHand", "OMCR_AdjHand",
|
||||
"OMCR_AdjHand", "OMCR_AdjHand", "OMCR_AdjHand", "OMCR_AdjHand",
|
||||
"OMCR_AdjHand", "OMCR_AdjHand", "OMCR_AdjHand", "OMCR_AdjHand",
|
||||
"OMCR_AdjHand", "OMCR_AdjHand", "OMCR_AdjHand", "OMCR_AdjHand",
|
||||
"OMCR_AdjHand", "OMCR_AdjHand", "OMCR_AdjHand", "OMCR_AdjHand",
|
||||
"OMCR_AdjHand", "OMCR_AdjHand", "OMCR_AdjHand", "OMCR_AdjHand",
|
||||
"OMCR_AdjHand", "OMCR_AdjHand", "OMCR_AdjHand", "OMCR_AdjHand",
|
||||
"OMCR_Wavex"
|
||||
);
|
||||
|
||||
if ($debug) echo "<HR>";
|
||||
if ($debug) echo "==) oid BssFunc" . "<BR>"; else echo ".";
|
||||
$retval = send_nmicommand($db,$bssid,$language,"oid BssFunc",
|
||||
$resultcode, $responsecode,$response,$debug);
|
||||
if (($retval != 0) || ($resultcode[0] != 0))
|
||||
return (set_download_in_progress_zero($db,$bssid,$language,-1,$debug));
|
||||
flush();
|
||||
if ($debug) echo "==) create BtsMgr $btsid" . "<BR>"; else echo ".";
|
||||
$retval = send_nmicommand($db,$bssid,$language,"create BtsMgr $btsid",
|
||||
$resultcode, $responsecode,$response,$debug);
|
||||
if (($retval != 0) || ($resultcode[0] != 0))
|
||||
return (set_download_in_progress_zero($db,$bssid,$language,-1,$debug));
|
||||
flush();
|
||||
//echo "==) oid BtsMgr_Shelf.$btsid.0" . "<BR>";
|
||||
//$retval = send_nmicommand($db,$bssid,$language,"oid BtsMgr_Shelf.$btsid.0",
|
||||
// $resultcode, $responsecode,$response,$debug);
|
||||
//if (($retval != 0) || ($resultcode[0] != 0))
|
||||
// return (set_download_in_progress_zero($db,$bssid,$language,-1,$debug));
|
||||
//flush();
|
||||
|
||||
|
||||
/*************************
|
||||
* Create E1TrMod
|
||||
*************************/
|
||||
$sqlstring = "SELECT SUBSTRING_INDEX(ObjectId,'.',-1) FROM OMCR_BSSTREE WHERE bssid=$bssid" .
|
||||
" AND Presence=1 AND ObjectId REGEXP 'BtsMgr_Shelf_Card.$btsid.0.[1-8]$'";
|
||||
if ($debug) echo "$sqlstring<BR>\n"; else echo ".";
|
||||
$res = mysql_query($sqlstring, $db) or
|
||||
die("Invalid query: $sqlstring\n" . mysqli_error($pubConn));
|
||||
$card_id_list = null;
|
||||
while ( $row = mysqli_fetch_row($res) )
|
||||
{
|
||||
list($card_id_list[]) = $row;
|
||||
}
|
||||
mysql_free_result($res);
|
||||
|
||||
for ($j=0; $j<sizeof($card_id_list); $j++)
|
||||
{
|
||||
if ($debug) echo "==) oid BtsMgr_Shelf.$btsid.0" . "<BR>"; else echo "<BR>.";
|
||||
$retval = send_nmicommand($db,$bssid,$language,"oid BtsMgr_Shelf.$btsid.0",
|
||||
$resultcode, $responsecode,$response,$debug);
|
||||
if (($retval != 0) || ($resultcode[0] != 0))
|
||||
return (set_download_in_progress_zero($db,$bssid,$language,-1,$debug));
|
||||
flush();
|
||||
if ($card_id_list[$j] == 1)
|
||||
{
|
||||
$objectlist = array_merge($objectlist,
|
||||
Array ( "BtsMgr_Shelf_Card_Port.$btsid.0.$card_id_list[$j].0",
|
||||
"BtsMgr_Shelf_Card_Port.$btsid.0.$card_id_list[$j].1")
|
||||
);
|
||||
$tablenamelist = array_merge($tablenamelist, Array("OMCR_E1port", "OMCR_E1port"));
|
||||
|
||||
if ($debug) echo "==) create E1trmod $card_id_list[$j]" . "<BR>"; else echo ".";
|
||||
$retval = send_nmicommand($db,$bssid,$language,"create E1trmod $card_id_list[$j]",
|
||||
$resultcode, $responsecode,$response,$debug);
|
||||
}
|
||||
else
|
||||
{
|
||||
$objectlist = array_merge($objectlist,
|
||||
Array ( "Trx.$btsid.0.$card_id_list[$j]",
|
||||
"RCarrier.$btsid.0.$card_id_list[$j]",
|
||||
"TrxCh.$btsid.0.$card_id_list[$j].0",
|
||||
"TrxCh.$btsid.0.$card_id_list[$j].1",
|
||||
"TrxCh.$btsid.0.$card_id_list[$j].2",
|
||||
"TrxCh.$btsid.0.$card_id_list[$j].3",
|
||||
"TrxCh.$btsid.0.$card_id_list[$j].4",
|
||||
"TrxCh.$btsid.0.$card_id_list[$j].5",
|
||||
"TrxCh.$btsid.0.$card_id_list[$j].6",
|
||||
"TrxCh.$btsid.0.$card_id_list[$j].7")
|
||||
);
|
||||
$tablenamelist = array_merge($tablenamelist,
|
||||
Array ( "OMCR_Trx", "OMCR_RCarrier",
|
||||
"OMCR_TrxCh","OMCR_TrxCh",
|
||||
"OMCR_TrxCh","OMCR_TrxCh",
|
||||
"OMCR_TrxCh","OMCR_TrxCh",
|
||||
"OMCR_TrxCh","OMCR_TrxCh")
|
||||
);
|
||||
|
||||
if ($debug) echo "==) create TrxMod $card_id_list[$j]" . "<BR>"; else echo ".";
|
||||
$retval = send_nmicommand($db,$bssid,$language,"create TrxMod $card_id_list[$j]",
|
||||
$resultcode, $responsecode,$response,$debug);
|
||||
}
|
||||
if (($retval != 0) || ($resultcode[0] != 0))
|
||||
return (set_download_in_progress_zero($db,$bssid,$language,-1,$debug));
|
||||
flush();
|
||||
}
|
||||
|
||||
for ($j=0; $j<sizeof($objectlist); $j++)
|
||||
{
|
||||
$parameters=$attribute_type=$default_value=$nmicommand=null;
|
||||
|
||||
$objectid = $objectlist[$j];
|
||||
$tablename = $tablenamelist[$j];
|
||||
create_sql_string_from_meta_table(
|
||||
$db,$bssid,$objectid,$tablename,$sqlstring,$parameters,$attribute_id,$attribute_type,$default_value,$debug);
|
||||
create_nmi_command($db,$sqlstring,$parameters,$attribute_id,$attribute_type,$default_value,$nmicommand,$debug);
|
||||
if (strcmp($nmicommand,"set"))
|
||||
{
|
||||
if ($debug) echo "==) oid $objectid" . "<BR>"; else echo ".";
|
||||
$retval = send_nmicommand($db,$bssid,$language,"oid $objectid",
|
||||
$resultcode, $responsecode,$response,$debug);
|
||||
if (($retval != 0) || ($resultcode[0] != 0))
|
||||
return (set_download_in_progress_zero($db,$bssid,$language,-1,$debug));
|
||||
flush();
|
||||
if ($debug) echo "==) $nmicommand" . "<BR>"; else echo ".";
|
||||
$retval = send_nmicommand($db,$bssid,$language,"$nmicommand",
|
||||
$resultcode, $responsecode,$response,$debug);
|
||||
if (($retval != 0) || ($resultcode[0] != 0))
|
||||
return (set_download_in_progress_zero($db,$bssid,$language,-1,$debug));
|
||||
flush();
|
||||
}
|
||||
}
|
||||
}
|
||||
if ($debug) echo "==) oid BssFunc" . "<BR>"; else echo ".";
|
||||
$retval = send_nmicommand($db,$bssid,$language,"oid BssFunc",
|
||||
$resultcode, $responsecode,$response,$debug);
|
||||
if (($retval != 0) || ($resultcode[0] != 0))
|
||||
return -1;
|
||||
flush();
|
||||
if ($debug) echo "==) set DownLoadInProgress=0" . "<BR>"; else echo ".";
|
||||
$retval = send_nmicommand($db,$bssid,$language,"set DownLoadInProgress=0",
|
||||
$resultcode, $responsecode,$response,$debug);
|
||||
if (($retval != 0) || ($resultcode[0] != 0))
|
||||
return -1;
|
||||
flush();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* upload parameters from BSC to OMC
|
||||
* Return 0 if success, otherwise -1
|
||||
*/
|
||||
function upload_parameters($db,$bssid,$debug)
|
||||
{
|
||||
if ($debug) echo "==) Upload parameters" . "<BR>"; else echo ".";
|
||||
$retval = send_nmicommand($db,$bssid,$language,"upload $bssid",
|
||||
$resultcode, $responsecode,$response,$debug);
|
||||
if (($retval != 0) || ($resultcode[0] != 0))
|
||||
return -1;
|
||||
flush();
|
||||
}
|
||||
|
||||
?>
|
||||
172
wxc2_omc/configuration/bssomc/dropbss.php
Executable file
@@ -0,0 +1,172 @@
|
||||
<?php
|
||||
//
|
||||
// Created on: 22 Feb 2001
|
||||
//
|
||||
// This is only used by TS_OMC only case
|
||||
// For integration with TS_OMC, use dropbss.php instead
|
||||
//
|
||||
// Usage: dropbss.php?language="gb|eng"
|
||||
// &local_sys_id=xx
|
||||
// &remote_sys_id=BSS003
|
||||
// &start_ip=172.18.250.100
|
||||
// [&ReturnURL=abc.php]
|
||||
//
|
||||
// http://172.32.20.26/~build/bssomc/dropbss.php?language=gb&local_sys_id=2&remote_sys_id=BSS002&start_ip=172.32.20.123
|
||||
//
|
||||
?>
|
||||
<?php
|
||||
include("nocache.inc");
|
||||
//include("header.inc");
|
||||
include("login_parm.inc");
|
||||
$DEBUG = 0;
|
||||
|
||||
$bssIdArr=explode('_',$sysId);
|
||||
$bssid = $bssIdArr[1] -0; // convert to integer
|
||||
|
||||
if($DEBUG)
|
||||
{
|
||||
echo "Incomplete information<BR>";
|
||||
echo "mode=$mode<BR>";
|
||||
echo "sysId=$sysId<BR>";
|
||||
echo "ip=$ip<BR>";
|
||||
echo "bssid = $bssid<BR>";
|
||||
}
|
||||
|
||||
$baseUrl="../configuration/systemList/systemConf.php?bssId=$bssid&&mode=delete&sysId=$sysId&ip=$ip";
|
||||
//check in url
|
||||
if(strlen($sysId) < 5 || $bssIdArr[1] == '' || $mode !='delete'){
|
||||
$errorInfo = "This url's value error!";
|
||||
if($DEBUG) echo "<br>errorInfo=$errorInfo";
|
||||
$errorInfo=rawurlencode($errorInfo);
|
||||
$returnUrl=$baseUrl.'&errorInfo='.$errorInfo;
|
||||
if($DEBUG) echo "<br>returnUrl=$returnUrl";
|
||||
if(!$DEBUG) echo " <meta http-equiv=\"refresh\" content=\"0; url=$returnUrl\"> ";
|
||||
exit();
|
||||
}
|
||||
|
||||
|
||||
// connect database
|
||||
$db = mysql_connect($hostname, $username, $password);
|
||||
mysql_select_db($dbname,$db);
|
||||
|
||||
$sqlstring = "SELECT bssid,ip,connected FROM OMCR_BSSTABLE WHERE ip='$ip' OR bssid ='$bssid'";
|
||||
if($DEBUG) echo "$sqlstring<BR>";
|
||||
$resultSet = @mysql_query($sqlstring,$db);
|
||||
$resultRowNum = @mysqli_num_rows($resultSet);
|
||||
if($resultRowNum > 0){
|
||||
$resultRows=mysqli_fetch_array($resultSet);
|
||||
if($resultRows[connected] != '255'){ //exsit and connected
|
||||
$updateSql = "UPDATE OMCR_BSSTABLE
|
||||
SET ip='', name='', remark='', connected='0', alarmed='0', uploaded='0'
|
||||
WHERE bssid ='$bssid'
|
||||
";
|
||||
if($DEBUG) echo "<BR>updateSql=$updateSql";
|
||||
mysql_query($updateSql,$db);
|
||||
echo mysqli_error($pubConn);
|
||||
}else{
|
||||
$ip = $resultRows[ip];
|
||||
$bssid = $resultRows[bssid];
|
||||
}
|
||||
}else{
|
||||
$returnUrl=$baseUrl;
|
||||
if($DEBUG) echo "<br>returnUrl=$returnUrl";
|
||||
if(!$DEBUG) echo " <meta http-equiv=\"refresh\" content=\"0; url=$returnUrl\"> ";
|
||||
exit();
|
||||
}
|
||||
|
||||
|
||||
|
||||
//insert to command table
|
||||
$sqlstring = "SELECT row_no FROM OMCR_COMMAND WHERE status=0 " .
|
||||
"ORDER BY seqNum ASC LIMIT 10";
|
||||
//echo "$sqlstring<BR>";
|
||||
$res = mysql_query($sqlstring ,$db) or
|
||||
die("Invalid query:$sqlstring\n" . mysqli_error($pubConn));
|
||||
while (list($row_no[]) = mysqli_fetch_row($res));
|
||||
$no_of_rows = mysqli_num_rows($res);
|
||||
mysql_free_result($res);
|
||||
|
||||
if ( $no_of_rows <= 0 || ($no_of_rows > 10) )
|
||||
{
|
||||
//
|
||||
// No available row in OMCR_COMMAND
|
||||
// Send error to MySQL()
|
||||
//
|
||||
$errorInfo = "Command table is full: Wait and send the command again";
|
||||
if($DEBUG) echo "<br>errorInfo=$errorInfo";
|
||||
$errorInfo=rawurlencode($errorInfo);
|
||||
$returnUrl=$baseUrl.'&errorInfo='.$errorInfo;
|
||||
if($DEBUG) echo "<br>returnUrl=$returnUrl";
|
||||
if(!$DEBUG) echo " <meta http-equiv=\"refresh\" content=\"0; url=$returnUrl\"> ";
|
||||
exit();
|
||||
}
|
||||
|
||||
//
|
||||
// Insert the delete bss commands in OMCR_COMMAND out of 10 available rows
|
||||
//
|
||||
$i=0;
|
||||
do
|
||||
{
|
||||
if ($row_no[$i] != '')
|
||||
{
|
||||
$sqlstring = "REPLACE INTO OMCR_COMMAND VALUES(" .
|
||||
"{$row_no[$i]},-1,'dropbss $bssid $ip',null,255,-1,null,null,null)";
|
||||
//echo "dropbss=$sqlstring<br>";
|
||||
$res = mysql_query($sqlstring ,$db) or
|
||||
die("Invalid query:$sqlstring\n" . mysqli_error($pubConn));
|
||||
}
|
||||
$i++;
|
||||
} while ($i<10 && mysql_affected_rows() != 2);
|
||||
$cmd_row_no = $row_no[$i-1];
|
||||
if ($i>=10)
|
||||
{
|
||||
$errorInfo = "Fail to insert command into Command table";
|
||||
if($DEBUG) echo "<br>errorInfo=$errorInfo";
|
||||
$errorInfo=rawurlencode($errorInfo);
|
||||
$returnUrl=$baseUrl.'&errorInfo='.$errorInfo;
|
||||
if($DEBUG) echo "<br>returnUrl=$returnUrl";
|
||||
if(!$DEBUG) echo " <meta http-equiv=\"refresh\" content=\"0; url=$returnUrl\"> ";
|
||||
exit();
|
||||
}
|
||||
|
||||
//
|
||||
//
|
||||
// Wait for response: timeout after 500ms x 10 = 5 secs
|
||||
//
|
||||
//
|
||||
$i=0;
|
||||
while ($i<20)
|
||||
{
|
||||
$result=$response=null;
|
||||
usleep(500000); // 0.5 sec
|
||||
$sqlstring = "SELECT resultcode,result,responsecode,response from OMCR_COMMAND " .
|
||||
"WHERE status=0 AND row_no=$cmd_row_no ";
|
||||
echo "$sqlstring<BR>";
|
||||
$res = mysql_query($sqlstring ,$db) or
|
||||
die("Invalid query:$sqlstring\n" . mysqli_error($pubConn));
|
||||
while ( $mydata = mysqli_fetch_row($res) )
|
||||
{
|
||||
list($resultcode,$result,$responsecode,$response) = $mydata;
|
||||
}
|
||||
$no_of_rows = mysqli_num_rows($res);
|
||||
mysql_free_result($res);
|
||||
|
||||
if ($no_of_rows = 1){
|
||||
if ($resultcode != 0){
|
||||
$errorInfo = "dropbss command failed";
|
||||
if($DEBUG) echo "<br>errorInfo=$errorInfo";
|
||||
$errorInfo=rawurlencode($errorInfo);
|
||||
$returnUrl=$baseUrl.'&errorInfo='.$errorInfo;
|
||||
if($DEBUG) echo "<br>returnUrl=$returnUrl";
|
||||
if(!$DEBUG) echo " <meta http-equiv=\"refresh\" content=\"0; url=$returnUrl\"> ";
|
||||
exit();
|
||||
}else{
|
||||
// Success !!!
|
||||
$returnUrl=$baseUrl;
|
||||
echo " <meta http-equiv=\"refresh\" content=\"0; url=$returnUrl\"> ";
|
||||
exit();
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
20
wxc2_omc/configuration/bssomc/ftpGetFile
Executable file
@@ -0,0 +1,20 @@
|
||||
#!/bin/bash
|
||||
|
||||
remote_ip=$1
|
||||
logName=$2
|
||||
logPassword=$3
|
||||
remote_dir=$4
|
||||
local_dir=$5
|
||||
file=$6
|
||||
|
||||
echo "$remote_dir $local_dir $file" >> /tmp/test.txt
|
||||
|
||||
ftp -i -n $remote_ip <<haha
|
||||
user $logName $logPassword
|
||||
binary
|
||||
cd $remote_dir
|
||||
lcd $local_dir
|
||||
get $file
|
||||
bye
|
||||
haha
|
||||
|
||||
64
wxc2_omc/configuration/bssomc/ftpGetList
Executable file
@@ -0,0 +1,64 @@
|
||||
#!/bin/bash
|
||||
|
||||
remote_ip=$1
|
||||
logName=$2
|
||||
logPassword=$3
|
||||
remote_dir=$4
|
||||
local_dir=$5
|
||||
|
||||
echo remote_ip=$remote_ip
|
||||
echo logName=$logName
|
||||
echo logPassword=$logPassword
|
||||
echo remote_dir=$remote_dir
|
||||
echo local_dir=$local_dir
|
||||
|
||||
file_list_filename=/tmp/file_list.txt
|
||||
rm -rf $file_list_filename
|
||||
|
||||
function get_whole_dir()
|
||||
{
|
||||
cur_local_dir=$1
|
||||
cur_remote_dir=$2
|
||||
|
||||
cd $cur_local_dir
|
||||
echo cur_remote_dir=$cur_remote_dir
|
||||
echo cur_local_dir=$cur_local_dir
|
||||
response=`ftp -i -n $remote_ip <<haha
|
||||
user $logName $logPassword
|
||||
binary
|
||||
cd $cur_remote_dir
|
||||
ls
|
||||
bye
|
||||
haha`
|
||||
|
||||
file_list=`echo "$response" |grep -v '<DIR>'|grep '[0-9][0-9]:[0-9][0-9]:[0-9][0-9]'|awk '{print $4}'`
|
||||
dir_list=`echo "$response" |grep -i '<DIR>'|grep -v '\.'|awk '{print $4}'`
|
||||
|
||||
echo -------FILE----------
|
||||
for file in $file_list; do
|
||||
#ftp -i -n $remote_ip <<haha
|
||||
#user $logName $logPassword
|
||||
#binary
|
||||
#cd $cur_remote_dir
|
||||
#lcd $cur_local_dir
|
||||
#get $file
|
||||
#bye
|
||||
#haha
|
||||
echo "$cur_remote_dir,$cur_local_dir,$file" >> $file_list_filename
|
||||
done
|
||||
|
||||
echo -------DIR----------
|
||||
for dir in $dir_list; do
|
||||
mkdir $cur_local_dir/$dir 2>/dev/null
|
||||
chmod 755 $cur_local_dir/$dir
|
||||
echo mkdir $cur_local_dir/$dir
|
||||
|
||||
get_whole_dir $cur_local_dir/$dir $cur_remote_dir/$dir
|
||||
done
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
get_whole_dir $local_dir $remote_dir
|
||||
|
||||
46
wxc2_omc/configuration/bssomc/header.inc
Executable file
@@ -0,0 +1,46 @@
|
||||
<?php
|
||||
//
|
||||
// Created on: 22 Feb 2001
|
||||
// Function : Styles
|
||||
//
|
||||
?>
|
||||
<?php
|
||||
$engcharset="iso-8859-1"; // English
|
||||
$gbcharset ="gb2312"; // Simpilified Chinese (GB)
|
||||
$big5charset ="big5"; // Tranditional Chinese (BIG5)
|
||||
|
||||
if (!isset($language))
|
||||
$language = "eng";
|
||||
$charset="${language}charset";
|
||||
|
||||
echo <<< EOT
|
||||
<!-- META HTTP-EQUIV="Refresh" content="2" -->
|
||||
<META HTTP-EQUIV="Expires" CONTENT="Mon, 06 Jan 1990 00:00:01 GMT">
|
||||
<META HTTP-EQUIV="Content-Type" content="text/html; charset=${$charset}">
|
||||
<style type="text/css">
|
||||
<!--
|
||||
a:link { color:blue;
|
||||
text-decoration:none;
|
||||
Cursor:hand;
|
||||
};
|
||||
a:visited { color:blue;
|
||||
text-decoration:none;
|
||||
Cursor:hand;
|
||||
};
|
||||
a:hover { color:red;
|
||||
text-decoration:underline;
|
||||
Cursor:hand;
|
||||
};
|
||||
..chinese {font-family: "Courier New"; font-size: 9pt}
|
||||
td { font-family: Arial, Helvetica, sans-serif; font-size: 9pt}
|
||||
body { font-family: Arial, Helvetica, sans-serif; font-size: 9pt}
|
||||
select { font-family: Arial, Helvetica, sans-serif; font-size: 9pt}
|
||||
input { font-size: 9pt}
|
||||
input.chinese {font-family: "Courier New"; font-size: 9pt}
|
||||
|
||||
-->
|
||||
</style>
|
||||
EOT;
|
||||
|
||||
|
||||
?>
|
||||
BIN
wxc2_omc/configuration/bssomc/images/I.gif
Executable file
|
After Width: | Height: | Size: 852 B |
BIN
wxc2_omc/configuration/bssomc/images/L.gif
Executable file
|
After Width: | Height: | Size: 848 B |
BIN
wxc2_omc/configuration/bssomc/images/T.gif
Executable file
|
After Width: | Height: | Size: 854 B |
BIN
wxc2_omc/configuration/bssomc/images/abis0_down.gif
Executable file
|
After Width: | Height: | Size: 2.0 KiB |
BIN
wxc2_omc/configuration/bssomc/images/abis0_up.gif
Executable file
|
After Width: | Height: | Size: 888 B |
BIN
wxc2_omc/configuration/bssomc/images/abis0_warn.gif
Executable file
|
After Width: | Height: | Size: 890 B |
BIN
wxc2_omc/configuration/bssomc/images/abis1_down.gif
Executable file
|
After Width: | Height: | Size: 2.0 KiB |
BIN
wxc2_omc/configuration/bssomc/images/abis1_up.gif
Executable file
|
After Width: | Height: | Size: 887 B |
BIN
wxc2_omc/configuration/bssomc/images/abis1_warn.gif
Executable file
|
After Width: | Height: | Size: 889 B |
BIN
wxc2_omc/configuration/bssomc/images/aif0_down.gif
Executable file
|
After Width: | Height: | Size: 2.0 KiB |
BIN
wxc2_omc/configuration/bssomc/images/aif0_up.gif
Executable file
|
After Width: | Height: | Size: 877 B |
BIN
wxc2_omc/configuration/bssomc/images/aif0_warn.gif
Executable file
|
After Width: | Height: | Size: 878 B |
BIN
wxc2_omc/configuration/bssomc/images/aif1_down.gif
Executable file
|
After Width: | Height: | Size: 2.0 KiB |
BIN
wxc2_omc/configuration/bssomc/images/aif1_up.gif
Executable file
|
After Width: | Height: | Size: 877 B |
BIN
wxc2_omc/configuration/bssomc/images/aif1_warn.gif
Executable file
|
After Width: | Height: | Size: 879 B |
BIN
wxc2_omc/configuration/bssomc/images/bsciwp_down.gif
Executable file
|
After Width: | Height: | Size: 971 B |
BIN
wxc2_omc/configuration/bssomc/images/bsciwp_up.gif
Executable file
|
After Width: | Height: | Size: 971 B |
BIN
wxc2_omc/configuration/bssomc/images/bsciwp_warn.gif
Executable file
|
After Width: | Height: | Size: 971 B |
BIN
wxc2_omc/configuration/bssomc/images/bspiwp_down.gif
Executable file
|
After Width: | Height: | Size: 2.2 KiB |
BIN
wxc2_omc/configuration/bssomc/images/bspiwp_up.gif
Executable file
|
After Width: | Height: | Size: 968 B |
BIN
wxc2_omc/configuration/bssomc/images/bspiwp_warn.gif
Executable file
|
After Width: | Height: | Size: 968 B |
BIN
wxc2_omc/configuration/bssomc/images/btsiwp_down.gif
Executable file
|
After Width: | Height: | Size: 2.2 KiB |
BIN
wxc2_omc/configuration/bssomc/images/btsiwp_up.gif
Executable file
|
After Width: | Height: | Size: 969 B |
BIN
wxc2_omc/configuration/bssomc/images/btsiwp_warn.gif
Executable file
|
After Width: | Height: | Size: 969 B |
BIN
wxc2_omc/configuration/bssomc/images/card1_down.gif
Executable file
|
After Width: | Height: | Size: 2.1 KiB |
BIN
wxc2_omc/configuration/bssomc/images/card1_up.gif
Executable file
|
After Width: | Height: | Size: 962 B |
BIN
wxc2_omc/configuration/bssomc/images/card1_warn.gif
Executable file
|
After Width: | Height: | Size: 962 B |
BIN
wxc2_omc/configuration/bssomc/images/card2_down.gif
Executable file
|
After Width: | Height: | Size: 2.1 KiB |
BIN
wxc2_omc/configuration/bssomc/images/card2_up.gif
Executable file
|
After Width: | Height: | Size: 960 B |
BIN
wxc2_omc/configuration/bssomc/images/card2_warn.gif
Executable file
|
After Width: | Height: | Size: 960 B |
BIN
wxc2_omc/configuration/bssomc/images/card3_down.gif
Executable file
|
After Width: | Height: | Size: 1.3 KiB |
BIN
wxc2_omc/configuration/bssomc/images/card3_up.gif
Executable file
|
After Width: | Height: | Size: 959 B |
BIN
wxc2_omc/configuration/bssomc/images/card3_warn.gif
Executable file
|
After Width: | Height: | Size: 959 B |
BIN
wxc2_omc/configuration/bssomc/images/card4_down.gif
Executable file
|
After Width: | Height: | Size: 2.1 KiB |
BIN
wxc2_omc/configuration/bssomc/images/card4_up.gif
Executable file
|
After Width: | Height: | Size: 963 B |
BIN
wxc2_omc/configuration/bssomc/images/card4_warn.gif
Executable file
|
After Width: | Height: | Size: 963 B |
BIN
wxc2_omc/configuration/bssomc/images/card5_down.gif
Executable file
|
After Width: | Height: | Size: 2.1 KiB |
BIN
wxc2_omc/configuration/bssomc/images/card5_up.gif
Executable file
|
After Width: | Height: | Size: 960 B |
BIN
wxc2_omc/configuration/bssomc/images/card5_warn.gif
Executable file
|
After Width: | Height: | Size: 960 B |
BIN
wxc2_omc/configuration/bssomc/images/card6_down.gif
Executable file
|
After Width: | Height: | Size: 2.1 KiB |
BIN
wxc2_omc/configuration/bssomc/images/card6_up.gif
Executable file
|
After Width: | Height: | Size: 962 B |
BIN
wxc2_omc/configuration/bssomc/images/card6_warn.gif
Executable file
|
After Width: | Height: | Size: 962 B |
BIN
wxc2_omc/configuration/bssomc/images/card7_down.gif
Executable file
|
After Width: | Height: | Size: 2.1 KiB |
BIN
wxc2_omc/configuration/bssomc/images/card7_up.gif
Executable file
|
After Width: | Height: | Size: 956 B |
BIN
wxc2_omc/configuration/bssomc/images/card7_warn.gif
Executable file
|
After Width: | Height: | Size: 956 B |
BIN
wxc2_omc/configuration/bssomc/images/card8_down.gif
Executable file
|
After Width: | Height: | Size: 2.1 KiB |
BIN
wxc2_omc/configuration/bssomc/images/card8_up.gif
Executable file
|
After Width: | Height: | Size: 962 B |
BIN
wxc2_omc/configuration/bssomc/images/card8_warn.gif
Executable file
|
After Width: | Height: | Size: 962 B |
BIN
wxc2_omc/configuration/bssomc/images/gt_minus.gif
Executable file
|
After Width: | Height: | Size: 122 B |
BIN
wxc2_omc/configuration/bssomc/images/iwp_down.gif
Executable file
|
After Width: | Height: | Size: 944 B |
BIN
wxc2_omc/configuration/bssomc/images/iwp_up.gif
Executable file
|
After Width: | Height: | Size: 944 B |
BIN
wxc2_omc/configuration/bssomc/images/lastblk.gif
Executable file
|
After Width: | Height: | Size: 85 B |
BIN
wxc2_omc/configuration/bssomc/images/lastminus.gif
Executable file
|
After Width: | Height: | Size: 192 B |