!C99Shell v.2.1 [PHP 7 Update] [1.12.2019]!

Software: Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/5.4.16. PHP/5.4.16 

uname -a: Linux roko-bkp 3.10.0-1160.102.1.el7.x86_64 #1 SMP Tue Oct 17 15:42:21 UTC 2023 x86_64 

uid=48(apache) gid=48(apache) groups=48(apache),1003(webmaster) 

Safe-mode: OFF (not secure)

/var/www/html/site/ipanel/app/core/doctrine/Doctrine/   drwxr-xr-x
Free 9.18 GB of 93.48 GB (9.82%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     Hook.php (7.2 KB)      -rwxr-xr-x
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
/*
 *  $Id: Hook.php 6799 2009-11-24 19:24:33Z jwage $
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 *
 * This software consists of voluntary contributions made by many individuals
 * and is licensed under the LGPL. For more information, see
 * <http://www.phpdoctrine.org>.
 */

/**
 * Doctrine_Hook
 *
 * @package     Doctrine
 * @subpackage  Hook
 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL
 * @link        www.phpdoctrine.org
 * @since       1.0
 * @version     $Revision: 6799 $
 * @author      Konsta Vesterinen <kvesteri@cc.hut.fi>
 */
class Doctrine_Hook
{
    
/**
     * @var Doctrine_Query $query           the base query
     */
    
protected $query;

    
/**
     * @var array $joins                    the optional joins of the base query
     */
    
protected $joins;

    
/**
     * @var array $hooks                    hooks array
     */
    
protected $hooks        = array(
                             
'where',
                             
'orderby',
                             
'limit',
                             
'offset'
                              
);

    
/**
     * @var array $fieldParsers             custom field parsers array
     *                                      keys as field names in the format componentAlias.FieldName
     *                                      values as parser names / objects
     */
    
protected $fieldParsers = array();

    
/**
     * @var array $typeParsers              type parsers array
     *                                      keys as type names and values as parser names / objects
     */
    
protected $typeParsers  = array(
                              
'char'      => 'Doctrine_Hook_WordLike',
                              
'string'    => 'Doctrine_Hook_WordLike',
                              
'varchar'   => 'Doctrine_Hook_WordLike',
                              
'integer'   => 'Doctrine_Hook_Integer',
                              
'enum'      => 'Doctrine_Hook_Integer',
                              
'time'      => 'Doctrine_Hook_Time',
                              
'date'      => 'Doctrine_Hook_Date',
                              );

    
/**
     * @param Doctrine_Query $query         the base query
     */
    
public function __construct($query)
    {
        if (
is_string($query)) {
            
$this->query Doctrine_Query::create();
            
$this->query->parseDqlQuery($query);
        } elseif (
$query instanceof Doctrine_Query) {
            
$this->query $query;
        } else {
            throw new 
Doctrine_Exception('Constructor argument should be either Doctrine_Query object or valid DQL query');          
        }
        
        
$this->query->getSqlQuery();
    }

    
/**
     * getQuery
     *
     * @return Doctrine_Query       returns the query object associated with this hook
     */
    
public function getQuery()
    {
        return 
$this->query;
    }

    
/**
     * setTypeParser
     *
     * @param string $type              type name
     * @param string|object $parser     parser name or custom parser object
     */
    
public function setTypeParser($type$parser
    {
        
$this->typeParsers[$type] = $parser;
    }

    
/**
     * setFieldParser
     *
     * @param string $field             field name
     * @param string|object $parser     parser name or custom parser object
     */
    
public function setFieldParser($field$parser)
    {
        
$this->fieldParsers[$field] = $parser;
    }

    
/**
     * hookWhere
     * builds DQL query where part from given parameter array
     *
     * @param array $params         an associative array containing field
     *                              names and their values
     * @return boolean              whether or not the hooking was
     */
    
public function hookWhere($params)
    {
        if ( ! 
is_array($params)) {
            return 
false;
        }
        foreach (
$params as $name => $value) {
            if (
$value === '' || $value === '-') {
                continue;
            }
            
$e explode('.'$name);

            if (
count($e) == 2) {
                list(
$alias$column) = $e;

                
$map   $this->query->getQueryComponent($alias);
                
$table $map['table'];

                if ( ! 
$table) {
                    throw new 
Doctrine_Exception('Unknown alias ' $alias);
                }

                if (
$def $table->getDefinitionOf($column)) {

                
$def[0] = gettype($value);
                    if (isset(
$this->typeParsers[$def[0]])) {
                        
$name   $this->typeParsers[$def[0]];
                        
$parser = new $name;
                    }

                    
$parser->parse($alias$column$value);

                    
$this->query->addWhere($parser->getCondition(), $parser->getParams());
                }
            }
        }

        return 
true;
    }

    
/**
     * hookOrderBy
     * builds DQL query orderby part from given parameter array
     *
     * @param array $params         an array containing all fields which the built query
     *                              should be ordered by
     * @return boolean              whether or not the hooking was successful
     */
    
public function hookOrderby($params)
    {
        if ( ! 
is_array($params)) {
            return 
false;
        }
        foreach (
$params as $name) {
            
$e explode(' '$name);

            
$order 'ASC';

            if (
count($e) > 1) {
                
$order = ($e[1] == 'DESC') ? 'DESC' 'ASC';
            }

            
$e explode('.'$e[0]);

            if (
count($e) == 2) {
                list(
$alias$column) = $e;

                
$map   $this->query->getQueryComponent($alias);
                
$table $map['table'];

                if (
$def $table->getDefinitionOf($column)) {   
                    
$this->query->addOrderBy($alias '.' $column ' ' $order);
                }
            }
        }
        return 
true;
    }

    
/**
     * set the hook limit 
     * 
     * @param integer $limit 
     * @return void
     */
    
public function hookLimit($limit)
    {
        
$this->query->limit((int) $limit);
    }

    
/**
     * set the hook offset
     *
     * @param integer $offset
     */
    
public function hookOffset($offset)
    {
        
$this->query->offset((int) $offset);
    }
}

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

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

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

--[ c99shell v.2.1 [PHP 7 Update] [1.12.2019] maintained by KaizenLouie and updated by cermmik | C99Shell Github (MySQL update) | Generation time: 0.0042 ]--