Beispiel #1
0
$Tool = BaseTool::newFromArray(array('displayTitle' => $I18N->msg('title'), 'remoteBasePath' => $I18N->dashboardHome, 'localBasePath' => $I18N->localBaseDir, 'revisionId' => $I18N->version, 'styles' => array('main.css'), 'scripts' => array('main.js'), 'licenses' => array('CC-BY 3.0' => 'https://creativecommons.org/licenses/by/3.0/')));
$Tool->setSourceInfoGithub('Krinkle', 'intuition', dirname(__DIR__));
/**
 * Tool settings
 * -------------------------------------------------
 */
$toolSettings = array('tabs' => array());
/**
 * Post actions
 * -------------------------------------------------
 */
if (isset($_POST['action'])) {
    switch ($_POST['action']) {
        case 'prefset':
            // Set a 30-day, then redirect to index
            $I18N->setCookie('userlang', $_POST['fpLang']);
            $I18N->redirectTo($Tool->remoteBasePath, 302);
            break;
    }
}
/**
 * Get actions
 * -------------------------------------------------
 */
if (isset($_GET['action'])) {
    switch ($_GET['action']) {
        case 'clearcookies':
            $I18N->wipeCookies();
            $I18N->redirectTo($Tool->generatePermalink(array('msg' => 2)), 302);
            break;
        case 'renewcookies':