Размер файла: 2.17Kb
<?PHP
include '../System/core.php';
$config['title'] = 'Настройка кэширования';
include '../System/header.php';
if(!$user)
header('Location: /');
if (isset($_POST['go']))
{
$index = num($_POST['index']);
$statistic = num($_POST['statistic']);
$news = num($_POST['news']);
mysql_query("UPDATE `settings_core` SET `value` = '$index' WHERE `key` = 'Cache_index'"); $sql_count++;
mysql_query("UPDATE `settings_core` SET `value` = '$statistic' WHERE `key` = 'Cache_statistic'"); $sql_count++;
mysql_query("UPDATE `settings_core` SET `value` = '$news' WHERE `key` = 'Cache_news'"); $sql_count++;
message('Настройки успешно изменены');
}
$settings = mysql_query("SELECT * FROM `settings_core`"); $sql_count++;
while($item = mysql_fetch_array($settings))
{
$system2[$item['key']] = $item['value'];
}
$index0 = $system2['Cache_index'] == 0 ? 'checked' : '';
$index1 = $system2['Cache_index'] == 1 ? 'checked' : '';
$statistic0 = $system2['Cache_statistic'] == 0 ? 'checked' : '';
$statistic1 = $system2['Cache_statistic'] == 1 ? 'checked' : '';
$news0 = $system2['Cache_news'] == 0 ? 'checked' : '';
$news1 = $system2['Cache_news'] == 1 ? 'checked' : '';
?>
<form action="" class="text" method="POST">
Кэширование главной:<br />
<input type="radio" <?=$index1?> name="index" value="1">Вкл |
<input type="radio" <?=$index0?> name="index" value="0">Выкл<br />
<hr>
Кэширование статистики:<br />
<input type="radio" <?=$statistic1?> name="statistic" value="1">Вкл |
<input type="radio" <?=$statistic0?> name="statistic" value="0">Выкл<br />
<hr>
Кэширование новостей:<br />
<input type="radio" <?=$news1?> name="news" value="1">Вкл |
<input type="radio" <?=$news0?> name="news" value="0">Выкл<br />
<input type="submit" name="go" value="Изменить">
</form>
<div class="back"><a href="/Panel/"><img src="/Style/icons/back.png" alt="" /> В панель управления</a></div>
<div class="back"><a href="/"><img src="/Style/icons/back.png" alt="" /> На главную</a></div>
<?
include '../System/footer.php';
?>