"; //***** //$url_temp=$_SERVER["REQUEST_URI"]; //echo "This page URL:$url_temp
"; //echo "tableOid=$tableOid,sysId=$sysId,table_type=$table_type,instanceNo=$instanceNo
"; $sysIdArr=explode('_',$sysId); $sysTypeNo=$sysIdArr[0]; $sysNo=$sysIdArr[1]; $subSysNo=$sysIdArr[2]; $objDb='OBJ_'.$sysTypeNo; $paraConfTable=$objDb.'.paramConf'; $pubDb='OMC_PUB'; $sql="select sysTypeName from OMC_PUB.sysConf where sysTypeNo='$sysTypeNo' "; $res=@mysqli_query($pubConn,$sql); $row=@mysqli_fetch_array($res); $module_name=$row[sysTypeName]; if(checkIndependSystem($sysTypeNo))//Plat $paraTable=$objDb.".param_".$sysNo; else $paraTable=$objDb.".param_99"; //Get all if($_SERVER['REQUEST_METHOD'] == "POST") { if($get) { //scalar table if($table_type == 0) { getParam($commInfoArr); } //column table else { //Get the timeslot parameter from the plat(trunk group id) $timeslot_table_oid=GetOIDByName(SYSTYPENO_MSC,"timeSlotEntry"); if($sysTypeNo == SYSTYPENO_MSC && $tableOid == $timeslot_table_oid) { $tmps=explode(".",$instanceNo); $grounp_id=GetTrunkGroupID($tmps[0]+0,$tmps[1]+0); if($grounp_id == 1) $tmpSysId="320_1_0"; else $tmpSysId="320_0_0"; if(!GetSystemStatus(SYSTYPENO_MSC,$grounp_id)) $tmpSysId="320_99_99"; $commIdStr=oidSysCommSend($tmpSysId,0,$tableOid,$selectedSysId=-1,$instanceNo); checkState($commIdStr,"./param_edit.php?sysId=$sysId&tableOid=$tableOid&table_type=$table_type&instanceNo=$instanceNo"); } else { $commIdStr=oidSysCommSend($sysId,0,$tableOid,$selectedSysId=-1,$instanceNo); echo "oidSysCommSend($sysId,0,$tableOid,$selectedSysId=-1,$instanceNo);
"; checkState($commIdStr,"./param_edit.php?sysId=$sysId&tableOid=$tableOid&table_type=$table_type&instanceNo=$instanceNo"); } } } else if($set) { //scalar table if($table_type == 0) { $len=sizeof($setCommInfoArr); $commIdStr=""; for($i=0;$i<$len;$i++) { $tmpCommIdStr = oidSysCommSend($setCommInfoArr[$i][sysId],3,$setCommInfoArr[$i][oid],-1); $commIdStr=$commIdStr.$tmpCommIdStr; } if($len>0) checkState($commIdStr,"./param_edit.php?sysId=$sysId&tableOid=$tableOid&table_type=$table_type&instanceNo=$instanceNo"); } //column table else { $commIdStr=oidSysCommSend($sysId,3,$tableOid,$selectedSysId=-1,$instanceNo); checkState($commIdStr,"./param_edit.php?sysId=$sysId&tableOid=$tableOid&table_type=$table_type&instanceNo=$instanceNo"); } } else if($lock || $unlock) { $tmpWhere=getLevelWhere($adminStatOid); if($lock) $initValue=0; else $initValue=1; $updateSql="UPDATE $paraTable SET initValue=$initValue WHERE $tmpWhere AND instanceNo=$instanceNo "; if($sysTypeNo == 260 && $sysNo != 99 && $subSysNo != 99) $updateSql.="and subSysNo='$subSysNo' "; mysqli_query($pubConn,$updateSql); $commIdStr=oidSysCommSend($sysId,3,$adminStatOid,$selectedSysId=-1,$instanceNo); checkState($commIdStr,"./param_edit.php?sysId=$sysId&tableOid=$tableOid&table_type=$table_type&instanceNo=$instanceNo"); } else if($podUpdateToPod) { $tmpWhere=getLevelWhere($podUpdateToPodOid); //if($lock) $initValue=1; // else // $initValue=1; $updateSql="UPDATE $paraTable SET initValue=$initValue WHERE $tmpWhere AND instanceNo=$instanceNo "; if($sysTypeNo == 260 && $sysNo != 99 && $subSysNo != 99) $updateSql.="and subSysNo='$subSysNo' "; mysqli_query($pubConn,$updateSql); $commIdStr=oidSysCommSend($sysId,3,$podUpdateToPodOid,$selectedSysId=-1,$instanceNo); checkState($commIdStr,"./param_edit.php?sysId=$sysId&tableOid=$tableOid&table_type=$table_type&instanceNo=$instanceNo"); } } //create if($create == 1) { //echo "createIndex=$createIndex,createInstanceNo=$createInstanceNo,createOid=$createOid,sysId=$sysId,tableOid=$tableOid,table_type=$table_type
"; $level=getTableLevel($tableOid,$sysTypeNo); $tmpwhere=getLevelWhere($tableOid); $newInstanceNo=omc_keep_length($createIndex,'0',4); if($createMethod == AUTO_CREATE) $createIndex=1; $sql="replace into $paraTable set initValue='$createIndex',instanceNo='$createInstanceNo'"; if($sysTypeNo == 260 && $sysNo != 99 && $subSysNo != 99) $sql.=",subSysNo='$subSysNo' "; //nest table if($level > 1) { $createTableName=getTableNameByOid($sysId,$tableOid); $createTableName=str_replace("Entry","",$createTableName); $createOid=findRelationOid($createTableName,TABLE_CREATE,$sysTypeNo); $entriesOid=findRelationOid($createTableName,TABLE_ENTRIES,$sysTypeNo); //PrintInfo("createOid=".$createOid); //PrintInfo("entriesOid=".$entriesOid); } else { $orderBy="order by level_1 desc,level_2 desc,level_3 desc,level_4 desc,level_5 desc,level_6 desc,level_7 desc,level_8 desc,level_9 desc,level_10 desc"; $sql1="select * from $paraConfTable where $tmpwhere and name_1 like '%Index' $orderBy"; $res=@mysqli_query($pubConn,$sql1); $row=@mysqli_fetch_array($res); $createOid=""; for($i=1;$i<=10;$i++) { if($row["level_".$i] == '0') break; $createOid.=$row["level_".$i]."."; } $createOid=substr($createOid,0,strlen($createOid)-1); //echo "createOid=$createOid
"; } $indexOidArr=explode(".",$createOid); for($i=0;$i"; mysqli_query($pubConn,$sql); //nest table if($level > 1) { $commIdStr=oidSysCommSend($sysId,9,$createOid,$selectedSysId=-1,$createInstanceNo); checkState($commIdStr,"./param_edit.php?sysId=$sysId&tableOid=$tableOid&table_type=$table_type&instanceNo=$instanceNo"); if($createMethod == AUTO_CREATE) { $indexLevelWhere=getLevelWhere($createOid); $indexSql="select * from $paraTable where $indexLevelWhere and instanceNo='$createInstanceNo' "; if($sysTypeNo == 260 && $sysNo != 99 && $subSysNo != 99) $indexSql.="and subSysNo='$subSysNo' "; $indexres=@mysqli_query($pubConn,$indexSql); $indexrow=@mysqli_fetch_array($indexres); $newIndex=$indexrow[readValue]+0; } $tmpwhere=getLevelWhere($tableOid); $sql="delete from $paraTable WHERE $tmpwhere "; if($sysTypeNo == 260 && $sysNo != 99 && $subSysNo != 99) $sql.="and subSysNo='$subSysNo' "; if($DEBUG)echo "
clearSql=$clearSql"; mysqli_query($pubConn,$sql); $commIdStr=oidSysCommSend($sysId,5,$tableOid,$selectedSysId=-1,""); checkState($commIdStr,"./param_edit.php?sysId=$sysId&tableOid=$tableOid&table_type=$table_type&instanceNo=$instanceNo"); $commIdStr=oidSysCommSend($sysId,0,$entriesOid,$selectedSysId=-1,$createInstanceNo); //echo "oidSysCommSend($sysId,0,$entriesOid,$selectedSysId=-1,$createInstanceNo);
"; checkState($commIdStr,"./param_edit.php?sysId=$sysId&tableOid=$tableOid&table_type=$table_type&instanceNo=$instanceNo&createpage=$createpage"); if($createMethod == AUTO_CREATE) $newInstanceNo=omc_keep_length($newIndex,'0',4); $instanceNo=$createInstanceNo.".".$newInstanceNo; } else { $commIdStr=oidSysCommSend($sysId,9,$createOid,$selectedSysId=-1,$createInstanceNo); checkState($commIdStr,"./param_edit.php?sysId=$sysId&tableOid=$tableOid&table_type=$table_type&instanceNo=$instanceNo"); //some table create instance auto if($createMethod == AUTO_CREATE) { $wheretest=getLevelWhere($createOid); $sqltest="select * from $paraTable where $wheretest and instanceNo='0000' "; if($sysTypeNo == 260 && $sysNo != 99 && $subSysNo != 99) $sqltest.="and subSysNo='$subSysNo' "; $restest=@mysqli_query($pubConn,$sqltest); $numtest=mysqli_num_rows($restest); $rowtest=@mysqli_fetch_array($restest); $thisnew=$rowtest[readValue]; $thisnew=omc_keep_length($thisnew,'0',4); } $sql="delete from $paraTable WHERE $tmpwhere "; if($sysTypeNo == 260 && $sysNo != 99 && $subSysNo != 99) $sqltest.="and subSysNo='$subSysNo' "; if($DEBUG)echo "
clearSql=$clearSql"; mysqli_query($pubConn,$sql); $commIdStr=oidSysCommSend($sysId,5,$tableOid,$selectedSysId=-1,""); checkState($commIdStr,"./param_edit.php?sysId=$sysId&tableOid=$tableOid&table_type=$table_type&instanceNo=$instanceNo"); $instanceNo=$newInstanceNo; if($createMethod == AUTO_CREATE) $instanceNo=$thisnew; } } echo "
"; if($table_type == 1) { if($createpage == 1) { showTitle("show",$tableOid,$instanceNo,$sysId,$sysTypeNo,$module_name); } else { showTitle("edit",$tableOid,$instanceNo,$sysId,$sysTypeNo,$module_name); } } else { echo "

