";
$trunkTimeSlotEntriesFiled="trunkChannelEntries";
//get the trunkTimeSlotEntries oid
$sql="select level_1,level_2,level_3,level_4,level_5,level_6,level_7,level_8,level_9,level_10 from OBJ_320.paramConf where name_2='$trunkTimeSlotEntriesFiled' ";
$res=@mysqli_query($pubConn,$sql);
$num=@mysqli_num_rows($res);
if($num == 0)
exit($trunkTimeSlotEntriesFiled." do not exist!
");
$pos=0;
$row=@mysqli_fetch_array($res);
$trunkTimeSlotEntriesOid="";
while($row[$pos]!=0)
{
$trunkTimeSlotEntriesOid.="{$row[$pos]}.";
$pos++;
}
$trunkTimeSlotEntriesOid=substr($trunkTimeSlotEntriesOid,0,strlen($trunkTimeSlotEntriesOid)-1);
//echo "trunkTimeSlotEntriesOid=$trunkTimeSlotEntriesOid
";
//get the trunkTimeSlotEntries value
$oidWhere=getLevelWhere($trunkTimeSlotEntriesOid);
$sql="select readValue from OBJ_320.param_99 where $oidWhere and instanceNo='$instanceNo' ";
$res=@mysqli_query($pubConn,$sql);
$row=@mysqli_fetch_array($res);
$trunkTimeSlotEntriesValue=$row[0]+0;
//echo "Entries={$row[0]} {$instanceNo}
";
//show the title
$split=explode(".",$instanceNo);
$tgno=$split[0]+0;
$tkno=$split[1]+0;
echo "MSC > Trunk Group $tgno > Trunk $tkno > Channel
";
//set
if($_SERVER['REQUEST_METHOD'] == "POST")
{
echo "Set parameter...
";
//echo "trunkTimeSlotEntriesValue=$trunkTimeSlotEntriesValue";
if($trunkTimeSlotEntriesValue==24)
$totalNum=25;
else if($trunkTimeSlotEntriesValue==32)
$totalNum=32;
for($i=1;$i<$totalNum;$i++)
{
$param="cb_".$i;
$value=$$param;
$index=0;
if($value=="on")
{
$newInstanceNo=$instanceNo.".".omc_keep_length($i,"0",4);
$tmpWhere=getLevelWhere("2.4.3.1.4");
$updateSql="UPDATE OBJ_320.param_99 SET initValue=$typeValue WHERE $tmpWhere AND instanceNo='$newInstanceNo'";
mysqli_query($pubConn,$updateSql);
//echo "typeValue=$typeValue,updateSql=$updateSql
";
/*
$commInfoArr[$index][sysId]=$sysId;
$commInfoArr[$index][oid]="2.4.3.1.4";
$commInfoArr[$index][instanceNo]=$newInstanceNo;
$index++;
*/
$commIdStr=oidSysCommSend($sysId,3,"2.4.3.1.4",$selectedSysId=-1,$newInstanceNo);
//checkState($commIdStr,"./param_show_table.php?sysId=$sysId&tableOid=$tableOid&instanceNo=$instanceNo");
//echo "set $newInstanceNo
";
echo "
";
}
}
echo "
";
/*
if($index > 0)
{
setParam($commInfoArr);
}
*/
echo "Close";
exit("");
}
echo "