61 lines
3.0 KiB
PHP
61 lines
3.0 KiB
PHP
<?php
|
|
header("Content-Type: text/html; charset=utf-8");
|
|
$md = @file_get_contents("/opt/weval-l99/wiki/P0-BUSINESS-DOSSIERS.md");
|
|
if (!$md) die("dossier not found");
|
|
$eth = @json_decode(@file_get_contents("http://127.0.0.1/api/wevia-action-engine.php?action=ethica_stats"), true);
|
|
$hcps = $eth["total_hcp"] ?? "146668";
|
|
$emails = $eth["emails"] ?? "110039";
|
|
?><!DOCTYPE html>
|
|
<html lang="fr"><head>
|
|
<meta charset="utf-8">
|
|
<title>WEVAL · P0 Business Dossiers (Yacine)</title>
|
|
<script src="/widgets/audit-banner.js" defer></script>
|
|
<style>
|
|
body{font-family:-apple-system,BlinkMacSystemFont,system-ui,sans-serif;background:#0a0a0f;color:#e8e8f0;margin:0;padding:2rem;line-height:1.7;max-width:880px;margin:0 auto}
|
|
h1,h2,h3{background:linear-gradient(90deg,#1B6CA8,#7EDAB5);-webkit-background-clip:text;-webkit-text-fill-color:transparent}
|
|
h1{font-size:2rem;border-bottom:2px solid #7EDAB5;padding-bottom:.5rem}
|
|
h2{margin-top:2.5rem;font-size:1.4rem;border-left:4px solid #7EDAB5;padding-left:.8rem}
|
|
h3{font-size:1.05rem;color:#7EDAB5;-webkit-text-fill-color:#7EDAB5}
|
|
hr{border:0;border-top:1px solid #2a2b4a;margin:2rem 0}
|
|
code{background:#1a1b3a;padding:2px 8px;border-radius:4px;font-size:.85em;color:#7EDAB5;font-family:monospace}
|
|
strong{color:#fff}
|
|
ul{padding-left:1.5rem}
|
|
li{margin-bottom:.4rem}
|
|
table{border-collapse:collapse;width:100%;margin:1rem 0;background:#12132a;border-radius:8px;overflow:hidden}
|
|
th,td{padding:8px 12px;text-align:left;border-bottom:1px solid #2a2b4a;font-size:.9rem}
|
|
th{background:#1B6CA8;color:#fff}
|
|
.live{background:linear-gradient(90deg,#7EDAB5,#1B6CA8);color:#0a0a0f;padding:4px 12px;border-radius:20px;font-weight:700;font-size:.75rem}
|
|
.meta{color:#9090a8;font-size:.85rem}
|
|
</style></head><body>
|
|
<div class="meta">Live HCPs : <span class="live"><?=number_format($hcps,0," "," ")?></span> · Emails : <?=number_format($emails,0," "," ")?> · Source : <code>ethica.medecins_real</code> · Refresh 60s</div>
|
|
<?php
|
|
// Markdown → HTML léger
|
|
$html = htmlspecialchars($md);
|
|
$html = preg_replace('/^### (.+)$/m', '<h3>$1</h3>', $html);
|
|
$html = preg_replace('/^## (.+)$/m', '<h2>$1</h2>', $html);
|
|
$html = preg_replace('/^# (.+)$/m', '<h1>$1</h1>', $html);
|
|
$html = preg_replace('/^---\s*$/m', '<hr>', $html);
|
|
$html = preg_replace('/\*\*(.+?)\*\*/', '<strong>$1</strong>', $html);
|
|
$html = preg_replace('/`([^`]+)`/', '<code>$1</code>', $html);
|
|
$html = preg_replace('/^- (.+)$/m', '<li>$1</li>', $html);
|
|
$html = preg_replace('/^\d+\. (.+)$/m', '<li>$1</li>', $html);
|
|
$html = preg_replace('/(<li>.*?<\/li>\s*)+/s', '<ul>$0</ul>', $html);
|
|
// Table basic
|
|
$html = preg_replace_callback('/(^\|.+?\|$\s*)+/m', function($m) {
|
|
$rows = explode("\n", trim($m[0]));
|
|
$out = '<table>';
|
|
foreach ($rows as $i => $r) {
|
|
if (preg_match('/^\|[\s|\-:]+\|$/', $r)) continue;
|
|
$cells = array_map('trim', explode('|', trim($r, '|')));
|
|
$tag = $i === 0 ? 'th' : 'td';
|
|
$out .= '<tr>';
|
|
foreach ($cells as $c) $out .= "<$tag>$c</$tag>";
|
|
$out .= '</tr>';
|
|
}
|
|
return $out . '</table>';
|
|
}, $html);
|
|
$html = nl2br($html);
|
|
echo $html;
|
|
?>
|
|
</body></html>
|