!C99Shell v. 2.1 [PHP 8 Update] [02.02.2022]!

Software: Apache/2.4.53 (Unix) OpenSSL/1.1.1o PHP/7.4.29 mod_perl/2.0.12 Perl/v5.34.1. PHP/7.4.29 

uname -a: Linux vps-2738122-x 4.15.0-213-generic #224-Ubuntu SMP Mon Jun 19 13:30:12 UTC 2023 x86_64 

uid=1(daemon) gid=1(daemon) grupos=1(daemon) 

Safe-mode: OFF (not secure)

/opt/lampp/phpmyadmin/libraries/classes/Export/   drwxr-xr-x
Free 13.54 GB of 61.93 GB (21.86%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     TemplateModel.php (4.34 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php

declare(strict_types=1);

namespace 
PhpMyAdmin\Export;

use 
PhpMyAdmin\DatabaseInterface;
use 
PhpMyAdmin\Dbal\DatabaseName;
use 
PhpMyAdmin\Dbal\TableName;
use 
PhpMyAdmin\Util;

use function 
sprintf;

final class 
TemplateModel
{
    
/** @var DatabaseInterface */
    
private $dbi;

    public function 
__construct(DatabaseInterface $dbi)
    {
        
$this->dbi $dbi;
    }

    public function 
create(DatabaseName $dbTableName $tableTemplate $template): string
    
{
        
$query sprintf(
            
'INSERT INTO %s.%s (`username`, `export_type`, `template_name`, `template_data`)'
                
' VALUES (\'%s\', \'%s\', \'%s\', \'%s\');',
            
Util::backquote($db),
            
Util::backquote($table),
            
$this->dbi->escapeString($template->getUsername()),
            
$this->dbi->escapeString($template->getExportType()),
            
$this->dbi->escapeString($template->getName()),
            
$this->dbi->escapeString($template->getData())
        );
        
$result $this->dbi->tryQueryAsControlUser($query);
        if (
$result !== false) {
            return 
'';
        }

        return 
$this->dbi->getError(DatabaseInterface::CONNECT_CONTROL);
    }

    public function 
delete(DatabaseName $dbTableName $tablestring $userint $id): string
    
{
        
$query sprintf(
            
'DELETE FROM %s.%s WHERE `id` = %s AND `username` = \'%s\';',
            
Util::backquote($db),
            
Util::backquote($table),
            
$id,
            
$this->dbi->escapeString($user)
        );
        
$result $this->dbi->tryQueryAsControlUser($query);
        if (
$result !== false) {
            return 
'';
        }

        return 
$this->dbi->getError(DatabaseInterface::CONNECT_CONTROL);
    }

    
/**
     * @return Template|string
     */
    
public function load(DatabaseName $dbTableName $tablestring $userint $id)
    {
        
$query sprintf(
            
'SELECT * FROM %s.%s WHERE `id` = %s AND `username` = \'%s\';',
            
Util::backquote($db),
            
Util::backquote($table),
            
$id,
            
$this->dbi->escapeString($user)
        );
        
$result $this->dbi->tryQueryAsControlUser($query);
        if (
$result === false) {
            return 
$this->dbi->getError(DatabaseInterface::CONNECT_CONTROL);
        }

        
$data = [];
        while (
$row $result->fetchAssoc()) {
            
$data $row;
        }

        return 
Template::fromArray([
            
'id' => (int) $data['id'],
            
'username' => $data['username'],
            
'exportType' => $data['export_type'],
            
'name' => $data['template_name'],
            
'data' => $data['template_data'],
        ]);
    }

    public function 
update(DatabaseName $dbTableName $tableTemplate $template): string
    
{
        
$query sprintf(
            
'UPDATE %s.%s SET `template_data` = \'%s\' WHERE `id` = %s AND `username` = \'%s\';',
            
Util::backquote($db),
            
Util::backquote($table),
            
$this->dbi->escapeString($template->getData()),
            
$template->getId(),
            
$this->dbi->escapeString($template->getUsername())
        );
        
$result $this->dbi->tryQueryAsControlUser($query);
        if (
$result !== false) {
            return 
'';
        }

        return 
$this->dbi->getError(DatabaseInterface::CONNECT_CONTROL);
    }

    
/**
     * @return Template[]|string
     */
    
public function getAll(DatabaseName $dbTableName $tablestring $userstring $exportType)
    {
        
$query sprintf(
            
'SELECT * FROM %s.%s WHERE `username` = \'%s\' AND `export_type` = \'%s\' ORDER BY `template_name`;',
            
Util::backquote($db),
            
Util::backquote($table),
            
$this->dbi->escapeString($user),
            
$this->dbi->escapeString($exportType)
        );
        
$result $this->dbi->tryQueryAsControlUser($query);
        if (
$result === false) {
            return 
$this->dbi->getError(DatabaseInterface::CONNECT_CONTROL);
        }

        
$templates = [];
        while (
$row $result->fetchAssoc()) {
            
$templates[] = Template::fromArray([
                
'id' => (int) $row['id'],
                
'username' => $row['username'],
                
'exportType' => $row['export_type'],
                
'name' => $row['template_name'],
                
'data' => $row['template_data'],
            ]);
        }

        return 
$templates;
    }
}

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.1 [PHP 8 Update] [02.02.2022] maintained byC99Shell Github | Generation time: 0.4718 ]--