"; echo "$module_name > "; } //create page if($createpage == 1) { //echo "sysId=$sysId,tableOid=$tableOid,instanceNo=$instanceNo
"; //get the kind of creation, auto or manual //get the table level $level=getTableLevel($tableOid,$sysTypeNo); //nest table if($level > 1) { $createTableName=getTableNameByOid($sysId,$tableOid); $createTableName=str_replace("Entry","",$createTableName); $createEntryOid=findRelationOid($createTableName,TABLE_CREATE,$sysTypeNo); $checkWhere=getLevelWhere($createEntryOid); $checksql="select * from $paraConfTable where $checkWhere "; $checkres=@mysqli_query($pubConn,$checksql); $num=mysqli_num_rows($checkres); if($num != 1) echo "The table not include create entry column
"; else { $checkrow=@mysqli_fetch_array($checkres); if($checkrow[setTemplate_2] == "create=1") $create_method=AUTO_CREATE; else $create_method=MANUAL_CREATE; } //PrintInfo("createTableName=".$createTableName.",createEntryOid=".$createEntryOid.",createMethod=".$create_method); } else { $checkWhere=getLevelWhere($tableOid); $checksql="select * from $paraConfTable where $checkWhere and name_1 like '%Index' "; //echo "$checksql
"; $checkres=@mysqli_query($pubConn,$checksql); $num=mysqli_num_rows($checkres); if($num != 1) echo "The table not include Index column
"; else { $checkrow=@mysqli_fetch_array($checkres); if($checkrow[setTemplate_2] == "create=1") $create_method=AUTO_CREATE; else $create_method=MANUAL_CREATE; $createEntryOid=""; for($i=1;$i<=10;$i++) { if($checkrow["level_".$i] == '0') break; $createEntryOid.=$checkrow["level_".$i]."."; } $createEntryOid=substr($createEntryOid,0,strlen($createEntryOid)-1); } //PrintInfo("createEntryOid=".$createEntryOid.",createMethod=".$create_method); } if($create_method == AUTO_CREATE) { echo "

