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:
|
<?php
include "database.inc.php";
?>
<html>
<head>
<title>Sitechange.php</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body background="wmlandbg.gif">
<div id="Layer1" style="position:absolute; left:194px; top:139px; width:613px; height:504px; z-index:1">
<p>Hier kannst du die Inhalte der Seiten ändern.</p>
<?php
echo <<<FORMULAR
<p><form action= "$_SERVER['PHP_SELF']" method="post">
<select name="select" value="Bitte wähle die SEite aus">
<option>Seite1</option>
<option>Seite2</option>
<option>Seite3</option>
<option>Seite4</option>
</select>
</p>
<p>
<input type="text" name="textfield" value="Gib hier den neuen Titel der Seite ein">
</p>
<p>
<textarea name="textarea" wrap="PHYSICAL">Gib hier den Text ein, der auf der Seite erscheinen soll</textarea>
</p>
<p><input type="submit" value="Absenden"</p>
</form>
FORMULAR;
$title_old = "$_POST['select']";
$title_new = "$_POST['textfield']";
$inhalt = "$_POST['textarea']";
$mysql_update = "UPDATE 'sites' SET 'title' = '$title_new' AND 'site' = '$inhalt' WHERE 'title' = $title_old";
if (isset($title_old) && isset($title_new) && isset($inhalt){
mysql_query($mysql_update);
if (mysql_affected_rows() > 0){
echo "Aktualisierung der Datenbank erfolgreich!";}
else {
echo "Aktualisierung der Datenbank nicht erfolgreich.";}
}
?>
</div>
<div id="Layer2" style="position:absolute; left:23px; top:138px; width:141px; height:309px; z-index:2">
<p><a href="Readme.htm">Readme</a><br>
<a href="sitechange.php">Seiten ändern</a></p>
<hr width="100px">
<br>
Made by Aqui-chan.</div>
</body>
</html>
|