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


Viewing file:     Where.php (6.02 KB)      -rwxr-xr-x
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
/*
 *  $Id: Where.php 6366 2009-09-15 19:44:05Z 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_Query_Where
 *
 * @package     Doctrine
 * @subpackage  Query
 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL
 * @link        www.phpdoctrine.org
 * @since       1.0
 * @version     $Revision: 6366 $
 * @author      Konsta Vesterinen <kvesteri@cc.hut.fi>
 */
class Doctrine_Query_Where extends Doctrine_Query_Condition
{
    public function 
load($where)
    {
        
// Handle operator ("AND" | "OR"), reducing overhead of this method processment
        
$possibleOp strtolower($where);

        if (
$possibleOp == 'and' || $possibleOp == 'or')
        {
            return 
$where;
        }

        
$where $this->_tokenizer->bracketTrim(trim($where));
        
$conn  $this->query->getConnection();
        
$terms $this->_tokenizer->sqlExplode($where);  

        if (
count($terms) > 1) {
            if (
substr($where06) == 'EXISTS') {
                return 
$this->parseExists($wheretrue);
            } elseif (
substr($where010) == 'NOT EXISTS') {
                return 
$this->parseExists($wherefalse);
            }
        }

        if (
count($terms) < 3) {
            
$terms $this->_tokenizer->sqlExplode($where, array('=''<''<>''>''!='));
        }

        if (
count($terms) > 1) {
            
$leftExpr array_shift($terms);
            
$rightExpr array_pop($terms);
            
$operator trim(substr($wherestrlen($leftExpr), -strlen($rightExpr)));

            if (
strpos($leftExpr"'") === false && strpos($leftExpr'(') === false) {
                
// normal field reference found
                
$a explode('.'$leftExpr);
                
array_pop($a); // Discard the field name (not needed!)
                
$reference implode('.'$a);

                if (empty(
$reference)) {
                    
$map $this->query->getRootDeclaration();
                    
$alias $this->query->getSqlTableAlias($this->query->getRootAlias());
                } else {
                    
$map $this->query->load($referencefalse);
                    
$alias $this->query->getSqlTableAlias($reference);
                }
            }

            
$sql $this->_buildSql($leftExpr$operator$rightExpr);

            return 
$sql;
        } else {
            return 
$where;
        }
    }


    protected function 
_buildSql($leftExpr$operator$rightExpr)
    {
        
$leftExprOriginal $leftExpr;
        
$leftExpr $this->query->parseClause($leftExpr);

        
// BETWEEN operation
        
if ('BETWEEN' == strtoupper(substr($operator07))) {
            
$midExpr trim(substr($operator7, -3));
            
$operator 'BETWEEN ' $this->query->parseClause($midExpr) . ' AND';
        }

        
// NOT BETWEEN operation
        
if ('NOT BETWEEN' == strtoupper(substr($operator011))) {
            
$midExpr trim(substr($operator11, -3));
            
$operator 'NOT BETWEEN ' $this->query->parseClause($midExpr) . ' AND';
        }

        
$op strtolower($operator);
        
$isInX = ($op == 'in' || $op == 'not in');

        
// Check if we are not dealing with "obj.field IN :named"
        
if (substr($rightExpr1) == ':' && $isInX) {
            throw new 
Doctrine_Query_Exception(
                
'Cannot use ' $operator ' with a named parameter in "' .
                
$leftExprOriginal ' ' $operator ' ' $rightExpr '"'
            
);
        }
        
        
// Right Expression
        
$rightExpr = ($rightExpr == '?' && $isInX)
            ? 
$this->_buildWhereInArraySqlPart($rightExpr)
            : 
$this->query->parseClause($rightExpr);

        return 
$leftExpr ' ' $operator ' ' $rightExpr;
    }


    protected function 
_buildWhereInArraySqlPart($rightExpr)
    {
        
$params $this->query->getInternalParams();
        
$value = array();

        for (
$i 0$l count($params); $i $l$i++) {
            if (
is_array($params[$i])) {
                
$value array_fill(0count($params[$i]), $rightExpr);
                
$this->query->adjustProcessedParam($i);

                break;
            }
        }

        return 
'(' . (count($value) > implode(', '$value) : $rightExpr) . ')';
    }

    
/**
     * parses an EXISTS expression
     *
     * @param string $where         query where part to be parsed
     * @param boolean $negation     whether or not to use the NOT keyword
     * @return string
     */
    
public function parseExists($where$negation)
    {
        
$operator = ($negation) ? 'EXISTS' 'NOT EXISTS';

        
$pos strpos($where'(');

        if (
$pos == false) {
            throw new 
Doctrine_Query_Exception('Unknown expression, expected a subquery with () -marks');
        }

        
$sub $this->_tokenizer->bracketTrim(substr($where$pos));

        
$q $this->query->createSubquery()->parseDqlQuery($subfalse);
        
$sql $q->getSqlQuery();
        
$q->free();

        return 
$operator ' (' $sql ')';
    }
}

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