mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-24 20:17:24 +08:00
add user ban log from cleanup.php
This commit is contained in:
+3
-2
@@ -55,14 +55,14 @@ if (!empty($_GET["returnto"])) {
|
||||
<tr><td class="rowhead"><?php echo $lang_login['rowhead_password']?></td><td class="rowfollow" align="left"><input type="password" name="password" style="width: 180px; border: 1px solid gray"/></td></tr>
|
||||
<?php
|
||||
show_image_code ();
|
||||
if ($securelogin == "yes")
|
||||
if ($securelogin == "yes")
|
||||
$sec = "checked=\"checked\" disabled=\"disabled\"";
|
||||
elseif ($securelogin == "no")
|
||||
$sec = "disabled=\"disabled\"";
|
||||
elseif ($securelogin == "op")
|
||||
$sec = "";
|
||||
|
||||
if ($securetracker == "yes")
|
||||
if ($securetracker == "yes")
|
||||
$sectra = "checked=\"checked\" disabled=\"disabled\"";
|
||||
elseif ($securetracker == "no")
|
||||
$sectra = "disabled=\"disabled\"";
|
||||
@@ -87,6 +87,7 @@ if (isset($returnto))
|
||||
if ($smtptype != 'none'){
|
||||
?>
|
||||
<p><?php echo $lang_login['p_forget_pass_recover']?></p>
|
||||
<p><?php echo $lang_login['p_account_banned']?></p>
|
||||
<p><?php echo $lang_login['p_resend_confirm']?></p>
|
||||
<?php
|
||||
}
|
||||
|
||||
@@ -259,6 +259,7 @@ if ($action == "edituser")
|
||||
$banLog = [
|
||||
'uid' => $userid,
|
||||
'username' => $user->username,
|
||||
'operator' => $CURUSER['id'],
|
||||
'reason' => nexus_trans('user.edit_ban_reason', [], $user->locale),
|
||||
];
|
||||
}
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
require "../include/bittorrent.php";
|
||||
|
||||
$query = \App\Models\UserBanLog::query();
|
||||
$q = $_REQUEST['q'] ?? '';
|
||||
if (!empty($q)) {
|
||||
$query->where('username', 'like', "%{$q}%");
|
||||
}
|
||||
$total = $query->toBase()->getCountForPagination();
|
||||
$page = $_REQUEST['page'] ?? 1;
|
||||
$perPage = 20;
|
||||
$rows = $query->forPage($page, $perPage)->orderBy('id', 'desc')->get()->toArray();
|
||||
list($paginationTop, $paginationBottom, $limit) = pager($perPage, $total, "?");
|
||||
$header = [
|
||||
'id' => 'ID',
|
||||
'uid' => 'UID',
|
||||
'username' => 'Username',
|
||||
'reason' => 'Reason',
|
||||
'created_at' => 'Created at',
|
||||
];
|
||||
$table = build_table($header, $rows);
|
||||
$q = htmlspecialchars($q);
|
||||
$filterForm = <<<FORM
|
||||
<div>
|
||||
<h1 style="text-align: center">User ban log</h1>
|
||||
<form id="filterForm" action="{$_SERVER['REQUEST_URI']}" method="get">
|
||||
<input id="q" type="text" name="q" value="{$q}">
|
||||
<input type="submit">
|
||||
<input type="reset" onclick="document.getElementById('q').value='';document.getElementById('filterForm').submit();">
|
||||
</form>
|
||||
</div>
|
||||
FORM;
|
||||
stdhead('User ban log');
|
||||
begin_main_frame();
|
||||
echo $filterForm . $table . $paginationBottom;
|
||||
stdfoot();
|
||||
|
||||
Reference in New Issue
Block a user