Exemple #1
0
    } else {
        if (!in_array($LANG, $c['languages.array']) && $LANG != "image" && $LANG != $c['admin.slug']) {
            $welcome_class = $c["welcome.page.slug"];
            $main_language = $c['main.language'];
            $redirect = new redirect();
            $redirect->go(WEBSITE . $main_language . "/" . $welcome_class);
        } else {
            if ($LANG == $c['admin.slug']) {
                $redirect = new redirect();
                $redirect->go(WEBSITE . $c['main.language'] . "/" . $c['admin.slug']);
            }
        }
    }
    $get_lang_id = new get_lang_id();
    $lang_id = $get_lang_id->id($c, $LANG);
    define('LANG', $LANG);
    define('LANG_ID', $lang_id);
    define('PRE_VIEW', $c["product.view.pre.slug"]);
    define('PRE_GALLERY', $c["gallery.view.pre.slug"]);
    define('WEB_DIR', $c["website.directory"]);
    define('TEMPLATE', WEBSITE . $c["website.directory"] . '/');
    define('MAIN_DIR', WEBSITE . LANG . '/');
    define('MAIN_PAGE', MAIN_DIR . "home");
    define('ADMIN_SLUG', $c['admin.slug']);
    $controller = new controller($c);
    $controller->loadpage($obj, $c);
    $fullPath = __DIR__ . "/_cache/";
    array_map('unlink', glob("{$fullPath}*.json"));
} catch (Exception $e) {
    echo "Critical error !";
}