<?php
session_start();
include 'conect_db.php';
$ip = getenv("HTTP_X_FORWARDED_FOR");
$ban = mysql_fetch_array(mysql_query("SELECT * FROM ban_ip WHERE ip='$ip' "));
if($ban['ip'] != $ip){
$work = mysql_fetch_array(mysql_query("SELECT * FROM work_game WHERE id='3' "));
$submit = mysql_real_escape_string(strip_tags($_POST['submit']));
$username = mysql_real_escape_string(strip_tags($_POST['username']));
$password = mysql_real_escape_string(strip_tags($_POST['password']));
$repeatpassword = mysql_real_escape_string(strip_tags($_POST['repeatpassword']));
$email = mysql_real_escape_string(strip_tags($_POST['email']));
$pol = mysql_real_escape_string(strip_tags($_POST['pol']));
$aboutme = mysql_real_escape_string(strip_tags($_POST['aboutme']));
$age = mysql_real_escape_string(strip_tags($_POST['age']));
$day = mysql_real_escape_string(strip_tags($_POST['day']));
$mon = mysql_real_escape_string(strip_tags($_POST['mon']));
$date = date("Y-m-d H:i:s");
$login= mysql_real_escape_string(strip_tags($_POST['login']));
$startpoke = mysql_real_escape_string(strip_tags($_POST['startpoke']));
$rules = mysql_real_escape_string(strip_tags($_POST['rules']));
$id = mysql_real_escape_string(strip_tags($_GET['id']));
$hp_max = 6*5/2+10;
$hp_min = $hp_max - 5 ;
$hp = rand($hp_max,$hp_min);
$atk_max = 6*5/2+3;
$atk_min = $atk_max - 5 ;
$atk = rand($atk_max,$atk_min);
$def_max = 6*5/2+3;
$def_min = $def_max - 5 ;
$def = rand($def_max,$def_min);
$sp_max = 6*5/2+3;
$sp_min = $sp_max - 5 ;
$sp = rand($sp_max,$sp_min);
$sp_atk_max = 6*5/2+3;
$sp_atk_min = $sp_atk_max - 5 ;
$sp_atk = rand($sp_atk_max,$sp_atk_min);
$sp_def_max = 6*5/2+3;
$sp_def_min = $sp_def_max - 5 ;
$sp_def = rand($sp_def_max,$sp_def_min);
mysql_query("set names utf-8 ");
if ($submit)
{
// check for existans
if($username&&$password&&$repeatpassword&&$email)
{
if ($password==$repeatpassword)
{
if (!preg_match("#^[a-zA-Z0-9]+$#i", $username)){
echo "<script> alert('Логин должен состоять с A-Z , a-z, 0-9!');</script>";
}
else{
if(strlen($username)>15||strlen($username)<4)
{
echo "<script> alert('Логин должен быть от 4 до 25 символов!');</script>";
}
else
{
$mysql = mysql_query("SELECT * FROM users WHERE username='$username' ");
$row = mysql_fetch_array($mysql);
if($username == $row['username']){
echo "<script> alert('Такой пользователь уже существует!');</script>";
}
else{
//check password
if (strlen($password)>25||strlen($password)<6)
{
echo "<script> alert('Пароль должен быть от 6 до 25 символов!');</script>";
}
else
{
//encrypt password
$password =md5($password);
$repeatpassword =md5($repeatpassword);
//open database
if($pol == 0 || $pol > 2){
echo "<script> alert('Вы не выбрали свой пол!');</script>";
}
else{
if(strlen($aboutme)==0){
echo "<script> alert('Вы не рассказали о себе!');</script>";
}
else{
if(strlen($startpoke)==0){
echo "<script> alert('Вы не выбрали покемона!');</script>";
}
else{
if($rules ==1){
if($work['active']==1){
echo "<script>alert('Уважаемый ".$username.", регистрация, на данный момент, закрыта!');location.href='/index.php';</script>";
}
else{
if($id){
mysql_query("INSERT INTO ref_ssilki (ref_id,username,ip) values('$id','$username','$ip')");
}
else{
}
mysql_query ("INSERT INTO `users` (username,password,email,date,ip,pol,age,day,mon,aboutme) values('$username','$password','$email','$date','$ip','$pol','$age','$day','$mon','$aboutme')") or die(mysql_error());
$sql1 = mysql_query("SELECT * FROM pokemon WHERE id_pok='$startpoke' ");
$row1 = mysql_fetch_array($sql1);
$pol = rand(0,1);
$har = rand(1,5);
mysql_query("INSERT INTO user_pokemon (img,name,level,atk_1,atk_2,atk_3,atk_4,all_life,life,atk,def,sp,sp_atk,sp_def,type,NextEvo,Evolve,username,start,yes,first,pol,egg,active,har)
values
('".$row1['img']."','".$row1['name']."','6','".$row1['atk_1']."','".$row1['atk_2']."','".$row1['atk_3']."','".$row1['atk_4']."','$hp','$hp','$atk','$def','$sp','$sp_atk','$sp_def','".$row1['type']."','".$row1['NextEvo']."','".$row1['Evolve']."','$username','1','1','1','$pol','0','1','$har') ");
mysql_query("INSERT INTO inv (id_item,kolovo,id_img,title,about,username) values('60','25','60','Покебол','Белый с красным шар, нужен для поимки и переноса покемона.','$username')");
if(strlen($login) > 0){
mysql_query("INSERT INTO ref_ssilki(username,ip) values('$login','$ip')");
}
else{
}
echo "<script>alert('Уважаемый ".$username.", вы удачно прошли регистрацию, добро пожаловать в наш мир!');location.href='/index.php';</script>";
}
}
else{
echo "<script> alert('Вы не Соглашаетесь с правилами О_о');</script>";
}
}
}
}
}
}
}
}
}
else
echo "<script> alert('Пароли не совпадают!');</script>";
}
else
echo "<script> alert('Вы ввели не всю информацию!');</script>";
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"[]>
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en-US" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; CONTENT="text/html; Charset=Windows-1251" />
<title>PokeFriends</title>
<link rel="stylesheet" href="style.css" type="text/css" media="screen" />
<!--[if IE 6]><link rel="stylesheet" href="style.ie6.css" type="text/css" media="screen" /><![endif]-->
<!--[if IE 7]><link rel="stylesheet" href="style.ie7.css" type="text/css" media="screen" /><![endif]-->
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="script.js"></script>
<style type="text/css">
.art-post .layout-item-0 { vertical-align: bottom; }
.art-post .layout-item-1 { color: #092D3F; background:repeat #D2D8DB; }
.art-post .layout-item-2 { color: #092D3F;}
.ie7 .art-post .art-layout-cell {border:none !important; padding:0 !important; }
.ie6 .art-post .art-layout-cell {border:none !important; padding:0 !important; }
</style>
</head>
<body>
<div id="art-page-background-glare-wrapper">
</div>
<div id="art-main">
<div class="cleared reset-box"></div>
<div class="art-header">
<div class="art-header-position">
<div class="art-header-wrapper">
<div class="cleared reset-box"></div>
<div class="art-header-inner">
<div class="art-headerobject"></div>
<div class="art-logo">
<h1 class="art-logo-name"><a href="./index.php">PokeFriends</a></h1>
<h2 class="art-logo-text">MMORPG - По миру Покемонов</h2>
</div>
</div>
</div>
</div>
</div>
<div class="cleared reset-box"></div>
<div class="art-bar art-nav">
<div class="art-nav-outer">
<div class="art-nav-wrapper">
<div class="art-nav-inner">
<ul class="art-hmenu">
<li>
<a href="./index.php" class="active">Главная</a>
</li>
<li>
<a href="./register.php">Регистрация</a>
</li>
<li>
<a href="./rules.php">Правила</a>
</li>
<li>
<a href="/game.php?page=pokemons">Играть</a>
</li>
<li>
<a href="http://forum.pokess.ru">Форум</a>
</li>
</ul>
</div>
</div>
</div>
</div>
<div class="cleared reset-box"></div>
<div class="art-box art-sheet">
<div class="art-box-body art-sheet-body">
<div class="art-layout-wrapper">
<div class="art-content-layout">
<div class="art-content-layout-row">
<div class="art-layout-cell art-sidebar1">
<div class="art-box art-block">
<div class="art-box-body art-block-body">
<div class="art-bar art-blockheader">
<h3 class="t" align='center'>Авторизация</h3>
</div>
<div class="art-box art-blockcontent">
<div class="art-box-body art-blockcontent-body">
<p>
<center>
<?php
if($_SESSION['username']){
echo "<b>Добро пожаловать, ".$_SESSION['username']."<br><a href='/game.php?page=pokemons';>Играть</a><br><a href='/game.php?page=logout';>Выход</a></b>";
}
else{
?>
<form action='/checklogin.php' method='post'>
<b>Логин</b>
<br><input name='login' type='text' size='15'>
<br><b>Пароль</b>
<br><input name='password' type='password' size='15'>
<br><input name='submit' type='submit' value='Вход'><br>
<br><a href='/register.php'>Регистрация</a>
</form>
</center>
<?php } ?>
</p>
<div class="cleared"></div>
</div>
</div>
<div class="cleared"></div>
</div>
</div>
<div class="art-box art-block">
<div class="art-box-body art-block-body">
<div class="art-bar art-blockheader">
<h3 class="t" align="Center">Полезное</h3>
</div>
<div class="art-box art-blockcontent">
<div class="art-box-body art-blockcontent-body">
<p><a href='http://сайт-злодій/pokess_ru'><b>Мы ВКонтакте</b></a></p>
<p><a href='http://s019.сайт-злодій/i641/1204/7a/6b2172a21591.png'><b>Карта Канто</b></a></p>
<p><a href='http://forum.pokess.ru/viewtopic.php?f=8&t=8'><b>Квесты</b></a></p>
<p><a href='http://forum.pokess.ru/viewforum.php?f=9'><b>Мероприятия</b></a></p>
<div class="cleared"></div>
</div>
</div>
<div class="cleared"></div>
</div>
</div>
<div class="art-box art-block">
<div class="art-box-body art-block-body">
<div class="art-bar art-blockheader">
<h3 class="t" align="Center">Турниры</h3>
</div>
<div class="art-box art-blockcontent">
<div class="art-box-body art-blockcontent-body">
<p>Будущие турниры:</p>
<p>- - -</a></p>
<p>Прошедшие турниры</p>
<p><a href='http://forum.pokess.ru/viewtopic.php?f=15&t=19'><b>Праздничный турнир</b></a></p>
<p><a href='http://forum.pokess.ru/viewtopic.php?f=15&t=27'><b>Турнир на #304 Aron</b></a></p>
<div class="cleared"></div>
</div>
</div>
<div class="cleared"></div>
</div>
</div>
<div class="art-box art-block">
<div class="art-box-body art-block-body">
<div class="art-bar art-blockheader">
<h3 class="t" align="Center">Рейтинг ТОП 5</h3>
</div>
<div class="art-box art-blockcontent">
<div class="art-box-body art-blockcontent-body">
<p>Тренеры:</p>
<p>
<?php
$sql_ran = mysql_query("SELECT * FROM users WHERE rang > 100 ORDER BY `rang`DESC limit 5");
while($row_ran = mysql_fetch_array($sql_ran)){
echo "<li><b>".$row_ran['username']."</b> - <i>".$row_ran['rang']."</i></li>";
}
?></p>
<p>Покедекс</p>
<p>- - -</p>
<p>Кланы</p>
<p>
<?php
$sql_ran_kl = mysql_query("SELECT * FROM clans WHERE rang > 20 ORDER BY `rang`DESC limit 5");
while($row_ran_kl = mysql_fetch_array($sql_ran_kl)){
echo "<li><b>".$row_ran_kl['name']."</b> - <i>".$row_ran_kl['rang']."</i></li>";
}
?>
</p>
<div class="cleared"></div>
</div>
</div>
<div class="cleared"></div>
</div>
</div>
<div class="art-box art-block">
<div class="art-box-body art-block-body">
<div class="art-bar art-blockheader">
<h3 class="t" align="Center">Помощь проекту </h3>
</div>
<div class="art-box art-blockcontent">
<div class="art-box-body art-blockcontent-body">
<p>
Понравилась игра? Внесите вклад в ее развитие, пожертвовав любую сумму на один из кошельков:
</p>
<p>
<img title="ВебМани" src="/images/wmkeeper.png" style="float: left ;margin-right:10px" /><strong>U266154344019<br/>R242332672853</strong>
</p>
<p>
<img title="Яндекс-Деньги" src="/images/yandex_money.png" style="float: left ;margin-right:10px; margin-top:-7px" /><strong>410011382947559</strong>
</p>
<br>
<p>
Деньги пойдут на оплату сервера и на развитие сайта.
В примечании к платежу укажите Ваш email или логин в нашей игре.
</p>
<div class="cleared"></div>
</div>
</div>
<div class="cleared"></div>
</div>
</div>
<div class="art-box art-block">
<div class="art-box-body art-block-body">
<div class="art-bar art-blockheader">
<h3 class="t" align="Center">Статистика</h3>
</div>
<div class="art-box art-blockcontent">
<div class="art-box-body art-blockcontent-body">
<BR>Всего игроков:
<?php
$res = mysql_query("SELECT COUNT(*) as count FROM users");
$all_user = @mysql_fetch_array($res);
echo $all_user['count'];
?>
<BR>Онлайн игроков:
<?php
$on = mysql_query("SELECT COUNT(*) as count FROM online");
$all_on = @mysql_fetch_array($on);
echo $all_on['count'];
?>
<BR>Всего за день:
<?php
$all_day= mysql_query("SELECT COUNT(*) as count FROM user_day");
$all_user_day= @mysql_fetch_array($all_day);
echo $all_user_day['count'];
?>
<BR><BR>Покемонов в бою:
<?php
$all_battle= mysql_query("SELECT COUNT(*) as count FROM battle");
$all_battle_1= @mysql_fetch_array($all_battle);
echo $all_battle_1['count'];
?>
<BR>Всего покемонов:
<?php
$all_battle_user= mysql_query("SELECT COUNT(*) as count FROM pokemon");
$all_battle_user_1= @mysql_fetch_array($all_battle_user);
echo $all_battle_user_1['count'];
?>
<!-- HotLog -->
<script type="text/javascript" language="javascript">
hotlog_js="1.0"; hotlog_r=""+Math.random()+"&s=2245406&im=71&r="+
escape(document.referrer)+"&pg="+escape(window.location.href);
</script>
<script type="text/javascript" language="javascript1.1">
hotlog_js="1.1"; hotlog_r+="&j="+(navigator.javaEnabled()?"Y":"N");
</script>
<script type="text/javascript" language="javascript1.2">
hotlog_js="1.2"; hotlog_r+="&wh="+screen.width+"x"+screen.height+"&px="+
(((navigator.appName.substring(0,3)=="Mic"))?screen.colorDepth:screen.pixelDepth);
</script>
<script type="text/javascript" language="javascript1.3">
hotlog_js="1.3";
</script>
<script type="text/javascript" language="javascript">
hotlog_r+="&js="+hotlog_js;
document.write('<a href="http://click.hotlog.ru/?2245406" target="_blank"><img '+
'src="http://hit41.hotlog.ru/cgi-bin/hotlog/count?'+
hotlog_r+'" border="0" width="88" height="31" title="" alt="HotLog"><\/a>');
</script>
<noscript>
<a href="http://click.hotlog.ru/?2245406" target="_blank"><img
src="http://hit41.hotlog.ru/cgi-bin/hotlog/count?s=2245406&im=71" border="0"
width="88" height="31" title="" alt="HotLog"></a>
</noscript>
<!-- /HotLog -->
<div class="cleared"></div>
</div>
</div>
<div class="cleared"></div>
</div>
</div>
<div class="art-box art-block">
<div class="art-box-body art-block-body">
<div class="art-bar art-blockheader">
<h3 class="t" align="Center">Погода</h3>
</div>
<div class="art-box art-blockcontent">
<div class="art-box-body art-blockcontent-body">
<p>
<?php
$pogoda = mysql_fetch_array(mysql_query("SELECT * FROM pogoda WHERE region='Kanto' "));
if($pogoda['efect'] == 1){
echo "<b>Канто</b> - <img src='/img/pogoda/1.jpg' title='Обычная погода' weight='42' height='42'>";
}
else{
if($pogoda['efect'] == 2){
echo "<b>Канто</b> - <img src='/img/pogoda/2.jpg' title='Солнечная погода' weight='42' height='42'>";
}
else{
if($pogoda['efect'] == 3){
echo "<b>Канто</b> - <img src='/img/pogoda/3.jpg' title='Дождливая погода' weight='42' height='42'>";
}
else{
if($pogoda['efect'] == 4){
echo "<b>Канто</b> - <img src='/img/pogoda/4.jpg' title='Ветряная погода' weight='42' height='42'>";
}
else{
}
}
}
}
?>
</p>
<div class="cleared"></div>
</div>
</div>
<div class="cleared"></div>
</div>
</div>
<div class="cleared"></div>
</div>
<div class="art-layout-cell art-content">
<div class="art-box art-post">
<div class="art-box-body art-post-body">
<div class="art-post-inner art-article">
<div class="art-postcontent">
<div class="art-content-layout">
<div class="art-content-layout-row">
</div>
</div>
<div class="art-content-layout layout-item-1">
<div class="art-content-layout-row">
<div class="art-layout-cell layout-item-2" style="width: 100%;">
<h3 style="text-align:center;">Регистрация:</h3>
</div>
</div>
</div>
<div class="art-content-layout">
<div class="art-content-layout-row">
<div class="art-layout-cell" style="width: 100%;">
<table>
<?php
if($id > 0){
echo "<form action='register.php?id=".$id." ' method=\"post\" >";
}
else{
echo "<form action=\"register.php\" method=\"post\" >";
}
?>
<tr>
<td><b>Логин :</b></td><td><input name="username" type="text" size="20"></td></tr>
<tr>
<td><b>Пароль :</b></td><td><input name="password" type="password" size="20"></td></tr>
<tr>
<td><b>Повт. Пароль :</b></td><td><input name="repeatpassword" type="password"></td></tr>
<tr>
<td><b>E-mail :</b></td><td><input name="email" type="text" size="20" maxlenght="40"></td></tr>
<tr>
<td><b>Ваш пол :</b></td><td>
<input name='pol' type='radio' value='1' class='checkbox' onChange='fcheck('rules')'>Я Мальчик
<input name='pol' type='radio' value='2' class='checkbox' onChange='fcheck('rules')'>Я Девочка
</td></tr>
<tr>
<td><b>Дата рождения :</b></td><td>
<select name='age'>
<option value='1980'>1980</option>
<option value='1981'>1981</option>
<option value='1982'>1982</option>
<option value='1983'>1983</option>
<option value='1984'>1984</option>
<option value='1985'>1985</option>
<option value='1986'>1986</option>
<option value='1987'>1987</option>
<option value='1988'>1988</option>
<option value='1989'>1989</option>
<option value='1990'>1990</option>
<option value='1991'>1991</option>
<option value='1992'>1992</option>
<option value='1993'>1993</option>
<option value='1994'>1994</option>
<option value='1995'>1995</option>
<option value='1996'>1996</option>
<option value='1997'>1997</option>
<option value='1998'>1998</option>
<option value='1999'>1999</option>
<option value='2000'>2000</option>
<option value='2001'>2001</option>
<option value='2002'>2002</option>
<option value='2003'>2003</option>
<option value='2004'>2004</option>
<option value='2005'>2005</option>
<option value='2006'>2006</option>
<option value='2007'>2007</option>
<option value='2008'>2008</option>
<option value='2009'>2009</option>
<option value='2010'>2010</option>
<option value='2011'>2011</option>
<option value='2012'>2012</option>
</select>
<select name='day'>
<option value='1'>1</option>
<option value='2'>2</option>
<option value='3'>3</option>
<option value='4'>4</option>
<option value='5'>5</option>
<option value='6'>6</option>
<option value='7'>7</option>
<option value='8'>8</option>
<option value='9'>9</option>
<option value='10'>10</option>
<option value='11'>11</option>
<option value='12'>12</option>
<option value='13'>13</option>
<option value='14'>14</option>
<option value='15'>15</option>
<option value='16'>16</option>
<option value='17'>17</option>
<option value='18'>18</option>
<option value='19'>19</option>
<option value='20'>20</option>
<option value='21'>21</option>
<option value='22'>22</option>
<option value='23'>23</option>
<option value='24'>24</option>
<option value='25'>25</option>
<option value='26'>26</option>
<option value='27'>27</option>
<option value='28'>28</option>
<option value='29'>29</option>
<option value='30'>30</option>
<option value='31'>31</option>
</select>
<select name='mon'>
<option value='Январь'>Январь</option>
<option value='Февраль'>Февраль</option>
<option value='Март'>Март</option>
<option value='Апрель'>Апрель</option>
<option value='Май'>Май</option>
<option value='Июнь'>Июнь</option>
<option value='Июль'>Июль</option>
<option value='Август'>Август</option>
<option value='Сентябрь'>Сентябрь</option>
<option value='Октябрь'>Октябрь</option>
<option value='Ноябрь'>Ноябрь</option>
<option value='Декабрь'>Декабрь</option>
</select>
</td></tr>
<tr>
<td><b>О себе :</b></td><td><input name="aboutme" type="text" size="20"></td></tr>
<tr>
<td><b>Выберите стартового покемона :</b></td>
<tr>
<td>
<input name='startpoke' type='radio' value='387' class='checkbox' onChange='fcheck('rules')'>
<b>#387 Turtwig</b><font color='green'> - Травяной</font>
<br><img src='/img/pok/387.jpg'></td>
<td>
<input name='startpoke' type='radio' value='152' class='checkbox' onChange='fcheck('rules')'>
<b>#152 Chikorita</b><font color='green'> - Травяной</font>
<br><img src='/img/pok/152.jpg'></td>
</tr>
<tr>
<td>
<br><input name='startpoke' type='radio' value='252' class='checkbox' onChange='fcheck('rules')'>
<b>#252 Treecko</b><font color='green'> - Травяной</font>
<br><img src='/img/pok/252.jpg'></td>
<td>
<input name='startpoke' type='radio' value='393' class='checkbox' onChange='fcheck('rules')'>
<b>#393 Piplup </b><font color='blue'> - Водный</font>
<br><img src='/img/pok/393.jpg'></td>
</tr>
<tr>
<td>
<input name='startpoke' type='radio' value='158' class='checkbox' onChange='fcheck('rules')'>
<b>#158 Totodile</b><font color='blue'> - Водный</font>
<br><img src='/img/pok/158.jpg'></td>
<td>
<input name='startpoke' type='radio' value='258' class='checkbox' onChange='fcheck('rules')'>
<b>#258 Mudkip</b><font color='blue'> - Водный</font>
<br><img src='/img/pok/258.jpg'></td>
</tr>
<tr>
<td>
<input name='startpoke' type='radio' value='390' class='checkbox' onChange='fcheck('rules')'>
<b>#390 Chimchar</b><font color='red'> - Огенный</font>
<br><img src='/img/pok/390.jpg'></td>
<td>
<input name='startpoke' type='radio' value='004' class='checkbox' onChange='fcheck('rules')'>
<b>#004 Charmander</b><font color='red'> - Огенный</font>
<br><img src='/img/pok/004.jpg'></td>
</tr>
<tr>
<td>
<input name='startpoke' type='radio' value='255' class='checkbox' onChange='fcheck('rules')'>
<b>#255 Torchic</b><font color='red'> - Огенный</font>
<br><img src='/img/pok/255.jpg'></td>
<tr>
<td><b>Соглашаетесь ли вы с <a href='/rules.php'>Правилами</a> :</b></td>
<td>
<input name='rules' type='radio' value='1' class='checkbox' onChange='fcheck('rules')'>Да!
<input name='rules' type='radio' value='0' class='checkbox' onChange='fcheck('rules')'>Нет!
</td>
</tr>
<tr>
<td></td><td><input name="submit" type="submit" value="Зарегистрироваться"></td></tr>
</center>
</table>
</div>
</div>
</div>
</div>
<div class="cleared"></div>
</div>
<div class="cleared"></div>
</div>
</div>
<div class="cleared"></div>
</div>
</div>
</div>
</div>
<div class="cleared"></div>
<div class="art-footer">
<div class="art-footer-body">
<center>
<p>Pokess.ru © 2012.</p>
</center> </div>
<div class="cleared"></div>
</div>
</div>
<div class="cleared"></div>
</div>
</div>
<div class="cleared"></div>
<div class="cleared"></div>
</div>
</body>
</html>
<?php
}
else{
echo "<script>location.href='/index.php';</script>";
}
?>