<?php
// check rights
if ($login->check_rights()>=3):
// loading of reqired classes
include CLASSES_PATH."Banns.php";
// creating of instances
$banns=new Banns();
// add new
if ($_GET["action"]=="add_ban" AND $_POST["ip"]!="") { $banns->add(); }
// delete
if ($_GET["action"]=="remove_ban" AND isset($_GET["id"])) { $banns->remove(); }
?>

<h2><?php echo LANG_BANNS; ?></h2>

<form action="./admin.php?f=banns&amp;action=add_ban" method="post">

<div>

<p><strong><?php echo LANG_ADD_BAN; ?>:</strong><br /><input type="text" name="ip" style="width: 150px;"<?php if (isset($_POST["submit"]) AND $_POST["ip"]=="") { echo " class=\"input-error\""; } ?> /></p>

</div>

<div>

<p><input type="submit" name="submit" value="<?php echo LANG_SAVE; ?>" /></p>

</div>

</form>

<table>
<tr>
<th>IP</th>
<th style="width: 25%;"><?php echo LANG_OPTIONS; ?></th>
</tr>
<?php
$banns->print_data();
?>
</table>

<?php else: $access_denied=1; endif; ?>