Вход Регистрация
Файл: panel/settings_sys.php
Строк: 77
<?php

/* DCMS Special
 * Дата последнего редактирования 18.01.2016
 * Модифицировал densnet
 */

require_once '../sys/inc/start.php';
require_once 
H . 'sys/inc/compress.php';
require_once 
H . 'sys/inc/sess.php';
require_once 
H . 'sys/inc/settings.php';
$temp_set = $set;
require_once 
H . 'sys/inc/db_connect.php';
require_once 
H . 'sys/inc/ipua.php';
require_once 
H . 'sys/inc/fnc.php';
require_once 
H . 'sys/inc/adm_check.php';
require_once 
H . 'sys/inc/user.php';

access('adm_set_sys', null, 'index.php?' . SID);
adm_check();

$set['title'] = lang('Настройки системы');
require_once 
H . 'sys/inc/thead.php';

if (isset(
$_POST['save'])) {

    
$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'] = esc($_POST['meta_keywords']);
    
$temp_set['meta_description'] = esc($_POST['meta_description']);
    
$temp_set['title'] = esc(stripcslashes(htmlspecialchars($_POST['title'])), 1);
    
$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 (
save_settings($temp_set)) {
        
admin_log(lang('Настройки'), lang('Система'), lang('Изменение системных настроек'));
        
$_SESSION['message'] = lang('Изменения сохранены');

        
header("Location: ?");
        exit();
    } else {
        
$err = 'Нет прав для изменения файла настроек';
    }
}

aut();
err();

#Навигация
echo "<div class='list-group-item-null list-group-item-grey'><small>";
echo 
"<a href='/' class='hint--right' data-hint='" . lang('На главную') . "'><i class='fa fa-home fa-lg'></i></a> <i class='fa fa-angle-right fa-fw'></i> ";
echo 
"<a href='/panel/'>" . lang('Панель управления') . "</a> <i class='fa fa-angle-right fa-fw'></i> ";
echo 
lang('Настройка системы');
echo 
"</small></div><br />";

echo 
"<form method='post' class='list-group-item-null' action='?'>";

$doc->Input('title', 'Название сайта', 50, "$temp_set[title]");
$doc->Input('p_str', 'Пунктов на страницу', 3, "$temp_set[p_str]");
$doc->Textarea('meta_keywords', 'Ключевые слова META', 100, "$temp_set[meta_keywords]");
$doc->Textarea('meta_description', 'Описание META', 100, "$temp_set[meta_description]");

$doc->Checkbox('antidos', 'Анти-Dos', 1, "" . ($temp_set['antidos'] ? " checked='checked'" : null) . "");
$doc->Checkbox('antimat', 'Анти-Мат', 1, "" . ($temp_set['antimat'] ? " checked='checked'" : null) . "");
$doc->Checkbox('show_err_php', 'Ошибки интерпретатора', 1, "" . ($temp_set['show_err_php'] ? " checked='checked'" : null) . "");

$doc->Input('mail_backup', 'E-mail для BackUp', 100, "$temp_set[mail_backup]");

echo 
"<br />";

echo 
"* Анти-Dos - защита от частых запросов с одного IP-адреса<br />n";
$doc->Button('btn btn-success btn-sm', 'save', 'save', 'Сохранить');
echo 
"</form>n";

require_once 
H . 'sys/inc/tfoot.php';
Онлайн: 3
Реклама