Subversion-Projekte lars-tiefland.content-management

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
1 lars 1
<?
2
    $tab = "Firma";
3
    define( "modul_name", "branchenbuch" );
4
    define( "tool_name", "firmen" );
5
    require_once  "../Online-Shop/connect2.php";
6
    $self = basename( $_SERVER["PHP_SELF"] );
7
 
8
    if ( $action == "update" && $_POST["speichern"] )
9
    {
10
        unset( $_POST["speichern"] );
11
        if ( !$ID )
12
        { // insert Dummy-Entry
13
            $query = "insert into $tab (erstellt_am,erstellt_von, bundesland) VALUES (NOW(),'$PHP_AUTH_USER', 10)";
14
            $result = mysql_query( $query ) or die( mysql_errno() . ": " .
15
                mysql_error() . "<hr>" . $query . "<hr>" );
16
            $ID = mysql_insert_id();
17
        }
18
 
19
        unset( $_POST["action"] );
20
        unset( $_POST["ID"] );
21
 
22
        foreach ( $_FILES as $name => $file )
23
        {
24
            // $Imagedaten extrahieren
25
            /*
26
            Imagedaten möglich Werte:
27
            0: Titel des Feldes
28
            1: max. Breite für Bild1
29
            2: max. Höhe für Bild1
30
 
31
            3: Pfad für mittleres Bild1
32
            4: max. Breite für mittleres Bild1
33
            5: max. Höhe für mittleres Bild1
34
 
35
            6: Pfad für kleines Bild1
36
            7: max. Breite für kleines Bild1
37
            8: max. Höhe für kleines Bild1
38
            */
39
            $file["name"] = strtolower( $file["name"] );
40
            $image["daten"] = explode( ";", $web_rechte[modul_name][tool_name][$name] );
41
            $image["pfad"] = $_POST[$name . "_Pfad"];
42
            $image["action"] = $_POST["_" . $name];
43
 
44
            unset( $_POST[$name . "_Pfad"] );
45
            unset( $_POST["_" . $name] );
46
 
47
            switch ( $image["action"] )
48
            {
49
                case 0:
50
                    break;
51
                case 1:
52
                    $_POST[$name] = "";
53
                    break;
54
                case 2:
55
                    // Falls Upload erfolgreich
56
                    if ( $file["error"] == 0 )
57
                    {
58
                        $image_name = $ID . "_" . urlencode( $file["name"] );
59
                        $_POST[$name] = $image_name;
60
 
61
                        // Temp-Datei: Größe anpassen falls notwendig
62
                        /*						exec ("convert -scale ".$image["daten"][1]."x".$image["daten"][2]." ".$file["tmp_name"]." ".$file["tmp_name"]);
63
                        move_uploaded_file
64
                        (
65
                        $file["tmp_name"],
66
                        $image["pfad"] . $ID."_".$file["name"]
67
                        );
68
                        if (file_exists($file["tmp_name"]))
69
                        {
70
                        unlink($file["tmp_name"]);
71
                        }*/
72
                        $imgsize = getImageSize( $file["tmp_name"] );
73
                        $Imagedaten = array_chunk( explode(";", $web_rechte[modul_name][tool_name][$name]),
74
                            3 );
75
                        $Imagedaten[0][0] = "";
76
                        foreach ( $Imagedaten as $ImagedatenSet )
77
                        {
78
                            if ( $ImagedatenSet[0] != "" )
79
                            {
80
                                $ImagedatenSet[0] .= "/";
81
                            }
82
                            // ---- Hier wird abgefragt ob das Bild verkleinert werden soll ---- //
83
                            if ( count($ImagedatenSet) == 3 )
84
                            {
85
                                if ( ($imgsize[0] > $ImagedatenSet[1]) or ($imgsize[1] >
86
                                    $ImagedatenSet[2]) )
87
                                {
88
                                    $cmd = "convert -scale " . $ImagedatenSet[1] .
89
                                        "x" . $ImagedatenSet[2] . " " . $file["tmp_name"] .
90
                                        " " . $image["pfad"] . $ImagedatenSet[0] .
91
                                        $image_name;
92
                                    exec( $cmd );
93
                                }
94
                                else
95
                                {
96
                                    copy( $file["tmp_name"], $image["pfad"] .
97
                                        $ImagedatenSet[0] . $image_name );
98
                                }
99
                            }
100
                            else
101
                            {
102
                                copy( $file["tmp_name"], $image["pfad"] . $ImagedatenSet[0] .
103
                                    $image_name );
104
                            }
105
                        }
106
                    }
107
                    else
108
                    {
109
                        $_POST[$name] = "";
110
                    }
111
                    break;
112
            }
113
        }
114
        /* #################################################################################################### */
115
 
116
        if ( $_POST["premium_von"] )
117
        {
118
            $_POST["premium_von"] = implode( "-", array_reverse(explode(".",
119
                $_POST["premium_von"])) );
120
        }
121
 
122
        if ( $_POST["premium_bis"] )
123
        {
124
            $_POST["premium_bis"] = implode( "-", array_reverse(explode(".",
125
                $_POST["premium_bis"])) );
126
        }
127
 
128
        if ( $_POST["Passwort"] )
129
        {
130
            //$_POST["Passwort"] = crypt( $_POST["Passwort"] );
131
            if ( !function_exists("hash") )
132
            {
133
                switch ( strtolower($web_rechte[module_name][tool_name]["Passwort"]) )
134
                {
135
                    case "sha1":
136
                        $_POST["Passwort"] = sha1( $_POST["Passwort"] );
137
                        break;
138
                    case "md5":
139
                        $_POST["Passwort"] = md5( $_POST["Passwort"] );
140
                        break;
141
                    case "crypt":
142
                    default:
143
                        $_POST["Passwort"] = crypt( $_POST["Passwort"] );
144
                        break;
145
                }
146
            } elseif ( in_array(strtolower($web_rechte[modul_name][tool_name]["Passwort"]),
147
            hash_algos())
148
                /*&& strtolower($web_rechte[module_name][tool_name]["Passwort"])!="md5"*/ )
149
            {
150
                $_POST["Passwort"] = hash( $web_rechte[modul_name][tool_name]["Passwort"],
151
                    $_POST["Passwort"] );
152
            }
153
            /*elseif(strtolower($web_rechte[modul_name][tool_name]["Passwort"])=="md5")
154
            {
155
            $_POST["Passwort"] = md5( $_POST["Passwort"] );
156
            } */  elseif ( strtolower($web_rechte[modul_name][tool_name]["Passwort"]) == "" ||
157
            strtolower($web_rechte[modul_name][tool_name]["Passwort"]) ==
158
                "crypt" )
159
            {
160
                $_POST["Passwort"] = crypt( $_POST["Passwort"] );
161
            }
162
        }
163
        else
164
        {
165
            unset( $_POST["Passwort"] );
166
        }
167
 
168
        $names = array();
169
        foreach ( $_POST as $elem => $value )
170
        {
171
            array_push( $names, "$elem='$value'" );
172
        }
173
        $query = "update $tab set " . join( $names, ', ' );
174
        $query = $query .
175
            ", letzte_Aenderung_am=NOW(), Letzte_Aenderung_von = '$PHP_AUTH_USER' where ID = '$ID'";
176
        $result = mysql_query( $query ) or die( mysql_errno() . ": " .
177
            mysql_error() );
178
        header( "Location: " . $self );
179
    } elseif ( $_POST["action"] == "update" && $_POST["freischalten"] )
