File size: 2.08Kb
<?php
error_reporting(0);
include('../start.php');
include("../config.php");
include("../includes/".$ver."/banned");
$ttl = "Мои ресурсы";
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-revalidate");
//AUTH
$id = intval($_SESSION['id']);
$password = mysql_escape_string($_SESSION['password']);
$q = mysql_query("SELECT * FROM `chat_users` WHERE `id` = '".$id."' AND `password` = '".md5($password)."';");
if(mysql_affected_rows() == 0)
{
echo "$css";
echo'<title>'.$ttl.'</title>';
echo'<div class="d3">Ошибка</div>';
echo "<div class=\"d5\">Ошибка авторизации!</div>\n";
echo'<div class="d3">';
echo"$sitefoot";
echo'</div>';
echo "</body></html>";
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
$sql = mysql_query("SELECT `name` FROM `chat_rooms` WHERE `id` = '".intval($_GET['rid'])."';");
$name = mysql_result($sql, 0);
echo "$css";
echo'<title>'.$ttl.'</title>';
echo'<div class="d3">'.$ttl.'</div>';
echo "<form ENCTYPE=\"multipart/form-data\" action=\"index.php?".SID."&ver=html\" method=\"post\">
Вы можете загрузить 5 картинок (jpg, jpeg, gif, png), 1 видео (3gp), 1 мелодию (mp3, amr).<br>
<INPUT NAME=\"filename\" TYPE=\"file\" SIZE=\"20\"><br>
<input type=\"submit\" name=\"go\" value=\"Отправить\">
</form>";
//
if(isset($_FILES))
{ copy($_FILES['hh']['hh'],'/upload/' . $_FILES['filename']['name']);
$filename = $_FILES['hh']['hh'];
$message = 'Файл загружен';
}
//
echo "<div class=\"d1\">• <a href=\"menu.php?".SID."&ver=html\">В прихожую</a></div>\n";
echo'<div class="d3">';
echo"$sitefoot";
echo'</div>';
echo "</body></html>";
?>