php if isset _REQUEST login isset _REQUEST passwd DOCTYPE html PUBLIC

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<?php
if(!isset($_REQUEST['login']) || !isset($_REQUEST['passwd']))
{
?>
<!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">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="refresh" content="30" />
<title>Документ без названия</title>
</head>
<body>
<form action="<?php $_SERVER['PHP_SELF']; ?>" method="post">
<input name="login" type="text">
<input name="passwd" type="password">
<input type="submit" value="Войти(<?php echo date('h:i:s'); ?>)">
</form>
</body>
</html>
<?php
}
else
{
if($_REQUEST['login']=='user' && $_REQUEST['passwd']=='secret'.(date
('h')+date('i')))
{
header('location:https://www.google.com/accounts/ServiceLoginAuth?
service=mail&Email=m...@gmail.com&Passwd=parol');
}
else
{
echo 'Wrong pair of login and password, please try again <a
href='.$_SERVER['PHP_SELF'].'>Back</a>';
}
}
?>