20 lines
738 B
PHP
20 lines
738 B
PHP
<?php
|
|
header('Content-Type: application/json');
|
|
$files = [
|
|
'admin-saas.html', 'admin-v2.html', 'ai-hub.html', 'cron-control.html',
|
|
'enterprise-management.html', 'enterprise-model.html', 'faq-knowledge-base.html',
|
|
'ops-center.html', 'tools-hub.html', 'wiki.html'
|
|
];
|
|
$R = ['checked' => count($files), 'clean' => 0, 'dirty' => [], 'total_remaining' => 0];
|
|
foreach ($files as $f) {
|
|
$fp = "/var/www/html/$f";
|
|
if (!file_exists($fp)) { $R['dirty'][] = ['f'=>$f,'err'=>'missing']; continue; }
|
|
$c = substr_count(file_get_contents($fp), '11435');
|
|
if ($c === 0) $R['clean']++;
|
|
else {
|
|
$R['dirty'][] = ['f'=>$f,'count'=>$c];
|
|
$R['total_remaining'] += $c;
|
|
}
|
|
}
|
|
echo json_encode($R, JSON_PRETTY_PRINT);
|