Размер файла: 3.98Kb
<?php
define( 'WBCAT', 1 );
require_once ('../inc/head.php');
// проверяем правильность пароля-логина
if (!$allow)
{ // если ошибка, то закрываем доступ
exit ('Доступ закрыт');
}
if (isset ($_POST['submit'])) {
$status = intval($_POST['status']);
$bbcode = intval($_POST['bbcode']);
$smileys = intval($_POST['smileys']);
$captcha = intval($_POST['captcha']);
$antiflood = intval($_POST['antiflood']);
$lenght_name = intval($_POST['lenght_name']);
$lenght_text = intval($_POST['lenght_text']);
$array = array('status' => $status,'bbcode' => $bbcode, 'smileys' => $smileys,'captcha' => $captcha,'antiflood' => $antiflood,'lenght_name' => $lenght_name,'lenght_text' => $lenght_text);
$ser = serialize($array);
mysql_query("UPDATE `modules` SET `set` = '$ser' WHERE `name` = 'book'") or die(mysql_error());
echo '<b>Информация обновлена</b><br/>';
}
$BOOK = mysql_fetch_array(mysql_query("SELECT `set` FROM `modules` WHERE `name` = 'book' LIMIT 1"));
$BOOK_SET = unserialize($BOOK['set']);
echo '<div class="zag">Настройки модуля ГОСТЕВАЯ КНИГА</div>';
echo '<div class="title"><form action="book_set.php" method="post">';
echo '
'.($BOOK_SET['captcha'] == true ? '<img src="'.$home.'/images/green.png" alt="on"/>' : '<img src="'.$home.'/images/red.png" alt="off"/>').'
<b>Каптча </b> :<br/>
<input type="radio" value="1" name="captcha" ' . ($BOOK_SET['captcha'] == true ? 'checked="checked"' : '') . ' />Вкл<br />
<input type="radio" value="0" name="captcha" ' . ($BOOK_SET['captcha'] == false ? 'checked="checked"' : '') . '/>Выкл<br />
'.($BOOK_SET['antiflood'] == true ? '<img src="'.$home.'/images/green.png" alt="on"/>' : '<img src="'.$home.'/images/red.png" alt="off"/>').'
<b>Антиспам (в секундах) </b> :<br/>
<input type="text" size="6" name="antiflood" value="'.$BOOK_SET['antiflood'].'"/><br/>
'.($BOOK_SET['bbcode'] == true ? '<img src="'.$home.'/images/green.png" alt="on"/>' : '<img src="'.$home.'/images/red.png" alt="off"/>').'
<b>BBcode теги </b> :<br/>
<input type="radio" value="1" name="bbcode" ' . ($BOOK_SET['bbcode'] == true ? 'checked="checked"' : '') . ' />Вкл<br />
<input type="radio" value="0" name="bbcode" ' . ($BOOK_SET['bbcode'] == false ? 'checked="checked"' : '') . '/>Выкл<br />
'.($BOOK_SET['smileys'] == true ? '<img src="'.$home.'/images/green.png" alt="on"/>' : '<img src="'.$home.'/images/red.png" alt="off"/>').'
<b>Смайлы </b>:<br/>
<input type="radio" value="1" name="smileys" ' . ($BOOK_SET['smileys'] == true ? 'checked="checked"' : '') . ' />Вкл<br />
<input type="radio" value="0" name="smileys" ' . ($BOOK_SET['smileys'] == false ? 'checked="checked"' : '') . '/>Выкл<br />
<b>Длина ника (0-255) </b> :<br/>
<input type="text" name="lenght_name" size="6" value="'.$BOOK_SET['lenght_name'].'"/><br/>
<b>Длина сообщения </b> :<br/>
<input type="text" name="lenght_text" size="6" value="'.$BOOK_SET['lenght_text'].'"/><br/>
</div>';
echo ' <div class="func">
'.($BOOK_SET['status'] == true ? '<img src="'.$home.'/images/green.png" alt="on"/>' : '<img src="'.$home.'/images/red.png" alt="off"/>').'
<b>Статус модуля </b> :<br/>
<input type="radio" value="1" name="status" ' . ($BOOK_SET['status'] == true ? 'checked="checked"' : '') . ' />Вкл<br />
<input type="radio" value="0" name="status" ' . ($BOOK_SET['status'] == false ? 'checked="checked"' : '') . '/>Выкл<br/>
</div>';
echo '<div class="title"><input type="submit" name="submit" value="Сохранить" /></form></div>';
echo '</div><div class="main"><a href="'.$home.'/adm">В админку</a></div>';
echo '</div><div class="main"><a href="'.$home.'">Главная</a></div>';
require_once ('../inc/foot.php');
?>