<?
require'../config.php';
$align='left';
$title='Выбор версии';
if (empty($_GET['act']))head();
aut();
who_add(0,'enter');
$act = $_GET['act'];
if (empty($act)){
echo "Размер шрифта:<br/>";
if ($ver!='wml'){
echo '<form method="post" action="versia?act=fsize&'.SID.'" name="auth">';
echo '<select name="fsize">
<option value="medium">Нормальный</option>
<option value="small">Мелкий</option>
<option value="big">Большой</option>
</select><br/>
<input class="ibutton" type="submit" class="ibutton" value="Сменить"/></form>';
}else{
echo '<select name="fsize">
<option value="medium">Нормальный</option>
<option value="small">Мелкий</option>
<option value="big">Большой</option>
</select><br/>
<anchor>Сменить<go href="versia?act=fsize&'.SID.'" method="post">
<postfield name="fsize" value="$(fsize)"/>
</go></anchor><br/><br />';
}
echo '<br/>Стиль чата:<br/>';
if ($ver!='wml')echo '<form method="post" action="versia?act=style&'.SID.'" name="auth">';
echo '<select name="style">
<option value="'.$set['style'].'">'.$set['style'].'</option>';
$d=opendir(H."style");
while(($e=readdir($d))!==false){
if ($e=='.'||$e=='..'||$e==".htaccess"||$e==".php"||$e==".Thumbs.db"||$e=="Thumbs.db") continue;
$la = $la + 1;
if($la>$c-1 and $la<$c+1000){
$e1 = strtr($e, array ('.css' => ''));
if (substr_count($e, '.css')!=0){
echo '<option value="'.$e1.'">'.$e1.'</option>';
}
}
}
closedir($d);
echo '</select>';
if ($ver=='wml'){
echo '<br /><anchor title="go">Выбрать<go href="versia?act=style&'.SID.'" method="post">';
echo '<postfield name="style" value="$(style)"/>
</go></anchor>';
echo '<br/><br/>';
}else{
echo '<br /><input type="submit" class="ibutton" value="Выбрать"><br />';
}
} else if ($act=='fsize'){
$fsize = check($_POST['fsize']);
$db->sql_query ("Update users set fsize='".$fsize."' where id ='".$user['id']."'");
header ('Location: versia?'.SID); exit;
}else if ($act=='style'){
$style = check($_POST['style']);
$db->sql_query ("Update users set style='".$style."' where id ='".$user['id']."'");
header ('Location: versia?'.SID); exit;
}
echo '<br/>';
echo gb.'<a href="'.H.'my/index">Личный кабинет</a><br/>'.div;
echo gb.'<a href="'.H.'enter">Прихожая</a><br/>'.div;
info_compress();
echo 'Время:'.$debag->endTimer().' сек<br />'.div;
foot();
?>