Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- *
- * @ This file is created by deZender.Net
- * @ deZender (PHP5 Decoder for ionCube Loader)
- *
- * @ Version : 2.0.0.4
- * @ Author : DeZender
- * @ Release on : 21.10.2015
- * @ Official site : http://DeZender.Net
- *
- */
- $app = require_once __DIR__ . "/bootstrap.php";
- Symfony\Component\Debug\ErrorHandler::register();
- Symfony\Component\Debug\ExceptionHandler::register();
- $app["debug"] = true;
- $app->get("rest/Pengguna", "Admin\\Administrasi::Pengguna");
- $app->get("/Test", function ($request) use ($app) {
- return "test";
- });
- $app->get("login", function ($request) use ($app) {
- $config = $app["xond.config"];
- $cekInstall = file_exists("install/install_pass");
- if (!$cekInstall)
- {
- return $app->redirect("/install_config");
- }
- if ($app["session"]->get("username"))
- {
- return $app["twig"]->render("main.html", array("judul" => JUDUL, "bosnya" => BOSNYA, "id_level_wilayah" => ID_LEVEL_WILAYAH, "kode_wilayah" => KODE_WILAYAH, "apptitle" => $config["nama_aplikasi"], "error" => $app["security.last_error"]($request), "last_username" => $app["session"]->get("_security.last_username")));
- }
- return $app["twig"]->render(LOGIN_PAGE . ".html", array("judul" => JUDUL, "bosnya" => BOSNYA, "id_level_wilayah" => ID_LEVEL_WILAYAH, "kode_wilayah" => KODE_WILAYAH, "logo_filename" => LOGO_FILENAME, "tahun" => date("Y"), "apptitle" => $config["nama_aplikasi"], "error" => $app["security.last_error"]($request), "last_username" => $app["session"]->get("_security.last_username")));
- });
- $app->get("/", function ($request) use ($app) {
- $config = $app["xond.config"];
- $cekInstall = file_exists("install/install_pass");
- if (!$cekInstall)
- {
- return $app->redirect("/install_config");
- }
- if (HARUS_LOGIN == true)
- {
- if ($app["session"]->get("username"))
- {
- return $app["twig"]->render("main.html", array("judul" => JUDUL, "bosnya" => BOSNYA, "id_level_wilayah" => ID_LEVEL_WILAYAH, "kode_wilayah" => KODE_WILAYAH, "apptitle" => $config["nama_aplikasi"], "error" => $app["security.last_error"]($request), "last_username" => $app["session"]->get("_security.last_username")));
- }
- return $app["twig"]->render(LOGIN_PAGE . ".html", array("judul" => JUDUL, "bosnya" => BOSNYA, "id_level_wilayah" => ID_LEVEL_WILAYAH, "kode_wilayah" => KODE_WILAYAH, "logo_filename" => LOGO_FILENAME, "apptitle" => $config["nama_aplikasi"]));
- }
- return $app["twig"]->render("main.html", array("judul" => JUDUL, "bosnya" => BOSNYA, "id_level_wilayah" => ID_LEVEL_WILAYAH, "kode_wilayah" => KODE_WILAYAH, "apptitle" => $config["nama_aplikasi"], "error" => $app["security.last_error"]($request), "last_username" => $app["session"]->get("_security.last_username")));
- })->bind("homepage");
- $app->get("install_config_sto", "Admin\\Install::install_config_sto");
- $app->get("install_config", "Admin\\Install::install_config_sto");
- $app->post("install_manual_sto", "Admin\\Install::install_manual_sto");
- $app->get("/install_manual", function ($request) use ($app) {
- $config = $app["xond.config"];
- $add = $request->get("add");
- $cekInstall = file_exists("install/install_pass");
- if ($cekInstall)
- {
- return $app->redirect("/");
- }
- return $app["twig"]->render("install_kipy.html", array("error_msg" => "", "judul" => JUDUL, "bosnya" => BOSNYA, "id_level_wilayah" => ID_LEVEL_WILAYAH, "kode_wilayah" => KODE_WILAYAH, "logo_filename" => LOGO_FILENAME));
- });
- $app->post("/prosesPilihDapodik", "Admin\\SwitchingApp::SwitchingApp");
- $app->get("/login", function ($request) use ($app) {
- $config = $app["xond.config"];
- if (100 < strlen($app["security.last_error"]($request)))
- {
- $errorMsg = "Terjadi galat. Mohon hubungi sysadmin";
- }
- else
- {
- $errorMsg = "";
- }
- return $app["twig"]->render(LOGIN_PAGE . ".html", array("apptitle" => $config["nama_aplikasi"], "login_background_style" => $config["login_background_style"], "login_header_pic" => $config["login_header_pic"], "error" => $errorMsg, "last_username" => $app["session"]->get("_security.last_username")));
- });
- $app["security.firewalls"] = array("login_path" => array("pattern" => "^/login\$", "anonymous" => true), "passgen" => array("pattern" => "^/passgen.*\$", "anonymous" => true), "default" => array("pattern" => "^/.*\$", "anonymous" => true, "form" => array("login_path" => "/login", "check_path" => "/login_check"), "logout" => array("logout_path" => "/logout", "invalidate_session" => false), "users" => $app->share(function ($app) {
- return new Xond\Auth\UserProvider($app);
- })));
- $app["security.access_rules"] = array(array("^/login\$", "IS_AUTHENTICATED_ANONYMOUSLY"), array("^/.+\$", "IS_AUTHENTICATED_ANONYMOUSLY"));
- $app->before(function ($request) use ($app) {
- $token = $app["security"]->getToken();
- if (null !== $token)
- {
- $user = $token->getUser();
- if (is_object($user))
- {
- $cGen = new Xond\Util\ExtCookieGenerator();
- .....................................................................................................................
- ...................................................................
- ...............
Advertisement
Add Comment
Please, Sign In to add comment