<?php
require_once"../template/start.php";
require_once"../template/regglobals.php";
require_once"../template/config.php";
require_once"../template/functions.php";
//require_once"../template/maincore.php";
require_once"../template/antidos.php";
require_once"../template/cookies.php";
require_once"../template/gzip.php";
require_once"../template/header.php";
require_once"../template/referer.php";
include_once"../themes/$config_themes/index.php";
if (md5($_SESSION['par'])!==$provpar || $_SESSION['log']!==$provlog || $_SESSION['log']=="" || md5($_SESSION['par'])==""){ //---От-М17---//
// if ($provlog==$_SESSION['log'] && $provpar==md5($_SESSION['par']) && $_SESSION['log']!="" && md5($_SESSION['par'])!=""){
 	echo "Для начала Вам необходимо <a href=\"../pages/vhod.php?".SID."\">авторизоваться</a> или
 	<a href=\"../pages/registration.php?\">зарегестрироваться</a><br />\r\n";
 	echo '<br><img src="../images/img/dot.gif" alt=""> <a href="../index.php?'.SID.'">На главную</a> | ';
 	echo'<a href="../book/?'.SID.'">Гостевая</a> ('.(int)$book_shet.') |';
 	echo'<a href="../forum/?'.SID.'"> Форум </a> ('.(int)$forum_shet.') |<br>';
 	include_once"../themes/$config_themes/foot.php";
 	exit;
 	}
 	     /*
 	$text = file(BASEDIR."local/profil/$log.prof");
 	if ($text!=""){
 		$udata = explode(":||:",$text[0]);
 		$provlog=trim($udata[0]);
 		$provpar=trim($udata[1]);
 		$privat=trim($udata[10]);}
 		if ($text!=""){
 			$udata = explode(":||:",$text[0]);
 			$provlog=trim($udata[0]);
 			$provpar=trim($udata[1]);
 			$privat=trim($udata[10]);}
 			*/
 if (md5($_SESSION['par'])!==$provpar || $_SESSION['log']!==$provlog || $_SESSION['log']=="" || md5($_SESSION['par'])==""){
 	header ("Location: index.php?".SID."");exit;}
 	if (!file_exists("../local/datachat/rooms.dat")){
 		header ("Location: index.php?".SID."");}
// if(@file("../themes/$themes.php")){include_once"../themes/$config_themes/index.php";}else{$themes="default";include_once"../themes/$config_themes/index.php";}
 $room_ok='0';
 if($udata[10]>0){
 	echo'<b><a class="b" href="../pages/privat.php?'.SID.'"><font color="#FF0000">Вам письмо! ['.$privat.']</font></a></b><br />';}/*
 $co_n_ss='0';
 if (file_exists("../local/datalove/kont/$log.kont")){
 	$counter_n_s=file("../local/datalove/kont/$log.kont");
 	$counter_n_s_k=count($counter_n_s);
 	for ($i=0;$i<$counter_n_s_k;$i++){
 		$co_n=explode(":||:",$counter_n_s[$i]);
 		if ($co_n[2]!='' && $co_n[2]>'0'){
 			$co_n_ss=$co_n_ss+$co_n[2];}}
 }

 if ($co_n_ss!='0'){
 	echo "<b><a class=\"menu\" href=\"../love/love.php?".SID."\"><font color=\"#FF0000\">Знакомства [$co_n_ss]</font></a></b><br />";
 	}
 	if ($co_n_ss!='0' || $udata[10]>0){
 		echo "<br />\r\n";}
 		*/
 	echo "</div><div class=\"b\">Написать</div><div>";
 	echo "<form action=\"add.php?id_room=$id_room&amp;kont=$kont&amp;act=send&amp;".SID."\" method=\"post\" >";
 	echo "<textarea name=\"msg\">$kont, </textarea>\r\n";
 	echo "<br />\r\n";
 	echo "Приват: <input type=\"checkbox\" name=\"privat\" value=\"1\" />";
 	echo "<br />\r\n";
 	if($config_translit=="1"){
 		echo'Транслит: <input name="trans" type="checkbox" value="y" /><br>';}
 		echo'<input type="submit" value="Отправить" /><br></form>';
 		echo "</form>\r\n";
 		echo "<hr />\r\n";
 		echo "<a href=\"/pages/anketa.php?uz=$kont&amp;".SID."\">Анкета $kont</a><br>";
 		echo " <a href=\"chat.php?id_room=$id_room&amp;".SID."\">Назад</a> |";
 		echo ' <a href="index.php?'.SID.'">Комнаты</a><br>';
 		echo '<br><img src="../images/img/homepage.gif" alt=""> <a href="../index.php?'.SID.'">На главную</a>';
include_once"../themes/$config_themes/foot.php";
?>
