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:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
|
<?php
session_start();
?>
<html>
<head>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>Neue Seite 1</title>
<link rel="stylesheet" href="http://calvano.bplaced.de/main.css">
</head>
<body>
<script type="text/javascript" src="http://calvano.bplaced.de/wz_tooltip.js"></script>
<script type="text/javascript" src="http://calvano.bplaced.de/tip_balloon.js"></script>
<p align="center" class="head">Login</p>
<p style="margin-top: 1; margin-bottom: 1">
Hier kommst du zu unserem passwortgeschützten Bereich.
<p style="margin-top: 1; margin-bottom: 1">Achtung! Zutritt nur
für Mitglieder ;)</p>
<p>
<a href="probeanmeldung.htm" onmouseover="Tip('Melde dich ganz schnell an und starte eine Probemitgliedschaft !', BALLOON, true, ABOVE, true)" onmouseout="UnTip()"><u>Mitglied werden?</u></a>
<p><img border="0" src="http://calvano.bplaced.de/Graphiken Button/hafipng.png" width="200" height="136"></p>
<p> </p>
<?php
include("db.php");
include("functions.inc.php");
if(isset($_REQUEST["submit"])) { // Wenn Formular abgeschickt
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) { // Wenn Mitglied mit dem Namen und Passwort existiert! und wenn keine falschen logins in den letzten 30 Min. Wieso? um die Seite sicherer zu machen sonst können bruteforcer leicht hacken!
$eintragen = mysql_query("INSERT INTO login (name, ip, timestamp, erfolgreich) VALUES ('".strip_tags($_REQUEST["name"])."', '".getenv("REMOTE_ADDR")."', '".time()."', 'ja')"); // Eintrag in Login!
$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; // Loggt einen ein!
}
echo "<a href="http://calvano.bplaced.de/lounge.htm" onClick="MyWindow=window.open('http://calvano.bplaced.de/lounge.htm','MyWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=800,height=520,left=50,top=100'); return false;" align="center"><b>Memberlounge</b></a>"; // Weiterleitung zur Memberarea
} else { // Wenn falsch eingeloggt
$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 { // Formular ->
?>
<form action=login.php method=post>
<table class="ohneb" align="center" width=50%>
<tr>
<td class="ohneb" width=50%>
<b>U</b>sername:
</td>
<td width=50%>
<input type="text" name="name">
</td>
</tr>
<tr>
<td class="ohneb" width=50%>
<b>P</b>asswort:
</td>
<td width=50%>
<input type="password" name="passwort">
</td>
</tr>
<tr>
<td width=100% colspan=2>
<p align="left">
<input type="submit" value="Login" name="submit">
</p>
</td>
</tr>
</table>
</form>
<?php
}
include("footer.php");
?>
|