Rev 7 | 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 str_replace('<body', '<body onload="self.focus();document.getElementById(\'suchbegriff\').focus();"', $header); |
||
6 | |||
7 | if ($modulueberschrift == '') $modulueberschrift = $modul; |
||
3 | daniel-mar | 8 | echo '<h1>'.my_htmlentities($modulueberschrift).'</h1>'; |
2 | daniel-mar | 9 | |
10 | if (!isset($suchbegriff)) $suchbegriff = ''; |
||
11 | |||
3 | daniel-mar | 12 | echo 'Hier können Sie Ihre Personal WebBase-Datenbank durchsuchen. |
2 | daniel-mar | 13 | Bitte beachten Sie, dass nur Datenbankeinträge von Modulen gefunden werden |
14 | können, die von den Entwicklern mit einer Suchschnittstelle ausgestattet wurden. |
||
15 | Es werden in der Regel nur die Datensätze durchsucht, keine Systeme von Drittanbietern |
||
16 | (z.B. Posteinfach oder Inhalte von Datenbanken/FTP-Servern etc).<br><br> |
||
17 | |||
18 | <form method="POST" name="mainform" action="'.$_SERVER['PHP_SELF'].'"> |
||
19 | <input type="hidden" name="seite" value="'.$seite.'"> |
||
20 | <input type="hidden" name="modul" value="'.$modul.'"> |
||
21 | Suchbegriff:<br><input type="text" name="suchbegriff" value="'.$suchbegriff.'" class="normal" onmouseover="this.className=\'highlight\';" onmouseout="this.className=\'normal\';" size="50"> |
||
22 | <input type="submit" class="button" onmouseover="this.className=\'button_act\';" onmouseout="this.className=\'button\';" value="Suchen"> |
||
23 | </form>'; |
||
24 | |||
25 | if ($suchbegriff != '') |
||
26 | { |
||
27 | echo '<b>Suchergebnisse für "'.$suchbegriff.'":</b><br><br>'; |
||
28 | gfx_begintable(); |
||
29 | $etwas_gefunden = false; |
||
30 | gfx_tablecontent('30', '', '', '<b>Modul</b>', '', '<b>ID</b>', '', '<b>Titel</b>', '', '', '', ''); |
||
31 | $res = db_query("SELECT `modul`, `table` FROM `".$mysql_zugangsdaten['praefix']."module` WHERE `is_searchable` = '1'"); |
||
32 | while ($row = db_fetch($res)) |
||
33 | { |
||
34 | $modulueberschrift = $row['modul']; |
||
35 | $modulsekpos = ''; |
||
36 | $modulpos = ''; |
||
37 | $modulrechte = ''; |
||
38 | $autor = ''; |
||
39 | $version = ''; |
||
40 | $menuevisible = ''; |
||
41 | $license = ''; |
||
42 | $deaktiviere_zugangspruefung = 0; |
||
43 | |||
8 | daniel-mar | 44 | if (file_exists('modules/'.wb_dir_escape($row['modul']).'/var.inc.php')) |
45 | include 'modules/'.wb_dir_escape($row['modul']).'/var.inc.php'; |
||
2 | daniel-mar | 46 | |
47 | $modulueberschrift_a = $modulueberschrift; |
||
48 | |||
8 | daniel-mar | 49 | if (($ib_user_type >= $modulrechte) && ((file_exists('modules/'.wb_dir_escape($row['modul']).'/seite_edit.inc.php')) || (file_exists('modules/'.wb_dir_escape($row['modul']).'/seite_view.inc.php')))) |
2 | daniel-mar | 50 | { |
51 | $que = generate_search_query($row['table'], 0, $suchbegriff); |
||
52 | $res2 = db_query($que); |
||
53 | |||
54 | while ($row2 = db_fetch($res2)) |
||
55 | { |
||
56 | if (isset($datenbanktabellen[$mysql_zugangsdaten['praefix'].$row['table']]['name'])) |
||
57 | { |
||
58 | $res3 = db_query("SELECT `name` FROM `".$mysql_zugangsdaten['praefix'].db_escape($row['table'])."` WHERE `id` = '".$row2['id']."'"); |
||
59 | $row3 = db_fetch($res3); |
||
60 | if ($row3['name'] != '') |
||
61 | $titel = $row3['name']; |
||
62 | else |
||
63 | $titel = '<i>Keine Angabe</i>'; |
||
64 | } |
||
65 | else |
||
66 | $titel = '<i>Keine Modulbetitelung</i>'; |
||
67 | |||
68 | $etwas_gefunden = true; |
||
69 | |||
8 | daniel-mar | 70 | if (file_exists('modules/'.wb_dir_escape($row['modul']).'/images/menu/32.png')) |
71 | $g = 'modules/'.wb_dir_escape($row['modul']).'/images/menu/32.png'; |
||
72 | else if (file_exists('modules/'.wb_dir_escape($row['modul']).'/images/menu/32.gif')) |
||
73 | $g = 'modules/'.wb_dir_escape($row['modul']).'/images/menu/32.gif'; |
||
2 | daniel-mar | 74 | else |
75 | $g = 'design/spacer.gif'; |
||
76 | |||
8 | daniel-mar | 77 | if (file_exists('modules/'.wb_dir_escape($row['modul']).'/images/menu/16.png')) |
78 | $k = 'modules/'.wb_dir_escape($row['modul']).'/images/menu/16.png'; |
||
79 | else if (file_exists('modules/'.wb_dir_escape($row['modul']).'/images/menu/16.gif')) |
||
80 | $k = 'modules/'.wb_dir_escape($row['modul']).'/images/menu/16.gif'; |
||
2 | daniel-mar | 81 | else |
82 | { |
||
8 | daniel-mar | 83 | if (file_exists('modules/'.wb_dir_escape($modul).'/item.gif')) |
84 | $k = 'modules/'.wb_dir_escape($modul).'/item.gif'; |
||
85 | else if (file_exists('modules/'.wb_dir_escape($modul).'/item.png')) |
||
86 | $k = 'modules/'.wb_dir_escape($modul).'/item.png'; |
||
2 | daniel-mar | 87 | else |
88 | $k = 'design/spacer.gif'; |
||
89 | } |
||
90 | |||
91 | $a = ''; |
||
92 | $b = ''; |
||
93 | |||
94 | if ($row['modul'] == 'user_ordner') |
||
95 | { |
||
96 | $res4 = db_query("SELECT `kategorie` FROM `".$mysql_zugangsdaten['praefix']."ordner` WHERE `id` = '".$row2['id']."'"); |
||
97 | $row4 = db_fetch($res4); |
||
98 | |||
99 | $modulueberschrift = $row4['kategorie']; |
||
100 | $modulsekpos = ''; |
||
101 | $modulpos = ''; |
||
102 | $modulrechte = ''; |
||
103 | $autor = ''; |
||
104 | $version = ''; |
||
105 | $menuevisible = ''; |
||
106 | $license = ''; |
||
107 | $deaktiviere_zugangspruefung = 0; |
||
108 | |||
8 | daniel-mar | 109 | if (file_exists('modules/'.wb_dir_escape($row4['kategorie']).'/var.inc.php')) |
110 | include 'modules/'.wb_dir_escape($row4['kategorie']).'/var.inc.php'; |
||
2 | daniel-mar | 111 | |
112 | $modulueberschrift_b = $modulueberschrift; |
||
113 | |||
8 | daniel-mar | 114 | if (file_exists('modules/'.wb_dir_escape($row4['kategorie']).'/seite_inhalt.inc.php')) |
115 | $a = '<a href="javascript:oop2(\''.$_SERVER['PHP_SELF'].'?seite=inhalt&modul='.urlencode($row4['kategorie']).'#ordner'.$row2['id'].'\', \''.$modulueberschrift_a.'\', \''.$g.'\');" class="menu">Öffnen</a>'; |
||
2 | daniel-mar | 116 | |
8 | daniel-mar | 117 | if (file_exists('modules/'.wb_dir_escape($row4['kategorie']).'/seite_inhalt.inc.php')) |
2 | daniel-mar | 118 | $c = '<a href="'.oop_link_to_modul($row4['kategorie']).'" class="menu">'.$modulueberschrift_b.'</a> ('.$modulueberschrift_a.')'; |
119 | else |
||
120 | $c = $modulueberschrift_b.' ('.$modulueberschrift_a.')'; |
||
121 | } |
||
122 | else |
||
123 | { |
||
8 | daniel-mar | 124 | if (file_exists('modules/'.wb_dir_escape($row['modul']).'/seite_view.inc.php')) |
125 | $a = '<a href="javascript:oop2(\''.$_SERVER['PHP_SELF'].'?seite=view&modul='.urlencode($row['modul']).'&id='.urlencode($row2['id']).'\', \''.$modulueberschrift_a.'\', \''.$g.'\');" class="menu">Öffnen</a>'; |
||
2 | daniel-mar | 126 | |
8 | daniel-mar | 127 | if (file_exists('modules/'.wb_dir_escape($row['modul']).'/seite_edit.inc.php')) |
128 | $b = '<a href="javascript:oop2(\''.$_SERVER['PHP_SELF'].'?seite=edit&modul='.urlencode($row['modul']).'&aktion=edit&id='.urlencode($row2['id']).'\', \''.$modulueberschrift_a.'\', \''.$g.'\');" class="menu">Bearbeiten</a>'; |
||
2 | daniel-mar | 129 | |
8 | daniel-mar | 130 | if (file_exists('modules/'.wb_dir_escape($row['modul']).'/seite_inhalt.inc.php')) |
2 | daniel-mar | 131 | $c = '<a href="'.oop_link_to_modul($row['modul']).'" class="menu">'.$modulueberschrift_a.'</a>'; |
132 | else |
||
133 | $c = $modulueberschrift_a; |
||
134 | } |
||
135 | |||
136 | gfx_tablecontent('', '<img src="'.$k.'" alt="" width="16" height="16">', '', $c, '', $row2['id'], '', $titel, '100', $a, '100', $b); |
||
137 | } |
||
138 | } |
||
139 | } |
||
140 | if (!$etwas_gefunden) |
||
141 | gfx_tablecontent('', 'Kein Datensatz gefunden!', '', '', '', '', '', '', '', '', '', ''); |
||
142 | gfx_endtable(); |
||
143 | } |
||
144 | |||
145 | echo $footer; |
||
146 | |||
3 | daniel-mar | 147 | ?> |