public function action($action)
 {
     switch ($action) {
         case "maj_config":
             AdmParseur::getInstance()->update_config();
             break;
         case 'clear_cache':
             AdmParseur::getInstance()->clear_cache();
             break;
         case 'check_cache':
             AdmParseur::getInstance()->check_cache();
             break;
         case 'check_cache_dir':
             AdmParseur::getInstance()->check_cache_dir();
             break;
     }
 }
Пример #2
0
<?php

require_once "auth.php";
require_once "../fonctions/divers.php";
if (!est_autorise("acces_configuration")) {
    exit;
}
$request = \Symfony\Component\HttpFoundation\Request::createFromGlobals();
ActionsAdminParseur::getInstance()->action($request->get("action"));
$adm = new AdmParseur();
$adm->prepare_page();
?>
<!DOCTYPE html>
<html lang="fr">
    <head>
        <?php 
require_once "title.php";
?>
    </head>
<body>
<?php 
$menu = "configuration";
$breadcrumbs = Breadcrumb::getInstance()->getConfigurationList(trad('Gestion_cache', 'admin'));
require_once "entete.php";
?>
    <div class="row-fluid">
        <div class="span12">
            <h3><?php 
echo trad('CONFIGURATION', 'admin');
?>
</h3>
Пример #3
0
        }
        ActionsModules::instance()->appel_module("clear_cache");
    }
    public function check_cache()
    {
        Analyse::cleanup_cache($this->cache_dir, 1);
    }
    public function check_cache_dir()
    {
        if (!is_dir($this->cache_dir)) {
            mkdir($this->cache_dir, 0777, true);
            @clearstatcache();
        }
    }
}
$adm = new AdmParseur();
$commande = lireParam('commande', 'string');
switch ($commande) {
    case 'maj_config':
        $adm->update_config();
        break;
    case 'clear_cache':
        $adm->clear_cache();
        break;
    case 'check_cache':
        $adm->check_cache();
        break;
    case 'patch':
        $adm->patch();
        break;
    case 'check_cache_dir':