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