!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/Cell/   drwxr-xr-x
Free 13.16 GB of 57.97 GB (22.7%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


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

namespace PhpOffice\PhpSpreadsheet\Cell;

use 
DateTimeInterface;
use 
PhpOffice\PhpSpreadsheet\RichText\RichText;
use 
PhpOffice\PhpSpreadsheet\Shared\StringHelper;

class 
StringValueBinder implements IValueBinder
{
    
/**
     * @var bool
     */
    
protected $convertNull true;

    
/**
     * @var bool
     */
    
protected $convertBoolean true;

    
/**
     * @var bool
     */
    
protected $convertNumeric true;

    
/**
     * @var bool
     */
    
protected $convertFormula true;

    public function 
setNullConversion(bool $suppressConversion false): self
    
{
        
$this->convertNull $suppressConversion;

        return 
$this;
    }

    public function 
setBooleanConversion(bool $suppressConversion false): self
    
{
        
$this->convertBoolean $suppressConversion;

        return 
$this;
    }

    public function 
getBooleanConversion(): bool
    
{
        return 
$this->convertBoolean;
    }

    public function 
setNumericConversion(bool $suppressConversion false): self
    
{
        
$this->convertNumeric $suppressConversion;

        return 
$this;
    }

    public function 
setFormulaConversion(bool $suppressConversion false): self
    
{
        
$this->convertFormula $suppressConversion;

        return 
$this;
    }

    public function 
setConversionForAllValueTypes(bool $suppressConversion false): self
    
{
        
$this->convertNull $suppressConversion;
        
$this->convertBoolean $suppressConversion;
        
$this->convertNumeric $suppressConversion;
        
$this->convertFormula $suppressConversion;

        return 
$this;
    }

    
/**
     * Bind value to a cell.
     *
     * @param Cell $cell Cell to bind value to
     * @param mixed $value Value to bind in cell
     */
    
public function bindValue(Cell $cell$value)
    {
        if (
is_object($value)) {
            return 
$this->bindObjectValue($cell$value);
        }

        
// sanitize UTF-8 strings
        
if (is_string($value)) {
            
$value StringHelper::sanitizeUTF8($value);
        }

        if (
$value === null && $this->convertNull === false) {
            
$cell->setValueExplicit($valueDataType::TYPE_NULL);
        } elseif (
is_bool($value) && $this->convertBoolean === false) {
            
$cell->setValueExplicit($valueDataType::TYPE_BOOL);
        } elseif ((
is_int($value) || is_float($value)) && $this->convertNumeric === false) {
            
$cell->setValueExplicit($valueDataType::TYPE_NUMERIC);
        } elseif (
is_string($value) && strlen($value) > && $value[0] === '=' && $this->convertFormula === false) {
            
$cell->setValueExplicit($valueDataType::TYPE_FORMULA);
        } else {
            if (
is_string($value) && strlen($value) > && $value[0] === '=') {
                
$cell->getStyle()->setQuotePrefix(true);
            }
            
$cell->setValueExplicit((string) $valueDataType::TYPE_STRING);
        }

        return 
true;
    }

    protected function 
bindObjectValue(Cell $cellobject $value): bool
    
{
        
// Handle any objects that might be injected
        
if ($value instanceof DateTimeInterface) {
            
$value $value->format('Y-m-d H:i:s');
        } elseif (
$value instanceof RichText) {
            
$cell->setValueExplicit($valueDataType::TYPE_INLINE);

            return 
true;
        }

        
$cell->setValueExplicit((string) $valueDataType::TYPE_STRING); // @phpstan-ignore-line

        
return true;
    }
}

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