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