show types

This commit is contained in:
Shish 2019-11-08 18:54:32 +00:00
parent 10b9e0ccbc
commit 418f5484ed

View File

@ -18,14 +18,14 @@ class IPBanTheme extends Themelet
$h_bans = ""; $h_bans = "";
$prefix = ($database->get_driver_name() == DatabaseDriver::SQLITE ? "bans." : ""); $prefix = ($database->get_driver_name() == DatabaseDriver::SQLITE ? "bans." : "");
foreach ($bans as $ban) { foreach ($bans as $ban) {
$end_human = $ban['expires'];
$h_bans .= " $h_bans .= "
<tr> <tr>
<td width='12%'>{$ban[$prefix.'ip']}</td> <td width='12%'>{$ban[$prefix.'ip']}</td>
<td>{$ban[$prefix.'reason']}</td> <td>{$ban[$prefix.'reason']}</td>
<td width='10%'>{$ban['banner_name']}</td> <td width='10%'>{$ban['banner_name']}</td>
<td width='10%'>".substr($ban[$prefix.'added'], 0, 10)."</td> <td width='10%'>".substr($ban[$prefix.'added'], 0, 10)."</td>
<td width='15%'>{$end_human}</td> <td width='10%'>".substr($ban[$prefix.'expires'], 0, 10)."</td>
<td width='10%'>{$ban['mode']}</td>
".make_form(make_link("ip_ban/remove"))." ".make_form(make_link("ip_ban/remove"))."
<td width='8%'> <td width='8%'>
<input type='hidden' name='id' value='{$ban[$prefix.'id']}'> <input type='hidden' name='id' value='{$ban[$prefix.'id']}'>
@ -38,7 +38,7 @@ class IPBanTheme extends Themelet
$html = " $html = "
<a href='".make_link("ip_ban/list", "all=on")."'>Show All</a> <a href='".make_link("ip_ban/list", "all=on")."'>Show All</a>
<p><table id='bans' class='sortable zebra'> <p><table id='bans' class='sortable zebra'>
<thead><tr><th>IP</th><th>Reason</th><th>By</th><th>From</th><th>Until</th><th>Action</th></tr></thead> <thead><tr><th>IP</th><th>Reason</th><th>By</th><th>From</th><th>Until</th><th>Type</th><th>Action</th></tr></thead>
$h_bans $h_bans
<tfoot><tr id='add'> <tfoot><tr id='add'>
".make_form(make_link("ip_ban/add"))." ".make_form(make_link("ip_ban/add"))."
@ -47,6 +47,7 @@ class IPBanTheme extends Themelet
<td>{$user->name}</td> <td>{$user->name}</td>
<td></td> <td></td>
<td><input type='text' name='end' value='".html_escape(@$_GET['end'])."'></td> <td><input type='text' name='end' value='".html_escape(@$_GET['end'])."'></td>
<td></td>
<td><input type='submit' value='Ban'></td> <td><input type='submit' value='Ban'></td>
</form> </form>
</tr></tfoot> </tr></tfoot>