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