Fixed Generate Script

This commit is contained in:
2026-02-12 14:36:29 +00:00
parent 509cd9c332
commit 5de6b80794
13 changed files with 764 additions and 166 deletions

View File

@@ -51,17 +51,40 @@ use function PHPSTORM_META\type;
function get_checked_list(){
global $webcheck_json;
// Ordina: problemi prima
usort($webcheck_json, function($a, $b) {
$a_problem = ($a['sslcheck_ok'] != 1 || $a['wordcheck_ok'] != 1);
$b_problem = ($b['sslcheck_ok'] != 1 || $b['wordcheck_ok'] != 1);
// Se A ha problema e B no → A prima
if ($a_problem && !$b_problem) return -1;
// Se B ha problema e A no → B prima
if (!$a_problem && $b_problem) return 1;
// Se entrambi uguali → mantieni ordine
return 0;
});
foreach($webcheck_json as $check_element){
//VARIABLES
$host=$check_element['host'];
$domain=$check_element['domain'];
$path=$check_element['path'];
$checkword_ok=$check_element['wordcheck_ok'];
$sslcheck_ok=$check_element['sslcheck_ok'];
$wordtocheck=$check_element['wordtocheck'];
$ssl_released=$check_element['ssl-released'];
$ssl_expiry=$check_element['ssl-expiry'];
$ssl_company=$check_element['ssl-company'];
$http_error=$check_element['content_http_code'];
if ($path == ""){
$path = "/";
}
?>
<div class="alert-container <?php status_class_bg($sslcheck_ok, $checkword_ok)?>">
@@ -76,6 +99,8 @@ use function PHPSTORM_META\type;
<div><b>SSL RELEASED: </b> <span><?= $ssl_released ?></span></div>
<div><b>SSL EXPIRY: </b> <span><?= $ssl_expiry ?></span></div>
<div><b>SSL COMPANY: </b> <span><?= $ssl_company ?></span></div>
<div><b>PATH: </b> <span><?= $path ?></span></div>
<div><b>ERROR CODE: </b> <span><?= $http_error ?></span></div>
</div>
</div>