Ветка 07_11_25

This commit is contained in:
2025-11-07 20:53:17 +02:00
commit 4bc7136fa4
218 changed files with 79301 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
<?php
/**
* @file plug.php
* @brief Подключает плагин SvgEditorM для администраторов, перемещает sidebar и подгружает JS-модуль
*/
global $path, $_SESSION, $configAdmins;
if (in_array($_SESSION['username'], $configAdmins, true)) {
include $path . 'main_plugin/SvgEditorM/index.php';
echo '<link rel="stylesheet" type="text/css" href="/main_plugin/SvgEditorM/SvgEditorM.css">';
echo "<script type='module'>
document.addEventListener('DOMContentLoaded', () => {
const c = document.querySelector('.center-float');
const d = document.getElementById('sidebar');
if (c && d) {
c.appendChild(document.createElement('br'));
c.appendChild(d);
import('/main_plugin/SvgEditorM/SvgEditorM.js');
} else if (d) {
d.remove();
}
});
</script>";
}
?>