diff --git a/web/cloud.php b/web/cloud.php index 8d0a1fb2..102e21a7 100644 --- a/web/cloud.php +++ b/web/cloud.php @@ -870,7 +870,7 @@ if (!isset($ip) or $_SERVER['SERVER_ADDR'] == $ip) { } - $query = $sql->prepare("UPDATE `settings` SET `lastCronCloud`=UNIX_TIMESTAMP() WHERE `resellerid`=0 LIMIT 1"); + $query = $sql->prepare("UPDATE `settings` SET `lastCronCloud`=UNIX_TIMESTAMP()"); $query->execute(); } else { diff --git a/web/jobs.php b/web/jobs.php index 62e68e62..473f07ec 100644 --- a/web/jobs.php +++ b/web/jobs.php @@ -239,7 +239,7 @@ if (!isset($ip) or $ui->escaped('SERVER_ADDR', 'server') == $ip or in_array($ip, } else { $runJobs = false; } - $query = $sql->prepare("UPDATE `settings` SET `lastCronJobs`=UNIX_TIMESTAMP() WHERE `resellerid`=0 LIMIT 1"); + $query = $sql->prepare("UPDATE `settings` SET `lastCronJobs`=UNIX_TIMESTAMP()"); $query->execute(); } } diff --git a/web/reboot.php b/web/reboot.php index e3f68a85..e23a23c7 100644 --- a/web/reboot.php +++ b/web/reboot.php @@ -550,7 +550,7 @@ if (!isset($ip) or $ui->escaped('SERVER_ADDR', 'server') == $ip or in_array($ip, $query->execute(); } - $query = $sql->prepare("UPDATE `settings` SET `lastCronReboot`=UNIX_TIMESTAMP() WHERE `resellerid`=0 LIMIT 1"); + $query = $sql->prepare("UPDATE `settings` SET `lastCronReboot`=UNIX_TIMESTAMP()"); $query->execute(); } else { diff --git a/web/startupdates.php b/web/startupdates.php index 19f0d1d3..b0d440c9 100644 --- a/web/startupdates.php +++ b/web/startupdates.php @@ -107,6 +107,6 @@ if (!isset($ip) or $ui->escaped('SERVER_ADDR', 'server') == $ip or in_array($ip, unset($rootServer); } - $query = $sql->prepare("UPDATE `settings` SET `lastCronUpdates`=UNIX_TIMESTAMP() WHERE `resellerid`=0 LIMIT 1"); + $query = $sql->prepare("UPDATE `settings` SET `lastCronUpdates`=UNIX_TIMESTAMP()"); $query->execute(); } \ No newline at end of file diff --git a/web/statuscheck.php b/web/statuscheck.php index e4c58cf1..77c98d4b 100644 --- a/web/statuscheck.php +++ b/web/statuscheck.php @@ -109,8 +109,8 @@ if (!isset($ip) or $ui->escaped('SERVER_ADDR', 'server') == $ip or in_array($ip, foreach ($query2->fetchall(PDO::FETCH_ASSOC) as $row2) { $shutdownempty = $row2['shutdownempty']; $shutdownemptytime = $row2['shutdownemptytime']; - $firstcheck='00-00-'.round(2*(strtotime($row2['lastcheck'])-strtotime($row2['oldcheck']))/60); - $firstchecktime=date('d-G-i'); + $firstcheck = '00-00-' . round(2 * (strtotime($row2['lastcheck']) - strtotime($row2['oldcheck'])) / 60); + $firstchecktime = date('d-G-i'); } if (isset($shutdownempty)) { $resellersettings[$resellerid] = array('shutdownempty' => $shutdownempty,'shutdownemptytime' => $shutdownemptytime,'firstchecktime' => $firstchecktime,'firstcheck' => $firstcheck,'brandname' => $row['brandname'], 'noservertag' => $row['noservertag'], 'nopassword' => $row['nopassword'], 'tohighslots' => $row['tohighslots'], 'down_checks' => $row['down_checks']); @@ -738,7 +738,7 @@ if (!isset($ip) or $ui->escaped('SERVER_ADDR', 'server') == $ip or in_array($ip, $sd = $connection->ServerDetails($virtualserver_id); $newtrafficdata=round(($sd['connection_filetransfer_bytes_sent_total']+$sd['connection_filetransfer_bytes_received_total']) / 1024); - if ($resellersettings[$resellerid]['firstchecktime']<$resellersettings[$resellerid]['firstcheck']) { + if (isset($resellersettings[$resellerid]['firstchecktime']) and isset($resellersettings[$resellerid]['firstcheck']) and $resellersettings[$resellerid]['firstchecktime'] < $resellersettings[$resellerid]['firstcheck']) { $filetraffic = 0; } @@ -971,7 +971,7 @@ if (!isset($ip) or $ui->escaped('SERVER_ADDR', 'server') == $ip or in_array($ip, } } flush(); - $query = $sql->prepare("UPDATE `settings` SET `lastCronStatus`=UNIX_TIMESTAMP() WHERE `resellerid`=0 LIMIT 1"); + $query = $sql->prepare("UPDATE `settings` SET `lastCronStatus`=UNIX_TIMESTAMP()"); $query->execute(); } else { header('Location: login.php'); diff --git a/web/stuff/settings.php b/web/stuff/settings.php index fea71910..c2ab1cec 100644 --- a/web/stuff/settings.php +++ b/web/stuff/settings.php @@ -266,17 +266,13 @@ if ($loguserip!='localhost') { $ewInstallPath = EASYWIDIR; - $elements = (!empty($ewInstallPath) and strpos($ui->escaped('REQUEST_URI', 'server'), $ewInstallPath) === false) ? preg_split('/\//', $ui->escaped('REQUEST_URI', 'server'),-1,PREG_SPLIT_NO_EMPTY) : preg_split('/\//',substr($ui->escaped('REQUEST_URI', 'server'),strlen($ewInstallPath)),-1,PREG_SPLIT_NO_EMPTY); + $elements = (!empty($ewInstallPath) and strpos($ui->escaped('REQUEST_URI', 'server'), $ewInstallPath) === false) ? preg_split('/\//', $ui->escaped('REQUEST_URI', 'server'), -1, PREG_SPLIT_NO_EMPTY) : preg_split('/\//',substr($ui->escaped('REQUEST_URI', 'server'), strlen($ewInstallPath)), -1, PREG_SPLIT_NO_EMPTY); if (isset($seo) and $seo== 'Y' and isset($elements[0])) { $page_detect_language = $elements[0]; - if (substr($ui->escaped('REQUEST_URI', 'server'),-1) != '/' and !$ui->w('site',50, 'get')) { - $throw404 = true; - } - - if (!preg_match('/^[a-z]{2}+$/', $elements[0]) and !$ui->w('site',50, 'get')) { + if (!preg_match('/^[a-z]{2}+$/', $elements[0]) and !$ui->w('site', 50, 'get')) { $throw404 = true; } }