コード例 #1
0
 function actionTraffic()
 {
     $sql = "SELECT SUM( acctinputoctets + acctoutputoctets ) as total FROM radacct WHERE UserName =  '******'";
     $traffic_total = QDB::getConn()->getOne($sql);
     $this->_view['traffic_total'] = $traffic_total;
     $page = (int) $this->_context->get('page', 1);
     $orm = Radacct::find('username =?', $this->_user_name)->order('radacctid desc');
     $orm->limitPage($page, 12);
     $this->_view['rs'] = $orm->getAll();
     $this->_view['pg'] = $orm->getPag();
 }
コード例 #2
0
 function actionOnline()
 {
     $rs = Radacct::find()->where('acctstoptime IS NULL')->getAll();
     $this->_view['rs'] = $rs;
 }
コード例 #3
0
ファイル: index.php プロジェクト: buziyborni/cnode-cc
<?php

require '../include/init.inc';
$uid = auth('uid');
$user = User::find_by_pk($uid, array());
$expire_in = $user->expire_in;
$u = Radacct::find_by_sql("select sum(acctinputoctets) as i,sum(acctoutputoctets) as o from `radacct` r where r.username='******'");
?>
<!DOCTYPE html>
<html>
<head>
<title><?php 
t('我的账号', 'My account');
?>
</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="../css/bootstrap.min.css" rel="stylesheet" media="screen">
<style type="text/css"></style>
<body>
	<?php 
include 'top_nav.inc';
?>
	<div class="container" style="margin-top: 50px;">
		<h4><?php 
t('欢迎您', 'Welcome, ');
echo auth('nickname');
?>
</h4>
		<div class="row">
			<?php 
コード例 #4
0
ファイル: radaccts.php プロジェクト: buziyborni/cnode-cc
<?php

require '../include/init.inc';
require '../include/util.inc';
$uid = auth('uid');
$radacct = Radacct::all(array('order' => 'radacctid desc'));
?>
<!DOCTYPE html>
<html>
<head>
<title>我的账号</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="../css/bootstrap.min.css" rel="stylesheet" media="screen">

<body>
	<?php 
include 'top_nav.inc';
?>
	<div class="container" style="margin-top: 50px;">
		<h4>欢迎您 <?php 
echo auth('nickname');
?>
</h4>
		<div class="row">
			<?php 
include 'left_nav.inc';
?>
			<div class="span8">
				<h3>计费清单</h3>
				<table class="table table-striped">