Файл: ncolor.php
Строк: 382
<?
include_once 'sys/includes/start.php';
include_once 'sys/includes/compress.php';
include_once 'sys/includes/sess.php';
include_once 'sys/includes/home.php';
include_once 'sys/includes/settings.php';
include_once 'sys/includes/db_connect.php';
include_once 'sys/includes/ipua.php';
include_once 'sys/includes/fnc.php';
include_once 'sys/includes/user.php';
$set['title']='Покупка цвета ника';
include_once 'sys/includes/header.php';
title();
auter();
if (!isset($user))
{
echo "<div class='err'>";
echo "<b>Покупать цвет ника могут только обитатели нашего сайта!</b><br />";
echo "</div>";
include_once 'sys/includes/footer.php';
exit;
}
$color=mysql_fetch_array(mysql_query("SELECT * FROM `ncolor`"));
if (isset($_GET['standart']))
{
if ($user['balls']<$color['cena2'])
{
echo "<div class='err'>";
echo "<b>У вас недостаточно баллов для покупки нового цвета для своего ника!</b><br />";
echo "</div>";
}else{
echo "<div class='forum_tema'>";
echo "<img src='/s-klub/img/money.png'> ";
echo "Стоимость обычного цвета ".$color['cena2']." балов!";
echo "</div>";
echo "<a href='ncolor.php?sav1'><div class='u_menu'>";
echo "<img src='/s-klub/my/ncolor.png'> ";
echo GradientText("$user[nick]", "#FF0000", "#FF0000");
echo "</div></a>";
echo "<a href='ncolor.php?sav2'><div class='u_menu'>";
echo "<img src='/s-klub/my/ncolor.png'> ";
echo GradientText("$user[nick]", "#D2691E", "#D2691E");
echo "</div></a>";
echo "<a href='ncolor.php?sav3'><div class='u_menu'>";
echo "<img src='/s-klub/my/ncolor.png'> ";
echo GradientText("$user[nick]", "#FF1493", "#FF1493");
echo "</div></a>";
echo "<a href='ncolor.php?sav4'><div class='u_menu'>";
echo "<img src='/s-klub/my/ncolor.png'> ";
echo GradientText("$user[nick]", "#0000FF", "#0000FF");
echo "</div></a>";
echo "<a href='ncolor.php?sav5'><div class='u_menu'>";
echo "<img src='/s-klub/my/ncolor.png'> ";
echo GradientText("$user[nick]", "#008000", "#008000");
echo "</div></a>";
echo "<a href='ncolor.php?sav6'><div class='u_menu'>";
echo "<img src='/s-klub/my/ncolor.png'> ";
echo GradientText("$user[nick]", "#FFFF00", "#FFFF00");
echo "</div></a>";
echo "<a href='ncolor.php?sav7'><div class='u_menu'>";
echo "<img src='/s-klub/my/ncolor.png'> ";
echo GradientText("$user[nick]", "#FFD700", "#FFD700");
echo "</div></a>";
echo "<a href='ncolor.php?sav8'><div class='u_menu'>";
echo "<img src='/s-klub/my/ncolor.png'> ";
echo GradientText("$user[nick]", "#FFA500", "#FFA500");
echo "</div></a>";
echo "<a href='ncolor.php?sav9'><div class='u_menu'>";
echo "<img src='/s-klub/my/ncolor.png'> ";
echo GradientText("$user[nick]", "#8B008B", "#8B008B");
echo "</div></a>";
echo "<a href='ncolor.php?sav10'><div class='u_menu'>";
echo "<img src='/s-klub/my/ncolor.png'> ";
echo GradientText("$user[nick]", "#000000", "#000000");
echo "</div></a>";
echo "<a href='ncolor.php?sav11'><div class='u_menu'>";
echo "<img src='/s-klub/my/ncolor.png'> ";
echo GradientText("$user[nick]", "#696969", "#696969");
echo "</div></a>";
echo "<a href='ncolor.php?sav12'><div class='u_menu'>";
echo "<img src='/s-klub/my/ncolor.png'> ";
echo GradientText("$user[nick]", "#FFFFFF", "#FFFFFF");
echo "</div></a>";
echo "<a href='ncolor.php?sav13'><div class='u_menu'>";
echo "<img src='/s-klub/my/ncolor.png'> ";
echo GradientText("$user[nick]", "#669999", "#669999");
echo "</div></a>";
echo "<a href='ncolor.php?sav14'><div class='u_menu'>";
echo "<img src='/s-klub/my/ncolor.png'> ";
echo GradientText("$user[nick]", "#00FF00", "#00FF00");
echo "</div></a>";
}
echo "<div class='foot'>";
echo "<img src='/s-klub/img/left.png'> <a href='ncolor.php'>Назад</a><br />";
echo "</div>";
include_once 'sys/includes/footer.php';
exit;
}
if ((isset($_GET['sav1'])) || (isset($_GET['sav2'])) || (isset($_GET['sav3'])) || (isset($_GET['sav4'])) || (isset($_GET['sav5'])) || (isset($_GET['sav6'])) || (isset($_GET['sav7'])) || (isset($_GET['sav8'])) || (isset($_GET['sav9'])) || (isset($_GET['sav10'])) || (isset($_GET['sav11'])) || (isset($_GET['sav12'])) || (isset($_GET['sav13'])) || (isset($_GET['sav14'])))
{
if ($user['balls']<$color['cena2'])
{
echo "<div class='err'>";
echo "<b>У вас недостаточно балов для покупки нового цвета для своего ника!</b><br />";
echo "</div>";
include_once 'sys/includes/footer.php';
exit;
}else{
if (isset($_GET['sav1']))
{
mysql_query("UPDATE `user` SET `balls` = '".($user['balls']-$color['cena2'])."' WHERE `id` = '$user[id]' LIMIT 1",$db);
mysql_query("UPDATE `user` SET `ncolor`='#FF0000' WHERE `id` = '$user[id]'");
mysql_query("UPDATE `user` SET `ncolor2`='#FF0000' WHERE `id` = '$user[id]'");
echo "<div class='msg'>";
echo "<b>Цвет ника успешно изменен!</b><br />";
echo "</div>";
include_once 'sys/includes/footer.php';
exit;
}
if (isset($_GET['sav2']))
{
mysql_query("UPDATE `user` SET `balls` = '".($user['balls']-$color['cena2'])."' WHERE `id` = '$user[id]' LIMIT 1",$db);
mysql_query("UPDATE `user` SET `ncolor`='#D2691E' WHERE `id` = '$user[id]'");
mysql_query("UPDATE `user` SET `ncolor2`='#D2691E' WHERE `id` = '$user[id]'");
echo "<div class='msg'>";
echo "<b>Цвет ника успешно изменен!</b><br />";
echo "</div>";
include_once 'sys/includes/footer.php';
exit;
}
if (isset($_GET['sav3']))
{
mysql_query("UPDATE `user` SET `balls` = '".($user['balls']-$color['cena2'])."' WHERE `id` = '$user[id]' LIMIT 1",$db);
mysql_query("UPDATE `user` SET `ncolor`='#FF1493' WHERE `id` = '$user[id]'");
mysql_query("UPDATE `user` SET `ncolor2`='#FF1493' WHERE `id` = '$user[id]'");
echo "<div class='msg'>";
echo "<b>Цвет ника успешно изменен!</b><br />";
echo "</div>";
include_once 'sys/includes/footer.php';
exit;
}
if (isset($_GET['sav4']))
{
mysql_query("UPDATE `user` SET `balls` = '".($user['balls']-$color['cena2'])."' WHERE `id` = '$user[id]' LIMIT 1",$db);
mysql_query("UPDATE `user` SET `ncolor`='#0000FF' WHERE `id` = '$user[id]'");
mysql_query("UPDATE `user` SET `ncolor2`='#0000FF' WHERE `id` = '$user[id]'");
echo "<div class='msg'>";
echo "<b>Цвет ника успешно изменен!</b><br />";
echo "</div>";
include_once 'sys/includes/footer.php';
exit;
}
if (isset($_GET['sav5']))
{
mysql_query("UPDATE `user` SET `balls` = '".($user['balls']-$color['cena2'])."' WHERE `id` = '$user[id]' LIMIT 1",$db);
mysql_query("UPDATE `user` SET `ncolor`='#008000' WHERE `id` = '$user[id]'");
mysql_query("UPDATE `user` SET `ncolor2`='#008000' WHERE `id` = '$user[id]'");
echo "<div class='msg'>";
echo "<b>Цвет ника успешно изменен!</b><br />";
echo "</div>";
include_once 'sys/includes/footer.php';
exit;
}
if (isset($_GET['sav6']))
{
mysql_query("UPDATE `user` SET `balls` = '".($user['balls']-$color['cena2'])."' WHERE `id` = '$user[id]' LIMIT 1",$db);
mysql_query("UPDATE `user` SET `ncolor`='#FFFF00' WHERE `id` = '$user[id]'");
mysql_query("UPDATE `user` SET `ncolor2`='#FFFF00' WHERE `id` = '$user[id]'");
echo "<div class='msg'>";
echo "<b>Цвет ника успешно изменен!</b><br />";
echo "</div>";
include_once 'sys/includes/footer.php';
exit;
}
if (isset($_GET['sav7']))
{
mysql_query("UPDATE `user` SET `balls` = '".($user['balls']-$color['cena2'])."' WHERE `id` = '$user[id]' LIMIT 1",$db);
mysql_query("UPDATE `user` SET `ncolor`='#FFD700' WHERE `id` = '$user[id]'");
mysql_query("UPDATE `user` SET `ncolor2`='#FFD700' WHERE `id` = '$user[id]'");
echo "<div class='msg'>";
echo "<b>Цвет ника успешно изменен!</b><br />";
echo "</div>";
include_once 'sys/includes/footer.php';
exit;
}
if (isset($_GET['sav8']))
{
mysql_query("UPDATE `user` SET `balls` = '".($user['balls']-$color['cena2'])."' WHERE `id` = '$user[id]' LIMIT 1",$db);
mysql_query("UPDATE `user` SET `ncolor`='#FFA500' WHERE `id` = '$user[id]'");
mysql_query("UPDATE `user` SET `ncolor2`='#FFA500' WHERE `id` = '$user[id]'");
echo "<div class='msg'>";
echo "<b>Цвет ника успешно изменен!</b><br />";
echo "</div>";
include_once 'sys/includes/footer.php';
exit;
}
if (isset($_GET['sav9']))
{
mysql_query("UPDATE `user` SET `balls` = '".($user['balls']-$color['cena2'])."' WHERE `id` = '$user[id]' LIMIT 1",$db);
mysql_query("UPDATE `user` SET `ncolor`='#8B008B' WHERE `id` = '$user[id]'");
mysql_query("UPDATE `user` SET `ncolor2`='#8B008B' WHERE `id` = '$user[id]'");
echo "<div class='msg'>";
echo "<b>Цвет ника успешно изменен!</b><br />";
echo "</div>";
include_once 'sys/includes/footer.php';
exit;
}
if (isset($_GET['sav10']))
{
mysql_query("UPDATE `user` SET `balls` = '".($user['balls']-$color['cena2'])."' WHERE `id` = '$user[id]' LIMIT 1",$db);
mysql_query("UPDATE `user` SET `ncolor`='#000000' WHERE `id` = '$user[id]'");
mysql_query("UPDATE `user` SET `ncolor2`='#000000' WHERE `id` = '$user[id]'");
echo "<div class='msg'>";
echo "<b>Цвет ника успешно изменен!</b><br />";
echo "</div>";
include_once 'sys/includes/footer.php';
exit;
}
if (isset($_GET['sav11']))
{
mysql_query("UPDATE `user` SET `balls` = '".($user['balls']-$color['cena2'])."' WHERE `id` = '$user[id]' LIMIT 1",$db);
mysql_query("UPDATE `user` SET `ncolor`='#696969' WHERE `id` = '$user[id]'");
mysql_query("UPDATE `user` SET `ncolor2`='#696969' WHERE `id` = '$user[id]'");
echo "<div class='msg'>";
echo "<b>Цвет ника успешно изменен!</b><br />";
echo "</div>";
include_once 'sys/includes/footer.php';
exit;
}
if (isset($_GET['sav12']))
{
mysql_query("UPDATE `user` SET `balls` = '".($user['balls']-$color['cena2'])."' WHERE `id` = '$user[id]' LIMIT 1",$db);
mysql_query("UPDATE `user` SET `ncolor`='#FFFFFF' WHERE `id` = '$user[id]'");
mysql_query("UPDATE `user` SET `ncolor2`='#FFFFFF' WHERE `id` = '$user[id]'");
echo "<div class='msg'>";
echo "<b>Цвет ника успешно изменен!</b><br />";
echo "</div>";
include_once 'sys/includes/footer.php';
exit;
}
if (isset($_GET['sav13']))
{
mysql_query("UPDATE `user` SET `balls` = '".($user['balls']-$color['cena2'])."' WHERE `id` = '$user[id]' LIMIT 1",$db);
mysql_query("UPDATE `user` SET `ncolor`='#669999' WHERE `id` = '$user[id]'");
mysql_query("UPDATE `user` SET `ncolor2`='#669999' WHERE `id` = '$user[id]'");
echo "<div class='msg'>";
echo "<b>Цвет ника успешно изменен!</b><br />";
echo "</div>";
include_once 'sys/includes/footer.php';
exit;
}
if (isset($_GET['sav14']))
{
mysql_query("UPDATE `user` SET `balls` = '".($user['balls']-$color['cena2'])."' WHERE `id` = '$user[id]' LIMIT 1",$db);
mysql_query("UPDATE `user` SET `ncolor`='#00FF00' WHERE `id` = '$user[id]'");
mysql_query("UPDATE `user` SET `ncolor2`='#00FF00' WHERE `id` = '$user[id]'");
echo "<div class='msg'>";
echo "<b>Цвет ника успешно изменен!</b><br />";
echo "</div>";
include_once 'sys/includes/footer.php';
exit;
}
}
}
if (isset($_GET['gradient']))
{
if ($user['balls']<$color['cena1'])
{
echo "<div class='err'>";
echo "<b>У вас недостаточно баллов для покупки нового цвета для своего ника!</b><br />";
echo "</div>";
}else{
echo "<div class='forum_tema'>";
echo "<img src='/s-klub/img/money.png'> ";
echo "Стоимость Градиента ".$color['cena1']." балов!";
echo "</div>";
echo "<a href='ncolor.php?save1'><div class='u_menu'>";
echo "<img src='/s-klub/my/ncolor.png'> ";
echo GradientText("$user[nick]", "#00008B", "#FFA500");
echo "</div></a>";
echo "<a href='ncolor.php?save2'><div class='u_menu'>";
echo "<img src='/s-klub/my/ncolor.png'> ";
echo GradientText("$user[nick]", "#00FF00", "#0000FF");
echo "</div></a>";
echo "<a href='ncolor.php?save3'><div class='u_menu'>";
echo "<img src='/s-klub/my/ncolor.png'> ";
echo GradientText("$user[nick]", "#000000", "#4B0082");
echo "</div></a>";
echo "<a href='ncolor.php?save4'><div class='u_menu'>";
echo "<img src='/s-klub/my/ncolor.png'> ";
echo GradientText("$user[nick]", "#000080", "#008000");
echo "</div></a>";
echo "<a href='ncolor.php?save5'><div class='u_menu'>";
echo "<img src='/s-klub/my/ncolor.png'> ";
echo GradientText("$user[nick]", "#0000FF", "#FFFF00");
echo "</div></a>";
echo "<a href='ncolor.php?save6'><div class='u_menu'>";
echo "<img src='/s-klub/my/ncolor.png'> ";
echo GradientText("$user[nick]", "#FFFF00", "#0000FF");
echo "</div></a>";
echo "<a href='ncolor.php?save7'><div class='u_menu'>";
echo "<img src='/s-klub/my/ncolor.png'> ";
echo GradientText("$user[nick]", "#9932CC", "#006400");
echo "</div></a>";
echo "<a href='ncolor.php?save8'><div class='u_menu'>";
echo "<img src='/s-klub/my/ncolor.png'> ";
echo GradientText("$user[nick]", "#696969", "#DC143C");
echo "</div></a>";
echo "<a href='ncolor.php?save9'><div class='u_menu'>";
echo "<img src='/s-klub/my/ncolor.png'> ";
echo GradientText("$user[nick]", "#7CFC00", "#B22222");
echo "</div></a>";
echo "<a href='ncolor.php?save10'><div class='u_menu'>";
echo "<img src='/s-klub/my/ncolor.png'> ";
echo GradientText("$user[nick]", "#FF0000", "#0000CD");
echo "</div></a>";
echo "<a href='ncolor.php?save11'><div class='u_menu'>";
echo "<img src='/s-klub/my/ncolor.png'> ";
echo GradientText("$user[nick]", "#0000CD", "#FF0000");
echo "</div></a>";
}
echo "<div class='foot'>";
echo "<img src='/s-klub/img/left.png'> <a href='ncolor.php'>Назад</a><br />";
echo "</div>";
include_once 'sys/includes/footer.php';
exit;
}
if ((isset($_GET['save1'])) || (isset($_GET['save2'])) || (isset($_GET['save3'])) || (isset($_GET['save4'])) || (isset($_GET['save5'])) || (isset($_GET['save6'])) || (isset($_GET['save7'])) || (isset($_GET['save8'])) || (isset($_GET['save9'])) || (isset($_GET['save10'])) || (isset($_GET['save11'])))
{
if ($user['balls']<$color['cena1'])
{
echo "<div class='err'>";
echo "У вас недостаточно балов для покупки нового цвета для своего ника!<br />";
echo "</div>";
include_once 'sys/includes/footer.php';
exit;
}else{
if (isset($_GET['save1']))
{
mysql_query("UPDATE `user` SET `balls` = '".($user['balls']-$color['cena1'])."' WHERE `id` = '$user[id]' LIMIT 1",$db);
mysql_query("UPDATE `user` SET `ncolor`='#00008B' WHERE `id` = '$user[id]'");
mysql_query("UPDATE `user` SET `ncolor2`='#FFA500' WHERE `id` = '$user[id]'");
echo "<div class='msg'>";
echo "Цвет ника успешно изменен!<br />";
echo "</div>";
include_once 'sys/includes/footer.php';
exit;
}
if (isset($_GET['save2']))
{
mysql_query("UPDATE `user` SET `balls` = '".($user['balls']-$color['cena1'])."' WHERE `id` = '$user[id]' LIMIT 1",$db);
mysql_query("UPDATE `user` SET `ncolor`='#00FF00' WHERE `id` = '$user[id]'");
mysql_query("UPDATE `user` SET `ncolor2`='#0000FF' WHERE `id` = '$user[id]'");
echo "<div class='msg'>";
echo "Цвет ника успешно изменен!<br />";
echo "</div>";
include_once 'sys/includes/footer.php';
exit;
}
if (isset($_GET['save3']))
{
mysql_query("UPDATE `user` SET `balls` = '".($user['balls']-$color['cena1'])."' WHERE `id` = '$user[id]' LIMIT 1",$db);
mysql_query("UPDATE `user` SET `ncolor`='#00FFFF' WHERE `id` = '$user[id]'");
mysql_query("UPDATE `user` SET `ncolor2`='#FAF0E6' WHERE `id` = '$user[id]'");
echo "<div class='msg'>";
echo "Цвет ника успешно изменен!<br />";
echo "</div>";
include_once 'sys/includes/footer.php';
exit;
}
if (isset($_GET['save4']))
{
mysql_query("UPDATE `user` SET `balls` = '".($user['balls']-$color['cena1'])."' WHERE `id` = '$user[id]' LIMIT 1",$db);
mysql_query("UPDATE `user` SET `ncolor`='#000080' WHERE `id` = '$user[id]'");
mysql_query("UPDATE `user` SET `ncolor2`='#008000' WHERE `id` = '$user[id]'");
echo "<div class='msg'>";
echo "Цвет ника успешно изменен!<br />";
echo "</div>";
include_once 'sys/includes/footer.php';
exit;
}
if (isset($_GET['save5']))
{
mysql_query("UPDATE `user` SET `balls` = '".($user['balls']-$color['cena1'])."' WHERE `id` = '$user[id]' LIMIT 1",$db);
mysql_query("UPDATE `user` SET `ncolor`='#0000FF' WHERE `id` = '$user[id]'");
mysql_query("UPDATE `user` SET `ncolor2`='#FFFF00' WHERE `id` = '$user[id]'");
echo "<div class='msg'>";
echo "Цвет ника успешно изменен!<br />";
echo "</div>";
include_once 'sys/includes/footer.php';
exit;
}
if (isset($_GET['save6']))
{
mysql_query("UPDATE `user` SET `balls` = '".($user['balls']-$color['cena1'])."' WHERE `id` = '$user[id]' LIMIT 1",$db);
mysql_query("UPDATE `user` SET `ncolor`='#FFFF00' WHERE `id` = '$user[id]'");
mysql_query("UPDATE `user` SET `ncolor2`='#0000FF' WHERE `id` = '$user[id]'");
echo "<div class='msg'>";
echo "Цвет ника успешно изменен!<br />";
echo "</div>";
include_once 'sys/includes/footer.php';
exit;
}
if (isset($_GET['save7']))
{
mysql_query("UPDATE `user` SET `balls` = '".($user['balls']-$color['cena1'])."' WHERE `id` = '$user[id]' LIMIT 1",$db);
mysql_query("UPDATE `user` SET `ncolor`='#9932CC' WHERE `id` = '$user[id]'");
mysql_query("UPDATE `user` SET `ncolor2`='#FF1493' WHERE `id` = '$user[id]'");
echo "<div class='msg'>";
echo "Цвет ника успешно изменен!<br />";
echo "</div>";
include_once 'sys/includes/footer.php';
exit;
}
if (isset($_GET['save8']))
{
mysql_query("UPDATE `user` SET `balls` = '".($user['balls']-$color['cena1'])."' WHERE `id` = '$user[id]' LIMIT 1",$db);
mysql_query("UPDATE `user` SET `ncolor`='#696969' WHERE `id` = '$user[id]'");
mysql_query("UPDATE `user` SET `ncolor2`='#FFDEAD' WHERE `id` = '$user[id]'");
echo "<div class='msg'>";
echo "Цвет ника успешно изменен!<br />";
echo "</div>";
include_once 'sys/includes/footer.php';
exit;
}
if (isset($_GET['save9']))
{
mysql_query("UPDATE `user` SET `balls` = '".($user['balls']-$color['cena1'])."' WHERE `id` = '$user[id]' LIMIT 1",$db);
mysql_query("UPDATE `user` SET `ncolor`='#7CFC00' WHERE `id` = '$user[id]'");
mysql_query("UPDATE `user` SET `ncolor2`='#B22222' WHERE `id` = '$user[id]'");
echo "<div class='msg'>";
echo "Цвет ника успешно изменен!<br />";
echo "</div>";
include_once 'sys/includes/footer.php';
exit;
}
if (isset($_GET['save10']))
{
mysql_query("UPDATE `user` SET `balls` = '".($user['balls']-$color['cena1'])."' WHERE `id` = '$user[id]' LIMIT 1",$db);
mysql_query("UPDATE `user` SET `ncolor`='#FF0000' WHERE `id` = '$user[id]'");
mysql_query("UPDATE `user` SET `ncolor2`='#0000CD' WHERE `id` = '$user[id]'");
echo "<div class='msg'>";
echo "Цвет ника успешно изменен!<br />";
echo "</div>";
include_once 'sys/includes/footer.php';
exit;
}
if (isset($_GET['save11']))
{
mysql_query("UPDATE `user` SET `balls` = '".($user['balls']-$color['cena1'])."' WHERE `id` = '$user[id]' LIMIT 1",$db);
mysql_query("UPDATE `user` SET `ncolor`='#0000CD' WHERE `id` = '$user[id]'");
mysql_query("UPDATE `user` SET `ncolor2`='#FF0000' WHERE `id` = '$user[id]'");
echo "<div class='msg'>";
echo "Цвет ника успешно изменен!<br />";
echo "</div>";
include_once 'sys/includes/footer.php';
exit;
}
}
}
echo "<a href='ncolor.php?standart'><div class='u_menu'>";
echo "<img src='/s-klub/my/ncolor.png'> ";
echo "<b>Обычные цвета (".$color['cena2']." балов)</b><br />";
echo "</div></a>";
echo "<a href='ncolor.php?gradient'><div class='u_menu'>";
echo "<img src='/s-klub/my/ncolor.png'> ";
echo "<b>Градиентовые цвета (".$color['cena1']." балов)</b><br />";
echo "</div></a>";
include_once 'sys/includes/footer.php';
?>