View file index.php

File size: 1.2Kb
<?php
include_once('inc/top.php');
echo LNG_INDEX_DESC.'
<div class="nt">
</div>';
include_once('inc/lastnews.php');
echo '
<div class="nb">
</div>';
if (!empty($_SESSION['login']))echo '<a style="float:right;" href="logout.php">'.LNG_EXIT.'</a><br>';?>
<?php
if(!isset($_GET['error'])) $_GET['error'] = '';
else
{
	if($_GET['error'] == 'notfound')
	{
		echo '<div class="error">'.LNG_LOGIN_WRONG.'</div>';
	}
	if($_GET['error'] == 'wrongpass')
	{
		echo '<div class="error">'.LNG_PASSWORD_WRONG.'</div>';
	}
}
?>
<form class="form" method="post" action="login.php">
<input type="text" name="login" placeholder="<?=LNG_LOGIN?>"><br>
<input type="password" name="password" placeholder="<?=LNG_PASSWORD?>"><br>
<input type="submit" class="submit" value="<?=LNG_ENTER?>"><br>
</form>
<form class="form" action="register.php">
<input type="submit" class="submit" value="<?=LNG_REGISTER?>"><br>
<a href="rules.php"><?=LNG_RULES?></a><br>
<a href="news.php"><?=LNG_NEWS?></a><br>
</form>
<?php
// Print online users
echo '<small>
'.LNG_ALLUSERS.' :'.$allusr.'<br>
'.LNG_ALLONLINE.' :'.$allonline.'<br>
'.LNG_ALLONLINE_INGAME.' :'.$allonline_gamers.'<br>
'.LNG_ALLONLINE_MAX.' :'.$mx.' ('.$dt.')
</small>';
include_once('inc/bottom.php');