710 lines
23 KiB
PHP
710 lines
23 KiB
PHP
<?php
|
|
|
|
require("../../inc/header.inc");
|
|
require("./function.php");
|
|
require("logdb.inc");
|
|
$DEBUG=1;
|
|
|
|
|
|
//*****
|
|
//$url_temp=$_SERVER["REQUEST_URI"];
|
|
//echo "This page URL:$url_temp<br>";
|
|
|
|
|
|
|
|
//onclick('objects.php?language=eng&bssid=0&objectid=ALinkSet.0.0&tablename=OMCR_ALinkSet');">
|
|
if($language == 'chn'){
|
|
$parameter = Array(
|
|
confirmquestionbegin => "决定要",
|
|
confirmquestionend => "吗?",
|
|
entervalidvalue => "请输入有效数值",
|
|
actioniscompleted => "任务完成",
|
|
savenotneed => "没有变动"
|
|
);
|
|
}else{
|
|
$parameter = Array(
|
|
confirmquestionbegin => "Are you sure you want to ",
|
|
confirmquestionend => "?",
|
|
entervalidvalue => "You must enter valid value",
|
|
actioniscompleted => "Action is completed",
|
|
savenotneed => "Save Not needed"
|
|
);
|
|
}
|
|
|
|
// Display_Type
|
|
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);
|
|
define("CONFIRM_PUSH_BUTTON",8);
|
|
|
|
// Attribute_Type
|
|
define("READONLY", 0);
|
|
define("NUMBERS", 1);
|
|
define("STRINGS", 2);
|
|
define("INTEGER_ARRAY", 3);
|
|
|
|
?>
|
|
|
|
<HTML>
|
|
<HEAD>
|
|
|
|
|
|
<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(objValue,nmicmd,need_confirm)
|
|
{
|
|
if (need_confirm)
|
|
{
|
|
window.status = "<?=${$parameter}[confirmquestionbegin]?>"
|
|
+ objValue + "<?=${$parameter}[confirmquestionend]?>";
|
|
answer = confirm("<?=${$parameter}[confirmquestionbegin]?>"
|
|
+ objValue + "<?=${$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)
|
|
{
|
|
data = eval(data);
|
|
if (alerting)
|
|
return;
|
|
|
|
|
|
if ( data.value != '' )
|
|
{
|
|
oldvalue=data.value;
|
|
}
|
|
else
|
|
{
|
|
if ( oldvalue!=0 )
|
|
data.value=oldvalue;
|
|
}
|
|
}
|
|
function change_made(data)
|
|
{
|
|
data = eval(data);
|
|
var parm_string=this.document.object_form.modified_data.value;
|
|
//alert(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;
|
|
}
|
|
}
|
|
|
|
function backpage(flag,backurl)
|
|
{
|
|
if(flag)
|
|
window.location.href=backurl;
|
|
else
|
|
history.go(-1);
|
|
}
|
|
|
|
//-->
|
|
</SCRIPT>
|
|
<TITLE>
|
|
WXC2 OMC V8.3
|
|
</TITLE>
|
|
</HEAD>
|
|
<BODY onLoad='show_status("<?=$status?>","<?=$alarm?>");'>
|
|
<?php
|
|
//echo "<font color=red size=+1>$alarm</font>";
|
|
|
|
|
|
$url_temp=$_SERVER["REQUEST_URI"];
|
|
|
|
if(isset($alarm)&&$alarm!="OMC"&&$alarm!="attr")
|
|
{
|
|
$url_temp=urlencode($url_temp);
|
|
show_alarm($alarm,$url_temp);
|
|
}
|
|
|
|
|
|
$status="";
|
|
|
|
if (!isset($bssid) || !isset($objectid) || !isset($tablename))
|
|
{
|
|
echo "The required information for this page is invalid.<br>\n";
|
|
echo "</BODY>\n</HTML>";
|
|
exit();
|
|
}
|
|
|
|
//
|
|
// 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," .
|
|
"${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>";
|
|
$result = mysqli_query($pubConn,$sqlstring) or
|
|
die("Invalid query: $sqlstring\n" . mysqli_error($pubConn));
|
|
while ( $row = mysqli_fetch_row($result) )
|
|
{
|
|
|
|
//echo "object_name:{$rows[0]}<br>";
|
|
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_display_name[], $act_lookup[],
|
|
$act_help_text[]) = $row;
|
|
else
|
|
list($object_name[],$attribute_name[],$attribute_id[],$attribute_type[],$display_type[],
|
|
$display_name[],$lookup[],$help_text[]) = $row;
|
|
}
|
|
//
|
|
// Display the action buttons & confirmed action buttons
|
|
//
|
|
$no_of_actions = count($act_attribute_name);
|
|
|
|
//========move the Bsc's reboot button on the buttom of the page==================
|
|
//echo "no_of_Actions:$no_of_actions<br>";
|
|
//print_r($act_lookup);
|
|
//echo "<hr>";
|
|
//print_r($act_attribute_name);
|
|
$bscFlag=substr($objectid,0,3);
|
|
$rebootButtonIndex=0;
|
|
//echo "object_id:$bscFlag<br>";
|
|
//===================================================================================
|
|
//echo "<FONT color=#000000 size=+3pt><b>$objectid:</b></FONT>";
|
|
echo "<br>";
|
|
echo "<FORM action=./objModify.php name='object_form' method=post " .
|
|
"onSubmit='return submit_form(this.document.object_form);'>";
|
|
|
|
|
|
if($tablename=="OMCR_BtsMgr")//||$tablename=="OMCR_Bts")
|
|
{
|
|
$PubDb = "OMC_PUB";
|
|
$sqlstring="select Label from $tablename where ObjectId like '$objectid%'";
|
|
$result = mysqli_query($pubConn,$sqlstring) or
|
|
die("Invalid query: $sqlstring\n" . mysqli_error($pubConn));
|
|
$row = mysqli_fetch_row($result);
|
|
$cellname = $row[0];
|
|
$objconts = explode(".",$objectid);
|
|
$bts_id = $objconts[1];
|
|
if($cellname!='')
|
|
{
|
|
//$tab = explode("_",$tablename);
|
|
//$str=strtoupper($tab[1]);
|
|
$sqlstring="select ledOffset from sysConf where sysTypeName like 'BTS%'";//368
|
|
$result = mysqli_query($pubConn,$sqlstring) or
|
|
die("Invalid query: $sqlstring\n" . mysqli_error($pubConn));
|
|
$row = mysqli_fetch_row($result);
|
|
//echo "sql>$sqlstring<br>";
|
|
//echo "ledOffset=$row[0]<br>";
|
|
$ext = $row[0]*16+(($bssid*12)+$bts_id)*16;
|
|
//echo "<br>bssid=$bssid,btsid=$bts_id";
|
|
$key_led_num=$ext;
|
|
//echo "key_led_num=$key_led_num<br>";
|
|
$sqlstring = "select key_src_page_num from sysLedConf where key_led_num=$key_led_num";
|
|
$result = mysqli_query($pubConn,$sqlstring) or
|
|
die("Invalid query: $sqlstring\n" . mysqli_error($pubConn));
|
|
$row = mysqli_fetch_row($result);
|
|
$key_led_num2=$row[0];
|
|
//echo "key_src_page_num=$key_led_num2<br>";
|
|
$sqlstring = "select remark from sysLedConf where key_led_num=$key_led_num2";
|
|
$result = mysqli_query($pubConn,$sqlstring) or
|
|
die("Invalid query: $sqlstring\n" . mysqli_error($pubConn));
|
|
$row = mysqli_fetch_row($result);
|
|
//echo "$row[0]<br>";
|
|
$sqlstring = "select remark from sysLedConf where sync_from_led=$key_led_num2";
|
|
//echo "$sqlstring<br>";
|
|
$result = mysqli_query($pubConn,$sqlstring) or
|
|
die("Invalid query: $sqlstring\n" . mysqli_error($pubConn));
|
|
$remark = $row[0];
|
|
//echo "$row[0]";
|
|
//echo "cellname=$cellname<br>";
|
|
$site = explode("[",$cellname);
|
|
$point= explode(",",$site[1]);
|
|
$pointx=$point[0];$point_t=explode("]",$point[1]);
|
|
$pointy=$point_t[0];
|
|
//echo "x=$pointx,y=$pointy<br>";
|
|
if($pointx!='')
|
|
{
|
|
$sqlstring = "update sysLedConf set point_x=$pointx,point_y=$pointy where sync_from_led=$key_led_num2";
|
|
//echo "sql>$sqlstring";
|
|
$result = mysqli_query($pubConn,$sqlstring) or
|
|
die("Invalid query: $sqlstring\n" . mysqli_error($pubConn));
|
|
}
|
|
$test = explode(":",$remark);
|
|
$sqlstring = "update sysLedConf set remark = '$test[0]:$cellname' where remark='$remark'";//sync_from_led=$key_led_num2";and remark not like '$remark:$cellname%'
|
|
//echo "sql>$sqlstring<br>";
|
|
$remark = "$remark:$cellname";
|
|
$conts = explode(":",$remark);
|
|
//if($conts[2]=='')
|
|
//echo "<br>PubDb=$PubDb";
|
|
$result = mysqli_query($pubConn,$sqlstring) or
|
|
die("Invalid query: $sqlstring\n" . mysqli_error($pubConn));
|
|
}
|
|
}
|
|
$sqlbuf = "select CurrentBuildDir from OMCR_Software where bssid=$bssid";
|
|
//echo $sqlstring . "<BR>";
|
|
$results = mysqli_query($pubConn,$sqlbuf) or
|
|
die("Invalid query: $sqlstring\n" . mysqli_error($pubConn));
|
|
$rows = mysqli_fetch_row($results);
|
|
|
|
|
|
$software = explode("_",$rows[0]);
|
|
|
|
$flag = 1;
|
|
$contain = explode(".",$objectid);
|
|
switch($contain[0])
|
|
{
|
|
case "Shelf":
|
|
case "Port":
|
|
case "Card":
|
|
$backurl = "./bssSpecific.php?bssid=$bssid";
|
|
break;
|
|
case "DSP":
|
|
//$dspcont =explode(".",$objectid);
|
|
//$dspnum = $dspcont[3];
|
|
//$cardnum = $dspcont[2];
|
|
//$backurl = "./bss_dsp.php?bssid=$bssid&dspnum=$dspnum&cardnum=$cardnum";
|
|
$backurl = "./bssSpecific.php?bssid=$bssid";
|
|
break;
|
|
case "BtsMgr_Shelf":
|
|
case "BtsMgr_Shelf_Card_Port":
|
|
case "BtsMgr_Software":
|
|
case "BtsMgr_Shelf_Card":
|
|
$btscont = explode(".",$objectid);
|
|
$btsid = $btscont[1];
|
|
$backurl = "./bss_btsmgr.php?bssid=$bssid&btsid=$btsid";
|
|
break;
|
|
case "AdjHand":
|
|
$btscont = explode(".",$objectid);
|
|
$btsid = $btscont[1];
|
|
$backurl = "./bss_bts.php?bssid=$bssid&btsid=$btsid&cellid=$cellid";
|
|
break;
|
|
default:
|
|
break;
|
|
}
|
|
|
|
switch($tablename)
|
|
{
|
|
case "OMCR_AIf":
|
|
case "OMCR_Bsc":
|
|
case "OMCR_BtsMgr":
|
|
$backurl = "./bssSpecific.php?bssid=$bssid";
|
|
break;
|
|
case "OMCR_SmsCb":
|
|
$backurl = "./bssSpecific.php?bssid=$bssid";
|
|
break;
|
|
case "OMCR_SmMsg":
|
|
$backurl = "./bss_smmsg.php?bssid=$bssid";
|
|
break;
|
|
case "OMCR_ALinkSet":
|
|
case "OMCR_ALink":
|
|
$backurl = "./bss_aif.php?bssid=$bssid";
|
|
break;
|
|
case "OMCR_AbisMgr":
|
|
case "OMCR_Bts":
|
|
$btscont = explode(".",$objectid);
|
|
$btsid = $btscont[1];
|
|
$backurl = "./bss_btsmgr.php?bssid=$bssid&btsid=$btsid";
|
|
break;
|
|
case "OMCR_RCarrier":
|
|
case "OMCR_Trx":
|
|
case "OMCR_TrxCh":
|
|
case "OMCR_PwrCont":
|
|
case "OMCR_HandCont":
|
|
$btscont = explode(".",$objectid);
|
|
$btsid = $btscont[1];
|
|
$cellid = $btscont[2];
|
|
$backurl = "./bss_bts.php?bssid=$bssid&btsid=$btsid&cellid=$cellid";
|
|
break;
|
|
default:
|
|
break;
|
|
}
|
|
|
|
|
|
//show the navigation for this page
|
|
|
|
|
|
$temp=explode("/",$backurl);
|
|
$temp=explode("?",$temp[1]);
|
|
$temp=$temp[0];
|
|
//echo "<br>$temp<br>";
|
|
if($temp=="bssSpecific.php")
|
|
$navigation_title="Configuration > Network > BSS Specific > $objectid";
|
|
if($temp=="bss_aif.php")
|
|
$navigation_title="Configuration > Network > BSS Specific > AIf > $objectid";
|
|
if($temp=="bss_smmsg.php")
|
|
$navigation_title="Configuration > Network > BSS Specific > SmMsg > $objectid";
|
|
if($tablename=="OMCR_ClockMod")
|
|
$navigation_title="Configuration > Network > BSS Specific > Clock Module";
|
|
|
|
|
|
echo "<table width=\"100%\"border=\"0\" width=\"100%\" cellpadding=\"1\" cellspacing=\"0\" bordercolor=\"#666666\" bordercolordark=\"#FFFFFF\">";
|
|
echo "<tr>";
|
|
echo "<td width=\"50%\">$navigation_title</td>";
|
|
echo "<td width=\"50%\"></td>";
|
|
echo "</tr>";
|
|
echo "</table>";
|
|
echo "<br>";
|
|
|
|
|
|
echo "<table width=\"100%\"border=\"0\" width=\"100%\" cellpadding=\"1\" cellspacing=\"0\" bordercolor=\"#666666\" bordercolordark=\"#FFFFFF\">";
|
|
echo "<tr>";
|
|
echo "<td width=\"50%\"></td>";
|
|
//echo "<td width=\"50%\"><font color=#000000 size=+3pt><b>$objectid:</b></font></td>";
|
|
echo "<td width=\"40%\">";
|
|
for ($i=0;$i<$no_of_actions;$i++)
|
|
{
|
|
if($bscFlag=="Bsc"&&$act_attribute_name[$i]=="Reboot")
|
|
{
|
|
$rebootButtonIndex=$i;
|
|
continue;
|
|
}
|
|
|
|
if (!strncmp($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] . "'>";
|
|
|
|
}
|
|
else if ($act_lookup[$i] != '') // NMI Actions
|
|
{
|
|
|
|
if ($act_display_type[$i] == CONFIRM_PUSH_BUTTON)
|
|
$need_confirm = "true";
|
|
else
|
|
$need_confirm = "false";
|
|
|
|
if ($act_attribute_name[$i] == "Audit")
|
|
{
|
|
|
|
echo "<INPUT type=button value=' Get " . //$act_display_name[$i] .
|
|
"' name='" . $act_attribute_name[$i] .
|
|
"' onClick=\"JavaScript:actions('" .
|
|
$act_attribute_name[$i] . "','" . $act_lookup[$i] . "',$need_confirm)\">";
|
|
echo " $nbsp  ";
|
|
|
|
}
|
|
else if($act_attribute_name[$i] != "New_ALink1"&&$act_attribute_name[$i] != "Del_ALink1"&&$act_attribute_name[$i] != "Del_Bss_DB")
|
|
{
|
|
echo "<INPUT type=button value='" . $act_display_name[$i] .
|
|
"' name='" . $act_attribute_name[$i] .
|
|
"' onClick=\"JavaScript:actions('".
|
|
$act_attribute_name[$i] . "','" . $act_lookup[$i] . "',$need_confirm)\">";
|
|
}
|
|
}
|
|
else if ($act_attribute_name[$i] == "Revert") // Reset Webpage input the original value
|
|
{
|
|
|
|
//echo "<INPUT type=reset value='Reset" . //$act_display_name[$i] .
|
|
// "' name='Revert'>\n";
|
|
}
|
|
else // Simply Save the altered values
|
|
{
|
|
|
|
if ($act_attribute_name[$i] == "Save")
|
|
{
|
|
echo "<INPUT type=submit value=' Set " . //$act_display_name[$i] .
|
|
"' name='" . $act_attribute_name[$i] . "'>";
|
|
|
|
}
|
|
else
|
|
{
|
|
echo "<INPUT type=submit value='" . $act_display_name[$i] .
|
|
"' name='" . $act_attribute_name[$i] . "'>";
|
|
}
|
|
}
|
|
|
|
}
|
|
echo "</td>";
|
|
|
|
|
|
|
|
|
|
if(isset($backurl))
|
|
echo "<td width=\"10%\"><a href=\"JavaScript:backpage($flag,'$backurl')\"><img align=absBottom border=0 src=\"../../images/left.gif\" width=\"14\" height=\"14\">Back</a></td></tr></table>";
|
|
else
|
|
echo "<td width=\"10%\"><a href=\"JavaScript:history.go(-1)\"><img align=absBottom border=0 src=\"../../images/left.gif\" width=\"14\" height=\"14\">Back</a></td></tr></table>";
|
|
////////////////////////////////////////////////
|
|
$no_of_parms = count($attribute_name);
|
|
|
|
if ($no_of_parms == 0)
|
|
{
|
|
echo "<BR>";
|
|
}
|
|
else
|
|
{
|
|
|
|
//
|
|
// LOOK UP OMCR_<Object ID> getting real parameter
|
|
//
|
|
$sqlstring = "select " . join(",",$attribute_name) .
|
|
",ObjectId from $tablename " .
|
|
"where bssid=$bssid and ObjectId like '$objectid'";
|
|
|
|
//echo "<BR>".$sqlstring . "<BR>";
|
|
$result = mysqli_query($pubConn,$sqlstring) or
|
|
die("Invalid query: $sqlstring\n" . mysqli_error($pubConn));
|
|
$no_of_instance = mysqli_num_rows($result);
|
|
|
|
while ( $row = mysqli_fetch_row($result) )
|
|
{
|
|
echo "<table width=\"100%\"border=\"1\" width=\"100%\" cellpadding=\"1\" cellspacing=\"0\" bordercolor=\"#666666\" bordercolordark=\"#FFFFFF\">";
|
|
echo "<tr bgcolor=\"#E6E6E6\">";
|
|
echo "<td width=\"50%\"><b>Parameter</b></td>";
|
|
echo "<td width=\"50%\"><b>Value</b></td>";
|
|
echo "</tr>";
|
|
for ($i=0; $i<$no_of_parms; $i++)
|
|
{
|
|
if($tablename=="OMCR_E1port" && $row[7]==0 && $attribute_name[$i]=="FrameFormat")//if E1 not display T1
|
|
{
|
|
$display_type[$i]=0;
|
|
$display_name[$i]="";
|
|
}
|
|
if($tablename=="OMCR_AIf" && $software[0]=="iw06" && $attribute_name[$i]=="dpcLen")
|
|
{
|
|
$display_type[$i]=0;
|
|
$display_name[$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)
|
|
{
|
|
$widget.="<option value=" . $menu_items[$j+1];
|
|
if ($row[$i] == $menu_items[$j+1])
|
|
{
|
|
$widget.=" selected>";
|
|
$existed=1;
|
|
}
|
|
else
|
|
{
|
|
$widget.=">";
|
|
}
|
|
$widget.=$menu_items[$j] . "</option>\n";
|
|
}
|
|
$widget.="</SELECT>";
|
|
if (!$existed)
|
|
$widget="* Unknown value ($row[$i]) *";
|
|
break;
|
|
case TEXTBOX: //text box
|
|
$widget="<INPUT type=text name=" . $attribute_name[$i] .
|
|
" size=20 value='" . rawurldecode($row[$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 = $row[$i];
|
|
$widget=translate($row[$i],$lookup[$i]);
|
|
$widget.= "<INPUT type=hidden name='$attribute_name[$i]' value='$row[$i]'>\n";
|
|
break;
|
|
case RADIO_BUTTON: //radio button
|
|
$widget="<INPUT type=radio name=" . $attribute_name .
|
|
" value='" . translate($row[$i],$lookup[$i]) .
|
|
"' onBlur='change_made(\"this.document.object_form." .
|
|
$attribute_name[$i] . "\")'>" .
|
|
$row[$i] . "\n";
|
|
break;
|
|
case CHECKBOX: //check box
|
|
$widget="<INPUT type=checkbox name=" . $attribute_name[$i] .
|
|
" value=1" . ($row[$i]? " CHECKED ":" ") .
|
|
"onBlur='change_made(\"this.document.object_form." .
|
|
$attribute_name[$i] . "\")'>";
|
|
break;
|
|
case TEXTAREA: //text area
|
|
$tmpText=rawurldecode($row[$i]);
|
|
$widget="<TEXTAREA onpropertychange=\"if(value.length>82)value=value.substr(0,82)\" name=" . $attribute_name[$i] .
|
|
" rows=4 cols=40 " .
|
|
"onBlur='change_made(\"this.document.object_form." .
|
|
$attribute_name[$i] . "\")'>$tmpText </TEXTAREA>";
|
|
//$str = "(MaxLength=36)";
|
|
break;
|
|
|
|
}
|
|
|
|
if (strstr($saved,$attribute_name[$i]) != false)
|
|
$color="#D2F0FF";
|
|
else
|
|
$color="#FFFFFF";
|
|
|
|
$widget_type = "<INPUT type=hidden name=t$attribute_name[$i] value=$attribute_type[$i]>";
|
|
|
|
echo "<tr>";
|
|
echo "<td width=\"50%\" bgcolor=$color title='$help_text[$i]'>$display_name[$i]$widget_type</td>";
|
|
echo "<td width=\"50%\" bgcolor=$color>$widget</td>";
|
|
echo "</tr>";
|
|
}
|
|
echo "</TABLE>\n";
|
|
} /* End of while() */
|
|
}
|
|
|
|
echo "<INPUT type=hidden name='modified_data' value=''>\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";
|
|
|
|
//==================Add the Bsc reboot button on the buttom of the page============
|
|
if($bscFlag=="Bsc")
|
|
{
|
|
echo "<table><tr><td align=\"right\" width=\"800\">";
|
|
if ($act_display_type[$rebootButtonIndex] == CONFIRM_PUSH_BUTTON)
|
|
$need_confirm = "true";
|
|
else
|
|
$need_confirm = "false";
|
|
|
|
if ($act_attribute_name[$rebootButtonIndex] == "Audit")
|
|
{
|
|
|
|
echo "<INPUT type=button value=' Get " . //$act_display_name[$i] .
|
|
"' name='" . $act_attribute_name[$rebootButtonIndex] .
|
|
"' onClick=\"JavaScript:actions('" .
|
|
$act_attribute_name[$rebootButtonIndex] . "','" . $act_lookup[$rebootButtonIndex] . "',$need_confirm)\">";
|
|
echo " $nbsp  ";
|
|
|
|
}
|
|
else if($act_attribute_name[$rebootButtonIndex] != "New_ALink1"&&$act_attribute_name[$rebootButtonIndex] != "Del_ALink1"&&$act_attribute_name[$rebootButtonIndex] != "Del_Bss_DB")
|
|
{
|
|
echo "<INPUT type=button value='" . $act_display_name[$rebootButtonIndex] .
|
|
"' name='" . $act_attribute_name[$rebootButtonIndex] .
|
|
"' onClick=\"JavaScript:actions('".
|
|
$act_attribute_name[$rebootButtonIndex] . "','" . $act_lookup[$rebootButtonIndex] . "',$need_confirm)\">";
|
|
}
|
|
echo "</td></tr></table>";
|
|
}
|
|
//=================================================================================
|
|
//echo "<HR size=1>\n";
|
|
?>
|
|
|
|
</FORM>
|
|
</BODY>
|
|
</HTML>
|