代码拉取完成,页面将自动刷新
同步操作将从 物联星空科技有限公司/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($_GET['orderBy']) ? $orderBy = $_GET['orderBy'] : $orderBy = "radacctid";
isset($_GET['orderType']) ? $orderType = $_GET['orderType'] : $orderType = "asc";
isset($_GET['username']) ? $username = trim($_GET['username']) : $username = "%";
isset($_GET['billaction']) ? $billaction = trim($_GET['billaction']) : $billaction = "";
isset($_GET['sqlfields']) ? $sqlfields = $_GET['sqlfields'] : $sqlfields = "";
isset($_GET['startdate']) ? $startdate = $_GET['startdate'] : $startdate = "";
isset($_GET['enddate']) ? $enddate = $_GET['enddate'] : $enddate = "";
$username = str_replace('*', '%', $username);
//feed the sidebar variables
$billing_date_startdate = $startdate;
$billing_date_enddate = $enddate;
$billing_history_username = $username;
$billing_history_billaction = $billaction;
include_once('library/config_read.php');
$log = "visited page: ";
$logQuery = "performed query for all accounting records on page: ";
?>
<?php
include("menu-bill-history.php");
?>
<div id="contentnorightbar">
<h2 id="Intro"><a href="#" onclick="javascript:toggleShowDiv('helpPage')"><? echo $l['Intro']['billhistoryquery.php']?>
<h144>+</h144></a></h2>
<div id="helpPage" style="display:none;visibility:visible" >
<?php echo $l['helpPage']['billhistoryquery'] ?>
<br/>
</div>
<br/>
<?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
// let's sanitize the values passed to us:
$username = $dbSocket->escapeSimple($username);
$billaction = $dbSocket->escapeSimple($billaction);
$startdate = $dbSocket->escapeSimple($startdate);
$enddate = $dbSocket->escapeSimple($enddate);
// include_once('include/management/userBilling.php');
// userBillingPayPalSummary($startdate, $enddate, $payer_email, $payment_address_status, $payer_status, $payment_status, 1);
// draw the billing rates summary table
include 'library/opendb.php';
// since we need to span through pages, which we do using GET queries I can't rely on this page
// to be processed through POST but rather using GET only (with the current design anyway).
// For this reason, I need to build the GET query which I will later use in the page number's links
$getFields = "";
$counter = 0;
foreach ($sqlfields as $elements) {
$getFields .= "&sqlfields[$counter]=$elements";
$counter++;
}
// we should also sanitize the array that we will be passing to this page in the next query
$getFields = $dbSocket->escapeSimple($getFields);
$getQuery = "";
$getQuery .= "&username=$username";
$getQuery .= "&billAction=$billaction";
$getQuery .= "&startdate=$startdate&enddate=$enddate";
$select = implode(",", $sqlfields);
// sanitizing the array passed to us in the get request
$select = $dbSocket->escapeSimple($select);
$sql = "SELECT $select FROM ".$configValues['CONFIG_DB_TBL_DALOBILLINGHISTORY']." WHERE ".
" (username LIKE '$username') AND ".
" (billAction LIKE '$billaction') ";
$res = $dbSocket->query($sql);
$numrows = $res->numRows();
$sql = "SELECT $select FROM ".$configValues['CONFIG_DB_TBL_DALOBILLINGHISTORY']." WHERE ".
" (username LIKE '$username') AND ".
" (billAction LIKE '$billaction') ".
" 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);
/* END */
echo "<table border='0' class='table1'>\n";
echo "
<thead>
<tr>
<th colspan='25'>".$l['all']['Records']."</th>
</tr>
<tr>
<th colspan='25' align='left'>
<br/>
";
if ($configValues['CONFIG_IFACE_TABLES_LISTING_NUM'] == "yes")
setupNumbering($numrows, $rowsPerPage, $pageNum, $orderBy, $orderType, $getFields, $getQuery);
echo " </th></tr>
</thead>
";
// building the dybamic table list fields
echo "<thread> <tr>";
foreach ($sqlfields as $value) {
switch($value) {
case "id":
$title = $l['all']['ID'];
break;
case "username":
$title = $l['all']['Username'];
break;
case "planId":
$title = $l['all']['PlanId'];
break;
case "billAmount":
$title = $l['all']['BillAmount'];
break;
case "billAction":
$title = $l['all']['BillAction'];
break;
case "billPerformer":
$title = $l['all']['BillPerformer'];
break;
case "billReason":
$title = $l['all']['BillReason'];
break;
case "paymentmethod":
$title = $l['ContactInfo']['PaymentMethod'];
break;
case "cash":
$title = $l['ContactInfo']['Cash'];
break;
case "creditcardname":
$title = $l['ContactInfo']['CreditCardName'];
break;
case "creditcardnumber":
$title = $l['ContactInfo']['CreditCardNumber'];
break;
case "creditcardverification":
$title = $l['ContactInfo']['CreditCardVerificationNumber'];
break;
case "creditcardtype":
$title = $l['ContactInfo']['CreditCardType'];
break;
case "creditcardexp":
$title = $l['ContactInfo']['CreditCardExpiration'];
break;
case "coupon":
$title = $l['all']['Coupon'];
break;
case "discount":
$title = $l['all']['Discount'];
break;
case "notes":
$title = $l['ContactInfo']['Notes'];
break;
case "creationdate":
$title = $l['all']['CreationDate'];
break;
case "creationby":
$title = $l['all']['CreationBy'];
break;
case "updatedate":
$title = $l['all']['UpdateDate'];
break;
case "updateby":
$title = $l['all']['UpdateBy'];
break;
default:
$title = $value;
break;
}
echo "<th scope='col'> $title </th>";
} //foreach $sqlfields
echo "</tr> </thread>";
// inserting the values of each field from the database to the table
while($row = $res->fetchRow(DB_FETCHMODE_ASSOC)) {
echo "<tr>";
foreach ($sqlfields as $value) {
echo "<td> " . $row[$value] . "</td>";
}
echo "</tr>";
}
echo "
<tfoot>
<tr>
<th colspan='25' align='left'>
";
setupLinks($pageNum, $maxPage, $orderBy, $orderType, $getFields, $getQuery);
echo "
</th>
</tr>
</tfoot>
";
echo "</table>";
include 'library/closedb.php';
?>
<?php
include('include/config/logging.php');
?>
</div>
<div id="footer">
<?php
include 'page-footer.php';
?>
</div>
</div>
</div>
</body>
</html>
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。