Просмотр файла header/enter.inc.php

Размер файла: 1.05Kb
<?php

If (!defined("anybody")){
if (!isset($_USER)){

echo '<div class="menuindexom"><center>'.$pass.'<form action="enter.php?mode=enter" method="get"><br/>
Логин:<br/>
<input type="text" name="login" class="do_button" maxlength="'.lenght_login.'" value=""/><br/>
Пароль:<br/>

<input type="password" name="password" class="do_button" maxlength="'.lenght_password.'" value=""/><br/>
<input type="submit" class="button" value="Вход" />
</center></div>';
include "header/end.inc.php";
}
}

function xoring($String,$Seq)
{
$Salt='QwErTyUiOpAsDf123%#';
$StrLen = strlen($String);
$Gamma = '';
while (strlen($Gamma)<$StrLen)
{
$Seq = pack("H*",sha1($Gamma.$Seq.$Salt));
$Gamma.=substr($Seq,0,8);
}

return $String^$Gamma;
}


if(isset($_POST['img_code']) and $_SESSION['codes'] == $_POST['img_code']) $_SESSION['is_auth'] = 1;

if(!empty($_SESSION['codes']) and empty($_SESSION['is_auth']))
{
 if(preg_match("#enter#",$_SERVER['REQUEST_URI']))
 $_GET['mode'] = 'enter';
 else
 {
	header('location: enter.php?mode=enter');
	exit;
 }
}

?>