Files
html/api/ambre-wtp-wire-e2e.php
opus 758b8409a0
Some checks failed
WEVAL NonReg / nonreg (push) Has been cancelled
auto-sync-0405
2026-04-22 04:05:02 +02:00

23 lines
1.2 KiB
PHP

<?php
header("Content-Type: text/plain");
$path = "/var/www/html/weval-technology-platform.html";
$c = @file_get_contents($path);
if (strpos($c, "dashboards-hub-unified") !== false) { echo "already"; exit; }
$anchor = 'href="/e2e-dashboard.html"';
$pos = strpos($c, $anchor);
if ($pos === false) { echo "no anchor e2e-dashboard\n"; exit; }
$a_end = strpos($c, "</a>", $pos) + 4;
$link = "\n<a href=\"/dashboards-hub-unified.html\" class=\"wtp-link\" title=\"Hub Dashboards Unifié · 24 dashboards · 13 catégories · wave-246\" style=\"display:inline-flex;align-items:center;gap:6px;padding:6px 12px;background:linear-gradient(135deg,#4338ca,#6366f1);color:#fff;border-radius:6px;text-decoration:none;font-size:12px;font-weight:500;margin:0 4px\"><span>📊 Hub Unifié · 24 dashboards</span></a>";
$new_c = substr($c, 0, $a_end) . $link . substr($c, $a_end);
$tmpfile = tempnam("/tmp", "wtp_");
file_put_contents($tmpfile, $new_c);
$r = shell_exec("sudo cp $tmpfile $path 2>&1");
unlink($tmpfile);
echo "Result: [$r]\n";
echo "New size: " . strlen($new_c) . "B · delta +" . (strlen($new_c)-strlen($c)) . "B\n";
echo "Verify content: " . (strpos(file_get_contents($path), "dashboards-hub-unified") !== false ? "YES" : "NO") . "\n";