File size: 5.32Kb
<?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);
if(basename($_SERVER['PHP_SELF']) == "settings.php" OR basename($_SERVER['PHP_SELF']) == "profile.php")
{
$regdate = $infoUserRows['regdate'];
$realname = $infoUserRows['realname'];
$photo = $infoUserRows['photo'];
$rdate = $infoUserRows['rdate']; //
$icq = $infoUserRows['icq'];
$site = $infoUserRows['site'];
$mail = $infoUserRows['mail'];
$sex = $infoUserRows['sex'];
$about = $infoUserRows['about'];
$aRDate = explode("-", $rdate);
}
$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'] = "#239651";
$style['link'] = "#006f11";
$style['vlink'] = "#006f11";
$style['title'] = "#005522";
$style['bottom'] = "#a2edc0";
$style['bottomcolor'] = "#ddffee";
$style['text'] = "#c5ffdc";
$style['textcolor'] = "#FFFFFF";
} elseif($color == "1")
{
$style = array();
$style['background'] = "#8AC8DB";
$style['link'] = "#225C6E";
$style['vlink'] = "#6CB9D1";
$style['title'] = "#ADD8E6";
$style['bottom'] = "#C8E5EE";
$style['bottomcolor'] = "#00BFFF";
$style['text'] = "#E2F1F6";
$style['textcolor'] = "#baf0f1";
} elseif($color == "2")
{
$style = array();
$style['background'] = "#4E0000";
$style['link'] = "#8a0000";
$style['vlink'] = "#8a0000";
$style['title'] = "#7b0000";
$style['bottom'] = "#e3b6b6";
$style['bottomcolor'] = "#DC143C";
$style['text'] = "#efe2e2";
$style['textcolor'] = "#efe2e2";
} elseif($color == "3")
{
$style = array();
$style['background'] = "#c19330";
$style['link'] = "#6b5100";
$style['vlink'] = "#8a0000";
$style['title'] = "#de6e00";
$style['bottom'] = "#ffc000";
$style['bottomcolor'] = "#A0522D";
$style['text'] = "#f9e8b5";
$style['textcolor'] = "#f9e8b5";
} elseif($color == "4")
{
$style = array();
$style['background'] = "#318CBD";
$style['link'] = "#148AFF";
$style['vlink'] = "#148AFF";
$style['title'] = "#3BCACC";
$style['bottom'] = "#CEEBE5";
$style['bottomcolor'] = "#7B68EE";
$style['text'] = "#BAF0F1";
$style['textcolor'] = "#f9e8b5";
} elseif($color == "5")
{
$style = array();
$style['background'] = "#000000";
$style['link'] = "#FF0000";
$style['vlink'] = "#FFFDE6";
$style['title'] = "#4F4F4F";
$style['bottom'] = "#D3D3D3";
$style['bottomcolor'] = "#FFFFFF";
$style['text'] = "#8B8B83";
$style['textcolor'] = "#8B8B83";
} elseif($color == "6")
{
$style = array();
$style['background'] = "#686868";
$style['link'] = "#505050";
$style['vlink'] = "505050";
$style['title'] = "#3a3a3a";
$style['bottom'] = "#c4c4c4";
$style['bottomcolor'] = "f9f9f9";
$style['text'] = "#EDEDED";
$style['textcolor'] = "#EDEDED";
} elseif($color == "7")
{
$style = array();
$style['background'] = "#666600";
$style['link'] = "#666600";
$style['vlink'] = "#4CA14C";
$style['title'] = "#808000";
$style['bottom'] = "#A8B680";
$style['bottomcolor'] = "808000";
$style['text'] = "#FFFFCC";
$style['textcolor'] = "#EDEDED";
} elseif($color == "8")
{
$style = array();
$style['background'] = "#82468F";
$style['link'] = "#6E0085";
$style['vlink'] = "#6E0085";
$style['title'] = "#600074";
$style['bottom'] = "#CCB8D0";
$style['bottomcolor'] = "#DDA0DD";
$style['text'] = "#DFD8E0";
$style['textcolor'] = "#000000";
} elseif($color == "9")
{
$style = array();
$style['background'] = "#008f87";
$style['link'] = "#09465f";
$style['vlink'] = "#09465f";
$style['title'] = "#06496f";
$style['bottom'] = "#5aafd2";
$style['bottomcolor'] = "#66CDAA";
$style['text'] = "#baf0f1";
$style['textcolor'] = "#FFFFFF";
}
if($shrift == "small")
{
$tag = "<small>";
$tagC = "</small>";
}
elseif($shrift == "large")
{
$tag = "<big>";
$tagC = "</big>";
}
?>