代码拉取完成,页面将自动刷新
同步操作将从 物联星空科技有限公司/daloradius汉化版 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
<?php
/*
*********************************************************************************************************
* daloRADIUS - RADIUS Web Platform
* Copyright (C) 2007 - Liran Tal <[email protected]> All Rights Reserved.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
*********************************************************************************************************
*
* Authors: Liran Tal <[email protected]>
*
*********************************************************************************************************
*/
include ("library/checklogin.php");
$operator = $_SESSION['operator_user'];
//include('library/check_operator_perm.php');
//setting values for the order by and order type variables
isset($_REQUEST['orderBy']) ? $orderBy = $_REQUEST['orderBy'] : $orderBy = "time";
isset($_REQUEST['orderType']) ? $orderType = $_REQUEST['orderType'] : $orderType = "desc";
include_once('library/config_read.php');
$log = "visited page: ";
$logQuery = "performed query on page: ";
$logDebugSQL = "";
$softDelay = $configValues['CONFIG_DASHBOARD_DALO_DELAYSOFT'];
$hardDelay = $configValues['CONFIG_DASHBOARD_DALO_DELAYHARD'];
?>
<?php
include ("menu-reports-hb.php");
?>
<div id="contentnorightbar">
<h2 id="Intro"><a href="#" onclick="javascript:toggleShowDiv('helpPage')"><? echo $l['Intro']['rephbdashboard.php']; ?>
<h144>+</h144></a></h2>
<div id="helpPage" style="display:none;visibility:visible" >
<?php echo $l['helpPage']['rephbdashboard'] ?>
<br/>
</div>
<?php
include 'include/management/pages_common.php';
include 'library/opendb.php';
include 'include/management/pages_numbering.php'; // must be included after opendb because it needs to read the CONFIG_IFACE_TABLES_LISTING variable from the config file
//orig: used as maethod to get total rows - this is required for the pages_numbering.php page
$sql = "SELECT ".
$configValues['CONFIG_DB_TBL_DALOHOTSPOTS'].".name as hotspotname,".
$configValues['CONFIG_DB_TBL_DALONODE'].".wan_iface,".
$configValues['CONFIG_DB_TBL_DALONODE'].".wan_ip,".
$configValues['CONFIG_DB_TBL_DALONODE'].".wan_mac,".
$configValues['CONFIG_DB_TBL_DALONODE'].".wan_gateway,".
$configValues['CONFIG_DB_TBL_DALONODE'].".wifi_iface,".
$configValues['CONFIG_DB_TBL_DALONODE'].".wifi_ip,".
$configValues['CONFIG_DB_TBL_DALONODE'].".wifi_mac,".
$configValues['CONFIG_DB_TBL_DALONODE'].".wifi_ssid,".
$configValues['CONFIG_DB_TBL_DALONODE'].".wifi_key,".
$configValues['CONFIG_DB_TBL_DALONODE'].".wifi_channel,".
$configValues['CONFIG_DB_TBL_DALONODE'].".lan_iface,".
$configValues['CONFIG_DB_TBL_DALONODE'].".lan_mac,".
$configValues['CONFIG_DB_TBL_DALONODE'].".lan_ip,".
$configValues['CONFIG_DB_TBL_DALONODE'].".uptime,".
$configValues['CONFIG_DB_TBL_DALONODE'].".memfree,".
$configValues['CONFIG_DB_TBL_DALONODE'].".cpu,".
$configValues['CONFIG_DB_TBL_DALONODE'].".wan_bup,".
$configValues['CONFIG_DB_TBL_DALONODE'].".wan_bdown,".
$configValues['CONFIG_DB_TBL_DALONODE'].".firmware,".
$configValues['CONFIG_DB_TBL_DALONODE'].".firmware_revision,".
$configValues['CONFIG_DB_TBL_DALONODE'].".mac,".
$configValues['CONFIG_DB_TBL_DALONODE'].".time ".
" FROM ".$configValues['CONFIG_DB_TBL_DALONODE'].
" LEFT JOIN ".$configValues['CONFIG_DB_TBL_DALOHOTSPOTS'].
" ON ".
"(".$configValues['CONFIG_DB_TBL_DALOHOTSPOTS'].".mac = ".
$configValues['CONFIG_DB_TBL_DALONODE'].".mac) ";
$res = $dbSocket->query($sql);
$numrows = $res->numRows();
$logDebugSQL .= $sql . "\n";
$sql = "SELECT ".
$configValues['CONFIG_DB_TBL_DALOHOTSPOTS'].".name as hotspotname,".
$configValues['CONFIG_DB_TBL_DALONODE'].".wan_iface,".
$configValues['CONFIG_DB_TBL_DALONODE'].".wan_ip,".
$configValues['CONFIG_DB_TBL_DALONODE'].".wan_mac,".
$configValues['CONFIG_DB_TBL_DALONODE'].".wan_gateway,".
$configValues['CONFIG_DB_TBL_DALONODE'].".wifi_iface,".
$configValues['CONFIG_DB_TBL_DALONODE'].".wifi_ip,".
$configValues['CONFIG_DB_TBL_DALONODE'].".wifi_mac,".
$configValues['CONFIG_DB_TBL_DALONODE'].".wifi_ssid,".
$configValues['CONFIG_DB_TBL_DALONODE'].".wifi_key,".
$configValues['CONFIG_DB_TBL_DALONODE'].".wifi_channel,".
$configValues['CONFIG_DB_TBL_DALONODE'].".lan_iface,".
$configValues['CONFIG_DB_TBL_DALONODE'].".lan_mac,".
$configValues['CONFIG_DB_TBL_DALONODE'].".lan_ip,".
$configValues['CONFIG_DB_TBL_DALONODE'].".uptime,".
$configValues['CONFIG_DB_TBL_DALONODE'].".memfree,".
$configValues['CONFIG_DB_TBL_DALONODE'].".wan_bup,".
$configValues['CONFIG_DB_TBL_DALONODE'].".wan_bdown,".
$configValues['CONFIG_DB_TBL_DALONODE'].".firmware,".
$configValues['CONFIG_DB_TBL_DALONODE'].".firmware_revision,".
$configValues['CONFIG_DB_TBL_DALONODE'].".mac,".
$configValues['CONFIG_DB_TBL_DALONODE'].".time, ".
$configValues['CONFIG_DB_TBL_DALONODE'].".cpu ".
" FROM ".$configValues['CONFIG_DB_TBL_DALONODE'].
" LEFT JOIN ".$configValues['CONFIG_DB_TBL_DALOHOTSPOTS'].
" ON ".
"(".$configValues['CONFIG_DB_TBL_DALOHOTSPOTS'].".mac = ".
$configValues['CONFIG_DB_TBL_DALONODE'].".mac) ".
//" ORDER BY $orderBy $orderType LIMIT $offset, $rowsPerPage;";
" LIMIT $offset, $rowsPerPage;";
$res = $dbSocket->query($sql);
$logDebugSQL .= $sql . "\n";
/* START - Related to pages_numbering.php */
$maxPage = ceil($numrows/$rowsPerPage);
/* END */
echo "<form name='listallusers' method='get' action='mng-del.php' >";
echo "<table border='0' class='table1'>\n";
echo "
<thead>
<tr>
<th colspan='11' align='left'>
<br/><br/>
";
/* drawing the number links */
if ($configValues['CONFIG_IFACE_TABLES_LISTING_NUM'] == "yes")
setupNumbering($numrows, $rowsPerPage, $pageNum, $orderBy, $orderType);
echo "
</th>
</tr>
</thead>
";
$curOrderType = $orderType;
if ($orderType == "asc") {
$orderType = "desc";
} else if ($orderType == "desc") {
$orderType = "asc";
}
echo "<thread> <tr>
<th scope='col'>
<a title='Sort' class='novisit' href=\"" . $_SERVER['PHP_SELF'] . "?orderBy=id&orderType=$orderType\">
".$l['all']['HotSpot']."</a>
</th>
<th scope='col'>
".$l['all']['Firmware']."
</th>
<th scope='col'>
".$l['all']['WanIface']."
</th>
<th scope='col'>
".$l['all']['LanIface']."
</th>
<th scope='col'>
".$l['all']['WifiIface']."
</th>
<th scope='col'>
".$l['all']['Uptime']."
</th>
<th scope='col'>
".$l['all']['CPU']."
</th>
<th scope='col'>
".$l['all']['Memfree']."
</th>
<th scope='col'>
".$l['all']['BandwidthUp']."
</th>
<th scope='col'>
".$l['all']['BandwidthDown']."
</th>
<th scope='col'>
".$l['all']['CheckinTime']."
</th>
</tr> </thread>";
while($row = $res->fetchRow(DB_FETCHMODE_ASSOC)) {
//$js = "javascript:ajaxGeneric('include/management/retUserInfo.php','retBandwidthInfo','divContainerUserInfo','username=".$row[0]."');";
$content = '<a class="toolTip" href="mng-hs-edit.php?name='.$row['hotspotname'].'">'.$l['Tooltip']['HotspotEdit'].'</a>';
$content .= '<br/><br/><b>'.$l['all']['NASMAC'].':</b> '.$row['mac'];
$str = addToolTipBalloon(array(
'content' => $content,
'onClick' => '',
'value' => '<b>'.$row['hotspotname'].'</b>',
'divId' => '',
));
echo "
<tr>
<td>
$str
</td>
<td>".
$row['firmware']."
<br/>".
$row['firmware_revision']."
</td>
";
$content = '<b>'.$l['all']['WanIface'].":</b> ".$row['wan_iface'].
"<br/>".
'<b>'.$l['all']['WanMAC'].":</b> ".$row['wan_mac'].
"<br/>".
'<b>'.$l['all']['WanIP'].":</b> ".$row['wan_ip'].
"<br/>".
'<b>'.$l['all']['WanGateway'].":</b> ".$row['wan_ip'];
$value = '<b>'.$l['all']['WanIP'].":</b> ".$row['wan_ip'];
$str = addToolTipBalloon(array(
'content' => $content,
'onClick' => '',
'value' => $value,
'divId' => '',
));
echo "<td> $str </td>";
$content = $l['all']['LanIface'].":</b> ".$row['lan_iface'].
"<br/><b>".
$l['all']['LanMAC'].":</b> ".$row['lan_mac'].
"<br/><b>".
$l['all']['LanIP'].":</b> ".$row['lan_ip'];
$value = '<b>'.$l['all']['LanIP'].":</b> ".$row['lan_ip'];
$str = addToolTipBalloon(array(
'content' => $content,
'onClick' => '',
'value' => $value,
'divId' => '',
));
echo "<td> $str </td>";
$content = $l['all']['WifiIface'].":</b> ".$row['wifi_iface'].
"<br/><b>".
$l['all']['WifiMAC'].":</b> ".$row['wifi_mac'].
"<br/><b>".
$l['all']['WifiIP'].":</b> ".$row['wifi_ip'].
"<br/><b>".
$l['all']['WifiSSID'].":</b> ".$row['wifi_ssid'].
"<br/><b>".
$l['all']['WifiKey'].":</b> ".$row['wifi_key'].
"<br/><b>".
$l['all']['WifiChannel'].":</b> ".$row['wifi_channel'];
$value = '<b>'.$l['all']['WifiSSID'].":</b> ".$row['wifi_ssid'].
"<br/><b>".
$l['all']['WifiKey'].":</b> ".$row['wifi_key'];
$str = addToolTipBalloon(array(
'content' => $content,
'onClick' => '',
'value' => $value,
'divId' => '',
));
echo "<td> $str </td>";
// calculate time delay
$currTime = time();
$checkinTime = strtotime($row['time']);
if ($currTime - $checkinTime >= (60*$hardDelay)) {
// this is hard delay
$delayColor = 'red';
} elseif (
($currTime - $checkinTime >= (60*$softDelay))
&& ($currTime - $checkinTime < (60*$hardDelay))
)
{
// this is soft delay
$delayColor = 'orange';
} else {
// this is no delay at all, meaning not above 5 minutes delay
$delayColor = 'green';
}
echo "
<td>".
time2str($row['uptime'])."
</td>
<td>".
$row['cpu']."
</td>
<td>".
$row['memfree']."
</td>
<td>".
toxbyte($row['wan_bup'])."
</td>
<td>".
toxbyte($row['wan_bdown'])."
</td>
<td> <font color='$delayColor'> ".
$row['time']."
</font>
</td>
</tr>
";
}
echo "
<tfoot>
<tr>
<th colspan='11' align='left'>
";
setupLinks($pageNum, $maxPage, $orderBy, $curOrderType);
echo " </th>
</tr>
</tfoot>
";
echo "</table>";
echo "</form>";
include 'library/closedb.php';
?>
<?php
include('include/config/logging.php');
?>
</div>
<div id="footer">
<?php
include 'page-footer.php';
?>
</div>
</div>
</div>
<script type="text/javascript">
var tooltipObj = new DHTMLgoodies_formTooltip();
tooltipObj.setTooltipPosition('right');
tooltipObj.setPageBgColor('#EEEEEE');
tooltipObj.setTooltipCornerSize(15);
tooltipObj.initFormFieldTooltip();
</script>
</body>
</html>
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。