<?
include '../config.php';
include '../func.php';
head();
aut();
ban();

if (isset($_POST['ok'])) {
   $an = my_int($_POST['an']);
   $an = ($an == 1) ? 1 : 0;
   mysql_query("UPDATE `setting` SET `antimat` = '$an' WHERE `ids` = '1'");
   header('Location: admin.php?do=antimat&ok');
}

if (isset($_GET['ok'])) msg('Сохранено!');

$sel = mysql_fetch_array(mysql_query("SELECT `antimat` FROM `setting` WHERE `ids` = '1'"));

if ($sel[0] == 1) $ch_1 = 'checked="checked"';
else $ch_2 = 'checked="checked"';

echo $div_title . 'Управление антиматом' . $div_end . $div_left;
echo '<FORM method="POST" action="admin.php?do=antimat">
      Антимат: <input type="radio" name="an" ' . $ch_1 . ' value="1"/> Вкл
	  <input type="radio" name="an" ' . $ch_2 . ' value="2"/> Выкл
	  <br/>
	  <input type="submit" name="ok" value="Сохранить"/>
	  </FORM>';
echo $div_end;

navig();

foot();

?>
