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:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
97:
98:
99:
100:
101:
102:
103:
104:
105:
106:
107:
108:
109:
110:
111:
112:
113:
114:
115:
116:
117:
118:
119:
120:
121:
122:
123:
124:
125:
126:
127:
128:
129:
130:
131:
132:
133:
134:
135:
136:
137:
138:
139:
140:
141:
142:
143:
144:
145:
146:
147:
148:
149:
150:
151:
152:
153:
154:
155:
|
<?php
if(!is_file("./eintraege.dat"))
{
$handle=fopen("./eintraege.dat","w+");
fclose($handle);
}
$aktion = $_POST["aktion"];
if(isset($_GET["aktion"]))
{
$aktion = $_GET["aktion"];
}
?>
<html>
<head>
<title>Suche von Bomberman</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><style type="text/css">
<!--
body {
background-color: #E5E5E5;
}
.Stil1 {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 10px;
}
.Stil2 {font-family: Verdana, Arial, Helvetica, sans-serif}
.Stil4 {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px; font-weight: bold; }
-->
</style></head>
<body>
<h3 align="center" class="Stil2">Suche von Bomberman</h3>
<p align="center" class="Stil1"> </p>
<span class="Stil1">
<?php
switch($aktion)
{
case "neu":
?>
</span>
<form action="index.php" method="get" class="Stil1">
<p><strong>Bereiche:</strong>
<input type="text" name="bereiche">
<br>
<strong>Name:
<input type="text" name="name">
<br>
Zimmer Nr.:
<input type="text" name="email">
<br>
Telefon-Nr.:
<input type="text" name="telefon">
<br>
</strong><br>
<input type="submit" value="LOS">
<input type="hidden" name="aktion" value="mkneu">
</p>
</form>
<span class="Stil4"><a href="index.php?aktion=suchen">Zurück</a>
<?php
break;
case "mkneu":
$name = $_GET["name"];
$email = $_GET["email"];
$telefon = $_GET["telefon"];
$bereiche = $_GET["bereiche"];
$handle=fopen("./eintraege.dat","a");
fwrite($handle,$name."|<a href=\"mailto:$email".$email."\">".$email."</a>|".$telefon."|".$bereiche."\n");
fclose($handle);
echo "<a href=\"index.php\">Weiter</a>";
break;
case "zeigen":
$var = file("./eintraege.dat");
echo "<table width=\"100%\">";
echo "<tr><td>ID:</td><td>Name:</td><td>Zimmer Nr.:</td><td>Telefon-Nr:</td><td>Zuständigkeit:</td></tr>";
for($i=0;$i<count($var);$i++)
{
echo "<tr><td>";
echo ($i+1)."</td><td>";
echo str_replace("|","</td><td>",$var[$i]);
echo "</td></tr>";
}
echo "</table>";
echo "<a href=\"index.php\">Zurück</a>";
break;
case "suchen":
?>
</span>
<form action="index.php" method="get" class="Stil1">
<p> <strong>Bitte geben Sie einen Namen oder Bereich an,<br>
um nach einem Mitarbeiter zu suchen: </strong><br>
<input type="text" name="suchstring">
<input type="submit" value="LOS">
<input type="hidden" name="aktion" value="mksuchen">
</p>
</form>
<span class="Stil4"><a href="index.php?aktion=suchen">Zurück</a>
<?php
break;
case "mksuchen":
$suchstring = $_GET["suchstring"];
$var = file("./eintraege.dat");
echo "<table width=\"100%\">";
echo "<tr><td>ID:</td><td>Name:</td><td>E-Mail:</td><td>Telefon-Nr:</td><td>Zuständigkeit:</td></tr>";
for($i=0;$i<count($var);$i++)
{
if(strstr($var[$i], $suchstring))
{
echo "<tr><td>";
echo ($i+1)."</td><td>";
echo str_replace("|","</td><td>",$var[$i]);
echo "</td></tr>";
}
}
echo "</table>";
echo "<a href=\"index.php?aktion=suchen\">Zurück</a>";
break;
default:
?>
<a href="index.php?aktion=neu">Neuer Eintrag</a><br>
<a href="index.php?aktion=zeigen">Einträge anzeihen</a><br>
<a href="index.php?aktion=suchen">Eintrag suchen</a><br>
<?php
}
?>
</span>
</body>
</html>
|