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:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
|
<html>
<head>
</head>
<body style="text-align: center">
<?php
session_start();
include("db.php");
include("functions.inc.php");
if(isset($_REQUEST["submit"])) {
if(exist("mitglieder WHERE name = '".strip_tags($_REQUEST["name"])."' AND passwort = '".md5($_REQUEST["passwort"])."'") && anzahl("login WHERE ip =
'".getenv("REMOTE_ADDR")."' AND erfolgreich = 'nein' AND timestamp > '".(time()-60*30)."'") < 4) {
$eintragen = mysql_query("INSERT INTO login
(name, ip, timestamp, erfolgreich) VALUES ('".strip_tags($_REQUEST["name"])."', '".getenv("REMOTE_ADDR")."', '".time()."', 'ja')");
$abfrage = "SELECT id FROM mitglieder WHERE name = '".strip_tags($_REQUEST["name"])."' LIMIT 0,1";
$ergebnis = mysql_query($abfrage);
while($row = mysql_fetch_object($ergebnis))
{
$_SESSION["login"] = $row->id;
}
echo "<meta http-equiv="refresh" content="0; URL=mitgliederbereich.php">";
} else {
$eintragen = mysql_query("INSERT INTO login (name, ip, timestamp, erfolgreich)
VALUES ('".strip_tags($_REQUEST["name"])."', '".getenv("REMOTE_ADDR")."', '".time()."', 'nein')"); // Eintrag in Login!
?>
Login schlug fehl.
<?php
}
} else { }
?>
<form action=login.php method=post>
<table width=90%>
<tr>
<td width="47%" align="right">
<b>Name:</b>
</td>
<td width="2%">
</td>
<td width=50%>
<input type="text" name="name">
</td>
</tr>
<tr>
<td width="47%" align="right">
<b>Passwort:</b>
</td>
<td width="2%">
</td>
<td width=50%>
<input type="password" name="passwort">
</td>
</tr>
<tr>
<td width=100% colspan=3>
<p align="center">
<input type="submit" value="Login" name="submit">
</td>
</tr>
</table>
</form>
</body>
</html>
|