[ Index ]
 

Code source de e107 0.7.8

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/e107_admin/ -> cache.php (source)

   1  <?php
   2  /*
   3  + ----------------------------------------------------------------------------+
   4  |     e107 website system
   5  |
   6  |     ©Steve Dunstan 2001-2002
   7  |     http://e107.org
   8  |     jalist@e107.org
   9  |
  10  |     Released under the terms and conditions of the
  11  |     GNU General Public License (http://gnu.org).
  12  |
  13  |     $Source: /cvsroot/e107/e107_0.7/e107_admin/cache.php,v $
  14  |     $Revision: 1.9 $
  15  |     $Date: 2006/02/16 21:51:39 $
  16  |     $Author: whoisrich $
  17  +----------------------------------------------------------------------------+
  18  */
  19  require_once ("../class2.php");
  20  if (!getperms("C")) {
  21      header("location:".e_BASE."index.php");
  22      exit;
  23  }
  24  $e_sub_cat = 'cache';
  25  require_once ("auth.php");
  26  require_once(e_HANDLER."cache_handler.php");
  27  $ec = new ecache;
  28  if ($pref['cachestatus'] == '2') {
  29      $pref['cachestatus'] = '1';
  30  }
  31  if (isset($_POST['submit_cache'])) {
  32      if ($pref['cachestatus'] != $_POST['cachestatus']) {
  33          $pref['cachestatus'] = $_POST['cachestatus'];
  34          save_prefs();
  35          $ec->clear();
  36          $update = true;
  37      }
  38      admin_update($update, 'update', CACLAN_4);
  39  }
  40      
  41  if (isset($_POST['empty_cache'])) {
  42      $ec->clear();
  43      $ns->tablerender(LAN_UPDATE, "<div style='text-align:center'><b>".CACLAN_6."</b></div>");
  44  }
  45      
  46  $text = "<div style='text-align:center'>
  47      <form method='post' action='".e_SELF."'>
  48      <table style='".ADMIN_WIDTH."' class='fborder'>
  49      <tr>
  50      <td class='fcaption'>".CACLAN_1."</td>
  51      </tr>
  52      <tr>
  53      <td class='forumheader3'>";
  54  $text .= (!$pref['cachestatus']) ? "<input type='radio' name='cachestatus' value='0' checked='checked' />" :
  55   "<input type='radio' name='cachestatus' value='0' />";
  56  $text .= CACLAN_7."
  57      </td>
  58      </tr>
  59       
  60      <tr>
  61      <td class='forumheader3'>";
  62  if (is_writable(e_FILE."cache")) {
  63      $text .= ('1' == $pref['cachestatus']) ? "<input type='radio' name='cachestatus' value='1' checked='checked' />" :
  64       "<input type='radio' name='cachestatus' value='1' />";
  65      $text .= CACLAN_9;
  66  } else {
  67      $text .= CACLAN_9."<br /><br /><b>".CACLAN_10."</b>";
  68  }
  69  $text .= "</td>
  70      </tr>
  71       
  72      <tr style='vertical-align:top'>
  73      <td style='text-align:center' class='forumheader'>
  74       
  75      <input class='button' type='submit' name='submit_cache' value='".CACLAN_2."' />
  76      <input class='button' type='submit' name='empty_cache' value='".CACLAN_5."' />
  77       
  78      </td>
  79      </tr>
  80      </table>
  81      </form>
  82      </div>";
  83      
  84  $ns->tablerender(CACLAN_3, $text);
  85      
  86  require_once ("footer.php");
  87  ?>


Généré le : Sun Apr 1 01:23:32 2007 par Balluche grâce à PHPXref 0.7