Rev 4 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
2 | daniel-mar | 1 | <?php |
2 | |||
3 | daniel-mar | 3 | if (!defined('IBLEGAL')) die('Kann nicht ohne Personal WebBase ausgeführt werden.'); |
2 | daniel-mar | 4 | |
5 | echo $header; |
||
6 | |||
3 | daniel-mar | 7 | $ansicht = $_GET['ansicht']; |
2 | daniel-mar | 8 | if ($ansicht == '') $ansicht = 'wurzel'; |
9 | |||
10 | // $res2 = db_query("SELECT `eintrag`, `komplett` FROM `".$mysql_zugangsdaten['praefix']."datentraeger_inhalt` WHERE `id` = '".db_escape($id)."' AND `user` = '".$benutzer['id']."'"); |
||
11 | // $row2 = db_fetch($res2); |
||
12 | |||
13 | $res3 = db_query("SELECT `kategorie`, `name` FROM `".$mysql_zugangsdaten['praefix']."datentraeger_eintraege` WHERE `id` = '".db_escape($id)."' AND `user` = '".$benutzer['id']."'"); |
||
14 | $row3 = db_fetch($res3); |
||
15 | |||
16 | echo '<h1>Datenträgerarchiv</h1>'; |
||
17 | |||
18 | echo '<b>Angezeigt wird der Inhalt von: '.$row3['name'].' ('.$row3['kategorie'].')</b><br><br>'; |
||
19 | |||
20 | if ($ansicht == 'wurzel') |
||
21 | { |
||
22 | $a1a = ''; |
||
23 | $a1b = ''; |
||
24 | } |
||
25 | else |
||
26 | { |
||
8 | daniel-mar | 27 | $a1a = '<a href="?modul='.urlencode($modul).'&seite=cdinhalt&id='.urlencode($id).'&ansicht=wurzel">'; |
2 | daniel-mar | 28 | $a1b = '</a>'; |
29 | } |
||
30 | |||
31 | if ($ansicht == 'ordner') |
||
32 | { |
||
33 | $a2a = ''; |
||
34 | $a2b = ''; |
||
35 | } |
||
36 | else |
||
37 | { |
||
8 | daniel-mar | 38 | $a2a = '<a href="?modul='.urlencode($modul).'&seite=cdinhalt&id='.urlencode($id).'&ansicht=ordner">'; |
2 | daniel-mar | 39 | $a2b = '</a>'; |
40 | } |
||
41 | |||
42 | if ($ansicht == 'komplett') |
||
43 | { |
||
44 | $a3a = ''; |
||
45 | $a3b = ''; |
||
46 | } |
||
47 | else |
||
48 | { |
||
8 | daniel-mar | 49 | $a3a = '<a href="?modul='.urlencode($modul).'&seite=cdinhalt&id='.urlencode($id).'&ansicht=komplett">'; |
2 | daniel-mar | 50 | $a3b = '</a>'; |
51 | } |
||
52 | |||
53 | echo '['.$a1a.'Wurzelansicht'.$a1b.'] ['.$a2a.'Ordneransicht'.$a2b.'] ['.$a3a.'Komplettansicht'.$a3b.']<br><br>'; |
||
54 | |||
55 | $roh = ''; |
||
56 | $ary = explode("\n", $row2['komplett']); |
||
57 | for ($i=0; array_key_exists($i, $ary); $i++) |
||
58 | { |
||
59 | if (($ansicht == 'wurzel') && (substr($ary[$i], 1, 3) == '---')) |
||
60 | $roh .= $ary[$i]."\n"; |
||
61 | if (($ansicht == 'wurzel') && (substr($ary[$i], 0, 4) == '| ') && (substr($ary[$i], 5, 1) != ' ')) |
||
62 | $roh .= $ary[$i]."\n"; |
||
63 | if (($ansicht == 'ordner') && (strpos($ary[$i], '---'))) |
||
64 | $roh .= $ary[$i]."\n"; |
||
65 | if ($ansicht == 'komplett') |
||
66 | $roh .= $ary[$i]."\n"; |
||
67 | } |
||
68 | |||
69 | $zus = "Wurzelverzeichnis\n"; |
||
70 | |||
71 | $inh = str_replace(' ', ' ', nl2br(htmlentities($zus.$roh))); |
||
72 | |||
73 | if ($row2['komplett'] == '') $inh = 'Kein Inhalt definiert'; |
||
74 | |||
75 | echo '<code>'.$inh.'</code><br>'; |
||
76 | |||
8 | daniel-mar | 77 | echo '<< <a href="show.php?id='.urlencode($row3['kategorie']).'">Zurück zu den Einträgen</a>'; |
2 | daniel-mar | 78 | |
79 | echo $footer; |
||
80 | |||
3 | daniel-mar | 81 | ?> |