<?php
/*********************************************************      
 程序说明:         
    功能说明:
    调用关系:     
              被调用:      
    变量说明:
    返回值:无
 作者:     
修改注释:      
NO.1      
姓名:            
时间:      
修改说明:      
*********************************************************/    
$selectedLanguage=$userInfo[language];
require("../../inc/header.inc");
?>
<body leftmargin="15" rightmargin="10" onload="javascript:adjust_frame('down');" onresize="javascript:adjust_frame('down');" style="overflow:hidden;overflow-x:hidden;overflow-y:hidden;">

<?php
adjust_head_frame("down");
adjust_title_head_frame("down");
adjust_title_tail_frame("down");

adjust_content_head_frame("down");	
echo "<br>";

$DEBUG = 0;
$sysInfoTable = 'OMC_PUB.sysInfo';
$sysInfoDefTable = 'OMC_PUB.sysInfoDef';
$pubDb			 ='OMC_PUB';
$listSql = "SELECT a.bssid,a.ip,b.Label as name,a.connected FROM BssOmcDb.OMCR_BSSTABLE as a, BssOmcDb.OMCR_BssFunc as b" .
           " WHERE a.ip!='' AND a.bssid=b.bssid ORDER BY bssid";
if($DEBUG) echo "<br>listSql = $listSql<br>";
$listResult = mysqli_query($pubConn,$listSql);
echo mysqli_error($pubConn);
?>


<script LANGUAGE="JavaScript">
function delFirm(sysNo)
{
	//alert(elementNo);
	if(confirm('Do you want to delete the selected?')!=true)
	{
		delcheckbox.checked=false;
	}
	else
	{
		window.location.href='<?php echo "./bssConf.php";?>'+"?sysNo="+sysNo+"&mode=delete";
	}
}
</script>
<form method="POST" name=confForm action="./bssConf.php" >
<table  border="1" width="100%" cellpadding="2" cellspacing="0"  bordercolor="#666666" bordercolordark="#FFFFFF" bgcolor="#FFFFFF" > 
<?php
if ($selectedLanguage == 'eng'){
	echo "<tr bgcolor=\"#E6E6E6\">";
	echo "<td>Name</td>";
	echo "<td>Alias</td>";
	echo "<td>IP</td>";
	echo "<td>Connect Status</td>";
	echo "<td>Delete</td>";
	echo "</tr>";
}elseif($selectedLanguage == 'chn'){
	echo "<tr bgcolor=\"#E6E6E6\">";
	echo "<td>名称</td>";
	echo "<td>别名</td>";
	echo "<td>IP</td>";
	echo "<td>连接状态</td>";
	echo "<td>删除</td>";
	echo "</tr>";
}
while($listRows=@mysqli_fetch_array($listResult)){
	$bssid=$listRows[bssid];
	$sysName="BSS".$listRows[bssid];
	echo "<tr>";
	echo "<td><a href=\"./modifyBssParam.php?bssid=$listRows[bssid]\">$sysName</a></td>";
	if(strlen($listRows[name]) > 0 ){
		echo "<td>$listRows[name]</td>";
	}else{
		echo "<td> -- </td>";
	}
	
	echo "<td>$listRows[ip]&nbsp;</td>";

	if($listRows[connected]==255){
		echo "<td>Connected</td>";
	}else if($listRows[connected]==0){
		echo "<td>Broken</td>";
	}else{
		echo "<td>BSC is booting up or cannot be connected</td>";
	}
	
	echo "<td align=\"right\"><input type=\"checkbox\" name=\"delete\" value=\"ON\" onClick=\"javascript:delFirm($bssid)\"></td>";

	echo "</tr>";
}
echo "</table>";
echo "&nbsp;&nbsp;&nbsp;&nbsp;";
echo "</FORM>";

adjust_content_tail("down");
?>
