Файл: vkolhoze.com/inc/color_nick.php
Строк: 229
<?
$ncol = (int) $_GET['init_color'];
if($ncol!=''){
if($ncol == 1){$color = 'El_1';}
elseif($ncol == 2){$color = 'El_2';}
elseif($ncol == 3){$color = 'El_3';}
elseif($ncol == 4){$color = 'El_4';}
elseif($ncol == 5){$color = 'El_5';}
elseif($ncol == 6){$color = 'El_6';}
elseif($ncol == 7){$color = 'El_7';}
elseif($ncol == 8){$color = 'El_8';}
elseif($ncol == 9){$color = 'El_9';}
elseif($ncol == 10){$color = 'El_10';}
elseif($ncol == 11){$color = 'El_11';}
elseif($ncol == 12){$color = 'El_12';}
elseif($ncol == 13){$color = 'El_13';}
elseif($ncol == 14){$color = 'El_14';}
elseif($ncol == 15){$color = 'El_15';}
elseif($ncol == 16){$color = 'El_16';}
elseif($ncol == 17){$color = 'El_17';}
elseif($ncol == 18){$color = 'El_18';}
elseif($ncol == 19){$color = 'El_19';}
elseif($ncol == 20){$color = 'El_20';}
else {$color = '';}
if($ku['euro']>=1){
mysql_query('UPDATE `kolhoz_user` SET `color_nick`="'.$color.'" WHERE `id`="'.$ku['id'].'"');
mysql_query("UPDATE `kolhoz_user` SET `euro` = '".($ku['euro']-1)."' WHERE `id` = '$ku[id]'");
mysql_query("UPDATE `kolhoz_user` SET `color_nick`='".$color."' WHERE `id`='$ku[id]'");
$_SESSION['yas']=1;
header('location:?col_nik');
}else{$_SESSION['euro']=1-$ku['euro'];
$_SESSION['no']=1;
header("Location:?col_nik");}
exit;
}
if(isset($_SESSION['no'])){echo "<div class='block'><center><font color='tomato'>У вас нет ключей!</font></center></div>"; unset($_SESSION['no']);}
if(isset($_SESSION['yas'])){echo "<div class='block'><center><font color='violet'>Вы успешно сменили цвет ника!</font></center></div>"; unset($_SESSION['yas']);}
echo '<div class="event"><h1>Цвет вашего ника</h1></div>'."n";
echo '<div class="content"><div class="block">'."n";
echo '<li>Вид вашего ника: '.nc($ku['id']).'</li>'."n";
echo '<li>Цена смены цвета: <b>1</b><img width="16" height="16" src="img/icons/zkl.png" alt="o"></li>'."n";
echo '<div style="padding:3px;">'."n";
echo '<style type="text/css">.color_nick{display:inline-block; border-radius:3px; padding:3px 6px;}</style>'."n";
echo '<a href="?col_nik&init_color=1" class="color_nick" style="background:#FF00FF;"> </a> '."n";
echo '<a href="?col_nik&init_color=2" class="color_nick" style="background:#64C061;"> </a> '."n";
echo '<a href="?col_nik&init_color=3" class="color_nick" style="background:#7ECDED;"> </a> '."n";
echo '<a href="?col_nik&init_color=4" class="color_nick" style="background:#FACF0D;"> </a> '."n";
echo '<a href="?col_nik&init_color=5" class="color_nick" style="background:#20B2AA;"> </a> <br/>'."n";
echo '<a href="?col_nik&init_color=6" class="color_nick" style="background:#946A44;"> </a> '."n";
echo '<a href="?col_nik&init_color=7" class="color_nick" style="background:#7FFF00;"> </a> '."n";
echo '<a href="?col_nik&init_color=8" class="color_nick" style="background:#FFEBCD;"> </a> '."n";
echo '<a href="?col_nik&init_color=9" class="color_nick" style="background:#8A2BE2;"> </a> '."n";
echo '<a href="?col_nik&init_color=10" class="color_nick" style="background:#FF8C00;"> </a> <br/>'."n";
echo '<a href="?col_nik&init_color=11" class="color_nick" style="background:#00BFFF;"> </a> '."n";
echo '<a href="?col_nik&init_color=12" class="color_nick" style="background:#FF7F50;"> </a> '."n";
echo '<a href="?col_nik&init_color=13" class="color_nick" style="background:#008B8B;"> </a> '."n";
echo '<a href="?col_nik&init_color=14" class="color_nick" style="background:#ADFF2F;"> </a> '."n";
echo '<a href="?col_nik&init_color=15" class="color_nick" style="background:#F0E68C;"> </a> <br/>'."n";
echo '<a href="?col_nik&init_color=16" class="color_nick" style="background:#F08080;"> </a> '."n";
echo '<a href="?col_nik&init_color=17" class="color_nick" style="background:#F4A460;"> </a> '."n";
echo '<a href="?col_nik&init_color=18" class="color_nick" style="background:#008080;"> </a> '."n";
echo '<a href="?col_nik&init_color=19" class="color_nick" style="background:#FF7F24;"> </a> '."n";
echo '<a href="?col_nik&init_color=20" class="color_nick" style="background:#8B0000;"> </a> '."n";
echo '</div>'."n";
echo '<li><a href="?col_nik&init_color=21">Восстановить</a> стандартный цвет ника!</li>'."n";
echo '</div></div>'."n";
include_once 'inc/foot.php';
?>