View file NuclearCMS_v.1.0.0/forum/users.php

File size: 4.51Kb
<?php
include_once("connect.php");
include_once("config.php");
$sid = sql($_GET['sid']);
	$ses = mysql_query("SELECT * FROM `session` WHERE `sid`='".$sid."'");

	if(mysql_num_rows($ses) > 0)
	{
		$authorize = 1;
	}
	else
	{
		$authorize = 0;
	}
		if($authorize)
		{
			$sesR = mysql_fetch_array($ses);
			$username = $sesR['nickname'];
			$password = $sesR['password'];

			// Вытаскиваем данные о пользователе из БД.

			$infoUserQuery = mysql_query("SELECT * FROM `users` WHERE `username`='".$username."' AND `password`='".$password."'");

			$infoUserRows = mysql_fetch_array($infoUserQuery);

			$uid = $infoUserRows['id'];
			$themesonstr = $infoUserRows['themesonstr']; // Тем на страницу
			$messageonstr = $infoUserRows['messageonstr']; // Сообщений на страницу
			$color = $infoUserRows['style'];
			$transl = $infoUserRows['transl'];
			$shrift = $infoUserRows['shrift'];
			$order = $infoUserRows['order'];
			$status = $infoUserRows['status'];
			$pageSize = $infoUserRows['ps'];

		} else
		{
			$shrift = $defaultsh;
			if(!$_GET['th'])
			{
			$color = $defaultst;
			}
			else
			{
			$color = sql(htmlspecialchars(trim(chop($_GET['th']))));
			}
			$themesonstr = 5;
			$messageonstr = 5;
			$pageSize = 2000;
		}
		if($color == "0")
            {
            	$style = array();
                $style['background'] = "#8AC8DB";
				$style['link'] = "#225C6E";
				$style['vlink'] = "#6CB9D1";
				$style['title'] = "#ADD8E6";
				$style['bottom'] = "#C8E5EE";
				$style['bottomcolor'] = "#09465f";
				$style['text'] = "#E2F1F6";
				$style['textcolor'] = "#baf0f1";
			} elseif($color == "1")
            {
				$style = array();
				$style['background'] = "#4E0000";
				$style['link'] = "#8a0000";
				$style['vlink'] = "#8a0000";
				$style['title'] = "#7b0000";
				$style['bottom'] = "#e3b6b6";
				$style['bottomcolor'] = "#8a0000";
				$style['text'] = "#efe2e2";
				$style['textcolor'] = "#efe2e2";
			} elseif($color == "2")
			{
				$style = array();
				$style['background'] = "#c19330";
				$style['link'] = "#6b5100";
				$style['vlink'] = "#8a0000";
				$style['title'] = "#de6e00";
				$style['bottom'] = "#ffc000";
				$style['bottomcolor'] = "#ffc000";
				$style['text'] = "#f9e8b5";
				$style['textcolor'] = "#f9e8b5";
			} elseif($color == "3")
			{
				$style = array();
				$style['background'] = "#318CBD";
				$style['link'] = "#148AFF";
				$style['vlink'] = "#148AFF";
				$style['title'] = "#3BCACC";
				$style['bottom'] = "#CEEBE5";
				$style['bottomcolor'] = "000000";
				$style['text'] = "#BAF0F1";
				$style['textcolor'] = "#f9e8b5";
			} elseif($color == "4")
			{
				$style = array();
				$style['background'] = "#191919";
				$style['link'] = "#FFFDE6";
				$style['vlink'] = "#FFFDE6";
				$style['title'] = "#4F4F4F";
				$style['bottom'] = "#363636";
				$style['bottomcolor'] = "000000";
				$style['text'] = "#8B8B83";
				$style['textcolor'] = "#8B8B83";
			} elseif($color == "5")
			{
				$style = array();
				$style['background'] = "#808080";
				$style['link'] = "#00008B";
				$style['vlink'] = "000000";
				$style['title'] = "#000159";
				$style['bottom'] = "#A7A7A7";
				$style['bottomcolor'] = "000000";
				$style['text'] = "#B9B9B9";
				$style['textcolor'] = "#EDEDED";
			} elseif($color == "6")
			{
				$style = array();
				$style['background'] = "#666600";
				$style['link'] = "#666600";
				$style['vlink'] = "#4CA14C";
				$style['title'] = "#808000";
				$style['bottom'] = "#A8B680";
				$style['bottomcolor'] = "000000";
				$style['text'] = "#FFFFCC";
				$style['textcolor'] = "#EDEDED";
			} elseif($color == "7")
			{
				$style = array();
				$style['background'] = "#82468F";
				$style['link'] = "#6E0085";
				$style['vlink'] = "#6E0085";
				$style['title'] = "#600074";
				$style['bottom'] = "#CCB8D0";
				$style['bottomcolor'] = "000000";
				$style['text'] = "#DFD8E0";
				$style['textcolor'] = "#000000";
			} elseif($color == "8")
			{
				$style = array();
				$style['background'] = "#239651";
				$style['link'] = "#006f11";
				$style['vlink'] = "#006f11";
				$style['title'] = "#005522";
				$style['bottom'] = "#a2edc0";
				$style['bottomcolor'] = "000000";
				$style['text'] = "#c5ffdc";
				$style['textcolor'] = "#000000";
			}


if($shrift == "small")
{
	$tag = "<small>";
	$tagC = "</small>";
}
elseif($shrift == "large")
{
	$tag = "<big>";
	$tagC = "</big>";
}



?>