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: | <HTML>
<HEAD>
<TITLE> xxx </TITLE>
<link rel="stylesheet" type="text/css" href="../U_css/style.css">
</HEAD>
<BODY bgcolor="#000000">
<table width="70%" align="center">
<tr>
<td align="center"> <?php include ("../menu.php"); ?></td>
</tr>
<tr>
<td>
</td>
</tr>
<tr>
<td colspan="2"><img src="U_images/news.jpg"></td>
</tr>
<tr>
<td>
</td>
</tr>
</table>
<?php
if ($_GET['action'] == "eintrag") {
?>
<form method="POST" name="form" action="<?php echo $_SERVER['PHP_SELF']; ?>">
<table width="80%" align="left" cellspacing="5">
<tr>
<td align="center" colspan="2"><h4 align="center">Neuer Eintrag</h4></td>
</tr>
<tr>
<td align="right" width="50%"><p>Titel</p></td>
<td><input type="text" name="titel"></td>
</tr>
<tr>
<td align="right" valign="top"><p>Eintrag</p></td>
<td><textarea rows="10" cols="30" name="eintrag" id="eintrag" wrap="physical"></TEXTAREA></td>
</tr>
<tr>
<td colspan="2" align="center"><input type="submit" value="News erstellen" name="submit"></td>
</tr>
</table>
</td>
</tr>
</table>
<?php
} elseif (!empty($_POST['submit'])) {
$timestamp = time();
$ip = $_SERVER['REMOTE_ADDR'];
$sql_query = "
INSERT INTO news_utbf
(titel,eintrag,timestamp,ip)
VALUES (
'".$_POST['titel']."',
'".$_POST['eintrag']."',
'$timestamp',
'$ip')";
$db = mysql_connect("localhost","xxxxxx","xxxxxx");
mysql_select_db("usr_web640_1");
$result = mysql_query($sql_query);
mysql_close();
?>
<table width="100%">
<tr>
<td>
</td>
</tr>
<tr align="center">
<td><p align="center">Dein Eintrag wurde erfolgreich übermittelt!
<a href="news.php">Übersicht</a></p></td>
</tr>
</table>
<?php
} else {
echo "Eintrag konnte nicht übermittelt werden";
}
?>
</body>
</html> |