Gazelle/sections/tools/managers/dnu_list.php

72 lines
1.8 KiB
PHP
Raw Normal View History

2011-03-28 14:21:28 +00:00
<?
2013-04-24 08:00:23 +00:00
if (!check_perms('admin_dnu')) {
error(403);
}
2013-05-16 08:00:10 +00:00
$Title = 'Manage the "Do Not Upload" list';
2011-03-28 14:21:28 +00:00
2013-05-16 08:00:10 +00:00
View::show_header($Title);
2013-04-24 08:00:23 +00:00
$DB->query("
SELECT
d.ID,
d.Name,
d.Comment,
d.UserID,
d.Time
2011-03-28 14:21:28 +00:00
FROM do_not_upload as d
2013-04-24 08:00:23 +00:00
LEFT JOIN users_main AS um ON um.ID=d.UserID
2011-03-28 14:21:28 +00:00
ORDER BY d.Time DESC");
?>
2012-08-19 08:00:19 +00:00
<div class="header">
2013-05-16 08:00:10 +00:00
<h2><?=($Title)?></h2>
2012-08-19 08:00:19 +00:00
</div>
2011-03-28 14:21:28 +00:00
<table>
2013-05-16 08:00:10 +00:00
<tr class="colhead">
<td colspan="4">Add an entry to the "Do Not Upload" list</td>
</tr>
<tr class="rowa">
<form class="add_form" name="dnu" action="tools.php" method="post">
<input type="hidden" name="action" value="dnu_alter" />
<input type="hidden" name="auth" value="<?=$LoggedUser['AuthKey']?>" />
<td>
2013-06-17 08:01:02 +00:00
<input type="text" name="name" size="40" />
2013-05-16 08:00:10 +00:00
</td>
<td colspan="2">
<input type="text" name="comment" size="60" />
</td>
<td>
<input type="submit" value="Create" />
</td>
</form>
</tr>
2011-03-28 14:21:28 +00:00
<tr class="colhead">
<td>Name</td>
<td>Comment</td>
<td>Added</td>
<td>Submit</td>
</tr>
2013-04-24 08:00:23 +00:00
<? while (list($ID, $Name, $Comment, $UserID, $DNUTime) = $DB->next_record()) { ?>
2011-03-28 14:21:28 +00:00
<tr>
2013-02-15 08:00:35 +00:00
<form class="manage_form dnu" action="tools.php" method="post">
2011-03-28 14:21:28 +00:00
<td>
<input type="hidden" name="action" value="dnu_alter" />
<input type="hidden" name="auth" value="<?=$LoggedUser['AuthKey']?>" />
<input type="hidden" name="id" value="<?=$ID?>" />
2013-06-17 08:01:02 +00:00
<input type="text" name="name" value="<?=display_str($Name)?>" size="40" />
2011-03-28 14:21:28 +00:00
</td>
<td>
<input type="text" name="comment" value="<?=display_str($Comment)?>" size="60" />
</td>
<td>
2012-10-11 08:00:15 +00:00
<?=Users::format_username($UserID, false, false, false)?><br />
2013-05-16 08:00:10 +00:00
<? echo time_diff($DNUTime, 1) . "\n"; ?>
2013-02-15 08:00:35 +00:00
</td>
2011-03-28 14:21:28 +00:00
<td>
<input type="submit" name="submit" value="Edit" />
<input type="submit" name="submit" value="Delete" />
</td>
</form>
</tr>
2013-04-24 08:00:23 +00:00
<? } ?>
2011-03-28 14:21:28 +00:00
</table>
2013-02-15 08:00:35 +00:00
<? View::show_footer(); ?>