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:
|
<?php
session_start;
include "sessionheader.inc.php";
include "database.inc.php";
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<style type="text/css">
body {background-image: url(Bilder/bg.jpg); background-repeat:no-repeat;}
</style>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Gut Greifenstein - Startseite</title>
<link rel="stylesheet" type="text/css" href="design1.css">
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_reloadPage(init) { //reloads the window if Nav4 resized
if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
//-->
</script>
</head>
<body>
<div id="Layer1" style="position:absolute; left:122px; top:425px; width:573px; height:168px; z-index:2; overflow:auto;">
<div id="main">
<?php
if ($_GET[mode] == "login") {
if (isset($_SESSION[login]) && isset($_SESSION[name]) && $_SESSION[name] !="Gast") {
echo "Du bist doch schon eingeloggt, $name!";
}
else {
$formular = "<form action=$_SERVER[PHP_SELF] method=post>
Name:<br>
<input type=text name=name><br>
Passwort:<br>
<input type=password name=pw><br>
<input type=submit name=login value=LogIn>
</form>";
echo $formular;
}
}
if (isset($_POST[login])) {
$name = $_POST[name];
$pw = $_POST[pw];
$pw = md5($pw);
$userpruefen = "SELECT * FROM `mitglieder` WHERE `name` = '$name' AND `passwort` = '$pw'";
$pruefungres = mysql_query($userpruefen);
if (mysql_num_rows($pruefungres) == 1) {
$_SESSION[login] = "1";
$_SESSION[name] = $name;
echo "<a href=pruefen.php>Prüfen</a>";
echo $_SESSION[login];
echo $_SESSION[name];
echo $name;
}
}
?>
</div>
</div>
</body>
</html>
|