[ADDED] User Details page for admins
This commit is contained in:
parent
233c0c7e8a
commit
54a1452d45
21
public/include/pages/admin/earnings.inc.php
Normal file
21
public/include/pages/admin/earnings.inc.php
Normal file
@ -0,0 +1,21 @@
|
||||
<?php
|
||||
$defflip = (!cfip()) ? exit(header('HTTP/1.1 401 Unauthorized')) : 1;
|
||||
|
||||
// Check user authentication status
|
||||
if ($user->isAuthenticated()) {
|
||||
if (!$smarty->isCached('master.tpl', $smarty_cache_key)) {
|
||||
$iLimit = 30;
|
||||
$debug->append('No cached version available, fetching from backend', 3);
|
||||
if (!$setting->getValue('disable_transactionsummary')) {
|
||||
$aTransactionSummary = $transaction->getTransactionSummary($_SESSION['USERDATA']['id']);
|
||||
$aTransactionSummaryByTime = $transaction->getTransactionTypebyTime($_SESSION['USERDATA']['id']);
|
||||
$smarty->assign('SUMMARY', $aTransactionSummary);
|
||||
$smarty->assign('BYTIME', $aTransactionSummaryByTime);
|
||||
}
|
||||
} else {
|
||||
$debug->append('Using cached page', 3);
|
||||
}
|
||||
}
|
||||
|
||||
$smarty->assign('CONTENT', 'default.tpl');
|
||||
?>
|
||||
24
public/include/pages/admin/userdetails.inc.php
Normal file
24
public/include/pages/admin/userdetails.inc.php
Normal file
@ -0,0 +1,24 @@
|
||||
<?php
|
||||
$defflip = (!cfip()) ? exit(header('HTTP/1.1 401 Unauthorized')) : 1;
|
||||
|
||||
// Check user to ensure they are admin
|
||||
if (!$user->isAuthenticated() || !$user->isAdmin($_SESSION['USERDATA']['id'])) {
|
||||
header("HTTP/1.1 404 Page not found");
|
||||
die("404 Page not found");
|
||||
}
|
||||
|
||||
if (!$smarty->isCached('master.tpl', $smarty_cache_key)) {
|
||||
$debug->append('No cached version available, fetching from backend', 3);
|
||||
if (isset($_REQUEST['id']) && !empty($_REQUEST['id'])) {
|
||||
$aTransactionSummary = $transaction->getTransactionSummary($_REQUEST['id']);
|
||||
$aTransactionSummaryByTime = $transaction->getTransactionTypebyTime($_REQUEST['id']);
|
||||
$smarty->assign('USERNAME', $user->getUsername($_REQUEST['id']));
|
||||
$smarty->assign('SUMMARY', $aTransactionSummary);
|
||||
$smarty->assign('BYTIME', $aTransactionSummaryByTime);
|
||||
}
|
||||
} else {
|
||||
$debug->append('Using cached page', 3);
|
||||
}
|
||||
|
||||
$smarty->assign('CONTENT', 'default.tpl');
|
||||
?>
|
||||
@ -110,7 +110,7 @@
|
||||
{section name=user loop=$USERS|default}
|
||||
<tr>
|
||||
<td>{$USERS[user].id}</td>
|
||||
<td>{$USERS[user].username|escape}</td>
|
||||
<td><a href="{$smarty.server.SCRIPT_NAME}?page={$smarty.request.page|escape}&action=userdetails&id={$USERS[user].id}">{$USERS[user].username|escape}</a></td>
|
||||
<td>{$USERS[user].email|escape}</td>
|
||||
<td>{$USERS[user].shares.valid}</td>
|
||||
<td>{$USERS[user].hashrate}</td>
|
||||
|
||||
133
public/templates/bootstrap/admin/userdetails/default.tpl
Normal file
133
public/templates/bootstrap/admin/userdetails/default.tpl
Normal file
@ -0,0 +1,133 @@
|
||||
{if $DISABLE_TRANSACTIONSUMMARY|default:"0" != 1}
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="panel panel-info">
|
||||
<div class="panel-heading">
|
||||
<i class="fa fa-money fa-fw"></i> {$USERNAME} Account Information
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="panel panel-info">
|
||||
<div class="panel-heading">
|
||||
<i class="fa fa-credit-card fa-fw"></i> All Time Transaction Totals
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<table class="table table-striped table-bordered table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
{foreach $SUMMARY as $type=>$total}
|
||||
<th>{$type}</th>
|
||||
{/foreach}
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
{foreach $SUMMARY as $type=>$total}
|
||||
<td class="right">{$total|number_format:"8"}</td>
|
||||
{/foreach}
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="panel panel-info">
|
||||
<div class="panel-heading">
|
||||
<i class="fa fa-clock-o fa-fw"></i> Transactions over time
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<table class="table table-striped table-bordered table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>Credit</th>
|
||||
<th>Bonus</th>
|
||||
<th>Debit AP</th>
|
||||
<th>Debit MP</th>
|
||||
<th>Donation</th>
|
||||
{if $GLOBAL.fees > 0}
|
||||
<th>Fee</th>
|
||||
{/if}
|
||||
<th>TXFee</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>Last Hour</th>
|
||||
<td>{$BYTIME.1HourCredit|number_format:"8"}</td>
|
||||
<td>{$BYTIME.1HourBonus|number_format:"8"}</td>
|
||||
<td>{$BYTIME.1HourDebitAP|number_format:"8"}</td>
|
||||
<td>{$BYTIME.1HourDebitMP|number_format:"8"}</td>
|
||||
<td>{$BYTIME.1HourDonation|number_format:"8"}</td>
|
||||
{if $GLOBAL.fees|default:"0" > 0}
|
||||
<td>{$BYTIME.1HourFee|number_format:"8"}</td>
|
||||
{/if}
|
||||
<td>{$BYTIME.1HourTXFee|number_format:"8"}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Last Day</th>
|
||||
<td>{$BYTIME.24HourCredit|number_format:"8"}</td>
|
||||
<td>{$BYTIME.24HourBonus|number_format:"8"}</td>
|
||||
<td>{$BYTIME.24HourDebitAP|number_format:"8"}</td>
|
||||
<td>{$BYTIME.24HourDebitMP|number_format:"8"}</td>
|
||||
<td>{$BYTIME.24HourDonation|number_format:"8"}</td>
|
||||
{if $GLOBAL.fees|default:"0" > 0}
|
||||
<td>{$BYTIME.24HourFee|number_format:"8"}</td>
|
||||
{/if}
|
||||
<td>{$BYTIME.24HourTXFee|number_format:"8"}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Last Week</th>
|
||||
<td>{$BYTIME.1WeekCredit|number_format:"8"}</td>
|
||||
<td>{$BYTIME.1WeekBonus|number_format:"8"}</td>
|
||||
<td>{$BYTIME.1WeekDebitAP|number_format:"8"}</td>
|
||||
<td>{$BYTIME.1WeekDebitMP|number_format:"8"}</td>
|
||||
<td>{$BYTIME.1WeekDonation|number_format:"8"}</td>
|
||||
{if $GLOBAL.fees|default:"0" > 0}
|
||||
<td>{$BYTIME.1WeekFee|number_format:"8"}</td>
|
||||
{/if}
|
||||
<td>{$BYTIME.1WeekTXFee|number_format:"8"}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Last Month</th>
|
||||
<td>{$BYTIME.1MonthCredit|number_format:"8"}</td>
|
||||
<td>{$BYTIME.1MonthBonus|number_format:"8"}</td>
|
||||
<td>{$BYTIME.1MonthDebitAP|number_format:"8"}</td>
|
||||
<td>{$BYTIME.1MonthDebitMP|number_format:"8"}</td>
|
||||
<td>{$BYTIME.1MonthDonation|number_format:"8"}</td>
|
||||
{if $GLOBAL.fees|default:"0" > 0}
|
||||
<td>{$BYTIME.1MonthFee|number_format:"8"}</td>
|
||||
{/if}
|
||||
<td>{$BYTIME.1MonthTXFee|number_format:"8"}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Last Year</th>
|
||||
<td>{$BYTIME.1YearCredit|number_format:"8"}</td>
|
||||
<td>{$BYTIME.1YearBonus|number_format:"8"}</td>
|
||||
<td>{$BYTIME.1YearDebitAP|number_format:"8"}</td>
|
||||
<td>{$BYTIME.1YearDebitMP|number_format:"8"}</td>
|
||||
<td>{$BYTIME.1YearDonation|number_format:"8"}</td>
|
||||
{if $GLOBAL.fees|default:"0" > 0}
|
||||
<td>{$BYTIME.1YearFee|number_format:"8"}</td>
|
||||
{/if}
|
||||
<td>{$BYTIME.1YearTXFee|number_format:"8"}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user