|
1 <?php |
|
2 |
|
3 /* |
|
4 * Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between |
|
5 * Version 1.1.4 (Caoineag alpha 4) |
|
6 * Copyright (C) 2006-2008 Dan Fuhry |
|
7 * |
|
8 * This program is Free Software; you can redistribute and/or modify it under the terms of the GNU General Public License |
|
9 * as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. |
|
10 * |
|
11 * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied |
|
12 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for details. |
|
13 */ |
|
14 |
|
15 // Cache manager - regenerate and clear various cached values |
|
16 |
|
17 function page_Admin_CacheManager() |
|
18 { |
|
19 global $db, $session, $paths, $template, $plugins; // Common objects |
|
20 global $lang; |
|
21 if ( $session->auth_level < USER_LEVEL_ADMIN || $session->user_level < USER_LEVEL_ADMIN ) |
|
22 { |
|
23 $login_link = makeUrlNS('Special', 'Login/' . $paths->nslist['Special'] . 'Administration', 'level=' . USER_LEVEL_ADMIN, true); |
|
24 echo '<h3>' . $lang->get('adm_err_not_auth_title') . '</h3>'; |
|
25 echo '<p>' . $lang->get('adm_err_not_auth_body', array( 'login_link' => $login_link )) . '</p>'; |
|
26 return; |
|
27 } |
|
28 |
|
29 echo '<h3><img alt=" " src="' . scriptPath . '/images/icons/applets/cachemanager.png" /> ' . $lang->get('acpcm_heading_main') . '</h3>'; |
|
30 echo '<p>' . $lang->get('acpcm_intro') . '</p>'; |
|
31 |
|
32 acp_start_form(); |
|
33 ?> |
|
34 <div class="tblholder"> |
|
35 <table border="0" cellspacing="1" cellpadding="4"> |
|
36 <!-- HEADER --> |
|
37 <tr> |
|
38 <th colspan="2"> |
|
39 <?php echo $lang->get('acpcm_table_header'); ?> |
|
40 </th> |
|
41 </tr> |
|
42 |
|
43 <!-- ENABLE CACHE --> |
|
44 <tr> |
|
45 <td class="row1" colspan="2"> |
|
46 <label> |
|
47 <input type="checkbox" name="cache_thumbs"<?php if ( getConfig('cache_thumbs') == '1' ) echo ' checked="checked"'; ?> /> |
|
48 <?php echo $lang->get('acpcm_lbl_enable_cache'); ?> |
|
49 </label> |
|
50 <br /> |
|
51 <small> |
|
52 <?php echo $lang->get('acpcm_hint_enable_cache'); ?> |
|
53 </small> |
|
54 </td> |
|
55 </tr> |
|
56 |
|
57 <!-- CLEAR ALL --> |
|
58 <tr> |
|
59 <td class="row2"> |
|
60 <input type="submit" name="clear_all" value="<?php echo $lang->get('acpcm_btn_clear_all'); ?>" /> |
|
61 </td> |
|
62 <td class="row2"> |
|
63 <?php echo $lang->get('acpcm_hint_clear_all'); ?> |
|
64 </td> |
|
65 </tr> |
|
66 |
|
67 <!-- REFRESH ALL --> |
|
68 <tr> |
|
69 <td class="row1"> |
|
70 <input type="submit" name="refresh_all" value="<?php echo $lang->get('acpcm_btn_refresh_all'); ?>" /> |
|
71 </td> |
|
72 <td class="row1"> |
|
73 <?php echo $lang->get('acpcm_hint_refresh_all'); ?> |
|
74 </td> |
|
75 </tr> |
|
76 |
|
77 <!-- SAVE CHANGES --> |
|
78 <tr> |
|
79 <th colspan="2" class="subhead"> |
|
80 <input type="submit" name="save" value="<?php echo $lang->get('etc_save_changes'); ?>" style="font-weight: bold;" /> |
|
81 <input type="submit" name="cancel" value="<?php echo $lang->get('etc_cancel'); ?>" /> |
|
82 </th> |
|
83 </tr> |
|
84 </table> |
|
85 </div> |
|
86 <?php |
|
87 echo '</form>'; |
|
88 } |
|
89 |
|
90 ?> |