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

Software: Apache/2.4.41 (Ubuntu). PHP/8.0.30 

uname -a: Linux apirnd 5.4.0-204-generic #224-Ubuntu SMP Thu Dec 5 13:38:28 UTC 2024 x86_64 

uid=33(www-data) gid=33(www-data) groups=33(www-data) 

Safe-mode: OFF (not secure)

/usr/share/phpmyadmin/libraries/   drwxr-xr-x
Free 13.06 GB of 57.97 GB (22.53%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     tbl_partition_definition.inc.php (5.38 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
/* vim: set expandtab sw=4 ts=4 sts=4: */
/**
 * Table partition definition
 *
 * @package PhpMyAdmin
 */

use PhpMyAdmin\Core;

if (!isset(
$partitionDetails)) {

    
$partitionDetails = array();

    
// Extract some partitioning and subpartitioning parameters from the request
    
$partitionParams = array(
        
'partition_by''partition_expr',
        
'subpartition_by''subpartition_expr',
    );
    foreach (
$partitionParams as $partitionParam) {
        
$partitionDetails[$partitionParam] = isset($_POST[$partitionParam])
            ? 
$_POST[$partitionParam] : '';
    }

    if (
Core::isValid($_POST['partition_count'], 'numeric')) {
        
// MySQL's limit is 8192, so do not allow more
        
$partition_count min(intval($_POST['partition_count']), 8192);
    } else {
        
$partition_count 0;
    }
    
$partitionDetails['partition_count']
        = (
$partition_count === 0) ? '' $partition_count;
    if (
Core::isValid($_POST['subpartition_count'], 'numeric')) {
        
// MySQL's limit is 8192, so do not allow more
        
$subpartition_count min(intval($_POST['subpartition_count']), 8192);
    } else {
        
$subpartition_count 0;
    }
    
$partitionDetails['subpartition_count']
        = (
$subpartition_count === 0) ? '' $subpartition_count;

    
// Only LIST and RANGE type parameters allow subpartitioning
    
$partitionDetails['can_have_subpartitions'] = $partition_count 1
        
&& isset($_POST['partition_by'])
        && (
$_POST['partition_by'] == 'RANGE'
        
|| $_POST['partition_by'] == 'RANGE COLUMNS'
        
|| $_POST['partition_by'] == 'LIST'
        
|| $_POST['partition_by'] == 'LIST COLUMNS');

    
// Values are specified only for LIST and RANGE type partitions
    
$partitionDetails['value_enabled'] = isset($_POST['partition_by'])
        && (
$_POST['partition_by'] == 'RANGE'
        
|| $_POST['partition_by'] == 'RANGE COLUMNS'
        
|| $_POST['partition_by'] == 'LIST'
        
|| $_POST['partition_by'] == 'LIST COLUMNS');

    
// Has partitions
    
if ($partition_count 1) {
        
$partitions = isset($_POST['partitions'])
            ? 
$_POST['partitions']
            : array();

        
// Remove details of the additional partitions
        // when number of partitions have been reduced
        
array_splice($partitions$partition_count);

        for (
$i 0$i $partition_count$i++) {
            if (! isset(
$partitions[$i])) { // Newly added partition
                
$partitions[$i] = array(
                    
'name' => 'p' $i,
                    
'value_type' => '',
                    
'value' => '',
                    
'engine' => '',
                    
'comment' => '',
                    
'data_directory' => '',
                    
'index_directory' => '',
                    
'max_rows' => '',
                    
'min_rows' => '',
                    
'tablespace' => '',
                    
'node_group' => '',
                );
            }

            
$partition =& $partitions[$i];
            
$partition['prefix'] = 'partitions[' $i ']';

            
// Changing from HASH/KEY to RANGE/LIST
            
if (! isset($partition['value_type'])) {
                
$partition['value_type'] = '';
                
$partition['value'] = '';
            }
            if (! isset(
$partition['engine'])) { // When removing subpartitioning
                
$partition['engine'] = '';
                
$partition['comment'] = '';
                
$partition['data_directory'] = '';
                
$partition['index_directory'] = '';
                
$partition['max_rows'] = '';
                
$partition['min_rows'] = '';
                
$partition['tablespace'] = '';
                
$partition['node_group'] = '';
            }

            if (
$subpartition_count 1
                
&& $partitionDetails['can_have_subpartitions'] == true
            
) { // Has subpartitions
                
$partition['subpartition_count'] = $subpartition_count;

                if (! isset(
$partition['subpartitions'])) {
                    
$partition['subpartitions'] = array();
                }
                
$subpartitions =& $partition['subpartitions'];

                
// Remove details of the additional subpartitions
                // when number of subpartitions have been reduced
                
array_splice($subpartitions$subpartition_count);

                for (
$j 0$j $subpartition_count$j++) {
                    if (! isset(
$subpartitions[$j])) { // Newly added subpartition
                        
$subpartitions[$j] = array(
                            
'name' => $partition['name'] . '_s' $j,
                            
'engine' => '',
                            
'comment' => '',
                            
'data_directory' => '',
                            
'index_directory' => '',
                            
'max_rows' => '',
                            
'min_rows' => '',
                            
'tablespace' => '',
                            
'node_group' => '',
                        );
                    }

                    
$subpartition =& $subpartitions[$j];
                    
$subpartition['prefix'] = 'partitions[' $i ']'
                        
'[subpartitions][' $j ']';
                }
            } else { 
// No subpartitions
                
unset($partition['subpartitions']);
                unset(
$partition['subpartition_count']);
            }
        }
        
$partitionDetails['partitions'] = $partitions;
    }
}

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

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

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

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