180
    {
181
        $sql = "
182
            UPDATE
183
                Firma
184
            SET
185
                gesperrt='nein',
186
                publish_date=0
187
            WHERE
188
                ID='" . $_POST["ID"] . "'
189
        ";
190
        $res = mysql_query( $sql );
191
        $result = mysql_query( $sql ) or die( mysql_errno() . ": " .
192
            mysql_error() );
193
        $text = "Sehr geehrte";
194
        $text .= ( $_POST["AP_Anrede"] == "Herr" ) ? "r" : "";
195
        $text .= " " . $_POST["AP_Anrede"] . " " . $_POST["AP_Vorname"] .
196
            " " . $_POST["AP_Nachname"] . ", \nwir freuen uns Ihnen mitteilen zu können, dass Ihr Portrait nun freigeschaltet wurde und online veröffentlicht ist.\n\n Sie können sich dieses über folgenden Link ansehen:\nhttp://www.optimismushoch1000.de/gruender/list/\n\nIn der Schatzkammer ist Ihr Angebot wie folgt präsentiert:\nhttp://www.optimismushoch1000.de/index.php/foerderer/list/\n\nIhr Portrait können Sie in Ihrem Account unter folgendem Link ändern:\nhttp://www.optimismushoch1000.de/index.php?mode=login\n\nWir wünschen Ihnen viel Erfolg!\n\nFür Fragen oder Anregungen nutzten Sie bitte das Kontaktformular.\n\nMit freundlichen Grüßen\n\nIhr optimismushoch1000.de Team\n\n-------------------------------------------------------------------------------\n\noptimismushoch1000 - Tausend Gründe optimistisch zu sein!\n\nMonika Hamrozi und Murat Cakmakci GbR\nAlte Grenzstraße 1\nD - 61381 Friedrichsdorf\n\nT: +49 (0) 6172 2659-468\nF: +49 (0) 6172 7071\ninfo@optimismushoch1000.de\nhttp://www.optimismushoch1000.de / http://www.gruenderhoch1000.de\n-------------------------------------------------------------------------------\nDiese E-Mail enthält vertrauliche und/oder rechtlich geschützte Informationen.\nDas unerlaubte Kopieren sowie die unbefugte Weitergabe dieser E-Mail ist nicht gestattet.\nWenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben,\ninformieren Sie bitte den Absender und vernichten diese E-Mail. Vielen Dank.";
197
        mail( $_POST["email"], "Ihr Account ist online!", $text,
198
            "FROM:info@optimismushoch1000.de" );
199
        header( "Location: " . $self );
200
    }
201
 
202
    if ( $action == "delete" )
203
    {
204
        if ( $ID )
205
        {
206
            $condition = array();
207
            $condition2 = array();
208
            foreach ( $ID as $elem )
209
            {
210
                array_push( $condition, " ID = '$elem'" );
211
                array_push( $condition2, " Firma = '$elem'" );
212
            }
213
            $cond = join( " or ", $condition );
214
            $query = "DELETE FROM $tab WHERE $cond";
215
            $result = mysql_query( "$query" ) or die( mysql_errno() . ": " .
216
                mysql_error() );
217
 
218
            $cond = join( " or ", $condition2 );
219
            $query = "DELETE FROM Branche2Firma WHERE $cond";
220
            $result = mysql_query( "$query" ) or die( mysql_errno() . ": " .
221
                mysql_error() );
222
 
223
            header( "Location: " . $self );
224
        }
225
    }
226
    if ( !$action )
227
    {
228
        $action = "select_edit";
229
    }
230
    if ( !$sort )
231
    {
232
        $sort = 'Name';
233
    }
234
?>
235
<html>
236
<head>
237
<title>Branchenf&uuml;hrer <? echo $site ?>: Redaktionssystem</title>
238
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
239
<link rel=stylesheet type="text/css" href="../Online-Shop/redaktion.css">
240
<link rel=stylesheet type="text/css" href="buttons.css">
241
<?php
242
    $Feld = "google_maps";
243
    if ( isset($user_rechte[modul_name][tool_name][$Feld]) && $_GET["ID"] )
244
    {
245
        $key = $web_rechte[modul_name][tool_name][$Feld];
246
        $result = mysql_query( "SELECT * FROM $tab where ID = '" . (int)$_GET["ID"] .
247
            "'" ) or die( mysql_errno() . ": " . mysql_error() );
248
        $zeile = mysql_fetch_array( $result );
249
        if ( empty($zeile["Koord1"]) && empty($zeile["Koord2"]) )
250
        {
251
            $input = $zeile["Strasse"] . " " . $zeile["Hausnummer"] . ", " .
252
                $zeile["Ort"];
253
            $input = urlencode( $input );
254
            $address = "http://maps.google.com/maps/geo?q=$input&key=$key&output=csv";
255
            $point = @file_get_contents( $address );
256
            $point = explode( ",", $point );
257
            $point = array( $point[2], $point[3] );
258
            if ( !empty($point) )
259
            {
260
                $zeile["Koord1"] = $point[0];
261
                $zeile["Koord2"] = $point[1];
262
                $sql = "
263
                    UPDATE
264
                        Firma
265
                    SET
266
                        Koord1=" . $zeile["Koord1"] . ",
267
                        Koord2=" . $zeile["Koord1"] . "
268
                    WHERE
269
                        ID=$ID
270
                ";
271
                $res = mysql_query( $sql );
272
            }
273
        }
274
?>
275
 
276
	<script src="http://maps.google.com/maps?file=api&amp;v=2&amp;sensor=true&amp;key=<?= $key ?>" type="text/javascript"></script>
277
 
278
    <script type="text/javascript">
279
    function initialize() {
280
      if (GBrowserIsCompatible()) {
281
        var map = new GMap2(document.getElementById("map_canvas"));
282
 
283
        <?php
284
        if ( $zeile["Koord1"] && $zeile["Koord2"] )
285
        {
286
?>
287
            map.setCenter(new GLatLng(<?= $zeile["Koord1"] ?>, <?= $zeile["Koord2"] ?>), 16);
288
        <?php
289
        }
290
        else
291
        {
292
?>
293
            map.setCenter(new GLatLng(51.5746, 6.99236), 16);
294
        <?php
295
        }
296
?>
297
		map.addControl(new GSmallMapControl());
298
        map.addControl(new GMapTypeControl());
299
 
300
		<?php if ( $zeile['Koord1'] )
301
        { ?>
302
			var point1 = new GLatLng(<?= $zeile['Koord1']; ?>, <?= $zeile['Koord2']; ?>);
303
		<?php }
304
        else
305
        { ?>
306
		var point1 = new GLatLng(51.5746, 6.99236);
307
		<?php } ?>
308
		var node1 = document.createElement("div");
309
		var beck1 = new GMarker(point1, {draggable: true});
310
		GEvent.addListener(beck1, "dragend", function()
311
 		{beck1.openInfoWindowHtml("<div style=\"font-family: Verdana,Arial; font-size:12px; color: #000000;\"><b>Aktuelle Position (Breite / Länge)</b><br>"+beck1.getPoint().toString()+"</div>")});
312
		map.addOverlay(beck1);
313
      }
314
    }
315
    </script>
316
 
317
<?php } ?>
318
<script language="JavaScript">
319
<!--
320
function MM_swapImgRestore() { //v3.0
321
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
322
}
323
 
324
function MM_preloadImages() { //v3.0
325
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
326
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
327
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
328
}
329
 
330
function MM_swapImage() { //v3.0
331
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
332
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
333
}
334
 
335
function MM_findObj(n, d) { //v4.0
336
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
337
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
338
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
339
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
340
  if(!x && document.getElementById) x=document.getElementById(n); return x;
341
}
342
 
343
//-->
344
</script>
345
<meta name="description" content="Redaktionssystem">
346
<meta name="author" content="Webagentur Niewerth">
347
<meta name="robots" content="noindex">
348
</head>
349
<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');<?
350
    if ( $_GET["ID"] )
351
    {
352
        echo "initialize()";
353
    } ?>" <? if ( $_GET["ID"] )
354
    {
355
        echo 'onUnload="GUnload()"';
356
    } ?>  text="#000096">
357
<form method="post" action="<? echo $self ?>" name="formname" enctype="multipart/form-data">
358
  <table width="662" border="0" cellspacing="0" cellpadding="0">
359
    <tr valign="top">
360
      <td width="585">
361
        <!--  Auswahl Löschen START  -->
362
        <?
363
    if ( $action == "delete" )
364
    {
365
        $query = "SELECT * FROM $tab ";
366
        $query = $query . "order by $sort";
367
        $result = mysql_query( $query ) or die( mysql_errno() . ": " .
368
            mysql_error() );
369
        if ( mysql_num_rows($result) == 0 )
370
        {
371
?>
372
        <p class="error">Es sind keine Daten eingetragen !</p>
373
        <p></p>
374
        <?
375
        }
376
        else
377
        {
378
?>
379
        <table width="100%" border="1" cellspacing="0" cellpadding="3" bordercolorlight="#FFFFFF" bordercolordark="#999999">
380
          <tr bgcolor="#<? echo $webs["bgcolor_links"] ?>">
381
            <td  colspan="2"><font color="#<? echo $webs["font_color_links"] ?>"><b>
382
              Firma: L&ouml;schen </b></font></td>
383
          </tr>
384
          <?
385
            while ( $zeile = mysql_fetch_array($result) )
386
            {
387
?>
388
          <tr>
389
            <td width="96%"><a href="<? echo $self ?>?action=edit&ID=<? echo
390
                $zeile["ID"] ?>">
391
              <? echo $zeile["Name"] ?>
392
              <? if ( $zeile["gesperrt"] == "ja" )
393
                    ;
394
                {
395
?>
396
              <font color="#FF0000">
397
              <? } ?>
398
              <? echo $zeile["gesperrt"] ?>
399
              <? if ( $zeile["gesperrt"] == "ja" )
400
                    ;
401
                { ?>
402
              </font>
403
              <? } ?>
404
              </a></td>
405
            <td width="4%">
406
              <input type="checkbox" name="ID[]" value="<? echo $zeile["ID"] ?>">
407
            </td>
408
          </tr>
409
          <?
410
            }
411
?>
412
          <tr bgcolor="#<? echo $webs["bgcolor_links"] ?>">
413
            <td align="right" colspan="2">
414
              <input type="hidden" name="action" value='delete'>
415
              <input type="submit" value="LÖSCHEN">
416
              <input type="reset" name="Button22" value="Zur&uuml;cksetzen">
417
            </td>
418
          </tr>
419
        </table>
420
        <?
421
        }
422
?>
423
        <?
424
    }
425
?>
426
        <!--  Auswahl Löschen ENDE  -->
427
        <!--  Auswahl SELECT_EDIT START  -->
428
        <?
429
 
430
    if ( $action == "select_edit" )
431
    {
432
        $query = "SELECT * FROM $tab ";
433
        $query = $query . "order by $sort";
434
 
435
        $result = mysql_query( $query ) or die( mysql_errno() . ": " .
436
            mysql_error() );
437
        $count = mysql_num_rows( $result );
438
        if ( mysql_num_rows($result) == 0 )
439
        {
440
?>
441
        <p class="error">Es sind keine Daten eingetragen !</p>
442
        <p></p>
443
        <?
444
        }
445
        else
446
        {
447
?>
448
        <table width="100%" border="1" cellspacing="0" cellpadding="3" bordercolorlight="#FFFFFF" bordercolordark="#999999">
449
          <tr bgcolor="#<? echo $webs["bgcolor_links"] ?>">
450
            <td  colspan="3"><font color="#<? echo $webs["font_color_links"] ?>"><b>
451
              </b></font>
452
              <table width="100%" border="0" cellspacing="0" cellpadding="0">
453
                <tr>
454
                  <td width="77%"> <font color="#<? echo $webs["font_color_links"] ?>"><b>
455
                    Firma: Bearbeiten </b></font> </td>
456
                  <td width="23%"><font color="#<? echo $webs["font_color_links"] ?>"><b>
457
                    <? echo $count ?>
458
                    &nbsp;Eintr&auml;ge</b></font></td>
459
                </tr>
460
              </table>
461
            </td>
462
          </tr>
463
          <?
464
            while ( $zeile = mysql_fetch_array($result) )
465
            {
466
?>
467
          <tr>
468
            <td><a href="<? echo $self ?>?action=edit&ID=<? echo $zeile["ID"] ?>">
469
              <? echo $zeile["Name"] ?>
470
              - gesperrt:
471
              <? if ( $zeile["gesperrt"] == "ja" )
472
                { ?>
473
              <font color="#FF0000">
474
              <? } ?>
475
              <? echo $zeile["gesperrt"] ?>
476
              <? if ( $zeile["gesperrt"] == "ja" )
477
                { ?>
478
              </font>
479
              <? } ?>
480
              </a> </td>
481
              <td>
482
                <?= $zeile["auswahl1"]; ?>
483
              </td>
484
              <td>
485
                <a href="../news/news.php?action=select_edit&firma=<?= $zeile["ID"] ?>">zu den News dieser Firma</a>
486
              </td>
487
          </tr>
488
          <?
489
            }
490
?>
491
          <tr bgcolor="#<? echo $webs["bgcolor_links"] ?>">
492
            <td colspan="3">
493
              <div align="right">&nbsp;
494
                <input type="hidden" name="action" value='edit'>
495
              </div>
496
            </td>
497
          </tr>
498
        </table>
499
        <?
500
        }
501
?>
502
        <?
503
    }
504
?>
505
        <!--  Auswahl SELECT_EDIT ENDE  -->
506
        <?
507
    if ( $action == "edit" )
508
    {
509
?>
510
<script type="text/javascript" language="javascript">
511
    function display_fragen(elem)
512
    {
513
        if(elem.value=="Gründer")
514
        {
515
            for (i=1; i <=20; i++)
516
            {
517
                ind=i;
518
                if(ind < 10)
519
                {
520
                    ind="0"+ind;
521
                }
522
                document.getElementById('antwort'+ind).style.display="block";
523
            }
524
        }
525
        else
526
        {
527
            for (i=1; i <=20; i++)
528
            {
529
                ind=i;
530
                if(ind < 10)
531
                {
532
                    ind="0"+ind;
533
                }
534
                document.getElementById('antwort'+ind).style.display="none";
535
            }
536
        }
537
    }
538
</script>
539
<?
540
        if ( $ID )
541
        {
542
            $result = mysql_query( "SELECT * FROM $tab where ID = '$ID'" ) or
543
                die( mysql_errno() . ": " . mysql_error() );
544
            $zeile = mysql_fetch_array( $result );
545
            $Father = $zeile["Father"];
546
        }
547
        $zeile["von"] = join( ".", array_reverse(preg_split("/-/", $zeile["von"])) );
548
        $zeile["bis"] = join( ".", array_reverse(preg_split("/-/", $zeile["bis"])) );
549
        $zeile["Abmeldedatum"] = join( ".", array_reverse(preg_split("/-/",
550
            $zeile["Abmeldedatum"])) );
551
?>
552
        <table width="100%" border="1" cellspacing="0" cellpadding="0" bordercolorlight="#FFFFFF" bordercolordark="#999999">
553
          <tr>
554
            <td colspan="2" bgcolor="#<? echo $webs["bgcolor_links"] ?>">
555
              <table width="100%" border="0" cellspacing="0" cellpadding="3">
556
                <tr>
557
                  <td><font color="#<? echo $webs["font_color_links"] ?>"><b>Firma:
558
                    L&ouml;schen
559
                    <? if ( $ID )
560
        { ?>
561
                    Bearbeiten
562
                    <? }
563
        else
564
        { ?>
565
                    Neueintrag
566
                    <? } ?>
567
                    </b></font> </td>
568
                  <td align="right"><font color="#<? echo $webs["font_color_links"] ?>"><b>Rang:
569
                    <input type="text" name="Rang" value="<? echo $zeile["Rang"] ?>" size="3">
570
                    </b></font> </td>
571
                </tr>
572
              </table>
573
            </td>
574
          </tr>
575
          <?
576
        $Feld = "Branche";
577
        if ( isset($user_rechte[modul_name][tool_name][$Feld]) )
578
        {
579
            if ( $ID )
580
            {
581
?>
582
          <tr>
583
            <td bgcolor="#<? echo $webs["bgcolor_links"] ?>"  valign="top" width="13%" height="150">
584
              <table width="100%" border="0" cellspacing="0" cellpadding="3">
585
                <tr>
586
                  <td><font color="#<? echo $webs["font_color_links"] ?>"><b>
587
                    <? echo isset( $web_rechte[modul_name][tool_name][$Feld] ) ?
588
                $web_rechte[modul_name][tool_name][$Feld] : "Branche:"; ?>
589
                    </b></font></td>
590
                </tr>
591
              </table>
592
            </td>
593
            <td bgcolor="<?= $webs["bgcolor_rechts"]; ?>" valign="middle" align="center"> <iFrame height=100% width=100% frameborder="NO" marginwidth="0" marginheight="0" src="Branche2Firma.php?Firma=<? echo
594
                $ID ?>"></iFrame>
595
            </td>
596
          </tr>
597
          <?
598
            }
599
        }
600
        $Feld = "Name";
601
        if ( isset($user_rechte[modul_name][tool_name][$Feld]) )
602
        {
603
?>
604
          <tr>
605
            <td bgcolor="#<? echo $webs["bgcolor_links"] ?>"  valign="middle" width="13%">
606
              <table width="100%" border="0" cellspacing="0" cellpadding="3">
607
                <tr>
608
                  <td><font color="#<? echo $webs["font_color_links"] ?>"><b>
609
                    <? echo isset( $web_rechte[modul_name][tool_name][$Feld] ) ?
610
            $web_rechte[modul_name][tool_name][$Feld] : "Name:"; ?>
611
                    </b></font></td>
612
                </tr>
613
              </table>
614
            </td>
615
            <td bgcolor="<?= $webs["bgcolor_rechts"]; ?>">
616
              <table width="100%" border="0" cellspacing="0" cellpadding="3">
617
                <tr>
618
                  <td>
619
                    <input type="text" name="Name" value="<? echo $zeile["Name"] ?>" class="input">
620
                  </td>
621
                </tr>
622
              </table>
623
            </td>
624
          </tr>
625
          <?
626
        }
627
 
628
        // SEBASTIAN
629
 
630
        $Feld = "optionen";
631
        if ( isset($user_rechte[modul_name][tool_name][$Feld]) )
632
        {
633
            if ( $ID )
634
            {
635
?>
636
	<tr>
637
		    <td bgcolor="#<? echo $webs["bgcolor_links"] ?>" width="21%" valign="top" height="100"><font color="#<? echo
638
                $webs["font_color_links"] ?>"><b>
639
              <?
640
                if ( $web_rechte[modul_name][tool_name][$Feld] )
641
                {
642
                    echo $web_rechte[modul_name][tool_name][$Feld];
643
                }
644
                else
645
                {
646
?>
647
              Optionen
648
              <?
649
                }
650
?>
651
              </b></font> </td>
652
		    <td colspan="2" bgcolor="#<? echo $webs["bgcolor_rechts"] ?>"><iFrame height=100% width=100% frameborder="NO" marginwidth="0" marginheight="0" src="../Online-Shop/options.php?ID=<? echo
653
                $ID ?>&modul=Branchenbuch"></iFrame></td>
654
	</tr>
655
<?
656
            }
657
        }
658
 
659
 
660
        $Feld = "Rufname";
661
        if ( isset($user_rechte[modul_name][tool_name][$Feld]) )
662
        {
663
?>
664
          <tr>
665
            <td bgcolor="#<? echo $webs["bgcolor_links"] ?>"  valign="middle" width="13%">
666
              <table width="100%" border="0" cellspacing="0" cellpadding="3">
667
                <tr>
668
                  <td><font color="#<? echo $webs["font_color_links"] ?>"><b>
669
                    <? echo isset( $web_rechte[modul_name][tool_name][$Feld] ) ?
670
            $web_rechte[modul_name][tool_name][$Feld] : "Rufname:"; ?>
671
                    </b></font></td>
672
                </tr>
673
              </table>
674
            </td>
675
            <td bgcolor="<?= $webs["bgcolor_rechts"]; ?>">
676
              <table width="100%" border="0" cellspacing="0" cellpadding="3">
677
                <tr>
678
                  <td>
679
                    <input type="text" name="Rufname" value="<? echo $zeile["Rufname"] ?>" class="input">
680
                  </td>
681
                </tr>
682
              </table>
683
            </td>
684
          </tr>
685
          <?
686
        }
687
        $Feld = "Adresse";
688
        if ( isset($user_rechte[modul_name][tool_name][$Feld]) )
689
        {
690
?>
691
          <tr>
692
            <td  valign="top" bgcolor="#<? echo $webs["bgcolor_links"] ?>">
693
              <table width="100%" border="0" cellspacing="0" cellpadding="3">
694
                <tr>
695
                  <td><font color="#<? echo $webs["font_color_links"] ?>"><b>
696
                    <? echo isset( $web_rechte[modul_name][tool_name][$Feld] ) ?
697
            $web_rechte[modul_name][tool_name][$Feld] : "Adresse:"; ?>
698
                    </b></font></td>
699
                </tr>
700
              </table>
701
            </td>
702
            <td valign="top" bgcolor="<?= $webs["bgcolor_rechts"]; ?>">
703
              <table border="0" cellspacing="0" cellpadding="0" width="100%">
704
                <tr>
705
                  <td>
706
                    <table border="0" cellspacing="0" cellpadding="3">
707
                      <tr>
708
                        <td colspan="2"><font color="#<? echo $webs["font_color_rechts"] ?>">Strasse
709
                          / Nr.</font></td>
710
                      </tr>
711
                      <tr>
712
                        <td>
713
                          <input type="text" name="Strasse" class="input" value="<? echo
714
            $zeile["Strasse"] ?>">
715
                        </td>
716
                        <td>
717
                          <input type="text" name="Hausnummer" size="3" class="input_small" value="<? echo
718
                $zeile["Hausnummer"] ?>">
719
                        </td>
720
                      </tr>
721
                    </table>
722
                  </td>
723
                  <td rowspan="2" valign="top"  bgcolor="#<? echo $webs["bgcolor_links"] ?>" nowrap>
724
                    <font color="#<? echo $webs["font_color_links"] ?>"><b>&nbsp;Telefon
725
                    / Fax:&nbsp;</b></font></td>
726
                  <td>
727
                    <table border="0" cellspacing="0" cellpadding="3">
728
                      <tr>
729
                        <td ><font color="#<? echo $webs["font_color_rechts"] ?>">Telefon:</font></td>
730
                      </tr>
731
                      <tr>
732
                        <td>
733
                          <input type="text" name="Telefon" class="input" value="<? echo
734
                $zeile["Telefon"] ?>">
735
                        </td>
736
                      </tr>
737
                    </table>
738
                  </td>
739
                </tr>
740
                <tr>
741
                  <td>
742
                    <table border="0" cellspacing="0" cellpadding="3">
743
                      <tr>
744
                        <td  colspan="2"><font color="#<? echo $webs["font_color_rechts"] ?>">PLZ
745
                          / Ort:</font></td>
746
                      </tr>
747
                      <tr>
748
                        <td>
749
                          <input type="text" name="PLZ" size="5" class="input_small" value="<? echo
750
                $zeile["PLZ"] ?>">
751
                        </td>
752
                        <td>
753
                          <input type="text" name="Ort" class="input" value="<? echo
754
                $zeile["Ort"] ?>">
755
                        </td>
756
                      </tr>
757
                    </table>
758
                  </td>
759
                  <td>
760
                    <table border="0" cellspacing="0" cellpadding="3">
761
                      <tr>
762
                        <td ><font color="#<? echo $webs["font_color_rechts"] ?>">Telefax:</font></td>
763
                      </tr>
764
                      <tr>
765
                        <td>
766
                          <input type="text" name="Telefax" class="input" value="<? echo
767
                $zeile["Telefax"] ?>">
768
                        </td>
769
                      </tr>
770
                    </table>
771
                  </td>
772
                </tr>
773
              </table>
774
            </td>
775
          </tr>
776
          <?
777
        }
778
        $Feld = "Bundesland";
779
        if ( isset($user_rechte[modul_name][tool_name][$Feld]) )
780
        {
781
?>
782
          <tr>
783
            <td bgcolor="#<? echo $webs["bgcolor_links"] ?>"  valign="middle" width="13%">
784
              <table width="100%" border="0" cellspacing="0" cellpadding="3">
785
                <tr>
786
                  <td><font color="#<? echo $webs["font_color_links"] ?>"><b>
787
             <?
788
            if ( $web_rechte[modul_name][tool_name][$Feld] )
789
            {
790
                echo $web_rechte[modul_name][tool_name][$Feld];
791
            }
792
            else
793
            {
794
?>
795
              Bundesland:
796
              <?
797
            }
798
?>
799
                    </b></font></td>
800
                </tr>
801
              </table>
802
            </td>
803
            <td bgcolor="<?= $webs["bgcolor_rechts"]; ?>"><table width="100%" border="0" cellspacing="0" cellpadding="3"><tr><td><table width="100%" border="0" cellspacing="0" cellpadding="3">
804
              <tr>
805
                <td><select name="Bundesland" size="1" id="Bundesland">
806
                  <option <? if ( $zeile["Bundesland"] == "1" )
807
            { ?>selected <? } ?>value="1">Baden-W&uuml;rttemberg</option>
808
                  <option <? if ( $zeile["Bundesland"] == "2" )
809
            { ?>selected <? } ?>value="2">Bayern</option>
810
                  <option <? if ( $zeile["Bundesland"] == "3" )
811
            { ?>selected <? } ?>value="3">Berlin</option>
812
                  <option <? if ( $zeile["Bundesland"] == "4" )
813
            { ?>selected <? } ?>value="4">Brandenburg</option>
814
                  <option <? if ( $zeile["Bundesland"] == "5" )
815
            { ?>selected <? } ?>value="5">Bremen</option>
816
                  <option <? if ( $zeile["Bundesland"] == "6" )
817
            { ?>selected <? } ?>value="6">Hamburg</option>
818
                  <option <? if ( $zeile["Bundesland"] == "7" )
819
            { ?>selected <? } ?>value="7">Hessen</option>
820
                  <option <? if ( $zeile["Bundesland"] == "8" )
821
            { ?>selected <? } ?>value="8">Mecklenburg-Vorpommern</option>
822
                  <option <? if ( $zeile["Bundesland"] == "9" )
823
            { ?>selected <? } ?>value="9">Niedersachsen</option>
824
                  <option <? if ( $zeile["Bundesland"] == "10" )
825
            { ?>selected <? } ?>value="10">Nordrhein-Westfalen</option>
826
                  <option <? if ( $zeile["Bundesland"] == "11" )
827
            { ?>selected <? } ?>value="11">Rheinland-Pfalz</option>
828
                  <option <? if ( $zeile["Bundesland"] == "12" )
829
            { ?>selected <? } ?>value="12">Saarland</option>
830
                  <option <? if ( $zeile["Bundesland"] == "13" )
831
            { ?>selected <? } ?>value="13">Sachsen</option>
832
                  <option <? if ( $zeile["Bundesland"] == "14" )
833
            { ?>selected <? } ?>value="14">Sachsen-Anhalt</option>
834
                  <option <? if ( $zeile["Bundesland"] == "1" )
835
            { ?>selected <? } ?>value="15">Schleswig-Holstein</option>
836
                  <option <? if ( $zeile["Bundesland"] == "1" )
837
            { ?>selected <? } ?>value="16">Th&uuml;ingen</option>
838
                                  </select>                </td>
839
              </tr>
840
            </table></td>
841
                </tr>
842
            </table>
843
            </td>
844
          </tr>
845
          <?
846
        }
847
        $Feld = "google_maps";
848
        if ( isset($user_rechte[modul_name][tool_name][$Feld]) && $_GET["ID"] )
849
        {
850
            $result = mysql_query( "SELECT * FROM $tab where ID = '$ID'" ) or
851
                die( mysql_errno() . ": " . mysql_error() );
852
            $zeile = mysql_fetch_array( $result );
853
?>
854
          <tr>
855
            <td bgcolor="#<? echo $webs["bgcolor_links"] ?>"  valign="top" width="13%">
856
            <font color="#<? echo $webs["font_color_links"] ?>"><b>GoogleMap-Koordinaten</b></font></td>
857
            <td bgcolor="<?= $webs["bgcolor_rechts"]; ?>"><font color="#<? echo
858
            $webs["font_color_rechts"] ?>">"dragen" Sie bitte den Marker an die gew&uuml;nschte Position und tragen Sie die angegeben Koordinaten unten ein.</font><p><div id="map_canvas" style="width: 600px; height: 300px"></div></p>
859
              <p>
860
                <input type="text" name="Koord1" value="<? echo $zeile["Koord1"] ?>" size="25">
861
                ,&nbsp;
862
                <input type="text" name="Koord2" value="<? echo $zeile["Koord2"] ?>" size="25">
863
              </p></td>
864
          </tr>
865
          <?
866
        }
867
        $Feld = "Internet";
868
        if ( isset($user_rechte[modul_name][tool_name][$Feld]) )
869
        {
870
?>
871
          <tr>
872
            <td bgcolor="#<? echo $webs["bgcolor_links"] ?>"  valign="top" width="13%">
873
              <table width="100%" border="0" cellspacing="0" cellpadding="3">
874
                <tr>
875
                  <td><font color="#<? echo $webs["font_color_links"] ?>"><b>
876
                    <? echo isset( $web_rechte[modul_name][tool_name][$Feld] ) ?
877
            $web_rechte[modul_name][tool_name][$Feld] : "Internet:"; ?>
878
                    </b></font></td>
879
                </tr>
880
              </table>
881
            </td>
882
            <td bgcolor="<?= $webs["bgcolor_rechts"]; ?>">
883
              <table border="0" cellspacing="0" cellpadding="3">
884
                <tr>
885
                  <td><font color="#<? echo $webs["font_color_rechts"] ?>">E-Mail:</font></td>
886
                  <td align="right"><a href="mailto:<?= ereg_replace( "mailto:",
887
            "", $zeile["email"] ); ?>"><img src="../images/Online-Shop/brief.gif" width="17" height="10" border="0"></a></td>
888
                  <td><font color="#<? echo $webs["font_color_rechts"] ?>">Homepage
889
                    (bitte mit http://):</font></td>
890
                </tr>
891
                <tr>
892
                  <td colspan="2">
893
                    <input type="text" name="email" class="input" value="<? echo
894
            $zeile["email"] ?>">
895
                  </td>
896
                  <td>
897
                    <input type="text" name="homepage" class="input" value="<? echo
898
                $zeile["homepage"] ?>">
899
                  </td>
900
                </tr>
901
              </table>
902
            </td>
903
          </tr>
904
          <?
905
        }
906
        $Feld = "Passwort";
907
        if ( isset($user_rechte[modul_name][tool_name][$Feld]) )
908
        {
909
?>
910
          <tr>
911
            <td bgcolor="#<? echo $webs["bgcolor_links"] ?>"  valign="middle" width="13%">
912
              <table width="100%" border="0" cellspacing="0" cellpadding="3">
913
                <tr>
914
                  <td><font color="#<? echo $webs["font_color_links"] ?>"><b>
915
                    Passwort:
916
                    </b></font></td>
917
                </tr>
918
              </table>
919
            </td>
920
            <td bgcolor="<?= $webs["bgcolor_rechts"]; ?>">
921
              <table width="100%" border="0" cellspacing="0" cellpadding="3">
922
                <tr>
923
                  <td>
924
                    <input type="text" name="Passwort" value="" class="input">
925
                  </td>
926
                </tr>
927
              </table>
928
            </td>
929
          </tr>
930
          <?
931
        }
932
        $Feld = "AP_Daten";
933
        if ( isset($user_rechte[modul_name][tool_name][$Feld]) )
934
        {
935
?>
936
          <tr>
937
            <td  valign="top" bgcolor="#<? echo $webs["bgcolor_links"] ?>">
938
              <table width="100%" border="0" cellspacing="0" cellpadding="3">
939
                <tr>
940
                  <td><font color="#<? echo $webs["font_color_links"] ?>"><b>
941
                    <? echo isset( $web_rechte[modul_name][tool_name][$Feld] ) ?
942
            $web_rechte[modul_name][tool_name][$Feld] : "Ansprechpartner:"; ?>
943
                    </b></font></td>
944
                </tr>
945
              </table>
946
            </td>
947
            <td valign="top" bgcolor="<?= $webs["bgcolor_rechts"]; ?>">
948
<table border="0" cellspacing="0" cellpadding="3">
949
                      <tr>
950
                        <td><font color="#<? echo $webs["font_color_rechts"] ?>">Anrede
951
                          / Titel / Vorname / Name</font></td>
952
                      </tr>
953
                      <tr>
954
                        <td>
955
                          <select name="AP_Anrede">
956
                            <option <? if ( $zeile["AP_Anrede"] == "" )
957
            { ?>selected<? } ?>></option>
958
                            <option <? if ( $zeile["AP_Anrede"] == "Herr" )
959
            { ?>selected<? } ?>>Herr</option>
960
                            <option <? if ( $zeile["AP_Anrede"] == "Frau" )
961
            { ?>selected<? } ?>>Frau</option>
962
                          </select>
963
                          <input type="text" name="AP_Titel" size="5" class="input_small"  value="<?= $zeile["AP_Titel"]; ?>">
964
                          <input type="text" name="AP_Vorname" class="input" value="<?= $zeile["AP_Vorname"]; ?>">
965
                          <input type="text" name="AP_Nachname" class="input" value="<?= $zeile["AP_Nachname"]; ?>">
966
                        </td>
967
                      </tr>
968
                    </table>
969
                    <table border="0" cellspacing="0" cellpadding="3">
970
                      <tr>
971
                        <td><font color="#<? echo $webs["font_color_rechts"] ?>">E-Mail
972
                          Adresse:</font></td>
973
                      </tr>
974
                      <tr>
975
                        <td>
976
                          <input type="text" name="AP_eMail" class="input" value="<?= $zeile["AP_eMail"] ?>">
977
                        </td>
978
                      </tr>
979
                    </table>
980
 
981
			</td>
982
          </tr>
983
          <?
984
        }
985
        for ( $i = 1; $i < 3; $i++ )
986
        {
987
            $Feld = "bild" . $i;
988
            if ( isset($user_rechte[modul_name][tool_name][$Feld]) )
989
            {
990
?>
991
          <tr>
992
            <td bgcolor="#<? echo $webs["bgcolor_links"] ?>"  valign="top">
993
              <table width="100%" border="0" cellspacing="0" cellpadding="3">
994
                <tr>
995
                  <td><font color="#<? echo $webs["font_color_links"] ?>"><b>
996
                    <?
997
                $name = explode( ";", $web_rechte[modul_name][tool_name][$Feld] );
998
                echo isset( $web_rechte[modul_name][tool_name][$Feld] ) ? $name[0] :
999
                    "Logo:"; ?>
1000
                    </b></font></td>
1001
                </tr>
1002
              </table>
1003
            </td>
1004
            <td bgcolor="#<?= $webs["bgcolor_rechts"] ?>">
1005
              <table border="0" width="100%" cellspacing="0" cellpadding="0">
1006
                <tr>
1007
                  <td width="55%" nowrap><font color="#<? echo $webs["font_color_rechts"] ?>">
1008
                    <?
1009
                $image_name = $Feld;
1010
                $image_Path1 = "/images/Branchenbuch/$i/";
1011
                $image_Path = $webs["verzeichnis"] . $image_Path1;
1012
?>
1013
                    <input type="hidden" name="<? echo $image_name ?>_Pfad" value="<? echo
1014
                $image_Path ?>">
1015
                    <?
1016
                if ( $zeile[$image_name] != "" )
1017
                {
1018
?>
1019
                    <input type="radio" name="_<? echo $image_name ?>" value="0" checked>
1020
                    <a href="http://www.<? echo $site . $image_Path1 . $zeile[$image_name] ?>" target="blank">
1021
                    <? echo $zeile[$image_name]; ?>
1022
                    </a>
1023
                    <?
1024
                    $size = filesize( $image_Path . $zeile[$image_name] ) >>
1025
                        10;
1026
                    $imgsize = GetImageSize( $image_Path . $zeile[$image_name] );
1027
                    echo "&nbsp;( $size KB $imgsize[0]x$imgsize[1])<BR>";
1028
                }
1029
?>
1030
                    <input type="radio" name="_<? echo $image_name ?>" value="1" <? if ( $zeile[$image_name] ==
1031
                "" )
1032
                {
1033
                    echo "checked";
1034
                } ?>>
1035
                    kein Bild<br>
1036
                    <input type="radio" name="_<? echo $image_name ?>" value="2">
1037
                    <input type="File" name="<? echo $image_name ?>" size="17" maxlength="255" onFocus="this.form._<? echo
1038
                $image_name ?>[<? if ( $zeile[$image_name] != "" )
1039
                {
1040
                    echo "2";
1041
                }
1042
                else
1043
                {
1044
                    echo "1";
1045
                } ?>].checked=true;">
1046
                    </font> </td>
1047
                  <td width="45%" align="center">
1048
                    <? if ( $zeile[$image_name] != "" )
1049
                { ?>
1050
                    <a href="http://www.<? echo $site . $image_Path1 . $zeile[$image_name] ?>" target="blank"><img height="60" src="http://www.<? echo
1051
                    $site . $image_Path1 . $zeile[$image_name] ?>" border="0"></a>
1052
                    <? } ?>
1053
                  </td>
1054
                </tr>
1055
              </table>
1056
            </td>
1057
          </tr>
1058
          <?
1059
            }
1060
        }
1061
        $Feld = "logourl";
1062
        if ( isset($user_rechte[modul_name][tool_name][$Feld]) )
1063
        {
1064
?>
1065
          <tr>
1066
            <td bgcolor="#<? echo $webs["bgcolor_links"] ?>"  valign="top">
1067
              <table width="100%" border="0" cellspacing="0" cellpadding="3">
1068
                <tr>
1069
                  <td><font color="#<? echo $webs["font_color_links"] ?>"><b>
1070
                    <?
1071
            $name = explode( ";", $web_rechte[modul_name][tool_name][$Feld] );
1072
            echo isset( $web_rechte[modul_name][tool_name][$Feld] ) ? $name[0] :
1073
                "Logo:"; ?>
1074
                    </b></font></td>
1075
                </tr>
1076
              </table>
1077
            </td>
1078
            <td bgcolor="<?= $webs["bgcolor_rechts"]; ?>">
1079
              <table border="0" width="100%" cellspacing="0" cellpadding="0">
1080
                <tr>
1081
                  <td width="55%" nowrap><font color="#<? echo $webs["font_color_rechts"] ?>">
1082
                    <?
1083
            $image_name = "logourl";
1084
            $image_Path1 = "/images/Branchenbuch/Logos/1/";
1085
            $image_Path = $webs["verzeichnis"] . $image_Path1;
1086
?>
1087
                    <input type="hidden" name="<? echo $image_name ?>_Pfad" value="<? echo
1088
            $image_Path ?>">
1089
                    <?
1090
            if ( $zeile[$image_name] != "" )
1091
            {
1092
?>
1093
                    <input type="radio" name="_<? echo $image_name ?>" value="0" checked>
1094
                    <a href="http://www.<? echo $site . $image_Path1 . $zeile[$image_name] ?>" target="blank">
1095
                    <? echo $zeile[$image_name]; ?>
1096
                    </a>
1097
                    <?
1098
                $size = filesize( $image_Path . $zeile[$image_name] ) >> 10;
1099
                $imgsize = GetImageSize( $image_Path . $zeile[$image_name] );
1100
                echo "&nbsp;( $size KB $imgsize[0]x$imgsize[1])<BR>";
1101
            }
1102
?>
1103
                    <input type="radio" name="_<? echo $image_name ?>" value="1" <? if ( $zeile[$image_name] ==
1104
            "" )
1105
            {
1106
                echo "checked";
1107
            } ?>>
1108
                    kein Bild<br>
1109
                    <input type="radio" name="_<? echo $image_name ?>" value="2">
1110
                    <input type="File" name="<? echo $image_name ?>" size="17" maxlength="255" onFocus="this.form._<? echo
1111
            $image_name ?>[<? if ( $zeile[$image_name] != "" )
1112
            {
1113
                echo "2";
1114
            }
1115
            else
1116
            {
1117
                echo "1";
1118
            } ?>].checked=true;">
1119
                    </font> </td>
1120
                  <td width="45%" align="center">
1121
                    <? if ( $zeile[$image_name] != "" )
1122
            { ?>
1123
                    <a href="http://www.<? echo $site . $image_Path1 . $zeile[$image_name] ?>" target="blank"><img height="60" src="http://www.<? echo
1124
                $site . $image_Path1 . $zeile[$image_name] ?>" border="0"></a>
1125
                    <? } ?>
1126
                  </td>
1127
                </tr>
1128
              </table>
1129
            </td>
1130
          </tr>
1131
          <?
1132
        }
1133
        $Feld = "logourl2";
1134
        if ( isset($user_rechte[modul_name][tool_name][$Feld]) )
1135
        {
1136
?>
1137
          <tr>
1138
            <td bgcolor="#<? echo $webs["bgcolor_links"] ?>"  valign="top">
1139
              <table width="100%" border="0" cellspacing="0" cellpadding="3">
1140
                <tr>
1141
                  <td><font color="#<? echo $webs["font_color_links"] ?>"><b><?
1142
            $name = explode( ";", $web_rechte[modul_name][tool_name][$Feld] );
1143
            echo isset( $web_rechte[modul_name][tool_name][$Feld] ) ? $name[0] :
1144
                "Logo:"; ?>
1145
                    </b></font></td>
1146
                </tr>
1147
              </table>
1148
            </td>
1149
            <td bgcolor="<?= $webs["bgcolor_rechts"]; ?>">
1150
              <table border="0" width="100%" cellspacing="0" cellpadding="0">
1151
                <tr>
1152
                  <td width="55%" nowrap><font color="#<? echo $webs["font_color_rechts"] ?>">
1153
                    <?
1154
            $image_name = "logourl2";
1155
            $image_Path2 = "/images/Branchenbuch/Logos/2/";
1156
            $image_Path = $webs["verzeichnis"] . $image_Path2;
1157
?>
1158
                    <input type="hidden" name="<? echo $image_name ?>_Pfad" value="<? echo
1159
            $image_Path ?>">
1160
                    <?
1161
            if ( $zeile[$image_name] != "" )
1162
            {
1163
?>
1164
                    <input type="radio" name="_<? echo $image_name ?>" value="0" checked>
1165
                    <a href="http://www.<? echo $site . $image_Path1 . $zeile[$image_name] ?>" target="blank">
1166
                    <? echo $zeile[$image_name]; ?>
1167
                    </a>
1168
                    <?
1169
                $size = filesize( $image_Path . $zeile[$image_name] ) >> 10;
1170
                $imgsize = GetImageSize( $image_Path . $zeile[$image_name] );
1171
                echo "&nbsp;( $size KB $imgsize[0]x$imgsize[1])<BR>";
1172
            }
1173
?>
1174
                    <input type="radio" name="_<? echo $image_name ?>" value="1" <? if ( $zeile[$image_name] ==
1175
            "" )
1176
            {
1177
                echo "checked";
1178
            } ?>>
1179
                    kein Bild<br>
1180
                    <input type="radio" name="_<? echo $image_name ?>" value="2">
1181
                    <input type="File" name="<? echo $image_name ?>" size="17" maxlength="255" onFocus="this.form._<? echo
1182
            $image_name ?>[<? if ( $zeile[$image_name] != "" )
1183
            {
1184
                echo "2";
1185
            }
1186
            else
1187
            {
1188
                echo "1";
1189
            } ?>].checked=true;">
1190
                    </font> </td>
1191
                  <td width="45%" align="center">
1192
                    <? if ( $zeile[$image_name] != "" )
1193
            { ?>
1194
                    <a href="http://www.<? echo $site . $image_Path1 . $zeile[$image_name] ?>" target="blank"><img height="60" src="http://www.<? echo
1195
                $site . $image_Path1 . $zeile[$image_name] ?>" border="0"></a>
1196
                    <? } ?>
1197
                  </td>
1198
                </tr>
1199
              </table>
1200
            </td>
1201
          </tr>
1202
          <?
1203
        }
1204
        $Feld = "Daten";
1205
        if ( isset($user_rechte[modul_name][tool_name][$Feld]) )
1206
        {
1207
?>
1208
          <tr>
1209
            <td bgcolor="#<? echo $webs["bgcolor_links"] ?>"  valign="top" width="13%">
1210
              <table width="100%" border="0" cellspacing="0" cellpadding="3">
1211
                <tr>
1212
                  <td>&nbsp;</td>
1213
                </tr>
1214
              </table>
1215
            </td>
1216
            <td bgcolor="<?= $webs["bgcolor_rechts"]; ?>">
1217
              <table border="0" cellspacing="0" cellpadding="3">
1218
                <tr>
1219
                  <td><font color="#<? echo $webs["font_color_rechts"] ?>">Firmengr&uuml;ndung:</font></td>
1220
                  <td><font color="#<? echo $webs["font_color_rechts"] ?>">Besch&auml;ftigte:</font></td>
1221
                </tr>
1222
                <tr>
1223
                  <td>
1224
                    <input type="text" name="Gruendung" class="input" value="<? echo
1225
            $zeile["Gruendung"] ?>" onFocus="if (this.value=='') {this.value=now('19:00:00')};this.select();">
1226
                  </td>
1227
                  <td>
1228
                    <input type="text" name="Beschaeftigte" class="input" value="<? echo
1229
                $zeile["Beschaeftigte"] ?>">
1230
                  </td>
1231
                </tr>
1232
              </table>
1233
            </td>
1234
          </tr>
1235
          <?
1236
        }
1237
        $Feld = "Kontakt";
1238
        if ( isset($user_rechte[modul_name][tool_name][$Feld]) )
1239
        {
1240
?>
1241
          <tr>
1242
            <td bgcolor="#<? echo $webs["bgcolor_links"] ?>"  valign="top" width="13%">
1243
              <table width="100%" border="0" cellspacing="0" cellpadding="3">
1244
                <tr>
1245
                  <td><font color="#<? echo $webs["font_color_links"] ?>"><b>
1246
                    <? echo isset( $web_rechte[modul_name][tool_name][$Feld] ) ?
1247
            $web_rechte[modul_name][tool_name][$Feld] : "Kontakt:"; ?>
1248
                    </b></font></td>
1249
                </tr>
1250
              </table>
1251
            </td>
1252
            <td bgcolor="<?= $webs["bgcolor_rechts"]; ?>">
1253
              <table width="100%" border="0" cellspacing="0" cellpadding="3">
1254
                <tr>
1255
                  <td>
1256
                    <textarea name="Kontakt" wrap="OFF"><? echo $zeile["Kontakt"] ?></textarea>
1257
                  </td>
1258
                </tr>
1259
              </table>
1260
            </td>
1261
          </tr>
1262
          <?
1263
        }
1264
        $Feld = "Tätigkeitsbereich";
1265
        if ( isset($user_rechte[modul_name][tool_name][$Feld]) )
1266
        {
1267
?>
1268
          <tr>
1269
            <td bgcolor="#<? echo $webs["bgcolor_links"] ?>"  valign="top" width="13%">
1270
              <table width="100%" border="0" cellspacing="0" cellpadding="3">
1271
                <tr>
1272
                  <td><font color="#<? echo $webs["font_color_links"] ?>"><b>
1273
                    <? echo isset( $web_rechte[modul_name][tool_name][$Feld] ) ?
1274
            $web_rechte[modul_name][tool_name][$Feld] :
1275
                "T&auml;tigkeitsbereich:"; ?>
1276
                    </b></font></td>
1277
                </tr>
1278
              </table>
1279
            </td>
1280
            <td bgcolor="<?= $webs["bgcolor_rechts"]; ?>">
1281
              <table width="100%" border="0" cellspacing="0" cellpadding="3">
1282
                <tr>
1283
                  <td>
1284
                    <textarea name="Beschreibung" wrap="OFF"><? echo $zeile["Beschreibung"] ?></textarea>
1285
                  </td>
1286
                </tr>
1287
              </table>
1288
            </td>
1289
          </tr>
1290
          <?
1291
        }
1292
        $Feld = "Oeffnungszeiten";
1293
        if ( isset($user_rechte[modul_name][tool_name][$Feld]) )
1294
        {
1295
?>
1296
          <tr>
1297
            <td bgcolor="#<? echo $webs["bgcolor_links"] ?>"  valign="top" width="13%">
1298
              <table width="100%" border="0" cellspacing="0" cellpadding="3">
1299
                <tr>
1300
                  <td><font color="#<? echo $webs["font_color_links"] ?>"><b>
1301
                    <? echo isset( $web_rechte[modul_name][tool_name][$Feld] ) ?
1302
            $web_rechte[modul_name][tool_name][$Feld] : "Referenzen:"; ?>
1303
                    </b></font></td>
1304
                </tr>
1305
              </table>
1306
            </td>
1307
            <td bgcolor="<?= $webs["bgcolor_rechts"]; ?>">
1308
              <table width="100%" border="0" cellspacing="0" cellpadding="3">
1309
                <tr>
1310
                  <td>
1311
                    <textarea name="Oeffnungszeiten" wrap="PHYSICAL"><? echo
1312
            $zeile["Oeffnungszeiten"] ?></textarea>
1313
                  </td>
1314
                </tr>
1315
              </table>
1316
            </td>
1317
          </tr>
1318
          <?
1319
        }
1320
        $Feld = "premium";
1321
        if ( isset($user_rechte[modul_name][tool_name][$Feld]) )
1322
        {
1323
?>
1324
          <tr>
1325
            <td bgcolor="#<? echo $webs["bgcolor_links"] ?>"  valign="top" width="13%">
1326
              <table width="100%" border="0" cellspacing="0" cellpadding="3">
1327
                <tr>
1328
                  <td><font color="#<? echo $webs["font_color_links"] ?>"><b>
1329
                    <? echo isset( $web_rechte[modul_name][tool_name][$Feld] ) ?
1330
            $web_rechte[modul_name][tool_name][$Feld] : "Premiumeintrag:"; ?>
1331
                    </b></font></td>
1332
                </tr>
1333
              </table>
1334
            </td>
1335
            <td bgcolor="<?= $webs["bgcolor_rechts"]; ?>">
1336
              <table width="100%" border="0" cellspacing="0" cellpadding="3">
1337
                <tr>
1338
                  <td> von:
1339
				  		<input type="text" size="8" class="input_small" name="premium_von" value="<?= implode( ".",
1340
            array_reverse(explode("-", $zeile[premium_von])) ); ?>">
1341
	                   bis:
1342
                    	<input type="text" size="8" class="input_small" name="premium_bis" value="<?= implode( ".",
1343
            array_reverse(explode("-", $zeile[premium_bis])) ); ?>">
1344
                  </td>
1345
                </tr>
1346
              </table>
1347
            </td>
1348
          </tr>
1349
          <?
1350
        }
1351
 
1352
        for ( $i = 0; $i < 10; $i++ )
1353
        {
1354
            $Feld = "auswahl" . $i;
1355
            if ( isset($user_rechte[modul_name][tool_name][$Feld]) )
1356
            {
1357
                $elems = explode( ";", $web_rechte[modul_name][tool_name][$Feld] );
1358
                $auswahlName = array_shift( $elems );
1359
                $g_fragen = false;
1360
                if ( in_array("Gründer", $elems) )
1361
                {
1362
                    $g_fragen = true;
1363
                }
1364
?>
1365
          <tr>
1366
            <td bgcolor="#<? echo $webs["bgcolor_links"] ?>"  valign="top" width="13%">
1367
              <table width="100%" border="0" cellspacing="0" cellpadding="3">
1368
                <tr>
1369
                  <td><font color="#<? echo $webs["font_color_links"] ?>"><b>
1370
                    <?= $auswahlName; ?>
1371
                    </b></font></td>
1372
                </tr>
1373
              </table>
1374
            </td>
1375
            <td bgcolor="<?= $webs["bgcolor_rechts"]; ?>">
1376
              <table width="100%" border="0" cellspacing="0" cellpadding="3">
1377
                <tr>
1378
                  <td>
1379
                    <select name="<?= $Feld; ?>" <?
1380
                if ( $g_fragen )
1381
                {
1382
                    echo "onChange='display_fragen(this)';";
1383
                }
1384
?>>
1385
<?
1386
                foreach ( $elems as $elem )
1387
                {
1388
?>
1389
                      <option <? if ( $zeile[$Feld] == $elem )
1390
                    { ?>selected<? } ?> value="<?= $elem; ?>"><?= $elem; ?></option>
1391
<?
1392
                }
1393
?>
1394
                    </select>
1395
                  </td>
1396
                </tr>
1397
              </table>
1398
            </td>
1399
          </tr>
1400
          <?
1401
            }
1402
        }
1403
        if ( $g_fragen )
1404
        {
1405
            for ( $ind = 1; $ind <= 20; $ind++ )
1406
            {
1407
                $ind_str = $ind;
1408
                if ( $ind < 10 )
1409
                {
1410
                    $ind_str = "0" . $ind;
1411
                }
1412
?>
1413
                <tr id="antwort<?= $ind_str; ?>" style="display:<?= $zeile["auswahl1"] ==
1414
                "Gründer" ? "block" : "none" ?>;">
1415
                    <td bgcolor="#<?= $webs["bgcolor_links"]; ?>"><font color="#<? echo
1416
                $webs["font_color_links"] ?>">Antwort <?= $ind_str; ?>:</font></td>
1417
                    <td bgcolor="#<?= $webs["bgcolor_rechts"]; ?>">
1418
                        <textarea name="antwort<?= $ind_str; ?>"><?= $zeile["antwort$ind_str"]; ?></textarea>
1419
                    </td>
1420
                </tr>
1421
<?
1422
            }
1423
        }
1424
        $Feld = "sperre";
1425
        if ( isset($user_rechte[modul_name][tool_name][$Feld]) )
1426
        {
1427
?>
1428
          <tr>
1429
            <td bgcolor="#<? echo $webs["bgcolor_links"] ?>"  valign="top" width="13%">
1430
              <table width="100%" border="0" cellspacing="0" cellpadding="3">
1431
                <tr>
1432
                  <td><font color="#<? echo $webs["font_color_links"] ?>"><b>
1433
                    <? echo isset( $web_rechte[modul_name][tool_name][$Feld] ) ?
1434
            $web_rechte[modul_name][tool_name][$Feld] : "gesperrt:"; ?>
1435
                    </b></font></td>
1436
                </tr>
1437
              </table>
1438
            </td>
1439
            <td bgcolor="<?= $webs["bgcolor_rechts"]; ?>">
1440
              <table width="100%" border="0" cellspacing="0" cellpadding="3">
1441
                <tr>
1442
                  <td>
1443
                    <select name="gesperrt">
1444
                      <option <? if ( $zeile["gesperrt"] == "ja" )
1445
            { ?>selected<? } ?>>ja</option>
1446
                      <option <? if ( $zeile["gesperrt"] == "nein" )
1447
            { ?>selected<? } ?>>nein</option>
1448
                    </select>
1449
                  </td>
1450
                </tr>
1451
              </table>
1452
            </td>
1453
          </tr>
1454
          <?
1455
        }
1456
        if ( $ID )
1457
        {
1458
?>
1459
          <tr>
1460
            <td  width="20%" bgcolor="#<? echo $webs["bgcolor_links"] ?>"> <font color="#<? echo
1461
            $webs["font_color_links"] ?>"><b>&nbsp;erstellt
1462
              am:</b></font></td>
1463
            <? $erstellt_am = datetime2human( $zeile["erstellt_am"] ); ?>
1464
            <td bgcolor="<?= $webs["bgcolor_rechts"]; ?>">&nbsp;am:
1465
              <? echo $erstellt_am["Datum"] ?>
1466
              um:
1467
              <? echo $erstellt_am["Zeit"]
1468
?>
1469
              von:
1470
              <? echo $zeile["erstellt_von"]
1471
?>
1472
            </td>
1473
          </tr>
1474
          <tr>
1475
            <td  width="20%" bgcolor="#<? echo $webs["bgcolor_links"] ?>"><font color="#<? echo
1476
            $webs["font_color_links"] ?>"><b>&nbsp;letzte
1477
              &Auml;nderung:</b></font></td>
1478
            <? $letzte_Aenderung_am = datetime2human( $zeile["letzte_Aenderung_am"] ); ?>
1479
            <td bgcolor="<?= $webs["bgcolor_rechts"]; ?>">&nbsp;am:
1480
              <? echo $letzte_Aenderung_am["Datum"] ?>
1481
              um:
1482
              <? echo $letzte_Aenderung_am["Zeit"]
1483
?>
1484
              von:
1485
              <? echo $zeile["letzte_Aenderung_von"]
1486
?>
1487
            </td>
1488
          </tr>
1489
          <?
1490
        }
1491
?>
1492
          <tr bgcolor="#<? echo $webs["bgcolor_links"] ?>">
1493
            <td colspan="3">
1494
              <table width="100%" border="0" cellspacing="0" cellpadding="3">
1495
                <tr>
1496
                  <td align="right">
1497
                    <input type="hidden" name="ID" value="<? echo $ID ?>">
1498
                    <input type="hidden" name="action" value="update">
1499
                    <input type="submit" name="speichern" value="OK">
1500
                    <input type="reset" name="Button" value="Zur&uuml;cksetzen">
1501
                    <?
1502
        if ( $g_fragen && $zeile["gesperrt"] == "ja" && $zeile["auswahl1"]=="Gründer")
1503
        {
1504
?>
1505
                    <input type="submit" name="freischalten" value="Profil freischalten">
1506
                    <?
1507
        }
1508
?>
1509
                  </td>
1510
                </tr>
1511
              </table>
1512
            </td>
1513
          </tr>
1514
        </table>
1515
        <?
1516
    }
1517
?>
1518
      </td>
1519
      <td width="77" align="right">
1520
        <table width="67" border="1" cellspacing="0" cellpadding="0" bordercolorlight="#FFFFFF" bordercolordark="#999999">
1521
          <tr>
1522
            <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>
1523
          </tr>
1524
          <tr>
1525
            <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>
1526
          </tr>
1527
          <tr>
1528
            <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&ouml;schen"></a></td>
1529
          </tr>
1530
        </table>
1531
      </td>
1532
    </tr>
1533
  </table>
1534
</form>
1535
</body>