正在调试中!!"; ?> '2.2.0', 'sysid'=> '350_99_99', 'selectsysid'=>'-1'), array('oid'=>'2.1.0', 'sysid'=> '260_99_99', 'selectsysid'=>'-1'), ); $SaveArr=array( array('oidstr'=>'3.3', 'setvalue'=>'01' ,'sysid'=>'350_99_99'), array('oidstr'=>'3.2', 'setvalue'=>'02' ,'sysid'=>'260_99_99') ); $smpp_sqltable = 'OBJ_260.param_99'; $smsc_sqltable = 'OBJ_350.param_99'; $pubdb = 'OMC_PUB'; $curr_page = './smpp_detail.php'; $smpp_array = array( array('Link type', '1.0-1.7'), array('Connection type', '2.0-2.7'), array('Session type', '3.0-3.7'), array('System ID', '4.0-19.7'), array('Password', '20.0-28.7'), array('Local GTT ', '42.0-57.7'), array('Remote GTT', '58.0-73.7'), array('Local IP', '74.0-77.7'), array('Remote IP', '78.0-81.7'), array('Session timer', '82.0-85.7'), array('Enquire link timer', '86.0-89.7'), array('Inactivity timer', '90.0-93.7'), array('Response timer', '94.0-97.7'), array('Opposite service number','98.0-105.7'), array('flag', '0.0-0.7') ); $smsc_array = array( array('flag', '00.0-00.7'), array('Session type', '01.0-01.7'), array('Service number', '02.0-09.7'), array('Message mode', '10.0-10.7'), array('Data Coding Scheme', '11.0-11.7') ); if($_SERVER['REQUEST_METHOD'] == "POST") { if(isset($setSys) || isset($getSys)) { if(isset($setSys)) { //echo "
Getting parameters
"; //GetParam($sysId_arr); echo "
Setting parameters
"; SetParam($sysId_arr); session_register("SetFlag"); $showType="Set"; echo "
Sending save command
"; SaveParam($SaveArr); } else { echo "
Getting parameters
"; session_register("GetFlag"); GetParam($sysId_arr); $showType="Get"; } } /* elseif(isset($undoSet)) { echo "
Setting parameters
"; SetParam(1); } */ if($setSys || $getSys || $undoSet) { echo ""; exit(); } } if($delflag == 1) { $setsql = "select initValue from $smpp_sqltable WHERE level_1='2' AND level_2='1' AND level_3='0' and instanceNo='$delValue' "; $result = mysqli_query($pubConn,$setsql); echo mysqli_error($pubConn); if($DEBUG) echo "
$setsql
"; $smpp_del = mysqli_fetch_array($result); $session_type = getBitValue($smpp_del[0],'3.0-3.7'); $opposite_num = getBitValue($smpp_del[0],'98.0-105.7'); $setsql = "select initValue from $smsc_sqltable WHERE level_1='2' AND level_2='2' AND level_3='0' "; $result = mysqli_query($pubConn,$setsql); echo mysqli_error($pubConn); if($DEBUG) echo "
$setsql
"; $smsc_ins = 0; while($smsc_row = mysqli_fetch_array($result)) { $smsc_session_type = getBitValue($smsc_row[0],'01.0-01.7'); $smsc_opposite_num = getBitValue($smsc_row[0],'02.0-9.7'); if($smsc_session_type == $session_type && $smsc_opposite_num == $opposite_num) break; $smsc_ins++; } $initValue = omc_keep_length($initValue,'0','24'); $setsql = "update $smsc_sqltable set initValue = '$initValue' where level_1 = '2' and level_2 = '2' and level_3 = '0' and instanceNo = '$smsc_ins' "; mysqli_query($pubConn,$setsql); echo mysqli_error($pubConn); if($DEBUG) echo "
$setsql
"; $initValue = omc_keep_length($initValue,'0','212'); $setsql = "update $smpp_sqltable set initValue = '$initValue' where level_1 = '2' and level_2 = '1' and level_3 = '0' and instanceNo = '$delValue' "; mysqli_query($pubConn,$setsql); echo mysqli_error($pubConn); if($DEBUG) echo "
$setsql
"; } if($DEBUG) echo "back_page=$back_page
"; //========================================================== //取数据库数据 //========================================================== $levelArr=explode('.',$smpp_oid[0]); for($j=0;$jlevelArr[$j]={$levelArr[$j]}"; } $setsql = "select initValue from $smpp_sqltable WHERE level_1='$level_1' AND level_2='$level_2' AND level_3='$level_3'"; $result = mysqli_query($pubConn,$setsql); echo mysqli_error($pubConn); if($DEBUG) echo "
$setsql
"; $i = 0; $n = 0; while($smpp_row = mysqli_fetch_array($result)) { $enable_flag = getBitValue($smpp_row[0],$smpp_array[14][1]); if ($DEBUG)echo "
smpp_row = $smpp_row[0]
"; if($enable_flag == 0) { $i++; continue; } $link_type[$n] = getBitValue($smpp_row[0],$smpp_array[0][1]); $connect_type[$n] = getBitValue($smpp_row[0],$smpp_array[1][1]); $session_type[$n] = getBitValue($smpp_row[0],$smpp_array[2][1]); $system_id[$n] = toAscii(getBitValue($smpp_row[0],$smpp_array[3][1])); $password[$n] = toAscii(getBitValue($smpp_row[0],$smpp_array[4][1])); $local_gtt[$n] = toAscii(getBitValue($smpp_row[0],$smpp_array[5][1])); $remote_gtt[$n] = toAscii(getBitValue($smpp_row[0],$smpp_array[6][1])); $local_ip[$n] = getBitValue($smpp_row[0],$smpp_array[7][1]); $remote_ip[$n] = getBitValue($smpp_row[0],$smpp_array[8][1]); $session_timer[$n] = hexdec(getBitValue($smpp_row[0],$smpp_array[9][1])); $enquire_timer[$n] = hexdec(getBitValue($smpp_row[0],$smpp_array[10][1])); $inact_timer[$n] = hexdec(getBitValue($smpp_row[0],$smpp_array[11][1])); $response_timer[$n] = hexdec(getBitValue($smpp_row[0],$smpp_array[12][1])); $opposite_num[$n] = toAscii(getBitValue($smpp_row[0],$smpp_array[13][1])); $ins_no[$n] = $i; if($DEBUG) { echo "SMPP:
"; echo "link_type=$link_type[$n]
"; echo "connect_type=$connect_type[$n]
"; echo "session_type=$session_type[$n]
"; echo "system_id=$system_id[$n]
"; echo "password=$password[$n]
"; echo "local_gtt=$local_gtt[$n]
"; echo "remote_gtt=$remote_gtt[$n]
"; echo "local_ip=$local_ip[$n]
"; echo "remote_ip=$remote_ip[$n]
"; echo "session_timer=$session_timer[$n]
"; echo "enquire_timer=$enquire_timer[$n]
"; echo "inact_timer=$inact_timer[$n]
"; echo "response_timer=$response_timer[$n]
"; echo "opposite_num=$opposite_num[$n]
"; } $levelArr=explode('.',$smsc_oid[0]); for($j=0;$jlevelArr[$j]={$levelArr[$j]}"; } $setsql = "select initValue from $smsc_sqltable WHERE level_1='$level_1' AND level_2='$level_2' AND level_3='$level_3' "; $smsc_result = mysqli_query($pubConn,$setsql); echo mysqli_error($pubConn); if($DEBUG) echo "$setsql
"; $smsc_ins = 0; while($smsc_row = mysqli_fetch_array($smsc_result)) { $smsc_session_type = getBitValue($smsc_row[0],$smsc_array[1][1]); $smsc_opposite_num = toAscii(getBitValue($smsc_row[0],$smsc_array[2][1])); if($smsc_session_type == $session_type[$n] && $smsc_opposite_num == $opposite_num[$n]) { $smsc_dcs[$n] = getBitValue($smsc_row[0],$smsc_array[4][1]); break; } $smsc_ins++; } if($DEBUG) echo "dcs=$smsc_dcs[$n]
"; $n++; $i++; } //========================================================== //输出并显示数据 //========================================================== echo "
"; echo ""; ?> "; echo ""; echo ""; echo "Configuration > Network > Element > SMSC"; echo ""; showHelp($helpId); echo ""; echo ""; echo ""; echo "
"; echo ""; echo ""; echo ""; echo ""; echo "
"; echo "SMPP link:  "; echo ""; echo ""; if ( TRUE == session_is_registered("SetFlag") ) { echo ""; } else { echo ""; } echo "Add"; echo "

