Gazelle/sections/tools/managers/whitelist_list.php

70 lines
1.7 KiB
PHP
Raw Normal View History

2011-03-28 14:21:28 +00:00
<?
2013-05-02 08:00:23 +00:00
if (!check_perms('admin_whitelist')) {
error(403);
}
2011-03-28 14:21:28 +00:00
2014-01-28 08:00:56 +00:00
View::show_header('Client Whitelist Manager');
2013-07-04 08:00:56 +00:00
$DB->query('
SELECT id, vstring, peer_id
FROM xbt_client_whitelist
ORDER BY peer_id ASC');
2011-03-28 14:21:28 +00:00
?>
2012-08-19 08:00:19 +00:00
<div class="header">
2014-01-28 08:00:56 +00:00
<h2>Client Whitelist</h2>
2012-08-19 08:00:19 +00:00
</div>
2014-01-28 08:00:56 +00:00
<div class="box2 pad thin">
<form class="add_form" name="clients" action="" method="post">
<input type="hidden" name="action" value="whitelist_alter" />
<input type="hidden" name="auth" value="<?=$LoggedUser['AuthKey']?>" />
<table>
<tr class="colhead">
<td colspan="4">Add client</td>
</tr>
<tr class="rowa">
<td>
<input type="text" size="60" name="client" placeholder="Client name" />
</td>
<td>
<input type="text" size="10" name="peer_id" placeholder="Peer ID" />
</td>
<td>
<input type="submit" value="Create" />
</td>
</tr>
</table>
</form>
2011-03-28 14:21:28 +00:00
<table width="100%">
<tr class="colhead">
<td>Client</td>
<td>Peer ID</td>
<td>Submit</td>
</tr>
</table>
<?
$Row = 'b';
2013-05-02 08:00:23 +00:00
while (list($ID, $Client, $Peer_ID) = $DB->next_record()) {
2013-10-25 08:00:59 +00:00
$Row = $Row === 'a' ? 'b' : 'a';
2011-03-28 14:21:28 +00:00
?>
2012-09-15 08:00:25 +00:00
<form class="manage_form" name="clients" action="" method="post">
2011-03-28 14:21:28 +00:00
<input type="hidden" name="action" value="whitelist_alter" />
<input type="hidden" name="auth" value="<?=$LoggedUser['AuthKey']?>" />
<table>
<tr class="row<?=$Row?>">
<td>
<input type="hidden" name="id" value="<?=$ID?>" />
2014-01-28 08:00:56 +00:00
<input type="text" size="60" name="client" value="<?=$Client?>" />
2011-03-28 14:21:28 +00:00
</td>
<td>
<input type="text" size="10" name="peer_id" value="<?=$Peer_ID?>" />
</td>
<td>
<input type="submit" name="submit" value="Edit" />
<input type="submit" name="submit" value="Delete" />
</td>
</tr>
</table>
</form>
<? } ?>
2014-01-28 08:00:56 +00:00
</div>
2013-05-02 08:00:23 +00:00
<? View::show_footer(); ?>