Просмотр файла Цветные ники Ротор/pages/color.php

Размер файла: 27.72Kb
<?php
require_once ('../includes/start.php');
require_once ('../includes/functions.php');
require_once ('../includes/header.php');
include_once ('../themes/header.php');
	
	$config['colorpoint'] = 250; //Колличество баллов для смены цвета
	$config['colormoney'] = 500; //Колличество денег для смены цвета
	$config['colorbuy'] = 250; //Сумма списания при смене цвета

	$act = (isset($_GET['act'])) ? check($_GET['act']) : 'index';
			
	switch($act):
############################################################################################
##                                    Главная страница                                    ##
############################################################################################
case 'index':

show_title('Смена цвета ника');
if (is_user()) {
			
			echo 'На данный момент цвет вашего ника <b>'.profile($log, color($log)).'</b><br />';
			echo 'Выберите понравившийся вам цвет из списка:<hr />';
			$colors = array('1c1c1c', '00cc00', 'ff0000', '0000ff', 'ff9900', 'ffcc00', 'a8a8a8', '#00FFFF', '#4169E1', '#FF00FF', '#FFA07A', '#3CB371', '#6495ED', '#BA55D3', '#FF4500', '#7FFF00', '#00FF7F');
			foreach($colors as $color) {
				echo '<b><a href="color.php?act=edit&amp;color='.$color.'&amp;uid='.$_SESSION['token'].'"><font color="'.$color.'">'.nickname($log).'</font></a></b> ';
			}
			echo '<hr />Так же вы можете удалить цвет ника нажав <b><a href="color.php?act=delete&amp;uid='.$_SESSION['token'].'">сюда</a></b>!<br />';
			echo '<div class="spoiler-wrap">';
			echo '<div class="spoiler-head open">Таблица цветовых кодов</div>';
			echo '<div class="spoiler-body">
			
			<table width="100%" cellpadding="0" border="0" cellspacing="0" align="center">
<tr>

<td style="color:#FFFFFF;background-color:maroon;">Maroon</td>

<td style="color:#FFFFFF;background-color:#800000">#800000</td>

</tr>

<tr>

<td style="color:#FFFFFF;background-color:darkred">DarkRed</td>

<td style="color:#FFFFFF;background-color:#8B0000">#8B0000</td>

</tr>

<tr>

<td style="color:#FFFFFF;background-color:firebrick">FireBrick</td>

<td style="color:#FFFFFF;background-color:#B22222">#B22222</td>

</tr>

<tr>

<td style="color:#000000;background-color:red">Red</td>

<td style="color:#000000;background-color:#FF0000">#FF0000</td>

</tr>

<tr>

<td style="color:#000000;background-color:salmon">Salmon</td>

<td style="color:#000000;background-color:#FA8072">#FA8072</td>

</tr>

<tr>

<td style="color:#000000;background-color:tomato">Tomato</td>

<td style="color:#000000;background-color:#FF6347">#FF6347</td>

</tr>

<tr>

<td style="color:#000000;background-color:coral">Coral</td>

<td style="color:#000000;background-color:#FF7F50">#FF7F50</td>

</tr>

<tr>

<td style="color:#000000;background-color:orangered">OrangeRed</td>

<td style="color:#000000;background-color:#FF4500">#FF4500</td>

</tr>

<tr>

<td style="color:#000000;background-color:chocolate">Chocolate</td>

<td style="color:#000000;background-color:#D2691E">#D2691E</td>

</tr>

<tr>

<td style="color:#000000;background-color:sandybrown">SandyBrown</td>

<td style="color:#000000;background-color:#F4A460">#F4A460</td>

</tr>

<tr>

<td style="color:#000000;background-color:darkorange">DarkOrange</td>

<td style="color:#000000;background-color:#FF8C00">#FF8C00</td>

</tr>

<tr>

<td style="color:#000000;background-color:orange">Orange</td>

<td style="color:#000000;background-color:#FFA500">#FFA500</td>

</tr>

<tr>

<td style="color:#000000;background-color:darkgoldenrod">DarkGoldenrod</td>

<td style="color:#000000;background-color:#B8860B">#B8860B</td>

</tr>

<tr>

<td style="color:#000000;background-color:goldenrod">Goldenrod</td>

<td style="color:#000000;background-color:#DAA520">#DAA520</td>

</tr>

<tr>

<td style="color:#000000;background-color:gold">Gold</td>

<td style="color:#000000;background-color:#FFD700">#FFD700</td>

</tr>

<tr>

<td style="color:#000000;background-color:olive">Olive</td>

<td style="color:#000000;background-color:#808000">#808000</td>

</tr>

<tr>

<td style="color:#000000;background-color:yellow">Yellow</td>

<td style="color:#000000;background-color:#FFFF00">#FFFF00</td>

</tr>

<tr>

<td style="color:#000000;background-color:yellowgreen">YellowGreen</td>

<td style="color:#000000;background-color:#9ACD32">#9ACD32</td>

</tr>

<tr>

<td style="color:#000000;background-color:greenyellow">GreenYellow</td>

<td style="color:#000000;background-color:#ADFF2F">#ADFF2F</td>

</tr>

<tr>

<td style="color:#000000;background-color:chartreuse">Chartreuse</td>

<td style="color:#000000;background-color:#7FFF00">#7FFF00</td>

</tr>

<tr>

<td style="color:#000000;background-color:lawngreen">LawnGreen</td>

<td style="color:#000000;background-color:#7CFC00">#7CFC00</td>

</tr>

<tr>

<td style="color:#FFFFFF;background-color:green">Green</td>

<td style="color:#FFFFFF;background-color:#008000">#008000</td>

</tr>

<tr>

<td style="color:#000000;background-color:lime">Lime</td>

<td style="color:#000000;background-color:#00FF00">#00FF00</td>

</tr>

<tr>

<td style="color:#000000;background-color:limegreen">LimeGreen</td>

<td style="color:#000000;background-color:#32CD32">#32CD32</td>

</tr>

<tr>

<td style="color:#000000;background-color:springgreen">SpringGreen</td>

<td style="color:#000000;background-color:#00FF7F">#00FF7F</td>

</tr>

<tr>

<td style="color:#000000;background-color:mediumspringgreen">MediumSpringGreen</td>

<td style="color:#000000;background-color:#00FA9A">#00FA9A</td>

</tr>

<tr>

<td style="color:#000000;background-color:turquoise">Turquoise</td>

<td style="color:#000000;background-color:#40E0D0">#40E0D0</td>

</tr>

<tr>

<td style="color:#000000;background-color:lightseagreen">LightSeaGreen</td>

<td style="color:#000000;background-color:#20B2AA">#20B2AA</td>

</tr>

<tr>

<td style="color:#000000;background-color:mediumturquoise">MediumTurquoise</td>

<td style="color:#000000;background-color:#48D1CC">#48D1CC</td>

</tr>

<tr>

<td style="color:#000000;background-color:teal">Teal</td>

<td style="color:#000000;background-color:#008080">#008080</td>

</tr>

<tr>

<td style="color:#000000;background-color:darkcyan">DarkCyan</td>

<td style="color:#000000;background-color:#008B8B">#008B8B</td>

</tr>

<tr>

<td style="color:#000000;background-color:aqua">Aqua</td>

<td style="color:#000000;background-color:#00FFFF">#00FFFF</td>

</tr>

<tr>

<td style="color:#000000;background-color:cyan">Cyan</td>

<td style="color:#000000;background-color:#00FFFF">#00FFFF</td>

</tr>

<tr>

<td style="color:#000000;background-color:darkturquoise">DarkTurquoise</td>

<td style="color:#000000;background-color:#00CED1">#00CED1</td>

</tr>

<tr>

<td style="color:#000000;background-color:deepskyblue">DeepSkyBlue</td>

<td style="color:#000000;background-color:#00BFFF">#00BFFF</td>

</tr>

<tr>

<td style="color:#000000;background-color:dodgerblue">DodgerBlue</td>

<td style="color:#000000;background-color:#1E90FF">#1E90FF</td>

</tr>

<tr>

<td style="color:#000000;background-color:royalblue">RoyalBlue</td>

<td style="color:#000000;background-color:#4169E1">#4169E1</td>

</tr>

<tr>

<td style="color:#FFFFFF;background-color:navy">Navy</td>

<td style="color:#FFFFFF;background-color:#000080">#000080</td>

</tr>

<tr>

<td style="color:#FFFFFF;background-color:darkblue">DarkBlue</td>

<td style="color:#FFFFFF;background-color:#00008B">#00008B</td>

</tr>

<tr>

<td style="color:#FFFFFF;background-color:mediumblue">MediumBlue</td>

<td style="color:#FFFFFF;background-color:#0000CD">#0000CD</td>

</tr>

<tr>

<td style="color:#000000;background-color:blue">Blue</td>

<td style="color:#000000;background-color:#0000FF">#0000FF</td>

</tr>

<tr>

<td style="color:#000000;background-color:blueviolet">BlueViolet</td>

<td style="color:#000000;background-color:#8A2BE2">#8A2BE2</td>

</tr>

<tr>

<td style="color:#000000;background-color:darkorchid">DarkOrchid</td>

<td style="color:#000000;background-color:#9932CC">#9932CC</td>

</tr>

<tr>

<td style="color:#000000;background-color:darkviolet">DarkViolet</td>

<td style="color:#000000;background-color:#9400D3">#9400D3</td>

</tr>

<tr>

<td style="color:#FFFFFF;background-color:purple">Purple</td>

<td style="color:#FFFFFF;background-color:#800080">#800080</td>

</tr>

<tr>

<td style="color:#FFFFFF;background-color:darkmagenta">DarkMagenta</td>

<td style="color:#FFFFFF;background-color:#8B008B">#8B008B</td>

</tr>

<tr>

<td style="color:#000000;background-color:fuchsia">Fuchsia</td>

<td style="color:#000000;background-color:#FF00FF">#FF00FF</td>

</tr>

<tr>

<td style="color:#000000;background-color:#AF00AF">Magenta</td>

<td style="color:#000000;background-color:#AF00AF">#AF00AF</td>

</tr>

<tr>

<td style="color:#000000;background-color:mediumvioletred">MediumVioletRed</td>

<td style="color:#000000;background-color:#C71585">#C71585</td>

</tr>

<tr>

<td style="color:#000000;background-color:deeppink">DeepPink</td>

<td style="color:#000000;background-color:#FF1493">#FF1493</td>

</tr>

<tr>

<td style="color:#000000;background-color:hotpink">HotPink</td>

<td style="color:#000000;background-color:#FF69B4">#FF69B4</td>

</tr>

<tr>

<td style="color:#000000;background-color:crimson">Crimson</td>

<td style="color:#000000;background-color:#DC143C">#DC143C</td>

</tr>

<tr>

<td style="color:#FFFFFF;background-color:brown">Brown</td>

<td style="color:#FFFFFF;background-color:#A52A2A">#A52A2A</td>

</tr>

<tr>

<td style="color:#000000;background-color:indianred">IndianRed</td>

<td style="color:#000000;background-color:#CD5C5C">#CD5C5C</td>

</tr>

<tr>

<td style="color:#000000;background-color:rosybrown">RosyBrown</td>

<td style="color:#000000;background-color:#BC8F8F">#BC8F8F</td>

</tr>

<tr>

<td style="color:#000000;background-color:lightcoral">LightCoral</td>

<td style="color:#000000;background-color:#F08080">#F08080</td>

</tr>

<tr>

<td style="color:#000000;background-color:snow">Snow</td>

<td style="color:#000000;background-color:#FFFAFA">#FFFAFA</td>

</tr>

<tr>

<td style="color:#000000;background-color:mistyrose">MistyRose</td>

<td style="color:#000000;background-color:#FFE4E1">#FFE4E1</td>

</tr>

<tr>

<td style="color:#000000;background-color:darksalmon">DarkSalmon</td>

<td style="color:#000000;background-color:#E9967A">#E9967A</td>

</tr>

<tr>

<td style="color:#000000;background-color:lightsalmon">LightSalmon</td>

<td style="color:#000000;background-color:#FFA07A">#FFA07A</td>

</tr>

<tr>

<td style="color:#FFFFFF;background-color:sienna">Sienna</td>

<td style="color:#FFFFFF;background-color:#A0522D">#A0522D</td>

</tr>

<tr>

<td style="color:#000000;background-color:seashell">SeaShell</td>

<td style="color:#000000;background-color:#FFF5EE">#FFF5EE</td>

</tr>

<tr>

<td style="color:#FFFFFF;background-color:saddlebrown">SaddleBrown</td>

<td style="color:#FFFFFF;background-color:#8B4513">#8B4513</td>

</tr>

<tr>

<td style="color:#000000;background-color:peachpuff">Peachpuff</td>

<td style="color:#000000;background-color:#FFDAB9">#FFDAB9</td>

</tr>

<tr>

<td style="color:#000000;background-color:peru">Peru</td>

<td style="color:#000000;background-color:#CD853F">#CD853F</td>

</tr>

<tr>

<td style="color:#000000;background-color:linen">Linen</td>

<td style="color:#000000;background-color:#FAF0E6">#FAF0E6</td>

</tr>

<tr>

<td style="color:#000000;background-color:bisque">Bisque</td>

<td style="color:#000000;background-color:#FFE4C4">#FFE4C4</td>

</tr>

<tr>

<td style="color:#000000;background-color:burlywood">Burlywood</td>

<td style="color:#000000;background-color:#DEB887">#DEB887</td>

</tr>

<tr>

<td style="color:#000000;background-color:tan">Tan</td>

<td style="color:#000000;background-color:#D2B48C">#D2B48C</td>

</tr>

<tr>

<td style="color:#000000;background-color:antiquewhite">AntiqueWhite</td>

<td style="color:#000000;background-color:#FAEBD7">#FAEBD7</td>

</tr>

<tr>

<td style="color:#000000;background-color:navajowhite">NavajoWhite</td>

<td style="color:#000000;background-color:#FFDEAD">#FFDEAD</td>

</tr>

<tr>

<td style="color:#000000;background-color:blanchedalmond">BlanchedAlmond</td>

<td style="color:#000000;background-color:#FFEBCD">#FFEBCD</td>

</tr>

<tr>

<td style="color:#000000;background-color:papayawhip">PapayaWhip</td>

<td style="color:#000000;background-color:#FFEFD5">#FFEFD5</td>

</tr>

<tr>

<td style="color:#000000;background-color:moccasin">Moccasin</td>

<td style="color:#000000;background-color:#FFE4B5">#FFE4B5</td>

</tr>

<tr>

<td style="color:#000000;background-color:wheat">Wheat</td>

<td style="color:#000000;background-color:#F5DEB3">#F5DEB3</td>

</tr>

<tr>

<td style="color:#000000;background-color:oldlace">Oldlace</td>

<td style="color:#000000;background-color:#FDF5E6">#FDF5E6</td>

</tr>

<tr>

<td style="color:#000000;background-color:floralwhite">FloralWhite</td>

<td style="color:#000000;background-color:#FFFAF0">#FFFAF0</td>

</tr>

<tr>

<td style="color:#000000;background-color:cornsilk">Cornsilk</td>

<td style="color:#000000;background-color:#FFF8DC">#FFF8DC</td>

</tr>

<tr>

<td style="color:#000000;background-color:khaki">Khaki</td>

<td style="color:#000000;background-color:#F0E68C">#F0E68C</td>

</tr>

<tr>

<td style="color:#000000;background-color:lemonchiffon">LemonChiffon</td>

<td style="color:#000000;background-color:#FFFACD">#FFFACD</td>

</tr>

<tr>

<td style="color:#000000;background-color:palegoldenrod">PaleGoldenrod</td>

<td style="color:#000000;background-color:#EEE8AA">#EEE8AA</td>

</tr>

<tr>

<td style="color:#000000;background-color:darkkhaki">DarkKhaki</td>

<td style="color:#000000;background-color:#BDB76B">#BDB76B</td>

</tr>

<tr>

<td style="color:#000000;background-color:beige">Beige</td>

<td style="color:#000000;background-color:#F5F5DC">#F5F5DC</td>

</tr>

<tr>

<td style="color:#000000;background-color:lightgoldenrodyellow">LightGoldenrodYellow</td>

<td style="color:#000000;background-color:#FAFAD2">#FAFAD2</td>

</tr>

<tr>

<td style="color:#000000;background-color:lightyellow">LightYellow</td>

<td style="color:#000000;background-color:#FFFFE0">#FFFFE0</td>

</tr>

<tr>

<td style="color:#000000;background-color:ivory">Ivory</td>

<td style="color:#000000;background-color:#FFFFF0">#FFFFF0</td>

</tr>

<tr>

<td style="color:#000000;background-color:olivedrab">OliveDrab</td>

<td style="color:#000000;background-color:#6B8E23">#6B8E23</td>

</tr>

<tr>

<td style="color:#FFFFFF;background-color:darkolivegreen">DarkOliveGreen</td>

<td style="color:#FFFFFF;background-color:#556B2F">#556B2F</td>

</tr>

<tr>

<td style="color:#000000;background-color:darkseagreen">DarkSeaGreen</td>

<td style="color:#000000;background-color:#8FBC8F">#8FBC8F</td>

</tr>

<tr>

<td style="color:#FFFFFF;background-color:darkgreen">DarkGreen</td>

<td style="color:#FFFFFF;background-color:#006400">#006400</td>

</tr>

<tr>

<td style="color:#FFFFFF;background-color:forestgreen">ForestGreen</td>

<td style="color:#FFFFFF;background-color:#228B22">#228B22</td>

</tr>

<tr>

<td style="color:#000000;background-color:lightgreen">LightGreen</td>

<td style="color:#000000;background-color:#90EE90">#90EE90</td>

</tr>

<tr>

<td style="color:#000000;background-color:palegreen">PaleGreen</td>

<td style="color:#000000;background-color:#98FB98">#98FB98</td>

</tr>

<tr>

<td style="color:#000000;background-color:honeydew">Honeydew</td>

<td style="color:#000000;background-color:#F0FFF0">#F0FFF0</td>

</tr>

<tr>

<td style="color:#000000;background-color:seagreen">SeaGreen</td>

<td style="color:#000000;background-color:#2E8B57">#2E8B57</td>

</tr>

<tr>

<td style="color:#000000;background-color:mediumseagreen">MediumSeaGreen</td>

<td style="color:#000000;background-color:#3CB371">#3CB371</td>

</tr>

<tr>

<td style="color:#000000;background-color:mintcream">Mintcream</td>

<td style="color:#000000;background-color:#F5FFFA">#F5FFFA</td>

</tr>

<tr>

<td style="color:#000000;background-color:mediumaquamarine">MediumAquamarine</td>

<td style="color:#000000;background-color:#66CDAA">#66CDAA</td>

</tr>

<tr>

<td style="color:#000000;background-color:aquamarine">Aquamarine</td>

<td style="color:#000000;background-color:#7FFFD4">#7FFFD4</td>

</tr>

<tr>

<td style="color:#FFFFFF;background-color:darkslategray">DarkSlateGray</td>

<td style="color:#FFFFFF;background-color:#2F4F4F">#2F4F4F</td>

</tr>

<tr>

<td style="color:#000000;background-color:paleturquoise">PaleTurquoise</td>

<td style="color:#000000;background-color:#AFEEEE">#AFEEEE</td>

</tr>

<tr>

<td style="color:#000000;background-color:lightcyan">LightCyan</td>

<td style="color:#000000;background-color:#E0FFFF">#E0FFFF</td>

</tr>

<tr>

<td style="color:#000000;background-color:azure">Azure</td>

<td style="color:#000000;background-color:#F0FFFF">#F0FFFF</td>

</tr>

<tr>

<td style="color:#000000;background-color:cadetblue">CadetBlue</td>

<td style="color:#000000;background-color:#5F9EA0">#5F9EA0</td>

</tr>

<tr>

<td style="color:#000000;background-color:powderblue">PowderBlue</td>

<td style="color:#000000;background-color:#B0E0E6">#B0E0E6</td>

</tr>

<tr>

<td style="color:#000000;background-color:lightblue">LightBlue</td>

<td style="color:#000000;background-color:#ADD8E6">#ADD8E6</td>

</tr>

<tr>

<td style="color:#000000;background-color:skyblue">SkyBlue</td>

<td style="color:#000000;background-color:#87CEEB">#87CEEB</td>

</tr>

<tr>

<td style="color:#000000;background-color:lightskyblue">LightskyBlue</td>

<td style="color:#000000;background-color:#87CEFA">#87CEFA</td>

</tr>

<tr>

<td style="color:#000000;background-color:steelblue">SteelBlue</td>

<td style="color:#000000;background-color:#4682B4">#4682B4</td>

</tr>

<tr>

<td style="color:#000000;background-color:aliceblue">AliceBlue</td>

<td style="color:#000000;background-color:#F0F8FF">#F0F8FF</td>

</tr>

<tr>

<td style="color:#000000;background-color:slategray">SlateGray</td>

<td style="color:#000000;background-color:#708090">#708090</td>

</tr>

<tr>

<td style="color:#000000;background-color:lightslategray">LightSlateGray</td>

<td style="color:#000000;background-color:#778899">#778899</td>

</tr>

<tr>

<td style="color:#000000;background-color:lightsteelblue">LightsteelBlue</td>

<td style="color:#000000;background-color:#B0C4DE">#B0C4DE</td>

</tr>

<tr>

<td style="color:#000000;background-color:cornflowerblue">CornflowerBlue</td>

<td style="color:#000000;background-color:#6495ED">#6495ED</td>

</tr>

<tr>

<td style="color:#000000;background-color:lavender">Lavender</td>

<td style="color:#000000;background-color:#E6E6FA">#E6E6FA</td>

</tr>

<tr>

<td style="color:#000000;background-color:ghostwhite">GhostWhite</td>

<td style="color:#000000;background-color:#F8F8FF">#F8F8FF</td>

</tr>

<tr>

<td style="color:#FFFFFF;background-color:midnightblue">MidnightBlue</td>

<td style="color:#FFFFFF;background-color:#191970">#191970</td>

</tr>

<tr>

<td style="color:#FFFFFF;background-color:slateblue">SlateBlue</td>

<td style="color:#FFFFFF;background-color:#6A5ACD">#6A5ACD</td>

</tr>

<tr>

<td style="color:#FFFFFF;background-color:darkslateblue">DarkSlateBlue</td>

<td style="color:#FFFFFF;background-color:#483D8B">#483D8B</td>

</tr>

<tr>

<td style="color:#000000;background-color:mediumslateblue">MediumSlateBlue</td>

<td style="color:#000000;background-color:#7B68EE">#7B68EE</td>

</tr>

<tr>

<td style="color:#000000;background-color:mediumpurple">MediumPurple</td>

<td style="color:#000000;background-color:#9370DB">#9370DB</td>

</tr>

<tr>

<td style="color:#FFFFFF;background-color:indigo">Indigo</td>

<td style="color:#FFFFFF;background-color:#4B0082">#4B0082</td>

</tr>

<tr>

<td style="color:#000000;background-color:mediumorchid">MediumOrchid</td>

<td style="color:#000000;background-color:#BA55D3">#BA55D3</td>

</tr>

<tr>

<td style="color:#000000;background-color:plum">Plum</td>

<td style="color:#000000;background-color:#DDA0DD">#DDA0DD</td>

</tr>

<tr>

<td style="color:#000000;background-color:violet">Violet</td>

<td style="color:#000000;background-color:#EE82EE">#EE82EE</td>

</tr>

<tr>

<td style="color:#000000;background-color:thistle">Thistle</td>

<td style="color:#000000;background-color:#D8BFD8">#D8BFD8</td>

</tr>

<tr>

<td style="color:#000000;background-color:orchid">Orchid</td>

<td style="color:#000000;background-color:#DA70D6">#DA70D6</td>

</tr>

<tr>

<td style="color:#000000;background-color:lavenderblush">LavenderBlush</td>

<td style="color:#000000;background-color:#FFF0F5">#FFF0F5</td>

</tr>

<tr>

<td style="color:#000000;background-color:palevioletred">PaleVioletRed</td>

<td style="color:#000000;background-color:#DB7093">#DB7093</td>

</tr>

<tr>

<td style="color:#000000;background-color:pink">Pink</td>

<td style="color:#000000;background-color:#FFC0CB">#FFC0CB</td>

</tr>

<tr>

<td style="color:#000000;background-color:lightpink">LightPink</td>

<td style="color:#000000;background-color:#FFB6C1">#FFB6C1</td>

</tr>

<tr>

<td style="color:#FFFFFF;background-color:black">Black</td>

<td style="color:#FFFFFF;background-color:#000000">#000000</td>

</tr>

<tr>

<td style="color:#FFFFFF;background-color:dimgray">DimGray</td>

<td style="color:#FFFFFF;background-color:#696969">#696969</td>

</tr>

<tr>

<td style="color:#000000;background-color:gray">Gray</td>

<td style="color:#000000;background-color:#808080">#808080</td>

</tr>

<tr>

<td style="color:#000000;background-color:darkgray">DarkGray</td>

<td style="color:#000000;background-color:#A9A9A9">#A9A9A9</td>

</tr>

<tr>

<td style="color:#000000;background-color:silver">Silver</td>

<td style="color:#000000;background-color:#C0C0C0">#C0C0C0</td>

</tr>

<tr>

<td style="color:#000000;background-color:LightGrey">LightGrey</td>

<td style="color:#000000;background-color:#D3D3D3">#D3D3D3</td>

</tr>

<tr>

<td style="color:#000000;background-color:gainsboro">Gainsboro</td>

<td style="color:#000000;background-color:#DCDCDC">#DCDCDC</td>

</tr>

<tr>

<td style="color:#000000;background-color:whitesmoke">WhiteSmoke</td>

<td style="color:#000000;background-color:#F5F5F5">#F5F5F5</td>

</tr>

<tr>

<td style="color:#000000;background-color:white">White</td>

<td style="color:#000000;background-color:#FFFFFF">#FFFFFF</td>

</tr>

</table></div>
	</div>';
			echo '<div class="form">';
			echo '<form action="color.php?act=edit&amp;uid='.$_SESSION['token'].'" method="post">';
			echo 'Введите код цвета вручную:<br />';
			echo '<input type="text" size="6" maxlength="7" placeholder="Введите код цвета" name="color" value="'.color($log).'" /> ';
			echo '<input type="submit" name="submit" value="Сменить" />';
			echo '</form>';
			echo '</div>';
			echo 'Стоимость смены цвета ника составляет '.moneys($config['colorbuy']).'<br />';
			echo 'Внимание! На смену цвета установлены строгие ограничения<br />';
			echo 'Изменить цвет могут только пользователи у которых более '.points($config['colorpoint']).' и имеется в наличии не менее '.moneys($config['colormoney']).'<br />';
	} else {
		show_login('Для смены цвета ника необходимо');
	}
			echo '<br /><img src="../images/img/back.gif" alt="image" /> <a href="index.php?act=menu">Вернуться</a><br />';
