View file guest/style.php

File size: 2.76Kb
<?
include_once '../sys/inc/start.php';
include_once '../sys/inc/compress.php';
include_once '../sys/inc/sess.php';
include_once '../sys/inc/home.php';
include_once '../sys/inc/settings.php';
include_once '../sys/inc/db_connect.php';
include_once '../sys/inc/ipua.php';
include_once '../sys/inc/fnc.php';
include_once '../sys/inc/user.php';


/* Бан пользователя в гостевой*/ 
if (isset($user) && mysql_result(mysql_query("SELECT COUNT(*) FROM `ban` WHERE `razdel` = 'guest' AND `id_user` = '$user[id]' AND (`time` > '$time' OR `view` = '0')"), 0)!=0)
{
	header('Location: /ban.php?'.SID);
	exit;
}
// Если не юзер или нет данных поста выкидываем
if (!$user || !$_SESSION['text']){ header("Location: index.php"); exit;}

// Cохраняем пост в сессию
if (isset($_POST['msg']))$_SESSION['text'] = $_POST['msg'];

// Берем текст из сессии 
$msg2 = htmlspecialchars($_SESSION['text']);

/**
* / Оформление поста
*/

if (!isset($_SESSION['fon'])) $_SESSION['fon'] = 31;

/**
* 
* @var / Выбор фона
* 
*/
if (isset($_GET['fon']))
{
	$fon = abs(intval($_GET['fon']));

	if ($fon > 0 && $fon < 51)
	$_SESSION['fon'] = $fon;
	
}
	
	$set['title'] = 'Редактор оформления'; // заголовок страницы

	include_once '../sys/inc/thead.php';
	title();
	aut();

?>
<style>
.n1 {
	background:#fff; 
	padding:4px; 
	margin:2px; 
	margin-top:5px; 
	display:table;
	border: 1px #cacaca solid;
	-o-border-radius: 9px 9px 0 0;
	border-radius:9px 9px 0 0;
	-moz-border-radius:9px 9px 0 0;
}

.n2 {
	background:#fff; 
	padding:4px; 
	margin:2px;
	border: 1px #cacaca solid;
	-o-border-radius: 0 9px 9px 9px;
	border-radius: 0 9px 9px 9px;
	-moz-border-radius: 0 9px 9px 9px;
}
</style>
<?

echo '<div class="nav1" style="background-image:url(style/' . $_SESSION['fon'] . '.jpg); padding-top:10px; ">';

echo '<div class="n1">';
echo group($user['id']) . " <a href='/info.php?id=$user[id]'>$user[nick]</a> ";
echo medal($user['id']) . online($user['id']).' ('.vremja($time).')<br />';
echo '</div>';

echo '<div class="n2">';
echo output_text($_SESSION['text']);
echo '</div>';


echo '</div>';

/**
* 
* @var / Выбираем фон
* 
*/

	echo '<div class="foot">';
	echo '<img src="/style/icons/ok.gif" alt="*"> <a href="index.php">Готово</a><br />';
	echo '</div>';
	
	$n = 51;
	for ($i = 1; $n > $i; $i++)
	{
		echo '<a href="?fon='.$i.'"><img width="45" src="style/' . $i . '.jpg"/></a> ';
	}


echo '<div class="foot">';
echo '<img src="/style/icons/str2.gif" alt="*"> <a href="index.php">Гостевая</a><br />';
echo '</div>';

include_once '../sys/inc/tfoot.php';
?>