"; echo ""; echo ""; echo "
Index is assigned by $module_name"; echo ""; echo "
"; echo ""; } else if($create_method == MANUAL_CREATE) { //first level //if($last_table_level == 0) $tmpwhere=getLevelWhere($tableOid); $orderBy="order by level_1 desc,level_2 desc,level_3 desc,level_4 desc,level_5 desc,level_6 desc,level_7 desc,level_8 desc,level_9 desc,level_10 desc"; $sql="select * from $paraConfTable where $tmpwhere and name_1 like '%Index' $orderBy"; //echo "$sql
"; $res=@mysqli_query($pubConn,$sql); $row=@mysqli_fetch_array($res); $minIndex=$row[minValue]+0; $maxIndex=$row[maxValue]+0; $createIndexOid=""; for($i=1;$i<=10;$i++) { if($row["level_".$i] == '0') break; $createIndexOid.=$row["level_".$i]."."; } $createIndexOid=substr($createIndexOid,0,strlen($createIndexOid)-1); //echo "createIndexOid=$createIndexOid,minIndex=$minIndex,maxIndex=$maxIndex
"; $tmpwhere=getLevelWhere($createIndexOid); if($instanceNo != "0000") $sql="select initValue from $paraTable where $tmpwhere and instanceNo like '$instanceNo.%' "; else $sql="select initValue from $paraTable where $tmpwhere "; if($sysTypeNo == 260 && $sysNo != 99 && $subSysNo != 99) $sql.="and subSysNo='$subSysNo' "; //echo "$sql,instanceNo=$instanceNo
"; $res=@mysqli_query($pubConn,$sql); while($row=@mysqli_fetch_array($res)) $index_use_flags[$row[initValue]+0]=1; echo "