break;
		
############################################################################################
##                                Изменение цвета                                    ##
############################################################################################
case 'edit':

if (is_user()) {
	
if (!empty($_GET['color'])) {
	$color = check('#'.$_GET['color']);
} elseif (!empty($_POST['color'])) {
	$color = check($_POST['color']);
} else {
	$color = '';
}

$uid = check($_GET['uid']);

if ($uid == $_SESSION['token']) {
	if ($udata['users_point'] >= $config['colorpoint']) {
		if ($udata['users_money'] >= $config['colormoney']) {
			if (preg_match('|^#+[A-f0-9]{6}$|', $color) || empty($color)) {
				if ($udata['users_color'] != $color) {
					if ($udata['users_lasteditcolor'] < SITETIME) {
						DB :: run() -> query("UPDATE `users` SET `users_money`=`users_money`-?, `users_color`=?, `users_lasteditcolor`=? WHERE `users_login`=? LIMIT 1", array($config['colorbuy'], $color, (SITETIME + 86400), $log));
						
						save_color();
						notice('Цвет ника успешно сменен!');
						redirect ('color.php');
					} else {
						notice('Цвет ника можно менять раз в сутки!', '#ff0000');
						redirect ('color.php');
					}
				} else {
					notice('Новый цвет ника совпадает с прежним!', '#ff0000');
					redirect ('color.php');
				}
			} else {
				notice('Код цвета введен неверно!', '#ff0000');
				redirect ('color.php');
			}
		} else {
			notice('Для смены цвета неободимо иметь более '.moneys($config['colormoney']).'!', '#ff0000');
			redirect ('color.php');
		}
	} else {
		notice('Менять цвет могут пользователи у которых больше '.points($config['colorpoint']).'!', '#ff0000');
		redirect ('color.php');
	}
} else {
	notice('Неверный идентификатор сессии!', '#ff0000');
	redirect ('color.php');
}

} else {
	show_login('Для смены цвета ника необходимо');
}
		
break;
############################################################################################
##                                  Удаление цвета                                    ##
############################################################################################
case 'delete':

if (is_user()) {
		
$uid = check($_GET['uid']);

if ($uid == $_SESSION['token']) {
	if ($udata['users_point'] >= $config['colorpoint']) {
		if (!empty($udata['users_color'])) {
			DB :: run() -> query("UPDATE `users` SET `users_color`=? WHERE `users_login`=?", array('', $log));
			
			save_color();
			notice('Цвет ника успешно сменен!');
			redirect ('color.php');
		} else {
			notice('У вас не был установлен цвет ника!', '#ff0000');
			redirect ('color.php');
		}
	} else {
		notice('Менять цвет могут пользователи у которых больше '.points($config['colorpoint']).'!', '#ff0000');
		redirect ('color.php');
	}
} else {
	notice('Неверный идентификатор сессии!', '#ff0000');
	redirect ('color.php');
}

} else {
	show_login('Для смены цвета ника необходимо');
}
		
break;
		
default:
	redirect('color.php');
endswitch;
			
include_once ('../themes/footer.php');
?>