first commit

This commit is contained in:
2026-02-28 11:43:07 +01:00
commit 1946f96bf8
5772 changed files with 817711 additions and 0 deletions

36
temp/cms_favicon.php Normal file
View File

@@ -0,0 +1,36 @@
<?php
require_once '../config.php';
$pdo = new PDO(
"mysql:host={$database['host']};dbname={$database['name']};charset=utf8",
$database['user'],
$database['password'],
[PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION]
);
$favicon_tag = '<link rel="icon" type="image/svg+xml" href="/favicon.svg">' . "\n";
$stmt = $pdo->query("SELECT css FROM pp_layouts WHERE id = 2");
$layout = $stmt->fetch(PDO::FETCH_ASSOC);
if (strpos($layout['css'], 'favicon') !== false) {
echo "Favicon already present.\n";
} else {
$new_css = $favicon_tag . $layout['css'];
$pdo->prepare("UPDATE pp_layouts SET css = ? WHERE id = 2")->execute([$new_css]);
echo "Favicon link added.\n";
}
// Clear cache
$deleted = 0;
foreach (glob(__DIR__ . '/../temp/*') as $file) {
if (is_file($file) && basename($file) !== 'cms_favicon.php') {
unlink($file);
$deleted++;
}
}
echo "Cache cleared: $deleted files.\n";
unlink(__FILE__);
echo "Done.\n";
?>