403Webshell
Server IP : 85.158.181.41  /  Your IP : 216.73.217.12
Web Server : Apache
System : Linux cloud9-vm129 6.1.178+1-ph #ph SMP PREEMPT_DYNAMIC Wed Jul 29 09:00:54 UTC 2026 x86_64
User : moncbefd ( 1024)
PHP Version : 7.3.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/moncbefd/www.moneta.at/GXMainComponents/Services/Core/Content/Repositories/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/moncbefd/www.moneta.at/GXMainComponents/Services/Core/Content/Repositories/ContentReader.php
<?php
/* --------------------------------------------------------------
  ContentReader.php 2019-07-30
  Gambio GmbH
  http://www.gambio.de
  Copyright (c) 2019 Gambio GmbH
  Released under the GNU General Public License (Version 2)
  [http://www.gnu.org/licenses/gpl-2.0.html]
  --------------------------------------------------------------*/

/**
 * Class ContentReader
 */
class ContentReader implements ContentReaderInterface
{
    /**
     * CodeIgniter QueryBuilder
     *
     * @var CI_DB_query_builder
     */
    protected $queryBuilder;
    
    
    /**
     * ContentReader constructor.
     *
     * @param CI_DB_query_builder $queryBuilder
     */
    public function __construct(CI_DB_query_builder $queryBuilder)
    {
        $this->queryBuilder = $queryBuilder;
    }
    
    
    /**
     * @param mixed $id id of the Content
     *
     * @return array
     * @throws ContentNotFoundException
     */
    public function findById($id): array
    {
        $result = $this->queryBuilder->select('*')
            ->from('content_manager')
            ->where('content_group', $id)
            ->get()
            ->result_array();
        
        if (count($result) === 0) {
            
            throw new ContentNotFoundException($id);
        }
        
        return $result;
    }
    
    
    /**
     * @param $id
     *
     * @return array
     * @throws UrlRewriteNotFoundException
     */
    public function findUrlRewriteByContentId($id): array
    {
        $result = $this->queryBuilder->select('*')
            ->from('url_rewrites')
            ->where('content_id', $id)
            ->get()
            ->result_array();
        
        if (count($result) === 0) {
            
            throw new UrlRewriteNotFoundException($id);
        }
        
        return $result;
    }
    
    
    /**
     * @return int
     */
    public function nextContentGroupId(): int
    {
        $result = $this->queryBuilder->select('MAX(content_group)')->from('content_manager')->get()->result_array();
        $result = (int)$result[0]['MAX(content_group)'];
        
        return ++$result;
    }
    
    
    /**
     * @return array
     * @throws ContentNotFoundException
     */
    public function findAllInfoElements(): array
    {
        $result = $this->queryBuilder->select()
            ->from('content_manager')
            ->like('content_position', 'elements', 'after')
            ->order_by('content_group')
            ->get()
            ->result_array();
        
        if (count($result) === 0) {
            
            throw new ContentNotFoundException('*');
        }
        
        return $result;
    }
}

Youez - 2016 - github.com/yon3zu
LinuXploit