"; echo ""; echo ""; echo "
Please input the index No."; $no_use_count=0; //auto //if($sysTypeNo == 260 && $tableOid == "2.2.1.1") // echo ""; for($index=$minIndex;$index<=$maxIndex;$index++) { if($index_use_flags[$index] != 1) { echo ""; $no_use_count++; } } echo ""; echo "
"; //table is full if($no_use_count == 0) { echo ""; echo "

"; echo "
"; echo "Note: The table is full"; echo "
"; } else { //echo "instanceNo=$instanceNo,table_type=$table_type
"; echo ""; } } echo "

"; exit(); } $keyId=0; showTable($tableOid); for($i=0;$i<$keyId;$i++) { if(!$objects[$i]['type'] == LEAF_TYPE && !strstr($objects[$i]['name_1'],"Entry") && !strstr($objects[$i]['name_1'],"Table")) { $objects[$i]['table_type']=SCALAR_TABLE_TYPE; } if($objects[$i]['type'] == UNKNOWN_TYPE) { $objects[$i]['type']=SCALAR_TABLE_TYPE; } } //============================================= //SCALAR_TABLE_TYPE if($table_type == 0) { $commInfoArrNo=0; $setCommInfoArrNo=0; $table_level=0; for($index=0;$index<$keyId;$index++) { if($objects[$index]['type'] == COLUMN_TABLE_TYPE) { echo ""; break; } else if($objects[$index]['type'] == SCALAR_TABLE_TYPE) { $table_name=getShowNameOfTable($objects[$index]['name_1'],$index); echo "{$table_name}

