"; //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); ?> WXC2 OMC V8.3 $alarm"; $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.
\n"; echo "\n"; 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 . "
"; $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]}
"; 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
"; //print_r($act_lookup); //echo "
"; //print_r($act_attribute_name); $bscFlag=substr($objectid,0,3); $rebootButtonIndex=0; //echo "object_id:$bscFlag
"; //=================================================================================== //echo "$objectid:"; echo "
"; echo "
"; 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
"; //echo "ledOffset=$row[0]
"; $ext = $row[0]*16+(($bssid*12)+$bts_id)*16; //echo "
bssid=$bssid,btsid=$bts_id"; $key_led_num=$ext; //echo "key_led_num=$key_led_num
"; $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
"; $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]
"; $sqlstring = "select remark from sysLedConf where sync_from_led=$key_led_num2"; //echo "$sqlstring
"; $result = mysqli_query($pubConn,$sqlstring) or die("Invalid query: $sqlstring\n" . mysqli_error($pubConn)); $remark = $row[0]; //echo "$row[0]"; //echo "cellname=$cellname
"; $site = explode("[",$cellname); $point= explode(",",$site[1]); $pointx=$point[0];$point_t=explode("]",$point[1]); $pointy=$point_t[0]; //echo "x=$pointx,y=$pointy
"; 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
"; $remark = "$remark:$cellname"; $conts = explode(":",$remark); //if($conts[2]=='') //echo "
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 . "
"; $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 "
$temp
"; 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 ""; echo ""; echo ""; echo ""; echo ""; echo "
$navigation_title
"; echo "
"; echo ""; echo ""; echo ""; //echo ""; echo ""; if(isset($backurl)) echo "
$objectid:"; 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 ""; } 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 ""; echo " $nbsp  "; } else if($act_attribute_name[$i] != "New_ALink1"&&$act_attribute_name[$i] != "Del_ALink1"&&$act_attribute_name[$i] != "Del_Bss_DB") { echo ""; } } else if ($act_attribute_name[$i] == "Revert") // Reset Webpage input the original value { //echo "\n"; } else // Simply Save the altered values { if ($act_attribute_name[$i] == "Save") { echo ""; } else { echo ""; } } } echo "Back
"; else echo "Back"; //////////////////////////////////////////////// $no_of_parms = count($attribute_name); if ($no_of_parms == 0) { echo "
"; } else { // // LOOK UP OMCR_ getting real parameter // $sqlstring = "select " . join(",",$attribute_name) . ",ObjectId from $tablename " . "where bssid=$bssid and ObjectId like '$objectid'"; //echo "
".$sqlstring . "
"; $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 ""; echo ""; echo ""; echo ""; echo ""; 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=""; if (!$existed) $widget="* Unknown value ($row[$i]) *"; break; case TEXTBOX: //text box $widget=""; break; case LABEL: //label if (!strcasecmp($attribute_name[$i], "adminstate")) $adminstate = $row[$i]; $widget=translate($row[$i],$lookup[$i]); $widget.= "\n"; break; case RADIO_BUTTON: //radio button $widget="" . $row[$i] . "\n"; break; case CHECKBOX: //check box $widget=""; break; case TEXTAREA: //text area $tmpText=rawurldecode($row[$i]); $widget=""; //$str = "(MaxLength=36)"; break; } if (strstr($saved,$attribute_name[$i]) != false) $color="#D2F0FF"; else $color="#FFFFFF"; $widget_type = ""; echo ""; echo ""; echo ""; echo ""; } echo "
ParameterValue
$display_name[$i]$widget_type$widget
\n"; } /* End of while() */ } echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; //==================Add the Bsc reboot button on the buttom of the page============ if($bscFlag=="Bsc") { echo "
"; if ($act_display_type[$rebootButtonIndex] == CONFIRM_PUSH_BUTTON) $need_confirm = "true"; else $need_confirm = "false"; if ($act_attribute_name[$rebootButtonIndex] == "Audit") { echo ""; echo " $nbsp  "; } else if($act_attribute_name[$rebootButtonIndex] != "New_ALink1"&&$act_attribute_name[$rebootButtonIndex] != "Del_ALink1"&&$act_attribute_name[$rebootButtonIndex] != "Del_Bss_DB") { echo ""; } echo "
"; } //================================================================================= //echo "
\n"; ?>