Go to most recent revision | Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1 | daniel-mar | 1 | <?php |
2 | |||
3 | if (!defined('WBLEGAL')) die('Kann nicht ohne Personal WebBase ausgeführt werden.'); |
||
4 | |||
5 | function gfx_zeichneordnerbox($modul, $dir = 0, $einzug = 0, $auszuwaehlen = 0, $ausschluss = 0) |
||
6 | { |
||
7 | global $WBConfig; |
||
8 | |||
9 | $ary = liste_ordner($modul, $dir, $ausschluss); |
||
10 | if ($dir == 0) |
||
11 | { |
||
12 | echo '<select name="folder" id="folder">'; |
||
13 | echo '<option value="0">Wurzelverzeichnis</option>'; |
||
14 | } |
||
15 | for ($i=1; isset($ary[$i]['id']); $i++) |
||
16 | { |
||
17 | $x = ''; |
||
18 | for ($j=0; $j<=$einzug; $j++) $x .= '-- '; |
||
19 | $y = ''; |
||
20 | if ($auszuwaehlen == $ary[$i]['id']) $y = ' selected'; |
||
21 | echo '<option value="'.$ary[$i]['id'].'"'.$y.'>'.$x.$ary[$i]['name'].'</option>'; |
||
22 | gfx_zeichneordnerbox($modul, $ary[$i]['id'], $einzug+1, $auszuwaehlen, $ausschluss); |
||
23 | } |
||
24 | if ($einzug == 0) echo '</select>'; |
||
25 | } |
||
26 | |||
27 | function gfx_zeichneordner($modul, $table, $append, $dir = 0, $einzug = 0) |
||
28 | { |
||
29 | global $ordnereinzug, $WBConfig; |
||
30 | |||
31 | $ary = liste_ordner($modul, $dir); |
||
32 | $durchlauf = 0; |
||
33 | for ($i=1; isset($ary[$i]['id']); $i++) |
||
34 | { |
||
35 | $durchlauf++; |
||
36 | if (file_exists('modules/user_folders/includes/menuentry.inc.php')) |
||
37 | { |
||
38 | include 'modules/user_folders/includes/menuentry.inc.php'; |
||
39 | } |
||
40 | echo "\n"; |
||
41 | gfx_zeichneordner($modul, $table, $append, $ary[$i]['id'], $einzug+1); |
||
42 | $durchlauf += wb_draw_item($modul, $table, $append, $ary[$i]['id'], $einzug+1); |
||
43 | } |
||
44 | |||
45 | if ($einzug == 0) |
||
46 | { |
||
47 | $durchlauf += wb_draw_item($modul, $table, $append, $dir); |
||
48 | if ($durchlauf == 0) |
||
49 | wb_draw_table_content('100%', 'Es sind keine Elemente in dieser Sektion vorhanden.', '', '', '', '', '', ''); |
||
50 | } |
||
51 | } |
||
52 | |||
53 | function liste_ordner($modul, $dir = 0, $ausschluss = 0) |
||
54 | { |
||
55 | global $benutzer, $WBConfig; |
||
56 | $i = 0; |
||
57 | |||
58 | if (!isset($erg)) $erg = array(); |
||
59 | |||
60 | $res = db_query("SELECT * FROM `".$WBConfig->getMySQLPrefix()."folders` WHERE `folder_cnid` = '".db_escape($dir)."' AND `category` = '".db_escape($modul)."' AND `user_cnid` = '".$benutzer['id']."' ORDER BY `name` ASC"); |
||
61 | while ($row = db_fetch($res)) |
||
62 | { |
||
63 | if (($ausschluss == 0) || (($ausschluss != 0) && ($row['id'] != $ausschluss))) |
||
64 | { |
||
65 | $i++; |
||
66 | $erg[$i] = $row; |
||
67 | } |
||
68 | } |
||
69 | |||
70 | return $erg; |
||
71 | } |
||
72 | |||
73 | $ordnereinzug = 23; |
||
74 | |||
75 | ?> |