"; echo ""; } else if($objects[$index]['type'] == LEAF_TYPE) { //not accessable if($objects[$index]['maxAccess'] == ACCESS_ENTRY) continue; if(strstr($objects[$index]['desc_1'],"Hidden Parameter")) continue; if(stristr($objects[$index]['name_1'],"Command")) continue; $showName=getShowNameOfTable($objects[$index]['name_1'],$index); echo ""; //title=\"{$objects[$index]['note_1']}\" echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; $commInfoArrNo++; if($objects[$index]['maxAccess'] == ACCESS_READ_WRITE) { echo ""; echo ""; echo ""; $setCommInfoArrNo++; } } } if($index == $keyId) echo "
{$showName}"; if($objects[$index]['valueType'] == VALUE_OPAQUE) showParameter($sysId,$objects[$index]['oid'],$instanceNo); else showParameterAdv($sysId,$objects[$index]['oid'],$instanceNo); echo "
"; } //COLUMN_TABLE_TYPE else if($table_type == 1) { $table_level=0; $this_page_title_object=""; for($index=0;$index<$keyId;$index++) { if($objects[$index]['type'] == ENTRY_TYPE) { $this_page_title_object=$objects[$index]['name_1']; echo "
"; } else if($objects[$index]['type'] == LEAF_TYPE) { //not accessable if($objects[$index]['maxAccess'] == ACCESS_ENTRY) continue; //row status if(strstr($objects[$index]['name_1'],"RowStatus")) continue; echo ""; //whether have lock and unlock button if(strstr($objects[$index]['name_1'],"AdminState")) { $lock_unlock_flag=1; $lock_unlock_oid=$objects[$index]['oid']; } // echo "name_1:$objects[$index]['name_1']
"; if(strstr($objects[$index]['name_1'],"podUpdateToPod")) { $podUpdateToPod_flag=1; $podUpdateToPod_oid=$objects[$index]['oid']; } if(strstr($objects[$index]['name_1'],"CreateEntry")) { continue; } if(strstr($objects[$index]['name_1'],"Entries")) { $showName=getShowNameOfField($objects[$index]['name_1'],$index); echo ""; //get the entry value //get the table name $tb=$objects[$index][name_1]; $tlen=strlen($tb); $fg=0; $tb1=""; for($ti=0;$ti<$tlen;$ti++) { if($tb[$ti] >= 'A' && $tb[$ti] <= 'Z') $fg=1; if($fg==1) $tb1.=$tb[$ti]; } $tb2=explode("Entries",$tb1); $tb3=$tb2[0]; $entriesOid=findRelationOid($tb3,TABLE_ENTRY,$sysTypeNo); //PrintInfo($entriesOid); echo ""; //$nextTableOid= } else { $showName=getShowNameOfField($objects[$index]['name_1'],$index); //title=\"{$objects[$index]['note_1']}\" echo ""; echo ""; } echo ""; } } echo "
{$showName}"; $value=getParamValue($sysId,$objects[$index]['oid'],$instanceNo); echo "$value"; echo "{$showName}"; if($objects[$index]['valueType'] == VALUE_OPAQUE) { if(stristr($objects[$index]['name_1'],"NITZ")) { $mscTable="OBJ_320.param_99"; $levels=getLevelWhere($objects[$index]['oid']); $sql="SELECT * FROM $mscTable WHERE $levels AND instanceNo=$instanceNo"; $res=mysqli_query($pubConn,$sql); $rows=@mysqli_fetch_array($res); $initValue=$rows[initValue]; $readValue=$rows[readValue]; if($initValue == '') $initValue="--"; echo ""; if(strlen($initValue)>8) $showValue=substr($initValue,0,8); if($initValue == $readValue) echo "$showValue"; else echo "$showValue"; echo ""; } else { showParameter($sysId,$objects[$index]['oid'],$instanceNo); } } else if(strstr($objects[$index]['name_1'],"Index")) { $value=getParamValue($sysId,$objects[$index]['oid'],$instanceNo); echo "$value"; } else if(strstr($objects[$index]['desc_1'],"RelationPoint")) { $tmp1=strstr($objects[$index]['desc_1'],"RelationPoint:"); $tmp2=explode(";",$tmp1); $tmp3=explode("RelationPoint:",$tmp2[0]); $rTableOid=$tmp3[1]; $showvalue=getParamValue($sysId,$objects[$index]['oid'],$instanceNo); if(trim($showvalue) == "--" || trim($showvalue)=="") { echo "--"; } else { $tmp1=explode(" ",$showvalue); $tmp2=$tmp1[1]; $tmp3=explode("-",$tmp2); $tmp4=omc_keep_length($tmp3[0],'0',4); $tmp5=omc_keep_length($tmp3[1],'0',4); $rInstanceNo=$tmp4.".".$tmp5; $rWhere=getLevelWhere($rTableOid); $rsql="select * from $paraTable where instanceNo='$rInstanceNo' and $rWhere "; $rres=mysqli_query($pubConn,$rsql); $num=mysqli_num_rows($rres); //echo "$rsql"; if($num == 0) echo "--"; else echo "$showvalue"; } } else showParameterAdv($sysId,$objects[$index]['oid'],$instanceNo); echo "
"; echo ""; echo ""; echo ""; } //======================================= $DEBUG=0; if($DEBUG) { echo "

============================test========================
"; echo "keyId=$keyId
"; $test_oid_flag=1; $test_name_flag=1; $test_nest_flag=1; $test_type_flag=1; for($i=0;$i<$keyId;$i++) { //if($objects[$i]['type'] != LEAF_TYPE && $objects[$i]['type'] != ENTRY_TYPE) { echo "$i-"; if($test_oid_flag) echo "oid-{$objects[$i]['oid']}, "; if($test_name_flag) echo "name-{$objects[$i]['name_1']}, "; if($test_nest_flag) echo "nestNum-{$objects[$i]['nest_num']}, "; if($test_type_flag) echo "type-{$type_label[$objects[$i]['type']]}, "; echo "
"; } } } //lock and unlock if($lock_unlock_flag == 1) { echo ""; echo " "; echo ""; echo " "; echo ""; } if($podUpdateToPod_flag == 1) { echo ""; echo " "; echo ""; } //get all echo ""; echo " "; echo ""; echo " "; echo ""; echo ""; echo ""; echo ""; echo ""; adjust_content_tail("down"); ?>