<?
if ($action == 'logoutt')
{
session_unregister('loginin');
header('Location: /');
}
?>
<?
include "../function.php";
include "tpl/header.tpl";
if ($login != '' && $password != '')
{
$password = md5($password);
if (loginin($login,$password) == true)
{
$loginin = $login;
session_register('loginin');
}
}
?>
<?
if (!isset($loginin))
{
?>
<center><form method='POST'>
<input type='text' name='login' size='15' maxlength='15' />
<input type='password' name='password' size='15' maxlength='15' />
<input type='submit' value='Ok' />
</form></center>
<?
}
else
{
echo "<a href='?action=logoutt'><h3>Вихід</h3></a>";
include "tpl/frontpage.tpl";
}
include "tpl/footer.tpl";
?>