!C99Shell v. 2.0 [PHP 7 Update] [25.02.2019]!

Software: Apache/2.2.22 (Debian). PHP/5.6.36 

uname -a: Linux h05.hvosting.ua 4.9.110-amd64 #3 SMP Sun Nov 4 16:27:09 UTC 2018 x86_64 

uid=1389(h33678) gid=1099(h33678) groups=1099(h33678),502(mgrsecure) 

Safe-mode: OFF (not secure)

/home/h33678/data/www/it-man.ztu.edu.ua/src/vendor/laravel/framework/src/Illuminate/Validation/   drwxr-xr-x
Free 116.5 GB of 200.55 GB (58.09%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


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

namespace Illuminate\Validation;

use 
Illuminate\Support\Str;
use 
Illuminate\Database\ConnectionResolverInterface;

class 
DatabasePresenceVerifier implements PresenceVerifierInterface
{
    
/**
     * The database connection instance.
     *
     * @var \Illuminate\Database\ConnectionResolverInterface
     */
    
protected $db;

    
/**
     * The database connection to use.
     *
     * @var string
     */
    
protected $connection null;

    
/**
     * Create a new database presence verifier.
     *
     * @param  \Illuminate\Database\ConnectionResolverInterface  $db
     * @return void
     */
    
public function __construct(ConnectionResolverInterface $db)
    {
        
$this->db $db;
    }

    
/**
     * Count the number of objects in a collection having the given value.
     *
     * @param  string  $collection
     * @param  string  $column
     * @param  string  $value
     * @param  int     $excludeId
     * @param  string  $idColumn
     * @param  array   $extra
     * @return int
     */
    
public function getCount($collection$column$value$excludeId null$idColumn null, array $extra = [])
    {
        
$query $this->table($collection)->where($column'='$value);

        if (! 
is_null($excludeId) && $excludeId != 'NULL') {
            
$query->where($idColumn ?: 'id''<>'$excludeId);
        }

        foreach (
$extra as $key => $extraValue) {
            
$this->addWhere($query$key$extraValue);
        }

        return 
$query->count();
    }

    
/**
     * Count the number of objects in a collection with the given values.
     *
     * @param  string  $collection
     * @param  string  $column
     * @param  array   $values
     * @param  array   $extra
     * @return int
     */
    
public function getMultiCount($collection$column, array $values, array $extra = [])
    {
        
$query $this->table($collection)->whereIn($column$values);

        foreach (
$extra as $key => $extraValue) {
            
$this->addWhere($query$key$extraValue);
        }

        return 
$query->count();
    }

    
/**
     * Add a "where" clause to the given query.
     *
     * @param  \Illuminate\Database\Query\Builder  $query
     * @param  string  $key
     * @param  string  $extraValue
     * @return void
     */
    
protected function addWhere($query$key$extraValue)
    {
        if (
$extraValue === 'NULL') {
            
$query->whereNull($key);
        } elseif (
$extraValue === 'NOT_NULL') {
            
$query->whereNotNull($key);
        } elseif (
Str::startsWith($extraValue'!')) {
            
$query->where($key'!='mb_substr($extraValue1));
        } else {
            
$query->where($key$extraValue);
        }
    }

    
/**
     * Get a query builder for the given table.
     *
     * @param  string  $table
     * @return \Illuminate\Database\Query\Builder
     */
    
protected function table($table)
    {
        return 
$this->db->connection($this->connection)->table($table)->useWritePdo();
    }

    
/**
     * Set the connection to be used.
     *
     * @param  string  $connection
     * @return void
     */
    
public function setConnection($connection)
    {
        
$this->connection $connection;
    }
}

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ ok ]

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

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

--[ c99shell v. 2.0 [PHP 7 Update] [25.02.2019] maintained by PinoyWH1Z | C99Shell Github | Generation time: 0.0232 ]--