$strBack"; echo "

"; ?> "; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; $i = 0; while($n != 0) { echo ""; //========================================================== //输出No. //========================================================== echo ""; //========================================================== //输出Link type //========================================================== if($DEBUG) echo "link_type_$i = $link_type[$i]
"; if ($link_type[$i] == 0) { echo ""; } else { echo ""; } //========================================================== //输出Connection type //========================================================== if ($connect_type[$i] == 0) { echo ""; } else { echo ""; } /*//========================================================== //输出Session type //========================================================== switch ($session_type[$i]) { case 0: { echo ""; } break; case 1: { echo ""; } break; case 2: { echo ""; } break; }*/ //========================================================== //输出System ID //========================================================== echo ""; //========================================================== //输出Password //========================================================== echo ""; //========================================================== //输出DCS //========================================================== switch ($smsc_dcs[$i]) { case 0: { echo ""; } break; case 1: { echo ""; } break; case 16: { echo ""; } break; case 17: { echo ""; } break; } //========================================================== //输出Opposite service number //========================================================== echo ""; //========================================================== //输出GT //========================================================== if($link_type[$i] == 0) { echo ""; echo ""; echo ""; } //========================================================== //输出IP //========================================================== else { echo ""; // echo ""; $rmt_ip[0] = hexdec(getBitValue($remote_ip[$i],'0.0-0.7')); $rmt_ip[1] = hexdec(getBitValue($remote_ip[$i],'1.0-1.7')); $rmt_ip[2] = hexdec(getBitValue($remote_ip[$i],'2.0-2.7')); $rmt_ip[3] = hexdec(getBitValue($remote_ip[$i],'3.0-3.7')); echo ""; // echo ""; $lcl_ip[0] = hexdec(getBitValue($local_ip[$i],'0.0-0.7')); $lcl_ip[1] = hexdec(getBitValue($local_ip[$i],'1.0-1.7')); $lcl_ip[2] = hexdec(getBitValue($local_ip[$i],'2.0-2.7')); $lcl_ip[3] = hexdec(getBitValue($local_ip[$i],'3.0-3.7')); echo ""; } //========================================================== //输出Session timer //========================================================== echo ""; //========================================================== //输出Enquire link timer //========================================================== echo ""; //========================================================== //输出Inactivity timer //========================================================== echo ""; //========================================================== //输出Response timer //========================================================== echo ""; echo ""; $n--; $i++; echo ""; }//end while echo "
No.Link typeConnection typeSystem IDPasswordDCSService numberLocal GTTOpposite GTTLocal IPOpposite IP Session init timerEnquire link timerInactivity timerResponse timerDel
$ins_no[$i]UDPTCPClientServerBIND_TXBIND_RXBIND_TRX$system_id[$i] $password[$i] out=7bit,in=7bitout=8bit,in=7bitout=7bit,in=8bitout=8bit,in=8bit$opposite_num[$i] $remote_gtt[$i] $local_gtt[$i] --------$remote_ip[$i] "; for($k=0; $k<4; $k++) { echo $rmt_ip[$k]; if($k != 3) echo "."; } echo "$local_ip[$i] "; for($k=0; $k<4; $k++) { echo $lcl_ip[$k]; if($k != 3) echo "."; } echo "$session_timer[$i] $enquire_timer[$i] $inact_timer[$i] $response_timer[$i] 
"; echo "
"; ?>