Файл: panel-control/style.php
Строк: 30
<?
include_once('../apahe/ini.php');
$inc['title'] = 'Настройка оформления';
include_once('../apahe/top.php');
if (!isset($apache)){
header ('location: /input.dll');
exit;
}
if ($apache['level']>=2){
if(isset($_POST['theme']) and !empty($_POST['theme'])){
$style = txt($_POST['theme']);
mysql_query("UPDATE `ini` SET `style` = '".$style."' WHERE `id` = '1' ");
header ('Location: /panel-control/style.dll?set=okey');
}
echo '<div class="main-text">';
echo '<a href="index.dll" title="Новости">Панель</a>';
echo '</div>';
if ($_GET['set']==okey){addod('Оформление успешно изменено.');}
echo '<div class="main-href"><form action="style.dll" method="post">';
echo 'Выберите оформление:</br><select name="theme">';
$them=opendir(HOME .'/sheet/style/');
while ($theme=readdir($them)){
if (is_dir(HOME ."/sheet/style/$theme/") && $theme!='.' && $theme!='..'){
if ($them==$theme){
$check='selected="selected"';
}else{
$check=NULL;
}
echo "<option $check value="$theme">".trim(file_get_contents(HOME .'/sheet/style/'.$theme.'/name.sgr'))."</option>";
}
}
echo '</select></br>';
echo "<input value="Сменить" title="Сменить" type="submit" />";
echo '</form></div>';
}else{
header ('location: /index.dll');
}
include_once('../apahe/bottom.php');
?>