if (isset($_SESSION['username']) || $status->user) { $service = 'http' . (isset($_SERVER['HTTPS']) ? 's' : '') . '://' . "{$_SERVER['HTTP_HOST']}{$_SERVER['REQUEST_URI']}"; $redirect_url = $payutcClient->getCasUrl() . "logout?url=" . urlencode($service); } session_destroy(); $app->response->redirect($redirect_url, 303); }); /* Installation/Configuration zone */ $app->get('/getsql', function () use($app, $payutcClient, $admin, $isAdminFondation) { // Remove flash (we are on the good page to install/configure system) $app->flashNow('info', null); $app->render('header.php', array()); if ($admin) { $app->render('sql.php', array("desc" => Desc::install(), "choice" => Choice::install(), "option" => Option::install())); } else { $app->render('install_not_admin.php', array("status" => $payutcClient->getStatus(), "debug" => $payutcClient->cookie)); } $app->render('footer.php', array('isAdminFondation' => $isAdminFondation)); }); // Install options $app->get('/install', function () use($app, $payutcClient, $admin, $isAdminFondation) { // Remove flash (we are on the good page to install/configure system) $app->flashNow('info', null); $app->render('header.php', array()); if ($admin) { $app->render('install.php', array()); } else { $app->render('install_not_admin.php', array("status" => $payutcClient->getStatus(), "debug" => $payutcClient->cookie)); }