| 1 |
lars |
1 |
<?
|
|
|
2 |
require_once "page_functions.php";
|
|
|
3 |
?>
|
|
|
4 |
<html>
|
|
|
5 |
<head>
|
|
|
6 |
<title>Content-Management-System - Webagentur Niewerth</title>
|
|
|
7 |
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
|
|
8 |
<meta name="author" content="Webagentur Niewerth - www.weban.de">
|
|
|
9 |
<meta name="revisit-after" content="30 days">
|
|
|
10 |
<meta name="language" content="deutsch, de">
|
|
|
11 |
<meta name="distribution" content="global">
|
|
|
12 |
<meta name="robots" content="all">
|
|
|
13 |
<link rel="stylesheet" href="redaktion.css" type="text/css">
|
|
|
14 |
<style type="text/css"><? require_once "redaktion.css"?></style>
|
|
|
15 |
<script language="javascript" src="Farb_Assistent.js"></script>
|
|
|
16 |
<script language="JavaScript">
|
|
|
17 |
<!--
|
|
|
18 |
function MM_findObj(n, d) { //v4.01
|
|
|
19 |
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
|
|
|
20 |
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
|
|
|
21 |
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
|
|
|
22 |
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
|
|
|
23 |
if(!x && d.getElementById) x=d.getElementById(n); return x;
|
|
|
24 |
}
|
|
|
25 |
|
|
|
26 |
function MM_validateForm() { //v4.0
|
|
|
27 |
var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments;
|
|
|
28 |
for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=MM_findObj(args[i]);
|
|
|
29 |
if (val) { nm=val.name; if ((val=val.value)!="") {
|
|
|
30 |
if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@');
|
|
|
31 |
if (p<1 || p==(val.length-1)) errors+='- '+nm+' muss eine E-Mail Adresse sein.\n';
|
|
|
32 |
} else if (test!='R') {
|
|
|
33 |
if (isNaN(val)) errors+='- '+nm+' muss eine Zahl sein.\n';
|
|
|
34 |
if (test.indexOf('inRange') != -1) { p=test.indexOf(':');
|
|
|
35 |
min=test.substring(8,p); max=test.substring(p+1);
|
|
|
36 |
if (val<min || max<val) errors+='- '+nm+' muss eine Zahl zwischen '+min+' und '+max+' sein.\n';
|
|
|
37 |
} } } else if (test.charAt(0) == 'R') errors += '- '+nm+' wird benötigt.\n'; }
|
|
|
38 |
} if (errors) alert('Folgende Fehler sind aufgetreten:\n'+errors);
|
|
|
39 |
document.MM_returnValue = (errors == '');
|
|
|
40 |
}
|
|
|
41 |
|
|
|
42 |
function go()
|
|
|
43 |
{
|
|
|
44 |
MM_validateForm('Titel','','R','Dateiname','','R');
|
|
|
45 |
if (document.MM_returnValue)
|
|
|
46 |
{
|
|
|
47 |
document.formname.submit();
|
|
|
48 |
}
|
|
|
49 |
}
|
|
|
50 |
|
|
|
51 |
function check_filename(name)
|
|
|
52 |
{
|
|
|
53 |
if (name != '')
|
|
|
54 |
{
|
|
|
55 |
for(i=0; i<=Dateinamen.length; i++)
|
|
|
56 |
{
|
|
|
57 |
if (Dateinamen[i] == name)
|
|
|
58 |
{
|
|
|
59 |
alert('Es existiert bereits eine Datei mit diesem Namen!');
|
|
|
60 |
return '';
|
|
|
61 |
break;
|
|
|
62 |
}
|
|
|
63 |
}
|
|
|
64 |
}
|
|
|
65 |
return name;
|
|
|
66 |
}
|
|
|
67 |
|
|
|
68 |
<?
|
|
|
69 |
$files=array();
|
|
|
70 |
$result = mysql_query ("SELECT Dateiname FROM Files where site = '$site'") or die (mysql_errno().": ".mysql_error());
|
|
|
71 |
while ($zeile=mysql_fetch_array($result))
|
|
|
72 |
{
|
|
|
73 |
array_push($files,"'$zeile[Dateiname]'");
|
|
|
74 |
}
|
|
|
75 |
$files=join(", ",$files);
|
|
|
76 |
?>
|
|
|
77 |
Dateinamen = new Array(<? echo $files ?>);
|
|
|
78 |
//-->
|
|
|
79 |
</script>
|
|
|
80 |
</head>
|
|
|
81 |
|
|
|
82 |
<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0 marginwidth="0" marginheight="0">
|
|
|
83 |
<?
|
|
|
84 |
if ($ID)
|
|
|
85 |
{
|
|
|
86 |
$result = mysql_query ("SELECT * FROM $Tab where ID = $ID and site='$site'") or die (mysql_errno().": ".mysql_error());
|
|
|
87 |
if (mysql_num_rows($result) == 0) {unset($ID);}
|
|
|
88 |
$zeile=mysql_fetch_array($result);
|
|
|
89 |
}
|
|
|
90 |
?>
|
|
|
91 |
<form method="post" action="<? echo $self ?>?redirect=true&File=<? echo $File; ?>" name="formname" enctype="multipart/form-data">
|
|
|
92 |
<table border="1" cellspacing="0" cellpadding="0" bordercolorlight="#FFFFFF" bordercolordark="#999999" width="100%" height="100%">
|
|
|
93 |
<tr>
|
|
|
94 |
<td bgcolor="#000099" class="headline" width="105">Titel: </td>
|
|
|
95 |
<td class="small" colspan="2">
|
|
|
96 |
<input type="text" name="Titel" size="30" maxlength="255" value="<? echo $zeile[Titel]?>">
|
|
|
97 |
</td>
|
|
|
98 |
</tr>
|
|
|
99 |
<tr>
|
|
|
100 |
<td bgcolor="#000099" class="headline" width="105">Dateiname:</td>
|
|
|
101 |
<td class="small" colspan="2">
|
|
|
102 |
<?
|
|
|
103 |
if (!$start_call)
|
|
|
104 |
{
|
|
|
105 |
?>
|
|
|
106 |
<?
|
|
|
107 |
if (!$ID)
|
|
|
108 |
{
|
|
|
109 |
?>
|
|
|
110 |
<input type="text" name="Dateiname" size="30" maxlength="255" value="<? echo $zeile[Dateiname]?>" onChange="this.value=check_filename(this.value)">
|
|
|
111 |
<?
|
|
|
112 |
}
|
|
|
113 |
else
|
|
|
114 |
{
|
|
|
115 |
?>
|
|
|
116 |
<? echo $zeile[Dateiname] ?>
|
|
|
117 |
<?
|
|
|
118 |
}
|
|
|
119 |
}
|
|
|
120 |
else
|
|
|
121 |
{
|
|
|
122 |
?>
|
|
|
123 |
<input type="hidden" name="Dateiname" value="start.htm">start.htm
|
|
|
124 |
<?
|
|
|
125 |
}
|
|
|
126 |
?>
|
|
|
127 |
</td>
|
|
|
128 |
</tr>
|
|
|
129 |
<tr>
|
|
|
130 |
<td bgcolor="#000099" class="headline" rowspan="2" valign="top" width="105">Überschrift:</td>
|
|
|
131 |
<td colspan="2"><b>
|
|
|
132 |
<input type="text" name="Ueberschrift" size="30" maxlength="255" value="<? echo $zeile[Ueberschrift] ?>">
|
|
|
133 |
</b> </td>
|
|
|
134 |
</tr>
|
|
|
135 |
<tr>
|
|
|
136 |
<td width="371">
|
|
|
137 |
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
|
|
138 |
<tr>
|
|
|
139 |
<td nowrap><b>Farbe: #
|
|
|
140 |
<input type="text" name="Ueberschrift_Farbe" size="6" maxlength="6" value="<? echo $zeile[Ueberschrift_Farbe] ?>">
|
|
|
141 |
<input type="button" value="Farb Assistent" onClick="Farb_Assistent(this.form.Ueberschrift_Farbe.value,'document.formname.Ueberschrift_Farbe.value');" name="button">
|
|
|
142 |
</b></td>
|
|
|
143 |
<td>
|
|
|
144 |
<table width="24" height="10" border="1" cellspacing="0" cellpadding="0">
|
|
|
145 |
<tr>
|
|
|
146 |
<td bgcolor="<? echo $zeile[Ueberschrift_Farbe] ?>"> </td>
|
|
|
147 |
</tr>
|
|
|
148 |
</table>
|
|
|
149 |
</td>
|
|
|
150 |
</tr>
|
|
|
151 |
</table>
|
|
|
152 |
</td>
|
|
|
153 |
<td width="519"><b> </b><b>Art: </b><b>
|
|
|
154 |
<select name="Ueberschrift_Art" size="1">
|
|
|
155 |
<option value="Arial, Helvetica, sans-serif"<? if ($zeile[Ueberschrift_Art] == "Arial, Helvetica, sans-serif") {echo " selected";} ?>>Arial</option>
|
|
|
156 |
<option value="Times New Roman, Times, serif"<? if ($zeile[Ueberschrift_Art] == "Times New Roman, Times, serif") {echo " selected";} ?>>Times New Roman</option>
|
|
|
157 |
<option value="Courier New, Courier, mono"<? if ($zeile[Ueberschrift_Art] == "Courier New, Courier, mono") {echo " selected";} ?>>Courier</option>
|
|
|
158 |
<option value="Verdana, Arial, Helvetica, sans-serif"<? if ($zeile[Ueberschrift_Art] == "Verdana, Arial, Helvetica, sans-serif") {echo " selected";} ?>>Verdana</option>
|
|
|
159 |
</select>
|
|
|
160 |
</b> <b>Größe:
|
|
|
161 |
<? if (!$zeile[Ueberschrift_Groesse]) {$zeile[Ueberschrift_Groesse]=2;} ?>
|
|
|
162 |
<select name="Ueberschrift_Groesse" size="1">
|
|
|
163 |
<option<? if ($zeile[Ueberschrift_Groesse] == "1") {echo " selected";} ?>>1</option>
|
|
|
164 |
<option<? if ($zeile[Ueberschrift_Groesse] == "2") {echo " selected";} ?>>2</option>
|
|
|
165 |
<option<? if ($zeile[Ueberschrift_Groesse] == "3") {echo " selected";} ?>>3</option>
|
|
|
166 |
<option<? if ($zeile[Ueberschrift_Groesse] == "4") {echo " selected";} ?>>4</option>
|
|
|
167 |
<option<? if ($zeile[Ueberschrift_Groesse] == "5") {echo " selected";} ?>>5</option>
|
|
|
168 |
<option<? if ($zeile[Ueberschrift_Groesse] == "6") {echo " selected";} ?>>6</option>
|
|
|
169 |
</select>
|
|
|
170 |
</b></td>
|
|
|
171 |
</tr>
|
|
|
172 |
<tr>
|
|
|
173 |
<td bgcolor="#000099" class="headline" valign="top" width="105"><b><font face="Arial, Helvetica, sans-serif" size="2" color="#FFFFFF">Hindergrund:</font></b></td>
|
|
|
174 |
<td valign="top" width="371">
|
|
|
175 |
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
|
|
176 |
<tr>
|
|
|
177 |
<td><b>Farbe: #
|
|
|
178 |
<input type="text" name="background_color" size="6" maxlength="6" value="<? echo $zeile[background_color] ?>">
|
|
|
179 |
<input type="button" value="Farb Assistent" onClick="Farb_Assistent(this.form.background_color.value,'document.formname.background_color.value');" name="button">
|
|
|
180 |
</b></td>
|
|
|
181 |
<td>
|
|
|
182 |
<table width="24" height="10" border="1" cellspacing="0" cellpadding="0">
|
|
|
183 |
<tr>
|
|
|
184 |
<td bgcolor="<? echo $zeile[background_color] ?>"> </td>
|
|
|
185 |
</tr>
|
|
|
186 |
</table>
|
|
|
187 |
</td>
|
|
|
188 |
</tr>
|
|
|
189 |
</table>
|
|
|
190 |
</td>
|
|
|
191 |
<td valign="top" bgcolor="#FFFFFF" width="519">
|
|
|
192 |
<?
|
|
|
193 |
$image_name="background";
|
|
|
194 |
$image_Path="../$site/images/";
|
|
|
195 |
if ($zeile[$image_name] != "")
|
|
|
196 |
{
|
|
|
197 |
?>
|
|
|
198 |
<input type="radio" name="_<? echo $image_name ?>" value="<? echo $zeile[$image_name]; ?>" <? if ($zeile[$image_name] != "") {echo "checked";}?>>
|
|
|
199 |
<?
|
|
|
200 |
echo "$zeile[$image_name]";
|
|
|
201 |
$size= filesize ($image_Path.$zeile[$image_name]) >> 10;
|
|
|
202 |
$imgsize = GetImageSize ($image_Path.$zeile[$image_name]);
|
|
|
203 |
echo " ( $size KB $imgsize[0]x$imgsize[1])<BR>";
|
|
|
204 |
}
|
|
|
205 |
?>
|
|
|
206 |
<input type="radio" name="_<? echo $image_name ?>" value="1" <? if ($zeile[$image_name] == "") {echo "checked";}?>>
|
|
|
207 |
kein Bild<br>
|
|
|
208 |
<input type="radio" name="_<? echo $image_name ?>" value="2">
|
|
|
209 |
<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;">
|
|
|
210 |
<input type="hidden" name="<? echo $image_name ?>_Pfad" value="<? echo $image_Path ?>">
|
|
|
211 |
</td>
|
|
|
212 |
</tr>
|
|
|
213 |
<tr>
|
|
|
214 |
<td bgcolor="#000099" class="headline" nowrap valign="top" width="105">Inhalte:</td>
|
|
|
215 |
<td colspan="2" align="center">
|
|
|
216 |
<? if ($ID) { ?>
|
|
|
217 |
<input type="button" value="Inhalte ändern" onClick="parent.location='inhalt.php?File=<? echo $ID ?>'">
|
|
|
218 |
|
|
|
219 |
<input type="button" value="Inhalte einfügen" onClick="parent.location='inhalt.php?action=edit&File=<? echo $ID ?>'">
|
|
|
220 |
|
|
|
221 |
<input type="button" value="Inhalte löschen"onClick="parent.location='inhalt.php?action=delete&File=<? echo $ID ?>'">
|
|
|
222 |
<? } else {?> <? } ?>
|
|
|
223 |
</td>
|
|
|
224 |
</tr>
|
|
|
225 |
</table>
|
|
|
226 |
<input type="hidden" name="site" value="<? echo $site ?>">
|
|
|
227 |
<input type="hidden" name="ID" value="<? echo $ID ?>">
|
|
|
228 |
<input type="hidden" name="action" value="update">
|
|
|
229 |
<input type="hidden" name="externeDatei" value="0">
|
|
|
230 |
<input type="hidden" name="Navigation" value="0">
|
|
|
231 |
</form>
|
|
|
232 |
<?
|
|
|
233 |
if ($redirect) { ?>
|
|
|
234 |
<script language="javascript">
|
|
|
235 |
parent.formname.ID.value='<? echo $ID ?>';
|
|
|
236 |
parent.formname.submit();
|
|
|
237 |
</script>
|
|
|
238 |
<? } ?>
|
|
|
239 |
</body>
|
|
|
240 |
</html>
|