| 1 |
lars |
1 |
<?
|
|
|
2 |
$self=basename($PHP_SELF);
|
|
|
3 |
$tab="Branche2Firma";
|
|
|
4 |
require_once "../Online-Shop/connect2.php";
|
|
|
5 |
|
|
|
6 |
if ($action)
|
|
|
7 |
{
|
|
|
8 |
$query = "delete from $tab where Firma = $Firma";
|
|
|
9 |
$result = mysql_query ($query) or die (mysql_errno().": ".mysql_error()."<hr>".$query."<hr>");
|
|
|
10 |
|
|
|
11 |
if ($Branchen)
|
|
|
12 |
{
|
|
|
13 |
foreach($Branchen as $Branche)
|
|
|
14 |
{
|
|
|
15 |
$query = "insert into $tab VALUES ($Branche,$Firma)";
|
|
|
16 |
$result = mysql_query ($query) or die (mysql_errno().": ".mysql_error()."<hr>".$query."<hr>");
|
|
|
17 |
}
|
|
|
18 |
}
|
|
|
19 |
?>
|
|
|
20 |
<script language="Javascript">
|
|
|
21 |
location.hash = '#<? echo $hash ?>';
|
|
|
22 |
</script>
|
|
|
23 |
<?
|
|
|
24 |
}
|
|
|
25 |
|
|
|
26 |
unset($Branche);
|
|
|
27 |
$query="select * from $tab where Firma = $Firma";
|
|
|
28 |
$result = mysql_query ($query) or die (mysql_errno().": ".mysql_error()."<hr>".$query);
|
|
|
29 |
while($zeile=mysql_fetch_array($result))
|
|
|
30 |
{
|
|
|
31 |
$Branche[$zeile[Branche]]=$zeile[Branche];
|
|
|
32 |
}
|
|
|
33 |
?>
|
|
|
34 |
<html>
|
|
|
35 |
<head>
|
|
|
36 |
<title>Branchenführer <? echo $site ?>: Redaktionssystem</title>
|
|
|
37 |
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
|
|
38 |
<link rel=stylesheet type="text/css" href="../Online-Shop/redaktion.css">
|
|
|
39 |
<meta name="description" content="Redaktionssystem">
|
|
|
40 |
<meta name="author" content="Webagentur Niewerth">
|
|
|
41 |
<meta name="robots" content="noindex">
|
|
|
42 |
</head>
|
|
|
43 |
|
|
|
44 |
<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" text="#000096">
|
|
|
45 |
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
|
|
46 |
<tr>
|
|
|
47 |
<td>
|
|
|
48 |
<form method="post" action="<? echo $self ?>?Firma=<? echo $Firma ?>" name="formname">
|
|
|
49 |
<?
|
|
|
50 |
function show_Kats_delete($root,$level)
|
|
|
51 |
{
|
|
|
52 |
$level++;
|
|
|
53 |
global $Branche;
|
|
|
54 |
$query="select * from Branche where Father = $root order by Rang";
|
|
|
55 |
$result = mysql_query ($query) or die (mysql_errno().": ".mysql_error()."<hr>".$query);
|
|
|
56 |
while($zeile=mysql_fetch_array($result))
|
|
|
57 |
{
|
|
|
58 |
$query_count="select * from Branche where Father = $zeile[ID] order by Rang";
|
|
|
59 |
$result_count = mysql_query ($query_count) or die (mysql_errno().": ".mysql_error()."<hr>".$query_count);
|
|
|
60 |
$count=mysql_num_rows($result_count);
|
|
|
61 |
|
|
|
62 |
for ($a = 0; $a < $level; $a++)
|
|
|
63 |
{
|
|
|
64 |
echo " ";
|
|
|
65 |
}
|
|
|
66 |
?><input type="checkbox" name="Branchen[]" value="<? echo $zeile[ID]; ?>" onClick="this.form.hash.value=this.value;this.form.submit();" <? if ($Branche[$zeile[ID]]) { ?>checked<? } ?>><?
|
|
|
67 |
?><a name="<? echo $zeile[ID] ?>" href="#<? echo $zeile[ID] ?>"><? echo $zeile[Name]; ?></a><br><?
|
|
|
68 |
show_Kats_delete($zeile[ID],$level);
|
|
|
69 |
}
|
|
|
70 |
}
|
|
|
71 |
show_Kats_delete(-1,-1);
|
|
|
72 |
?>
|
|
|
73 |
<input type="hidden" name="action" value="true"><input type="hidden" name="<? echo $Firma ?>" value="<? echo $Firma ?>">
|
|
|
74 |
<input type="hidden" name="hash" value="">
|
|
|
75 |
</form>
|
|
|
76 |
</td>
|
|
|
77 |
</tr>
|
|
|
78 |
</table>
|
|
|
79 |
</body>
|