View file admin/banners.php

File size: 1.42Kb
<?php
require_once('includes/db.php');
require_once('includes/config.php');
require_once('includes/auth.php');

require_once('includes/header.php');

$error = '';
$message = '';
if(isset($_POST['banner']))
{
   mysql_query('UPDATE users SET banner = "' . $_POST['banner'] . '"');
   $message = 'Все баннеры обновлены';
}

?>
<table align="center" width="100%" border="0" cellspacing="0" cellpadding="0">
<tr class="addbg"><td align="center" background="images/t5.gif"><font color="#FFFFFF"></font>
        <font class="header">
        Установка всех баннеров
      </font></td>
</tr></table><br>

<div align="center">
<font class="succ">
<?php echo $message; ?>
</font><br>
</div>

<div align="center">
<font class="error">
<?php echo $error; ?>
</font><br>
</div>


<br>

<table align="center" width="99%" border="0" cellspacing="1" cellpadding="3">
<form action="" method="post">


<tr class="addbg"><td>
Все баннеры:
</td><td>
<select name="banner" id="banner" >
        <option value="top">Вверху</option>
        <option value="bottom">Внизу</option>
        <option value="none">Нет</option>
</select>


<tr><td colspan="2" align="center">
<br>
<input type="submit" name="add" value="Изменить" class="button">
<input type="submit" name="cancel" value="<?php echo CANCEL; ?>" class="button">
</td></tr>


</form>

</table>

<br><br>

<?php
require_once('includes/footer.php');
?>