Quick Search:

View

Revision:

Diff

Diff from 978 to:

Annotations

Annotate by Age | Author | Mixed | None
/fisheye/browse/osCommerce/tags/oscommerce-3.0a3/admin/cache.php

Annotated File View

hpdl
1
1 <?php
2 /*
mattice
151
3   $Id: cache.php 758 2006-08-23 12:30:07Z hpdl $
hpdl
1
4
5   osCommerce, Open Source E-Commerce Solutions
6   http://www.oscommerce.com
7
hpdl
410
8   Copyright (c) 2006 osCommerce
hpdl
1
9
10   Released under the GNU General Public License
11 */
12
13   require('includes/application_top.php');
14
15   $action = (isset($_GET['action']) ? $_GET['action'] : '');
16
17   if (!empty($action)) {
18     switch ($action) {
19       case 'reset':
20         if (isset($_GET['cache']) && !empty($_GET['cache'])) {
21           osC_Cache::clear($_GET['cache']);
22         }
23
hpdl
758
24         osc_redirect(osc_href_link_admin(FILENAME_CACHE));
hpdl
1
25         break;
26     }
27   }
28
29 // check if the cache directory exists
30   if (is_dir(DIR_FS_WORK)) {
31     if (!is_writeable(DIR_FS_WORK)) $osC_MessageStack->add('header', ERROR_CACHE_DIRECTORY_NOT_WRITEABLE, 'error');
32   } else {
33     $osC_MessageStack->add('header', ERROR_CACHE_DIRECTORY_DOES_NOT_EXIST, 'error');
34   }
35
36   $page_contents = 'cache.php';
37
38   require('templates/default.php');
39
40   require('includes/application_bottom.php');
41 ?>