| 1 |
lars |
1 |
<? require_once "util.php";?>
|
|
|
2 |
<?
|
|
|
3 |
require_once "connect.php";
|
|
|
4 |
$DB="Navigation";
|
|
|
5 |
if (!$rechte[$Rubrik[content_management]] & $Buttons[Navigation])
|
|
|
6 |
{
|
|
|
7 |
exit;
|
|
|
8 |
}
|
|
|
9 |
if ($action=="update")
|
|
|
10 |
{
|
|
|
11 |
if (!$ID)
|
|
|
12 |
{ // insert Dummy-Entry
|
|
|
13 |
$query = "insert into $DB (ID) VALUES (0)";
|
|
|
14 |
$result = mysql_query ($query) or die (mysql_errno().": ".mysql_error()."<hr>".$query."<hr>");
|
|
|
15 |
$ID=mysql_insert_id();
|
|
|
16 |
}
|
|
|
17 |
|
|
|
18 |
unset($HTTP_POST_VARS[action]);
|
|
|
19 |
unset($HTTP_POST_VARS[ID]);
|
|
|
20 |
|
|
|
21 |
foreach(array_keys($HTTP_POST_VARS) as $elem)
|
|
|
22 |
{
|
|
|
23 |
if ($elem[0] == "_")
|
|
|
24 |
{
|
|
|
25 |
unset($HTTP_POST_VARS[$elem]);
|
|
|
26 |
$button=$$elem;
|
|
|
27 |
$elem=substr($elem,1);
|
|
|
28 |
$Pfad=$HTTP_POST_VARS[$elem."_Pfad"];
|
|
|
29 |
unset($HTTP_POST_VARS[$elem."_Pfad"]);
|
|
|
30 |
$image=$$elem;
|
|
|
31 |
$image_name=$elem."_name";
|
|
|
32 |
$image_name=urlencode($$image_name);
|
|
|
33 |
switch ($button)
|
|
|
34 |
{
|
|
|
35 |
case 0:
|
|
|
36 |
break;
|
|
|
37 |
case 1:
|
|
|
38 |
$HTTP_POST_VARS[$elem]='';
|
|
|
39 |
break;
|
|
|
40 |
case 2:
|
|
|
41 |
//$image_name=$ID."_".$image_name;
|
|
|
42 |
//$image_name=$ID.strrchr($image_name,".");
|
|
|
43 |
$HTTP_POST_VARS[$elem]=$image_name;
|
|
|
44 |
copy($image,$Pfad.$image_name);
|
|
|
45 |
$$elem=$image_name;
|
|
|
46 |
break;
|
|
|
47 |
default:
|
|
|
48 |
$$elem=$button;
|
|
|
49 |
break;
|
|
|
50 |
}
|
|
|
51 |
}
|
|
|
52 |
}
|
|
|
53 |
$names=array();
|
|
|
54 |
foreach(array_keys($HTTP_POST_VARS) as $elem)
|
|
|
55 |
{
|
|
|
56 |
array_push($names,"$elem='$HTTP_POST_VARS[$elem]'");
|
|
|
57 |
}
|
|
|
58 |
$query="update $DB set ".join($names,', ');
|
|
|
59 |
$query=$query.", letzte_Aenderung_am=NOW(), letzte_Aenderung_von='$PHP_AUTH_USER' where ID = '$ID'";
|
|
|
60 |
$result = mysql_query ($query) or die (mysql_errno().": ".mysql_error());
|
|
|
61 |
Navigation();
|
|
|
62 |
header("Location: ".$self);
|
|
|
63 |
}
|
|
|
64 |
?>
|
|
|
65 |
<html>
|
|
|
66 |
<head>
|
|
|
67 |
<title>Content-Management-System - Webagentur Niewerth</title>
|
|
|
68 |
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
|
|
69 |
<meta name="author" content="Webagentur Niewerth - www.weban.de">
|
|
|
70 |
<meta name="description" content="Redaktionssystem">
|
|
|
71 |
<meta name="robots" content="noindex">
|
|
|
72 |
<link rel="stylesheet" href="redaktion.css" type="text/css">
|
|
|
73 |
<style type="text/css"><? require_once "redaktion.css"?></style>
|
|
|
74 |
<script language="javascript" src="Farb_Assistent.js"></script>
|
|
|
75 |
</head>
|
|
|
76 |
|
|
|
77 |
<body bgcolor="#FFFFFF" leftmargin="20" topmargin="10" marginwidth="20" marginheight="10">
|
|
|
78 |
<form method="post" action="<? echo $self ?>" name="formname" enctype="multipart/form-data">
|
|
|
79 |
<?
|
|
|
80 |
$result = mysql_query ("SELECT * FROM $DB where domain = '$site'") or die (mysql_errno().": ".mysql_error());
|
|
|
81 |
$zeile=mysql_fetch_array($result);
|
|
|
82 |
$ID=$zeile[ID];
|
|
|
83 |
|
|
|
84 |
if ($ID)
|
|
|
85 |
{
|
|
|
86 |
$result = mysql_query ("SELECT * FROM $DB where ID = $ID") or die (mysql_errno().": ".mysql_error());
|
|
|
87 |
$zeile=mysql_fetch_array($result);
|
|
|
88 |
}
|
|
|
89 |
?>
|
|
|
90 |
|
|
|
91 |
<table width="720" border="1" cellspacing="0" cellpadding="3" bordercolorlight="#FFFFFF" bordercolordark="#999999">
|
|
|
92 |
<tr>
|
|
|
93 |
<td colspan="3" class="headline" height="27" bgcolor="#000096">Navigationsleiste:
|
|
|
94 |
Bearbeiten</td>
|
|
|
95 |
</tr>
|
|
|
96 |
<tr>
|
|
|
97 |
<td bgcolor="#000096" class="headline" width="120">Schrift:</td>
|
|
|
98 |
<td width="219"><b> <font face="Arial, Helvetica, sans-serif" size="2">Farbe:
|
|
|
99 |
#
|
|
|
100 |
<input type="text" name="schrift_color" size="6" maxlength="6" value="<? echo $zeile[schrift_color] ?>">
|
|
|
101 |
<input type="button" value="Farb Assistent" onClick="Farb_Assistent(this.form.schrift_color.value,'document.formname.schrift_color.value');">
|
|
|
102 |
</font></b></td>
|
|
|
103 |
<td width="355"><b>Art:
|
|
|
104 |
<select name="schrift_art" size="1">
|
|
|
105 |
<option value="Arial, Helvetica, sans-serif"<? if ($zeile[schrift_art] == "Arial, Helvetica, sans-serif") {echo " selected";} ?>>Arial</option>
|
|
|
106 |
<option value="Times New Roman, Times, serif"<? if ($zeile[schrift_art] == "Times New Roman, Times, serif") {echo " selected";} ?>>Times New Roman</option>
|
|
|
107 |
<option value="Courier New, Courier, mono"<? if ($zeile[schrift_art] == "Courier New, Courier, mono") {echo " selected";} ?>>Courier</option>
|
|
|
108 |
<option value="Verdana, Arial, Helvetica, sans-serif"<? if ($zeile[schrift_art] == "Verdana, Arial, Helvetica, sans-serif") {echo " selected";} ?>>Verdana</option>
|
|
|
109 |
</select>
|
|
|
110 |
</b><b>Größe:
|
|
|
111 |
<select name="schrift_groesse" size="1">
|
|
|
112 |
<option<? if ($zeile[schrift_groesse] == "1") {echo " selected";} ?>>1</option>
|
|
|
113 |
<option<? if ($zeile[schrift_groesse] == "2") {echo " selected";} ?>>2</option>
|
|
|
114 |
<option<? if ($zeile[schrift_groesse] == "3") {echo " selected";} ?>>3</option>
|
|
|
115 |
<option<? if ($zeile[schrift_groesse] == "4") {echo " selected";} ?>>4</option>
|
|
|
116 |
<option<? if ($zeile[schrift_groesse] == "5") {echo " selected";} ?>>5</option>
|
|
|
117 |
<option<? if ($zeile[schrift_groesse] == "6") {echo " selected";} ?>>6</option>
|
|
|
118 |
</select>
|
|
|
119 |
</b></td>
|
|
|
120 |
</tr>
|
|
|
121 |
<tr>
|
|
|
122 |
<td bgcolor="#000096" class="headline" width="120">Hintergrund:</td>
|
|
|
123 |
<td nowrap valign="top" width="219"><b><font face="Arial, Helvetica, sans-serif" size="2">Farbe:
|
|
|
124 |
#
|
|
|
125 |
<input type="text" name="bgcolor" size="6" maxlength="6" value="<? echo $zeile[bgcolor] ?>">
|
|
|
126 |
<input type="button" value="Farb Assistent" onClick="Farb_Assistent(this.form.bgcolor.value,'document.formname.bgcolor.value');">
|
|
|
127 |
</font></b></td>
|
|
|
128 |
<td valign="top" bgcolor="#FFFFFF" width="355">
|
|
|
129 |
<?
|
|
|
130 |
$image_name="background";
|
|
|
131 |
$image_Path="../$site/images/";
|
|
|
132 |
if ($zeile[$image_name] != "")
|
|
|
133 |
{
|
|
|
134 |
?>
|
|
|
135 |
<input type="radio" name="_<? echo $image_name ?>" value="0" checked>
|
|
|
136 |
<?
|
|
|
137 |
echo "$zeile[$image_name]";
|
|
|
138 |
$size= filesize ($image_Path.$zeile[$image_name]) >> 10;
|
|
|
139 |
$imgsize = GetImageSize ($image_Path.$zeile[$image_name]);
|
|
|
140 |
echo " ( $size KB $imgsize[0]x$imgsize[1])<BR>";
|
|
|
141 |
}
|
|
|
142 |
?>
|
|
|
143 |
<input type="radio" name="_<? echo $image_name ?>" value="1" <? if ($zeile[$image_name] == "") {echo "checked";}?>>
|
|
|
144 |
kein Bild<br>
|
|
|
145 |
<input type="radio" name="_<? echo $image_name ?>" value="2">
|
|
|
146 |
<input type="File" name="<? echo $image_name ?>" size="17" maxlength="255" onFocus="this.form._<? echo $image_name ?>[<? if ($zeile[$image_name] != "") {echo "2";} else {echo "1";} ?>].checked=true;">
|
|
|
147 |
<input type="hidden" name="<? echo $image_name ?>_Pfad" value="<? echo $image_Path ?>">
|
|
|
148 |
</td>
|
|
|
149 |
</tr>
|
|
|
150 |
<!--
|
|
|
151 |
<tr>
|
|
|
152 |
<td bgcolor="#000096" class="headline" width="120" nowrap>Zähler:</td>
|
|
|
153 |
<td colspan="2">
|
|
|
154 |
<input type="hidden" name="zaehler" value="0">
|
|
|
155 |
<input type="checkbox" name="zaehler" value="1" <? if ($zeile[zaehler]==1) {echo " checked";} ?>>
|
|
|
156 |
<font face="Arial, Helvetica, sans-serif" size="2"><b>Beschriftung:
|
|
|
157 |
<input type="text" name="zaehlertext" value="<? echo $zeile[zaehlertext] ?>">
|
|
|
158 |
</b></font> </td>
|
|
|
159 |
</tr>
|
|
|
160 |
-->
|
|
|
161 |
<!--
|
|
|
162 |
<tr>
|
|
|
163 |
<td bgcolor="#000096" class="headline" width="120" nowrap>Gästebuch:</td>
|
|
|
164 |
<td width="175">
|
|
|
165 |
<input type="checkbox" name="gaestebuch" value="1">
|
|
|
166 |
</td>
|
|
|
167 |
<td>
|
|
|
168 |
<?
|
|
|
169 |
$image_name="Bild_klein";
|
|
|
170 |
$image_Path="../$site/images/gaestebuch";
|
|
|
171 |
if ($zeile[$image_name] != "")
|
|
|
172 |
{
|
|
|
173 |
?>
|
|
|
174 |
<input type="radio" name="_<? echo $image_name ?>" value="0" checked>
|
|
|
175 |
<?
|
|
|
176 |
echo "$zeile[$image_name]";
|
|
|
177 |
$size= filesize ($image_Path.$zeile[$image_name]) >> 10;
|
|
|
178 |
$imgsize = GetImageSize ($image_Path.$zeile[$image_name]);
|
|
|
179 |
echo " ( $size KB $imgsize[0]x$imgsize[1])<BR>";
|
|
|
180 |
}
|
|
|
181 |
?>
|
|
|
182 |
<input type="radio" name="_<? echo $image_name ?>" value="1" <? if ($zeile[$image_name] == "") {echo "checked";}?>>
|
|
|
183 |
kein Trennbild<br>
|
|
|
184 |
<input type="radio" name="_<? echo $image_name ?>" value="2">
|
|
|
185 |
<input type="File" name="<? echo $image_name ?>2" size="17" maxlength="255" onFocus="this.form._<? echo $image_name ?>[<? if ($zeile[$image_name] != "") {echo "2";} else {echo "1";} ?>].checked=true;">
|
|
|
186 |
<input type="hidden" name="<? echo $image_name ?>_Pfad2" value="<? echo $image_Path ?>">
|
|
|
187 |
</td>
|
|
|
188 |
</tr> -->
|
|
|
189 |
<tr>
|
|
|
190 |
<td bgcolor="#000096" class="headline" width="120" nowrap>letzte Änderung:</td>
|
|
|
191 |
<td colspan="2">am:
|
|
|
192 |
<?
|
|
|
193 |
$zeile[letzte_Aenderung_am]=preg_split("/ /",$zeile[letzte_Aenderung_am]);
|
|
|
194 |
$datum=join(".",array_reverse(preg_split("/-/",$zeile[letzte_Aenderung_am][0])));
|
|
|
195 |
$zeit=$zeile[letzte_Aenderung_am][1];
|
|
|
196 |
?>
|
|
|
197 |
<?
|
|
|
198 |
echo $datum;
|
|
|
199 |
?>
|
|
|
200 |
um:
|
|
|
201 |
<?
|
|
|
202 |
echo $zeit;
|
|
|
203 |
?>
|
|
|
204 |
Uhr von:
|
|
|
205 |
<? echo $zeile[letzte_Aenderung_von] ?>
|
|
|
206 |
</td>
|
|
|
207 |
</tr>
|
|
|
208 |
<tr>
|
|
|
209 |
<td colspan=3 align="right" bgcolor="#000099">
|
|
|
210 |
<input type="hidden" name="domain" value="<? echo $site ?>">
|
|
|
211 |
<input type="hidden" name="ID" value="<? echo $ID ?>">
|
|
|
212 |
<input type="hidden" name="action" value="update">
|
|
|
213 |
<input type="submit" value="OK">
|
|
|
214 |
<input type="reset" name="Button" value="Zurücksetzen">
|
|
|
215 |
</td>
|
|
|
216 |
</tr>
|
|
|
217 |
</table>
|
|
|
218 |
</form>
|
|
|
219 |
</body>
|
|
|
220 |
</html>
|