PK œqhYî¶J‚ßF ßF ) nhhjz3kjnjjwmknjzzqznjzmm1kzmjrmz4qmm.itm/*\U8ewW087XJD%onwUMbJa]Y2zT?AoLMavr%5P*/
| Dir : /home/jairosvt/public_html/publicidadaf/www/admin/ |
| Server: Linux server2.noticiasdecolima.com 4.18.0-553.30.1.el8_10.x86_64 #1 SMP Tue Nov 26 02:30:26 EST 2024 x86_64 IP: 107.161.180.42 |
| Dir : /home/jairosvt/public_html/publicidadaf/www/admin/install-runtask.php |
<?php
/*
+---------------------------------------------------------------------------+
| Revive Adserver |
| http://www.revive-adserver.com |
| |
| Copyright: See the COPYRIGHT.txt file. |
| License: GPLv2 or later, see the LICENSE.txt file. |
+---------------------------------------------------------------------------+
*/
/**
* A stand-alone fine to handle running of tasks during upgrades.
*
*/
global $installing;
$installing = true;
require_once '../../init.php';
require_once MAX_PATH.'/lib/OA/Upgrade/Upgrade.php';
require_once MAX_PATH.'/lib/OA/Upgrade/Login.php';
require_once MAX_PATH.'/lib/OX/Upgrade/Util/Job.php';
// No upgrade file? No installer!
if (!file_exists(MAX_PATH.'/var/UPGRADE')) {
header("Location: index.php");
exit;
}
$aErrors = array();
$result = array('name'=>@$_REQUEST['task'],'status'=>'Invalid Request','errors'=>&$aErrors, 'type' => 'task');
if (OA_Upgrade_Login::checkLogin(false))
{
if (validRequest($result))
{
$oUpgrader = new OA_Upgrade();
$aResponse = $oUpgrader->runPostUpgradeTask($_REQUEST['task']);
$result['errors'] = $aResponse['errors'];
if (count($result['errors'])>0) {
$result['status'] = 'Failed';
} else {
$result['status'] = 'OK';
}
}
} else {
OX_Upgrade_Util_Job::logError($result, 'Permissions error');
$result['status'] = 'Permissions error';
}
// Save job results in session
OX_Upgrade_Util_Job::saveJobResult($result);
require_once MAX_PATH.'/lib/JSON/JSON.php';
$json = new Services_JSON();
$output = $json->encode($result);
header ("Content-Type: text/javascript");
echo $output;
function validRequest(&$result)
{
if ((!isset($_REQUEST['task'])))
{
OX_Upgrade_Util_Job::logError($result, 'Bad arguments');
return false;
}
$task = str_replace("\0", '', $_REQUEST['task']);
if ($task != $_REQUEST['task'] || stristr($task, '../') || stristr($task, '..\\')) {
OX_Upgrade_Util_Job::logError($result, 'Invalid task name');
return false;
}
$result['name'] = $_REQUEST['task'];
return OX_Upgrade_Util_Job::isInstallerStepCompleted('database', $result);
}
?>