| Server IP : 101.53.144.229 / Your IP : 216.73.216.181 Web Server : Apache System : Linux host.gdigitalindia.in 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64 User : digitalshiksha ( 1179) PHP Version : 5.6.40 Disable Function : eval,show_source,system,shell_exec,escapeshellarg,escapeshellcmd,proc_close,proc_open,ini_alter,dl,show_source,curl_multi_exechellcmd, ini_restore,apache_get_modules,get_cfg_var,passthru, exec ,proc_get_status,fpassthru,c999_buff_prepare,c999_sess_put,c99_buff_prepare,c99_sess_put,proc_close,ini_alter,dl,symlink,link,proc_close,ini_alter,dl,symlink,link,mail MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /var/softaculous/joomla30/ |
Upload File : |
<?php
use Joomla\CMS\Factory as JFactory;
@unlink(__FILE__);
// Validate if the request is from Softaculous
if($_REQUEST['pass'] != '[[autopass]]'){
die("Unauthorized Access");
}
define('_JEXEC', 1);
// Joomla 4.x
if(file_exists(__DIR__ . '/administrator/includes/app.php')){
ob_start();
require_once __DIR__ . '/administrator/includes/app.php';
}else{
// Joomla 3.x
if (file_exists(__DIR__ . '/defines.php'))
{
include_once __DIR__ . '/defines.php';
}
if (!defined('_JDEFINES'))
{
define('JPATH_BASE', __DIR__ . DIRECTORY_SEPARATOR . 'administrator' );
require_once JPATH_BASE . '/includes/defines.php';
}
require_once JPATH_BASE . '/includes/framework.php';
require_once JPATH_BASE . '/includes/helper.php';
require_once JPATH_BASE . '/includes/subtoolbar.php';
}
$app = JFactory::getApplication('administrator');
// Check for a cookie if user is not logged in
if(JFactory::getUser()->get('guest')){
$signon_user = '[[signon_username]]';
$options = array('action' => 'core.login.admin');
$instance = Joomla\CMS\User\User::getInstance();
$db = JFactory::getDbo();
if(!empty($signon_user) && !preg_match('/^\[\[(.*?)\]\]$/is', $signon_user)){
$id = (int) Joomla\CMS\User\UserHelper::getUserId($signon_user);
}else{
$query = $db->getQuery(true);
$query->select($db->quoteName('user_id'))
->from($db->quoteName('#__user_usergroup_map'))
->where($db->quoteName('group_id') . ' = 8' );
$db->setQuery($query);
$users = $db->loadColumn();
$id = min($users);
}
if (!$id)
{
$app->redirect('administrator/index.php');
exit();
}
$instance->load($id);
// If the user is blocked, redirect with an error
if ($instance->block == 1)
{
$app->redirect('administrator/index.php');
exit();
}
$result = $instance->authorise($options['action']);
// Mark the user as logged in
$instance->guest = 0;
$session = Joomla\CMS\Factory::getSession();
// Grab the current session ID
$oldSessionId = $session->getId();
// Fork the session
$session->fork();
$session->set('user', $instance);
// Ensure the new session's metadata is written to the database
$app->checkSession();
// Purge the old session
$query = $db->getQuery(true)
->delete('#__session')
->where($db->quoteName('session_id') . ' = ' . $db->quoteBinary($oldSessionId));
$db->setQuery($query)->execute();
$instance->setLastVisit();
}
$app->redirect('administrator/index.php');
exit();