|
|
@ -61,18 +61,16 @@ switch ($action) { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (!is_dir($newUrlDir)) { |
|
|
|
if (!is_dir($newUrlDir)) { |
|
|
|
@mkdir($newUrlDir, api_get_permissions_for_new_directories(), true); |
|
|
|
mkdir($newUrlDir, api_get_permissions_for_new_directories(), true); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
$fullFilePath = "{$newUrlDir}{$blockName}_extra.html"; |
|
|
|
if (!is_writable($newUrlDir)) { |
|
|
|
|
|
|
|
die; |
|
|
|
if (file_exists($fullFilePath)) { |
|
|
|
|
|
|
|
@unlink($fullFilePath); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@touch($fullFilePath); |
|
|
|
$fullFilePath = "{$newUrlDir}{$blockName}_extra.html"; |
|
|
|
|
|
|
|
|
|
|
|
@file_put_contents($fullFilePath, $content); |
|
|
|
file_put_contents($fullFilePath, $content); |
|
|
|
|
|
|
|
|
|
|
|
break; |
|
|
|
break; |
|
|
|
|
|
|
|
|
|
|
@ -99,9 +97,15 @@ switch ($action) { |
|
|
|
$newUrlDir = api_get_path(SYS_PATH) . "home/admin/"; |
|
|
|
$newUrlDir = api_get_path(SYS_PATH) . "home/admin/"; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (Security::check_abs_path("{$newUrlDir}{$blockName}_extra.html", $newUrlDir)) { |
|
|
|
if (!Security::check_abs_path("{$newUrlDir}{$blockName}_extra.html", $newUrlDir)) { |
|
|
|
echo @file_get_contents("{$newUrlDir}{$blockName}_extra.html"); |
|
|
|
die; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!file_exists("{$newUrlDir}{$blockName}_extra.html")) { |
|
|
|
|
|
|
|
die; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
echo file_get_contents("{$newUrlDir}{$blockName}_extra.html"); |
|
|
|
break; |
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|