changeset 582 | a38876c0793c |
parent 581 | 5e8fd89c02ea |
child 590 | 03a60844c7c5 |
581:5e8fd89c02ea | 582:a38876c0793c |
---|---|
172 } |
172 } |
173 echo ' </table> |
173 echo ' </table> |
174 </div>'; |
174 </div>'; |
175 } |
175 } |
176 |
176 |
177 // Any hooks? |
|
178 $code = $plugins->setHook('acp_home'); |
|
179 foreach ( $code as $cmd ) |
|
180 { |
|
181 eval($cmd); |
|
182 } |
|
183 |
|
177 // Security log |
184 // Security log |
178 echo '<h3>' . $lang->get('acphome_heading_seclog') . '</h3>'; |
185 echo '<h3>' . $lang->get('acphome_heading_seclog') . '</h3>'; |
179 echo '<p>' . $lang->get('acphome_msg_seclog_info') . '</p>'; |
186 echo '<p>' . $lang->get('acphome_msg_seclog_info') . '</p>'; |
180 $seclog = get_security_log(5); |
187 $seclog = get_security_log(5); |
181 echo $seclog; |
188 echo $seclog; |
314 setConfig('avatar_upload_file', ( isset($_POST['avatar_upload_file']) ? '1' : '0' )); |
321 setConfig('avatar_upload_file', ( isset($_POST['avatar_upload_file']) ? '1' : '0' )); |
315 setConfig('avatar_upload_http', ( isset($_POST['avatar_upload_http']) ? '1' : '0' )); |
322 setConfig('avatar_upload_http', ( isset($_POST['avatar_upload_http']) ? '1' : '0' )); |
316 |
323 |
317 if ( is_dir(ENANO_ROOT . '/' . $_POST['avatar_directory']) ) |
324 if ( is_dir(ENANO_ROOT . '/' . $_POST['avatar_directory']) ) |
318 { |
325 { |
319 if ( preg_match('/^([A-z0-9_-]+)(\/([A-z0-9_-]+))*\/?$/', $_POST['avatar_directory']) ) |
326 if ( preg_match('/^[A-z0-9_-]+(?:\/(?:[A-z0-9_-]+))*\/?$/', $_POST['avatar_directory']) ) |
320 { |
327 { |
321 setConfig('avatar_directory', $_POST['avatar_directory']); |
328 setConfig('avatar_directory', $_POST['avatar_directory']); |
322 } |
329 } |
323 else |
330 else |
324 { |
331 { |
1942 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); |
1949 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); |
1943 exit; |
1950 exit; |
1944 } |
1951 } |
1945 else |
1952 else |
1946 { |
1953 { |
1954 $template->add_header('<script type="text/javascript" src="' . scriptPath . '/includes/clientside/static/admin-menu.js"></script>'); |
|
1947 $template->load_theme('admin', 'default'); |
1955 $template->load_theme('admin', 'default'); |
1948 $template->init_vars(); |
1956 $template->init_vars(); |
1949 if( !isset( $_GET['noheaders'] ) ) |
1957 if( !isset( $_GET['noheaders'] ) ) |
1950 { |
1958 { |
1951 $template->header(); |
1959 $template->header(); |
1960 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>'; |
1968 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>'; |
1961 return false; |
1969 return false; |
1962 } |
1970 } |
1963 if ( t == namespace_list.Admin + 'AdminLogout' ) |
1971 if ( t == namespace_list.Admin + 'AdminLogout' ) |
1964 { |
1972 { |
1973 load_component('messagebox'); |
|
1965 miniPromptMessage({ |
1974 miniPromptMessage({ |
1966 title: $lang.get('user_logout_confirm_title_elev'), |
1975 title: $lang.get('user_logout_confirm_title_elev'), |
1967 message: $lang.get('user_logout_confirm_body_elev'), |
1976 message: $lang.get('user_logout_confirm_body_elev'), |
1968 buttons: [ |
1977 buttons: [ |
1969 { |
1978 { |
2021 fadeInfoBoxes(); |
2030 fadeInfoBoxes(); |
2022 autofill_onload(); |
2031 autofill_onload(); |
2023 } |
2032 } |
2024 }); |
2033 }); |
2025 } |
2034 } |
2026 function _enanoAdminOnload() { ajaxPage('<?php echo $paths->nslist['Admin']; ?>Home'); } |
2035 <?php |
2036 if ( !isset($_GET['module']) ) |
|
2037 { |
|
2038 echo <<<EOF |
|
2039 var _enanoAdminOnload = function() { ajaxPage('{$paths->nslist['Admin']}Home'); }; |
|
2040 addOnloadHook(_enanoAdminOnload); |
|
2041 |
|
2042 EOF; |
|
2043 } |
|
2044 ?> |
|
2027 var TREE_TPL = { |
2045 var TREE_TPL = { |
2028 'target' : '_self', // name of the frame links will be opened in |
2046 'target' : '_self', // name of the frame links will be opened in |
2029 // other possible values are: _blank, _parent, _search, _self and _top |
2047 // other possible values are: _blank, _parent, _search, _self and _top |
2030 |
2048 |
2031 'icon_e' : '<?php echo scriptPath; ?>/images/icons/empty.gif', // empty image |
2049 'icon_e' : '<?php echo scriptPath; ?>/images/icons/empty.gif', // empty image |
2049 'icon_18' : '<?php echo scriptPath; ?>/images/icons/plusbottom.gif', // junction for closed node |
2067 'icon_18' : '<?php echo scriptPath; ?>/images/icons/plusbottom.gif', // junction for closed node |
2050 'icon_19' : '<?php echo scriptPath; ?>/images/icons/plus.gif', // junction for last closed node |
2068 'icon_19' : '<?php echo scriptPath; ?>/images/icons/plus.gif', // junction for last closed node |
2051 'icon_26' : '<?php echo scriptPath; ?>/images/icons/minusbottom.gif',// junction for opened node |
2069 'icon_26' : '<?php echo scriptPath; ?>/images/icons/minusbottom.gif',// junction for opened node |
2052 'icon_27' : '<?php echo scriptPath; ?>/images/icons/minus.gif' // junction for last opended node |
2070 'icon_27' : '<?php echo scriptPath; ?>/images/icons/minus.gif' // junction for last opended node |
2053 }; |
2071 }; |
2054 addOnloadHook(keepalive_onload); |
2072 |
2073 addOnloadHook(function() |
|
2074 { |
|
2075 load_component('ajax'); |
|
2076 load_component('l10n'); |
|
2077 load_component('autofill'); |
|
2078 keepalive_onload(); |
|
2079 }); |
|
2080 |
|
2055 <?php |
2081 <?php |
2056 echo $paths->parseAdminTree(); // Make a Javascript array that defines the tree |
2082 echo $paths->parseAdminTree(); // Make a Javascript array that defines the tree |
2057 if(!isset($_GET['module'])) { echo 'addOnloadHook(_enanoAdminOnload);'; } ?> |
2083 ?> |
2058 </script> |
2084 </script> |
2059 <table border="0" width="100%"> |
2085 <table border="0" width="100%"> |
2060 <tr> |
2086 <tr> |
2061 <td class="holder" valign="top"> |
2087 <td class="holder" valign="top"> |
2062 <div class="pad" style="padding-right: 20px;"> |
2088 <div class="pad" style="padding-right: 20px;"> |