Current File : /home/inlingua/public_html/decay_sym/root/usr/local/softaculous/webuzo/index.php |
<?php
define('SOFTACULOUS', 1);
$dir = '/usr/local/softaculous';
$admin_ports = array('2004', '2005');
$enduser_ports = array('2002', '2003');
// Check for custom Webuzo ports
$aports_file = '/usr/local/webuzo/conf/webuzo/emps/admin_port.conf';
$eports_file = '/usr/local/webuzo/conf/webuzo/emps/enduser_port.conf';
if(file_exists($aports_file)){
$aports = file_get_contents($aports_file);
preg_match_all('/listen(.*?)\;/is', $aports, $matches);
if(!empty($matches[1])){
foreach($matches[1] as $k => $v){
$admin_ports[] = trim(str_replace(' ssl', '', $v));
}
}
}
if(file_exists($eports_file)){
$eports = file_get_contents($eports_file);
preg_match_all('/listen(.*?)\;/is', $eports, $matches);
if(!empty($matches[1])){
foreach($matches[1] as $k => $v){
$enduser_ports[] = trim(str_replace(' ssl', '', $v));
}
}
}
// Enduser
if(in_array($_SERVER['SERVER_PORT'], $enduser_ports)){
$file = 'enduser.php';
// Admin Panel
}elseif(in_array($_SERVER['SERVER_PORT'], $admin_ports)){
$file = 'admin.php';
}
if(version_compare(PHP_VERSION, '8.2.0', '>=') && file_exists($dir.'/includes82/'.$file)){
$file = $dir.'/includes82/'.$file;
}elseif(version_compare(PHP_VERSION, '8.1.0', '>=') && file_exists($dir.'/includes81/'.$file)){
$file = $dir.'/includes81/'.$file;
}elseif(version_compare(PHP_VERSION, '7.1.0', '>=') && file_exists($dir.'/includes71/'.$file)){
$file = $dir.'/includes71/'.$file;
}elseif(version_compare(PHP_VERSION, '5.6.0', '>=') && file_exists($dir.'/includes56/'.$file)){
$file = $dir.'/includes56/'.$file;
}elseif(version_compare(PHP_VERSION, '5.3.0', '>=') && file_exists($dir.'/includes53/'.$file)){
$file = $dir.'/includes53/'.$file;
}elseif(file_exists($dir.'/includes52/'.$file)){
$file = $dir.'/includes52/'.$file;
}else{
$file = $dir.'/includes/'.$file;
}
include_once($file);