Rev 301 | Rev 307 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 301 | Rev 305 | ||
---|---|---|---|
Line 31... | Line 31... | ||
31 | var the_arr = the_url.split('/'); |
31 | var the_arr = the_url.split('/'); |
32 | if (the_arr.pop() == '') the_arr.pop(); |
32 | if (the_arr.pop() == '') the_arr.pop(); |
33 | return( the_arr.join('/') ); |
33 | return( the_arr.join('/') ); |
34 | } |
34 | } |
35 | function checkAccess(dir) { |
35 | function checkAccess(dir) { |
36 | url = '../' + dir; |
36 | var url = '../' + dir; |
37 | visibleUrl = RemoveLastDirectoryPartOf(window.location.href) + '/' + dir; // xhr.responseURL not available in IE |
37 | var visibleUrl = RemoveLastDirectoryPartOf(window.location.href) + '/' + dir; // xhr.responseURL not available in IE |
38 | 38 | ||
39 | var xhr = new XMLHttpRequest(); |
39 | var xhr = new XMLHttpRequest(); |
40 | xhr.onreadystatechange = function() { |
40 | xhr.onreadystatechange = function() { |
41 | if (xhr.readyState === 4) { |
41 | if (xhr.readyState === 4) { |
42 | if (xhr.status === 200) { |
42 | if (xhr.status === 200) { |
Line 49... | Line 49... | ||
49 | xhr.open('GET', url); |
49 | xhr.open('GET', url); |
50 | xhr.send(); |
50 | xhr.send(); |
51 | } |
51 | } |
52 | 52 | ||
53 | document.getElementById('dirAccessWarning').innerHTML = ""; |
53 | document.getElementById('dirAccessWarning').innerHTML = ""; |
54 | checkAccess('userdata/'); |
54 | checkAccess('userdata/index.html'); |
55 | checkAccess('dev/'); |
55 | checkAccess('dev/index.html'); |
56 | checkAccess('includes/'); |
56 | checkAccess('includes/index.html'); |
57 | //checkAccess('plugins/publicPages/100_whois/whois/cli/'); |
57 | //checkAccess('plugins/publicPages/100_whois/whois/cli/index.html'); |
58 | </script> |
58 | </script> |
59 | 59 | ||
60 | <div id="step1"> |
60 | <div id="step1"> |
61 | <h2>Step 1: Enter setup information</h2> |
61 | <h2>Step 1: Enter setup information</h2> |
62 | 62 | ||
Line 121... | Line 121... | ||
121 | $sql_slang_selection[] = '<option value="'.$slang_id.'">'.$human_friendly_name.'</option>'; |
121 | $sql_slang_selection[] = '<option value="'.$slang_id.'">'.$human_friendly_name.'</option>'; |
122 | } |
122 | } |
123 | } |
123 | } |
124 | $sql_slang_selection = implode("\n", $sql_slang_selection); |
124 | $sql_slang_selection = implode("\n", $sql_slang_selection); |
125 | 125 | ||
126 | $files = array(); |
126 | $found_db_plugins = 0; |
127 | - | ||
128 | $ary = OIDplus::getAllPluginManifests('database'); |
127 | OIDplus::registerAllPlugins('database', 'OIDplusDatabasePlugin', null); |
129 | foreach ($ary as $plugintype_folder => $bry) { |
- | |
130 | foreach ($bry as $pluginname_folder => $cry) { |
128 | foreach (get_declared_classes() as $c) { |
131 | if (!isset($cry['Setup'])) continue; |
- | |
132 | foreach ($cry['Setup'] as $dry_name => $dry) { |
129 | if (is_subclass_of($c, 'OIDplusDatabasePlugin')) { |
133 | if ($dry_name != 'htmlpart') continue; |
- | |
134 | foreach ($dry as $html_file) { |
130 | $found_db_plugins++; |
135 | $files[] = OIDplus::basePath().'/plugins/'.$plugintype_folder.'/'.$pluginname_folder.'/'.$html_file; |
- | |
136 | } |
- | |
137 | } |
- | |
138 | } |
- | |
139 | } |
- | |
140 | - | ||
141 | foreach ($files as $file) { |
- | |
142 | $cont = file_get_contents($file); |
131 | $cont = $c::setupHTML(); |
143 | $cont = str_replace('<!-- %SQL_SLANG_SELECTION% -->', $sql_slang_selection, $cont); |
132 | $cont = str_replace('<!-- %SQL_SLANG_SELECTION% -->', $sql_slang_selection, $cont); |
144 | echo $cont; |
133 | echo $cont; |
145 | } |
134 | } |
- | 135 | } |
|
- | 136 | ||
146 | if (count($files) == 0) { |
137 | if ($found_db_plugins == 0) { |
147 | echo '<p><font color="red">ERROR: No database plugins were found! You CANNOT use OIDplus without database connection.</font></p>'; |
138 | echo '<p><font color="red">ERROR: No database plugins were found! You CANNOT use OIDplus without database connection.</font></p>'; |
148 | } |
139 | } |
149 | 140 | ||
150 | ?> |
141 | ?> |
151 | 142 |