View file vmeets.php

File size: 1.53Kb
<?php
$urls='vmeets.php';
error_reporting(0);

include("config.php");
include("./includes/".$ver."/banned");

list($msec, $sec) = explode(chr(32), microtime()); 
$headtime = $sec + $msec;

$ref = rand(1000, 9999);

header ("Content-type: text/html; charset=utf-8");
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
header("Cache-Control: no-cache, must-relative");
include("./template/head.php");
//AUTH
$q = mysql_query("SELECT `id` FROM `chat_users` WHERE `id` = '".$id."' AND `password` = '".$password."';");
if(mysql_num_rows($q) == 0)
{
include("./reginc.php");
include("./template/foot.php");
exit();
}
//END AUTH

//ONLINE
$online = time() + 60;
$update = mysql_query("UPDATE `chat_users` SET `time` = '".$online."', `place` = 0, `ip` = '".getenv('REMOTE_ADDR')."', `ua` = '".htmlspecialchars(getenv('HTTP_USER_AGENT'))."' WHERE `id` = '".$id."';");
//END ONLINE

$mid = intval($_GET['mid']);

$q = mysql_query("SELECT * FROM `chat_meets` WHERE `id` = '".$mid."';");

if(mysql_num_rows($q) == 0)
{
echo "Встреча не найдена в базе данных...<br/>";
echo "<a href=\"index.php\">Меню чата</a><br/>";
include("./template/foot.php");
exit();
}
else
{
$meets = mysql_fetch_array($q);
$name = $meets['name'];
$text = $meets['body'];
$author = $meets['author'];
$date = $meets['date'];
}


echo "<u>Организатор:</u> $author<br/>\n";
echo "<u>Дата:</u> $date<br/>\n";
echo "$text<br/>\n";
echo "<a href=\"index.php\">Меню чата</a><br/>";
include("./reginc.php");
include("./template/foot.php");
break;
?>