changeset 653 | 3ea1c552e734 |
parent 650 | e45183014778 |
child 683 | fcc494e02baf |
652:26ce2694d43f | 653:3ea1c552e734 |
---|---|
68 require(ENANO_ROOT . '/plugins/admin/CacheManager.php'); |
68 require(ENANO_ROOT . '/plugins/admin/CacheManager.php'); |
69 |
69 |
70 // Set the theme |
70 // Set the theme |
71 $session->theme = 'admin'; |
71 $session->theme = 'admin'; |
72 $session->style = 'default'; |
72 $session->style = 'default'; |
73 |
|
74 $template->add_header('<script type="text/javascript" src="' . cdnPath . '/includes/clientside/static/admin-menu.js"></script>'); |
|
73 } |
75 } |
74 } |
76 } |
75 |
77 |
76 // For convenience and nothing more. |
78 // For convenience and nothing more. |
77 function acp_start_form() |
79 function acp_start_form() |
136 echo '<h3>' . $lang->get('acphome_msg_demo_title') . '</h3> |
138 echo '<h3>' . $lang->get('acphome_msg_demo_title') . '</h3> |
137 <p>' . $lang->get('acphome_msg_demo_body', array('reset_url' => makeUrlNS('Special', 'DemoReset', false, true))) . '</p>'; |
139 <p>' . $lang->get('acphome_msg_demo_body', array('reset_url' => makeUrlNS('Special', 'DemoReset', false, true))) . '</p>'; |
138 } |
140 } |
139 |
141 |
140 // Check for the installer scripts |
142 // Check for the installer scripts |
141 if( ( file_exists(ENANO_ROOT.'/install.php') || file_exists(ENANO_ROOT.'/schema.sql') ) && !defined('ENANO_DEMO_MODE') ) |
143 if( file_exists(ENANO_ROOT.'/install/install.php') && !defined('ENANO_DEMO_MODE') ) |
142 { |
144 { |
143 echo '<div class="error-box"> |
145 echo '<div class="error-box"> |
144 ' . $lang->get('acphome_msg_install_files') . ' |
146 ' . $lang->get('acphome_msg_install_files') . ' |
145 </div>'; |
147 </div>'; |
146 } |
148 } |
2017 redirect(makeUrlNS('Special', 'Login/'.$paths->page, 'level='.USER_LEVEL_ADMIN), 'Not authorized', 'You need an authorization level of '.USER_LEVEL_ADMIN.' to use this page, your auth level is: ' . $session->auth_level, 0); |
2019 redirect(makeUrlNS('Special', 'Login/'.$paths->page, 'level='.USER_LEVEL_ADMIN), 'Not authorized', 'You need an authorization level of '.USER_LEVEL_ADMIN.' to use this page, your auth level is: ' . $session->auth_level, 0); |
2018 exit; |
2020 exit; |
2019 } |
2021 } |
2020 else |
2022 else |
2021 { |
2023 { |
2022 $template->add_header('<script type="text/javascript" src="' . cdnPath . '/includes/clientside/static/admin-menu.js"></script>'); |
|
2023 if( !isset( $_GET['noheaders'] ) ) |
2024 if( !isset( $_GET['noheaders'] ) ) |
2024 { |
2025 { |
2025 $template->header(); |
2026 $template->header(); |
2026 } |
2027 } |
2027 echo $lang->get('adm_page_tagline'); |
2028 echo $lang->get('adm_page_tagline'); |
2151 <table border="0" width="100%"> |
2152 <table border="0" width="100%"> |
2152 <tr> |
2153 <tr> |
2153 <td class="holder" valign="top"> |
2154 <td class="holder" valign="top"> |
2154 <div class="pad" style="padding-right: 20px;"> |
2155 <div class="pad" style="padding-right: 20px;"> |
2155 <script type="text/javascript"> |
2156 <script type="text/javascript"> |
2156 if ( !KILL_SWITCH ) |
2157 if ( !KILL_SWITCH ) |
2157 { |
2158 { |
2158 new tree(TREE_ITEMS, TREE_TPL); |
2159 new tree(TREE_ITEMS, TREE_TPL); |
2159 } |
2160 } |
2160 </script> |
2161 </script> |
2161 </div> |
2162 </div> |
2162 </td> |
2163 </td> |
2163 <td width="100%" valign="top"> |
2164 <td width="100%" valign="top"> |
2164 <div class="pad" id="ajaxPageContainer"> |
2165 <div class="pad" id="ajaxPageContainer"> |
2180 $s = strpos($fname, '?noheaders'); |
2181 $s = strpos($fname, '?noheaders'); |
2181 if($s) $fname = substr($fname, 0, $s); |
2182 if($s) $fname = substr($fname, 0, $s); |
2182 $paths->cpage['module'] = $_GET['module']; |
2183 $paths->cpage['module'] = $_GET['module']; |
2183 if ( function_exists($fname) && $_GET['module'] != $paths->nslist['Special'] . 'Administration' ) |
2184 if ( function_exists($fname) && $_GET['module'] != $paths->nslist['Special'] . 'Administration' ) |
2184 { |
2185 { |
2185 eval($fname.'();'); |
2186 call_user_func($fname); |
2186 } |
2187 } |
2187 } |
2188 } |
2188 else |
2189 else |
2189 { |
2190 { |
2190 echo '<script type="text/javascript">document.write(\'<div class="wait-box">Please wait while the administration panel loads. You need to be using a recent browser with AJAX support in order to use Runt.</div>\');</script><noscript><div class="error-box">It looks like Javascript isn\'t enabled in your browser. Please enable Javascript or use a different browser to continue.</div></noscript>'; |
2191 echo '<script type="text/javascript">document.write(\'<div class="wait-box">Please wait while the administration panel loads. You need to be using a recent browser with AJAX support in order to use Runt.</div>\');</script><noscript><div class="error-box">It looks like Javascript isn\'t enabled in your browser. Please enable Javascript or use a different browser to continue.</div></noscript>'; |
2191 } |
2192 } |
2192 ?> |
2193 ?> |
2193 </div> |
2194 </div> |
2194 <script type="text/javascript"> |
2195 <script type="text/javascript"> |
2195 if ( KILL_SWITCH ) |
2196 addOnloadHook(function() |
2196 { |
2197 { |
2197 document.getElementById('ajaxPageContainer').innerHTML = '<div class="error-box">Because of the lack of AJAX support, support for Internet Explorer versions less than 6.0 has been disabled in Runt. You can download and use Mozilla Firefox (or Seamonkey under Windows 95); both have an up-to-date standards-compliant rendering engine that has been tested thoroughly with Enano.</div>'; |
2198 if ( KILL_SWITCH ) |
2198 } |
2199 { |
2200 document.getElementById('ajaxPageContainer').innerHTML = '<div class="error-box">Because of the lack of AJAX support, support for Internet Explorer versions less than 6.0 has been disabled in Runt. You can download and use Mozilla Firefox (or Seamonkey under Windows 95); both have an up-to-date standards-compliant rendering engine that has been tested thoroughly with Enano.</div>'; |
|
2201 } |
|
2202 } |
|
2203 ); |
|
2199 </script> |
2204 </script> |
2200 </td> |
2205 </td> |
2201 </tr> |
2206 </tr> |
2202 </table> |
2207 </table> |
2203 |
2208 |