ShellBanner
System:Linux MiraNet 3.0.0-14-generic-pae #23-Ubuntu SMP Mon Nov 21 22:07:10 UTC 2011 i686
Software:Apache. PHP/5.3.6-13ubuntu3.10
ID:uid=65534(nobody) gid=65534(nogroup) groups=65534(nogroup)
Safe Mode:OFF
Open_Basedir:OFF
Freespace:24.76 GB of 70.42 GB (35.17%)
MySQL: ON MSSQL: OFF Oracle: OFF PostgreSQL: OFF Curl: OFF Sockets: ON Fetch: OFF Wget: ON Perl: ON
Disabled Functions: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,

/ http/ yalagina/ administrator/ components/ com_modules/ models/ - drwxr-xr-x

Directory:
Viewing file:     select.php (4.17 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
/**
 * @package        Joomla.Administrator
 * @subpackage    com_modules
 * @copyright    Copyright (C) 2005 - 2012 Open Source Matters, Inc. All rights reserved.
 * @license        GNU General Public License version 2 or later; see LICENSE.txt
 */

// No direct access.
defined('_JEXEC') or die;

jimport('joomla.application.component.modellist');

/**
 * Module model.
 *
 * @package        Joomla.Administrator
 * @subpackage    com_modules
 * @since        1.6
 */
class ModulesModelSelect extends JModelList
{
    
/**
     * Method to auto-populate the model state.
     *
     * Note. Calling getState in this method will result in recursion.
     *
     * @since    1.6
     */
    
protected function populateState($ordering null$direction null)
    {
        
// Initialise variables.
        
$app JFactory::getApplication('administrator');

        
// Load the filter state.
        
$clientId $app->getUserState('com_modules.modules.filter.client_id'0);
        
$this->setState('filter.client_id', (int) $clientId);

        
// Load the parameters.
        
$params    JComponentHelper::getParams('com_modules');
        
$this->setState('params'$params);

        
// Manually set limits to get all modules.
        
$this->setState('list.limit'0);
        
$this->setState('list.start'0);
        
$this->setState('list.ordering''a.name');
        
$this->setState('list.direction''ASC');
    }

    
/**
     * Method to get a store id based on model configuration state.
     *
     * This is necessary because the model is used by the component and
     * different modules that might need different sets of data or different
     * ordering requirements.
     *
     * @param    string    A prefix for the store id.
     *
     * @return    string    A store id.
     */
    
protected function getStoreId($id '')
    {
        
// Compile the store id.
        
$id    .= ':'.$this->getState('filter.client_id');

        return 
parent::getStoreId($id);
    }

    
/**
     * Build an SQL query to load the list data.
     *
     * @return    JDatabaseQuery
     */
    
protected function getListQuery()
    {
        
// Create a new query object.
        
$db        $this->getDbo();
        
$query    $db->getQuery(true);

        
// Select the required fields from the table.
        
$query->select(
            
$this->getState(
                
'list.select',
                
'a.extension_id, a.name, a.element AS module'
            
)
        );
        
$query->from($db->quoteName('#__extensions').' AS a');

        
// Filter by module
        
$query->where('a.type = '.$db->Quote('module'));

        
// Filter by client.
        
$clientId $this->getState('filter.client_id');
        
$query->where('a.client_id = '.(int) $clientId);

        
// Filter by enabled
        
$query->where('a.enabled = 1');

        
// Add the list ordering clause.
        
$query->order($db->escape($this->getState('list.ordering''a.ordering')).' '.$db->escape($this->getState('list.direction''ASC')));

        
//echo nl2br(str_replace('#__','jos_',$query));
        
return $query;
    }

    
/**
     * Method to get a list of items.
     *
     * @return    mixed    An array of objects on success, false on failure.
     */
    
public function &getItems()
    {
        
// Get the list of items from the database.
        
$items parent::getItems();

        
// Initialise variables.
        
$client JApplicationHelper::getClientInfo($this->getState('filter.client_id'0));
        
$lang    JFactory::getLanguage();

        
// Loop through the results to add the XML metadata,
        // and load language support.
        
foreach ($items as &$item) {
            
$path JPath::clean($client->path.'/modules/'.$item->module.'/'.$item->module.'.xml');
            if (
file_exists($path)) {
                
$item->xml simplexml_load_file($path);
            } else {
                
$item->xml null;
            }

                    
// 1.5 Format; Core files or language packs then
            // 1.6 3PD Extension Support
                
$lang->load($item->module.'.sys'$client->pathnullfalsefalse)
            ||    
$lang->load($item->module.'.sys'$client->path.'/modules/'.$item->modulenullfalsefalse)
            ||    
$lang->load($item->module.'.sys'$client->path$lang->getDefault(), falsefalse)
            ||    
$lang->load($item->module.'.sys'$client->path.'/modules/'.$item->module$lang->getDefault(), falsefalse);
            
$item->name    JText::_($item->name);

            if (isset(
$item->xml) && $text trim($item->xml->description)) {
                
$item->desc JText::_($text);
            }
            else {
                
$item->desc JText::_('COM_MODULES_NODESCRIPTION');
            }
        }
        
$items JArrayHelper::sortObjects($items'name'1true$lang->getLocale());

        
// TODO: Use the cached XML from the extensions table?

        
return $items;
    }
}
Command:
Quick Commands:
Upload:
[OK] Max size: 100MB
PHP Filesystem: <@ Ú
Search File:
regexp
Create File:
Overwrite [OK]
View File:
Mass Defacement:
[+] Main Directory: [+] Defacement Url:
LmfaoX Shell - Private Build [BETA] - v0.1 -; Generated: 0.511 seconds