53 lines
2.8 KiB
PHP
Executable File
53 lines
2.8 KiB
PHP
Executable File
<?php
|
|
error_reporting(0);
|
|
ini_set("display_errors",0);
|
|
$pdo = new PDO("pgsql:host=localhost;dbname=adx_system", "admin", "admin123");
|
|
$configs = $pdo->query("SELECT id, config_name, target_method, target_isps, status, inbox_rate FROM admin.winning_headers ORDER BY status DESC")->fetchAll(PDO::FETCH_ASSOC);
|
|
$tests = $pdo->query("SELECT config_id, isp_name, result, inbox_rate FROM admin.config_isp_tests")->fetchAll(PDO::FETCH_ASSOC);
|
|
$testMap = [];
|
|
foreach ($tests as $t) { $testMap[$t['config_id']][$t['isp_name']] = $t; }
|
|
$isps = ['gmail', 'hotmail', 'yahoo', 't-online', 'gmx', 'spectrum', 'roadrunner'];
|
|
?>
|
|
<!DOCTYPE html>
|
|
<html><head><title>Cross-ISP Matrix</title><meta charset="UTF-8">
|
|
<style>
|
|
body { font-family: -apple-system, sans-serif; background: #0a0a1a; color: #e2e8f0; padding: 20px; }
|
|
h1 { color: #a855f7; }
|
|
table { width: 100%; border-collapse: collapse; background: #1e1e2e; }
|
|
th, td { padding: 8px; text-align: center; border: 1px solid #2a2a3e; }
|
|
th { background: #12121a; color: #a855f7; }
|
|
.pass { background: #052e16; color: #22c55e; }
|
|
.fail { background: #450a0a; color: #ef4444; }
|
|
.partial { background: #422006; color: #eab308; }
|
|
.untested { background: #1f2937; color: #6b7280; }
|
|
td:first-child { text-align: left; }
|
|
</style>
|
|
</head><body>
|
|
<h1>📊 Cross-ISP Test Matrix</h1>
|
|
<table><thead><tr><th>Config</th><th>Method</th>
|
|
<?php foreach ($isps as $isp): ?><th><?= strtoupper($isp) ?></th><?php endforeach; ?>
|
|
</tr></thead><tbody>
|
|
<?php foreach ($configs as $c):
|
|
$validated = $c['target_isps'] ? array_map('trim', explode(',', trim($c['target_isps'], '{}'))) : [];
|
|
?><tr><td><?= substr($c['config_name'], 0, 35) ?></td><td><?= $c['target_method'] ?></td>
|
|
<?php foreach ($isps as $isp):
|
|
$inVal = in_array($isp, $validated);
|
|
$test = $testMap[$c['id']][$isp] ?? null;
|
|
if ($inVal) { $class='pass'; $icon='✅'; $rate=$c['inbox_rate'].'%'; }
|
|
elseif ($test) { $class=$test['result']; $icon=$test['result']=='pass'?'✅':($test['result']=='partial'?'⚠️':'❌'); $rate=number_format($test['inbox_rate'],0).'%'; }
|
|
else { $class='untested'; $icon='⏳'; $rate=''; }
|
|
?><td class="<?= $class ?>"><?= $icon ?> <?= $rate ?></td>
|
|
<?php endforeach; ?></tr>
|
|
<?php endforeach; ?></tbody></table>
|
|
<h2 style="margin-top:20px;color:#a855f7">🔒 Cloudmark Family</h2>
|
|
<p style="color:#94a3b8">Ces ISPs utilisent Cloudmark - config T-Online/GMX devrait fonctionner:</p>
|
|
<div style="background:#1e1e2e;padding:15px;border-radius:10px">
|
|
<?php
|
|
$cloudmark = $pdo->query("SELECT m.isp_name FROM admin.isp_filter_mapping m JOIN admin.filter_providers fp ON m.filter_provider_id=fp.id WHERE fp.provider_name='Cloudmark' ORDER BY m.isp_name")->fetchAll();
|
|
foreach ($cloudmark as $c): ?>
|
|
<span style="background:#3b82f6;padding:4px 12px;border-radius:15px;margin:3px;display:inline-block"><?= strtoupper($c['isp_name']) ?></span>
|
|
<?php endforeach; ?>
|
|
</div>
|
|
|
|
</body></html>
|