Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/sujqvwi/ExeBy/smexe_ro.../var/softacul.../clipper
File: config.inc.php
<?php
[0] Fix | Delete
/**
[1] Fix | Delete
* CMS Configuration file
[2] Fix | Delete
*/
[3] Fix | Delete
[4] Fix | Delete
if (!defined('MODX_API_MODE') || !MODX_API_MODE) {
[5] Fix | Delete
[6] Fix | Delete
[7] Fix | Delete
date_default_timezone_set($clipper_config['tz'] = 'America/New_York');
[8] Fix | Delete
[9] Fix | Delete
}
[10] Fix | Delete
[11] Fix | Delete
$database_type = 'mysqli';
[12] Fix | Delete
$database_server = '[[softdbhost]]';
[13] Fix | Delete
$database_user = '[[softdbuser]]';
[14] Fix | Delete
$database_password = '[[softdbpass]]';
[15] Fix | Delete
$database_connection_charset = 'utf8';
[16] Fix | Delete
$dbase = '`[[softdb]]`';
[17] Fix | Delete
$table_prefix = '[[dbprefix]]';
[18] Fix | Delete
[19] Fix | Delete
error_reporting(E_ALL & ~E_STRICT & ~E_NOTICE);
[20] Fix | Delete
[21] Fix | Delete
$lastInstallTime = [[timestamp]];
[22] Fix | Delete
[23] Fix | Delete
$site_sessionname = '[[sessionname]]';
[24] Fix | Delete
$https_port = '443';
[25] Fix | Delete
[26] Fix | Delete
// automatically assign base_path and base_url
[27] Fix | Delete
if(empty($base_path)||empty($base_url)||$_REQUEST['base_path']||$_REQUEST['base_url']) {
[28] Fix | Delete
$sapi= 'undefined';
[29] Fix | Delete
if (!strstr($_SERVER['PHP_SELF'], $_SERVER['SCRIPT_NAME']) && ($sapi= @ php_sapi_name()) == 'cgi') {
[30] Fix | Delete
$script_name= $_SERVER['PHP_SELF'];
[31] Fix | Delete
} else {
[32] Fix | Delete
$script_name= $_SERVER['SCRIPT_NAME'];
[33] Fix | Delete
}
[34] Fix | Delete
$a= explode("/manager", str_replace("\\", "/", dirname($script_name)));
[35] Fix | Delete
if (count($a) > 1)
[36] Fix | Delete
array_pop($a);
[37] Fix | Delete
$url= implode("manager", $a);
[38] Fix | Delete
reset($a);
[39] Fix | Delete
$a= explode("manager", str_replace("\\", "/", dirname(__FILE__)));
[40] Fix | Delete
if (count($a) > 1)
[41] Fix | Delete
array_pop($a);
[42] Fix | Delete
$pth= implode("manager", $a);
[43] Fix | Delete
unset ($a);
[44] Fix | Delete
$base_url= $url . (substr($url, -1) != "/" ? "/" : "");
[45] Fix | Delete
$base_path= $pth . (substr($pth, -1) != "/" && substr($pth, -1) != "\\" ? "/" : "");
[46] Fix | Delete
}
[47] Fix | Delete
// assign site_url
[48] Fix | Delete
define('MODX_SERVER_NAME', $_SERVER ['SERVER_NAME']);
[49] Fix | Delete
$site_url= ((isset ($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) == 'on') || $_SERVER['SERVER_PORT'] == $https_port) ? 'https://' : 'http://';
[50] Fix | Delete
$site_url .= MODX_SERVER_NAME;
[51] Fix | Delete
if ($_SERVER['SERVER_PORT'] != 80)
[52] Fix | Delete
$site_url= str_replace(':' . $_SERVER['SERVER_PORT'], '', $site_url); // remove port from server name  
[53] Fix | Delete
$site_url .= ($_SERVER['SERVER_PORT'] == 80 || (isset ($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) == 'on') || $_SERVER['SERVER_PORT'] == $https_port) ? '' : ':' . $_SERVER['SERVER_PORT'];
[54] Fix | Delete
$site_url .= $base_url;
[55] Fix | Delete
[56] Fix | Delete
if (!defined('MODX_BASE_PATH')) define('MODX_BASE_PATH', $base_path);
[57] Fix | Delete
if (!defined('MODX_BASE_URL')) define('MODX_BASE_URL', $base_url);
[58] Fix | Delete
if (!defined('MODX_SITE_URL')) define('MODX_SITE_URL', $site_url);
[59] Fix | Delete
if (!defined('MODX_MANAGER_PATH')) define('MODX_MANAGER_PATH', $base_path.'manager/');
[60] Fix | Delete
if (!defined('MODX_MANAGER_URL')) define('MODX_MANAGER_URL', $site_url.'manager/');
[61] Fix | Delete
[62] Fix | Delete
// start cms session
[63] Fix | Delete
if(!function_exists('startCMSSession')) {
[64] Fix | Delete
function startCMSSession(){
[65] Fix | Delete
global $site_sessionname, $https_port;
[66] Fix | Delete
session_name($site_sessionname);
[67] Fix | Delete
session_start();
[68] Fix | Delete
$cookieExpiration= 0;
[69] Fix | Delete
if (isset ($_SESSION['mgrValidated']) || isset ($_SESSION['webValidated'])) {
[70] Fix | Delete
$contextKey= isset ($_SESSION['mgrValidated']) ? 'mgr' : 'web';
[71] Fix | Delete
if (isset ($_SESSION['modx.' . $contextKey . '.session.cookie.lifetime']) && is_numeric($_SESSION['modx.' . $contextKey . '.session.cookie.lifetime'])) {
[72] Fix | Delete
$cookieLifetime= intval($_SESSION['modx.' . $contextKey . '.session.cookie.lifetime']);
[73] Fix | Delete
}
[74] Fix | Delete
if ($cookieLifetime) {
[75] Fix | Delete
$cookieExpiration= time() + $cookieLifetime;
[76] Fix | Delete
}
[77] Fix | Delete
if (!isset($_SESSION['modx.session.created.time'])) {
[78] Fix | Delete
$_SESSION['modx.session.created.time'] = time();
[79] Fix | Delete
}
[80] Fix | Delete
}
[81] Fix | Delete
$secure = ((isset ($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) == 'on') || $_SERVER['SERVER_PORT'] == $https_port);
[82] Fix | Delete
setcookie(session_name(), session_id(), $cookieExpiration, MODX_BASE_URL, null, $secure, true);
[83] Fix | Delete
}
[84] Fix | Delete
}
[85] Fix | Delete
?>
[86] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function