Вход Регистрация
Файл: adm_panel/settings_sys.php
Строк: 136
<?
include_once '../sys/inc/start.php';
include_once 
'../sys/inc/compress.php';
$temp_set=$set;
include_once 
'../sys/inc/db_connect.php';
include_once 
'../sys/inc/ipua.php';
include_once 
'../sys/inc/fnc.php';
include_once 
'../sys/inc/adm_check.php';
include_once 
'../sys/inc/user.php';
user_access('adm_set_sys',null,'index.php?'.SID);
adm_check();

$set['title']='Настройки системы';
include_once 
'../sys/inc/thead.php';
top();
err();
if (isset(
$_POST['save']))
{

$temp_set['title']=esc($_POST['title']);
$temp_set['mail_backup']=esc($_POST['mail_backup']);
$temp_set['p_str']=intval($_POST['p_str']);
mysql_query("ALTER TABLE `user` CHANGE `set_p_str` `set_p_str` INT( 11 ) DEFAULT '$temp_set[p_str]'");


if (!
preg_match('#..#',$_POST['set_them']) && is_dir(H.'style/themes/'.$_POST['set_them']))
{
$temp_set['set_them']=$_POST['set_them'];
mysql_query("ALTER TABLE `user` CHANGE `set_them` `set_them` VARCHAR( 32 ) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT '$temp_set[set_them]'");
}
if (!
preg_match('#..#',$_POST['set_them2']) && is_dir(H.'style/themes/'.$_POST['set_them2']))
{
$temp_set['set_them2']=$_POST['set_them2'];
mysql_query("ALTER TABLE `user` CHANGE `set_them2` `set_them2` VARCHAR( 32 ) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT '$temp_set[set_them2]'");
}

$temp_set['show_err_php']=(isset($_POST['show_err_php']) && $_POST['show_err_php']);
$temp_set['antidos']=(isset($_POST['antidos']) && $_POST['antidos']);
$temp_set['antimat']=(isset($_POST['antimat']) && $_POST['antimat']);

$temp_set['meta_keywords']=$_POST['meta_keywords'];
$temp_set['meta_description']=$_POST['meta_description'];




if (
save_settings($temp_set))
{
admin_log('Настройки','Система','Изменение системных настроек');
msg('Настройки успешно приняты');
}

else
$err='Нет прав для изменения файла настроек';
}




echo 
"<form method="post" action="?">n";
echo 
"<div class='foot1'>n";
echo 
"<input name="title" value="$temp_set[title]" type="text" /> Название сайта | Заголовок<br />n";
echo 
"<input name="p_str" value="$temp_set[p_str]" type="text" /> Пунктов на страницу<br />n";
echo 
"</div>";
echo 
"<div class='foot1'>n";
echo 
"<select name='set_them'>n";
$opendirthem=opendir(H.'style/themes');
while (
$themes=readdir($opendirthem)){
// пропускаем корневые папки и файлы
if ($themes=='.' || $themes=='..' || !is_dir(H."style/themes/$themes"))continue;
// пропускаем темы для web браузеров
if (file_exists(H."style/themes/$themes/.only_for_web"))continue;
echo 
"<option value='$themes'".($temp_set['set_them']==$themes?" selected='selected'":null).">".trim(file_get_contents(H.'style/themes/'.$themes.'/them.name'))."</option>n";
}
closedir($opendirthem);
echo 
"</select> Тема оформления (WAP)<br />n";

echo 
"<select name='set_them2'>n";
$opendirthem=opendir(H.'style/themes');

while (
$themes=readdir($opendirthem)){
// пропускаем корневые папки и файлы
if ($themes=='.' || $themes=='..' || !is_dir(H."style/themes/$themes"))continue;
// пропускаем темы для wap браузеров
if (file_exists(H."style/themes/$themes/.only_for_wap"))continue;
echo 
"<option value='$themes'".($temp_set['set_them2']==$themes?" selected='selected'":null).">".trim(file_get_contents(H.'style/themes/'.$themes.'/them.name'))."</option>n";
}
closedir($opendirthem);
echo 
"</select> Тема офоомления (WEB)<br />n";
echo 
"</div>";
echo 
"<div class='foot1'>n";
echo 
"<textarea name='meta_keywords'>$temp_set[meta_keywords]</textarea> Ключевые слова (META)*<br />n";
echo 
"<textarea name='meta_description'>$temp_set[meta_description]</textarea> Описание (META)*<br />n";
echo 
"</div>";
echo 
"<div class='foot1'>n";
echo 
"<label><input type='checkbox'".($temp_set['antidos']?" checked='checked'":null)." name='antidos' value='1' /> Анти-Dos**</label><br />n";
echo 
"<label><input type='checkbox'".($temp_set['antimat']?" checked='checked'":null)." name='antimat' value='1' /> Анти-Мат***</label><br />n";
echo 
"<label><input type='checkbox'".($temp_set['show_err_php']?" checked='checked'":null)." name='show_err_php' value='1' /> Показывать ошибки</label><br />n";
echo 
"</div>";
echo 
"<div class='foot1'>n";
echo 
"<input type='text' name='mail_backup' value='$temp_set[mail_backup]'  /> E-mail для BackUp<br />n";
echo 
"</div>";
echo 
"* META теги в коде страницы. Информация для поисковых систем.<br />n";
echo 
"** Анти-Dos - защита от частых запросов с одного IP-адреса<br />n";
echo 
"*** При обнаружении нецензурной лексики в сообщении выводится предупреждение. На третий раз задействуется БАН (1 час).<br />n";

echo 
"<input value="Изменить" name='save' type="submit" />n";
echo 
"</form>n";

if (
user_access('adm_panel_show')){
echo 
"<div class='foot1'>n";
icon_adm_panel();echo "<a href='/adm_panel/'>Панель управления</a><br />n";
echo 
"</div>n";
}
include_once 
'../sys/inc/tfoot.php';
?>
Онлайн: 1
Реклама