!C99Shell v. 1.0 pre-release build #13!

Software: Apache. PHP/5.5.15 

uname -a: Windows NT SVR-DMZ 6.1 build 7600 (Windows Server 2008 R2 Enterprise Edition) i586 

SYSTEM 

Safe-mode: OFF (not secure)

E:\xampp\xampp\php\PEAR\Zend\Search\Lucene\Search\Query\   drwxrwxrwx
Free 7.25 GB of 239.26 GB (3.03%)
Detected drives: [ a ] [ c ] [ d ] [ e ] [ f ]
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     Term.php (6.17 KB)      -rw-rw-rw-
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
/**
 * Zend Framework
 *
 * LICENSE
 *
 * This source file is subject to the new BSD license that is bundled
 * with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://framework.zend.com/license/new-bsd
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@zend.com so we can send you a copy immediately.
 *
 * @category   Zend
 * @package    Zend_Search_Lucene
 * @subpackage Search
 * @copyright  Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
 * @license    http://framework.zend.com/license/new-bsd     New BSD License
 * @version    $Id: Term.php 18954 2009-11-12 20:01:33Z alexander $
 */


/** Zend_Search_Lucene_Search_Query */
require_once 'Zend/Search/Lucene/Search/Query.php';


/**
 * @category   Zend
 * @package    Zend_Search_Lucene
 * @subpackage Search
 * @copyright  Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
 * @license    http://framework.zend.com/license/new-bsd     New BSD License
 */
class Zend_Search_Lucene_Search_Query_Term extends Zend_Search_Lucene_Search_Query
{
    
/**
     * Term to find.
     *
     * @var Zend_Search_Lucene_Index_Term
     */
    
private $_term;

    
/**
     * Documents vector.
     *
     * @var array
     */
    
private $_docVector null;

    
/**
     * Term freqs vector.
     * array(docId => freq, ...)
     *
     * @var array
     */
    
private $_termFreqs;


    
/**
     * Zend_Search_Lucene_Search_Query_Term constructor
     *
     * @param Zend_Search_Lucene_Index_Term $term
     * @param boolean $sign
     */
    
public function __construct(Zend_Search_Lucene_Index_Term $term)
    {
        
$this->_term $term;
    }

    
/**
     * Re-write query into primitive queries in the context of specified index
     *
     * @param Zend_Search_Lucene_Interface $index
     * @return Zend_Search_Lucene_Search_Query
     */
    
public function rewrite(Zend_Search_Lucene_Interface $index)
    {
        if (
$this->_term->field != null) {
            return 
$this;
        } else {
            require_once 
'Zend/Search/Lucene/Search/Query/MultiTerm.php';
            
$query = new Zend_Search_Lucene_Search_Query_MultiTerm();
            
$query->setBoost($this->getBoost());

            require_once 
'Zend/Search/Lucene/Index/Term.php';
            foreach (
$index->getFieldNames(true) as $fieldName) {
                
$term = new Zend_Search_Lucene_Index_Term($this->_term->text$fieldName);

                
$query->addTerm($term);
            }

            return 
$query->rewrite($index);
        }
    }

    
/**
     * Optimize query in the context of specified index
     *
     * @param Zend_Search_Lucene_Interface $index
     * @return Zend_Search_Lucene_Search_Query
     */
    
public function optimize(Zend_Search_Lucene_Interface $index)
    {
        
// Check, that index contains specified term
        
if (!$index->hasTerm($this->_term)) {
            require_once 
'Zend/Search/Lucene/Search/Query/Empty.php';
            return new 
Zend_Search_Lucene_Search_Query_Empty();
        }

        return 
$this;
    }


    
/**
     * Constructs an appropriate Weight implementation for this query.
     *
     * @param Zend_Search_Lucene_Interface $reader
     * @return Zend_Search_Lucene_Search_Weight
     */
    
public function createWeight(Zend_Search_Lucene_Interface $reader)
    {
        require_once 
'Zend/Search/Lucene/Search/Weight/Term.php';
        
$this->_weight = new Zend_Search_Lucene_Search_Weight_Term($this->_term$this$reader);
        return 
$this->_weight;
    }

    
/**
     * Execute query in context of index reader
     * It also initializes necessary internal structures
     *
     * @param Zend_Search_Lucene_Interface $reader
     * @param Zend_Search_Lucene_Index_DocsFilter|null $docsFilter
     */
    
public function execute(Zend_Search_Lucene_Interface $reader$docsFilter null)
    {
        
$this->_docVector array_flip($reader->termDocs($this->_term$docsFilter));
        
$this->_termFreqs $reader->termFreqs($this->_term$docsFilter);

        
// Initialize weight if it's not done yet
        
$this->_initWeight($reader);
    }

    
/**
     * Get document ids likely matching the query
     *
     * It's an array with document ids as keys (performance considerations)
     *
     * @return array
     */
    
public function matchedDocs()
    {
        return 
$this->_docVector;
    }

    
/**
     * Score specified document
     *
     * @param integer $docId
     * @param Zend_Search_Lucene_Interface $reader
     * @return float
     */
    
public function score($docIdZend_Search_Lucene_Interface $reader)
    {
        if (isset(
$this->_docVector[$docId])) {
            return 
$reader->getSimilarity()->tf($this->_termFreqs[$docId]) *
                   
$this->_weight->getValue() *
                   
$reader->norm($docId$this->_term->field) *
                   
$this->getBoost();
        } else {
            return 
0;
        }
    }

    
/**
     * Return query terms
     *
     * @return array
     */
    
public function getQueryTerms()
    {
        return array(
$this->_term);
    }

    
/**
     * Return query term
     *
     * @return Zend_Search_Lucene_Index_Term
     */
    
public function getTerm()
    {
        return 
$this->_term;
    }

    
/**
     * Query specific matches highlighting
     *
     * @param Zend_Search_Lucene_Search_Highlighter_Interface $highlighter  Highlighter object (also contains doc for highlighting)
     */
    
protected function _highlightMatches(Zend_Search_Lucene_Search_Highlighter_Interface $highlighter)
    {
        
$highlighter->highlight($this->_term->text);
    }

    
/**
     * Print a query
     *
     * @return string
     */
    
public function __toString()
    {
        
// It's used only for query visualisation, so we don't care about characters escaping
        
if ($this->_term->field !== null) {
            
$query $this->_term->field ':';
        } else {
            
$query '';
        }

        
$query .= $this->_term->text;

        if (
$this->getBoost() != 1) {
            
$query $query '^' round($this->getBoost(), 4);
        }

        return 
$query;
    }
}


:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ ok ]

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

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

--[ c99shell v. 1.0 pre-release build #13 powered by Captain Crunch Security Team | http://ccteam.ru | Generation time: 0.0156 ]--