Размер файла: 1.47Kb
- <?php
- define( 'WBCAT', 1 );
- require_once ('../inc/head.php');
- // проверяем правильность пароля-логина
- if (!$allow)
- { // если ошибка, то закрываем доступ
- exit ('Доступ закрыт');
- }
- $id = isset($_GET['id']) ? intval($_GET['id']) : exit('Неверный запрос');
- echo '<div class="zag">Админ-панель : Бан сайта</div>';
- $ms = mysql_fetch_array(mysql_query("SELECT * FROM `sites` WHERE id='" .$id. "' LIMIT 1;"));
- if (isset($_POST['submit'])) {
- $why = htmlspecialchars(trim($_POST['why']));
- $result = mysql_query("insert into `ban_site` SET
- `url`='" . mysql_real_escape_string($ms['url']) . "',
- `date`='".$time."',
- `why`='" . mysql_real_escape_string($why) . "';");
- if ($result == true) echo "<div class='title'>Сайт в ban-list'е </div>";
- }
- else {
- echo '<div class="title"><form action="ban_site.php?id=' .$id. '" method="post">
- Вы действительно желаете забанить url '.$ms['url'].' ?<br />
- <input type = "text" name = "why" value="Причина бана"/>
- <input type="submit" name="submit" value="Забанить"/>
- </form>
- <a href="'.$settings['url'].'/cat.php?id='.$ms['id'].'&mod=view&site='.$id.'">Назад</a></div>';
- }
- echo '<div class="title"><a href="'.$settings['url'].'">На главную</a></div>';
- require_once ('../inc/foot.php');
- ?>