Example #1
0
<?php 
include 'library/opendb.php';
include 'include/management/pages_common.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
// we can only use the $dbSocket after we have included 'library/opendb.php' which initialzes the connection and the $dbSocket object
$username = $dbSocket->escapeSimple($username);
$startdate = $dbSocket->escapeSimple($startdate);
$enddate = $dbSocket->escapeSimple($enddate);
// setup php session variables for exporting
$_SESSION['reportTable'] = $configValues['CONFIG_DB_TBL_RADACCT'];
$_SESSION['reportQuery'] = " WHERE AcctStartTime>'{$startdate}' AND AcctStartTime<'{$enddate}' AND UserName LIKE '{$username}'";
$_SESSION['reportType'] = "accountingGeneric";
include 'library/closedb.php';
include_once 'include/management/userReports.php';
userPlanInformation($username, 1);
userSubscriptionAnalysis($username, 1);
// userSubscriptionAnalysis with argument set to 1 for drawing the table
userConnectionStatus($username, 1);
// userConnectionStatus (same as above)
include 'library/opendb.php';
//orig: used as maethod to get total rows - this is required for the pages_numbering.php page
$sql = "SELECT " . $configValues['CONFIG_DB_TBL_RADACCT'] . ".RadAcctId, " . $configValues['CONFIG_DB_TBL_DALOHOTSPOTS'] . ".name as hotspot, " . $configValues['CONFIG_DB_TBL_RADACCT'] . ".UserName, " . $configValues['CONFIG_DB_TBL_RADACCT'] . ".FramedIPAddress, " . $configValues['CONFIG_DB_TBL_RADACCT'] . ".AcctStartTime, " . $configValues['CONFIG_DB_TBL_RADACCT'] . ".AcctStopTime, " . $configValues['CONFIG_DB_TBL_RADACCT'] . ".AcctSessionTime, " . $configValues['CONFIG_DB_TBL_RADACCT'] . ".AcctInputOctets, " . $configValues['CONFIG_DB_TBL_RADACCT'] . ".AcctOutputOctets, " . $configValues['CONFIG_DB_TBL_RADACCT'] . ".AcctTerminateCause, " . $configValues['CONFIG_DB_TBL_RADACCT'] . ".NASIPAddress FROM " . $configValues['CONFIG_DB_TBL_RADACCT'] . " LEFT JOIN " . $configValues['CONFIG_DB_TBL_DALOHOTSPOTS'] . " ON " . $configValues['CONFIG_DB_TBL_RADACCT'] . ".calledstationid = " . $configValues['CONFIG_DB_TBL_DALOHOTSPOTS'] . ".mac WHERE AcctStartTime>'{$startdate}' and AcctStartTime<'{$enddate}' and UserName like '{$username}';";
$res = $dbSocket->query($sql);
$numrows = $res->numRows();
$sql = "SELECT " . $configValues['CONFIG_DB_TBL_RADACCT'] . ".RadAcctId, " . $configValues['CONFIG_DB_TBL_DALOHOTSPOTS'] . ".name as hotspot, " . $configValues['CONFIG_DB_TBL_RADACCT'] . ".UserName, " . $configValues['CONFIG_DB_TBL_RADACCT'] . ".FramedIPAddress, " . $configValues['CONFIG_DB_TBL_RADACCT'] . ".AcctStartTime, " . $configValues['CONFIG_DB_TBL_RADACCT'] . ".AcctStopTime, " . $configValues['CONFIG_DB_TBL_RADACCT'] . ".AcctSessionTime, " . $configValues['CONFIG_DB_TBL_RADACCT'] . ".AcctInputOctets, " . $configValues['CONFIG_DB_TBL_RADACCT'] . ".AcctOutputOctets, " . $configValues['CONFIG_DB_TBL_RADACCT'] . ".AcctTerminateCause, " . $configValues['CONFIG_DB_TBL_RADACCT'] . ".NASIPAddress FROM " . $configValues['CONFIG_DB_TBL_RADACCT'] . " LEFT JOIN " . $configValues['CONFIG_DB_TBL_DALOHOTSPOTS'] . " ON " . $configValues['CONFIG_DB_TBL_RADACCT'] . ".calledstationid = " . $configValues['CONFIG_DB_TBL_DALOHOTSPOTS'] . ".mac WHERE AcctStartTime>'{$startdate}' and AcctStartTime<'{$enddate}' and UserName like '{$username}' ORDER BY {$orderBy} {$orderType} LIMIT {$offset}, {$rowsPerPage};";
$res = $dbSocket->query($sql);
$logDebugSQL = "";
$logDebugSQL .= $sql . "\n";
/* START - Related to pages_numbering.php */
$maxPage = ceil($numrows / $rowsPerPage);
Example #2
0
include_once 'library/config_read.php';
$log = "visited page: ";
include 'include/config/logging.php';
?>

<script src="library/javascript/pages_common.js" type="text/javascript"></script>

	<div id="contentnorightbar">

		<h2 id="Intro"><a href="#"></a></h2>
		<p>

<?php 
include 'library/exten-welcome_page.php';
include_once 'include/management/userReports.php';
userPlanInformation($login, 1);
userSubscriptionAnalysis($login, 1);
// userSubscriptionAnalysis with argument set to 1 for drawing the table
userConnectionStatus($login, 1);
// userConnectionStatus (same as above)
?>
		</p>
	</div>


	
		<div id="footer">

<?php 
include 'page-footer.php';
?>