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.21 GB of 70.42 GB (34.38%)
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/ plugins/ content/ loadmodule/ - drwxr-xr-x

Directory:
Viewing file:     loadmodule.php (4.52 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
/**
 * @package        Joomla.Plugin
 * @subpackage    Content.loadmodule
 * @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;

class 
plgContentLoadmodule extends JPlugin
{
    protected static 
$modules = array();
    protected static 
$mods = array();
    
/**
     * Plugin that loads module positions within content
     *
     * @param    string    The context of the content being passed to the plugin.
     * @param    object    The article object.  Note $article->text is also available
     * @param    object    The article params
     * @param    int        The 'page' number
     */
    
public function onContentPrepare($context, &$article, &$params$page 0)
    {
        
// Don't run this plugin when the content is being indexed
        
if ($context == 'com_finder.indexer') {
            return 
true;
        }

        
// simple performance check to determine whether bot should process further
        
if (strpos($article->text'loadposition') === false && strpos($article->text'loadmodule') === false) {
            return 
true;
        }

        
// expression to search for (positions)
        
$regex        '/{loadposition\s+(.*?)}/i';
        
$style        $this->params->def('style''none');
        
// expression to search for(modules)
        
$regexmod    '/{loadmodule\s+(.*?)}/i';
        
$title        null;
        
$stylemod    $this->params->def('style''none');

        
// Find all instances of plugin and put in $matches for loadposition
        // $matches[0] is full pattern match, $matches[1] is the position
        
preg_match_all($regex$article->text$matchesPREG_SET_ORDER);
        
// No matches, skip this
        
if ($matches) {
            foreach (
$matches as $match) {

            
$matcheslist explode(','$match[1]);

            
// We may not have a module style so fall back to the plugin default.
            
if (!array_key_exists(1$matcheslist)) {
                
$matcheslist[1] = $style;
            }

            
$position trim($matcheslist[0]);
            
$style    trim($matcheslist[1]);

                
$output $this->_load($position$style);
                
// We should replace only first occurrence in order to allow positions with the same name to regenerate their content:
                
$article->text preg_replace("|$match[0]|"addcslashes($output'\\$'), $article->text1);
            }
        }
        
// Find all instances of plugin and put in $matchesmod for loadmodule

        
preg_match_all($regexmod$article->text$matchesmodPREG_SET_ORDER);
        
// If no matches, skip this
        
if ($matchesmod){
            foreach (
$matchesmod as $matchmod) {

                
$matchesmodlist explode(','$matchmod[1]);
                
//We may not have a specific module so set to null
                
if (!array_key_exists(1$matchesmodlist)) {
                    
$matchesmodlist[1] = null;
                }
                
// We may not have a module style so fall back to the plugin default.
                
if (!array_key_exists(2$matchesmodlist)) {
                    
$matchesmodlist[2] = $stylemod;
                }

                
$module trim($matchesmodlist[0]);
                
$name   trim($matchesmodlist[1]);
                
$style  trim($matchesmodlist[2]);
                
// $match[0] is full pattern match, $match[1] is the module,$match[2] is the title
                
$output $this->_loadmod($module$name$style);
                
// We should replace only first occurrence in order to allow positions with the same name to regenerate their content:
                
$article->text preg_replace("|$matchmod[0]|"addcslashes($output'\\$'), $article->text1);
            }
        }
    }

    protected function 
_load($position$style 'none')
    {
        if (!isset(
self::$modules[$position])) {
            
self::$modules[$position] = '';
            
$document    JFactory::getDocument();
            
$renderer    $document->loadRenderer('module');
            
$modules    JModuleHelper::getModules($position);
            
$params        = array('style' => $style);
            
ob_start();

            foreach (
$modules as $module) {
                echo 
$renderer->render($module$params);
            }

            
self::$modules[$position] = ob_get_clean();
        }
        return 
self::$modules[$position];
    }
    
// This is always going to get the first instance of the module type unless
    // there is a title.
    
protected function _loadmod($module$title$style 'none')
    {
        if (!isset(
self::$mods[$module])) {
            
self::$mods[$module] = '';
            
$document    JFactory::getDocument();
            
$renderer    $document->loadRenderer('module');
            
$mod        JModuleHelper::getModule($module$title);
            
// If the module without the mod_ isn't found, try it with mod_.
            // This allows people to enter it either way in the content
            
if (!isset($mod)){
                
$name 'mod_'.$module;
                
$mod  JModuleHelper::getModule($name$title);
            }
            
$params = array('style' => $style);
            
ob_start();

            echo 
$renderer->render($mod$params);

            
self::$mods[$module] = ob_get_clean();
        }
        return 
self::$mods[$module];
    }
}
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.161 seconds