| 1 |
lars |
1 |
<?
|
|
|
2 |
session_start();
|
|
|
3 |
|
|
|
4 |
define ("modul_name", "online_shop");
|
|
|
5 |
define ("tool_name", "directory");
|
|
|
6 |
require_once "connect2.php";
|
|
|
7 |
|
|
|
8 |
if (!$language) {$language="DE";}
|
|
|
9 |
|
|
|
10 |
/* show_primary, show_fallback und sort falls nötig definieren */
|
|
|
11 |
$_SESSION["tree.php"][output]=array
|
|
|
12 |
(
|
|
|
13 |
'directory_show_primary' => 'Name',
|
|
|
14 |
'directory_show_fallback' => 'Kennung',
|
|
|
15 |
'artikel_show_primary' => 'kurzbezeichnung',
|
|
|
16 |
'artikel_show_fallback' => 'kennung',
|
|
|
17 |
'directory_sort' => 'Kennung',
|
|
|
18 |
'artikel_sort' => 'Rang, kennung'
|
|
|
19 |
);
|
|
|
20 |
foreach(array_keys($_SESSION["tree.php"][output]) as $elem)
|
|
|
21 |
{
|
|
|
22 |
if ($user_rechte[modul_name][tool_name][$elem])
|
|
|
23 |
{
|
|
|
24 |
$_SESSION["tree.php"][output][$elem]=$web_rechte[modul_name][tool_name][$elem];
|
|
|
25 |
}
|
|
|
26 |
}
|
|
|
27 |
|
|
|
28 |
?>
|
|
|
29 |
<html>
|
|
|
30 |
<head>
|
|
|
31 |
<title><? echo $webs[kunde_bezeichnung] ?>: Redaktionssystem</title>
|
|
|
32 |
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
|
|
33 |
</head>
|
|
|
34 |
<link rel=stylesheet type="text/css" href="redaktion.css">
|
|
|
35 |
<style type="text/css">
|
|
|
36 |
<!--
|
|
|
37 |
table {border:1px; padding:0px; border-collapse: collapse}
|
|
|
38 |
td {font-family: Arial, Helvetica, sans-serif; font-size: 14px; color: #000000; border:1px; padding:0px; vertical-align:top;}
|
|
|
39 |
a { font-family: Arial, Helvetica, sans-serif; font-size: 14px; color: #000000; text-decoration: none}
|
|
|
40 |
img { border:0px; }
|
|
|
41 |
-->
|
|
|
42 |
</style>
|
|
|
43 |
|
|
|
44 |
<script language=javascript>
|
|
|
45 |
function trigger(ID,language)
|
|
|
46 |
{
|
|
|
47 |
document.directory.action="<? echo $self ?>?ID="+ID+"&language="+language;
|
|
|
48 |
document.directory.submit();
|
|
|
49 |
}
|
|
|
50 |
</script>
|
|
|
51 |
|
|
|
52 |
<body bgcolor="#FFFFFF" text="#000000" topmargin="0" marginheight="0">
|
|
|
53 |
<?
|
|
|
54 |
if ($status[$ID])
|
|
|
55 |
{
|
|
|
56 |
unset($status[$ID]);
|
|
|
57 |
}
|
|
|
58 |
else
|
|
|
59 |
{
|
|
|
60 |
$status[$ID]=1;
|
|
|
61 |
}
|
|
|
62 |
if (!$status) { $status=array(); }
|
|
|
63 |
?>
|
|
|
64 |
<span><? echo $webs[kunde_bezeichnung] ?></span>
|
|
|
65 |
<? echo show_dir(-1); ?>
|
|
|
66 |
<form name="directory" method=post action="<? echo $self ?>">
|
|
|
67 |
<?
|
|
|
68 |
foreach(array_keys($status) as $elem)
|
|
|
69 |
{
|
|
|
70 |
?>
|
|
|
71 |
<input type="hidden" name="status[<? echo $elem; ?>]" value="1">
|
|
|
72 |
<?
|
|
|
73 |
}
|
|
|
74 |
?>
|
|
|
75 |
<input type="hidden" name="Aktion" value="<? echo $Aktion ?>">
|
|
|
76 |
</form>
|
|
|
77 |
|
|
|
78 |
<?
|
|
|
79 |
function show_dir($root)
|
|
|
80 |
{
|
|
|
81 |
global $status;
|
|
|
82 |
global $Aktion;
|
|
|
83 |
global $language;
|
|
|
84 |
$query="SELECT distinct * FROM directory where Father = $root and directory.Language='$language' order by directory.".$_SESSION["tree.php"][output][directory_sort];
|
|
|
85 |
$result = mysql_query ($query) or die (mysql_errno().": ".mysql_error());
|
|
|
86 |
$rows=mysql_num_rows($result);
|
|
|
87 |
$counter=0;
|
|
|
88 |
?>
|
|
|
89 |
<table border="0" cellspacing="0" cellpadding="0">
|
|
|
90 |
<?
|
|
|
91 |
while ($zeile=mysql_fetch_array($result))
|
|
|
92 |
{
|
|
|
93 |
$counter++;
|
|
|
94 |
?>
|
|
|
95 |
<tr>
|
|
|
96 |
<td valign="top"<? if ($rows != $counter) {?> background="../images/redaktion/directory/v_row.png"<? } ?>><a href="javascript:trigger(<? echo $zeile[ID]; ?>,'<? echo $language; ?>')">
|
|
|
97 |
<? if (!$status[$zeile[ID]]) { ?>
|
|
|
98 |
<img src="../images/Online-Shop/directory/subdir_closed.gif" border="0" width="19" height="16">
|
|
|
99 |
<? } else { ?>
|
|
|
100 |
<img src="../images/Online-Shop/directory/subdir_open.gif" border="0" width="19" height="16">
|
|
|
101 |
<? } ?>
|
|
|
102 |
</a></td>
|
|
|
103 |
<td nowrap valign="top"><a href="artikel_2_Aktionen.php?Aktion=<? echo $Aktion ?>&language=<? echo $language ?>" target="tool2" onDblClick="trigger(<? echo $zeile[ID]; ?>)"><img src="../images/Online-Shop/directory/ordner.gif" border="0" width="19" height="16">
|
|
|
104 |
<? if ($zeile[$_SESSION["tree.php"][output][directory_show_primary]]) {echo $zeile[$_SESSION["tree.php"][output][directory_show_primary]];} else {echo $zeile[$_SESSION["tree.php"][output][directory_show_fallback]];} ?>
|
|
|
105 |
</a>
|
|
|
106 |
<?
|
|
|
107 |
if ($status[$zeile[ID]])
|
|
|
108 |
{
|
|
|
109 |
show_dir($zeile[ID]);
|
|
|
110 |
$query2="SELECT distinct * FROM artikel where Father = $zeile[ID] and Language='DE' order by ".$_SESSION["tree.php"][output][artikel_sort];
|
|
|
111 |
$result2 = mysql_query ($query2) or die (mysql_errno().": ".mysql_error());
|
|
|
112 |
while ($zeile2=mysql_fetch_array($result2))
|
|
|
113 |
{
|
|
|
114 |
?>
|
|
|
115 |
<table border="0" cellspacing="0" cellpadding="0">
|
|
|
116 |
<tr>
|
|
|
117 |
<td>
|
|
|
118 |
<img src="../images/Online-Shop/directory/file_<?
|
|
|
119 |
if ($language != $zeile2[Language]) { echo "1"; } else { echo "0"; }
|
|
|
120 |
if ($zeile2[status] == 1) { echo "1"; } else { echo "0"; }
|
|
|
121 |
if ($zeile2[Father] != $zeile[ID]) { echo "1"; } else { echo "0"; }
|
|
|
122 |
?>.gif">
|
|
|
123 |
</td>
|
|
|
124 |
<td nowrap><a href="artikel_2_Aktionen.php?Aktion=<? echo $Aktion ?>&add=<? echo $zeile2[ID]; ?>" target="tool2">
|
|
|
125 |
<?=$zeile2[hersteller];?> <? if ($zeile2[$_SESSION["tree.php"][output][artikel_show_primary]]) {echo $zeile2[$_SESSION["tree.php"][output][artikel_show_primary]];} else {echo $zeile2[$_SESSION["tree.php"][output][artikel_show_fallback]];} ?>
|
|
|
126 |
<? //echo $zeile2[kurzbezeichnung]?>
|
|
|
127 |
</a></td>
|
|
|
128 |
</tr>
|
|
|
129 |
</table>
|
|
|
130 |
<?
|
|
|
131 |
}
|
|
|
132 |
}
|
|
|
133 |
?>
|
|
|
134 |
</td>
|
|
|
135 |
</tr>
|
|
|
136 |
<?
|
|
|
137 |
}
|
|
|
138 |
?>
|
|
|
139 |
</table>
|
|
|
140 |
<?
|
|
|
141 |
}
|
|
|
142 |
?>
|
|
|
143 |
|
|
|
144 |
|
|
|
145 |
</body>
|
|
|
146 |
</html>
|