Parse error: syntax error, unexpected end of file in /home/public_html/index.php on line 102
код (+/-)
<?php
include 'head.php';
?>
<div id="main">
<div class="post"><div class="post_top">
<div class="post_title"><h2><a></a><a><font color='red' bold="bold">Авторизация пользователя</font></a></h2>
</div></div>
<div class="post_body"><table width="100%" cellpadding="0" cellspacing="0"><tbody><tr>
<?php
if(isset($_POST['id']) and isset($_POST['auth']))
{
$auth = mysql_escape_string(trim($_POST['auth']));
$id = ntval($_POST['id']);
$req = mysql_query("SELECT * FROM `users` WHERE `vk_id`='" . $id . "' LIMIT 1");
if (mysql_num_rows($req))
{
$user = mysql_fetch_assoc($req);
if($auth == $req['auth'])
$_SESSION['vkid']=$id;
$_SESSION['auth']=$auth;
echo "<center>Вы успешно авторизовались</center>";
}else{
$nick = 'id' . $id;
$log = getpage('/prison/universal.php?method=getInfo&user='.$id.'&key='.$auth);
$begin = '<result>';
$end = '</result>';
$enter = pars($log,$begin,$end);
if($enter=="0")
{
echo "<center><font color='red' bold>Неверный ID и AUTH KEY</font></center>";
}else{
mysql_query("INSERT INTO `users` SET
`vk_id` = '" . $id . "',
`nick` = '" . $nick . "',
`auth_key` = '" . $auth . "'
");
echo "<center><font color='green' bold>Вы успешно зарегистрировались</font></center>";
}
if($_GET['action']=='exit') {
unset($_SESSION['id']);
unset($_SESSION['auth']);
session_destroy();
echo "<script text='javascript'>location.href='/';</script>";
}
if(!$_SESSION['vkid']) {
echo '
<form action="" method="POST">
<table width="100%" cellpadding="0" cellspacing="0">
<tbody>
<br>
<tr>
Ваш ID:
<input type="text" class="inputadd" name="vkid" value="" placeholder="Ваш ID"><br><br>
</tr>
<tr>
Ваш auth_key:
<input type="text" class="inputadd" name="authkey" value="" placeholder="Ваш auth_key"><a href="/chat.php">(?)</a><br><br>
</tr>
</tbody></table>
<tr>
</tr>
<br>
<div>
<center><input type="image" src="index_files/okay0000.png"/></center>
</form>
';
} else {
include 'edit.php';
}
?>
</td></td></td></td>
</tr></tbody></table>
<div class="post_metadata"><div class="content">
<center>
</center>
<div class="post_metadata"></div></div>
</div></div></div>
<?php
include 'foot.php';
?>