Вход Регистрация
Файл: panel/settings_chat.php
Строк: 122
<?
include_once '../sys/includes/start.php';
include_once 
'../sys/includes/compress.php';
include_once 
'../sys/includes/sess.php';
include_once 
'../sys/includes/home.php';
include_once 
'../sys/includes/settings.php';
$temp_set=$set;
include_once 
'../sys/includes/db_connect.php';
include_once 
'../sys/includes/ipua.php';
include_once 
'../sys/includes/fnc.php';
include_once 
'../sys/includes/adm_check.php';
include_once 
'../sys/includes/user.php';
user_access('adm_set_chat',null,'index.php?'.SID);
adm_check();
$set['title']='Настройки чата';
include_once 
'../sys/includes/header.php';
title();
auter();
if (isset(
$_POST['save']))
{
$temp_set['time_chat']=intval($_POST['time_chat']);
mysql_query("ALTER TABLE `user` CHANGE `set_time_chat` `set_time_chat` INT( 11 ) DEFAULT '".$temp_set['time_chat']."'");
$temp_set['umnik_new']=intval($_POST['umnik_new']);
$temp_set['umnik_help']=intval($_POST['umnik_help']);
$temp_set['umnik_time']=intval($_POST['umnik_time']);
$temp_set['shutnik_new']=intval($_POST['shutnik_new']);
if(
preg_match("#^([A-zА-я0-9-_ ])+$#ui"$_POST['chat_shutnik']) && strlen2($_POST['chat_shutnik'])>&& strlen2($_POST['chat_shutnik'])<=32)
{
$temp_set['chat_shutnik']=$_POST['chat_shutnik'];
}
if(
preg_match("#^([A-zА-я0-9-_ ])+$#ui"$_POST['chat_umnik']) && strlen2($_POST['chat_umnik'])>&& strlen2($_POST['chat_umnik'])<=32)
{
$temp_set['chat_umnik']=$_POST['chat_umnik'];
}
if (
save_settings($temp_set))
{
admin_log('Настройки','Система','Изменение параметров чата');
msg('Настройки успешно приняты');
}else{
$err='Нет прав для изменения файла настроек!';
}
}
err();
echo 
"<form method='post' action='?'>";
echo 
"<div class='forum_tema'>";
echo 
"<b>Автообновление в чате:</b><br />";
echo 
"<input type='text' name='time_chat' value='".$temp_set['time_chat']."' maxlength='3' /><br />";
echo 
"<b>Таймаут между вопросами (умник в чате):</b><br />";
echo 
"<input type='text' name='umnik_new' value='".$temp_set['umnik_new']."' maxlength='3' /><br />";
echo 
"<b>Таймаут между подсказками (умник в чате):</b><br />";
echo 
"<input type='text' name='umnik_help' value='".$temp_set['umnik_help']."' maxlength='3' /><br />";
echo 
"<b>Общее время ожидание ответа (умник в чате):</b><br />";
echo 
"<input type='text' name='umnik_time' value='".$temp_set['umnik_time']."' maxlength='3' /><br />";
echo 
"<b>Таймаут между шутками (шутник в чате):</b><br />";
echo 
"<input type='text' name='shutnik_new' value='".$temp_set['shutnik_new']."' maxlength='3' /><br />";
echo 
"<b>Ник шутника:</b><br />";
echo 
"<input type='text' name='chat_shutnik' value='".$temp_set['chat_shutnik']."' /><br />";
echo 
"<b>Ник умника:</b><br />";
echo 
"<input type='text' name='chat_umnik' value='".$temp_set['chat_umnik']."' /><br />";
echo 
"<input value='Изменить' name='save' type='submit' />";
echo 
"</div>";
echo 
"</form>";
echo 
"<a href='/panel/chat_shut.php'><div class='foot'>";
echo 
"<img src='/s-klub/img/smiles.png'> Шутки";
echo 
"</div></a>";
echo 
"<a href='/panel/chat_vopr.php'><div class='foot'>";
echo 
"<img src='/s-klub/img/umnik.png'> Вопросы викторины";
echo 
"</div></a>";
if (
user_access('adm_panel_show'))
{
echo 
"<a href='/panel/'><div class='foot'>";
echo 
"<img src='/s-klub/img/left.png'> В админку";
echo 
"</div></a>";
}
include_once 
'../sys/includes/footer.php';
?>
Онлайн: 0
Реклама