Файл: vk.com_vhllam/user/navigat/navig.vid.php
Строк: 117
<?
include_once '../../sys/inc/start.php';
include_once '../../sys/inc/compress.php';
include_once '../../sys/inc/sess.php';
include_once '../../sys/inc/home.php';
include_once '../../sys/inc/settings.php';
include_once '../../sys/inc/db_connect.php';
include_once '../../sys/inc/ipua.php';
include_once '../../sys/inc/fnc.php';
include_once '../../sys/inc/user.php';
only_reg();
$set['title']='Настройка стилей';
include_once '../../sys/inc/thead.php';
title();
err();
aut();
switch ((isset($_GET['m'])) ? htmlspecialchars($_GET['m']) : null){
default:
//break;
case 'settings':
if (isset($_POST['check'])){
if (isset($_POST['panel_vid']) && ($_POST['panel_vid']==0 || $_POST['panel_vid']==1))mysql_query("UPDATE `user` SET `panel_vid` = '".intval($_POST['panel_vid'])."' WHERE `id` = '$user[id]' LIMIT 1");
if (isset($_POST['x_time']) && $_POST['x_time']==1)mysql_query("UPDATE `user` SET `x_time` = '1' WHERE `id` = '$user[id]' LIMIT 1");
else mysql_query("UPDATE `user` SET `x_time` = '0' WHERE `id` = '$user[id]' LIMIT 1");
header('Location: ?m=settings');
}
echo '<form method="post" action="?m=settings&'.$passgen.'">
<div class="p_m">
Вид навигации:<br />
<select name="panel_vid">
<option value="0" '.($user['panel_vid']==0?' selected="selected"':null).'>Иконки</option>
<option value="1" '.($user['panel_vid']==1?' selected="selected"':null).'>Слова</option>
</select><br />
<label><input type="checkbox" name="x_time"'.($user['x_time']?' checked="checked"':null).' value="1" /> Показывать время</label></div>
<input type="submit" name="check" value="Сохранить"/></form></a></div>';
break;
case 'style':
$style=array(
'b26767','b28067','b29967','b2b267','99b267','80b267','67b267','67b280','67b299','67b2b2','6799b2','6780b2','6767b2','8067b2','9967b2','b267b2','b26799','b26780',
'4c4c4c','666666','7f7f7f','754444','755444','756444','757544','647544','547544','447544','447554','447564','447575','446475','445475','444475','544475','644475',
'754475','754464','754454','000000','191919','333333'
);
if (isset($_GET['ok']) && isset($_GET['color']) && $_GET['color']<42)
{
$st=intval($_GET['color']);
$user['panel_style']=$style[$st];
mysql_query("UPDATE `user` SET `panel_style` = '".$user['panel_style']."', `panel` = '".$st."' WHERE `id` = '$user[id]' LIMIT 1");
header('Location: ?m=style');
}
echo "<div class="cont">n";
echo "<img src='/style/icons/str2.gif' alt='*'> <a href='/user/info/settings.php'>Настройки</a> | n";
echo '<b>Общие</b>';
echo "</div><div class='mails'>n";
?>
<style>
.ovs{overflow: hidden;}
.panels {padding: 11px 10px;}
.panel_u{float:left}
</style>
<div class="panels" style="padding-bottom:0;"> <img src="/style/icons/str.gif" alt="*"> Выберите цвет панели:</div>
<div class="panels ovs light_border_bottom">
<div class="panel_u" style="width:50%;">
<div style="padding-right:5px;">
<? for ($i = 0; $i <= 41; $i++) echo '<div style="-webkit-border-radius: 4px; border-radius: 4px; background-color:#'.$style[$i].'; margin-bottom: 10px; " class="ovs"><a href="/user/navigat/navig.vid.php?m=style&color='.$i.'&ok" class="arrow_link" style="display:block; text-decoration:none; padding:5px;"><div class="ovs" style="height:19px; '.($user['panel_style']==$style[$i]?'background: url(/style/panel/img_p.png) center no-repeat;':null).' "></div></a></div>'.($i==20?'</div></div><div class="panel_u" style="width:50%;"><div style="padding-right:5px;">':null).''.($i==41?'</div></div>':null);?>
</div></div>
<?
break;
}
echo "<div class="cont">n";
echo "<img src='/style/icons/str2.gif' alt='*'> <a href='/user/info/settings.php'>Настройки</a> | n";
echo '<b>Общие</b>';
echo "</div>n";
include_once '../../sys/inc/tfoot.php';