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.126
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/Controller/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/html/sura/src/Controller/StaticController.php
<?php

namespace App\Controller;

use App\Entity\Resources;
use App\Entity\ResourcesType;
use App\Repository\BuyContentPageRepository;
use App\Repository\PageRepository;
use App\Repository\ResourcesRepository;
use App\Repository\SellContentPageRepository;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\BinaryFileResponse;
use Symfony\Component\HttpFoundation\ResponseHeaderBag;
use Symfony\Component\Routing\Annotation\Route;
/**
 * @Route("/static", name="static_")
 */
class StaticController extends AbstractController
{
    /**
     * @Route("/", name="index")
     */
    public function index()
    {
        return $this->render('static/index.html.twig', [
            'controller_name' => 'StaticController',
        ]);
    }
    /**
     * @Route("/about-us/", name="about")
     */
    public function about()
    {
        return $this->render('static/about.html.twig', [
            'controller_name' => 'StaticController',
        ]);
    }
    /**
     * @Route("/faq/", name="faq")
     */
    public function faq()
    {
        return $this->render('static/faq.html.twig', [
            'controller_name' => 'StaticController',
        ]);
    }
    /**
     * @Route("/blogs/", name="blogs")
     */
    public function blogs()
    {
        return $this->render('static/blogs.html.twig', [
            'controller_name' => 'StaticController',
        ]);
    }
    /**
     * @Route("/single-blog/", name="blog")
     */
    public function blog()
    {
        return $this->render('static/single-blog.html.twig', [
            'controller_name' => 'StaticController',
        ]);
    }
    /**
     * @Route("/contact-us/", name="contact")
     */
    public function contact()
    {
        return $this->render('static/contact.html.twig', [
            'controller_name' => 'StaticController',
        ]);
    }
    /**
     * @Route("/resources/{slug}/", name="resources")
     */
    public function resources(ResourcesRepository $resourcesRepository, ResourcesType $resourcesType)
    {
        return $this->render('static/resources.html.twig', [
            'controller_name' => 'StaticController',
//            'resources' => $resourcesRepository->findAll()
            'resources' => $resourcesType->getResources(),
            'type' => $resourcesType
        ]);
    }

    /**
     * @Route("/become-a-contributor/", name="contributor")
     * @param SellContentPageRepository $sellContentPageRepository
     * @return \Symfony\Component\HttpFoundation\Response
     */
    public function contributor(SellContentPageRepository $sellContentPageRepository)
    {
        $sellContentPage = $sellContentPageRepository->count([]) > 0 ? $sellContentPageRepository->findAll()[0] : null;
        return $this->render('static/contributor.html.twig', [
            'controller_name' => 'StaticController',
            'page' => $sellContentPage
        ]);
    }

    /**
     * @Route("/contributor-guidelines/", name="contributor_guidelines")
     */
    public function contributorGuidelines()
    {
        return $this->render('static/cont_guidelines.html.twig', [
            'controller_name' => 'StaticController',
            'page' => null
        ]);
    }

    /**
     * @Route("/become-a-member/", name="member")
     */
    public function member(BuyContentPageRepository $buyContentPageRepository)
    {
        $page = $buyContentPageRepository->count([]) > 0 ? $buyContentPageRepository->findAll()[0] : null;
        return $this->render('static/member.html.twig', [
            'controller_name' => 'StaticController',
            'page' => $page
        ]);
    }

    /**
     * @Route("/terms-and-conditions/", name="terms")
     */
    public function terms()
    {
        return $this->render('static/terms_condition.html.twig', [
            'controller_name' => 'StaticController',
        ]);
    }

    /**
     * @Route("/contibutor-terms/", name="conterms")
     */
    public function conterms(PageRepository $pageRepository)
    {
        $contributorAgreementPage = $pageRepository->findOneBy(['slug'=>'contributor-agreement']);

        return $this->render('static/contributor_terms.html.twig', [
            'controller_name' => 'StaticController',
            'page' => $contributorAgreementPage
        ]);
    }

    /**
     * @Route("/{slug}", name="download_resource")
     */
    public function readResource(Resources $resource)
    {
        $file = new \SplFileInfo($this->getParameter("page_images_directory"). DIRECTORY_SEPARATOR. $resource->getFile());
        $fileName = $resource->getTitle()." Sura Images.".$file->getExtension();
        $response = new BinaryFileResponse($file);
        $response->setContentDisposition(ResponseHeaderBag::DISPOSITION_ATTACHMENT, $fileName);
        return $response;
    }
}

Youez - 2016 - github.com/yon3zu
LinuXploit