| 1 |
lars |
1 |
<?
|
|
|
2 |
$tab="Branche";
|
|
|
3 |
define ("modul_name", "branchenbuch");
|
|
|
4 |
define ("tool_name", "branchen");
|
|
|
5 |
require_once "../Online-Shop/connect2.php";
|
|
|
6 |
$self=basename($_SERVER["PHP_SELF"]);
|
|
|
7 |
if ($action=="update")
|
|
|
8 |
{
|
|
|
9 |
if (!$ID)
|
|
|
10 |
{ // insert Dummy-Entry
|
|
|
11 |
$query = "insert into $tab (erstellt_am,erstellt_von) VALUES (NOW(),'$PHP_AUTH_USER')";
|
|
|
12 |
$result = mysql_query ($query) or die (mysql_errno().": ".mysql_error()."<hr>".$query."<hr>");
|
|
|
13 |
$ID=mysql_insert_id();
|
|
|
14 |
}
|
|
|
15 |
|
|
|
16 |
unset($HTTP_POST_VARS[action]);
|
|
|
17 |
unset($HTTP_POST_VARS[ID]);
|
|
|
18 |
|
|
|
19 |
foreach(array_keys($HTTP_POST_VARS) as $elem)
|
|
|
20 |
{
|
|
|
21 |
if ($elem[0] == "_")
|
|
|
22 |
{
|
|
|
23 |
unset($HTTP_POST_VARS[$elem]);
|
|
|
24 |
$button=$$elem;
|
|
|
25 |
$elem=substr($elem,1);
|
|
|
26 |
$Pfad=$HTTP_POST_VARS[$elem."_Pfad"];
|
|
|
27 |
unset($HTTP_POST_VARS[$elem."_Pfad"]);
|
|
|
28 |
$image=$$elem;
|
|
|
29 |
$image_name=$elem."_name";
|
|
|
30 |
$image_name=urlencode($$image_name);
|
|
|
31 |
switch ($button)
|
|
|
32 |
{
|
|
|
33 |
case 0:
|
|
|
34 |
break;
|
|
|
35 |
case 1:
|
|
|
36 |
$HTTP_POST_VARS[$elem]='';
|
|
|
37 |
break;
|
|
|
38 |
case 2:
|
|
|
39 |
//$image_name=$ID."_".$image_name;
|
|
|
40 |
$image_name=$ID.strrchr($image_name,".");
|
|
|
41 |
$HTTP_POST_VARS[$elem]=$image_name;
|
|
|
42 |
|
|
|
43 |
/* ------------------------------------------------------------------------------------------ */
|
|
|
44 |
// $Imagenummer extrahieren
|
|
|
45 |
$Imagenummer=explode("_",$elem); $Imagenummer=$Imagenummer[1];
|
|
|
46 |
$DatenID = "bild".$Imagenummer;
|
|
|
47 |
$Imagedaten = explode(";", $web_rechte[modul_name][tool_name][$DatenID]);
|
|
|
48 |
/*
|
|
|
49 |
Imagedaten möglich Werte:
|
|
|
50 |
0: Titel des Feldes
|
|
|
51 |
1: max. Breite für Bild1
|
|
|
52 |
2: max. Höhe für Bild1
|
|
|
53 |
|
|
|
54 |
3: Pfad für mittleres Bild1
|
|
|
55 |
4: max. Breite für mittleres Bild1
|
|
|
56 |
5: max. Höhe für mittleres Bild1
|
|
|
57 |
|
|
|
58 |
6: Pfad für kleines Bild1
|
|
|
59 |
7: max. Breite für kleines Bild1
|
|
|
60 |
8: max. Höhe für kleines Bild1
|
|
|
61 |
*/
|
|
|
62 |
|
|
|
63 |
// Höhe und Breite des Bildes bestimmen
|
|
|
64 |
$imgsize = GetImageSize ($image);
|
|
|
65 |
// $imgsize[0] $imgsize[1]
|
|
|
66 |
|
|
|
67 |
// ---- Hier wird abgefragt ob das grosse Bild angepasst werden soll ---- //
|
|
|
68 |
$resize=false;
|
|
|
69 |
if (count($Imagedaten) > 1) {$resize = true;}
|
|
|
70 |
if (($imgsize[0] < $Imagedaten[1]) and ($imgsize[1] < $Imagedaten[2])) {$resize = false;}
|
|
|
71 |
|
|
|
72 |
if ($resize==true)
|
|
|
73 |
{
|
|
|
74 |
exec("convert -scale ".$Imagedaten[1]."x".$Imagedaten[2]." ".$image." ".$Pfad.$image_name);
|
|
|
75 |
}
|
|
|
76 |
else
|
|
|
77 |
{
|
|
|
78 |
copy($image,$Pfad.$image_name);
|
|
|
79 |
}
|
|
|
80 |
/* ------------------------------------------------------------------------------------------ */
|
|
|
81 |
|
|
|
82 |
// ---- falls mittleres Bild: erstellen---- //
|
|
|
83 |
if (($Imagedaten[4]) and ($Imagedaten[5]))
|
|
|
84 |
{
|
|
|
85 |
exec("convert -scale ".$Imagedaten[4]."x".$Imagedaten[5]." ".$image." ".$Pfad.$Imagedaten[3]."/".$image_name);
|
|
|
86 |
}
|
|
|
87 |
|
|
|
88 |
// ---- falls kleines Bild: erstellen---- //
|
|
|
89 |
if (($Imagedaten[6]) and ($Imagedaten[7])) {
|
|
|
90 |
exec("convert -scale ".$Imagedaten[7]."x".$Imagedaten[8]." ".$image." ".$Pfad.$Imagedaten[6]."/".$image_name);
|
|
|
91 |
}
|
|
|
92 |
|
|
|
93 |
break;
|
|
|
94 |
default:
|
|
|
95 |
break;
|
|
|
96 |
}
|
|
|
97 |
}
|
|
|
98 |
}
|
|
|
99 |
$names=array();
|
|
|
100 |
foreach(array_keys($HTTP_POST_VARS) as $elem)
|
|
|
101 |
{
|
|
|
102 |
array_push($names,"$elem='$HTTP_POST_VARS[$elem]'");
|
|
|
103 |
}
|
|
|
104 |
$query="update $tab set ".join($names,', ');
|
|
|
105 |
$query=$query.", letzte_Aenderung_am = NOW(), letzte_Aenderung_von='$PHP_AUTH_USER' where ID = '$ID'";
|
|
|
106 |
$result = mysql_query ($query) or die (mysql_errno().": ".mysql_error());
|
|
|
107 |
$result=mysql_query("update Branche set Father = -1 where Father = ID");
|
|
|
108 |
header("Location: ".$self);
|
|
|
109 |
}
|
|
|
110 |
|
|
|
111 |
if ($action=="delete")
|
|
|
112 |
{
|
|
|
113 |
if ($ID)
|
|
|
114 |
{
|
|
|
115 |
$condition=array();
|
|
|
116 |
foreach ($ID as $elem)
|
|
|
117 |
{
|
|
|
118 |
array_push($condition," ID = '$elem'");
|
|
|
119 |
}
|
|
|
120 |
$cond=join(" or ",$condition);
|
|
|
121 |
$query = "DELETE FROM $tab WHERE $cond";
|
|
|
122 |
$result = mysql_query ("$query") or die (mysql_errno().": ".mysql_error());
|
|
|
123 |
header("Location: ".$self);
|
|
|
124 |
}
|
|
|
125 |
}
|
|
|
126 |
if (!$action)
|
|
|
127 |
{
|
|
|
128 |
$action="select_edit";
|
|
|
129 |
}
|
|
|
130 |
if (!$sort) {$sort='Name';}
|
|
|
131 |
?>
|
|
|
132 |
|
|
|
133 |
<html>
|
|
|
134 |
<head>
|
|
|
135 |
<title>Branchenführer <? echo $site ?>: Redaktionssystem</title>
|
|
|
136 |
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
|
|
137 |
<link rel=stylesheet type="text/css" href="../Online-Shop/redaktion.css">
|
|
|
138 |
<link rel=stylesheet type="text/css" href="buttons.css">
|
|
|
139 |
<script language="JavaScript">
|
|
|
140 |
<!--
|
|
|
141 |
function MM_swapImgRestore() { //v3.0
|
|
|
142 |
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
|
|
|
143 |
}
|
|
|
144 |
|
|
|
145 |
function MM_preloadImages() { //v3.0
|
|
|
146 |
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
|
|
|
147 |
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
|
|
|
148 |
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
|
|
|
149 |
}
|
|
|
150 |
|
|
|
151 |
function MM_swapImage() { //v3.0
|
|
|
152 |
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
|
|
|
153 |
if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
|
|
|
154 |
}
|
|
|
155 |
|
|
|
156 |
function MM_findObj(n, d) { //v4.0
|
|
|
157 |
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
|
|
|
158 |
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
|
|
|
159 |
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
|
|
|
160 |
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
|
|
|
161 |
if(!x && document.getElementById) x=document.getElementById(n); return x;
|
|
|
162 |
}
|
|
|
163 |
|
|
|
164 |
//-->
|
|
|
165 |
</script>
|
|
|
166 |
<meta name="description" content="Redaktionssystem">
|
|
|
167 |
<meta name="author" content="Webagentur Niewerth">
|
|
|
168 |
<meta name="robots" content="noindex">
|
|
|
169 |
</head>
|
|
|
170 |
|
|
|
171 |
<body bgcolor="#FFFFFF" leftmargin="20" topmargin="10" marginwidth="20" marginheight="10" onLoad="MM_preloadImages('../images/navigation/bt_neu_f2.gif','../images/navigation/bt_delete_f2.gif','../images/navigation/bt_bearbeiten_f2.gif')" text="#000096">
|
|
|
172 |
<form method="post" action="<? echo $self ?>" name="formname" enctype="multipart/form-data">
|
|
|
173 |
<table width="662" border="0" cellspacing="0" cellpadding="0">
|
|
|
174 |
<tr valign="top">
|
|
|
175 |
<td width="585">
|
|
|
176 |
<!-- Auswahl Löschen START -->
|
|
|
177 |
<?
|
|
|
178 |
if ($action=="delete")
|
|
|
179 |
{
|
|
|
180 |
$query="SELECT * FROM $tab ";
|
|
|
181 |
$query=$query."order by $sort";
|
|
|
182 |
$result = mysql_query ($query) or die (mysql_errno().": ".mysql_error());
|
|
|
183 |
if (mysql_num_rows($result) == 0)
|
|
|
184 |
{
|
|
|
185 |
?>
|
|
|
186 |
<p class="error">Es sind keine Daten eingetragen !</p>
|
|
|
187 |
<p></p>
|
|
|
188 |
<?
|
|
|
189 |
}
|
|
|
190 |
else
|
|
|
191 |
{
|
|
|
192 |
?>
|
|
|
193 |
<table width="100%" border="1" cellspacing="0" cellpadding="3" bordercolorlight="#FFFFFF" bordercolordark="#999999">
|
|
|
194 |
<tr bgcolor="#<? echo $webs[bgcolor_links] ?>">
|
|
|
195 |
<td><font color="#<? echo $webs[font_color_links] ?>"><b>
|
|
|
196 |
<? if ($web_rechte[modul_name][tool_name][$Feld]) { echo $web_rechte[modul_name][tool_name][$Feld]; } else { ?>
|
|
|
197 |
Branche: Löschen
|
|
|
198 |
<? } ?>
|
|
|
199 |
</b></font></td>
|
|
|
200 |
</tr>
|
|
|
201 |
<tr>
|
|
|
202 |
<td bgcolor="#<? echo $webs[bgcolor_rechts] ?>">
|
|
|
203 |
<?
|
|
|
204 |
function show_Kats_delete($root,$level)
|
|
|
205 |
{
|
|
|
206 |
$level++;
|
|
|
207 |
$query="select * from Branche where Father = $root order by Rang";
|
|
|
208 |
$result = mysql_query ($query) or die (mysql_errno().": ".mysql_error()."<hr>".$query);
|
|
|
209 |
while($zeile=mysql_fetch_array($result))
|
|
|
210 |
{
|
|
|
211 |
$query_count="select * from Branche where Father = $zeile[ID] order by Rang";
|
|
|
212 |
$result_count = mysql_query ($query_count) or die (mysql_errno().": ".mysql_error()."<hr>".$query_count);
|
|
|
213 |
$count=mysql_num_rows($result_count);
|
|
|
214 |
|
|
|
215 |
for ($a = 0; $a < $level; $a++)
|
|
|
216 |
{
|
|
|
217 |
echo " ";
|
|
|
218 |
}
|
|
|
219 |
|
|
|
220 |
if ($count == 0) { ?><input type="checkbox" name="ID[]" value="<? echo $zeile[ID]; ?>"><? } else { echo " <b>"; }
|
|
|
221 |
echo $zeile[Name];
|
|
|
222 |
if ($count > 0) { ?>:<? echo "</b>"; }
|
|
|
223 |
?><br><?
|
|
|
224 |
|
|
|
225 |
|
|
|
226 |
show_Kats_delete($zeile[ID],$level);
|
|
|
227 |
if ($root < 1) { echo "<hr noshade>"; }
|
|
|
228 |
}
|
|
|
229 |
}
|
|
|
230 |
show_Kats_delete(-1,-1);
|
|
|
231 |
?>
|
|
|
232 |
</td>
|
|
|
233 |
</tr>
|
|
|
234 |
<tr bgcolor="#<? echo $webs[bgcolor_links] ?>">
|
|
|
235 |
<td align="right">
|
|
|
236 |
<input type="hidden" name="action" value='delete'>
|
|
|
237 |
<input type="submit" value="LÖSCHEN">
|
|
|
238 |
<input type="reset" name="Button22" value="Zurücksetzen">
|
|
|
239 |
</td>
|
|
|
240 |
</tr>
|
|
|
241 |
</table>
|
|
|
242 |
<?
|
|
|
243 |
}
|
|
|
244 |
?>
|
|
|
245 |
<?
|
|
|
246 |
}
|
|
|
247 |
?>
|
|
|
248 |
<!-- Auswahl Löschen ENDE -->
|
|
|
249 |
<!-- Auswahl SELECT_EDIT START -->
|
|
|
250 |
<?
|
|
|
251 |
|
|
|
252 |
if ($action=="select_edit")
|
|
|
253 |
{
|
|
|
254 |
$query="SELECT * FROM $tab ";
|
|
|
255 |
$query=$query."order by $sort";
|
|
|
256 |
|
|
|
257 |
$result = mysql_query ($query) or die (mysql_errno().": ".mysql_error());
|
|
|
258 |
if (mysql_num_rows($result) == 0)
|
|
|
259 |
{
|
|
|
260 |
?>
|
|
|
261 |
<p class="error">Es sind keine
|
|
|
262 |
Daten eingetragen !</p>
|
|
|
263 |
<p></p>
|
|
|
264 |
<?
|
|
|
265 |
}
|
|
|
266 |
else
|
|
|
267 |
{
|
|
|
268 |
?>
|
|
|
269 |
<table width="100%" border="1" cellspacing="0" cellpadding="3" bordercolorlight="#FFFFFF" bordercolordark="#999999">
|
|
|
270 |
<tr bgcolor="#<? echo $webs[bgcolor_links] ?>">
|
|
|
271 |
<td colspan="2">
|
|
|
272 |
<font color="#<? echo $webs[font_color_links] ?>"><b>
|
|
|
273 |
<? if ($web_rechte[modul_name][tool_name][$Feld]) { echo $web_rechte[modul_name][tool_name][$Feld]; } else { ?>Branche: Bearbeiten<? } ?>
|
|
|
274 |
</b></font>
|
|
|
275 |
</td>
|
|
|
276 |
</tr>
|
|
|
277 |
<tr bgcolor="#<? echo $webs[bgcolor_rechts] ?>">
|
|
|
278 |
<td>
|
|
|
279 |
<?
|
|
|
280 |
function show_Kats_edit($root,$level)
|
|
|
281 |
{
|
|
|
282 |
$level++;
|
|
|
283 |
$query="select * from Branche where Father = $root order by Rang";
|
|
|
284 |
$result = mysql_query ($query) or die (mysql_errno().": ".mysql_error()."<hr>".$query);
|
|
|
285 |
while($zeile=mysql_fetch_array($result))
|
|
|
286 |
{
|
|
|
287 |
for ($a = 0; $a < $level; $a++)
|
|
|
288 |
{
|
|
|
289 |
echo " ";
|
|
|
290 |
}
|
|
|
291 |
?>
|
|
|
292 |
<a href="<? echo $self ?>?action=edit&ID=<? echo $zeile[ID]; ?>">
|
|
|
293 |
<? echo $zeile[Name]; ?></a><br>
|
|
|
294 |
<?
|
|
|
295 |
show_Kats_edit($zeile[ID],$level);
|
|
|
296 |
if ($root < 1) { echo "<hr noshade>"; }
|
|
|
297 |
}
|
|
|
298 |
}
|
|
|
299 |
show_Kats_edit(-1,-1);
|
|
|
300 |
?>
|
|
|
301 |
</td>
|
|
|
302 |
</tr>
|
|
|
303 |
<tr bgcolor="#<? echo $webs[bgcolor_links] ?>">
|
|
|
304 |
<td colspan="2">
|
|
|
305 |
<div align="right">
|
|
|
306 |
<input type="hidden" name="action" value='edit'>
|
|
|
307 |
</div>
|
|
|
308 |
</td>
|
|
|
309 |
</tr>
|
|
|
310 |
</table>
|
|
|
311 |
<?
|
|
|
312 |
}
|
|
|
313 |
?>
|
|
|
314 |
<?
|
|
|
315 |
}
|
|
|
316 |
?>
|
|
|
317 |
<!-- Auswahl SELECT_EDIT ENDE -->
|
|
|
318 |
|
|
|
319 |
<?
|
|
|
320 |
if ($action=="edit")
|
|
|
321 |
{
|
|
|
322 |
if ($ID)
|
|
|
323 |
{
|
|
|
324 |
$result = mysql_query ("SELECT * FROM $tab where ID = '$ID'") or die (mysql_errno().": ".mysql_error());
|
|
|
325 |
$zeile=mysql_fetch_array($result);
|
|
|
326 |
$Father=$zeile[Father];
|
|
|
327 |
}
|
|
|
328 |
$zeile[von]=join(".",array_reverse(preg_split("/-/",$zeile[von])));
|
|
|
329 |
$zeile[bis]=join(".",array_reverse(preg_split("/-/",$zeile[bis])));
|
|
|
330 |
$zeile[Abmeldedatum]=join(".",array_reverse(preg_split("/-/",$zeile[Abmeldedatum])));
|
|
|
331 |
?>
|
|
|
332 |
<table width="100%" border="1" cellspacing="0" cellpadding="3" bordercolorlight="#FFFFFF" bordercolordark="#999999">
|
|
|
333 |
<tr bgcolor="#<? echo $webs[bgcolor_links] ?>">
|
|
|
334 |
<td colspan="3">
|
|
|
335 |
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
|
|
336 |
<tr>
|
|
|
337 |
<td><font color="#<? echo $webs[font_color_links] ?>"><b>Branche:
|
|
|
338 |
<? if ($ID) { ?>Bearbeiten<? } else { ?>Neueintrag<? } ?></b></font></td>
|
|
|
339 |
<?
|
|
|
340 |
$Feld="Rang";
|
|
|
341 |
if (isset($user_rechte[modul_name][tool_name][$Feld]))
|
|
|
342 |
{
|
|
|
343 |
?>
|
|
|
344 |
<td align="right"><font color="#<? echo $webs[font_color_links] ?>"><b>Rang:</b></font>
|
|
|
345 |
<input type="text" name="Rang" value="<? echo $zeile[Rang] ?>" size="3">
|
|
|
346 |
</td>
|
|
|
347 |
<? } ?>
|
|
|
348 |
</tr>
|
|
|
349 |
</table>
|
|
|
350 |
</td>
|
|
|
351 |
</tr>
|
|
|
352 |
<?
|
|
|
353 |
$Feld="Father";
|
|
|
354 |
if (isset($user_rechte[modul_name][tool_name][$Feld]))
|
|
|
355 |
{
|
|
|
356 |
$current_Father = $zeile[Father];
|
|
|
357 |
?>
|
|
|
358 |
<tr>
|
|
|
359 |
<td bgcolor="#<? echo $webs[bgcolor_links] ?>" valign="middle" width="13%">
|
|
|
360 |
<font color="#<? echo $webs[font_color_links] ?>"><b>
|
|
|
361 |
<? if ($web_rechte[modul_name][tool_name][$Feld]) { echo $web_rechte[modul_name][tool_name][$Feld]; } else { ?>Father<? } ?>
|
|
|
362 |
</b></font></td>
|
|
|
363 |
<td bgcolor="#<? echo $webs[bgcolor_rechts] ?>" colspan="2">
|
|
|
364 |
<select name="Father" size="1" class="input">
|
|
|
365 |
<option value="-1"></option>
|
|
|
366 |
<?
|
|
|
367 |
function show_Kats_select($root,$level)
|
|
|
368 |
{
|
|
|
369 |
global $current_Father;
|
|
|
370 |
$level++;
|
|
|
371 |
$query="select * from Branche where Father = $root order by Rang";
|
|
|
372 |
$result = mysql_query ($query) or die (mysql_errno().": ".mysql_error()."<hr>".$query);
|
|
|
373 |
while($zeile=mysql_fetch_array($result))
|
|
|
374 |
{
|
|
|
375 |
?>
|
|
|
376 |
<option value="<? echo $zeile[ID]; ?>" <? if ($current_Father == $zeile[ID]) { ?>selected<? } ?>>
|
|
|
377 |
<? for ($a = 0; $a < $level; $a++) { echo " "; } ?>
|
|
|
378 |
<? echo $zeile[Name]; ?>
|
|
|
379 |
</option>
|
|
|
380 |
<?
|
|
|
381 |
show_Kats_select($zeile[ID],$level);
|
|
|
382 |
}
|
|
|
383 |
}
|
|
|
384 |
show_Kats_select(-1,-1);
|
|
|
385 |
?>
|
|
|
386 |
</select>
|
|
|
387 |
</td>
|
|
|
388 |
</tr>
|
|
|
389 |
<?
|
|
|
390 |
}
|
|
|
391 |
?>
|
|
|
392 |
<?
|
|
|
393 |
$Feld="Name";
|
|
|
394 |
if (isset($user_rechte[modul_name][tool_name][$Feld]))
|
|
|
395 |
{
|
|
|
396 |
?>
|
|
|
397 |
<tr>
|
|
|
398 |
<td bgcolor="#<? echo $webs[bgcolor_links] ?>" valign="middle" width="13%"><font color="#<? echo $webs[font_color_links] ?>"><b>
|
|
|
399 |
<? if ($web_rechte[modul_name][tool_name][$Feld]) { echo $web_rechte[modul_name][tool_name][$Feld]; } else { ?>Name<? } ?>
|
|
|
400 |
</b></font></td>
|
|
|
401 |
<td bgcolor="#<? echo $webs[bgcolor_rechts] ?>" colspan="2">
|
|
|
402 |
<input type="text" name="Name" value="<? echo $zeile[Name] ?>" class="input">
|
|
|
403 |
</td>
|
|
|
404 |
</tr>
|
|
|
405 |
<?
|
|
|
406 |
}
|
|
|
407 |
?>
|
|
|
408 |
|
|
|
409 |
<?
|
|
|
410 |
// SEBASTIAN
|
|
|
411 |
$Feld="Template";
|
|
|
412 |
if (isset($user_rechte[modul_name][tool_name][$Feld]))
|
|
|
413 |
{
|
|
|
414 |
if ($ID)
|
|
|
415 |
{
|
|
|
416 |
?>
|
|
|
417 |
<tr>
|
|
|
418 |
<td bgcolor="#<? echo $webs[bgcolor_links] ?>" width="21%" valign="top" height="100"><p><font color="#<? echo $webs[font_color_links] ?>"><b>
|
|
|
419 |
<?
|
|
|
420 |
if ($web_rechte[modul_name][tool_name][$Feld])
|
|
|
421 |
{
|
|
|
422 |
echo $web_rechte[modul_name][tool_name][$Feld];
|
|
|
423 |
}
|
|
|
424 |
else
|
|
|
425 |
{
|
|
|
426 |
?>
|
|
|
427 |
Template:
|
|
|
428 |
<?
|
|
|
429 |
}
|
|
|
430 |
?>
|
|
|
431 |
</b></font></p>
|
|
|
432 |
</td>
|
|
|
433 |
<td colspan="2" bgcolor="#<? echo $webs[bgcolor_rechts] ?>"><iFrame height=100% width=100% frameborder="NO" marginwidth="0" marginheight="0" src="../Online-Shop/template.php?language=<? echo $language ?>&Typ=Branche&ID=<? echo $zeile[ID]?>"></iFrame></td>
|
|
|
434 |
</tr>
|
|
|
435 |
<?
|
|
|
436 |
}
|
|
|
437 |
}
|
|
|
438 |
?>
|
|
|
439 |
|
|
|
440 |
|
|
|
441 |
|
|
|
442 |
|
|
|
443 |
<?
|
|
|
444 |
/* ############################################################################################################ */
|
|
|
445 |
|
|
|
446 |
for ($bild_nr=1; $bild_nr <= 2; $bild_nr++)
|
|
|
447 |
{
|
|
|
448 |
$Feld="bild$bild_nr";
|
|
|
449 |
if (isset($user_rechte[modul_name][tool_name][$Feld]))
|
|
|
450 |
{
|
|
|
451 |
?>
|
|
|
452 |
<tr>
|
|
|
453 |
<td bgcolor="#<? echo $webs[bgcolor_links] ?>" valign="top" width="21%">
|
|
|
454 |
<font color="#<? echo $webs[font_color_links] ?>"><b>
|
|
|
455 |
<?
|
|
|
456 |
$Felddaten = explode(";", $web_rechte[modul_name][tool_name][$Feld]);
|
|
|
457 |
if (!empty($Felddaten[0]))
|
|
|
458 |
{
|
|
|
459 |
echo $Felddaten[0];
|
|
|
460 |
}
|
|
|
461 |
else
|
|
|
462 |
{
|
|
|
463 |
?>Bild <? echo $bild_nr; ?><?
|
|
|
464 |
}
|
|
|
465 |
?>
|
|
|
466 |
</b></font> </td>
|
|
|
467 |
<td bgcolor="#<? echo $webs[bgcolor_rechts] ?>" width="79%">
|
|
|
468 |
<table border="0" width="100%" cellspacing="0" cellpadding="0">
|
|
|
469 |
<tr>
|
|
|
470 |
<td width="55%" nowrap colspan="2"> <font color="#<? echo $webs[font_color_rechts] ?>">
|
|
|
471 |
<?
|
|
|
472 |
$image_name="bild_".$bild_nr."_url";
|
|
|
473 |
$image_Path=$webs[verzeichnis]."/images/Branchenbuch/Branchen/".$bild_nr."/";
|
|
|
474 |
?>
|
|
|
475 |
<input type="hidden" name="<? echo $image_name ?>_Pfad" value="<? echo $image_Path ?>">
|
|
|
476 |
<?
|
|
|
477 |
if ($zeile[$image_name] != "")
|
|
|
478 |
{
|
|
|
479 |
?>
|
|
|
480 |
<input type="radio" name="_<? echo $image_name ?>" value="0" checked>
|
|
|
481 |
<a href="http://www.<? echo $site."/images/Branchenbuch/Branchen/".$bild_nr."/".$zeile[$image_name] ?>" target="blank">
|
|
|
482 |
<? echo $zeile[$image_name]; ?>
|
|
|
483 |
</a>
|
|
|
484 |
<?
|
|
|
485 |
$size= filesize ($image_Path.$zeile[$image_name]) >> 10;
|
|
|
486 |
$imgsize = GetImageSize ($image_Path.$zeile[$image_name]);
|
|
|
487 |
echo " ( $size KB $imgsize[0]x$imgsize[1])<BR>";
|
|
|
488 |
}
|
|
|
489 |
?>
|
|
|
490 |
<input type="radio" name="_<? echo $image_name ?>" value="1" <? if ($zeile[$image_name] == "") {echo "checked";}?>>
|
|
|
491 |
kein Bild<br>
|
|
|
492 |
<input type="radio" name="_<? echo $image_name ?>" value="2">
|
|
|
493 |
<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;">
|
|
|
494 |
</font> </td>
|
|
|
495 |
<td width="45%" nowrap align="center">
|
|
|
496 |
<? if ($zeile[$image_name] != "") {?>
|
|
|
497 |
<a href="http://www.<? echo $site."/images/Branchenbuch/Branchen/".$bild_nr."/".$zeile[$image_name] ?>" target="blank"><img height="60" src="http://www.<? echo $site."/images/Branchenbuch/Branchen/".$bild_nr."/".$zeile[$image_name] ?>" border="0"></a>
|
|
|
498 |
<? } ?>
|
|
|
499 |
</td>
|
|
|
500 |
</tr>
|
|
|
501 |
</table>
|
|
|
502 |
</td>
|
|
|
503 |
</tr>
|
|
|
504 |
<?
|
|
|
505 |
}
|
|
|
506 |
|
|
|
507 |
$Feld="bild_text$bild_nr";
|
|
|
508 |
if (isset($user_rechte[modul_name][tool_name][$Feld]))
|
|
|
509 |
{
|
|
|
510 |
?>
|
|
|
511 |
<tr>
|
|
|
512 |
<td bgcolor="#<? echo $webs[bgcolor_links] ?>" class="headline" width="20%"><font color="#<? echo $webs[font_color_links] ?>"><b>
|
|
|
513 |
<?
|
|
|
514 |
if ($web_rechte[modul_name][tool_name][$Feld])
|
|
|
515 |
{
|
|
|
516 |
echo $web_rechte[modul_name][tool_name][$Feld];
|
|
|
517 |
}
|
|
|
518 |
else
|
|
|
519 |
{
|
|
|
520 |
?>Bildtext:<?
|
|
|
521 |
}
|
|
|
522 |
?>
|
|
|
523 |
</b></font></td>
|
|
|
524 |
<td bgcolor="#<? echo $webs[bgcolor_rechts] ?>">
|
|
|
525 |
<input type="text" name="bild_text<?=$bild_nr;?>" size="40" value="<? echo htmlentities($zeile["bild_text".$bild_nr]) ?>" maxlength="255">
|
|
|
526 |
</td>
|
|
|
527 |
</tr><?
|
|
|
528 |
}
|
|
|
529 |
$Feld="bild_pos$bild_nr";
|
|
|
530 |
if (isset($user_rechte[modul_name][tool_name][$Feld]))
|
|
|
531 |
{
|
|
|
532 |
?>
|
|
|
533 |
<tr>
|
|
|
534 |
<td bgcolor="#<? echo $webs[bgcolor_links] ?>" class="headline" width="20%"><font color="#<? echo $webs[font_color_links] ?>"><b>
|
|
|
535 |
Position:</b></font></td>
|
|
|
536 |
<td bgcolor="#<? echo $webs[bgcolor_rechts] ?>">
|
|
|
537 |
<? $kats= explode(";",$web_rechte[modul_name][tool_name]["bild_pos".$bild_nr]) ?>
|
|
|
538 |
<select name="<?="bild_pos".$bild_nr;?>">
|
|
|
539 |
<?
|
|
|
540 |
foreach($kats as $elem)
|
|
|
541 |
{
|
|
|
542 |
?>
|
|
|
543 |
<option <? if ($zeile["bild_pos".$bild_nr] == $elem) { ?>selected<? } ?>>
|
|
|
544 |
<? echo $elem ?>
|
|
|
545 |
</option>
|
|
|
546 |
<?
|
|
|
547 |
}
|
|
|
548 |
?>
|
|
|
549 |
</select>
|
|
|
550 |
</td>
|
|
|
551 |
</tr><?
|
|
|
552 |
}
|
|
|
553 |
}
|
|
|
554 |
|
|
|
555 |
/* ############################################################################################################ */
|
|
|
556 |
|
|
|
557 |
$Feld="Beschreibung";
|
|
|
558 |
if (isset($user_rechte[modul_name][tool_name][$Feld]))
|
|
|
559 |
{
|
|
|
560 |
?>
|
|
|
561 |
<tr>
|
|
|
562 |
<td bgcolor="#<? echo $webs[bgcolor_links] ?>" valign="top" width="13%"><font color="#<? echo $webs[font_color_links] ?>"><b>
|
|
|
563 |
<? if ($web_rechte[modul_name][tool_name][$Feld]) { echo $web_rechte[modul_name][tool_name][$Feld]; } else { ?>
|
|
|
564 |
Beschreibung
|
|
|
565 |
<? } ?>
|
|
|
566 |
</b></font></td>
|
|
|
567 |
<td bgcolor="#<? echo $webs[bgcolor_rechts] ?>" colspan="2">
|
|
|
568 |
<textarea name="Beschreibung" cols="45" rows="5"><? echo $zeile[Beschreibung] ?></textarea>
|
|
|
569 |
</td>
|
|
|
570 |
</tr>
|
|
|
571 |
<?
|
|
|
572 |
}
|
|
|
573 |
?>
|
|
|
574 |
<?
|
|
|
575 |
if ($ID)
|
|
|
576 |
{
|
|
|
577 |
if ($zeile[erstellt_am])
|
|
|
578 |
{
|
|
|
579 |
?>
|
|
|
580 |
<tr>
|
|
|
581 |
<td bgcolor="#<? echo $webs[bgcolor_links] ?>" width="20%">
|
|
|
582 |
<font color="#<? echo $webs[font_color_links] ?>"><b>erstellt:</b></font>
|
|
|
583 |
</td>
|
|
|
584 |
<td colspan="3" bgcolor="#<? echo $webs[bgcolor_rechts] ?>">am:
|
|
|
585 |
<? $erstellt_am=datetime2human($zeile[erstellt_am]); ?>
|
|
|
586 |
<? echo $erstellt_am[Datum] ?>
|
|
|
587 |
um:
|
|
|
588 |
<? echo $erstellt_am[Zeit] ?>
|
|
|
589 |
von:
|
|
|
590 |
<? echo $zeile[erstellt_von] ?>
|
|
|
591 |
</td>
|
|
|
592 |
</tr>
|
|
|
593 |
<?
|
|
|
594 |
}
|
|
|
595 |
?>
|
|
|
596 |
<tr>
|
|
|
597 |
<td bgcolor="#<? echo $webs[bgcolor_links] ?>" width="20%" nowrap>
|
|
|
598 |
<font color="#<? echo $webs[font_color_links] ?>"><b>letzte Änderung:</b></font>
|
|
|
599 |
</td>
|
|
|
600 |
<td colspan="3" bgcolor="#<? echo $webs[bgcolor_rechts] ?>">am:
|
|
|
601 |
<?
|
|
|
602 |
if (strpos ($zeile[letzte_Aenderung_am], " "))
|
|
|
603 |
{
|
|
|
604 |
$letzte_Aenderung_am=datetime2human($zeile[letzte_Aenderung_am]);
|
|
|
605 |
}
|
|
|
606 |
else
|
|
|
607 |
{
|
|
|
608 |
$letzte_Aenderung_am=timestamp2human($zeile[letzte_Aenderung_am]);
|
|
|
609 |
}
|
|
|
610 |
?>
|
|
|
611 |
<? echo $letzte_Aenderung_am[Datum] ?>
|
|
|
612 |
um:
|
|
|
613 |
<? echo $letzte_Aenderung_am[Zeit] ?>
|
|
|
614 |
von:
|
|
|
615 |
<? echo $zeile[letzte_Aenderung_von] ?>
|
|
|
616 |
</td>
|
|
|
617 |
</tr>
|
|
|
618 |
<?
|
|
|
619 |
}
|
|
|
620 |
?>
|
|
|
621 |
|
|
|
622 |
<tr bgcolor="#<? echo $webs[bgcolor_links] ?>">
|
|
|
623 |
<td align="right" colspan="3">
|
|
|
624 |
<input type="hidden" name="ID" value="<? echo $ID ?>">
|
|
|
625 |
<input type="hidden" name="action" value="update">
|
|
|
626 |
<input type="submit" value="OK">
|
|
|
627 |
<input type="reset" name="Button" value="Zurücksetzen">
|
|
|
628 |
</td>
|
|
|
629 |
</tr>
|
|
|
630 |
</table>
|
|
|
631 |
<?
|
|
|
632 |
}
|
|
|
633 |
?>
|
|
|
634 |
</td>
|
|
|
635 |
<td width="77" align="right">
|
|
|
636 |
<table width="67" border="1" cellspacing="0" cellpadding="0" bordercolorlight="#FFFFFF" bordercolordark="#999999">
|
|
|
637 |
<tr>
|
|
|
638 |
<td><a href="<? echo $self ?>?action=edit" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('new','','../images/navigation/bt_neu_f2.gif',1)"><img name="new" border="0" src="../images/navigation/bt_neu.gif" width="67" height="40" alt="Neueintrag"></a></td>
|
|
|
639 |
</tr>
|
|
|
640 |
<tr>
|
|
|
641 |
<td><a href="<? echo $self ?>?action=select_edit" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('edit','','../images/navigation/bt_bearbeiten_f2.gif',1)"><img name="edit" border="0" src="../images/navigation/bt_bearbeiten.gif" width="67" height="40" alt="Eintrag bearbeiten"></a></td>
|
|
|
642 |
</tr>
|
|
|
643 |
<tr>
|
|
|
644 |
<td><a href="<? echo $self ?>?action=delete" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('delete','','../images/navigation/bt_delete_f2.gif',1)"><img name="delete" border="0" src="../images/navigation/bt_delete.gif" width="67" height="40" alt="Eintrag löschen"></a></td>
|
|
|
645 |
</tr>
|
|
|
646 |
</table>
|
|
|
647 |
</td>
|
|
|
648 |
</tr>
|
|
|
649 |
</table>
|
|
|
650 |
</form>
|
|
|
651 |
</body>
|