Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
S
smradius
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
shail
smradius
Commits
856df90e
Commit
856df90e
authored
15 years ago
by
Robert Anderson
Browse files
Options
Downloads
Patches
Plain Diff
Get phone and email from correct table
parent
d863579b
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
webui/user/index.php
+48
-20
48 additions, 20 deletions
webui/user/index.php
with
48 additions
and
20 deletions
webui/user/index.php
+
48
−
20
View file @
856df90e
...
@@ -112,6 +112,7 @@ function displayDetails() {
...
@@ -112,6 +112,7 @@ function displayDetails() {
}
}
# Fetch user uptime and traffic cap
$sql
=
"
$sql
=
"
SELECT
SELECT
Name, Value
Name, Value
...
@@ -123,32 +124,39 @@ function displayDetails() {
...
@@ -123,32 +124,39 @@ function displayDetails() {
$res
=
$db
->
query
(
$sql
);
$res
=
$db
->
query
(
$sql
);
$userPhone
=
"Unavailable"
;
$trafficCap
=
"None"
;
$userEmail
=
"Unavailable"
;
$uptimeCap
=
"None"
;
$userCap
=
"Unavailable"
;
$dataCap
=
"Unavailable"
;
$timeCap
=
"Unavailable"
;
$userService
=
"Unavailable"
;
while
(
$row
=
$res
->
fetchObject
())
{
while
(
$row
=
$res
->
fetchObject
())
{
if
(
$row
->
name
==
"SMRadius-Notify-Phone"
)
{
$userPhone
=
$row
->
value
;
}
if
(
$row
->
name
==
"SMRadius-Notify-Email"
)
{
$userEmail
=
$row
->
value
;
}
if
(
$row
->
name
==
"SMRadius-Capping-Traffic-Limit"
)
{
if
(
$row
->
name
==
"SMRadius-Capping-Traffic-Limit"
)
{
$
data
Cap
=
$row
->
value
;
$
traffic
Cap
=
$row
->
value
;
}
}
if
(
$row
->
name
==
"SMRadius-Capping-UpTime-Limit"
)
{
if
(
$row
->
name
==
"SMRadius-Capping-UpTime-Limit"
)
{
$timeCap
=
$row
->
value
;
$uptimeCap
=
$row
->
value
;
}
if
(
$row
->
name
==
"SMRadius-User-Service"
)
{
$userService
=
$row
->
value
;
}
}
}
}
# Fetch user phone and email info
$sql
=
"
SELECT
Phone, Email
FROM
${DB_TABLE_PREFIX}wisp_userdata
WHERE
UserID = '
$userID
'
"
;
$res
=
$db
->
query
(
$sql
);
$userPhone
=
"Not set"
;
$userEmail
=
"Not set"
;
if
(
$res
->
rowCount
()
>
0
)
{
$row
=
$res
->
fetchObject
();
$userPhone
=
$row
->
phone
;
$userEmail
=
$row
->
email
;
}
$isDialup
=
0
;
$isDialup
=
0
;
$userService
=
"Not set"
;
?>
?>
...
@@ -180,7 +188,17 @@ function displayDetails() {
...
@@ -180,7 +188,17 @@ function displayDetails() {
<td
class=
"title"
>
Used This Month
</td>
<td
class=
"title"
>
Used This Month
</td>
</tr>
</tr>
<tr>
<tr>
<td
class=
"value"
>
<?php
echo
$dataCap
;
?>
MB
</td>
<?php
if
(
is_numeric
(
$trafficCap
))
{
?>
<td
class=
"value"
>
<?php
echo
$trafficCap
;
?>
MB
</td>
<?php
}
else
{
?>
<td
class=
"value"
>
<?php
echo
$trafficCap
;
?>
</td>
<?php
}
?>
<td
class=
"value"
>
<?php
printf
(
'%.2f'
,
$totalData
);
?>
MB
</td>
<td
class=
"value"
>
<?php
printf
(
'%.2f'
,
$totalData
);
?>
MB
</td>
</tr>
</tr>
<tr>
<tr>
...
@@ -188,7 +206,17 @@ function displayDetails() {
...
@@ -188,7 +206,17 @@ function displayDetails() {
<td
class=
"title"
>
Used This Month
</td>
<td
class=
"title"
>
Used This Month
</td>
</tr>
</tr>
<tr>
<tr>
<td
class=
"value"
>
<?php
echo
$timeCap
;
?>
Min
</td>
<?php
if
(
is_numeric
(
$uptimeCap
))
{
?>
<td
class=
"value"
>
<?php
echo
$uptimeCap
;
?>
Min
</td>
<?php
}
else
{
?>
<td
class=
"value"
>
<?php
echo
$uptimeCap
;
?>
</td>
<?php
}
?>
<td
class=
"value"
>
<?php
echo
$totalSessionTime
;
?>
Min
</td>
<td
class=
"value"
>
<?php
echo
$totalSessionTime
;
?>
Min
</td>
</tr>
</tr>
<tr>
<tr>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment