Subversion-Projekte lars-tiefland.content-management

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
1 lars 1
<?
2
    define("Range",100);
3
	$self=basename($PHP_SELF);
4
	$DB="Logins";
5
	define ("modul_name", "logins");
6
	define ("tool_name", "admin");
7
	require_once "../Online-Shop/connect2.php";
8
	unset($HTTP_POST_VARS[pwdcheck]);
9
 
10
	if ($_POST[action]=="import")
11
	{
12
		srand ((double)microtime()*1000000);
13
 
14
		$filename = "/web/apache/temp/".$site."_".rand()."_importliste.cvs";
15
 
16
		move_uploaded_file($_FILES['import_file']['tmp_name'],$filename);
17
		chmod ($filename, 0777);
18
 
19
		$queries=array();
20
		$queries[]="delete from $DB;";
21
		$queries[]="LOAD DATA INFILE \"".$filename."\" INTO TABLE $DB FIELDS TERMINATED BY ';' IGNORE 1 LINES (".$web_rechte[modul_name][tool_name][import_feldliste].");";
22
		$queries[]="update $DB set erstellt_von='$PHP_AUTH_USER', erstellt_am=NOW(), letzte_Aenderung_von='$PHP_AUTH_USER'";
23
		foreach($queries as $query)
24
		{
25
			mysql_query ($query) or die (mysql_errno().": ".mysql_error()."<hr>".$query."<hr>");
26
		}
27
 
28
		unlink($filename);
29
	}
30
 
31
	if ($action=="update")
32
	{
33
		if (!$ID)
34
		{	// insert Dummy-Entry
35
			$query = "insert into $DB (erstellt_am,erstellt_von) VALUES (NOW(),'$PHP_AUTH_USER')";
36
			$result = mysql_query ($query) or die (mysql_errno().": ".mysql_error()."<hr>".$query."<hr>");
37
			$ID=mysql_insert_id();
38
		}
39
 
40
		unset($HTTP_POST_VARS[action]);
41
		unset($HTTP_POST_VARS[ID]);
42
		if ($HTTP_POST_VARS[passwd])
43
		{
44
			$HTTP_POST_VARS[passwd]=crypt($HTTP_POST_VARS[passwd]);
45
		}
46
		else
47
		{
48
			unset($HTTP_POST_VARS[passwd]);
49
		}
50
 
51
		foreach(array_keys($HTTP_POST_VARS) as $elem)
52
		{
53
			if (in_array($elem,array("Datum1","Datum2","Eintrittsdatum","Austrittsdatum","Beitrag_bezahlt","Beitrag_letztes","Mitgliedskarte")))
54
			{
55
				$HTTP_POST_VARS[$elem] = human2date($HTTP_POST_VARS[$elem]);
56
			}
57
 
58
			if ($elem[0] == "_")
59
			{
60
				unset($HTTP_POST_VARS[$elem]);
61
				$button=$$elem;
62
				$elem=substr($elem,1);
63
				$Pfad=$HTTP_POST_VARS[$elem."_Pfad"];
64
				unset($HTTP_POST_VARS[$elem."_Pfad"]);
65
				$image=$$elem;
66
				$image_name=$elem."_name";
67
				$image_name=urlencode($$image_name);
68
				switch ($button)
69
				{
70
					case 0:
71
						break;
72
					case 1:
73
						$HTTP_POST_VARS[$elem]='';
74
	   					break;
75
	   				case 2:
76
						//$image_name=$ID."_".$image_name;
77
						$image_name=$ID.strrchr($image_name,".");
78
						$HTTP_POST_VARS[$elem]=$image_name;
79
						copy($image,$Pfad.$image_name);
80
				        break;
81
				    default:
82
				        break;
83
			    }
84
			}
85
		}
86
		$names=array();
87
		foreach(array_keys($HTTP_POST_VARS) as $elem)
88
		{
89
			array_push($names,"$elem='$HTTP_POST_VARS[$elem]'");
90
		}
91
		$query="update $DB set ".join($names,', ');
92
		$query=$query.", letzte_Aenderung_am=NOW(), letzte_Aenderung_von='$PHP_AUTH_USER' where ID = '$ID'";
93
		$result = mysql_query ($query) or die (mysql_errno().": ".mysql_error());
94
		header("Location: ".$self);
95
	}
96
		// Bilderupload
97
		foreach(array_keys($HTTP_POST_VARS) as $elem)
98
		{
99
			if ($elem[0] == "_")
100
			{
101
				unset($HTTP_POST_VARS[$elem]);
102
				$button=$$elem;
103
				$elem=substr($elem,1);
104
				$Pfad=$HTTP_POST_VARS[$elem."_Pfad"];
105
				unset($HTTP_POST_VARS[$elem."_Pfad"]);
106
				$image=$$elem;
107
				$image_name=$elem."_name";
108
				$image_name=urlencode($$image_name);
109
				switch ($button)
110
				{
111
					case 0:
112
						break;
113
					case 1:
114
						$HTTP_POST_VARS[$elem]='';
115
	   					break;
116
	   				case 2:
117
						$image_name=$ID."_".$language."_".$image_name;
118
						//$image_name=$ID.strrchr($image_name,".");
119
						$HTTP_POST_VARS[$elem]=$image_name;
120
 
121
 
122
						// $Imagenummer extrahieren
123
						$Imagenummer=explode("_",$elem); $Imagenummer=$Imagenummer[1];
124
						$DatenID = "bild".$Imagenummer;
125
 
126
						//$web_rechte[modul_name][tool_name][$DatenID] = "Bild:;500;500;180x180;180;180;120x120;120;120;80x120;80;120;30x30;30;30";
127
 
128
						$Imagedaten = array_chunk(explode(";", $web_rechte[modul_name][tool_name][$DatenID]),3);
129
						$Imagedaten[0][0] = "";
130
						/*
131
							Imagedaten möglich Werte:
132
								0: Titel des Feldes
133
								1: max. Breite für Bild1 (original)
134
								2: max. Höhe für Bild1 (original)
135
 
136
								3: Pfad für Bild
137
								4: max. Breite für Bild
138
								5: max. Höhe für Bild
139
 
140
								...
141
								...
142
								...
143
						*/
144
 
145
						// Höhe und Breite des Bildes bestimmen
146
						$imgsize = GetImageSize ($image);
147
						// $imgsize[0] $imgsize[1]
148
 
149
						foreach($Imagedaten as $ImagedatenSet)
150
						{
151
							if ($ImagedatenSet[0] != "") {$ImagedatenSet[0].="/";}
152
							// ---- Hier wird abgefragt ob das Bild verkleinert werden soll ---- //
153
							if (count($ImagedatenSet) == 3)
154
							{
155
								if (($imgsize[0] > $ImagedatenSet[1]) or ($imgsize[1] > $ImagedatenSet[2]))
156
								{
157
									$cmd="convert -scale ".$ImagedatenSet[1]."x".$ImagedatenSet[2]." ".$image." ".$Pfad.$ImagedatenSet[0].$image_name;
158
									pre($cmd);
159
									exec($cmd);
160
								}
161
								else
162
								{
163
									copy($image,$Pfad.$ImagedatenSet[0].$image_name);
164
								}
165
							}
166
							else
167
							{
168
								copy($image,$Pfad.$ImagedatenSet[0].$image_name);
169
							}
170
						}
171
				        break;
172
				    default:
173
				        break;
174
			    }
175
			}
176
	}
177
	/*if ($action=="export")
178
	{
179
	  	if (!$_REQUEST[auswahl])
180
	{
181
		header("Location: 1logins.php?action=export?msg=fehler");
182
		exit;
183
	}
184
 
185
header('Content-Type: text/x-csv');
186
header('Content-Disposition: attachment; filename="export.txt"');
187
header('Expires: 0');
188
 
189
	$self=basename($PHP_SELF);
190
	define ("modul_name", "logins");
191
	define ("tool_name", "admin");
192
	require_once "../Online-Shop/connect2.php";
193
 
194
 
195
	// Optimierung der Switchabfrage
196
	$trennzeichen = array(";", "|", "\t");
197
	$trenner = $trennzeichen[$_GET[trenner]];
198
 
199
	$quotes = array("'", "\"");
200
	$txt_kenn = $quotes[$_GET[txt_kenn]];
201
 
202
$auswahl1=join($auswahl, ", ");
203
$auswahl2=array_flip($auswahl);
204
$auswahl2=join($auswahl2, "$txt_kenn$trenner$txt_kenn");
205
$auswahl2=(urldecode($auswahl2));
206
 
207
$suchmuster = array
208
				(
209
					"/'/i",
210
					"/\"/i",
211
					"/;/i",
212
					"/\|/i",
213
					"/\t/i"
214
				);
215
 
216
$ersetzung = array
217
				(
218
					"",
219
					"",
220
					"",
221
					"",
222
					""
223
				);
224
 
225
 
226
echo ("$txt_kenn".$auswahl2."$txt_kenn");
227
echo "\n";
228
 
229
	if (!$sort) {$sort='Status,user';}
230
	$query="SELECT ".$auswahl1." FROM Logins ORDER BY $sort";
231
	$result = mysql_query ($query) or die (mysql_errno().": ".mysql_error()."<hr>$query");
232
	$count = mysql_num_rows($result);
233
 
234
	$query=$query;
235
	$result = mysql_query ($query) or die (mysql_errno().": ".mysql_error()."<hr>$query");
236
	while ($zeile=mysql_fetch_assoc($result))
237
	{
238
		$buffer=array();
239
		foreach( $zeile as $elem)
240
		{
241
			$buffer[] = preg_replace($suchmuster, $ersetzung, $elem);
242
		}
243
		echo "$txt_kenn".implode("$txt_kenn$trenner$txt_kenn",$buffer)."$txt_kenn$trenner";
244
		echo "\n";
245
	}
246
 
247
	}*/
248
	if ($action=="delete")
249
	{
250
		if ($ID)
251
		{
252
			$condition=array();
253
			$condition2=array();
254
			foreach ($ID as $elem)
255
			{
256
				array_push($condition," ID = '$elem'");
257
				array_push($condition2," Logins = '$elem'");
258
			}
259
			$cond=join(" or ",$condition);
260
			$cond2=join(" or ",$condition2);
261
 
262
			$query = "DELETE FROM $DB WHERE $cond";
263
			$result = mysql_query ("$query") or die (mysql_errno().": ".mysql_error());
264
 
265
			$query = "delete from Logins_to_Verteiler WHERE $cond2";
266
			$result = mysql_query ("$query");
267
 
268
			header("Location: ".$self);
269
		}
270
	}
271
	if (!$action)
272
	{
273
		$action="select_edit";
274
	}
275
	if (!$sort) {$sort='Status,user';}
276
	$range = 100;
277
?>
278
<html>
279
<head>
280
<title>Content-Management-System - Webagentur Niewerth</title>
281
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
282
<link rel=stylesheet type="text/css" href="../buttons.css">
283
<style>
284
body
285
{
286
	margin:3px;
287
	background-color:	#<?=$webs[bgcolor_seite];?>;
288
}
289
 
290
.links
291
{
292
	background-color:	#<?=$webs[bgcolor_links];?>;
293
	color:				#<?=$webs[font_color_links];?>;
294
	font-family:		Arial, Helvetica, sans-serif;
295
	font-weight:		bold;
296
	font-size: 			12px;
297
	vertical-align:		middle;
298
}
299
 
300
.rechts
301
{
302
	background-color:	#<?=$webs[bgcolor_rechts];?>;
303
	color:				#<?=$webs[font_color_rechts];?>;
304
	font-family:		Arial, Helvetica, sans-serif;
305
	font-size: 			12px
306
}
307
</style>
308
<script language="JavaScript">
309
<!--
310
 
311
function MM_swapImgRestore() { //v3.0
312
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
313
}
314
 
315
function MM_preloadImages() { //v3.0
316
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
317
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
318
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
319
}
320
 
321
function MM_swapImage() { //v3.0
322
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
323
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
324
}
325
 
326
function MM_findObj(n, d) { //v4.01
327
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
328
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
329
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
330
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
331
  if(!x && d.getElementById) x=d.getElementById(n); return x;
332
}
333
 
334
function killkomma(w)
335
{
336
 return w.replace(/,/,'.');
337
}
338
//-->
339
</script>
340
<meta name="description" content="Redaktionssystem">
341
<meta name="author" content="Webagentur Niewerth">
342
<meta name="robots" content="noindex">
343
</head>
344
 
345
<body leftmargin="20" topmargin="10" marginwidth="20" marginheight="10" onLoad="MM_preloadImages('../images/navigation/bt_neu_f2.gif','../images/navigation/bt_bearbeiten_f2.gif','../images/navigation/bt_delete_f2.gif')" bgcolor="#<? echo $webs[bgcolor_seite] ?>" text="#<? echo $webs[font_color_seite] ?>" alink="#<? echo $webs[font_color_seite] ?>" link="#<? echo $webs[font_color_rechts] ?>" vlink="#<? echo $webs[font_color_seite] ?>">
346
<? if ($action==export){?><form action="export1.php" method="get" name="test"><? } else{?><form method="post" action="#" name="formname" enctype="multipart/form-data"><? } ?>
347
  <table width="662" border="0" cellspacing="0" cellpadding="0">
348
    <tr valign="top">
349
      <td width="585">
350
<!-- EXPORT START -->
351
<?
352
	if ($action=="export")
353
	{
354
?>
355
          	<table width="100%" border="0" cellspacing="0" cellpadding="0">
356
                <tr bgcolor="#<? echo $webs[bgcolor_links] ?>">
357
                  <td height="25"><font color="#<? echo $webs[font_color_links] ?>"><b>Benutzer:
358
              exportieren</b></font></td>
359
                </tr>
360
              </table>
361
          <tr bgcolor="#<? echo $webs[bgcolor_rechts] ?>">
362
            <td height="27" style="color:#000000;">
363
<table>
364
		<tr class="links" valign="middle">
365
		<td>
366
		<?
367
		if($msg==fehler)
368
		{
369
 			$fehler="Bitte wählen Sie mindestens einen Datensatz aus";
370
		}
371
		echo $fehler ?>
372
		</td>
373
		</tr>
374
		<?
375
		$Feld="user";
376
		if (isset($user_rechte[modul_name][tool_name][$Feld]))
377
		{
378
		?>
379
    	<tr>
380
      		<td class="links">
381
			<?
382
			if ($web_rechte[modul_name][tool_name][$Feld])
383
			{
384
				$output = $web_rechte[modul_name][tool_name][$Feld];
385
			}
386
			else
387
			{
388
				$output = "Login:";
389
			}
390
				echo $output;
391
			?>
392
        	</td>
393
      		<td colspan="2" class="rechts">
394
			<INPUT TYPE=CHECKBOX NAME="auswahl[<?=urlencode($output);?>]" VALUE=user>
395
    	</tr>
396
    	<?
397
		}
398
		$Feld="userlevel";
399
		if (isset($user_rechte[modul_name][tool_name][$Feld]))
400
		{
401
		?>
402
    	<tr>
403
      		<td class="links">
404
			<?
405
			if ($web_rechte[modul_name][tool_name][$Feld])
406
			{
407
				$output = "Status:";
408
			}
409
			else
410
			{
411
				$output = "Status:";
412
			}
413
				echo $output;
414
			?>
415
        	</td>
416
      		<td colspan="2" class="rechts">
417
			<INPUT TYPE=CHECKBOX NAME="auswahl[<?=urlencode($output);?>]" VALUE=Status>
418
    	</tr>
419
    	<?
420
		}
421
		$Feld="Anrede";
422
		if (isset($user_rechte[modul_name][tool_name][$Feld]))
423
		{
424
		?>
425
    	<tr>
426
      		<td class="links">
427
			<?
428
			if ($web_rechte[modul_name][tool_name][$Feld])
429
			{
430
				$output = $web_rechte[modul_name][tool_name][$Feld];
431
			}
432
			else
433
			{
434
				$output = "Anrede:";
435
			}
436
				echo $output;
437
			?>
438
        	</td>
439
      		<td colspan="2" class="rechts">
440
			<INPUT TYPE=CHECKBOX NAME="auswahl[<?=urlencode($output);?>]" VALUE=Anrede>
441
    	</tr>
442
    	<?
443
		}
444
		?>
445
    	<?
446
		$Feld="Vorname";
447
		if (isset($user_rechte[modul_name][tool_name][$Feld]))
448
		{
449
		?>
450
    	<tr>
451
      		<td class="links">
452
			<?
453
			if ($web_rechte[modul_name][tool_name][$Feld])
454
			{
455
				$output = $web_rechte[modul_name][tool_name][$Feld];
456
			}
457
			else
458
			{
459
				$output = "Vorname:";
460
			}
461
				echo $output;
462
			?>
463
        	</td>
464
      		<td colspan="2" class="rechts">
465
			<INPUT TYPE=CHECKBOX NAME="auswahl[<?=urlencode($output);?>]" VALUE=Vorname>
466
      		</td>
467
    	</tr>
468
    	<?
469
		}
470
		?>
471
    	<?
472
		$Feld="Name1";
473
		if (isset($user_rechte[modul_name][tool_name][$Feld]))
474
		{
475
		?>
476
    	<tr>
477
      		<td class="links">
478
			<?
479
			if ($web_rechte[modul_name][tool_name][$Feld])
480
			{
481
				$output = $web_rechte[modul_name][tool_name][$Feld];
482
			}
483
			else
484
			{
485
				$output = "Name:";
486
			}
487
				echo $output;
488
			?>
489
        	</td>
490
      		<td colspan="2" class="rechts">
491
			<INPUT TYPE=CHECKBOX NAME="auswahl[<?=urlencode($output);?>]" VALUE=Name1>
492
      		</td>
493
    	</tr>
494
    	<?
495
		}
496
		?>
497
    	<?
498
		$Feld="Name2";
499
		if (isset($user_rechte[modul_name][tool_name][$Feld]))
500
		{
501
		?>
502
    	<tr>
503
      		<td class="links">
504
			<?
505
			if ($web_rechte[modul_name][tool_name][$Feld])
506
			{
507
				$output = $web_rechte[modul_name][tool_name][$Feld];
508
			}
509
			else
510
			{
511
				$output = "Firma:";
512
			}
513
				echo $output;
514
			?>
515
        	</td>
516
      		<td colspan="2" class="rechts">
517
			<INPUT TYPE=CHECKBOX NAME="auswahl[<?=urlencode($output);?>]" VALUE=Name2>
518
      		</td>
519
    	</tr>
520
    	<?
521
		}
522
		?>
523
    	<?
524
		$Feld="Datum1";
525
		if (isset($user_rechte[modul_name][tool_name][$Feld]))
526
		{
527
		?>
528
    	<tr>
529
      		<td class="links">
530
			<?
531
			if ($web_rechte[modul_name][tool_name][$Feld])
532
			{
533
				$output = $web_rechte[modul_name][tool_name][$Feld];
534
			}
535
			else
536
			{
537
				$output = "Geburtstag:";
538
			}
539
				echo $output;
540
			?>
541
        	</td>
542
      		<td colspan="2" class="rechts">
543
			<INPUT TYPE=CHECKBOX NAME="auswahl[<?=urlencode($output);?>]" VALUE=Datum1>
544
    	</tr>
545
    	<?
546
		}
547
		?>
548
    	<?
549
		$Feld="Strasse";
550
		if (isset($user_rechte[modul_name][tool_name][$Feld]))
551
		{
552
		?>
553
    	<tr>
554
      		<td class="links">
555
			<?
556
			if ($web_rechte[modul_name][tool_name][$Feld])
557
			{
558
				$output =$output = $web_rechte[modul_name][tool_name][$Feld];
559
			}
560
			else
561
			{
562
				$output = "Strasse:";
563
			}
564
				echo $output;
565
			?>
566
        	</td>
567
      		<td colspan="2" class="rechts">
568
			<INPUT TYPE=CHECKBOX NAME="auswahl[<?=urlencode($output);?>]" VALUE=Strasse>
569
      		</td>
570
    	</tr>
571
    	<?
572
		}
573
		?>
574
    	<?
575
		$Feld="Hausnummer";
576
		if (isset($user_rechte[modul_name][tool_name][$Feld]))
577
		{
578
		?>
579
    	<tr>
580
      		<td class="links">
581
			<?
582
			if ($web_rechte[modul_name][tool_name][$Feld])
583
			{
584
				$output = $web_rechte[modul_name][tool_name][$Feld];
585
			}
586
			else
587
			{
588
				$output = "Nr.:";
589
			}
590
				echo $output;
591
			?>
592
        	</td>
593
      		<td colspan="2" class="rechts">
594
			<INPUT TYPE=CHECKBOX NAME="auswahl[<?=urlencode($output);?>]" VALUE=Hausnummer>
595
      		</td>
596
    	</tr>
597
    	<?
598
		}
599
		?>
600
    	<?
601
		$Feld="PLZ";
602
		if (isset($user_rechte[modul_name][tool_name][$Feld]))
603
		{
604
		?>
605
    	<tr>
606
      		<td class="links">
607
			<?
608
			if ($web_rechte[modul_name][tool_name][$Feld])
609
			{
610
				$output = $web_rechte[modul_name][tool_name][$Feld];
611
			}
612
			else
613
			{
614
				$output = "Plz:";
615
			}
616
				echo $output;
617
			?>
618
        	</td>
619
      		<td colspan="2" class="rechts">
620
			<INPUT TYPE=CHECKBOX NAME="auswahl[<?=urlencode($output);?>]" VALUE=PLZ>
621
      		</td>
622
    	</tr>
623
    	<?
624
		}
625
		?>
626
		<?
627
		$Feld="Ort";
628
		if (isset($user_rechte[modul_name][tool_name][$Feld]))
629
		{
630
		?>
631
    	<tr>
632
      		<td class="links">
633
			<?
634
			if ($web_rechte[modul_name][tool_name][$Feld])
635
			{
636
			$output = $web_rechte[modul_name][tool_name][$Feld];
637
			}
638
			else
639
			{
640
				$output = "Ort:";
641
			}
642
				echo $output;
643
			?>
644
        	</td>
645
      		<td colspan="2" class="rechts">
646
			<INPUT TYPE=CHECKBOX NAME="auswahl[<?=urlencode($output);?>]" VALUE=Ort>
647
      		</td>
648
    	</tr>
649
    	<?
650
		}
651
		?>
652
		<?
653
		$Feld="Land";
654
		if (isset($user_rechte[modul_name][tool_name][$Feld]))
655
		{
656
		?>
657
    	<tr>
658
      		<td class="links">
659
			<?
660
			if ($web_rechte[modul_name][tool_name][$Feld])
661
			{
662
				$output = $web_rechte[modul_name][tool_name][$Feld];
663
			}
664
			else
665
			{
666
				$output = "Funktion:";
667
			}
668
				echo $output;
669
			?>
670
        	</td>
671
      		<td colspan="2" class="rechts">
672
			<INPUT TYPE=CHECKBOX NAME="auswahl[<?=urlencode($output);?>]" VALUE=Land>
673
      		</td>
674
    	</tr>
675
    	<?
676
		}
677
		?>
678
    	<?
679
		$Feld="Telefon";
680
		if (isset($user_rechte[modul_name][tool_name][$Feld]))
681
		{
682
		?>
683
    	<tr>
684
      		<td class="links">
685
        	<?
686
			if ($web_rechte[modul_name][tool_name][$Feld])
687
			{
688
				$felder = explode(";",$web_rechte[modul_name][tool_name][$Feld]);
689
			}
690
			else
691
			{
692
				$felder=array("Telefon:","privat","beruflich","Handy");
693
 			}
694
 				echo $felder[0];
695
 			?>
696
        	</td>
697
      		<td colspan="2" class="rechts">
698
			<input type=CHECKBOX name="auswahl[<?=urlencode($felder[0]." ".$felder[1]);?>]" value=Telefon> (<?=$felder[1];?>)
699
			<input type=CHECKBOX name="auswahl[<?=urlencode($felder[0]." ".$felder[2]);?>]" value=Telefon1> (<?=$felder[2];?>)
700
			<input type=CHECKBOX name="auswahl[<?=urlencode($felder[0]." ".$felder[3]);?>]" value=Telefon2> (<?=$felder[3];?>)
701
			</td>
702
    	</tr>
703
		<?
704
		}
705
		?>
706
		<?
707
		$Feld="FAX";
708
		if (isset($user_rechte[modul_name][tool_name][$Feld]))
709
		{
710
		?>
711
    	<tr>
712
      		<td class="links">
713
<?
714
	if ($web_rechte[modul_name][tool_name][$Feld])
715
	{
716
		$output = $web_rechte[modul_name][tool_name][$Feld];
717
	}
718
	else
719
	{
720
		$output = "Fax:";
721
	}
722
	echo $output;
723
?>
724
        	</td>
725
      		<td colspan="2" class="rechts">
726
			<INPUT TYPE=CHECKBOX NAME="auswahl[<?=urlencode($output);?>]" VALUE=FAX>
727
      		</td>
728
    	</tr>
729
    	<?
730
		}
731
		?>
732
    	<?
733
		$Feld="E_Mail";
734
		if (isset($user_rechte[modul_name][tool_name][$Feld]))
735
		{
736
		?>
737
    	<tr>
738
      		<td class="links">
739
<?
740
	if ($web_rechte[modul_name][tool_name][$Feld])
741
	{
742
		$output = $web_rechte[modul_name][tool_name][$Feld];
743
	}
744
	else
745
	{
746
		$output = "E-Mail:";
747
	}
748
	echo $output;
749
?>
750
        	</td>
751
      		<td colspan="2" class="rechts">
752
			<INPUT TYPE=CHECKBOX NAME="auswahl[<?=urlencode($output);?>]" VALUE=E_Mail>
753
      		</td>
754
    	</tr>
755
    	<?
756
		}
757
		?>
758
    	<?
759
		$Feld="URL";
760
		if (isset($user_rechte[modul_name][tool_name][$Feld]))
761
		{
762
		?>
763
    	<tr>
764
      		<td class="links">
765
			<?
766
			if ($web_rechte[modul_name][tool_name][$Feld])
767
			{
768
				$output = $web_rechte[modul_name][tool_name][$Feld];
769
			}
770
			else
771
			{
772
				$output = "Homepage:";
773
			}
774
				echo $output;
775
			?>
776
        	</td>
777
      		<td colspan="2" class="rechts">
778
			<INPUT TYPE=CHECKBOX NAME="auswahl[<?=urlencode($output);?>]" VALUE=URL>
779
			</td>
780
    	</tr>
781
    	<?
782
		}
783
		?>
784
    	<?
785
		$Feld="Eigenschaft_1";
786
		if (isset($user_rechte[modul_name][tool_name][$Feld]))
787
		{
788
		?>
789
    	<tr>
790
      		<td class="links">
791
			<?
792
			if ($web_rechte[modul_name][tool_name][$Feld])
793
			{
794
				$output = $web_rechte[modul_name][tool_name][$Feld];
795
			}
796
			else
797
			{
798
				$output = "Mitglied bei S04: ";
799
			}
800
				echo $output;
801
			?>
802
        	</td>
803
      		<td colspan="2" class="rechts">
804
			<INPUT TYPE=CHECKBOX NAME="auswahl[<?=urlencode($output);?>]" VALUE=Eigenschaft_1>
805
			</td>
806
    	</tr>
807
    	<?
808
		}
809
		?>
810
    	<?
811
		$Feld="Eigenschaft_2";
812
		if (isset($user_rechte[modul_name][tool_name][$Feld]))
813
		{
814
		?>
815
    	<tr>
816
      		<td class="links">
817
			<?
818
			if ($web_rechte[modul_name][tool_name][$Feld])
819
			{
820
				$output = $web_rechte[modul_name][tool_name][$Feld];
821
			}
822
			else
823
			{
824
				$output = "Dauerkarteninhaber";
825
			}
826
				echo $output;
827
			?>
828
        	</td>
829
      		<td colspan="2" class="rechts">
830
			<INPUT TYPE=CHECKBOX NAME="auswahl[<?=urlencode($output);?>]" VALUE=Eigenschaft_2>
831
			</td>
832
    	</tr>
833
    	<?
834
		}
835
		?>
836
    	<?
837
		$Feld="Eigenschaft_3";
838
		if (isset($user_rechte[modul_name][tool_name][$Feld]))
839
		{
840
		?>
841
    	<tr>
842
      		<td class="links">
843
			<?
844
			if ($web_rechte[modul_name][tool_name][$Feld])
845
			{
846
				$output = $web_rechte[modul_name][tool_name][$Feld];
847
			}
848
			else
849
			{
850
				$output = "Bausteinbesitzer: ";
851
			}
852
				echo $output;
853
			?>
854
        	</td>
855
      		<td colspan="2" class="rechts">
856
			<INPUT TYPE=CHECKBOX NAME="auswahl[<?=urlencode($output);?>]" VALUE=Eigenschaft_3>
857
			</td>
858
    	</tr>
859
    	<?
860
		}
861
		?>
862
    	<?
863
		$Feld="AP_Daten";
864
		if (isset($user_rechte[modul_name][tool_name][$Feld]))
865
		{
866
		?>
867
    	<tr>
868
      		<td class="links">
869
        	<?
870
			if ($web_rechte[modul_name][tool_name][$Feld])
871
			{
872
				echo $web_rechte[modul_name][tool_name][$Feld];
873
			}
874
			else
875
			{
876
			?>
877
        		Ansprechpartner:
878
        	<? } ?>
879
        	</td>
880
      		<td width="14%" class="rechts">
881
	    		Name:
882
	  		</td>
883
      		<td class="rechts">
884
			<INPUT TYPE=CHECKBOX NAME="auswahl[]" VALUE=AP_Name>
885
      		</td>
886
    	</tr>
887
    	<tr>
888
      		<td width="14%" height="36" class="rechts">
889
	    		Handy:
890
	  		</td>
891
      		<td height="36" class="rechts">
892
			<INPUT TYPE=CHECKBOX NAME="auswahl[]" VALUE=AP_Handy>
893
      		</td>
894
    	</tr>
895
    	<tr>
896
      		<td width="14%" class="rechts">
897
	    		Bemerkung:
898
	  		</td>
899
      		<td class="rechts">
900
			<INPUT TYPE=CHECKBOX NAME="auswahl[]" VALUE=AP_Bemerkung>
901
      		</td>
902
		</tr>
903
    	<?
904
		}
905
		?>
906
		<?
907
		$Feld="Vereinsdaten";
908
		if (isset($user_rechte[modul_name][tool_name][$Feld]))
909
		{
910
		?>
911
    	<tr>
912
      		<td class="links">
913
			<?
914
			if ($web_rechte[modul_name][tool_name][$Feld])
915
			{
916
				$output = $web_rechte[modul_name][tool_name][$Feld];
917
			}
918
			else
919
			{
920
				$output = "Eintrittsdatum:";
921
			}
922
				echo $output;
923
			?>
924
        	</td>
925
      		<td colspan="2" class="rechts">
926
			<INPUT TYPE=CHECKBOX NAME="auswahl[<?=urlencode($output);?>]" VALUE=Eintrittsdatum>
927
			</td>
928
		</tr>
929
		<tr>
930
      		<td class="links">
931
			<?
932
			if ($web_rechte[modul_name][tool_name][$Feld])
933
			{
934
				$output = $web_rechte[modul_name][tool_name][$Feld];
935
			}
936
			else
937
			{
938
				$output = "Austrittsdatum:";
939
			}
940
				echo $output;
941
			?>
942
        	</td>
943
      		<td colspan="2" class="rechts">
944
			<INPUT TYPE=CHECKBOX NAME="auswahl[<?=urlencode($output);?>]" VALUE=Austrittsdatum>
945
			</td>
946
		</tr>
947
		<tr>
948
      		<td class="links">
949
			<?
950
			if ($web_rechte[modul_name][tool_name][$Feld])
951
			{
952
				$output = $web_rechte[modul_name][tool_name][$Feld];
953
			}
954
			else
955
			{
956
				$output = "Beitrag bezahlt:";
957
			}
958
				echo $output;
959
			?>
960
        	</td>
961
      		<td colspan="2" class="rechts">
962
			<INPUT TYPE=CHECKBOX NAME="auswahl[<?=urlencode($output);?>]" VALUE=Beitrag_bezahlt>
963
						<?
964
			if ($web_rechte[modul_name][tool_name][$Feld])
965
			{
966
				$output = $web_rechte[modul_name][tool_name][$Feld];
967
			}
968
			else
969
			{
970
				$output = "in Euro:";
971
			}
972
				echo $output;
973
			?>
974
			<INPUT TYPE=CHECKBOX NAME="auswahl[<?=urlencode($output);?>]" VALUE=Beitrag_Wert>
975
			</td>
976
		</tr>
977
	    <tr>
978
      		<td class="links">
979
			<?
980
			if ($web_rechte[modul_name][tool_name][$Feld])
981
			{
982
				$output = $web_rechte[modul_name][tool_name][$Feld];
983
			}
984
			else
985
			{
986
				$output = "Beitrag letztes Jahr:";
987
			}
988
				echo $output;
989
			?>
990
        	</td>
991
      		<td colspan="2" class="rechts">
992
			<INPUT TYPE=CHECKBOX NAME="auswahl[<?=urlencode($output);?>]" VALUE=Beitrag_letztes>
993
			<?
994
			if ($web_rechte[modul_name][tool_name][$Feld])
995
			{
996
				$output = $web_rechte[modul_name][tool_name][$Feld];
997
			}
998
			else
999
			{
1000
				$output = "Euro - Betrag:";
1001
			}
1002
				echo $output;
1003
			?>
1004
			<INPUT TYPE=CHECKBOX NAME="auswahl[<?=urlencode($output);?>]" VALUE=Betrag_letzter_Wert>
1005
			</td>
1006
		</tr>
1007
        <tr>
1008
      		<td class="links">
1009
			<?
1010
			if ($web_rechte[modul_name][tool_name][$Feld])
1011
			{
1012
				$output = $web_rechte[modul_name][tool_name][$Feld];
1013
			}
1014
			else
1015
			{
1016
				$output = "Mitgliedskarte ausgegeben:";
1017
			}
1018
				echo $output;
1019
			?>
1020
        	</td>
1021
      		<td colspan="2" class="rechts">
1022
			<INPUT TYPE=CHECKBOX NAME="auswahl[<?=urlencode($output);?>]" VALUE=Mitgliedskarte>
1023
			</td>
1024
    	</tr>
1025
    	<?
1026
		}
1027
		?>
1028
    	<?
1029
		$Feld="bemerkung";
1030
		if (isset($user_rechte[modul_name][tool_name][$Feld]))
1031
		{
1032
		?>
1033
    	<tr>
1034
      		<td class="links">
1035
			<?
1036
			if ($web_rechte[modul_name][tool_name][$Feld])
1037
			{
1038
				$output = $web_rechte[modul_name][tool_name][$Feld];
1039
			}
1040
			else
1041
			{
1042
				$output = "Bemerkung:";
1043
			}
1044
				echo $output;
1045
			?>
1046
        	</td>
1047
      		<td colspan="2" class="rechts">
1048
			<INPUT TYPE=CHECKBOX NAME="auswahl[<?=urlencode($output);?>]" VALUE=bemerkung>
1049
			</td>
1050
    	</tr>
1051
    	<?
1052
		}
1053
		?>
1054
 		<tr>
1055
			<td class="links">
1056
		  		Trennerzeichen:
1057
			</td>
1058
			<td colspan="2" class="rechts">
1059
			<input type="radio" name="trenner" value="0">  ; (Semikolon)
1060
			<input type="radio" name="trenner" value="1">  | (Pipe)
1061
			<input name="trenner" type="radio" value="2" checked> \t (Tabstop)
1062
			</td>
1063
		</tr>
1064
		<tr>
1065
			<td class="links" rowspan="3">
1066
		  		Texterkennungszeichen:
1067
			</td>
1068
			<td class="rechts">
1069
			<input type="radio" name="txt_kenn" value="0">  ' (einfache Anführungszeichen)<br>
1070
			<input type="radio" name="txt_kenn" value="1" checked>  " (doppelte Anführungszeichen)<br>
1071
			</td>
1072
 
1073
 
1074
 
1075
</table>
1076
		<tr bgcolor="#<? echo $webs[bgcolor_links] ?>">
1077
            <td colspan="2" align="right">
1078
				<input type="submit" name="action" value="Abschicken">
1079
    			<input type="reset" name="action" value="Verwerfen">
1080
            </td>
1081
          </tr>
1082
</td></tr>
1083
<?
1084
}
1085
?>
1086
<!-- EXPORT ENDE -->
1087
<!--  IMPORT START -->
1088
<?
1089
	if ($action=="import")
1090
	{
1091
?>
1092
<table width="100%" border="1" cellspacing="0" cellpadding="3" bordercolorlight="#FFFFFF" bordercolordark="#999999">
1093
          <tr bgcolor="#<? echo $webs[bgcolor_links] ?>">
1094
            <td height="25"><font color="#<? echo $webs[font_color_links] ?>"><b>Benutzer:
1095
              importieren</b></font></td>
1096
          </tr>
1097
<?
1098
	if ($_POST[action]=="import")
1099
	{
1100
?>
1101
          <tr bgcolor="#<? echo $webs[bgcolor_rechts] ?>">
1102
            <td height="27"><font color="#<? echo $webs[font_color_rechts] ?>">
1103
              <?
1104
	switch($_FILES['import_file']['error'])
1105
	{
1106
		case UPLOAD_ERR_OK:
1107
			echo "Die Datei wurde erfolgreich hochgeladen.";
1108
			break;
1109
		case UPLOAD_ERR_INI_SIZE:
1110
			echo "Die hochgeladene Datei überschreitet die in der Anweisung upload_max_filesize in php.ini festgelegte Größe.";
1111
			break;
1112
		case UPLOAD_ERR_FORM_SIZE:
1113
			echo "Die hochgeladene Datei überschreitet die in dem HTML Formular mittels der Anweisung MAX_FILE_SIZE angegebene maximale Dateigröße.";
1114
			break;
1115
		case UPLOAD_ERR_PARTIAL:
1116
			echo "Die Datei wurde nur teilweise hochgeladen.";
1117
			break;
1118
		case UPLOAD_ERR_NO_FILE:
1119
			echo "Es wurde keine Datei hochgeladen.";
1120
			break;
1121
	}
1122
?></font></td>
1123
          </tr>
1124
<?
1125
	}
1126
?>
1127
          <tr bgcolor="#<? echo $webs[bgcolor_rechts] ?>">
1128
            <td align="center">
1129
              <input type="file" name="import_file">
1130
            </td>
1131
          </tr>
1132
          <tr bgcolor="#<? echo $webs[bgcolor_links] ?>">
1133
            <td align="right">
1134
              <input type="hidden" name="action" value='import'>
1135
              <input type="submit" name="import" value="    OK    ">
1136
            </td>
1137
          </tr>
1138
        </table>
1139
        <?
1140
 	}
1141
?>
1142
<!--  IMPORT ENDE  -->
1143
<!--  Auswahl Löschen START  -->
1144
<?
1145
	if ($action=="delete")
1146
	{
1147
		$query[]="SELECT * FROM $DB";
1148
		if ($suchname)
1149
		{
1150
			$search_query[]="Name1 like '%$suchname%'";
1151
		}
1152
		if ($select)
1153
		{
1154
			$search_query[]="status='$select'";
1155
		}
1156
		if ($search_query)
1157
		{
1158
			$query[]="where ".implode(" and ",$search_query);
1159
		}
1160
		$query[]="ORDER BY $sort";
1161
 
1162
		$query=implode(" ",$query);
1163
		$result = mysql_query ($query) or die (mysql_errno().": ".mysql_error()."<hr>$query");
1164
		$count = mysql_num_rows($result);
1165
		if ($count == 0)
1166
		{
1167
?>
1168
<p><b><font color="#<? echo $webs[font_color_seite] ?>">Es sind keine Daten eingetragen !</font></b></p>
1169
<?
1170
		}
1171
		else
1172
		{
1173
			if (!$start) {$start=0;}
1174
			$query=$query." limit $start, 100";
1175
?>
1176
        <table width="100%" border="1" cellspacing="0" cellpadding="3" bordercolorlight="#FFFFFF" bordercolordark="#999999">
1177
          <tr bgcolor="#<? echo $webs[bgcolor_links] ?>">
1178
            <td colspan="2" class="headline">
1179
              <table width="100%" border="0" cellspacing="0" cellpadding="0">
1180
                <tr>
1181
                  <td class="headline"><font color="#<? echo $webs[font_color_links] ?>"><b>Benutzer:
1182
                    L&ouml;schen</b></font> </td>
1183
                  <td class="headline" align="right"><font color="#<? echo $webs[font_color_links] ?>"><b>
1184
                    <? echo $count ?>&nbsp;Eintr&auml;ge</b></font></td>
1185
                </tr>
1186
              </table>
1187
<font color="#<? echo $webs[font_color_links] ?>">
1188
<? if (isset($user_rechte[modul_name][tool_name]["auswahl"])) { ?>
1189
<?
1190
	$Feld="userlevel";
1191
	if (isset($user_rechte[modul_name][tool_name][$Feld]))
1192
	{
1193
		?><hr noshade width="100%">Status:<?
1194
	if (!$web_rechte[modul_name][tool_name][$Feld]) {$web_rechte[modul_name][tool_name][$Feld]="1;2;3;4;5;6";}
1195
	$kats=explode(";",$web_rechte[modul_name][tool_name][$Feld]);
1196
?>
1197
                    <select name="select">
1198
                <?
1199
	foreach($kats as $elem)
1200
	{
1201
?>
1202
                <option <? if ($select == $elem) { ?>selected<? } ?>>
1203
                <? echo $elem ?>
1204
                </option>
1205
                <?
1206
	}
1207
?>
1208
              </select>
1209
                    <br><? } ?>
1210
                    Suche nach Name:
1211
                    <input name="suchname" type="text" id="suchname" value="<? echo $suchname ?>">
1212
  <input type="submit" name="Submit" value="Suchen"><? } ?><hr noshade width="100%"></font>
1213
<?
1214
	if ($count >= 100)
1215
	{
1216
?>
1217
			  <table width="100%" border="0" cellspacing="0" cellpadding="0">
1218
                <tr>
1219
                  <td width="10%" class="rechts">
1220
				  	<a href="<? echo $self?>?action=delete&sort=<? echo $sort ?>&start=<? if (($start) > 0) {echo $start-100;} else {echo "0";} ?>"><font color="#<? echo $webs[font_color_links] ?>">zurück</font></a>
1221
				  </td>
1222
                  <td width="85%" align="center" class="rechts">|
1223
<?
1224
		for ($a=0; $a < $count; $a+=100)
1225
		{
1226
?>
1227
<? if ($start == $a) {echo "<b>";} ?>
1228
<a href="<? echo $self?>?action=delete&sort=<? echo $sort ?>&start=<? echo $a ?>">
1229
<font color="#<? echo $webs[font_color_links] ?>">
1230
<? echo $a ?> - <? if ($count - $a > 99) { echo $a + 99; } else { echo $count; } ?><? if ($start == $a) {echo "</b>";} ?> |
1231
</font>
1232
</a>
1233
<?
1234
		}
1235
?>
1236
				  </td>
1237
                  <td width="10%" align="right" class="rechts">
1238
				  	<a href="<? echo $self?>?action=delete&sort=<? echo $sort ?>&start=<? if ($start+$range < $count) {echo $start+$range;} else {echo $start;} ?>"><font color="#<? echo $webs[font_color_links] ?>">weiter</font></a>
1239
				  </td>
1240
                </tr>
1241
              </table>
1242
<?
1243
	}
1244
?>
1245
            </td>
1246
          </tr>
1247
		  <tr>
1248
<td colspan="2">
1249
              <?
1250
				$format_string = "Name1;, ;PLZ; ;ORT; / ;E_Mail";
1251
				if ($web_rechte[modul_name][tool_name][delete_string])
1252
				{
1253
					$format_string = $web_rechte[modul_name][tool_name][edit_string];
1254
				}
1255
				foreach(explode(";",$format_string) as $elem)
1256
				{
1257
					if ($web_rechte[modul_name][tool_name][$elem])
1258
					{
1259
?><a href="<? echo $self?>?action=delete&sort=<? echo $elem ?>&start=<? echo $start ?>"><? echo preg_replace("/:/", "", $web_rechte[modul_name][tool_name][$elem]); ?></a><?
1260
					}
1261
					else
1262
					{
1263
						echo $elem;
1264
					}
1265
				}
1266
?>
1267
			</td>
1268
		  </tr>
1269
<?
1270
			$result = mysql_query ($query) or die (mysql_errno().": ".mysql_error()."<hr>$query");
1271
			while ($zeile=mysql_fetch_array($result))
1272
			{
1273
?>
1274
          <tr>
1275
            <td bgcolor="#<? echo $webs[bgcolor_rechts] ?>" width="100%"> <font color="<? echo $webs[font_color_rechts] ?>">
1276
              <?
1277
				$format_string = "Name1;, ;PLZ; ;ORT; / ;E_Mail";
1278
				if ($web_rechte[modul_name][tool_name][edit_string])
1279
				{
1280
					$format_string = $web_rechte[modul_name][tool_name][edit_string];
1281
				}
1282
				foreach(explode(";",$format_string) as $elem)
1283
				{
1284
					if (array_key_exists($elem,$zeile))
1285
					{
1286
						echo $zeile[$elem];
1287
					}
1288
					else
1289
					{
1290
						echo $elem;
1291
					}
1292
				}
1293
?>
1294
              </font> </td>
1295
			<td bgcolor="#<? echo $webs[bgcolor_rechts] ?>" nowrap>
1296
			<input type="checkbox" name="ID[]" value="<? echo $zeile[ID]?>">
1297
			</td>
1298
          </tr>
1299
<?
1300
			}
1301
?>
1302
          <tr bgcolor="#<? echo $webs[bgcolor_links] ?>">
1303
            <td colspan="2">
1304
<?
1305
	if ($count >= 100)
1306
	{
1307
?>
1308
			<table width="100%" border="0" cellspacing="0" cellpadding="0">
1309
                <tr>
1310
                  <td width="10%" class="rechts">
1311
				  	<a href="<? echo $self?>?action=delete&sort=<? echo $sort ?>&start=<? if (($start) > 0) {echo $start-100;} else {echo "0";} ?>"><font color="#<? echo $webs[font_color_links] ?>">zurück</font></a>
1312
				  </td>
1313
                  <td width="85%" align="center" class="rechts">|<font color="#<? echo $webs[font_color_links] ?>">
1314
<?
1315
		for ($a=0; $a < $count; $a+=100)
1316
		{
1317
?>
1318
<? if ($start == $a) {echo "<b>";} ?>
1319
<a href="<? echo $self?>?action=delete&sort=<? echo $sort ?>&start=<? echo $a ?>">
1320
<? echo $a ?> - <? if ($count - $a > 99) { echo $a + 99; } else { echo $count; } ?><? if ($start == $a) {echo "</b>";} ?> |
1321
</a>
1322
<?
1323
		}
1324
?>
1325
				  </font></td>
1326
                  <td width="10%" align="right" class="rechts">
1327
				  	<a href="<? echo $self?>?action=delete&sort=<? echo $sort ?>&start=<? if ($start+$range < $count) {echo $start+$range;} else {echo $start;} ?>"><font color="#<? echo $webs[font_color_links] ?>">weiter</font></a>
1328
				  </td>
1329
                </tr>
1330
              </table>
1331
<?
1332
	}
1333
?>
1334
            </td>
1335
          </tr>
1336
          <tr bgcolor="#<? echo $webs[bgcolor_links] ?>">
1337
            <td colspan="2" align="right">
1338
				<input type="submit" value="Löschen">
1339
                <input type="hidden" name="action" value='delete'>
1340
            </td>
1341
          </tr>
1342
        </table>
1343
        <?
1344
		}
1345
 	}
1346
?>
1347
        <!--  Auswahl Löschen ENDE  -->
1348
        <!--  Auswahl SELECT_EDIT START  -->
1349
<?
1350
	if ($action=="select_edit")
1351
	{
1352
		$query[]="SELECT * FROM $DB";
1353
		if ($suchname)
1354
		{
1355
			$search_query[]="Name1 like '%$suchname%'";
1356
		}
1357
		if ($select)
1358
		{
1359
			$search_query[]="status='$select'";
1360
		}
1361
		if ($search_query)
1362
		{
1363
			$query[]="where ".implode(" and ",$search_query);
1364
		}
1365
		$query[]="ORDER BY $sort";
1366
 
1367
		$query=implode(" ",$query);
1368
		$result = mysql_query ($query) or die (mysql_errno().": ".mysql_error()."<hr>$query");
1369
		$count = mysql_num_rows($result);
1370
 
1371
		switch ($count)
1372
		{
1373
			case 0:
1374
?>
1375
<p><b><font color="#<? echo $webs[font_color_seite] ?>">Es sind keine Daten eingetragen !</font></b></p>
1376
<?
1377
			break;
1378
			case 1:
1379
				$zeile=mysql_fetch_array($result);
1380
?>
1381
<script language="JavaScript">
1382
document.location="<?=$self;?>?action=edit&ID=<?=$zeile[ID];?>";
1383
</script>
1384
	exit;
1385
<?
1386
			break;
1387
			default:
1388
			if (!$start) {$start=0;}
1389
			$query=$query." limit $start, 100";
1390
?>
1391
        <table width="100%" border="1" cellspacing="0" cellpadding="3" bordercolorlight="#FFFFFF" bordercolordark="#999999">
1392
          <tr bgcolor="#<? echo $webs[bgcolor_links] ?>">
1393
            <td colspan="2">
1394
              <table width="100%" border="0" cellspacing="0" cellpadding="0">
1395
                <tr>
1396
                  <td class="headline"><font color="#<? echo $webs[font_color_links] ?>"><b>Benutzer:
1397
                    Bearbeiten</b></font> </td>
1398
                  <td class="headline" align="right"><font color="#<? echo $webs[font_color_links] ?>"><b>
1399
                    <? echo $count ?>
1400
                    &nbsp;Eintr&auml;ge</b></font></td>
1401
                </tr>
1402
                <tr>
1403
                  <td class="headline" colspan="2"><font color="#<? echo $webs[font_color_links] ?>">
1404
<? if (isset($user_rechte[modul_name][tool_name]["auswahl"])) { ?>
1405
<?
1406
	$Feld="userlevel";
1407
	if (isset($user_rechte[modul_name][tool_name][$Feld]))
1408
	{
1409
		?><hr noshade width="100%">Status:<?
1410
	if (!$web_rechte[modul_name][tool_name][$Feld]) {$web_rechte[modul_name][tool_name][$Feld]="1;2;3;4;5;6";}
1411
	$kats=explode(";",$web_rechte[modul_name][tool_name][$Feld]);
1412
?>
1413
                    <select name="select">
1414
                <?
1415
	foreach($kats as $elem)
1416
	{
1417
?>
1418
                <option <? if ($select == $elem) { ?>selected<? } ?>>
1419
                <? echo $elem ?>
1420
                </option>
1421
                <?
1422
	}
1423
?>
1424
              </select>
1425
                    <br><? } ?>
1426
                    Suche nach Name:
1427
                    <input name="suchname" type="text" id="suchname" value="<? echo $suchname ?>">
1428
  <input type="submit" name="Submit" value="Suchen"><? } ?><hr noshade width="100%"></font>
1429
				  </td>
1430
                </tr>
1431
              </table>
1432
<?
1433
	if ($count >= $range)
1434
	{
1435
?>
1436
			  <table width="100%" border="0" cellspacing="0" cellpadding="0">
1437
                <tr>
1438
                  <td width="10%" class="rechts">
1439
				  	<a href="<? echo $self?>?action=<? echo $action ?>&sort=<? echo $sort ?>&start=<? if (($start) > 0) {echo $start-$range;} else {echo "0";} ?>"><font color="#<? echo $webs[font_color_links] ?>">zurück</font></a>
1440
				  </td>
1441
                  <td width="85%" align="center" class="rechts">|
1442
<?
1443
		for ($a=0; $a < $count; $a+=$range)
1444
		{
1445
?>
1446
<? if ($start == $a) {echo "<b>";} ?>
1447
<a href="<? echo $self?>?action=<? echo $action ?>&sort=<? echo $sort ?>&start=<? echo $a ?>">
1448
<font color="#<? echo $webs[font_color_links] ?>">
1449
<? echo $a ?> - <? if ($count - $a > $range-1) { echo $a + $range-1; } else { echo $count; } ?><? if ($start == $a) {echo "</b>";} ?> |
1450
</font>
1451
</a>
1452
<?
1453
		}
1454
?>
1455
				  </td>
1456
                  <td width="10%" align="right" class="rechts" nowrap>&nbsp;
1457
				  	<a href="<? echo $self?>?action=<? echo $action ?>&sort=<? echo $sort ?>&start=<? if ($start+$range < $count) {echo $start+$range;} else {echo $start;} ?>"><font color="#<? echo $webs[font_color_links] ?>">weiter</font></a>
1458
				  </td>
1459
                </tr>
1460
              </table>
1461
<?
1462
	}
1463
?>
1464
            </td>
1465
          </tr>
1466
		  <tr>
1467
			<td colspan="2">
1468
              <?
1469
				$format_string = "Name1;, ;PLZ; ;ORT; / ;E_Mail";
1470
				if ($web_rechte[modul_name][tool_name][edit_string])
1471
				{
1472
					$format_string = $web_rechte[modul_name][tool_name][edit_string];
1473
				}
1474
				foreach(explode(";",$format_string) as $elem)
1475
				{
1476
					if ($web_rechte[modul_name][tool_name][$elem])
1477
					{
1478
?><a href="<? echo $self?>?action=select_edit&sort=<? echo $elem ?>&start=<? echo $start ?>">
1479
              <? echo preg_replace("/:/", "", $web_rechte[modul_name][tool_name][$elem]); ?>
1480
              </a><?
1481
					}
1482
					else
1483
					{
1484
						echo $elem;
1485
					}
1486
				}
1487
?>
1488
            </td>
1489
		  </tr>
1490
<?
1491
			$result = mysql_query ($query) or die (mysql_errno().": ".mysql_error()."<hr>$query");
1492
			while ($zeile=mysql_fetch_array($result))
1493
			{
1494
?>
1495
          <tr>
1496
            <td bgcolor="#<? echo $webs[bgcolor_rechts] ?>" width="100%"><a href="<? echo $self?>?action=edit&ID=<? echo $zeile[ID]; ?>">
1497
              <font color="<? echo $webs[font_color_rechts] ?>">
1498
              <?
1499
				$format_string = "Name1;, ;PLZ; ;ORT; / ;E_Mail";
1500
				if ($web_rechte[modul_name][tool_name][edit_string])
1501
				{
1502
					$format_string = $web_rechte[modul_name][tool_name][edit_string];
1503
				}
1504
				foreach(explode(";",$format_string) as $elem)
1505
				{
1506
					if (array_key_exists($elem,$zeile))
1507
					{
1508
						echo $zeile[$elem];
1509
					}
1510
					else
1511
					{
1512
						echo $elem;
1513
					}
1514
				}
1515
?>
1516
              </font> </a> </td>
1517
			<? if ($web_rechte[modul_name][tool_name][userlevel]) { ?>
1518
			<td bgcolor="#<? echo $webs[bgcolor_rechts] ?>" nowrap>
1519
				<font color="<? echo $webs[font_color_rechts] ?>"><? if ($zeile[Status]) {echo $zeile[Status];} else {echo "&nbsp;";} ?></font>
1520
			</td>
1521
			<? } ?>
1522
          </tr>
1523
<?
1524
			}
1525
?>
1526
          <tr bgcolor="#<? echo $webs[bgcolor_links] ?>">
1527
            <td colspan="2">
1528
<?
1529
	if ($count >= $range)
1530
	{
1531
?>
1532
			  <table width="100%" border="0" cellspacing="0" cellpadding="0">
1533
                <tr>
1534
                  <td width="10%" class="rechts">
1535
				  	<a href="<? echo $self?>?action=<? echo $action ?>&sort=<? echo $sort ?>&start=<? if (($start) > 0) {echo $start-$range;} else {echo "0";} ?>"><font color="#<? echo $webs[font_color_links] ?>">zurück</font></a>
1536
				  </td>
1537
                  <td width="85%" align="center" class="rechts">|
1538
<?
1539
		for ($a=0; $a < $count; $a+=$range)
1540
		{
1541
?>
1542
<? if ($start == $a) {echo "<b>";} ?>
1543
<a href="<? echo $self?>?action=<? echo $action ?>&sort=<? echo $sort ?>&start=<? echo $a ?>">
1544
<font color="#<? echo $webs[font_color_links] ?>">
1545
<? echo $a ?> - <? if ($count - $a > $range-1) { echo $a + $range-1; } else { echo $count; } ?><? if ($start == $a) {echo "</b>";} ?> |
1546
</font>
1547
</a>
1548
<?
1549
		}
1550
?>
1551
				  </td>
1552
                  <td width="10%" align="right" class="rechts" nowrap>&nbsp;
1553
				  	<a href="<? echo $self?>?action=<? echo $action ?>&sort=<? echo $sort ?>&start=<? if ($start+$range < $count) {echo $start+$range;} else {echo $start;} ?>"><font color="#<? echo $webs[font_color_links] ?>">weiter</font></a>
1554
				  </td>
1555
                </tr>
1556
              </table>
1557
<?
1558
	}
1559
?>
1560
            </td>
1561
          </tr>
1562
          <tr bgcolor="#<? echo $webs[bgcolor_links] ?>">
1563
            <td colspan="2">&nbsp;</td>
1564
          </tr>
1565
        </table>
1566
        <?
1567
		}
1568
 	}
1569
?>
1570
<!--  Auswahl SELECT_EDIT ENDE  -->
1571
<?
1572
	if ($action=="edit")
1573
	{
1574
		if ($ID)
1575
		{
1576
			$felder=array("*");
1577
			foreach (array("Datum1","Datum2") as $fn)
1578
			{
1579
				if (isset($user_rechte[modul_name][tool_name][$fn]))
1580
				{
1581
					$felder[] = "date_format($fn ,'%d.%m.%Y') as $fn";
1582
				}
1583
			}
1584
 
1585
			if (isset($user_rechte[modul_name][tool_name]["Vereinsdaten"]))
1586
			{
1587
				foreach (array("Eintrittsdatum","Austrittsdatum","Beitrag_bezahlt","Beitrag_letztes","Mitgliedskarte") as $fn)
1588
				{
1589
					$felder[] = "date_format($fn ,'%d.%m.%Y') as $fn";
1590
				}
1591
			}
1592
 
1593
 
1594
			$result = mysql_query
1595
						("
1596
							SELECT
1597
								".implode(", ",$felder)."
1598
							FROM
1599
								$DB
1600
							where
1601
								ID = '$ID'
1602
						") or die (mysql_errno().": ".mysql_error());
1603
			$zeile=mysql_fetch_array($result);
1604
		}
1605
	?>
1606
	    <table width="100%" border="1" cellspacing="0" cellpadding="3" bordercolorlight="#FFFFFF" bordercolordark="#999999">
1607
          <tr>
1608
            <td colspan="3" bgcolor="#<? echo $webs[bgcolor_links] ?>"><b><font color="#<? echo $webs[font_color_links] ?>">Benutzer:
1609
              <?
1610
					if ($ID)
1611
					{
1612
					 ?>
1613
              Bearbeiten
1614
              <?
1615
					}
1616
					else
1617
					{
1618
					 ?>
1619
              Neueintrag
1620
              <?
1621
					}
1622
				?>
1623
              </font></b> </td>
1624
          </tr>
1625
          <?
1626
	$Feld="user";
1627
	if (isset($user_rechte[modul_name][tool_name][$Feld]))
1628
	{
1629
?>
1630
          <tr>
1631
            <td bgcolor="#<? echo $webs[bgcolor_links] ?>" valign="middle" width="20%"><b><font color="#<? echo $webs[font_color_links] ?>">
1632
              <? if ($web_rechte[modul_name][tool_name][$Feld]) { echo $web_rechte[modul_name][tool_name][$Feld]; } else { ?>
1633
              Login:
1634
              <? } ?>
1635
              </font></b></td>
1636
            <td colspan="2" bgcolor="#<? echo $webs[bgcolor_rechts] ?>">
1637
              <input type="text" name="user" value="<? echo $zeile[user] ?>">
1638
            </td>
1639
          </tr>
1640
          <?
1641
	}
1642
?>
1643
          <?
1644
	$Feld="passwd";
1645
	if (isset($user_rechte[modul_name][tool_name][$Feld]))
1646
	{
1647
?>
1648
          <tr>
1649
            <td bgcolor="#<? echo $webs[bgcolor_links] ?>" valign="top" width="20%"><b><font color="#<? echo $webs[font_color_links] ?>">
1650
              <? if ($web_rechte[modul_name][tool_name][$Feld]) { echo $web_rechte[modul_name][tool_name][$Feld]; } else { ?>
1651
			Passwort:
1652
              <? } ?>
1653
			</font></b></td>
1654
            <td colspan="2" bgcolor="#<? echo $webs[bgcolor_rechts] ?>"><font color="#<? echo $webs[font_color_rechts] ?>">
1655
              <input type="password" name="passwd">
1656
              (Passwort)<br>
1657
              <input type="password" name="pwdcheck">
1658
              (Passwortbest&auml;tigung) </font></td>
1659
          </tr>
1660
          <?
1661
	}
1662
?>
1663
          <?
1664
	$Feld="userlevel";
1665
	if (isset($user_rechte[modul_name][tool_name][$Feld]))
1666
	{
1667
?>
1668
          <tr>
1669
            <td bgcolor="#<? echo $webs[bgcolor_links] ?>" valign="top" width="20%"><b><font color="#<? echo $webs[font_color_links] ?>">
1670
              Status: </font></b></td>
1671
            <td colspan="2" bgcolor="#<? echo $webs[bgcolor_rechts] ?>">
1672
              <?
1673
	if (!$web_rechte[modul_name][tool_name][$Feld]) {$web_rechte[modul_name][tool_name][$Feld]="1;2;3;4;5;6";}
1674
	$kats=explode(";",$web_rechte[modul_name][tool_name][$Feld]);
1675
?>
1676
              <select name="Status">
1677
                <?
1678
	foreach($kats as $elem)
1679
	{
1680
?>
1681
                <option <? if ($zeile[Status] == $elem) { ?>selected<? } ?>>
1682
                <? echo $elem ?>
1683
                </option>
1684
                <?
1685
	}
1686
?>
1687
              </select>
1688
            </td>
1689
          </tr>
1690
          <?
1691
	}
1692
?>
1693
          <?
1694
	$Feld="Anrede";
1695
	if (isset($user_rechte[modul_name][tool_name][$Feld]))
1696
	{
1697
?>
1698
          <tr>
1699
            <td bgcolor="#<? echo $webs[bgcolor_links] ?>"><font color="#<? echo $webs[font_color_links] ?>"><b>
1700
              <?
1701
				  	if (($web_rechte[modul_name][tool_name][$Feld]) and (!strrpos($web_rechte[modul_name][tool_name][$Feld],";")))
1702
					{
1703
						echo $web_rechte[modul_name][tool_name][$Feld];
1704
					}
1705
					else
1706
					{
1707
				?>
1708
  Anrede:
1709
  <?
1710
					}
1711
				?>
1712
            </b></font> </td>
1713
            <td colspan="2" bgcolor="#<? echo $webs[bgcolor_rechts] ?>">
1714
              <?
1715
			  if (!$web_rechte[modul_name][tool_name][$Feld]) {$web_rechte[modul_name][tool_name][$Feld]=" ;Herr;Frau;Firma";}
1716
			  else
1717
			  {$web_rechte[modul_name][tool_name][$Feld]=(substr(stristr($web_rechte[modul_name][tool_name][$Feld], ';'), 1));}
1718
			  $kats=explode(";",$web_rechte[modul_name][tool_name][$Feld]);?>
1719
              <select name="<? echo $Feld ?>">
1720
                <?
1721
				$kat_runner=0;
1722
				foreach($kats as $elem)
1723
				{
1724
?>
1725
                <option value="<? echo $elem ?>"<? if ($zeile[$Feld] == $elem) { ?>selected<? } ?>><? echo $elem ?></option>
1726
                <?
1727
					$kat_runner++;
1728
				}
1729
?>
1730
              </select>
1731
            </td>
1732
          </tr>
1733
          <?
1734
	}
1735
?>
1736
          <?
1737
	$Feld="Vorname";
1738
	if (isset($user_rechte[modul_name][tool_name][$Feld]))
1739
	{
1740
?>
1741
          <tr>
1742
            <td bgcolor="#<? echo $webs[bgcolor_links] ?>" valign="middle" width="20%"><b><font color="#<? echo $webs[font_color_links] ?>">
1743
              <? if ($web_rechte[modul_name][tool_name][$Feld]) { echo $web_rechte[modul_name][tool_name][$Feld]; } else { ?>
1744
			Vorname:
1745
              <? } ?>
1746
			</font></b></td>
1747
            <td colspan="2" bgcolor="#<? echo $webs[bgcolor_rechts] ?>">
1748
              <input type="text" name="<? echo $Feld ?>" value="<? echo $zeile[$Feld] ?>">
1749
            </td>
1750
          </tr>
1751
          <?
1752
	}
1753
?>
1754
          <?
1755
	$Feld="Name1";
1756
	if (isset($user_rechte[modul_name][tool_name][$Feld]))
1757
	{
1758
?>
1759
          <tr>
1760
            <td bgcolor="#<? echo $webs[bgcolor_links] ?>" valign="middle" width="20%"><b><font color="#<? echo $webs[font_color_links] ?>">
1761
              <? if ($web_rechte[modul_name][tool_name][$Feld]) { echo $web_rechte[modul_name][tool_name][$Feld]; } else { ?>
1762
			Name1:
1763
              <? } ?>
1764
			</font></b></td>
1765
            <td colspan="2" bgcolor="#<? echo $webs[bgcolor_rechts] ?>">
1766
              <input type="text" name="Name1" value="<? echo $zeile[Name1] ?>">
1767
            </td>
1768
          </tr>
1769
          <?
1770
	}
1771
?>
1772
          <?
1773
	$Feld="Name2";
1774
	if (isset($user_rechte[modul_name][tool_name][$Feld]))
1775
	{
1776
?>
1777
 
1778
          <tr>
1779
            <td bgcolor="#<? echo $webs[bgcolor_links] ?>" valign="middle" width="20%"><b><font color="#<? echo $webs[font_color_links] ?>">
1780
              <? if ($web_rechte[modul_name][tool_name][$Feld]) { echo $web_rechte[modul_name][tool_name][$Feld]; } else { ?>
1781
			Name2:
1782
              <? } ?>
1783
			</font></b></td>
1784
            <td colspan="2" bgcolor="#<? echo $webs[bgcolor_rechts] ?>">
1785
              <input type="text" name="Name2" value="<? echo $zeile[Name2] ?>">
1786
            </td>
1787
          </tr>
1788
          <?
1789
	}
1790
 
1791
	$Feld="Strasse";
1792
	if (isset($user_rechte[modul_name][tool_name][$Feld]))
1793
	{
1794
?>
1795
          <tr>
1796
            <td bgcolor="#<? echo $webs[bgcolor_links] ?>" valign="middle" width="20%"><b><font color="#<? echo $webs[font_color_links] ?>">
1797
              <? if ($web_rechte[modul_name][tool_name][$Feld]) { echo $web_rechte[modul_name][tool_name][$Feld]; } else { ?>Strasse:<? } ?>
1798
			</font></b></td>
1799
            <td colspan="2" bgcolor="#<? echo $webs[bgcolor_rechts] ?>">
1800
              <input type="text" name="Strasse" value="<? echo $zeile[Strasse] ?>">
1801
<?
1802
	if (isset($user_rechte[modul_name][tool_name][Hausnummer]))
1803
	{
1804
?>Nr.:
1805
<input type="text" name="Hausnummer" value="<? echo $zeile[Hausnummer] ?>" size="5"><?
1806
	}
1807
?>
1808
            </td>
1809
          </tr>
1810
          <?
1811
	}
1812
 
1813
	$Feld="PLZ_Ort";
1814
	if (isset($user_rechte[modul_name][tool_name][$Feld]))
1815
	{
1816
?>
1817
 
1818
          <tr>
1819
            <td bgcolor="#<? echo $webs[bgcolor_links] ?>" valign="middle" width="20%"><b><font color="#<? echo $webs[font_color_links] ?>">
1820
              <? if ($web_rechte[modul_name][tool_name][$Feld]) { echo $web_rechte[modul_name][tool_name][$Feld]; } else { ?>
1821
			Plz / Ort:
1822
              <? } ?>
1823
			</font></b></td>
1824
            <td colspan="2" bgcolor="#<? echo $webs[bgcolor_rechts] ?>">
1825
              <input type="text" name="PLZ" value="<? echo $zeile[PLZ] ?>" size="5">
1826
              <input type="text" name="ORT" value="<? echo $zeile[ORT] ?>">
1827
            </td>
1828
          </tr>
1829
          <?
1830
	}
1831
?>
1832
          <?
1833
	$Feld="Land";
1834
	if (isset($user_rechte[modul_name][tool_name][$Feld]))
1835
	{
1836
?>
1837
          <tr>
1838
            <td bgcolor="#<? echo $webs[bgcolor_links] ?>" valign="middle" width="20%"><b><font color="#<? echo $webs[font_color_links] ?>">
1839
              <? if ($web_rechte[modul_name][tool_name][$Feld]) { echo $web_rechte[modul_name][tool_name][$Feld]; } else { ?>
1840
			Land:
1841
              <? } ?>
1842
			</font></b></td>
1843
            <td colspan="2" bgcolor="#<? echo $webs[bgcolor_rechts] ?>">
1844
              <input type="text" name="Land" value="<? echo $zeile[Land] ?>">
1845
            </td>
1846
          </tr>
1847
          <?
1848
	}
1849
?>
1850
          <?
1851
	$Feld="Telefon";
1852
	if (isset($user_rechte[modul_name][tool_name][$Feld]))
1853
	{
1854
?>
1855
 
1856
          <tr>
1857
            <td bgcolor="#<? echo $webs[bgcolor_links] ?>" valign="top" width="20%"><b><font color="#<? echo $webs[font_color_links] ?>">
1858
              <?
1859
	if ($web_rechte[modul_name][tool_name][$Feld])
1860
	{
1861
		$felder = explode(";",$web_rechte[modul_name][tool_name][$Feld]);
1862
		echo array_shift($felder);
1863
	}
1864
	else
1865
	{
1866
		echo "Telefon:";
1867
		$felder=array("");
1868
	}
1869
?>
1870
              </font></b></td>
1871
            <td colspan="2" bgcolor="#<? echo $webs[bgcolor_rechts] ?>">
1872
<?
1873
	foreach(array_keys($felder) as $fkey)
1874
	{
1875
		if ($fkey > 0) {$fIndex = $fkey;} else {unset($fIndex);}
1876
		?><input type="text" name="Telefon<?=$fIndex;?>" value="<? echo $zeile["Telefon".$fIndex] ?>"><?
1877
		echo " (".$felder[$fkey].")";
1878
		?><br><?
1879
	}
1880
?>
1881
            </td>
1882
          </tr>
1883
          <?
1884
	}
1885
?>
1886
          <?
1887
	$Feld="Fax";
1888
	if (isset($user_rechte[modul_name][tool_name][$Feld]))
1889
	{
1890
?>
1891
 
1892
          <tr>
1893
            <td bgcolor="#<? echo $webs[bgcolor_links] ?>" valign="middle" width="20%"><b><font color="#<? echo $webs[font_color_links] ?>">
1894
              <? if ($web_rechte[modul_name][tool_name][$Feld]) { echo $web_rechte[modul_name][tool_name][$Feld]; } else { ?>
1895
			Fax:
1896
              <? } ?>
1897
			</font></b></td>
1898
            <td colspan="2" bgcolor="#<? echo $webs[bgcolor_rechts] ?>">
1899
              <input type="text" name="Fax" value="<? echo $zeile[Fax] ?>">
1900
            </td>
1901
          </tr>
1902
          <?
1903
	}
1904
?>
1905
          <?
1906
	$Feld="E_Mail";
1907
	if (isset($user_rechte[modul_name][tool_name][$Feld]))
1908
	{
1909
?>
1910
          <tr>
1911
            <td bgcolor="#<? echo $webs[bgcolor_links] ?>" valign="middle" width="20%"><b><font color="#<? echo $webs[font_color_links] ?>">
1912
              <? if ($web_rechte[modul_name][tool_name][$Feld]) { echo $web_rechte[modul_name][tool_name][$Feld]; } else { ?>
1913
			E-Mail:
1914
              <? } ?>
1915
			</font></b></td>
1916
            <td colspan="2" bgcolor="#<? echo $webs[bgcolor_rechts] ?>">
1917
              <input type="text" name="E_Mail" value="<? echo $zeile[E_Mail] ?>">
1918
            </td>
1919
          </tr>
1920
          <?
1921
	}
1922
?>
1923
          <?
1924
	$Feld="URL";
1925
	if (isset($user_rechte[modul_name][tool_name][$Feld]))
1926
	{
1927
?>
1928
          <tr>
1929
            <td bgcolor="#<? echo $webs[bgcolor_links] ?>" valign="middle" width="20%"><b><font color="#<? echo $webs[font_color_links] ?>">
1930
              <? if ($web_rechte[modul_name][tool_name][$Feld]) { echo $web_rechte[modul_name][tool_name][$Feld]; } else { ?>
1931
			Homepage:
1932
              <? } ?>
1933
			</font></b></td>
1934
            <td colspan="2" bgcolor="#<? echo $webs[bgcolor_rechts] ?>">
1935
              <input type="text" name="URL" value="<? echo $zeile[URL] ?>">
1936
            </td>
1937
          </tr>
1938
          <?
1939
	}
1940
?>
1941
<?
1942
	for ($x=1; $x<=2; $x++)
1943
	{
1944
		$Feld="Datum".$x;
1945
		if (isset($user_rechte[modul_name][tool_name][$Feld]))
1946
		{
1947
?>
1948
          <tr>
1949
            <td bgcolor="#<? echo $webs[bgcolor_links] ?>" valign="middle" width="20%"><b><font color="#<? echo $webs[font_color_links] ?>">
1950
<?
1951
	if ($web_rechte[modul_name][tool_name][$Feld])
1952
	{
1953
		echo $web_rechte[modul_name][tool_name][$Feld];
1954
	}
1955
	else
1956
	{
1957
		echo "Datum  ".$x;
1958
	}
1959
?>
1960
              </font></b>
1961
			  </td>
1962
            <td colspan="2" bgcolor="#<? echo $webs[bgcolor_rechts] ?>">
1963
              <input type="text" name="Datum<? echo $x ?>" value="<?=$zeile[$Feld];?>">
1964
            </td>
1965
          </tr>
1966
          <?
1967
		}
1968
	}
1969
?>
1970
<?
1971
	for ($Eigenschaft_nr=1; $Eigenschaft_nr<=5; $Eigenschaft_nr++)
1972
	{
1973
		$Feld="Eigenschaft_".$Eigenschaft_nr;
1974
		if (isset($user_rechte[modul_name][tool_name][$Feld]))
1975
		{
1976
?>
1977
          <tr>
1978
            <td bgcolor="#<? echo $webs[bgcolor_links] ?>" valign="middle" width="20%"><b><font color="#<? echo $webs[font_color_links] ?>"><?
1979
					if ($web_rechte[modul_name][tool_name][$Feld])
1980
					{
1981
						echo $web_rechte[modul_name][tool_name][$Feld];
1982
					}
1983
					else
1984
					{
1985
				?>
1986
              Eigenschaft
1987
              <? echo $Eigenschaft_nr ?>
1988
              <?
1989
					}
1990
				?>
1991
              </font></b>
1992
			  </td>
1993
            <td colspan="2" bgcolor="#<? echo $webs[bgcolor_rechts] ?>">
1994
              <input type="hidden" name="Eigenschaft_<? echo $Eigenschaft_nr ?>" value="0">
1995
              <input type="checkbox" name="Eigenschaft_<? echo $Eigenschaft_nr ?>" <? if ($zeile[$Feld] == 1) {echo "checked";} ?> value="1">
1996
            </td>
1997
          </tr>
1998
          <?
1999
		}
2000
	}
2001
?>
2002
<?
2003
	for($bild_nr=1; $bild_nr <=7; $bild_nr++)
2004
	{
2005
		$Feld="bild$bild_nr";
2006
		if (isset($user_rechte[modul_name][tool_name][$Feld]))
2007
		{
2008
?>
2009
          <tr>
2010
            <td bgcolor="#<? echo $webs[bgcolor_links] ?>" valign="top" width="21%">
2011
              <font color="#<? echo $webs[font_color_links] ?>"><b>
2012
              <?
2013
				$Felddaten = explode(";", $web_rechte[modul_name][tool_name][$Feld]);
2014
				if ($Felddaten[0])
2015
				{
2016
					echo $Felddaten[0];
2017
				}
2018
				else
2019
				{
2020
					echo "Bild ".$bild_nr;
2021
				}
2022
			?>
2023
              </b></font> </td>
2024
            <td bgcolor="#<? echo $webs[bgcolor_rechts] ?>" colspan="2" width="79%">
2025
              <table border="0" width="100%" cellspacing="0" cellpadding="0">
2026
                <tr>
2027
                  <td width="55%" nowrap colspan="2"> <font color="#<? echo $webs[font_color_rechts] ?>">
2028
                    <?
2029
							$image_name="bild_".$bild_nr."_url";
2030
							$image_Path="/images/Login/Bild_".$bild_nr."/";
2031
							$image_Path=$webs[verzeichnis].$image_Path;
2032
 
2033
							if ($Language_neueintrag)
2034
							{
2035
								?><input type="hidden" name="<? echo $image_name ?>" value="<? echo $zeile[$image_name] ?>"><?
2036
							}
2037
							?><input type="hidden" name="<? echo $image_name ?>_Pfad" value="<? echo $image_Path ?>"><?
2038
 
2039
							if ($zeile[$image_name] != "")
2040
							{
2041
						?>
2042
                    <input type="radio" name="_<? echo $image_name ?>" value="0" checked>
2043
                    <a href="http://<? echo $site."/images/Login/Bild_".$bild_nr."/".$zeile[$image_name] ?>" target="blank">
2044
                    <? echo $zeile[$image_name]; ?> </a>
2045
                    <?
2046
								if (file_exists($image_Path.$zeile[$image_name]))
2047
								{
2048
									$size= filesize ($image_Path.$zeile[$image_name]) >> 10;
2049
									$imgsize = GetImageSize ($image_Path.$zeile[$image_name]);
2050
									echo "&nbsp;( $size KB";
2051
									if ($imgsize) { echo "&nbsp;$imgsize[0]x$imgsize[1]"; }
2052
									echo " )<BR>";
2053
								} else { echo "<br>";}
2054
							}
2055
						?>
2056
                    <input type="radio" name="_<? echo $image_name ?>" value="1" <? if ($zeile[$image_name] == "") {echo "checked";}?>>
2057
                    kein
2058
                    <? if (substr($Felddaten[0],0,4) == "Doku")
2059
					{ ?>
2060
                    Dokument
2061
                    <? }
2062
					else
2063
					{ ?>
2064
                    Bild
2065
                    <? } ?>
2066
                    <br>
2067
                    <input type="radio" name="_<? echo $image_name ?>" value="2">
2068
                    <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;">
2069
                    </font> </td>
2070
                  <td width="45%" nowrap align="center"><font color="#<? echo $webs[font_color_rechts] ?>">&nbsp;
2071
                    </font>
2072
                    <? if (substr($Felddaten[0],0,4) <> "Doku")
2073
					{
2074
					if ($zeile[$image_name] != "")
2075
					{ ?>
2076
                    <a href="http://<? echo $site."/images/Login/Bild_".$bild_nr."/".$zeile[$image_name] ?>" target="blank"><img height="60" src="http://<? echo $site."/images/Login/Bild_".$bild_nr."/".$zeile[$image_name] ?>" border="0"></a>
2077
                    <? }
2078
					} ?>
2079
                    <font color="#<? echo $webs[font_color_rechts] ?>">&nbsp;
2080
                    </font> </td>
2081
                </tr>
2082
              </table>
2083
<?
2084
		if ((isset($user_rechte[modul_name][tool_name]["bild".$bild_nr."_text"])) and (isset($user_rechte[modul_name][tool_name]["bild_pos".$bild_nr])))
2085
		{
2086
?>
2087
              <hr width="100%">
2088
<?
2089
		}
2090
?>
2091
              <table border="0" width="50%" cellspacing="0" cellpadding="0">
2092
<?
2093
		if (isset($user_rechte[modul_name][tool_name]["bild".$bild_nr."_text"]))
2094
		{
2095
?>
2096
                <tr>
2097
                  <td width="27%" nowrap><font color="#<? echo $webs[font_color_rechts] ?>">Unterschrift:</font></td>
2098
                  <td width="28%" nowrap>
2099
                    <input type="text" name="bildunterschrift_<? echo $bild_nr ?>" value="<? echo $zeile["bildunterschrift_".$bild_nr] ?>">
2100
                  </td>
2101
                </tr>
2102
<?
2103
		}
2104
		if (isset($user_rechte[modul_name][tool_name]["bild_pos".$bild_nr]))
2105
		{
2106
?>
2107
                <tr>
2108
                  <td width="27%" height="23" nowrap><font color="#<? echo $webs[font_color_rechts] ?>">Position:</font></td>
2109
                  <td width="28%" nowrap>
2110
					<? $kats=explode(";",$web_rechte[modul_name][tool_name]["bild_pos".$bild_nr]); ?>
2111
              <select name="bild_position_<? echo $bild_nr ?>"
2112
			  <? echo $web_rechte[modul_name][tool_name][$Feld."_EventHandler"]; ?>>
2113
                <?
2114
				$kat_runner=0;
2115
				foreach($kats as $elem)
2116
				{
2117
?>
2118
                <option value="<? echo $kat_runner ?>"<? if ($zeile["bild_position_".$bild_nr] == $kat_runner) { ?>selected<? } ?>>
2119
                <? echo $elem ?>
2120
                </option>
2121
                <?
2122
					$kat_runner++;
2123
				}
2124
?>
2125
              </select>
2126
                  </td>
2127
                </tr>
2128
<?
2129
		}
2130
?>
2131
              </table>
2132
            </td>
2133
          </tr>
2134
          <?
2135
		}
2136
	}
2137
?>
2138
          <?
2139
	$Feld="AP_Daten";
2140
	if (isset($user_rechte[modul_name][tool_name][$Feld]))
2141
	{
2142
?>
2143
          <tr>
2144
            <td bgcolor="#<? echo $webs[bgcolor_links] ?>" valign="top" width="20%" rowspan="3"><b><font color="#<? echo $webs[font_color_links] ?>">
2145
              <? if ($web_rechte[modul_name][tool_name][$Feld]) { echo $web_rechte[modul_name][tool_name][$Feld]; } else { ?>
2146
			Ansprechpartner:
2147
              <? } ?>
2148
			</font></b></td>
2149
            <td width="14%" bgcolor="#<? echo $webs[bgcolor_rechts] ?>"><b><font color="#<? echo $webs[font_color_rechts] ?>">Name:</font></b></td>
2150
            <td bgcolor="#<? echo $webs[bgcolor_rechts] ?>">
2151
              <input type="text" name="AP_Name" value="<? echo $zeile[AP_Name] ?>">
2152
            </td>
2153
          </tr>
2154
          <tr>
2155
            <td width="14%" height="36" bgcolor="#<? echo $webs[bgcolor_rechts] ?>"><b><font color="#<? echo $webs[font_color_rechts] ?>">Handy:</font></b></td>
2156
            <td height="36" bgcolor="#<? echo $webs[bgcolor_rechts] ?>">
2157
              <input type="text" name="AP_Handy" value="<? echo $zeile[AP_Handy] ?>">
2158
            </td>
2159
          </tr>
2160
          <tr>
2161
            <td width="14%" valign="top" bgcolor="#<? echo $webs[bgcolor_rechts] ?>"><b><font color="#<? echo $webs[font_color_rechts] ?>">Bemerkung:</font></b></td>
2162
            <td bgcolor="#<? echo $webs[bgcolor_rechts] ?>">
2163
              <textarea name="AP_Bemerkung" cols="60" rows="5"><? echo $zeile[AP_Bemerkung] ?></textarea>
2164
            </td>
2165
          </tr>
2166
          <? } ?>
2167
<?
2168
	for ($Notiz_nr=1; $Notiz_nr<=5; $Notiz_nr++)
2169
	{
2170
		$Feld="Notiz_".$Notiz_nr;
2171
		if (isset($user_rechte[modul_name][tool_name][$Feld]))
2172
		{
2173
?>
2174
          <tr>
2175
            <td bgcolor="#<? echo $webs[bgcolor_links] ?>" valign="middle" width="20%"><b><font color="#<? echo $webs[font_color_links] ?>"><?
2176
					if ($web_rechte[modul_name][tool_name][$Feld])
2177
					{
2178
						echo $web_rechte[modul_name][tool_name][$Feld];
2179
					}
2180
					else
2181
					{
2182
				?>
2183
              Notiz
2184
              <? echo $Notiz_nr ?>
2185
              <?
2186
					}
2187
				?>
2188
              </font></b>
2189
			  </td>
2190
            <td colspan="2" bgcolor="#<? echo $webs[bgcolor_rechts] ?>">
2191
              <input type="text" name="Notiz_<? echo $Notiz_nr ?>" value="<?=$zeile[$Feld];?>">
2192
            </td>
2193
          </tr>
2194
          <?
2195
		}
2196
	}
2197
?>
2198
          <?
2199
	$Feld="Vereinsdaten";
2200
	if (isset($user_rechte[modul_name][tool_name][$Feld]))
2201
	{
2202
?>
2203
          <tr>
2204
            <td bgcolor="#<? echo $webs[bgcolor_links] ?>" valign="middle"><b><font color="#<? echo $webs[font_color_links] ?>">Eintrittsdatum:</font></b></td>
2205
            <td colspan="2" bgcolor="#<? echo $webs[bgcolor_rechts] ?>"><input type="text" name="Eintrittsdatum" value="<? echo $zeile[Eintrittsdatum] ?>"></td>
2206
          </tr>
2207
          <tr>
2208
            <td bgcolor="#<? echo $webs[bgcolor_links] ?>" valign="middle"><b><font color="#<? echo $webs[font_color_links] ?>">Austrittsdatum:</font></b></td>
2209
            <td colspan="2" bgcolor="#<? echo $webs[bgcolor_rechts] ?>"><input type="text" name="Austrittsdatum" value="<? echo $zeile[Austrittsdatum] ?>">
2210
              Grund:
2211
            <input name="Austrittsgrund" type="text" value="<? echo $zeile[Austrittsgrund] ?>" size="30"></td>
2212
          </tr>
2213
          <tr>
2214
            <td bgcolor="#<? echo $webs[bgcolor_links] ?>" valign="middle"><b><font color="#<? echo $webs[font_color_links] ?>">Beitrag
2215
            bezahlt:</font></b></td>
2216
            <td colspan="2" bgcolor="#<? echo $webs[bgcolor_rechts] ?>"><input type="text" name="Beitrag_bezahlt" value="<? echo $zeile[Beitrag_bezahlt] ?>">              &nbsp;
2217
            <input name="Beitrag_Wert" type="text" value="<? echo $zeile[Beitrag_Wert] ?>" size="8" onChange="this.value=killkomma(this.value);">
2218
            &euro;</td>
2219
          </tr>
2220
          <tr>
2221
            <td bgcolor="#<? echo $webs[bgcolor_links] ?>" valign="middle"><b><font color="#<? echo $webs[font_color_links] ?>">Beitrag
2222
            letztes J.:</font></b></td>
2223
            <td colspan="2" bgcolor="#<? echo $webs[bgcolor_rechts] ?>"><? echo $zeile[Beitrag_letztes] ?>&nbsp;<? echo $zeile[Betrag_letzter_Wert] ?>&nbsp;&euro;</td>
2224
          </tr>
2225
          <tr>
2226
            <td bgcolor="#<? echo $webs[bgcolor_links] ?>" valign="middle" width="20%"><b><font color="#<? echo $webs[font_color_links] ?>">
2227
			Mitgliedskarte ausgegeben:</font></b></td>
2228
            <td colspan="2" bgcolor="#<? echo $webs[bgcolor_rechts] ?>">
2229
              <input type="text" name="Mitgliedskarte" value="<? echo $zeile[Mitgliedskarte] ?>">              <br>
2230
            </td>
2231
          </tr>
2232
          <?
2233
	}
2234
?>
2235
          <?
2236
	$Feld="bemerkung";
2237
	if (isset($user_rechte[modul_name][tool_name][$Feld]))
2238
	{
2239
?>
2240
          <tr>
2241
            <td bgcolor="#<? echo $webs[bgcolor_links] ?>" valign="top" width="21%">
2242
              <font color="#<? echo $webs[font_color_links] ?>"><b>Bemerkung</b></font>
2243
			</td>
2244
            <td width="79%" colspan="2" bgcolor="#<? echo $webs[bgcolor_rechts] ?>">
2245
              <font color="#<? echo $webs[font_color_links] ?>"><b>
2246
              <textarea name="<? echo $Feld ?>" cols="75" rows="6"><? echo $zeile[$Feld]; ?></textarea>
2247
            </b></font></td>
2248
          </tr>
2249
          <?
2250
	}
2251
?>
2252
<?
2253
	if ($ID)
2254
	{
2255
		if ($zeile[erstellt_am])
2256
		{
2257
?>
2258
          <tr>
2259
            <td bgcolor="#<? echo $webs[bgcolor_links] ?>" width="20%">
2260
			<font color="#<? echo $webs[font_color_links] ?>"><b>erstellt:</b></font>
2261
			</td>
2262
            <td colspan="3" bgcolor="#<? echo $webs[bgcolor_rechts] ?>"><font color="#<? echo $webs[font_color_rechts] ?>">am:
2263
			<? $erstellt_am=datetime2human($zeile[erstellt_am]); ?>
2264
              <? echo $erstellt_am[Datum] ?>
2265
              &nbsp;&nbsp;um:
2266
              <? echo $erstellt_am[Zeit] ?>
2267
              &nbsp;&nbsp;von:
2268
              <? echo $zeile[erstellt_von] ?></font>
2269
            </td>
2270
          </tr>
2271
<?
2272
		}
2273
?>
2274
          <tr>
2275
            <td bgcolor="#<? echo $webs[bgcolor_links] ?>" width="20%" nowrap>
2276
				<font color="#<? echo $webs[font_color_links] ?>"><b>letzte &Auml;nderung:</b></font>
2277
			</td>
2278
            <td colspan="3" bgcolor="#<? echo $webs[bgcolor_rechts] ?>"><font color="#<? echo $webs[font_color_rechts] ?>">am:
2279
			<?
2280
				if (strpos ($zeile[letzte_Aenderung_am], " "))
2281
				{
2282
					$letzte_Aenderung_am=datetime2human($zeile[letzte_Aenderung_am]);
2283
				}
2284
				else
2285
				{
2286
					$letzte_Aenderung_am=timestamp2human($zeile[letzte_Aenderung_am]);
2287
				}
2288
			?>
2289
              <? echo $letzte_Aenderung_am[Datum] ?>
2290
              &nbsp;&nbsp;um:
2291
              <? echo $letzte_Aenderung_am[Zeit] ?>
2292
              &nbsp;&nbsp;von:
2293
              <? echo $zeile[letzte_Aenderung_von] ?></font>
2294
            </td>
2295
          </tr>
2296
<?
2297
	}
2298
?>
2299
 
2300
          <tr>
2301
            <td align="right" colspan="3" bgcolor="#<? echo $webs[bgcolor_links] ?>">
2302
              <input type="hidden" name="ID" value="<? echo $ID ?>">
2303
              <input type="hidden" name="action" value="update">
2304
              <input type="submit" value="OK" onClick="if (this.form.passwd) {if (this.form.passwd.value != this.form.pwdcheck.value) {alert('Passwort und Passwortbestätigung stimmen nicht überein !');return false;}}">
2305
              <input type="reset" name="Button" value="Zur&uuml;cksetzen">
2306
            </td>
2307
          </tr>
2308
        </table>
2309
        <?
2310
	}
2311
?> </td>
2312
      <td width="77" align="right">
2313
        <table width="67" border="1" cellspacing="0" cellpadding="0" bordercolorlight="#FFFFFF" bordercolordark="#999999">
2314
          <tr>
2315
            <td class="frame"><a href="<? echo $self ?>?action=edit" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image5','','../images/navigation/bt_neu_f2.gif',1)"><img name="Image5" border="0" src="../images/navigation/bt_neu.gif" width="67" height="40"></a></td>
2316
          </tr>
2317
          <tr>
2318
            <td class="frame"><a href="<? echo $self ?>?action=select_edit" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image6','','../images/navigation/bt_bearbeiten_f2.gif',1)"><img name="Image6" border="0" src="../images/navigation/bt_bearbeiten.gif" width="67" height="40"></a></td>
2319
          </tr>
2320
          <tr>
2321
            <td><a href="<? echo $self ?>?action=delete<? if (($action=="edit") && ($ID > 0)) { ?>&ID[]=<?=$ID?>" onClick="return confirm('Diesen Eintrag wirklich löschen ?');"<? } else { ?>"<? } ?> 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>
2322
          </tr>
2323
<?
2324
	$Feld="import";
2325
	if (isset($user_rechte[modul_name][tool_name][$Feld]))
2326
	{
2327
?>
2328
          <tr>
2329
            <td class="frame" align="center"><a href="<? echo $self ?>?action=import">import</a></td>
2330
          </tr>
2331
<? } ?>
2332
<?
2333
	$Feld="export";
2334
	if (isset($user_rechte[modul_name][tool_name][$Feld]))
2335
	{
2336
?>
2337
          <tr>
2338
            <td class="frame" align="center"><a href="<? echo $self; ?>?action=export">export</a></td>
2339
          </tr>
2340
<? } ?>
2341
 
2342
        </table>
2343
      </td>
2344
</tr>
2345
</form>
2346
</body>