本文整理汇总了PHP中printqn函数的典型用法代码示例。如果您正苦于以下问题:PHP printqn函数的具体用法?PHP printqn怎么用?PHP printqn使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了printqn函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: setupNumbering
echo "<table border='0' class='table1'>\n";
echo "\n\t\t\t\t\t<thead>\n <tr>\n <th colspan='10' align='left'>\n Select:\n <a class=\"table\" href=\"javascript:SetChecked(1,'ratename[]','listallrates')\">All</a> \n \n <a class=\"table\" href=\"javascript:SetChecked(0,'ratename[]','listallrates')\">None</a>\n\t <br/>\n <input class='button' type='button' value='Delete' onClick='javascript:removeCheckbox(\"listallrates\",\"bill-rates-del.php\")' />\n <br/><br/>\n\n ";
if ($configValues['CONFIG_IFACE_TABLES_LISTING_NUM'] == "yes") {
setupNumbering($numrows, $rowsPerPage, $pageNum, $orderBy, $orderType);
}
echo " </th></tr>\n </thead>\n\n ";
if ($orderType == "asc") {
$orderTypeNextPage = "desc";
} else {
if ($orderType == "desc") {
$orderTypeNextPage = "asc";
}
}
echo "<thread> <tr>\n\t\t<th scope='col'>\n\t\t<a title='Sort' class='novisit' href=\"" . $_SERVER['PHP_SELF'] . "?orderBy=id&orderType={$orderTypeNextPage}\">\n\t\t" . $l['all']['ID'] . "</a>\n\t\t</th>\n\n\t\t<th scope='col'> \n\t\t<a title='Sort' class='novisit' href=\"" . $_SERVER['PHP_SELF'] . "?orderBy=ratename&orderType={$orderTypeNextPage}\">\n\t\t" . $l['all']['RateName'] . "</a>\n\t\t</th>\n\n\t\t<th scope='col'> \n\t\t<a title='Sort' class='novisit' href=\"" . $_SERVER['PHP_SELF'] . "?orderBy=ratetype&orderType={$orderTypeNextPage}\">\n\t\t" . $l['all']['RateType'] . "</a>\n\t\t</th>\n\n\t\t<th scope='col'>\n\t\t<a title='Sort' class='novisit' href=\"" . $_SERVER['PHP_SELF'] . "?orderBy=ratecost&orderType={$orderTypeNextPage}\">\n\t\t" . $l['all']['RateCost'] . "</a>\n\t\t</th>\n\n\t</tr> </thread>";
while ($row = $res->fetchRow()) {
printqn("<tr>\n <td> <input type='checkbox' name='ratename[]' value='{$row['1']}'> {$row['0']} </td>\n\n <td> <a class='tablenovisit' href='javascript:return;'\n onclick=\"javascript:__displayTooltip();\"\n tooltipText=\"\n <a class='toolTip' href='bill-rates-edit.php?ratename={$row['1']}'>" . $l['Tooltip']['EditRate'] . "</a>\n\t\t\t\t\t<br/>\n <a class='toolTip' href='bill-rates-del.php?ratename={$row['1']}'>" . $l['Tooltip']['RemoveRate'] . "</a>\n <br/><br/>\"\n >{$row['1']}</a>\n </td>\n <td> {$row['2']} </td>\n <td> {$row['3']} </td>\n\t\t</tr>");
}
echo "\n <tfoot>\n <tr>\n <th colspan='10' align='left'>\n ";
setupLinks($pageNum, $maxPage, $orderBy, $orderType);
echo "\n </th>\n </tr>\n </tfoot>\n ";
echo "</table>";
echo "</form>";
include 'library/closedb.php';
?>
<?php
include 'include/config/logging.php';
?>
</div>
示例2: setupNumbering
echo "<table border='0' class='table1'>\n";
echo "\n\t\t\t\t\t<thead>\n <tr>\n <th colspan='10' align='left'>\n Select:\n <a class=\"table\" href=\"javascript:SetChecked(1,'planName[]','listbillplans')\">All</a> \n \n <a class=\"table\" href=\"javascript:SetChecked(0,'planName[]','listbillplans')\">None</a>\n\t <br/>\n <input class='button' type='button' value='Delete' onClick='javascript:removeCheckbox(\"listbillplans\",\"bill-plans-del.php\")' />\n <br/><br/>\n\n ";
if ($configValues['CONFIG_IFACE_TABLES_LISTING_NUM'] == "yes") {
setupNumbering($numrows, $rowsPerPage, $pageNum, $orderBy, $orderType);
}
echo " </th></tr>\n </thead>\n\n ";
if ($orderType == "asc") {
$orderTypeNextPage = "desc";
} else {
if ($orderType == "desc") {
$orderTypeNextPage = "asc";
}
}
echo "<thread> <tr>\n\t\t<th scope='col'>\n\t\t<a title='Sort' class='novisit' href=\"" . $_SERVER['PHP_SELF'] . "?orderBy=planid&orderType={$orderTypeNextPage}\">\n\t\t" . $l['all']['PlanId'] . "</a>\n\t\t</th>\n\n\t\t<th scope='col'> \n\t\t<a title='Sort' class='novisit' href=\"" . $_SERVER['PHP_SELF'] . "?orderBy=planname&orderType={$orderTypeNextPage}\">\n\t\t" . $l['all']['PlanName'] . "</a>\n\t\t</th>\n\n\t\t<th scope='col'> \n\t\t<a title='Sort' class='novisit' href=\"" . $_SERVER['PHP_SELF'] . "?orderBy=plantype&orderType={$orderTypeNextPage}\">\n\t\t" . $l['all']['PlanType'] . "</a>\n\t\t</th>\n\t</tr> </thread>";
while ($row = $res->fetchRow()) {
printqn("<tr>\n <td> <input type='checkbox' name='planName[]' value='{$row['1']}'> {$row['0']} </td>\n\n <td> <a class='tablenovisit' href='javascript:return;'\n onClick='javascript:__displayTooltip();'\n tooltipText='\n <a class=\"toolTip\" href=\"bill-plans-edit.php?planName={$row['1']}\">\n {$l['button']['EditPlan']}</a>\n <br/><br/>'\n >{$row['1']}</a>\n </td>\n\n\t\t\t\t<td> {$row['2']} </td>\n\t\t</tr>");
}
echo "\n <tfoot>\n <tr>\n <th colspan='10' align='left'>\n ";
setupLinks($pageNum, $maxPage, $orderBy, $orderType);
echo "\n </th>\n </tr>\n </tfoot>\n ";
echo "</table>";
echo "</form>";
include 'library/closedb.php';
?>
<?php
include 'include/config/logging.php';
?>
</div>
示例3: setupNumbering
/* drawing the number links */
if ($configValues['CONFIG_IFACE_TABLES_LISTING_NUM'] == "yes") {
setupNumbering($numrows, $rowsPerPage, $pageNum, $orderBy, $orderType);
}
echo "\n\t\t\t</th>\n\t\t\t</tr>\n\t\t\t</thead>\n\t\t\t";
$curOrderType = $orderType;
if ($orderType == "asc") {
$orderType = "desc";
} else {
if ($orderType == "desc") {
$orderType = "asc";
}
}
echo "<thread> <tr>\n\t\t<th scope='col'> \n\t\t<a title='Sort' class='novisit' href=\"" . $_SERVER['PHP_SELF'] . "?orderBy=id&orderType={$orderType}\">\n\t\t" . $l['all']['ID'] . "</a>\n\t\t</th>\n\n\t\t<th scope='col'> \n\t\t" . $l['all']['Name'] . "</a>\n\t\t</th>\n\t\t\n\t\t<th scope='col'> \n\t\t<a title='Sort' class='novisit' href=\"" . $_SERVER['PHP_SELF'] . "?orderBy=Username&orderType={$orderType}\">\n\t\t" . $l['all']['Username'] . "</a>\n\t\t</th>\n\n\t\t<th scope='col'> \n\t\t<a title='Sort' class='novisit' href=\"" . $_SERVER['PHP_SELF'] . "?orderBy=Value&orderType={$orderType}\">\n\t\t" . $l['all']['Password'] . "</a>\n\t\t</th>\n\n\t\t<th scope='col'> \n\t\t<a title='Sort' class='novisit' href=\"" . $_SERVER['PHP_SELF'] . "?orderBy=Groupname&orderType={$orderType}\">\n\t\t" . $l['title']['Groups'] . "</a>\n\t\t</th>\n\t\t</tr> </thread>";
while ($row = $res->fetchRow()) {
printqn("\n\t\t\t<td> <input type='checkbox' name='username[]' value='{$row['0']}'>{$row['2']}</td>\n\t\t\t<td>{$row['5']} {$row['6']}</td>\n\t\t\t<td> \n\t\t");
if ($row[1] == "Reject" && $row[4] == "Auth-Type") {
echo "<img title='user is disabled' src='images/icons/userStatusDisabled.gif' alt='[disabled]'>";
} else {
echo "<img title='user is enabled' src='images/icons/userStatusActive.gif' alt='[enabled]'>";
}
$js = "javascript:ajaxGeneric('include/management/retUserInfo.php','retBandwidthInfo','divContainerUserInfo','username=" . $row[0] . "');";
$content = '<a class="toolTip" href="mng-edit.php?username=' . $row[0] . '">' . $l['Tooltip']['UserEdit'] . '</a>';
$str = addToolTipBalloon(array('content' => $content, 'onClick' => $js, 'value' => $row[0], 'divId' => 'divContainerUserInfo'));
echo "{$str} </td>";
if ($configValues['CONFIG_IFACE_PASSWORD_HIDDEN'] == "yes") {
echo "<td>************</td>";
} else {
echo "<td>{$row['1']}</td>";
}
echo "\n\t\t\t<td>{$row['3']}</td>\n\t\t</tr>";
示例4: SUM
<?php
include '../../library/checklogin.php';
include_once 'pages_common.php';
if (isset($_GET['retBandwidthInfo'])) {
$divContainer = $_GET['divContainer'];
// get target div id
$username = $_GET['username'];
include '../../library/opendb.php';
$sql = "SELECT SUM(AcctInputOctets) AS Upload, SUM(AcctOutputOctets) AS Download FROM " . $configValues['CONFIG_DB_TBL_RADACCT'] . " WHERE UserName='" . $dbSocket->escapeSimple($username) . "'";
$res = $dbSocket->query($sql);
$row = $res->fetchRow(DB_FETCHMODE_ASSOC);
$upload = toxbyte($row['Upload']);
$download = toxbyte($row['Download']);
if ($upload <= 0) {
$upload = 0;
}
if ($download <= 0) {
$download = 0;
}
printqn("\n\t\tvar divContainer = document.getElementById('{$divContainer}');\n\t\tdivContainer.innerHTML = '<span style=\"font-weight:normal;\">Upload:</span> {$upload} <br/>" . "<span style=\"font-weight:normal;\">Download: </span> {$download}';\n\t");
}
示例5: userRefillSessionTraffic
function userRefillSessionTraffic($username, $divContainer)
{
include 'pages_common.php';
include '../../library/checklogin.php';
include '../../library/opendb.php';
if (!is_array($username)) {
$username = array($username);
}
$allUsers = "";
foreach ($username as $variable => $value) {
$user = $dbSocket->escapeSimple($value);
// clean username argument from harmful code
$allUsers .= $user . ", ";
$sql = "UPDATE " . $configValues['CONFIG_DB_TBL_RADACCT'] . " SET AcctInputOctets=0, AcctOutputOctets=0 " . " WHERE Username='{$user}'";
$res = $dbSocket->query($sql);
}
// take care of recording the billing action in billing_history table
foreach ($username as $variable => $value) {
$user = $dbSocket->escapeSimple($value);
// clean username argument from harmful code
$sql = "SELECT " . $configValues['CONFIG_DB_TBL_DALOUSERBILLINFO'] . ".id, " . $configValues['CONFIG_DB_TBL_DALOUSERBILLINFO'] . ".username, " . $configValues['CONFIG_DB_TBL_DALOUSERBILLINFO'] . ".planName, " . $configValues['CONFIG_DB_TBL_DALOBILLINGPLANS'] . ".id as PlanID, " . $configValues['CONFIG_DB_TBL_DALOBILLINGPLANS'] . ".planTax, " . $configValues['CONFIG_DB_TBL_DALOBILLINGPLANS'] . ".planTrafficRefillCost, " . $configValues['CONFIG_DB_TBL_DALOUSERBILLINFO'] . ".paymentmethod, " . $configValues['CONFIG_DB_TBL_DALOUSERBILLINFO'] . ".cash, " . $configValues['CONFIG_DB_TBL_DALOUSERBILLINFO'] . ".creditcardname, " . $configValues['CONFIG_DB_TBL_DALOUSERBILLINFO'] . ".creditcardnumber, " . $configValues['CONFIG_DB_TBL_DALOUSERBILLINFO'] . ".creditcardverification, " . $configValues['CONFIG_DB_TBL_DALOUSERBILLINFO'] . ".creditcardtype, " . $configValues['CONFIG_DB_TBL_DALOUSERBILLINFO'] . ".creditcardexp " . " FROM " . $configValues['CONFIG_DB_TBL_DALOUSERBILLINFO'] . ", " . $configValues['CONFIG_DB_TBL_DALOBILLINGPLANS'] . " " . " WHERE " . "(" . $configValues['CONFIG_DB_TBL_DALOUSERBILLINFO'] . ".planname=" . $configValues['CONFIG_DB_TBL_DALOBILLINGPLANS'] . ".planname)" . " AND " . "(" . $configValues['CONFIG_DB_TBL_DALOUSERBILLINFO'] . ".username='" . $user . "')";
$res = $dbSocket->query($sql);
$row = $res->fetchRow(DB_FETCHMODE_ASSOC);
$refillCost = $row['planTrafficRefillCost'];
$currDate = date('Y-m-d H:i:s');
$currBy = $_SESSION['operator_user'];
$sql = "INSERT INTO " . $configValues['CONFIG_DB_TBL_DALOBILLINGHISTORY'] . " (id,username,planName,billAmount,billAction,billPerformer,billReason," . " paymentmethod,cash,creditcardname,creditcardnumber,creditcardverification,creditcardtype,creditcardexp," . " creationdate,creationby" . ")" . " VALUES " . " (0,'{$user}','" . $row['planName'] . "','" . $row['planTrafficRefillCost'] . "','Refill Session Traffic','daloRADIUS Web Interface','Refill Session Traffic','" . $row['paymentmethod'] . "','" . $row['cash'] . "','" . $row['creditcardname'] . "','" . $row['creditcardnumber'] . "','" . $row['creditcardverification'] . "','" . $row['creditcardtype'] . "','" . $row['creditcardexp'] . "'," . "'{$currDate}', '{$currBy}'" . ")";
$res = $dbSocket->query($sql);
// if the refill cost is anything beyond the amount 0, we create an invoice for it.
if ($refillCost > 0) {
// if the user id indeed set in the userbillinfo table
if ($row['id']) {
include_once "userBilling.php";
$invoiceInfo['notes'] = 'refill user account';
// calculate tax (planTax is the numerical percentage amount)
$calcTax = (double) ($row['planTrafficRefillCost'] * (double) ($row['planTax'] / 100));
$invoiceItems[0]['plan_id'] = $row['PlanID'];
$invoiceItems[0]['amount'] = $row['planTrafficRefillCost'];
$invoiceItems[0]['tax'] = $calcTax;
$invoiceItems[0]['notes'] = 'refill user session traffic';
userInvoiceAdd($row['id'], $invoiceInfo, $invoiceItems);
}
}
}
$users = substr($allUsers, 0, -2);
printqn("\n\t\tvar divContainer = document.getElementById('{$divContainer}');\n\t divContainer.innerHTML += '<div class=\"success\">User(s) <b>{$users}</b> session traffic has been successfully refilled and billed.</div>';\n\t");
include '../../library/closedb.php';
}
示例6: while
if ($orderType == "asc") {
$orderTypeNextPage = "desc";
} else {
if ($orderType == "desc") {
$orderTypeNextPage = "asc";
}
}
echo "<thread> <tr>\n\t\t<th scope='col'> \n\t\t<br/>\n\t\t<a class='novisit' href=\"" . $_SERVER['PHP_SELF'] . "?username={$username}&startdate={$startdate}&enddate={$enddate}&planname={$planname}&orderBy=username&orderType={$orderTypeNextPage}\">\n\t\t" . $l['all']['Username'] . "</a>\n\t\t</th>\n\t\t<th scope='col'> \n\t\t<br/>\n\t\t<a class='novisit' href=\"" . $_SERVER['PHP_SELF'] . "?username={$username}&startdate={$startdate}&enddate={$enddate}&planname={$planname}&orderBy=planname&orderType={$orderTypeNextPage}\">\n\t\t" . $l['all']['PlanName'] . "</a>\n\t\t</th>\n\t\t<th scope='col'> \n\t\t<br/>\n\t\t<a class='novisit' href=\"" . $_SERVER['PHP_SELF'] . "?username={$username}&startdate={$startdate}&enddate={$enddate}&planname={$planname}&orderBy=sessiontime&orderType={$orderTypeNextPage}\">\n\t\t" . $l['all']['UsedTime'] . "</a>\n\t\t</th>\n\t\t<th scope='col'> \n\t\t<br/>\n\t\t<a class='novisit' href=\"" . $_SERVER['PHP_SELF'] . "?username={$username}&startdate={$startdate}&enddate={$enddate}&planname={$planname}&orderBy=plantimebank&orderType={$orderTypeNextPage}\">\n\t\t" . $l['all']['TotalTime'] . "</a>\n\t\t</th>\n\t\t<th scope='col'> \n\t\t<br/>\n\t\t" . $l['all']['TotalTraffic'] . " (" . $l['all']['Bytes'] . ")</a>\n\t\t</th>\n </tr> </thread>";
while ($row = $res->fetchRow(DB_FETCHMODE_ASSOC)) {
$perc = number_format($row['sessiontime'] / $row['planTimeBank'] * 100, 2);
if ($perc - 100 > 0) {
$percFormatted = "<font color='red'>{$perc}</font>";
} else {
$percFormatted = "{$perc}";
}
printqn("<tr>\n <td> <a class='tablenovisit' href='javascript:return;'\n\t\t\t\t\t\tonClick='javascript:ajaxGeneric(\"include/management/retUserInfo.php\",\"retBandwidthInfo\",\"divContainerUserInfo\",\"username={$row['username']}\");\n javascript:__displayTooltip();'\n tooltipText='\n\t\t\t\t\t\t\t\t<a class=\"toolTip\" href=\"bill-pos-edit.php?username={$row['username']}\">\n\t {$l['Tooltip']['UserEdit']}</a>\n <br/><br/>\n\n <div id=\"divContainerUserInfo\">\n Loading...\n </div>\n <br/>'\n\t\t\t\t\t\t\t\t\t>{$row['username']}</a>\n </td>\n\t\t\t\t<td> {$row['planname']} </td>\n\t\t\t\t<td> \n\t\t\t\t\t" . time2str($row['sessiontime']) . "\n\t\t\t\t\t<b>({$percFormatted})%</b>\n\t\t\t\t\t</td>\n\t\t\t\t<td> " . time2str($row['planTimeBank']) . " </td>\n\t\t\t\t<td> " . toxbyte($row['upload'] + $row['download']) . "</td>\n\t\t</tr>");
}
echo "\n <tfoot>\n <tr>\n <th colspan='12' align='left'>\n ";
setupLinks($pageNum, $maxPage, $orderBy, $orderType, "&username={$username}&startdate={$startdate}&enddate={$enddate}&planname={$planname}");
echo "\n </th>\n </tr>\n </tfoot>\n ";
echo "</table>";
include 'library/closedb.php';
?>
</div>
<?php
include 'include/config/logging.php';
?>
示例7: count
<?php
include '../../library/checklogin.php';
include_once 'pages_common.php';
if (isset($_GET['retHotspotGeneralStat'])) {
$divContainer = $_GET['divContainer'];
// get target div id
$hotspot = $_GET['hotspot'];
include '../../library/opendb.php';
$sql = "SELECT " . $configValues['CONFIG_DB_TBL_DALOHOTSPOTS'] . ".name AS hotspot, count(distinct(UserName)) AS uniqueusers, count(radacctid) AS totalhits, " . " avg(AcctSessionTime) AS avgsessiontime, sum(AcctSessionTime) AS totaltime, " . " avg(AcctInputOctets) AS avgInputOctets, sum(AcctInputOctets) AS sumInputOctets, " . " avg(AcctOutputOctets) AS avgOutputOctets, sum(AcctOutputOctets) AS sumOutputOctets " . " FROM " . $configValues['CONFIG_DB_TBL_RADACCT'] . " JOIN " . $configValues['CONFIG_DB_TBL_DALOHOTSPOTS'] . " on (" . $configValues['CONFIG_DB_TBL_RADACCT'] . ".calledstationid LIKE " . $configValues['CONFIG_DB_TBL_DALOHOTSPOTS'] . ".mac) WHERE " . $configValues['CONFIG_DB_TBL_DALOHOTSPOTS'] . ".name='" . $dbSocket->escapeSimple($hotspot) . "' " . " GROUP BY " . $configValues['CONFIG_DB_TBL_DALOHOTSPOTS'] . ".name ;";
$res = $dbSocket->query($sql);
$row = $res->fetchRow(DB_FETCHMODE_ASSOC);
$sumUpload = toxbyte($row['sumInputOctets']);
$sumDownload = toxbyte($row['sumOutputOctets']);
$sumHits = $row['totalhits'];
if ($sumUpload <= 0) {
$sumUpload = 0;
}
if ($sumDownload <= 0) {
$sumDownload = 0;
}
if ($sumHits <= 0) {
$sumHits = 0;
}
printqn("\n\t\tvar divContainer = document.getElementById('{$divContainer}');\n\t\tdivContainer.innerHTML = '<span style=\"font-weight:normal;\">Total Uploads:</span> {$sumUpload} <br/> " . " <span style=\"font-weight:normal;\">Total Downloads:</span> {$sumDownload} <br/> " . " <span style=\"font-weight:normal;\">Total Hits:</span> {$sumHits}'\n\t");
}
示例8: setupNumbering
echo "<table border='0' class='table1'>\n";
echo "\n <thead>\n <tr>\n <th colspan='12' align='left'>\n\n <input class='button' type='button' value='CSV Export'\n onClick=\"javascript:window.location.href='include/management/fileExport.php?reportFormat=csv'\"\n />\n <br/>\n <br/>\n ";
if ($configValues['CONFIG_IFACE_TABLES_LISTING_NUM'] == "yes") {
setupNumbering($numrows, $rowsPerPage, $pageNum, $orderBy, $orderType, "&username={$username}&startdate={$startdate}&enddate={$enddate}");
}
echo " </th></tr>\n\t\t\t</thead>\n\t";
if ($orderType == "asc") {
$orderType = "desc";
} else {
if ($orderType == "desc") {
$orderType = "asc";
}
}
echo "<thread> <tr>\n\t\t<th scope='col'> \n\t\t<br/>\n\t\t<a class='novisit' href=\"" . $_SERVER['PHP_SELF'] . "?username={$username}&startdate={$startdate}&enddate={$enddate}&orderBy=radacctid&orderType={$orderType}\">\n\t\t" . $l['all']['ID'] . "</a>\n\t\t</th>\n\t\t<th scope='col'> \n\t\t<br/>\n\t\t<a class='novisit' href=\"" . $_SERVER['PHP_SELF'] . "?username={$username}&startdate={$startdate}&enddate={$enddate}&orderBy=hotspot&orderType={$orderType}\">\n\t\t" . $l['all']['HotSpot'] . "</a>\n\t\t</th>\n\t\t<th scope='col'> \n\t\t<br/>\n\t\t<a class='novisit' href=\"" . $_SERVER['PHP_SELF'] . "?username={$username}&startdate={$startdate}&enddate={$enddate}&orderBy=username&orderType={$orderType}\">\n\t\t" . $l['all']['Username'] . "</a>\n\t\t</th>\n\t\t<th scope='col'> \n\t\t<br/>\n\t\t<a class='novisit' href=\"" . $_SERVER['PHP_SELF'] . "?username={$username}&startdate={$startdate}&enddate={$enddate}&orderBy=framedipaddress&orderType={$orderType}\">\n\t\t" . $l['all']['IPAddress'] . "</a>\n\t\t</th>\n\t\t<th scope='col'> \n\t\t<br/>\n\t\t<a class='novisit' href=\"" . $_SERVER['PHP_SELF'] . "?username={$username}&startdate={$startdate}&enddate={$enddate}&orderBy=acctstarttime&orderType={$orderType}\">\n\t\t" . $l['all']['StartTime'] . "</a>\n\t\t</th>\n\t\t<th scope='col'> \n\t\t<br/>\n\t\t<a class='novisit' href=\"" . $_SERVER['PHP_SELF'] . "?username={$username}&startdate={$startdate}&enddate={$enddate}&orderBy=acctstoptime&orderType={$orderType}\">\n\t\t" . $l['all']['StopTime'] . "</a>\n\t\t</th>\n\t\t<th scope='col'> \n\t\t<br/>\n\t\t<a class='novisit' href=\"" . $_SERVER['PHP_SELF'] . "?username={$username}&startdate={$startdate}&enddate={$enddate}&orderBy=acctsessiontime&orderType={$orderType}\">\n\t\t" . $l['all']['TotalTime'] . "</a>\n\t\t</th>\n\t\t<th scope='col'> \n\t\t<br/>\n\t\t<a class='novisit' href=\"" . $_SERVER['PHP_SELF'] . "?username={$username}&startdate={$startdate}&enddate={$enddate}&orderBy=acctinputoctets&orderType={$orderType}\">\n\t\t" . $l['all']['Upload'] . " (" . $l['all']['Bytes'] . ")</a>\n\t\t</th>\n\t\t<th scope='col'> \n\t\t<br/>\n\t\t<a class='novisit' href=\"" . $_SERVER['PHP_SELF'] . "?username={$username}&startdate={$startdate}&enddate={$enddate}&orderBy=acctoutputoctets&orderType={$orderType}\">\n\t\t" . $l['all']['Download'] . " (" . $l['all']['Bytes'] . ")</a>\n\t\t</th>\n\t\t<th scope='col'>\n\t\t<br/>\n\t\t<a class='novisit' href=\"" . $_SERVER['PHP_SELF'] . "?username={$username}&startdate={$startdate}&enddate={$enddate}&orderBy=acctterminatecause&orderType={$orderType}\">\n\t\t " . $l['all']['Termination'] . "</a>\n\t\t</th>\n\t\t<th scope='col'> \n\t\t<br/>\n\t\t<a class='novisit' href=\"" . $_SERVER['PHP_SELF'] . "?username={$username}&startdate={$startdate}&enddate={$enddate}&orderBy=nasipaddress&orderType={$orderType}\">\n\t\t" . $l['all']['NASIPAddress'] . "</a>\n\t\t</th>\n </tr> </thread>";
while ($row = $res->fetchRow()) {
printqn("<tr>\n\t\t\t\t<td> {$row['0']} </td>\n\t\t <td> {$row['1']} </td>\n\t <td> {$row['2']} </td>\n\t\t\t\t<td> {$row['3']} </td>\n\t\t\t\t<td> {$row['4']} </td>\n\t\t\t\t<td> {$row['5']} </td>\n\t\t\t\t<td> " . time2str($row[6]) . " </td>\n\t\t\t\t<td> " . toxbyte($row[7]) . "</td>\n\t\t\t\t<td> " . toxbyte($row[8]) . "</td>\n\t\t\t\t<td> {$row['9']} </td>\n\t\t\t\t<td> {$row['10']} </td>\n\t\t</tr>");
}
echo "\n <tfoot>\n <tr>\n <th colspan='12' align='left'>\n ";
setupLinks($pageNum, $maxPage, $orderBy, $orderType, "&username={$username}&startdate={$startdate}&enddate={$enddate}");
echo "\n </th>\n </tr>\n </tfoot>\n ";
echo "</table>";
include 'library/closedb.php';
?>
</div>
<?php
include 'include/config/logging.php';
?>
示例9: printqn
<?php
include '../../library/checklogin.php';
include_once 'pages_common.php';
if (isset($_GET['retAttributeInfo'])) {
$divContainer = $_GET['divContainer'];
// get target div id
$attribute = $_GET['attribute'];
include '../../library/opendb.php';
$sql = "SELECT RecommendedTooltip FROM " . $configValues['CONFIG_DB_TBL_DALODICTIONARY'] . " WHERE Attribute='" . $dbSocket->escapeSimple($attribute) . "'";
$res = $dbSocket->query($sql);
$row = $res->fetchRow(DB_FETCHMODE_ASSOC);
$desc = $row['RecommendedTooltip'];
printqn("\n\t\tvar divContainer = document.getElementById('{$divContainer}');\n\t\tdivContainer.innerHTML = 'Description: <span style=\"font-weight:normal;\"> {$desc} </span> <br/>';\n\t");
}
示例10: switch
if (isset($_GET['getGroups'])) {
if (isset($_GET['divContainer'])) {
$divContainer = $_GET['divContainer'];
}
if (isset($_GET['divCounter'])) {
$divCounter = $_GET['divCounter'];
}
if (isset($_GET['elemName'])) {
$elemName = $_GET['elemName'];
}
switch ($divContainer) {
case "divContainerProfiles":
$name = "Profile";
break;
case "divContainerGroups":
$name = "Group";
break;
default:
$name = "Group";
break;
}
include '../../library/opendb.php';
$sql = "(SELECT distinct(GroupName) FROM " . $configValues['CONFIG_DB_TBL_RADGROUPREPLY'] . ")" . "UNION (SELECT distinct(GroupName) FROM " . $configValues['CONFIG_DB_TBL_RADGROUPCHECK'] . ");";
$res = $dbSocket->query($sql);
printqn("\n\t\tvar divContainer = document.getElementById('{$divContainer}');\n\t\tvar groups = ''+\n\t '<label for=\\'{$name}\\' class=\\'form\\'>{$name}</label>'+\n\t ' <select class=\\'form\\' name=\\'{$elemName}\\' >'+\n\t");
while ($row = $res->fetchRow()) {
printqn("\n\t \t'<option value=\\'{$row['0']}\\'>{$row['0']}</option>'+\n\t\t");
}
printqn("\n\t ' </select>'+\n ' <a class=\"tablenovisit\" href=\"#\"'+\n ' onClick=\"javascript:ajaxGeneric(\\'include/management/dynamic_groups.php\\',\\'delGroups\\',\\'{$divContainer}\\',\\'divCounter={$divCounter}\\');\">Del</a>';\n\n\t\tvar childGroup = document.createElement('div');\n\t\tchildGroup.setAttribute('id','divContainerGroups{$divCounter}');\n\t\tchildGroup.innerHTML = groups;\n\t\tdivContainer.appendChild(childGroup);\n\t");
include '../../library/closedb.php';
}
示例11: userRefillSessionTraffic
function userRefillSessionTraffic($username, $divContainer)
{
include 'pages_common.php';
include '../../library/checklogin.php';
include '../../library/opendb.php';
if (!is_array($username)) {
$username = array($username);
}
$allUsers = "";
foreach ($username as $variable => $value) {
$user = $dbSocket->escapeSimple($value);
// clean username argument from harmful code
$allUsers .= $user . ", ";
$sql = "UPDATE " . $configValues['CONFIG_DB_TBL_RADACCT'] . " SET AcctInputOctets=0, AcctOutputOctets=0 " . " WHERE Username='{$user}'";
$res = $dbSocket->query($sql);
}
// take care of recording the billing action in billing_history table
foreach ($username as $variable => $value) {
$user = $dbSocket->escapeSimple($value);
// clean username argument from harmful code
$sql = "SELECT " . $configValues['CONFIG_DB_TBL_DALOUSERBILLINFO'] . ".username, " . $configValues['CONFIG_DB_TBL_DALOUSERBILLINFO'] . ".planName, " . $configValues['CONFIG_DB_TBL_DALOBILLINGPLANS'] . ".planTrafficRefillCost, " . $configValues['CONFIG_DB_TBL_DALOUSERBILLINFO'] . ".paymentmethod, " . $configValues['CONFIG_DB_TBL_DALOUSERBILLINFO'] . ".cash, " . $configValues['CONFIG_DB_TBL_DALOUSERBILLINFO'] . ".creditcardname, " . $configValues['CONFIG_DB_TBL_DALOUSERBILLINFO'] . ".creditcardnumber, " . $configValues['CONFIG_DB_TBL_DALOUSERBILLINFO'] . ".creditcardverification, " . $configValues['CONFIG_DB_TBL_DALOUSERBILLINFO'] . ".creditcardtype, " . $configValues['CONFIG_DB_TBL_DALOUSERBILLINFO'] . ".creditcardexp " . " FROM " . $configValues['CONFIG_DB_TBL_DALOUSERBILLINFO'] . ", " . $configValues['CONFIG_DB_TBL_DALOBILLINGPLANS'] . " " . " WHERE " . "(" . $configValues['CONFIG_DB_TBL_DALOUSERBILLINFO'] . ".planname=" . $configValues['CONFIG_DB_TBL_DALOBILLINGPLANS'] . ".planname)" . " AND " . "(" . $configValues['CONFIG_DB_TBL_DALOUSERBILLINFO'] . ".username='" . $user . "')";
$res = $dbSocket->query($sql);
$row = $res->fetchRow(DB_FETCHMODE_ASSOC);
$refillCost = $row['planTrafficRefillCost'];
$currDate = date('Y-m-d H:i:s');
$currBy = $_SESSION['operator_user'];
$sql = "INSERT INTO " . $configValues['CONFIG_DB_TBL_DALOBILLINGHISTORY'] . " (id,username,planName,billAmount,billAction,billPerformer,billReason," . " paymentmethod,cash,creditcardname,creditcardnumber,creditcardverification,creditcardtype,creditcardexp," . " creationdate,creationby" . ")" . " VALUES " . " (0,'{$user}','" . $row['planName'] . "','" . $row['planTrafficRefillCost'] . "','Refill Session Traffic','daloRADIUS Web Interface','Refill Session Traffic','" . $row['paymentmethod'] . "','" . $row['cash'] . "','" . $row['creditcardname'] . "','" . $row['creditcardnumber'] . "','" . $row['creditcardverification'] . "','" . $row['creditcardtype'] . "','" . $row['creditcardexp'] . "'," . "'{$currDate}', '{$currBy}'" . ")";
$res = $dbSocket->query($sql);
}
$users = substr($allUsers, 0, -2);
printqn("\n\t\tvar divContainer = document.getElementById('{$divContainer}');\n\t divContainer.innerHTML += '<div class=\"success\">User(s) <b>{$users}</b> session traffic has been successfully refilled and billed.</div>';\n\t");
include '../../library/closedb.php';
}
示例12: while
echo " </th></tr>\n\t\t\t</thead>";
if ($orderType == "asc") {
$orderTypeNextPage = "desc";
} else {
if ($orderType == "desc") {
$orderTypeNextPage = "asc";
}
}
echo "<thread> <tr>\n\t\t<th scope='col'> \n\t\t<a title='Sort' class='novisit' href=\"" . $_SERVER['PHP_SELF'] . "?username={$username}&orderBy=id&orderType={$orderTypeNextPage}\">\n\t\t" . $l['all']['ID'] . "</a>\n\t\t</th>\n\n\t\t<th scope='col'>\n\t\t<a title='Sort' class='novisit' href=\"" . $_SERVER['PHP_SELF'] . "?username={$username}&orderBy=Username&orderType={$orderTypeNextPage}\">\n\t \t" . $l['all']['Username'] . "</a>\n\t\t</th>\n\n\t\t<th scope='col'> \n\t\t<a title='Sort' class='novisit' href=\"" . $_SERVER['PHP_SELF'] . "?username={$username}&orderBy=Value&orderType={$orderTypeNextPage}\">\n\t\tFull name</a>\n\t\t</th>\n\t</tr> </thread>";
while ($row = $res->fetchRow()) {
if ($row[3] !== '0') {
$img = "<img title='user is disabled' src='images/icons/userStatusDisabled.gif' alt='[disabled]'>";
} else {
$img = "<img title='user is enabled' src='images/icons/userStatusActive.gif' alt='[enabled]'>";
}
printqn("<tr>\n\t\t\t<td> <input type='checkbox' name='username[]' value='{$row['0']}'> {$row['2']} </td>\n <td> {$img} <a class='tablenovisit' href='javascript:return;'\n onClick='javascript:ajaxGeneric(\"include/management/retUserInfo.php\",\"retBandwidthInfo\",\"divContainerUserInfo\",\"username={$row['0']}\");\n javascript:__displayTooltip();'\n tooltipText='\n <a class=\"toolTip\" href=\"mng-edit.php?username={$row['0']}\">\n\t {$l['Tooltip']['UserEdit']}</a>\n  \n\t\t\t\t\t<br/>\n\t\t\t\t\t<a class=\"toolTip\" href=\"config-maint-test-user.php?username={$row['0']}&password={$row['1']}\">\n\t\t\t\t\t\t{$l['all']['TestUser']}</a>\n\t\t\t\t\t \n\t\t\t\t\t<br/>\n\t\t\t\t\t <a class=\"toolTip\" href=\"acct-username.php?username={$row['0']}\">\n\t\t\t\t\t\t{$l['all']['Accounting']}</a>\n <br/><br/>\n\n <div id=\"divContainerUserInfo\">\n Loading...\n </div>\n <br/>'\n >{$row['0']}</a>\n </td>\n\n\t\t\t<td> {$row['1']} </td>\n\n\t\t\t</tr>");
}
echo "\n\t\t\t<tfoot>\n\t\t\t\t<tr>\n\t\t\t\t<th colspan='10' align='left'>\n\t";
setupLinks($pageNum, $maxPage, $orderBy, $orderType, "&username={$username}");
echo "\n\t\t\t</th>\n\t\t\t</tr>\n\t\t</tfoot>\n\t";
echo "</table>";
echo "</form>";
include 'library/closedb.php';
?>
<?php
include 'include/config/logging.php';
?>
</div>
示例13: while
echo "\n\t\t\t\t\t\t<thead>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<th colspan='10' align='left'> \n\t\t\t\t\t\t\t\t\n\t \t \t\t\t<input class='button' type='button' value='Download Invoice'onClick=\"javascript:window.location.href='include/common/notificationsBatchDetails.php?batch_name={$batch_name}&destination=download'\"/>\n\t \t \t\t\t<input class='button' type='button' value='Email Invoice to Business/Hotspot'onClick=\"javascript:window.location.href='include/common/notificationsBatchDetails.php?batch_name={$batch_name}&destination=email'\"/>\n\t \t \t\t\t<br/>\n\t\t\t\t\t\t\t\t<input class='button' type='button' value='Total Users CSV Export'\n\t\t\t\t\t\t\t\t\tonClick=\"javascript:window.location.href='include/management/fileExport.php?reportFormat=csv&reportType=reportsBatchTotalUsers'\"\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t<br/><br/>\n\t\t\t";
echo "\n\t\t\t\t</th>\n\t\t\t\t</tr>\n\t\t\t\t</thead>\n\t\t\n\t\t\t<thread> <tr>\n\t\t\t<th scope='col'> \n\t\t\t" . $l['all']['BatchName'] . "\n\t\t\t</th>\n\t\n\t\t\t<th scope='col'> \n\t\t\t" . $l['all']['HotSpot'] . "\n\t\t\t</th>\n\t\n\t\t\t<th scope='col'> \n\t\t\t" . $l['all']['BatchStatus'] . "\n\t\t\t</th>\n\t\t\t\n\t\t\t<th scope='col'> \n\t\t\t" . $l['all']['TotalUsers'] . "\n\t\t\t</th>\n\t\n\t\t\t<th scope='col'> \n\t\t\t" . $l['all']['ActiveUsers'] . "\n\t\t\t</th>\n\t\n\t\t\t<th scope='col'> \n\t\t\t" . $l['all']['PlanName'] . "\n\t\t\t</th>\n\t\n\t\t\t<th scope='col'> \n\t\t\t" . $l['all']['PlanCost'] . "\n\t\t\t</th>\n\t\n\t\t\t<th scope='col'> \n\t\t\t" . $l['all']['BatchCost'] . "\n\t\t\t</th>\n\t\n\t\t\t<th scope='col'> \n\t\t\t" . $l['all']['CreationDate'] . "\n\t\t\t</th>\n\t\n\t\t\t<th scope='col'> \n\t\t\t" . $l['all']['CreationBy'] . "\n\t\t\t</th>\n\t\n\t\t\t</tr> </thread>";
$active_users_per = 0;
$total_users = 0;
$active_users = 0;
$batch_cost = 0;
while ($row = $res->fetchRow(DB_FETCHMODE_ASSOC)) {
$hotspot_name = $row['HotspotName'];
$batch_status = $row['batch_status'];
$plancost = $row['plancost'];
$total_users = $row['total_users'];
$active_users = $row['active_users'];
$batch_cost = $active_users * $plancost;
$plan_currency = $row['plancurrency'];
echo "\n\t\t\t\t<tr>\n\t\t\t\t\t<td>";
printqn("\n\t\t\t\t\t<a class='tablenovisit' href='javascript:return;'\n\t\t\t\t\t\tonClick='javascript:__displayTooltip();'\n\t\t\t\t\t\ttooltipText='\n\t\t\t\t\t\t\t\t\t<div id=\"divContainerUserInfo\">\n\t\t\t\t\t\t\t\t\t\t<b>{$l['all']['batchDescription']}</b>:<br/><br/>\n\t\t\t\t\t\t\t\t\t\t{$row['batch_description']}\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<br/>\n\t\t\t\t\t\t\t\t\t'\n\t\t\t\t>{$row['batch_name']}</a>\n\t\t\t\t</td>\n\t\t\t");
echo "\n\t\t\t\n\t\t\t\t\t<td>" . $hotspot_name . "\n\t\t\t\t\t\t\n\t\t\t\t\t</td>\n\t\t\t\n\t\t\t\t\t<td>" . $batch_status . "\n\t\t\t\t\t\t\n\t\t\t\t\t</td>\n\t\t\t\t\t\n\t\t\t\t\t<td>" . $total_users . "\n\t\t\t\t\t\t\n\t\t\t\t\t</td>\n\t\n\t\t\t\t\t<td>" . $active_users . "\n\t\t\t\t\t\t\n\t\t\t\t\t</td>\n\t\n\t\t\t\t\t<td>" . $row['planname'] . "\n\t\t\t\t\t</td>\n\t\n\t\t\t\t\t<td>" . $plancost . "\n\t\t\t\t\t</td>\n\t\n\t\t\t\t\t<td>" . $batch_cost . "\n\t\t\t\t\t</td>\n\t\t\t\t\t\n\t\t\t\t\t<td>" . $row['creationdate'] . "\n\t\t\t\t\t</td>\n\t\n\t\t\t\t\t<td>" . $row['creationby'] . "\n\t\t\t\t\t</td>\n\t\n\t\n\t\t\t\t</tr>\n\t\t\t";
}
echo "\n\t\t\t\t\t\t<tfoot>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<th colspan='10' align='left'> \n\n\t\t\t\t\t\t\t\t</th>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t</tfoot>\n\t\t\t";
echo "</table>";
// setup php session variables for exporting
$_SESSION['reportTable'] = "";
//reportQuery is assigned below to the SQL statement in $sql
$_SESSION['reportQuery'] = "";
$_SESSION['reportType'] = "reportsBatchActiveUsers";
//orig: used as method to get total rows - this is required for the pages_numbering.php page
$sql = "SELECT " . $configValues['CONFIG_DB_TBL_DALOUSERBILLINFO'] . ".id," . $configValues['CONFIG_DB_TBL_DALOUSERBILLINFO'] . ".username," . $configValues['CONFIG_DB_TBL_RADACCT'] . ".acctstarttime," . $configValues['CONFIG_DB_TBL_DALOBATCHHISTORY'] . ".batch_name " . " FROM " . $configValues['CONFIG_DB_TBL_DALOUSERBILLINFO'] . "," . $configValues['CONFIG_DB_TBL_RADACCT'] . "," . $configValues['CONFIG_DB_TBL_DALOBATCHHISTORY'] . " WHERE " . $configValues['CONFIG_DB_TBL_DALOUSERBILLINFO'] . ".batch_id = " . $configValues['CONFIG_DB_TBL_DALOBATCHHISTORY'] . ".id" . " AND " . $configValues['CONFIG_DB_TBL_DALOUSERBILLINFO'] . ".batch_id = {$batch_id} " . " AND " . $configValues['CONFIG_DB_TBL_DALOUSERBILLINFO'] . ".username = " . $configValues['CONFIG_DB_TBL_RADACCT'] . ".username" . " GROUP by " . $configValues['CONFIG_DB_TBL_DALOUSERBILLINFO'] . ".username " . " ORDER BY {$orderBy} {$orderType} ," . $configValues['CONFIG_DB_TBL_RADACCT'] . ".radacctid ASC ";
// assigning the session reportQuery
$_SESSION['reportQuery'] = $sql;
$res = $dbSocket->query($sql);
$numrows = $res->numRows();
示例14: setupNumbering
echo "<table border='0' class='table1'>\n";
echo "\n\t\t\t\t\t<thead>\n <tr>\n <th colspan='12' align='left'>\n Select:\n <a class=\"table\" href=\"javascript:SetChecked(1,'payment_id[]','listallpayments_id')\">All</a> \n \n <a class=\"table\" href=\"javascript:SetChecked(0,'payment_id[]','listallpayments_id')\">None</a>\n\t <br/>\n <input class='button' type='button' value='Delete' onClick='javascript:removeCheckbox(\"listallpayments_id\",\"bill-payments-del.php\")' />\n <br/><br/>\n\n ";
if ($configValues['CONFIG_IFACE_TABLES_LISTING_NUM'] == "yes") {
setupNumbering($numrows, $rowsPerPage, $pageNum, $orderBy, $orderType);
}
echo " </th></tr>\n </thead>\n\n ";
if ($orderType == "asc") {
$orderTypeNextPage = "desc";
} else {
if ($orderType == "desc") {
$orderTypeNextPage = "asc";
}
}
echo "<thread> <tr>\n\t\t<th scope='col'>\n\t\t<a title='Sort' class='novisit' href=\"" . $_SERVER['PHP_SELF'] . "?orderBy=id&orderType={$orderTypeNextPage}\">\n\t\t" . $l['all']['ID'] . "</a>\n\t\t</th>\n\n\t\t<th scope='col'> \n\t\t<a title='Sort' class='novisit' href=\"" . $_SERVER['PHP_SELF'] . "?orderBy=invoice_id&orderType={$orderTypeNextPage}\">\n\t\t" . $l['all']['PaymentInvoiceID'] . "</a>\n\t\t</th>\n\n\t\t<th scope='col'> \n\t\t" . $l['all']['PaymentAmount'] . "\n\t\t</th>\n\n\t\t<th scope='col'> \n\t\t" . $l['all']['PaymentDate'] . "\n\t\t</th>\n\n\t\t<th scope='col'> \n\t\t" . $l['all']['PaymentType'] . "\n\t\t</th>\n\n\t\t<th scope='col'> \n\t\t" . $l['all']['PaymentNotes'] . "\n\t\t</th>\n\n\n\t</tr> </thread>";
while ($row = $res->fetchRow()) {
printqn("<tr>\n <td> <input type='checkbox' name='payment_id[]' value='{$row['0']}'> \n\n \t<a class='tablenovisit' href='javascript:return;'\n onclick=\"javascript:__displayTooltip();\"\n tooltipText=\"\n <a class='toolTip' href='bill-payments-edit.php?payment_id={$row['0']}'>" . $l['Tooltip']['EditPayment'] . "</a>\n\t\t\t\t\t<br/><br/>\n <a class='toolTip' href='bill-payments-del.php?payment_id={$row['0']}'>" . $l['Tooltip']['RemovePayment'] . "</a>\n <br/><br/>\"\n >#{$row['0']}</a>\n </td>\n \n \n <td> <a class='tablenovisit' href='javascript:return;'\n onclick=\"javascript:__displayTooltip();\"\n tooltipText=\"\n <a class='toolTip' href='bill-invoice-edit.php?invoice_id={$row['1']}'>" . $l['Tooltip']['InvoiceEdit'] . "</a>\n <br/><br/>\"\n >#{$row['1']}</a>\n </td>\n \n <td> {$row['2']} </td>\n <td> {$row['3']} </td>\n <td> {$row['4']} </td>\n <td> {$row['5']} </td>\n\t\t</tr>");
}
echo "\n <tfoot>\n <tr>\n <th colspan='12' align='left'>\n ";
setupLinks($pageNum, $maxPage, $orderBy, $orderType);
echo "\n </th>\n </tr>\n </tfoot>\n ";
echo "</table>";
echo "</form>";
include 'library/closedb.php';
?>
<?php
include 'include/config/logging.php';
?>
</div>
示例15: while
$orderTypeNextPage = "desc";
} else {
if ($orderType == "desc") {
$orderTypeNextPage = "asc";
}
}
echo "<thread> <tr>\n\n\t\t<th scope='col'> \n\t\t<a title='Sort' class='novisit' href=\"" . $_SERVER['PHP_SELF'] . "?orderBy=id&orderType={$orderTypeNextPage}\">\n\t\t" . $l['all']['ID'] . "</a>\n\t\t</th>\n\n\t\t<th scope='col'> \n\t\t<a title='Sort' class='novisit' href=\"" . $_SERVER['PHP_SELF'] . "?orderBy=contactperson&orderType={$orderTypeNextPage}\">\n\t\t" . $l['ContactInfo']['ContactPerson'] . "</a>\n\t\t</th>\n\n\t\t<th scope='col'> \n\t\t<a title='Sort' class='novisit' href=\"" . $_SERVER['PHP_SELF'] . "?orderBy=company&orderType={$orderTypeNextPage}\">\n\t\t" . $l['ContactInfo']['Company'] . "</a>\n\t\t</th>\n\n\t\t<th scope='col'> \n\t\t<a title='Sort' class='novisit' href=\"" . $_SERVER['PHP_SELF'] . "?orderBy=username&orderType={$orderTypeNextPage}\">\n\t\t" . $l['all']['Username'] . "</a>\n\t\t</th>\n\n\t\t<th scope='col'> \n\t\t" . $l['all']['Password'] . "\n\t\t</th>\n\n\t\t<th scope='col'> \n\t\t<a title='Sort' class='novisit' href=\"" . $_SERVER['PHP_SELF'] . "?orderBy=planname&orderType={$orderTypeNextPage}\">\n\t\t" . $l['ContactInfo']['PlanName'] . "</a>\n\t\t</th>\n\n\t\t</tr> </thread>";
while ($row = $res->fetchRow(DB_FETCHMODE_ASSOC)) {
echo "\n\t\t\t<tr>\n\t\t\t<td> <input type='checkbox' name='username[]' value='" . $row['username'] . "'>" . $row['id'] . "</td>\n\t\t\t<td>" . $row['contactperson'] . "</td>\n\t\t\t<td>" . $row['company'] . "</td>\n\t\t";
echo "<td>";
if ($row['disabled'] !== '0' || $row['billstatus'] == "Suspended") {
echo "<img title='user is disabled' src='images/icons/userStatusDisabled.gif' alt='[disabled]'>";
} else {
echo "<img title='user is enabled' src='images/icons/userStatusActive.gif' alt='[enabled]'>";
}
printqn("\n\t\t\t<a class='tablenovisit' href='javascript:return;'\n onClick='javascript:ajaxGeneric(\"include/management/retUserInfo.php\",\"retBandwidthInfo\",\"divContainerUserInfo\",\"username=" . $row['username'] . "\");\n\t\t\t\t\tjavascript:__displayTooltip();'\n tooltipText='\n\t <a class=\"toolTip\" href=\"bill-pos-edit.php?username=" . $row['username'] . "\">\n\t\t\t\t\t\t{$l['Tooltip']['UserEdit']}</a>\n\t\t\t\t\t<br/><br/>\n\n\t\t\t\t\t<div id=\"divContainerUserInfo\">\n\t\t\t\t\t\tLoading...\n\t\t\t\t\t</div>\n <br/>'\n\t\t\t\t>" . $row['username'] . "</a>\n\t\t\t</td>\n\t\t\t");
if ($configValues['CONFIG_IFACE_PASSWORD_HIDDEN'] == "yes") {
echo "<td>[Password is hidden]</td>";
} else {
echo "<td>" . $row['value'] . "</td>";
}
echo "\n\t\t\t<td>" . $row['planname'] . "</td>\n\t\t\t</tr>\n\t\t";
}
echo "\n\t\t\t\t\t<tfoot>\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<th colspan='10' align='left'> \n\t";
setupLinks($pageNum, $maxPage, $orderBy, $orderType);
echo "\t\t\t\t\t\t\t</th>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t</tfoot>\n\t\t";
echo "</table>";
echo "</form>";
include 'library/closedb.php';
?>