49 lines
1.1 KiB
PHP
49 lines
1.1 KiB
PHP
<?php
|
|
$method = "POST";
|
|
$islogin = false;
|
|
/*if (isset($_GET["kod"]) && $_GET["kod"]=1111)
|
|
{
|
|
$islogin = true;
|
|
}*/
|
|
if (isset($_POST['kod']))
|
|
switch ($_POST['kod'])
|
|
{
|
|
case 1111:
|
|
case 2222:
|
|
case 3333:
|
|
case 4444: $islogin = true;
|
|
break;
|
|
|
|
default:
|
|
$islogin = false;
|
|
break;
|
|
}
|
|
?>
|
|
|
|
|
|
<!doctype html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport"
|
|
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
|
|
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
|
<title>suta</title>
|
|
</head>
|
|
<body>
|
|
<?php if ($islogin ==false)
|
|
{ ?>
|
|
<form method="<?php echo $method; ?>">
|
|
<input type="text" name="nev"><br>
|
|
<input type="number" name="kod" min="1000" max="9999" title="Adja meg a kódot"><br>
|
|
<input type="submit" value="Belépés">
|
|
</form>
|
|
<?php
|
|
}
|
|
else
|
|
echo "<h1>Üdvözöllek".$_POST["nev"]."</h1>";
|
|
echo "<a href='index.php'>Kijelentkezés</a>"
|
|
?>
|
|
</body>
|
|
</html>
|