blob: 7b01c974b17d59970c035780f2c9b517e056aa5c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
<?php
require_once __DIR__.'/../app/app.php';
require_once __DIR__.'/inc/auth.inc.php';
if (isset($_POST['purge'])) {
$dir = __DIR__.'/../cache/';
$dh = opendir($dir);
while ($filename = readdir($dh)) {
if ($filename == '.' or $filename == '..') {
continue;
}
if (filemtime($dir . DIRECTORY_SEPARATOR . $filename) < time()) {
@unlink($dir . DIRECTORY_SEPARATOR . $filename);
}
}
}
header('Location: administration.php');
die();
|