diff options
Diffstat (limited to 'Neutron-trunk/cms-special/admin-v2')
63 files changed, 0 insertions, 4905 deletions
diff --git a/Neutron-trunk/cms-special/admin-v2/$panes/accounts.php b/Neutron-trunk/cms-special/admin-v2/$panes/accounts.php deleted file mode 100644 index 8ade4f5..0000000 --- a/Neutron-trunk/cms-special/admin-v2/$panes/accounts.php +++ /dev/null @@ -1,64 +0,0 @@ -<?php - -require_once "../../../resources/private/relative.php"; getRelativeDetails("cms-special"); -require_once $_SERVER['DOCUMENT_ROOT'] . "/api/lang/processor.php"; -require_once $_SERVER['DOCUMENT_ROOT'] . "/cms-special/admin-v2/\$resources/session.php"; - -global $lang; - -?> -<!DOCTYPE html> -<html> - - <head> - <title>base</title> - <meta charset="UTF-8"> - <meta name="viewport" content="width=device-width, initial-scale=1.0"> - <link rel="stylesheet" href="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/css/admin_v2/main.css"> - <link rel="stylesheet" href="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/css/admin_v2/inner.css"> - <?php if (strpos($_SERVER['HTTP_USER_AGENT'], "Chrome/")): ?> - <link rel="stylesheet" href="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/css/admin_v2/chromium.css"> - <style>:root { --mpcms-banner: url(<?php - - if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/resources/upload/banner.jpg")) { - echo('"' . $GLOBALS["SYSTEM_ROOT"] . '/resources/upload/banner.jpg"'); - } else { - echo('"' . $GLOBALS["SYSTEM_ROOT"] . '/resources/image/default.jpg"'); - } - - ?>); }</style> - <?php endif; ?> - <style>:root { --mpcms-banner: url(<?php - - if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/resources/upload/banner.jpg")) { - echo('"' . $GLOBALS["SYSTEM_ROOT"] . '/resources/upload/banner.jpg"'); - } else { - echo('"' . $GLOBALS["SYSTEM_ROOT"] . '/resources/image/default.jpg"'); - } - - ?>); }</style> - </head> - - <body> - <div id="inner-items"> - <div class="inner-item" data-item-href="<?= $GLOBALS["SYSTEM_ROOT"] ?>/cms-special/admin-v2/password"> - <div class="inner-item-image-outer"> - <img alt="" class="inner-item-image" src="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/image/admin2/password.png"> - </div> - <div class="inner-item-text"> - <div> - <span class="inner-item-title"><?= $lang["admin-v2"]["accounts_items"][0] ?></span><br> - <span class="inner-item-description"><?= $lang["admin-v2"]["accounts_descriptions"][0] ?></span> - </div> - </div> - <div class="inner-item-enter-outer"> - <img alt="" class="inner-item-enter" src="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/image/admin2/enter.png"> - </div> - </div> - </div> - </body> - - <script src="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/js/jquery.js"></script> - <script src="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/js/admin_v2.js"></script> - -</html>
\ No newline at end of file diff --git a/Neutron-trunk/cms-special/admin-v2/$panes/content.php b/Neutron-trunk/cms-special/admin-v2/$panes/content.php deleted file mode 100644 index 9fd564b..0000000 --- a/Neutron-trunk/cms-special/admin-v2/$panes/content.php +++ /dev/null @@ -1,94 +0,0 @@ -<?php - -require_once "../../../resources/private/relative.php"; getRelativeDetails("cms-special"); -require_once $_SERVER['DOCUMENT_ROOT'] . "/api/lang/processor.php"; -require_once $_SERVER['DOCUMENT_ROOT'] . "/cms-special/admin-v2/\$resources/session.php"; - -global $lang; - -?> -<!DOCTYPE html> -<html> - - <head> - <title>base</title> - <meta charset="UTF-8"> - <meta name="viewport" content="width=device-width, initial-scale=1.0"> - <link rel="stylesheet" href="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/css/admin_v2/main.css"> - <link rel="stylesheet" href="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/css/admin_v2/inner.css"> - <?php if (strpos($_SERVER['HTTP_USER_AGENT'], "Chrome/")): ?> - <link rel="stylesheet" href="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/css/admin_v2/chromium.css"> - <style>:root { --mpcms-banner: url(<?php - - if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/resources/upload/banner.jpg")) { - echo('"' . $GLOBALS["SYSTEM_ROOT"] . '/resources/upload/banner.jpg"'); - } else { - echo('"' . $GLOBALS["SYSTEM_ROOT"] . '/resources/image/default.jpg"'); - } - - ?>); }</style> - <?php endif; ?> - <style>:root { --mpcms-banner: url(<?php - - if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/resources/upload/banner.jpg")) { - echo('"' . $GLOBALS["SYSTEM_ROOT"] . '/resources/upload/banner.jpg"'); - } else { - echo('"' . $GLOBALS["SYSTEM_ROOT"] . '/resources/image/default.jpg"'); - } - - ?>); }</style> - </head> - - <body> - <div id="inner-items"> - <div class="inner-item" data-item-href="<?= $GLOBALS["SYSTEM_ROOT"] ?>/cms-special/admin-v2/pages"> - <div class="inner-item-image-outer"> - <img alt="" class="inner-item-image" src="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/image/admin2/pages.png"> - </div> - <div class="inner-item-text"> - <div> - <span class="inner-item-title"><?= $lang["admin-v2"]["content_items"][0] ?></span><br> - <span class="inner-item-description"><?= $lang["admin-v2"]["content_descriptions"][0] ?></span> - </div> - </div> - <div class="inner-item-enter-outer"> - <img alt="" class="inner-item-enter" src="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/image/admin2/enter.png"> - </div> - </div> - - <div class="inner-item" data-item-href="<?= $GLOBALS["SYSTEM_ROOT"] ?>/cms-special/admin-v2/gallery"> - <div class="inner-item-image-outer"> - <img alt="" class="inner-item-image" src="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/image/admin2/gallery.png"> - </div> - <div class="inner-item-text"> - <div> - <span class="inner-item-title"><?= $lang["admin-v2"]["content_items"][1] ?></span><br> - <span class="inner-item-description"><?= $lang["admin-v2"]["content_descriptions"][1] ?></span> - </div> - </div> - <div class="inner-item-enter-outer"> - <img alt="" class="inner-item-enter" src="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/image/admin2/enter.png"> - </div> - </div> - - <div class="inner-item" data-item-href="<?= $GLOBALS["SYSTEM_ROOT"] ?>/cms-special/admin-v2/calendar"> - <div class="inner-item-image-outer"> - <img alt="" class="inner-item-image" src="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/image/admin2/calendar.png"> - </div> - <div class="inner-item-text"> - <div> - <span class="inner-item-title"><?= $lang["admin-v2"]["content_items"][2] ?></span><br> - <span class="inner-item-description"><?= $lang["admin-v2"]["content_descriptions"][2] ?></span> - </div> - </div> - <div class="inner-item-enter-outer"> - <img alt="" class="inner-item-enter" src="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/image/admin2/enter.png"> - </div> - </div> - </div> - </body> - - <script src="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/js/jquery.js"></script> - <script src="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/js/admin_v2.js"></script> - -</html>
\ No newline at end of file diff --git a/Neutron-trunk/cms-special/admin-v2/$panes/features.php b/Neutron-trunk/cms-special/admin-v2/$panes/features.php deleted file mode 100644 index 8e956d3..0000000 --- a/Neutron-trunk/cms-special/admin-v2/$panes/features.php +++ /dev/null @@ -1,81 +0,0 @@ -<?php - -require_once "../../../resources/private/relative.php"; getRelativeDetails("cms-special"); -require_once $_SERVER['DOCUMENT_ROOT'] . "/api/lang/processor.php"; -require_once $_SERVER['DOCUMENT_ROOT'] . "/cms-special/admin-v2/\$resources/session.php"; - -global $lang; - -?> -<!DOCTYPE html> -<html> - - <head> - <title>base</title> - <meta charset="UTF-8"> - <meta name="viewport" content="width=device-width, initial-scale=1.0"> - <link rel="stylesheet" href="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/css/admin_v2/main.css"> - <link rel="stylesheet" href="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/css/admin_v2/inner.css"> - <?php if (strpos($_SERVER['HTTP_USER_AGENT'], "Chrome/")): ?> - <link rel="stylesheet" href="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/css/admin_v2/chromium.css"> - <style>:root { --mpcms-banner: url(<?php - - if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/resources/upload/banner.jpg")) { - echo('"' . $GLOBALS["SYSTEM_ROOT"] . '/resources/upload/banner.jpg"'); - } else { - echo('"' . $GLOBALS["SYSTEM_ROOT"] . '/resources/image/default.jpg"'); - } - - ?>); }</style> - <?php endif; ?> - <style>:root { --mpcms-banner: url(<?php - - if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/resources/upload/banner.jpg")) { - echo('"' . $GLOBALS["SYSTEM_ROOT"] . '/resources/upload/banner.jpg"'); - } else { - echo('"' . $GLOBALS["SYSTEM_ROOT"] . '/resources/image/default.jpg"'); - } - - ?>); }</style> - </head> - - <body> - <div id="inner-items"> - <div class="inner-item" data-item-href="<?= $GLOBALS["SYSTEM_ROOT"] ?>/cms-special/admin-v2/widgets"> - <div class="inner-item-image-outer"> - <img alt="" class="inner-item-image" src="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/image/admin2/optional.png"> - </div> - <div class="inner-item-text"> - <div> - <span class="inner-item-title"><?= $lang["admin-v2"]["features_items"][0] ?></span><br> - <span class="inner-item-description"><?= $lang["admin-v2"]["features_descriptions"][0] ?></span> - </div> - </div> - <div class="inner-item-enter-outer"> - <img alt="" class="inner-item-enter" src="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/image/admin2/enter.png"> - </div> - </div> - </div> - - <div id="inner-items"> - <div class="inner-item" data-item-href="<?= $GLOBALS["SYSTEM_ROOT"] ?>/cms-special/admin-v2/flags"> - <div class="inner-item-image-outer"> - <img alt="" class="inner-item-image" src="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/image/admin2/flag.png"> - </div> - <div class="inner-item-text"> - <div> - <span class="inner-item-title"><?= $lang["admin-v2"]["features_items"][1] ?></span><br> - <span class="inner-item-description"><?= $lang["admin-v2"]["features_descriptions"][1] ?></span> - </div> - </div> - <div class="inner-item-enter-outer"> - <img alt="" class="inner-item-enter" src="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/image/admin2/enter.png"> - </div> - </div> - </div> - </body> - - <script src="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/js/jquery.js"></script> - <script src="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/js/admin_v2.js"></script> - -</html>
\ No newline at end of file diff --git a/Neutron-trunk/cms-special/admin-v2/$panes/language.php b/Neutron-trunk/cms-special/admin-v2/$panes/language.php deleted file mode 100644 index 878bfc2..0000000 --- a/Neutron-trunk/cms-special/admin-v2/$panes/language.php +++ /dev/null @@ -1,68 +0,0 @@ -<?php - -require_once "../../../resources/private/relative.php"; getRelativeDetails("cms-special"); -require_once $_SERVER['DOCUMENT_ROOT'] . "/api/lang/processor.php"; -require_once $_SERVER['DOCUMENT_ROOT'] . "/cms-special/admin-v2/\$resources/session.php"; - -global $lang; - -?> -<!DOCTYPE html> -<html> - -<head> - <title>base</title> - <meta charset="UTF-8"> - <meta name="viewport" content="width=device-width, initial-scale=1.0"> - <link rel="stylesheet" href="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/css/admin_v2/main.css"> - <link rel="stylesheet" href="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/css/admin_v2/inner.css"> - <?php if (strpos($_SERVER['HTTP_USER_AGENT'], "Chrome/")): ?> - <link rel="stylesheet" href="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/css/admin_v2/chromium.css"> - <style>:root { --mpcms-banner: url(<?php - - if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/resources/upload/banner.jpg")) { - echo('"' . $GLOBALS["SYSTEM_ROOT"] . '/resources/upload/banner.jpg"'); - } else { - echo('"' . $GLOBALS["SYSTEM_ROOT"] . '/resources/image/default.jpg"'); - } - - ?>); }</style> - <?php endif; ?> - <style>:root { --mpcms-banner: url(<?php - - if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/resources/upload/banner.jpg")) { - echo('"' . $GLOBALS["SYSTEM_ROOT"] . '/resources/upload/banner.jpg"'); - } else { - echo('"' . $GLOBALS["SYSTEM_ROOT"] . '/resources/image/default.jpg"'); - } - - ?>); }</style> -</head> - -<body> -<div id="inner-items"> - <?php foreach (scandir($_SERVER['DOCUMENT_ROOT'] . "/resources/i18n") as $locale): if (trim($locale) !== "." && trim($locale) !== ".."): ?> - <div class="inner-item" data-item-href="<?= $GLOBALS["SYSTEM_ROOT"] ?>/cms-special/admin-v2/language/?_=<?= $locale ?>"> - <div class="inner-item-image-outer"> - <img alt="" class="inner-item-image" src="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/image/admin2/locale.png"> - </div> - <div class="inner-item-text"> - <div> - <span class="inner-item-title"><?= json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/resources/i18n/" . $locale . "/\$metadata.json"), true)["localized_name"]; ?></span><br> - <span class="inner-item-description"><?= json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/resources/i18n/" . $locale . "/\$metadata.json"), true)["name"]; ?></span> - </div> - </div> - <div class="inner-item-enter-outer"> - <?php global $langsel; if ($locale === $langsel): ?> - <img alt="" class="inner-item-enter" src="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/image/admin2/selected.png"> - <?php endif; ?> - </div> - </div> - <?php endif; endforeach; ?> -</div> -</body> - -<script src="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/js/jquery.js"></script> -<script src="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/js/admin_v2.js"></script> - -</html>
\ No newline at end of file diff --git a/Neutron-trunk/cms-special/admin-v2/$panes/maintenance.php b/Neutron-trunk/cms-special/admin-v2/$panes/maintenance.php deleted file mode 100644 index b49fcef..0000000 --- a/Neutron-trunk/cms-special/admin-v2/$panes/maintenance.php +++ /dev/null @@ -1,64 +0,0 @@ -<?php - -require_once "../../../resources/private/relative.php"; getRelativeDetails("cms-special"); -require_once $_SERVER['DOCUMENT_ROOT'] . "/api/lang/processor.php"; -require_once $_SERVER['DOCUMENT_ROOT'] . "/cms-special/admin-v2/\$resources/session.php"; - -global $lang; - -?> -<!DOCTYPE html> -<html> - - <head> - <title>base</title> - <meta charset="UTF-8"> - <meta name="viewport" content="width=device-width, initial-scale=1.0"> - <link rel="stylesheet" href="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/css/admin_v2/main.css"> - <link rel="stylesheet" href="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/css/admin_v2/inner.css"> - <?php if (strpos($_SERVER['HTTP_USER_AGENT'], "Chrome/")): ?> - <link rel="stylesheet" href="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/css/admin_v2/chromium.css"> - <style>:root { --mpcms-banner: url(<?php - - if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/resources/upload/banner.jpg")) { - echo('"' . $GLOBALS["SYSTEM_ROOT"] . '/resources/upload/banner.jpg"'); - } else { - echo('"' . $GLOBALS["SYSTEM_ROOT"] . '/resources/image/default.jpg"'); - } - - ?>); }</style> - <?php endif; ?> - <style>:root { --mpcms-banner: url(<?php - - if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/resources/upload/banner.jpg")) { - echo('"' . $GLOBALS["SYSTEM_ROOT"] . '/resources/upload/banner.jpg"'); - } else { - echo('"' . $GLOBALS["SYSTEM_ROOT"] . '/resources/image/default.jpg"'); - } - - ?>); }</style> - </head> - - <body> - <div id="inner-items"> - <div class="inner-item" data-item-href="<?= $GLOBALS["SYSTEM_ROOT"] ?>/cms-special/admin-v2/reset"> - <div class="inner-item-image-outer"> - <img alt="" class="inner-item-image" src="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/image/admin2/reset.png"> - </div> - <div class="inner-item-text"> - <div> - <span class="inner-item-title"><?= $lang["admin-v2"]["maintenance_items"][0] ?></span><br> - <span class="inner-item-description"><?= $lang["admin-v2"]["maintenance_descriptions"][0] ?></span> - </div> - </div> - <div class="inner-item-enter-outer"> - <img alt="" class="inner-item-enter" src="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/image/admin2/enter.png"> - </div> - </div> - </div> - </body> - - <script src="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/js/jquery.js"></script> - <script src="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/js/admin_v2.js"></script> - -</html>
\ No newline at end of file diff --git a/Neutron-trunk/cms-special/admin-v2/$panes/personalization.php b/Neutron-trunk/cms-special/admin-v2/$panes/personalization.php deleted file mode 100644 index 40991a8..0000000 --- a/Neutron-trunk/cms-special/admin-v2/$panes/personalization.php +++ /dev/null @@ -1,94 +0,0 @@ -<?php - -require_once "../../../resources/private/relative.php"; getRelativeDetails("cms-special"); -require_once $_SERVER['DOCUMENT_ROOT'] . "/api/lang/processor.php"; -require_once $_SERVER['DOCUMENT_ROOT'] . "/cms-special/admin-v2/\$resources/session.php"; - -global $lang; - -?> -<!DOCTYPE html> -<html> - - <head> - <title>base</title> - <meta charset="UTF-8"> - <meta name="viewport" content="width=device-width, initial-scale=1.0"> - <link rel="stylesheet" href="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/css/admin_v2/main.css"> - <link rel="stylesheet" href="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/css/admin_v2/inner.css"> - <?php if (strpos($_SERVER['HTTP_USER_AGENT'], "Chrome/")): ?> - <link rel="stylesheet" href="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/css/admin_v2/chromium.css"> - <style>:root { --mpcms-banner: url(<?php - - if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/resources/upload/banner.jpg")) { - echo('"' . $GLOBALS["SYSTEM_ROOT"] . '/resources/upload/banner.jpg"'); - } else { - echo('"' . $GLOBALS["SYSTEM_ROOT"] . '/resources/image/default.jpg"'); - } - - ?>); }</style> - <?php endif; ?> - <style>:root { --mpcms-banner: url(<?php - - if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/resources/upload/banner.jpg")) { - echo('"' . $GLOBALS["SYSTEM_ROOT"] . '/resources/upload/banner.jpg"'); - } else { - echo('"' . $GLOBALS["SYSTEM_ROOT"] . '/resources/image/default.jpg"'); - } - - ?>); }</style> - </head> - - <body> - <div id="inner-items"> - <div class="inner-item" data-item-href="<?= $GLOBALS["SYSTEM_ROOT"] ?>/cms-special/admin-v2/appearance"> - <div class="inner-item-image-outer"> - <img alt="" class="inner-item-image" src="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/image/admin2/branding.png"> - </div> - <div class="inner-item-text"> - <div> - <span class="inner-item-title"><?= $lang["admin-v2"]["personalization_items"][0] ?></span><br> - <span class="inner-item-description"><?= $lang["admin-v2"]["personalization_descriptions"][0] ?></span> - </div> - </div> - <div class="inner-item-enter-outer"> - <img alt="" class="inner-item-enter" src="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/image/admin2/enter.png"> - </div> - </div> - - <div class="inner-item" data-item-href="<?= $GLOBALS["SYSTEM_ROOT"] ?>/cms-special/admin-v2/customization"> - <div class="inner-item-image-outer"> - <img alt="" class="inner-item-image" src="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/image/admin2/colour.png"> - </div> - <div class="inner-item-text"> - <div> - <span class="inner-item-title"><?= $lang["admin-v2"]["personalization_items"][1] ?></span><br> - <span class="inner-item-description"><?= $lang["admin-v2"]["personalization_descriptions"][1] ?></span> - </div> - </div> - <div class="inner-item-enter-outer"> - <img alt="" class="inner-item-enter" src="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/image/admin2/enter.png"> - </div> - </div> - - <div class="inner-item" data-item-href="<?= $GLOBALS["SYSTEM_ROOT"] ?>/cms-special/admin-v2/footer"> - <div class="inner-item-image-outer"> - <img alt="" class="inner-item-image" src="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/image/admin2/footer.png"> - </div> - <div class="inner-item-text"> - <div> - <span class="inner-item-title"><?= $lang["admin-v2"]["personalization_items"][2] ?></span><br> - <span class="inner-item-description"><?= $lang["admin-v2"]["personalization_descriptions"][2] ?></span> - </div> - </div> - <div class="inner-item-enter-outer"> - <img alt="" class="inner-item-enter" src="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/image/admin2/enter.png"> - </div> - </div> - </div> - </body> - - <script src="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/js/jquery.js"></script> - <script src="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/js/admin_v2.js"></script> - -</html>
\ No newline at end of file diff --git a/Neutron-trunk/cms-special/admin-v2/$panes/security.php b/Neutron-trunk/cms-special/admin-v2/$panes/security.php deleted file mode 100644 index 31cdc52..0000000 --- a/Neutron-trunk/cms-special/admin-v2/$panes/security.php +++ /dev/null @@ -1,80 +0,0 @@ -<?php - -require_once "../../../resources/private/relative.php"; getRelativeDetails("cms-special"); -require_once $_SERVER['DOCUMENT_ROOT'] . "/api/lang/processor.php"; -require_once $_SERVER['DOCUMENT_ROOT'] . "/cms-special/admin-v2/\$resources/session.php"; - -global $lang; - -?> -<!DOCTYPE html> -<html> - - <head> - <title>base</title> - <meta charset="UTF-8"> - <meta name="viewport" content="width=device-width, initial-scale=1.0"> - <link rel="stylesheet" href="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/css/admin_v2/main.css"> - <link rel="stylesheet" href="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/css/admin_v2/inner.css"> - <?php if (strpos($_SERVER['HTTP_USER_AGENT'], "Chrome/")): ?> - <link rel="stylesheet" href="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/css/admin_v2/chromium.css"> - <style>:root { --mpcms-banner: url(<?php - - if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/resources/upload/banner.jpg")) { - echo('"' . $GLOBALS["SYSTEM_ROOT"] . '/resources/upload/banner.jpg"'); - } else { - echo('"' . $GLOBALS["SYSTEM_ROOT"] . '/resources/image/default.jpg"'); - } - - ?>); }</style> - <?php endif; ?> - <style>:root { --mpcms-banner: url(<?php - - if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/resources/upload/banner.jpg")) { - echo('"' . $GLOBALS["SYSTEM_ROOT"] . '/resources/upload/banner.jpg"'); - } else { - echo('"' . $GLOBALS["SYSTEM_ROOT"] . '/resources/image/default.jpg"'); - } - - ?>); }</style> - </head> - - <body> - <div id="inner-items"> - <div class="inner-item" data-item-href="<?= $GLOBALS["SYSTEM_ROOT"] ?>/cms-special/admin-v2/advanced/jsonconf"> - <div class="inner-item-image-outer"> - <img alt="" class="inner-item-image" src="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/image/admin2/advanced.png"> - </div> - <div class="inner-item-text"> - <div> - <span class="inner-item-title"><?= $lang["admin-v2"]["security_items"][0] ?></span><br> - <span class="inner-item-description"><?= $lang["admin-v2"]["security_descriptions"][0] ?></span> - </div> - </div> - <div class="inner-item-enter-outer"> - <img alt="" class="inner-item-enter" src="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/image/admin2/enter.png"> - </div> - </div> - - <div class="inner-item" data-item-href="<?= $GLOBALS["SYSTEM_ROOT"] ?>/cms-special/admin-v2/stats"> - <div class="inner-item-image-outer"> - <img alt="" class="inner-item-image" src="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/image/admin2/stats.png"> - </div> - <div class="inner-item-text"> - <div> - <span class="inner-item-title"><?= $lang["admin-v2"]["security_items"][1] ?></span><br> - <span class="inner-item-description"><?= $lang["admin-v2"]["security_descriptions"][1] ?></span> - </div> - </div> - <div class="inner-item-enter-outer"> - <img alt="" class="inner-item-enter" src="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/image/admin2/enter.png"> - </div> - </div> - - </div> - </body> - - <script src="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/js/jquery.js"></script> - <script src="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/js/admin_v2.js"></script> - -</html>
\ No newline at end of file diff --git a/Neutron-trunk/cms-special/admin-v2/$panes/system.php b/Neutron-trunk/cms-special/admin-v2/$panes/system.php deleted file mode 100644 index 34cbc91..0000000 --- a/Neutron-trunk/cms-special/admin-v2/$panes/system.php +++ /dev/null @@ -1,124 +0,0 @@ -<?php - -require_once "../../../resources/private/relative.php"; getRelativeDetails("cms-special"); -require_once $_SERVER['DOCUMENT_ROOT'] . "/api/lang/processor.php"; -require_once $_SERVER['DOCUMENT_ROOT'] . "/cms-special/admin-v2/\$resources/session.php"; - -global $lang; - -?> -<!DOCTYPE html> -<html> - - <head> - <title>base</title> - <meta charset="UTF-8"> - <meta name="viewport" content="width=device-width, initial-scale=1.0"> - <link rel="stylesheet" href="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/css/admin_v2/main.css"> - <link rel="stylesheet" href="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/css/admin_v2/inner.css"> - <?php if (strpos($_SERVER['HTTP_USER_AGENT'], "Chrome/")): ?> - <link rel="stylesheet" href="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/css/admin_v2/chromium.css"> - <style>:root { --mpcms-banner: url(<?php - - if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/resources/upload/banner.jpg")) { - echo('"' . $GLOBALS["SYSTEM_ROOT"] . '/resources/upload/banner.jpg"'); - } else { - echo('"' . $GLOBALS["SYSTEM_ROOT"] . '/resources/image/default.jpg"'); - } - - ?>); }</style> - <?php endif; ?> - <style>:root { --mpcms-banner: url(<?php - - if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/resources/upload/banner.jpg")) { - echo('"' . $GLOBALS["SYSTEM_ROOT"] . '/resources/upload/banner.jpg"'); - } else { - echo('"' . $GLOBALS["SYSTEM_ROOT"] . '/resources/image/default.jpg"'); - } - - ?>); }</style> - </head> - - <body> - <div id="system-head"> - <div id="system-head-banner"> - <div id="system-head-banner-image"></div> - </div> - <div id="system-head-version"> - <div> - <b>Neutron 10</b><br> - version <?= trim(file_get_contents($_SERVER["DOCUMENT_ROOT"] . "/api/prettyver")) ?> « <?= trim(file_get_contents($_SERVER["DOCUMENT_ROOT"] . "/api/codename")) ?> » · build <?= substr(trim(file_get_contents($_SERVER["DOCUMENT_ROOT"] . "/api/version")), 5) ?> - </div> - </div> - </div> - - - <div class="inner-item" data-item-href="top://<?= $GLOBALS["SYSTEM_ROOT"] ?>/cms-special/admin-v2/logout"> - <div class="inner-item-image-outer"> - <img alt="" class="inner-item-image" src="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/image/admin2/logoff.png"> - </div> - <div class="inner-item-text"> - <div> - <span class="inner-item-title"><?= $lang["admin-v2"]["system_items"][3] ?></span><br> - <span class="inner-item-description"><?= $lang["admin-v2"]["system_descriptions"][3] ?></span> - </div> - </div> - <div class="inner-item-enter-outer"> - <img alt="" class="inner-item-enter" src="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/image/admin2/enter.png"> - </div> - </div> - - <div id="inner-items"> - <div class="inner-item" data-item-href="<?= $GLOBALS["SYSTEM_ROOT"] ?>/cms-special/admin-v2/about"> - <div class="inner-item-image-outer"> - <img alt="" class="inner-item-image" src="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/image/admin2/about.png"> - </div> - <div class="inner-item-text"> - <div> - <span class="inner-item-title"><?= $lang["admin-v2"]["system_items"][0] ?></span><br> - <span class="inner-item-description"><?= $lang["admin-v2"]["system_descriptions"][0] ?></span> - </div> - </div> - <div class="inner-item-enter-outer"> - <img alt="" class="inner-item-enter" src="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/image/admin2/enter.png"> - </div> - </div> - - <div class="inner-item" data-item-href="<?= $GLOBALS["SYSTEM_ROOT"] ?>/cms-special/admin-v2/logs"> - <div class="inner-item-image-outer"> - <img alt="" class="inner-item-image" src="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/image/admin2/audit.png"> - </div> - <div class="inner-item-text"> - <div> - <span class="inner-item-title"><?= $lang["admin-v2"]["system_items"][1] ?></span><br> - <span class="inner-item-description"><?= $lang["admin-v2"]["system_descriptions"][1] ?></span> - </div> - </div> - <div class="inner-item-enter-outer"> - <img alt="" class="inner-item-enter" src="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/image/admin2/enter.png"> - </div> - </div> - - <?php if (!file_exists($GLOBALS['ORIGINAL_DOCUMENT_ROOT'] . "/NeutronCloud")): ?> - <div class="inner-item" data-item-href="parent://minteck.ro.lt/creations/neutron"> - <div class="inner-item-image-outer"> - <img alt="" class="inner-item-image" src="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/image/admin2/install.png"> - </div> - <div class="inner-item-text"> - <div> - <span class="inner-item-title"><?= $lang["admin-v2"]["system_items"][2] ?></span><br> - <span class="inner-item-description"><?= $lang["admin-v2"]["system_descriptions"][2] ?></span> - </div> - </div> - <div class="inner-item-enter-outer"> - <img alt="" class="inner-item-enter" src="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/image/admin2/enter.png"> - </div> - </div> - <?php endif; ?> - </div> - </body> - - <script src="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/js/jquery.js"></script> - <script src="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/js/admin_v2.js"></script> - -</html>
\ No newline at end of file diff --git a/Neutron-trunk/cms-special/admin-v2/$resources/admin.js b/Neutron-trunk/cms-special/admin-v2/$resources/admin.js deleted file mode 100644 index e69de29..0000000 --- a/Neutron-trunk/cms-special/admin-v2/$resources/admin.js +++ /dev/null diff --git a/Neutron-trunk/cms-special/admin-v2/$resources/common.css b/Neutron-trunk/cms-special/admin-v2/$resources/common.css deleted file mode 100644 index 1276d2f..0000000 --- a/Neutron-trunk/cms-special/admin-v2/$resources/common.css +++ /dev/null @@ -1,518 +0,0 @@ -@import "./responsive.css"; - -html, body { - margin: 0; - color: var(--mpc-text) !important; - background-color: var(--mpc-background); -} - -.mdc-drawer { - color: var(--mpc-text) !important; - background-color: var(--mpc-menu-background) !important; - height: 100vh; - z-index: 99999999999 !important; -} - -.mdc-drawer .mdc-list-item--activated .mdc-list-item__graphic { - color: var(--mpc-menu-selected) !important; -} - -.mdc-list-item__graphic { - color: var(--mpc-icons) !important; -} - -.mdc-list-group__subheader { - color: var(--mpc-menu-header) !important; -} - -.mdc-drawer__subtitle { - color: var(--mpc-menu-subtitle) !important; -} - -.mdc-drawer__title { - color: var(--mpc-text) !important; -} - -.mdc-list-divider { - border-bottom-color: var(--mpc-separator); -} - -.mdc-list-item__text { - color: var(--mpc-text); -} - -.mdc-list-item.mdc-list-item--activated .mdc-list-item__text { - color: var(--mpc-menu-selected); -} - -.ttdemo { - padding: 10px; - font-family: "Noto Sans", "Segoe UI", "CMS", "Ubuntu", "Roboto", "Google Sans", "Segoe UI", "Noto Sans", Tahoma, Geneva, Verdana, sans-serif !important; -} - -* { - font-family: "Noto Sans", "Segoe UI", "CMS", "Ubuntu", "Roboto", "Google Sans", "Segoe UI", "Noto Sans", Tahoma, Geneva, Verdana, sans-serif; -} - -span, p, body, div, h1, h2, h3, h4, h5, h6 { - font-family: "Noto Sans", "Segoe UI", "CMS", "Ubuntu", "Roboto", "Google Sans", "Segoe UI", "Noto Sans", Tahoma, Geneva, Verdana, sans-serif !important; -} - -#main-content { - padding: 16px; - margin-top: 64px; - position: fixed; - top: 0; - bottom: 0; - left: 0; - right: 0; - overflow-y: auto; -} - -#app-frame { - margin: -16px; - border: none; - width: calc(100% + 32px); -} - -.mdc-top-app-bar--fixed-adjust { - margin: 0; - padding: 0; - height: calc(100% - 64px); -} - -.dualtitle-top { - margin-bottom: 4px; -} - -.dualtitle-bottom { - margin-top: 4px; -} - -.mdc-top-app-bar__section.mdc-top-app-bar__section--align-start > a { - color: inherit; - text-decoration: inherit; -} - -code { - font-family: monospace -} - -a { - color: slategray; -} - -a:hover { - color: gray; -} - -a:active { - color: lightgray; -} - -.mdc-card__primary-action { - padding: 0 16px; -} - -.mdc-icon-button.material-icons.mdc-card__action.mdc-card__action--icon--unbounded { - color: whitesmoke; -} - -img[width="128px"] { - border-radius: 9999px; -} - -.demo-card__primary { - display: grid; - grid-template-columns: 69.6px 1fr; -} - -.ccard_p1 { - margin-left: -15px; - border-top-right-radius: 2px; - border-top-left-radius: 2px; - height: 100%; - background-size: 100%; -} - -.ccard_p2 { - margin-left: 10px; -} - -.ccard_p2 h2 { - margin-bottom: 0; -} - -.ccard_p2 h3 { - margin-top: 0; -} - -.card_link, .card_link:hover, .card_link:active { - color: var(--mpc-text); - text-decoration: none; -} - -.mdc-list-item { - cursor: pointer; -} - -.mdc-list-item > i { - transform: rotate(0deg); - transition: transform 500ms; -} - -.mdc-list-item:hover > i { - transform: rotate(360deg) scale(125%); -} - -.mdc-drawer__header { - background: linear-gradient(to bottom, var(--mpc-menu-background-image) 50%, var(--mpc-menu-background)), url('../../../resources/image/codename.jpg'); - background-size: 100%; -} - -.mdc-top-app-bar__row { - width: 100% !important; -} - -#header-desktop { - height: 190px; - z-index: 2; -} - -#app-grid { - z-index: 5; - position: absolute; - width: 100%; - top: 170px; -} - -#main-content { - z-index: 5; - background: var(--mpc-background); - border-radius: 15px; - position: initial; - margin: 0; - min-height: 200px; -} - -#portal-background { - position: fixed; - top: -20px; - left: -20px; - right: -20px; - height: 230px; - background-image: linear-gradient(to bottom, var(--mpc-menu-background-image) 50%, var(--mpc-menu-background-image)), url('../../../resources/image/codename.jpg'); - background-size: 100%; - background-position: center; - transition: filter 200ms, background-size 200ms, background-image 200ms; - filter: none; -} - -#portal-background.updates { - z-index: 2; -} - -#portal-background.scrolled { - background-image: linear-gradient(to bottom, var(--mpc-menu-background-image-more) 50%, var(--mpc-menu-background-image-more)), url('../../../resources/image/codename.jpg'); - filter: blur(5px); - background-size: 110%; -} - -#header-desktop { - background: transparent; - color: var(--mpc-text); -} - -.mdc-top-app-bar__section.mdc-top-app-bar__section--align-end .material-icons-outlined.mdc-top-app-bar__navigation-icon.mdc-icon-button { - color: var(--mpc-text); -} - -#version-place { - position: absolute; - top: -20px; - font-size: 12px; - opacity: .5; -} - -#language-selector { - position: absolute; - font-size: 18px; - opacity: .5; - left: 0; - top: 0; -} - -#home-grid { - display: grid; - grid-template-columns: 1fr 1fr 1fr; -} - -.home-grid-item { - margin: 20px; -} - -#home-grid-item-pages { - color: var(--mpc-home-pages); - --mpc-icons: var(--mpc-home-pages); -} - -#home-grid-item-calendar { - color: var(--mpc-home-calendar); - --mpc-icons: var(--mpc-home-calendar); -} - -#home-grid-item-gallery { - color: var(--mpc-home-gallery); - --mpc-icons: var(--mpc-home-gallery); -} - -#home-grid-item-appearance { - color: var(--mpc-home-appearance); - --mpc-icons: var(--mpc-home-appearance); -} - -#home-grid-item-data { - color: var(--mpc-home-data); - --mpc-icons: var(--mpc-home-data); -} - -#home-grid-item-housekeeping { - color: var(--mpc-home-housekeeping); - --mpc-icons: var(--mpc-home-housekeeping); -} - -.home-grid-item-button { - font-size: 64px; - width: 86px; - height: 86px; -} - -a:not(.material-icons):not(.material-icons-outlined):not(.button):not(.spotlight-link) { - color: var(--codename-theme); - text-decoration-color: var(--codename-theme); -} - -a:not(.material-icons):not(.material-icons-outlined):not(.button):active, a:not(.material-icons):not(.material-icons-outlined):not(.button):focus:not(.spotlight-link) { - opacity: .75; -} - -.ck.ck-editor__main a { - color: inherit !important; - text-decoration-color: inherit !important; -} - -.all-item-icon { - margin-right: 5px; - vertical-align: middle; -} - -.all-item-text { - vertical-align: middle; -} - -.all-item-link { - color: white !important; - text-decoration: none !important; -} - -.nd_Field { - display: -webkit-box; - display: -ms-flexbox; - display: flex; - -webkit-box-flex: 1; - -ms-flex: 1; - flex: 1; - min-width: 0; - position: relative; - margin: 1em 0; - border-radius: 4px; - -webkit-transition: border-color .25s; - transition: border-color .25s; - border: 1px solid var(--codename-theme); -} - -.nd_Field input { - -webkit-box-sizing: border-box; - box-sizing: border-box; -} - -.nd_Field input, .nd_Field select { - color: var(--mpc-text); -} - -.nd_Field input[type="password"], .nd_Field input[type="text"] { - color: var(--mpc-text); -} - -.nd_Field input, .nd_Field select, .nd_Field textarea { - font-weight: 400; - font-size: 1.4rem; - border: none; - border-radius: 4px; - padding: 8px 9px; - color: var(--mpc-text); - background-color: transparent; - -webkit-box-flex: 1; - -ms-flex: 1; - flex: 1; - min-width: 0; -} - -.nd_Field input[type="password"], .nd_Field input[type="text"], .nd_Field textarea { - background-color: transparent; - color: var(--mpc-text); -} - -.nd_Field input[type="password"]::placeholder, .nd_Field input[type="text"]::placeholder, .nd_Field textarea::placeholder { - color: transparent; -} - -.nd_Field.fallback input[type="password"]::placeholder, .nd_Field.fallback input[type="text"]::placeholder, .nd_Field.fallback textarea::placeholder { - color: var(--codename-theme); - opacity: 1; -} - -.nd_Field input[type="password"], .nd_Field input[type="search"], .nd_Field input[type="text"] { - padding: 9px; - font-size: 14px; - font-weight: 600; - min-width: 0; -} - -.nd_Field_labelAlwaysTopLeft label, .nd_Field input:focus + label, .nd_Field input:not(:placeholder-shown) + label, .nd_Field select + label, .nd_Field textarea:focus + label, .nd_Field textarea:not(:placeholder-shown) + label { - background-color: transparent; -} - -.nd_Field_labelAlwaysTopLeft label, .nd_Field input:focus + label, .nd_Field input:not(:placeholder-shown) + label, .nd_Field select + label, .nd_Field textarea:focus + label, .nd_Field textarea:not(:placeholder-shown) + label { - -webkit-transition: font-size .25s ease-out 0s,color .25s ease-out 0s,top .25s ease-out 0s,background-color .25s ease-out 0s; - transition: font-size .25s ease-out 0s,width .25s ease-out 0s,color .25s ease-out 0s,top .25s ease-out 0s,background-color .25s ease-out 0s; - font-size: 14px; - top: -14px; - padding: 0 2px; - background-color: var(--mpc-background); - pointer-events: auto; -} - -.nd_Field label { - width: 100%; - -webkit-transition: font-size .25s ease-out .1s,color .25s ease-out .1s,top .25s ease-out .1s,background-color .25s ease-out .1s; - transition: font-size .25s ease-out .1s,color .25s ease-out .1s,top .25s ease-out .1s,background-color .25s ease-out .1s; - color: var(--codename-theme); - background-color: transparent; - font-size: 14px; - position: absolute; - left: 0; - top: 0; - margin: 7px 8px; - padding: 2px; - pointer-events: none; - overflow: hidden; - white-space: nowrap; - text-overflow: ellipsis; - max-width: calc(100% - 20px); -} - -#search { - width: 256px; -} - -#searchbox { - width: 256px; - margin-left: auto; - margin-right: auto; -} - -.nd_Field input { - border: none !important; - font-weight: normal !important; -} - -.search-match { - color: var(--codename-theme); - text-decoration: underline; -} - -a.discreet, a.discreet:hover, a.discreet:active { - color: inherit !important; - text-decoration: none; -} - -.updates-status { - font-size: 64px; -} - -.separator { - border-bottom: none; - border-color: rgba(0, 0, 0, .5); -} - -#updates-available { - background-color: rgba(211, 211, 0, 0.5); - text-align: center; - z-index: 999999; - position: relative; -} - -.admin-pages-list { - display: grid; - grid-template-columns: 256px 256px 256px 256px 256px; - grid-column-gap: 20px; -} - -@media (max-width: 1424px) { - .admin-pages-list { - grid-template-columns: 256px 256px 256px 256px; - } -} - -@media (max-width: 968px) { - .admin-pages-list { - grid-template-columns: 256px 256px 256px; - } -} - -@media (max-width: 712px) { - .admin-pages-list { - grid-template-columns: 256px 256px; - } -} - -@media (max-width: 556px) { - .admin-pages-list { - grid-template-columns: 256px; - } -} - -.mdc-card__actions-pages-list { - position: absolute; - bottom: 0; -} - -.mdc-button--raised { - color: var(--mdc-theme-on-primary) !important; -} - -.nd_Field, .nd_Field * { - outline: none; -} - -.nd_Field input { - padding-top: 10px !important; -} - -.nd_Field { - width: 256px; -} - -.nd_Field label { - text-align: center; -} - -.nd_Field__centered { - margin-right: auto; - margin-left: auto; -} - -.nd_Field__disabled { - opacity: .5; -}
\ No newline at end of file diff --git a/Neutron-trunk/cms-special/admin-v2/$resources/header.php b/Neutron-trunk/cms-special/admin-v2/$resources/header.php deleted file mode 100644 index e69de29..0000000 --- a/Neutron-trunk/cms-special/admin-v2/$resources/header.php +++ /dev/null diff --git a/Neutron-trunk/cms-special/admin-v2/$resources/index-auto.css b/Neutron-trunk/cms-special/admin-v2/$resources/index-auto.css deleted file mode 100644 index 773eab9..0000000 --- a/Neutron-trunk/cms-special/admin-v2/$resources/index-auto.css +++ /dev/null @@ -1,3 +0,0 @@ -@import url("./index.css") only screen and (prefers-color-scheme: light); -@import url("./index.css") only screen and (prefers-color-scheme: no-preference); -@import url("./index-dark.css") only screen and (prefers-color-scheme: dark);
\ No newline at end of file diff --git a/Neutron-trunk/cms-special/admin-v2/$resources/index-dark.css b/Neutron-trunk/cms-special/admin-v2/$resources/index-dark.css deleted file mode 100644 index 1683192..0000000 --- a/Neutron-trunk/cms-special/admin-v2/$resources/index-dark.css +++ /dev/null @@ -1,45 +0,0 @@ -@import "./common.css"; - -:root { - --mdc-theme-primary: var(--codename-theme); - --mdc-theme-secondary: var(--codename-secondary); - --mdc-theme-secondary-light: var(--codename-light); - --mdc-theme-on-primary: #ffffff; - --mdc-theme-on-secondary: white; - --mdc-theme-surface: rgb(44, 44, 44); - --mdc-theme-on-surface: whitesmoke; - --mpc-background: rgb(46, 46, 46); - --mpc-menu-background: rgb(22, 22, 22); - --mpc-menu-background-image: rgb(22, 22, 22, .5); - --mpc-menu-background-image-more: rgb(22, 22, 22, .75); - --mpc-text: whitesmoke; - --mpc-menu-selected: var(--mdc-theme-secondary-light); - --mpc-menu-header: rgb(223, 223, 223); - --mpc-menu-subtitle: rgb(182, 182, 182); - --mpc-icons: rgb(226, 226, 226); - --mpc-separator: rgb(138, 138, 138); - - --mpc-home-pages: rgb(179, 229, 252); - --mpc-home-calendar: rgb(200, 230, 201); - --mpc-home-gallery: rgb(255, 205, 210); - --mpc-home-appearance: rgb(255, 249, 196); - --mpc-home-data: rgb(178, 223, 219); - --mpc-home-housekeeping: rgb(209, 196, 233); - - --mpc-slse-hover1: rgba(255, 255, 255, 0.25); - --mpc-slse-hover2: rgba(255, 255, 255, 0.1); -} - -/* --------------------- */ - -.ck.ck-content { - background: #4a4a4a !important; -} - -.message_img { - filter: invert(100%); -} - -.mdi-icbtn-card { - color: rgba(255,255,255,1) !important; -}
\ No newline at end of file diff --git a/Neutron-trunk/cms-special/admin-v2/$resources/index.css b/Neutron-trunk/cms-special/admin-v2/$resources/index.css deleted file mode 100644 index 57dd995..0000000 --- a/Neutron-trunk/cms-special/admin-v2/$resources/index.css +++ /dev/null @@ -1,31 +0,0 @@ -@import "./common.css"; - -:root { - --mdc-theme-primary: var(--codename-theme); - --mdc-theme-secondary: var(--codename-secondary); - --mdc-theme-secondary-light: var(--codename-light); - --mdc-theme-on-primary: white; - --mdc-theme-on-secondary: white; - --mdc-theme-surface: rgb(238, 238, 238); - --mdc-theme-on-surface: #000000; - --mpc-background: rgb(255, 255, 255); - --mpc-menu-background: rgb(240, 240, 240); - --mpc-menu-background-image: rgb(240, 240, 240, .5); - --mpc-menu-background-image-more: rgb(240, 240, 240, .75); - --mpc-text: rgb(0, 0, 0); - --mpc-menu-selected: var(--mdc-theme-secondary-light); - --mpc-menu-header: rgb(80, 80, 80); - --mpc-menu-subtitle: rgb(34, 34, 34); - --mpc-icons: rgb(78, 78, 78); - --mpc-separator: rgb(202, 202, 202); - - --mpc-home-pages: rgb(25, 118, 210); - --mpc-home-calendar: rgb(56, 142, 60); - --mpc-home-gallery: rgb(211, 47, 47); - --mpc-home-appearance: rgb(251, 192, 45); - --mpc-home-data: rgb(0, 121, 107); - --mpc-home-housekeeping: rgb(81, 45, 168); - - --mpc-slse-hover1: rgba(0, 0, 0, 0.25); - --mpc-slse-hover2: rgba(0, 0, 0, 0.1); -}
\ No newline at end of file diff --git a/Neutron-trunk/cms-special/admin-v2/$resources/postcontent.php b/Neutron-trunk/cms-special/admin-v2/$resources/postcontent.php deleted file mode 100644 index cface57..0000000 --- a/Neutron-trunk/cms-special/admin-v2/$resources/postcontent.php +++ /dev/null @@ -1,6 +0,0 @@ -<?php require_once $_SERVER['DOCUMENT_ROOT'] . "/resources/private/debug.php";debugDump(); ?> - </div> -</body> -</html> - -<script src="<?= $GLOBALS["SYSTEM_ROOT"] ?>/cms-special/admin-v2/$resources/admin.js" charset="utf-8"></script>
\ No newline at end of file diff --git a/Neutron-trunk/cms-special/admin-v2/$resources/precontent.php b/Neutron-trunk/cms-special/admin-v2/$resources/precontent.php deleted file mode 100644 index 9b7e60c..0000000 --- a/Neutron-trunk/cms-special/admin-v2/$resources/precontent.php +++ /dev/null @@ -1,235 +0,0 @@ -<?php - -require $_SERVER['DOCUMENT_ROOT'] . "/api/lang/processor.php"; - -$pageid = explode("/", $_SERVER['REQUEST_URI'])[3]; -if (isset(explode("/", $_SERVER['REQUEST_URI'])[4])) { - if (explode("/", $_SERVER['REQUEST_URI'])[4] != "index.php" && substr(explode("/", $_SERVER['REQUEST_URI'])[4], 0, 1) != "?" && substr(explode("/", $_SERVER['REQUEST_URI'])[4], 0, 1) != "#") { - if (isset($lang["admin-titles"][$pageid]['subpages'])) { - $subpageid = explode("/", $_SERVER['REQUEST_URI'])[4]; - $subpageel = (array)$lang["admin-titles"][$pageid]['subpages']; - } else { - $subpageid = ""; - } - } else { - $subpageid = ""; - } -} else { - $subpageid = ""; -} - -if (isset($lang["admin-titles"][$pageid])) { - if (isset($lang["admin-titles"][$pageid]['dom']) && isset($lang["admin-titles"][$pageid]['header'])) { - if (isset($lang["admin-titles"][$pageid]['subpages'])) { - if ($subpageid != "") { - $subpages = $lang["admin-titles"][$pageid]['subpages']; - if (isset($subpageel)) { - if (isset($subpageel[$subpageid])) { - $pageConfig = [ "domName" => $subpageel[$subpageid]['dom'] . " — " . $lang["admin-titles"][$pageid]['dom'], "headerName" => $subpageel[$subpageid]['header'] ]; - } else { - $pageConfig = [ "domName" => $lang["admin-titles"]["fallback-subpages"] . " — " . $lang["admin-titles"][$pageid]['dom'], "headerName" => $lang["admin-titles"]["fallback-subpages"] ]; - } - } else { - $pageConfig = [ "domName" => $lang["admin-titles"][$pageid]['dom'], "headerName" => $lang["admin-titles"][$pageid]['header'] ]; - } - } else { - $pageConfig = [ "domName" => $lang["admin-titles"][$pageid]['dom'], "headerName" => $lang["admin-titles"][$pageid]['header'] ]; - } - } else { - $pageConfig = [ "domName" => $lang["admin-titles"][$pageid]['dom'], "headerName" => $lang["admin-titles"][$pageid]['header'] ]; - } - } else { - $pageConfig = [ "domName" => $lang["admin-titles"]["fallback"]['dom'], "headerName" => $lang["admin-titles"]["fallback"]['header'] ]; - } -} else { - $pageConfig = [ "domName" => $lang["admin-titles"]["fallback"], "headerName" => $lang["admin-titles"]["fallback"] ]; -} - -$invalid = false; - -if (isset($_COOKIE['_NEUTRON_ADMIN_TOKEN']) && $_COOKIE['_NEUTRON_ADMIN_TOKEN'] != "." && $_COOKIE['_NEUTRON_ADMIN_TOKEN'] != ".." && $_COOKIE['_NEUTRON_ADMIN_TOKEN'] != "/" && strpos($_COOKIE['_NEUTRON_ADMIN_TOKEN'], "/") === false) { - if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/data/tokens/" . $_COOKIE['_NEUTRON_ADMIN_TOKEN'])) { - - } else { - require $_SERVER['DOCUMENT_ROOT'] . "/api/electrode/quit.php";quit("<script>location.href = '" . $GLOBALS["SYSTEM_ROOT"] . "/cms-special/admin-v2/login'</script>"); - } -} else { - require $_SERVER['DOCUMENT_ROOT'] . "/api/electrode/quit.php";quit("<script>location.href = '" . $GLOBALS["SYSTEM_ROOT"] . "/cms-special/admin-v2/login'</script>"); -} - -if (isset($_POST['password'])) { - if (password_verify($_POST['password'], file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/password"))) { - require $_SERVER['DOCUMENT_ROOT'] . "/api/electrode/quit.php";quit("<script>location.href = '" . $GLOBALS["SYSTEM_ROOT"] . "/cms-special/admin-v2/home';</script>"); - return; - } else { - $invalid = true; - } -} - -?> - -<?php ob_start();echo("<!--\n\n" . str_replace('%year%', date('Y'), file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/resources/private/license")) . "\n\n-->") ?> -<?php - -if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent")) { - $ready = true; -} else { - $ready = false; -} - -function startsWith ($string, $startString) { - $len = strlen($startString); - return (substr($string, 0, $len) === $startString); -} - -function getData(string $dir, $ignoreUploadDir = false) { - global $size; - $dircontent = scandir($dir); - foreach ($dircontent as $direl) { - if (($ignoreUploadDir && ($direl == "/upload" || $dir . "/" . $direl == $_SERVER['DOCUMENT_ROOT'] . "/resources/upload")) || $direl == ".git") {} else { - if ($direl == "." || $direl == "..") {} else { - if (is_link($dir . "/" . $direl)) {} else { - if (is_dir($dir . "/" . $direl)) { - getData($dir . "/" . $direl); - } else { - try { - $size = $size + filesize($dir . "/" . $direl); - } catch (Error $err) {} - } - } - } - } - } -} - -function isJson(string $json) { - json_decode($json); - return (json_last_error() == JSON_ERROR_NONE); -} - -require_once $_SERVER['DOCUMENT_ROOT'] . "/resources/private/headers/preprocessor.php"; - -?> - -<!DOCTYPE html> -<html style="background-color:transparent !important;"> -<head> - <meta charset="UTF-8"> - <meta name="viewport" content="width=device-width, initial-scale=1.0"> - <meta http-equiv="X-UA-Compatible" content="ie=edge"> - <link rel="stylesheet" href="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/css/fonts-import.css"> - <link rel="stylesheet" href="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/css/alerts.css"> - <link href="<?= $_MD_INCLUDES ?>/material-components-web.min.css" rel="stylesheet"> - <script src="<?= $_MD_INCLUDES ?>/material-components-web.min.js"></script> - <link rel="stylesheet" href="<?= $_MDI_PATH ?>"> - <link rel="stylesheet" href="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/css/spotlight.css"> - <link rel="stylesheet" href="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/css/admin.css"> - <link rel="stylesheet" href="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/css/ui.css"> - <link rel="stylesheet" href="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/css/codename.css"> - <link rel="icon" href="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/image/siteicon.png"> - <script src="<?= $GLOBALS["SYSTEM_ROOT"] ?>/cms-special/admin-v2/$resources/admin.js"></script> - <link rel="preload" href="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/css/fonts-import.css" as="style"> - <link rel="preload" href="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/css/alerts.css" as="style"> - <link rel="preload" href="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/css/admin.css" as="style"> - <link rel="preload" href="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/css/ui.css" as="style"> - <link rel="preload" href="<?= $GLOBALS["SYSTEM_ROOT"] ?>/cms-special/admin-v2/$resources/common.css" as="style"> - <link rel="preload" href="<?= $GLOBALS["SYSTEM_ROOT"] ?>/cms-special/admin-v2/$resources/index.css" as="style"> - <link rel="preload" href="<?= $GLOBALS["SYSTEM_ROOT"] ?>/cms-special/admin-v2/$resources/responsive.css" as="style"> - <link rel="preload" href="<?= $GLOBALS["SYSTEM_ROOT"] ?>/cms-special/admin-v2/$resources/index-dark.css" as="style"> - <link rel="preload" href="<?= $_MD_INCLUDES ?>/material-components-web.min.css" as="style"> - <link rel="preload" href="<?= $_MDI_PATH ?>" as="style"> - <link rel="preload" href="<?= $_MD_INCLUDES ?>/material-components-web.min.js" as="script"> - <link rel="preload" href="<?= $GLOBALS["SYSTEM_ROOT"] ?>/cms-special/admin-v2/$resources/admin.js" as="script"> - <?php require_once $_SERVER['DOCUMENT_ROOT'] . "/resources/private/headers/documenthead.php"; ?> - - <?php - - if (!isset($loadEditor)) { - $loadEditor = true; - } - - if ($loadEditor) { - echo('<script src="' . $GLOBALS["SYSTEM_ROOT"] . '/resources/js/ckeditor5/ckeditor.js"></script><script src="' . $GLOBALS["SYSTEM_ROOT"] . '/resources/js/ckeditor5/translations/fr.js"></script><script src="' . $GLOBALS["SYSTEM_ROOT"] . '/resources/js/ckeditor5/translations/en.js"></script>'); - } - - ?> - <?php - /*if (file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/theme") == "dark") {*/ - echo('<link rel="stylesheet" href="' . $GLOBALS["SYSTEM_ROOT"] . '/cms-special/admin-v2/$resources/index-dark.css">'); - /*} elseif (file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/theme") == "auto") { - echo('<link rel="stylesheet" href="' . $GLOBALS["SYSTEM_ROOT"] . '/cms-special/admin-v2/$resources/index-auto.css">'); - } else { - echo('<link rel="stylesheet" href="' . $GLOBALS["SYSTEM_ROOT"] . '/cms-special/admin-v2/$resources/index.css">'); - }*/ - ?> - <link rel="stylesheet" href="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/lib/pushbar.js/library.css"> - <?php if (strpos($_SERVER['HTTP_USER_AGENT'], "Chrome/")): ?> - <link rel="stylesheet" href="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/css/admin_v2/chromium.css"> - <style>:root { --mpcms-banner: url(<?php - - if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/resources/upload/banner.jpg")) { - echo('"' . $GLOBALS["SYSTEM_ROOT"] . '/resources/upload/banner.jpg"'); - } else { - echo('"' . $GLOBALS["SYSTEM_ROOT"] . '/resources/image/default.jpg"'); - } - - ?>); }</style> - <?php endif; ?> - <script src="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/lib/pushbar.js/library.js"></script> - <title><?php - - if ($ready) { - echo("{$lang["admin-titles"]["suffix"]} — " . file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/sitename")); - } else { - echo("{$lang["admin-titles"]["suffix"]} — Neutron"); - } - - ?></title> - <?php - if (!$ready) { - require $_SERVER['DOCUMENT_ROOT'] . "/api/electrode/quit.php";quit("<script>location.href = '" . $GLOBALS["SYSTEM_ROOT"] . "/cms-special/setup';</script></head>"); - } - ?> - <?php - - getData($_SERVER['DOCUMENT_ROOT']); - $sizestr = $size . " " . $lang["sizes"]["bytes"]; - if ($size > 1024) { - if ($size > 1048576) { - if ($size > 1073741824) { - $sizestr = round($size / 1073741824, 2) . " " . $lang["sizes"]["gib"]; - } else { - $sizestr = round($size / 1048576, 2) . " " . $lang["sizes"]["mib"]; - } - } else { - $sizestr = round($size / 1024, 2) . " " . $lang["sizes"]["kib"]; - } - } else { - $sizestr = $size . " " . $lang["sizes"]["bytes"]; - } - $sizestr = str_replace(".", $lang["sizes"]["separator"], $sizestr); - - ?> -</head> -<body id="settings" style="background-color:transparent !important;overflow-x:hidden;"> - <?php require_once $_SERVER['DOCUMENT_ROOT'] . "/cms-special/admin-v2/\$resources/spotlight.php"; ?> - <?php - - require_once $_SERVER['DOCUMENT_ROOT'] . "/resources/private/headers/documentbody.php"; - - $path = str_replace("/index.php", "", $_SERVER['SCRIPT_NAME']); - $name = $pageConfig['headerName']; - - ?> - <div id="admin" style="background-color:transparent !important;"> - <?php - - if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/updates")) { - echo("<div id=\"updates-available\">" . $lang["admin-home"]["updates"][0] . " — <a href=\"/cms-special/admin-v2/updates\">" . $lang["admin-home"]["updates"][1] . "</a></div>"); - $updatable = true; - } else { - $updatable = false; - } - - ?> - <?php require_once $_SERVER['DOCUMENT_ROOT'] . "/cms-special/admin-v2/\$resources/header.php"; ?>
\ No newline at end of file diff --git a/Neutron-trunk/cms-special/admin-v2/$resources/responsive.css b/Neutron-trunk/cms-special/admin-v2/$resources/responsive.css deleted file mode 100644 index 75810b1..0000000 --- a/Neutron-trunk/cms-special/admin-v2/$resources/responsive.css +++ /dev/null @@ -1,31 +0,0 @@ -@media (max-width: 500px) { - /* The following CSS will apply ONLY to smartphones or small screens */ - .error-desktop { - display: none; - } - .error-mobile { - display: initial; - } - div#home-grid { - display: grid; - grid-template-columns: 1fr !important; - } -} - -@media (max-width: 720px) { - /* The following CSS will apply ONLY to medium screens (less than 720p) */ - #home-grid { - display: grid; - grid-template-columns: 1fr 1fr !important; - } -} - -@media (min-width: 500px) { - /* The following CSS will NEVER apply to smartphones or small screens */ - .error-desktop { - display: initial; - } - .error-mobile { - display: none; - } -}
\ No newline at end of file diff --git a/Neutron-trunk/cms-special/admin-v2/$resources/session.php b/Neutron-trunk/cms-special/admin-v2/$resources/session.php deleted file mode 100644 index ae480ba..0000000 --- a/Neutron-trunk/cms-special/admin-v2/$resources/session.php +++ /dev/null @@ -1,11 +0,0 @@ -<?php - -if (isset($_COOKIE['_NEUTRON_ADMIN_TOKEN']) && $_COOKIE['_NEUTRON_ADMIN_TOKEN'] != "." && $_COOKIE['_NEUTRON_ADMIN_TOKEN'] != ".." && $_COOKIE['_NEUTRON_ADMIN_TOKEN'] != "/" && strpos($_COOKIE['_NEUTRON_ADMIN_TOKEN'], "/") === false) { - if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/data/tokens/" . $_COOKIE['_NEUTRON_ADMIN_TOKEN'])) { - - } else { - require $_SERVER['DOCUMENT_ROOT'] . "/api/electrode/quit.php";quit("<script>location.href = '" . $GLOBALS["SYSTEM_ROOT"] . "/cms-special/admin-v2/login'</script>"); - } -} else { - require $_SERVER['DOCUMENT_ROOT'] . "/api/electrode/quit.php";quit("<script>location.href = '" . $GLOBALS["SYSTEM_ROOT"] . "/cms-special/admin-v2/login'</script>"); -}
\ No newline at end of file diff --git a/Neutron-trunk/cms-special/admin-v2/$resources/spotlight-test.php b/Neutron-trunk/cms-special/admin-v2/$resources/spotlight-test.php deleted file mode 100644 index 625f734..0000000 --- a/Neutron-trunk/cms-special/admin-v2/$resources/spotlight-test.php +++ /dev/null @@ -1,14 +0,0 @@ -<?php require_once $_SERVER['DOCUMENT_ROOT'] . "/api/lang/processor.php"; ?> -<!DOCTYPE html> -<html lang="en"> -<head> - <meta charset="UTF-8"> - <meta name="viewport" content="width=device-width, initial-scale=1.0"> - <title>Spotlight search test</title> - <link rel="stylesheet" href="/resources/css/spotlight.css"> - <link rel="stylesheet" href="/resources/lib/material/iconfont.css"> -</head> -<body> - <?php require_once $_SERVER['DOCUMENT_ROOT'] . "/cms-special/admin-v2/\$resources/spotlight.php"; ?> -</body> -</html>
\ No newline at end of file diff --git a/Neutron-trunk/cms-special/admin-v2/$resources/spotlight.php b/Neutron-trunk/cms-special/admin-v2/$resources/spotlight.php deleted file mode 100644 index 2a09ed3..0000000 --- a/Neutron-trunk/cms-special/admin-v2/$resources/spotlight.php +++ /dev/null @@ -1,24 +0,0 @@ -<?php // Tutoriel utilisé : https://www.youtube.com/watch?v=5Y3Urj_DVMw -?> -<script src="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/js/spotlight.js" defer></script> - -<?php - -$data = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/cms-special/admin-v2/home/all/db.json")); - -?> -<ul class="spotlight-elements"> - <?php foreach ($data as $category): ?> - <?php foreach ($category->items as $item): ?> - <li class="spotlight-element"> - <a href="#/<?= $item->page ?>" cat="<?= $category->name ?>" icon="<?= $category->icon ?>" class="spotlight-link"><?= $lang["admin-home"]["allitems"][$item->id] ?></a> - </li> - - <script> - sysroot = "<?= $GLOBALS["SYSTEM_ROOT"] ?>"; - </script> - <?php endforeach; ?> - <?php endforeach; ?> -</ul> -<spotlight-bar target=".spotlight-elements a" placeholder="<?= $lang["spotlight"]["search"] ?>"> -</spotlight-bar>
\ No newline at end of file diff --git a/Neutron-trunk/cms-special/admin-v2/.htaccess b/Neutron-trunk/cms-special/admin-v2/.htaccess deleted file mode 100644 index d53a146..0000000 --- a/Neutron-trunk/cms-special/admin-v2/.htaccess +++ /dev/null @@ -1,4 +0,0 @@ -ErrorDocument 404 "/cms-special/admin-v2/error" -ErrorDocument 403 "/cms-special/admin-v2/error" -ErrorDocument 401 "/cms-special/admin-v2/error" -ErrorDocument 500 "/cms-special/admin-v2/error"
\ No newline at end of file diff --git a/Neutron-trunk/cms-special/admin-v2/about/index.php b/Neutron-trunk/cms-special/admin-v2/about/index.php deleted file mode 100644 index c9791a0..0000000 --- a/Neutron-trunk/cms-special/admin-v2/about/index.php +++ /dev/null @@ -1,98 +0,0 @@ -<?php require_once "../../../resources/private/relative.php"; getRelativeDetails("cms-special"); ?> -<?php $pageConfig = [ "domName" => "Mise à jour et sécurité", "headerName" => "Mise à jour et sécurité" ]; require_once $_SERVER['DOCUMENT_ROOT'] . "/cms-special/admin-v2/\$resources/precontent.php"; ?> - <?php - - $currentVersionP = file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/api/version"); - $currentVersion = $currentVersionP; - - ?> - <h3><?= $lang["admin-about"]["new"]["overview"] ?></h3> - <ul><li> - <?php - - echo("" . $lang['admin-about']['version']['prefix'] . " <b>" . $currentVersionP . "</b>"); - echo("</li>"); - - $size = 0; - getData($_SERVER['DOCUMENT_ROOT']); - $sizestr = $size . " " . $lang["sizes"]["bytes"] . ""; - if ($size > 1024) { - if ($size > 1048576) { - if ($size > 1073741824) { - $sizestr = round($size / 1073741824, 3) . " " . $lang["sizes"]["gibibytes"] . ""; - } else { - $sizestr = round($size / 1048576, 3) . " " . $lang["sizes"]["mebibytes"] . ""; - } - } else { - $sizestr = round($size / 1024, 3) . " " . $lang["sizes"]["kibibytes"] . ""; - } - } else { - $sizestr = $size . " " . $lang["sizes"]["bytes"] . ""; - } - - if (!file_exists($GLOBALS["ORIGINAL_DOCUMENT_ROOT"] . "/NeutronCloud")) { - echo("<li>" . $lang["admin-about"]["diskspace"][0] . " <b>" . $sizestr . "</b> " . $lang["admin-about"]["diskspace"][1] . "</li>"); - } else { - $sizep = $size; - switch (file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/Tier")) { - case "3": - $size = 104857600; - break; - - case "5": - $size = 262144000; - break; - - case "7": - $size = 524288000; - break; - } - $sizestr2 = $size . " " . $lang["sizes"]["bytes"] . ""; - if ($size > 1024) { - if ($size > 1048576) { - if ($size > 1073741824) { - $sizestr2 = round($size / 1073741824, 3) . " " . $lang["sizes"]["gibibytes"] . ""; - } else { - $sizestr2 = round($size / 1048576, 3) . " " . $lang["sizes"]["mebibytes"] . ""; - } - } else { - $sizestr2 = round($size / 1024, 3) . " " . $lang["sizes"]["kibibytes"] . ""; - } - } else { - $sizestr2 = $size . " " . $lang["sizes"]["bytes"] . ""; - } - - echo("<li>" . $lang["admin-about"]["diskspace"][0] . " <b>" . $sizestr . "/" . $sizestr2 . "</b> " . $lang["admin-about"]["diskspace"][1]); - if (file_exists($GLOBALS["ORIGINAL_DOCUMENT_ROOT"] . "/NeutronCloud")) { - echo(" (" . round(($sizep / $size) * 100, 2) . "%)"); - } - echo("</li>"); - } - - ?> - </ul> - -<h3><?= $lang["admin-about"]["new"]["version"] ?></h3> - -<ul> - <li><b>Neutron <?= trim(file_get_contents($_SERVER["DOCUMENT_ROOT"] . "/api/prettyver")) ?> « <?= trim(file_get_contents($_SERVER["DOCUMENT_ROOT"] . "/api/codename")) ?> »</b> (build <?= substr(trim(file_get_contents($_SERVER["DOCUMENT_ROOT"] . "/api/version")), 5) ?>)</li> - - <?php if (file_exists($GLOBALS["ORIGINAL_DOCUMENT_ROOT"] . "/NeutronCloud")): ?><li><?= $lang["admin-about"]["new"]["types"][0] ?></li><?php else: ?><li><?= $lang["admin-about"]["new"]["types"][1] ?></li><?php endif; ?> - - <li><b><?= $lang["admin-about"]["new"]["renderer"][0] ?></b> <?= file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/api/cyclic_version") ?></li> - <li><b><?= $lang["admin-about"]["new"]["renderer"][1] ?></b> <?= file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/api/jaw_version") ?></li> -</ul> - -<h3><?= $lang["admin-about"]["new"]["system"] ?></h3> - -<ul> - <?php if (isset($__electrode) && isset($__electrode_version) && isset($__electrode_node_version)): ?> - <li><?= "Electrode " . $__electrode_version . "</li><li>NodeJS " . $__electrode_node_version ?></li> - <?php endif; ?> - - <li>PHP <?= PHP_VERSION ?> (<?= PHP_SAPI ?>, <?= PHP_BINARY ?>)</li> - - <li><?= php_uname('s') . " " . php_uname('m') . " " . php_uname('r') ?></li> -</ul> - -<?php require_once $_SERVER['DOCUMENT_ROOT'] . "/cms-special/admin-v2/\$resources/postcontent.php"; ?> diff --git a/Neutron-trunk/cms-special/admin-v2/advanced/index.php b/Neutron-trunk/cms-special/admin-v2/advanced/index.php deleted file mode 100644 index 72a4fe1..0000000 --- a/Neutron-trunk/cms-special/admin-v2/advanced/index.php +++ /dev/null @@ -1,8 +0,0 @@ -<?php require_once "../../../resources/private/relative.php"; getRelativeDetails("cms-special"); ?> -<?php $pageConfig = [ "domName" => "Options avancées", "headerName" => "Options avancées" ]; require_once $_SERVER['DOCUMENT_ROOT'] . "/cms-special/admin-v2/\$resources/precontent.php"; ?> - <ul> - <li> - <a href="<?= $GLOBALS["SYSTEM_ROOT"] ?>/cms-special/admin-v2/advanced/jsonconf" title="<?= $lang["admin-advanced-home"]["placeholders"]['dev'] ?>" class="sblink"><?= $lang["admin-advanced-home"]["dev"] ?></a> - </li> - </ul> -<?php require_once $_SERVER['DOCUMENT_ROOT'] . "/cms-special/admin-v2/\$resources/postcontent.php"; ?>
\ No newline at end of file diff --git a/Neutron-trunk/cms-special/admin-v2/advanced/jsonconf/index.php b/Neutron-trunk/cms-special/admin-v2/advanced/jsonconf/index.php deleted file mode 100644 index 030c9bb..0000000 --- a/Neutron-trunk/cms-special/admin-v2/advanced/jsonconf/index.php +++ /dev/null @@ -1,59 +0,0 @@ -<?php require_once "../../../../resources/private/relative.php"; getRelativeDetails("cms-special"); ?> -<?php $pageConfig = [ "domName" => "Préférences de développement - Options avancées", "headerName" => "Préférences de développement" ]; require_once $_SERVER['DOCUMENT_ROOT'] . "/cms-special/admin-v2/\$resources/precontent.php"; ?> - <p><table class="message_warning"><tbody><tr><td><img src="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/image/message_warning.svg" class="message_img"></td><td style="width:100%;"><p><?= $lang["admin-advanced-dev"]["warning"] ?></p><p><?= $lang["admin-advanced-dev"]["remove"][0] ?> <code>/data/webcontent/customSettings.json</code>. <?= $lang["admin-advanced-dev"]["remove"][1] ?></p></td></tr></tbody></table></p> - <div id="editing"> - <?php require_once $_SERVER['DOCUMENT_ROOT'] . "/resources/private/CodeEditor$3.php" ?> - </div> - <div class="hide" id="loader" style="text-align: center;"><img src="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/image/loader.svg" class="loader"></div> -<?php require_once $_SERVER['DOCUMENT_ROOT'] . "/cms-special/admin-v2/\$resources/postcontent.php"; ?> - -<script> - window.onbeforeunload = function (e) { - e = e || window.event; - - // For IE and Firefox prior to version 4 - if (e) { - e.returnValue = "Quit?"; - } - - // For Safari - return "Quit?"; - }; -</script> - -<script> - -function pushSettings() { - Array.from(document.getElementsByTagName('input')).forEach((el) => {el.disabled = true}) - document.getElementById('loader').classList.remove('hide') - document.getElementById('editing').classList.add('hide') - var formData = new FormData(); - formData.append("content", ace.edit("editor").getValue()); - $.ajax({ - type: "POST", - dataType: 'html', - url: "<?= $GLOBALS["SYSTEM_ROOT"] ?>/api/admin/save_advanced.php", - success: function (data) { - if (data == "ok") { - window.onbeforeunload = undefined; - location.href = "/cms-special/admin-v2/home"; - } else { - alert("<?= $lang["admin-errors"]["errorprefix"] ?>" + data) - Array.from(document.getElementsByTagName('input')).forEach((el) => {el.disabled = false}) - document.getElementById('loader').classList.add('hide') - document.getElementById('editing').classList.remove('hide') - } - }, - error: function (error) { - alert("<?= $lang["admin-errors"]["connerror"] ?>") - document.getElementById('loader').classList.add('hide') - document.getElementById('editing').classList.remove('hide') - }, - data: formData, - cache: false, - contentType: false, - processData: false - }); -} - -</script>
\ No newline at end of file diff --git a/Neutron-trunk/cms-special/admin-v2/appearance/index.php b/Neutron-trunk/cms-special/admin-v2/appearance/index.php deleted file mode 100644 index 4d15264..0000000 --- a/Neutron-trunk/cms-special/admin-v2/appearance/index.php +++ /dev/null @@ -1,145 +0,0 @@ -<?php require_once "../../../resources/private/relative.php"; getRelativeDetails("cms-special"); ?> -<?php $loadEditor = false;$pageConfig = [ "domName" => "Apparence", "headerName" => "Apparence" ]; require_once $_SERVER['DOCUMENT_ROOT'] . "/cms-special/admin-v2/\$resources/precontent.php"; ?> - <span id="appearance-error-box" class="hide"><div id="error"><span id="appearance-error"><?= $lang["admin-appearance"]["error"] ?></span></div></span> - <div id="appearance-settings" style="text-align: center;"> - <?= $lang["admin-appearance"]["site"] ?> <input onchange="validateName()" onkeyup="validateName()" onkeydown="validateName()" type="text" id="name-field" placeholder="Nom du site" value="<?= file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/sitename") ?>"><br> - <p id="04-name-tip" class="tip-red"><?= $lang["admin-appearance"]["name"][0] ?></p> - <input type="file" id="icon-file" class="hide"> - <p><img id="icon-img" src="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/image/config_file_replace.svg" onclick="Icon_UploadFile()" class="icon_button"><br><small><?= $lang["admin-appearance"]["icon"] ?></small></p> - <input type="file" id="banner-file" class="hide"> - <p><img id="icon-img" src="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/image/config_file_replace.svg" onclick="Banner_UploadFile()" class="icon_button"><br><small><?= $lang["admin-appearance"]["banner"] ?></small></p> - <div style="display:none;"><p> - <input type="checkbox" id="oldrenderer" <?php if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/oldRenderer")) {echo("checked");$oldr=true;} else {$oldr=false;} ?> onchange="toggleRender();"><label for="oldrenderer"><?= $lang["admin-appearance"]["old"] ?></label> - </p> - <p id="<?= $oldr ? "" : "onlyold" ?>" class="oldopts"><small id="oo-disclaimer" <?= $oldr ? "style=\"display:none;\"" : "" ?>><?= $lang["admin-appearance"]["oldopts"] ?></small><br><?= $lang["admin-appearance"]["pages"][0] ?> - <?php if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/pagesInMenuBar")) { $pimb = file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/pagesInMenuBar") + 1 - 1; } else { $pimb = 4; } ?> - <select id="showpages" <?= !$oldr ? "disabled" : "" ?>> - <option value="1"<?= $pimb == 1 ? " selected" : "" ?>>1</option> - <option value="2"<?= $pimb == 2 ? " selected" : "" ?>>2</option> - <option value="3"<?= $pimb == 3 ? " selected" : "" ?>>3</option> - <option value="4"<?= $pimb == 4 ? " selected" : "" ?>>4</option> - <option value="5"<?= $pimb == 5 ? " selected" : "" ?>>5</option> - <option value="6"<?= $pimb == 6 ? " selected" : "" ?>>6</option> - <option value="7"<?= $pimb == 7 ? " selected" : "" ?>>7</option> - <option value="8"<?= $pimb == 8 ? " selected" : "" ?>>8</option> - <option value="9"<?= $pimb == 9 ? " selected" : "" ?>>9</option> - <option value="10"<?= $pimb == 10 ? " selected" : "" ?>>10</option> - </select> - <?= $lang["admin-appearance"]["pages"][1] ?><br> - <input type="checkbox" id="alwaysmenu" <?= !$oldr ? "disabled" : "" ?> <?php if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/alwaysmenu")) {echo("checked");} ?>><label for="alwaysmenu"><?= $lang["admin-appearance"]["alwaysmenu"] ?></label></p></div> - <br> - <a onclick="submitData()" class="button"><?= $lang["admin-appearance"]["save"] ?></a> - </div> - <div style="text-align: center;"><div id="appearance-loader" class="hide"><img src="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/image/loader.svg" class="loader"></div></div> -<?php require_once $_SERVER['DOCUMENT_ROOT'] . "/cms-special/admin-v2/\$resources/postcontent.php"; ?> - -<script> - -function validateName() { - document.getElementById('04-name-tip').classList.remove('tip-orange') - document.getElementById('04-name-tip').classList.remove('tip-green') - document.getElementById('04-name-tip').classList.remove('tip-red') - document.getElementById('04-name-tip').innerHTML = "..."; - setTimeout(() => { - name = document.getElementById('name-field').value - if (name.trim() == "") { - document.getElementById('04-name-tip').classList.add('tip-red') - document.getElementById('04-name-tip').innerHTML = "<?= $lang["admin-appearance"]["name"][0] ?>"; - return; - } - if (name.includes("<") || name.includes(">") || name.includes("#") || name.includes("@") || name.includes("}") || name.includes("{") || name.includes("|")) { - document.getElementById('04-name-tip').classList.add('tip-red') - document.getElementById('04-name-tip').innerHTML = "<?= $lang["admin-appearance"]["name"][1] ?>"; - return; - } - if (name.length > 75) { - document.getElementById('04-name-tip').classList.add('tip-red') - document.getElementById('04-name-tip').innerHTML = "<?= $lang["admin-appearance"]["name"][2] ?>"; - return; - } - if (name.length < 4) { - document.getElementById('04-name-tip').classList.add('tip-orange') - document.getElementById('04-name-tip').innerHTML = "<?= $lang["admin-appearance"]["name"][3] ?>"; - return; - } - if (name.length > 30) { - document.getElementById('04-name-tip').classList.add('tip-orange') - document.getElementById('04-name-tip').innerHTML = "<?= $lang["admin-appearance"]["name"][4] ?>"; - return; - } - document.getElementById('04-name-tip').classList.add('tip-green') - document.getElementById('04-name-tip').innerHTML = "<?= $lang["admin-appearance"]["name"][5] ?>"; - return; - }, 100) -} - -function Icon_UploadFile() { - $("#icon-file").trigger('click'); -} - -function Banner_UploadFile() { - $("#banner-file").trigger('click'); -} - -function toggleRender() { - if (!document.getElementById('oldrenderer').checked) { - document.getElementsByClassName('oldopts')[0].id = "onlyold"; - $('#oo-disclaimer').show(200); - document.getElementById('showpages').disabled = true; - document.getElementById('alwaysmenu').disabled = true; - } else { - document.getElementsByClassName('oldopts')[0].id = ""; - $('#oo-disclaimer').hide(200); - document.getElementById('showpages').disabled = false; - document.getElementById('alwaysmenu').disabled = false; - } -} - -function submitData() { - document.getElementById('appearance-loader').classList.remove('hide') - document.getElementById('appearance-settings').classList.add('hide') - var formData = new FormData(); - if (document.getElementById('icon-file').value.trim() != "") { - formData.append("icon", document.getElementById('icon-file').files[0], document.getElementById('icon-file').files[0].name); - } - if (document.getElementById('banner-file').value.trim() != "") { - formData.append("banner", document.getElementById('banner-file').files[0], document.getElementById('banner-file').files[0].name); - } - formData.append("sitename", document.getElementById('name-field').value); - formData.append("alwaysmenu", document.getElementById('alwaysmenu').checked.toString()); - formData.append("oldrenderer", document.getElementById('oldrenderer').checked.toString()); - formData.append("showpages", document.getElementById('showpages').value); - document.getElementById('appearance-error-box').classList.add("hide") - $.ajax({ - type: "POST", - dataType: 'html', - url: "<?= $GLOBALS["SYSTEM_ROOT"] ?>/api/admin/appearance.php", - success: function (data) { - if (data == "ok") { - reloadPage() - } else { - document.getElementById('appearance-error').innerHTML = data - document.getElementById('appearance-error-box').classList.remove("hide") - document.getElementById('appearance-loader').classList.add('hide') - document.getElementById('appearance-settings').classList.remove('hide') - } - }, - error: function (error) { - document.getElementById('appearance-error').innerHTML = "<?= $lang["admin-errors"]["connerror"] ?>" - document.getElementById('appearance-error-box').classList.remove("hide") - document.getElementById('appearance-loader').classList.add('hide') - document.getElementById('appearance-settings').classList.remove('hide') - }, - data: formData, - cache: false, - contentType: false, - processData: false - }); -} - -validateName() - -document.getElementById('banner-file').value = "" -document.getElementById('icon-file').value = "" - -</script>
\ No newline at end of file diff --git a/Neutron-trunk/cms-special/admin-v2/calendar/add/index.php b/Neutron-trunk/cms-special/admin-v2/calendar/add/index.php deleted file mode 100644 index 8d1169f..0000000 --- a/Neutron-trunk/cms-special/admin-v2/calendar/add/index.php +++ /dev/null @@ -1,140 +0,0 @@ -<?php require_once "../../../../resources/private/relative.php"; getRelativeDetails("cms-special"); ?> -<?php $pageConfig = [ "domName" => "Ajouter un événement - Calendrier", "headerName" => "Ajouter un événement" ]; require_once $_SERVER['DOCUMENT_ROOT'] . "/cms-special/admin-v2/\$resources/precontent.php"; ?> - <div id="datainput"> - <h3><?= $lang["admin-calendar"]["create"]["date"] ?></h3> - <ul> - <li><?= $lang["admin-calendar"]["create"]["day"] ?> </li> - <select id="day"> - <option value="01" <?php if ("01" == date('d')) {echo("selected");} ?>>1er</option> - <option value="02" <?php if ("02" == date('d')) {echo("selected");} ?>>2</option> - <option value="03" <?php if ("03" == date('d')) {echo("selected");} ?>>3</option> - <option value="04" <?php if ("04" == date('d')) {echo("selected");} ?>>4</option> - <option value="05" <?php if ("05" == date('d')) {echo("selected");} ?>>5</option> - <option value="06" <?php if ("06" == date('d')) {echo("selected");} ?>>6</option> - <option value="07" <?php if ("07" == date('d')) {echo("selected");} ?>>7</option> - <option value="08" <?php if ("08" == date('d')) {echo("selected");} ?>>8</option> - <option value="09" <?php if ("09" == date('d')) {echo("selected");} ?>>9</option> - <option value="10" <?php if ("10" == date('d')) {echo("selected");} ?>>10</option> - <option value="11" <?php if ("11" == date('d')) {echo("selected");} ?>>11</option> - <option value="12" <?php if ("12" == date('d')) {echo("selected");} ?>>12</option> - <option value="13" <?php if ("13" == date('d')) {echo("selected");} ?>>13</option> - <option value="14" <?php if ("14" == date('d')) {echo("selected");} ?>>14</option> - <option value="15" <?php if ("15" == date('d')) {echo("selected");} ?>>15</option> - <option value="16" <?php if ("16" == date('d')) {echo("selected");} ?>>16</option> - <option value="17" <?php if ("17" == date('d')) {echo("selected");} ?>>17</option> - <option value="18" <?php if ("18" == date('d')) {echo("selected");} ?>>18</option> - <option value="19" <?php if ("19" == date('d')) {echo("selected");} ?>>19</option> - <option value="20" <?php if ("20" == date('d')) {echo("selected");} ?>>20</option> - <option value="21" <?php if ("21" == date('d')) {echo("selected");} ?>>21</option> - <option value="22" <?php if ("22" == date('d')) {echo("selected");} ?>>22</option> - <option value="23" <?php if ("23" == date('d')) {echo("selected");} ?>>23</option> - <option value="24" <?php if ("24" == date('d')) {echo("selected");} ?>>24</option> - <option value="25" <?php if ("25" == date('d')) {echo("selected");} ?>>25</option> - <option value="26" <?php if ("26" == date('d')) {echo("selected");} ?>>26</option> - <option value="27" <?php if ("27" == date('d')) {echo("selected");} ?>>27</option> - <option value="28" <?php if ("28" == date('d')) {echo("selected");} ?>>28</option> - <option value="29" <?php if ("29" == date('d')) {echo("selected");} ?>>29</option> - <option value="30" <?php if ("30" == date('d')) {echo("selected");} ?>>30</option> - <option value="31" <?php if ("31" == date('d')) {echo("selected");} ?>>31</option> - </select><br><br> - <li><?= $lang["admin-calendar"]["create"]["month"] ?> </li> - <select id="month"> - <option disabled><?= $lang["admin-calendar"]["create"]["trimesters"][0] ?></option> - <option value="1" <?php if ("01" == date('m')) {echo("selected");} ?>><?= $lang["admin-calendar"]["create"]["months"][0] ?></option> - <option value="2" <?php if ("02" == date('m')) {echo("selected");} ?>><?= $lang["admin-calendar"]["create"]["months"][1] ?></option> - <option value="3" <?php if ("03" == date('m')) {echo("selected");} ?>><?= $lang["admin-calendar"]["create"]["months"][2] ?></option> - <option disabled><?= $lang["admin-calendar"]["create"]["trimesters"][1] ?></option> - <option value="4" <?php if ("04" == date('m')) {echo("selected");} ?>><?= $lang["admin-calendar"]["create"]["months"][3] ?></option> - <option value="5" <?php if ("05" == date('m')) {echo("selected");} ?>><?= $lang["admin-calendar"]["create"]["months"][4] ?></option> - <option value="6" <?php if ("06" == date('m')) {echo("selected");} ?>><?= $lang["admin-calendar"]["create"]["months"][5] ?></option> - <option disabled><?= $lang["admin-calendar"]["create"]["trimesters"][2] ?></option> - <option value="7" <?php if ("07" == date('m')) {echo("selected");} ?>><?= $lang["admin-calendar"]["create"]["months"][6] ?></option> - <option value="8" <?php if ("08" == date('m')) {echo("selected");} ?>><?= $lang["admin-calendar"]["create"]["months"][7] ?></option> - <option value="9" <?php if ("09" == date('m')) {echo("selected");} ?>><?= $lang["admin-calendar"]["create"]["months"][8] ?></option> - <option disabled><?= $lang["admin-calendar"]["create"]["trimesters"][3] ?></option> - <option value="10" <?php if ("10" == date('m')) {echo("selected");} ?>><?= $lang["admin-calendar"]["create"]["months"][9] ?></option> - <option value="11" <?php if ("11" == date('m')) {echo("selected");} ?>><?= $lang["admin-calendar"]["create"]["months"][10] ?></option> - <option value="12" <?php if ("12" == date('m')) {echo("selected");} ?>><?= $lang["admin-calendar"]["create"]["months"][11] ?></option> - </select><br><br> - <li><?= $lang["admin-calendar"]["create"]["year"] ?></li> - <select id="year"> - <option value="<?= date('Y') ?>" selected><?= date('Y') ?></option> - <option value="<?= date('Y') + 1 ?>"><?= date('Y') + 1 ?></option> - <option value="<?= date('Y') + 2 ?>"><?= date('Y') + 2 ?></option> - <option value="<?= date('Y') + 3 ?>"><?= date('Y') + 3 ?></option> - <option value="<?= date('Y') + 4 ?>"><?= date('Y') + 4 ?></option> - <option value="<?= date('Y') + 5 ?>"><?= date('Y') + 5 ?></option> - </select> - </ul> - <h3><?= $lang["admin-calendar"]["create"]["info"] ?></h3> - <ul> - <li><?= $lang["admin-calendar"]["create"]["name"] ?></li> - <input type="text" placeholder="<?= $lang["admin-calendar"]["create"]["nameph"] ?>" id="name"><br><br> - <li><?= $lang["admin-calendar"]["create"]["desc"] ?> <i>(<?= $lang["admin-calendar"]["create"]["mandatory"] ?>)</i></li> - <input type="text" placeholder="<?= $lang["admin-calendar"]["create"]["web"] ?>" id="desc"><br><br> - <li><?= $lang["admin-calendar"]["create"]["web"] ?> <i>(<?= $lang["admin-calendar"]["create"]["mandatory"] ?>)</i> :</li> - <input onchange="validateUrl()" onkeyup="validateUrl()" onkeydown="validateUrl()" type="text" placeholder="<?= $lang["admin-calendar"]["create"]["webph"] ?>" id="link"><img id="link_check" src="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/image/storeloader.svg" style="vertical-align:middle;" class="hide" width="24px" height="24px"><a class="hide" id="link_invalid"><img src="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/image/close.svg" style="vertical-align:middle;" class="invert" width="24px" height="24px"></a> - </ul> - <p><table class="message_info"><tbody><tr><td><img src="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/image/message_info.svg" class="message_img"></td><td style="width:100%;"><p><?= $lang["admin-calendar"]["create"]["notice"] ?></p></td></tr></tbody></table></p> - <div style="text-align: center;"><p><a class="button" onclick="createCmsEvent()"><?= $lang["admin-calendar"]["create"]["complete"] ?></a></p></div><br> - </div> -<?php require_once $_SERVER['DOCUMENT_ROOT'] . "/cms-special/admin-v2/\$resources/postcontent.php"; ?> - -<script> - -function UrlRegex(str) { - var pattern = new RegExp('^(https?:\\/\\/)?'+ // protocol - '((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}|'+ // domain name - '((\\d{1,3}\\.){3}\\d{1,3}))'+ // OR ip (v4) address - '(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*'+ // port and path - '(\\?[;&a-z\\d%_.~+=-]*)?'+ // query string - '(\\#[-a-z\\d_]*)?$','i'); // fragment locator - return !!pattern.test(str); -} - -function validateUrl() { - document.getElementById('link_invalid').classList.add('hide'); - document.getElementById('link_check').classList.remove('hide'); - setTimeout(() => { - if (!UrlRegex(document.getElementById('link').value)) { - document.getElementById('link_invalid').classList.remove('hide'); - } else { - document.getElementById('link_invalid').classList.add('hide'); - } - document.getElementById('link_check').classList.add('hide'); - }, 2000) -} - -function createCmsEvent() { - document.getElementById('datainput').classList.add('hide') - var formData = new FormData(); - formData.append("day", document.getElementById('day').value); - formData.append("month", document.getElementById('month').value); - formData.append("year", document.getElementById('year').value); - formData.append("name", document.getElementById('name').value); - formData.append("desc", document.getElementById('desc').value); - formData.append("link", document.getElementById('link').value); - $.ajax({ - type: "POST", - dataType: 'html', - url: "<?= $GLOBALS["SYSTEM_ROOT"] ?>/api/admin/calendar_create.php", - success: function (data) { - if (data == "ok") { - location.href = "<?= $GLOBALS["SYSTEM_ROOT"] ?>/cms-special/admin-v2/calendar"; - } else { - alert("<?= $lang["admin-errors"]["errorprefix"] ?>" + data) - document.getElementById('datainput').classList.remove('hide') - } - }, - error: function (error) { - alert("<?= $lang["admin-errors"]["connerror"] ?>") - document.getElementById('datainput').classList.remove('hide') - }, - data: formData, - cache: false, - contentType: false, - processData: false - }); -} - -</script>
\ No newline at end of file diff --git a/Neutron-trunk/cms-special/admin-v2/calendar/index.php b/Neutron-trunk/cms-special/admin-v2/calendar/index.php deleted file mode 100644 index 59851b9..0000000 --- a/Neutron-trunk/cms-special/admin-v2/calendar/index.php +++ /dev/null @@ -1,86 +0,0 @@ -<?php require_once "../../../resources/private/relative.php"; getRelativeDetails("cms-special"); ?> -<?php $pageConfig = [ "domName" => "Calendrier", "headerName" => "Gestion des événements" ]; include_once $_SERVER['DOCUMENT_ROOT'] . "/cms-special/admin-v2/\$resources/precontent.php"; ?> - <?php - - if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/calendar_events")) { - $calevn = file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/calendar_events"); - } else { - $calevn = "3"; - } - - ?> - <?= $lang["admin-calendar"]["show"][0] ?> <select onchange="updateNextEvents()" id="nextevents"> - <option value="1" <?php if ($calevn == "1") { echo("selected"); } ?>>1</option> - <option value="2" <?php if ($calevn == "2") { echo("selected"); } ?>>2</option> - <option value="3" <?php if ($calevn == "3") { echo("selected"); } ?>>3</option> - <option value="4" <?php if ($calevn == "4") { echo("selected"); } ?>>4</option> - <option value="5" <?php if ($calevn == "5") { echo("selected"); } ?>>5</option> - <option value="6" <?php if ($calevn == "6") { echo("selected"); } ?>>6</option> - <option value="7" <?php if ($calevn == "7") { echo("selected"); } ?>>7</option> - <option value="8" <?php if ($calevn == "8") { echo("selected"); } ?>>8</option> - <option value="9" <?php if ($calevn == "9") { echo("selected"); } ?>>9</option> - <option value="10" <?php if ($calevn == "10") { echo("selected"); } ?>>10</option> - </select> <?= $lang["admin-calendar"]["show"][1] ?> - <h3><?= $lang["admin-calendar"]["events"] ?></h3> - <ul> - <?php - - if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/caldb.json")) { - $dbraw = file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/caldb.json"); - $corrupted = false; - if (isJson($dbraw)) { - $events = json_decode($dbraw); - foreach ($events->events as $event) { - if (isset($event->timestamp)) { - echo("<li><span style=\"cursor:help;\" title=\"" . $event->description . "\">" . $event->name . "</span> (" . $event->datestr . ")" . " - <a class=\"sblink\" href=\"{$GLOBALS["SYSTEM_ROOT"]}/cms-special/admin-v2/calendar/manage/?id=" . $event->timestamp . "\" title=\"{$lang['admin-calendar']['manageph']}\">" . $lang["admin-calendar"]["manage"] . "</a></li>"); - } - } - } else { - echo("<div style=\"color:red; text-align: center;\"><b><u>{$lang['admin-calendar']['corrupt'][0]}</u> {$lang['admin-calendar']['corrupt'][1]} <u>{$lang['admin-calendar']['corrupt'][2]}</u></b></div>"); - $corrupted = true; - } - } else { - echo("<div style=\"text-align: center;\">{$lang['admin-calendar']['nothing']}</div>"); - } - - ?> - <?php - - if (!$corrupted) { - echo('<br><li><i><a href="' . $GLOBALS["SYSTEM_ROOT"] . '/cms-special/admin-v2/calendar/add" title="' . $lang["admin-calendar"]["addph"] . '" class="sblink">' . $lang["admin-calendar"]["add"] . '</a></i></li>'); - } - - ?> - </ul> -<?php include_once $_SERVER['DOCUMENT_ROOT'] . "/cms-special/admin-v2/\$resources/postcontent.php"; ?> -<script> - -function updateNextEvents() { - value = document.getElementById('nextevents').value; - var formData = new FormData(); - formData.append("value", value); - document.getElementById('nextevents').disabled = true; - $.ajax({ - type: "POST", - dataType: 'html', - url: "<?= $GLOBALS["SYSTEM_ROOT"] ?>/api/admin/calendar_nextevents.php", - success: function (data) { - if (data == "ok") { - document.getElementById('nextevents').disabled = false; - } else { - alert("<?= $lang["admin-errors"]["errorprefix"] ?>" + data) - document.getElementById('nextevents').disabled = false; - } - }, - error: function (error) { - alert("<?= $lang["admin-errors"]["connerror"] ?>") - document.getElementById('nextevents').disabled = false; - }, - data: formData, - cache: false, - contentType: false, - processData: false - }); -} - -</script>
\ No newline at end of file diff --git a/Neutron-trunk/cms-special/admin-v2/calendar/manage/index.php b/Neutron-trunk/cms-special/admin-v2/calendar/manage/index.php deleted file mode 100644 index db5d226..0000000 --- a/Neutron-trunk/cms-special/admin-v2/calendar/manage/index.php +++ /dev/null @@ -1,78 +0,0 @@ -<?php require_once "../../../../resources/private/relative.php"; getRelativeDetails("cms-special"); ?> -<?php $pageConfig = [ "domName" => "Supprimer un événement - Calendrier", "headerName" => "Supprimer un événement" ]; include_once $_SERVER['DOCUMENT_ROOT'] . "/cms-special/admin-v2/\$resources/precontent.php"; ?> -<?php -$eventsraw = file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/caldb.json"); -if (isset($_GET['id'])) {} else { - require $_SERVER['DOCUMENT_ROOT'] . "/api/electrode/quit.php";quit("<script>location.href = '" . $GLOBALS['SYSTEM_ROOT'] . "/cms-special/admin-v2/calendar';</script>"); -} -if (isJson($eventsraw)) { - $events = json_decode($eventsraw); - foreach ($events->events as $element) { - if (isset($element->timestamp)) { - if ($element->timestamp == $_GET['id']) { - $event = $element; - } - } - } -} else { - require $_SERVER['DOCUMENT_ROOT'] . "/api/electrode/quit.php";quit("<script>location.href = '" . $GLOBALS['SYSTEM_ROOT'] . "/cms-special/admin-v2/calendar';</script>"); -} -if (!isset($event)) { - require $_SERVER['DOCUMENT_ROOT'] . "/api/electrode/quit.php";quit("<script>location.href = '" . $GLOBALS['SYSTEM_ROOT'] . "/cms-special/admin-v2/calendar';</script>"); -} -?> - <h3><?= $lang["admin-calendar"]["info"] ?></h3> - <ul> - <li><b><?= $event->name ?></b></li> - <?php - - if (trim($event->description) != "") { - echo("<li><i>" . $event->description . "</i></li>"); - } - - if (isset($event->link)) { - if (trim($event->link) != "") { - echo("<li><i>" . $event->link . "</i></li>"); - } - } - - ?> - <li><?= $event->datestr ?> (<code><?= $event->timestamp ?></code>)</li> - </ul> - <h3><?= $lang["admin-calendar"]["deleteask"] ?></h3> - <ul id="delete"> - <li><a class="sblink" href="<?= $GLOBALS["SYSTEM_ROOT"] ?>/cms-special/admin-v2/calendar" title="<?= $lang["admin-calendar"]["deletenoph"] ?>"><?= $lang["admin-calendar"]["deleteno"] ?></a></li> - <li><a class="sblink" onclick="deleteEvent()" title="<?= $lang["admin-calendar"]["deleteyesph"] ?>"><?= $lang["admin-calendar"]["deleteyes"] ?></a></li> - </ul> -<?php include_once $_SERVER['DOCUMENT_ROOT'] . "/cms-special/admin-v2/\$resources/postcontent.php"; ?> - -<script> - -function deleteEvent() { - document.getElementById('delete').classList.add('hide') - var formData = new FormData(); - formData.append("id", <?= $event->timestamp ?>); - $.ajax({ - type: "POST", - dataType: 'html', - url: "<?= $GLOBALS["SYSTEM_ROOT"] ?>/api/admin/calendar_delete.php", - success: function (data) { - if (data == "ok") { - location.href = "<?= $GLOBALS["SYSTEM_ROOT"] ?>/cms-special/admin-v2/calendar"; - } else { - alert("<?= $lang["admin-errors"]["errorprefix"] ?>" + data) - document.getElementById('delete').classList.remove('hide') - } - }, - error: function (error) { - alert("<?= $lang["admin-errors"]["connerror"] ?>") - document.getElementById('delete').classList.remove('hide') - }, - data: formData, - cache: false, - contentType: false, - processData: false - }); -} - -</script>
\ No newline at end of file diff --git a/Neutron-trunk/cms-special/admin-v2/customization/index.php b/Neutron-trunk/cms-special/admin-v2/customization/index.php deleted file mode 100644 index a50196b..0000000 --- a/Neutron-trunk/cms-special/admin-v2/customization/index.php +++ /dev/null @@ -1,214 +0,0 @@ -<?php require_once "../../../resources/private/relative.php"; getRelativeDetails("cms-special"); ?> -<?php $pageConfig = [ "domName" => "Personnalisation", "headerName" => "Personnalisation" ]; require_once $_SERVER['DOCUMENT_ROOT'] . "/cms-special/admin-v2/\$resources/precontent.php"; ?> -<div class="hidden"> - <h3><?= $lang["admin-customization"]["theme"] ?></h3> - <select id="theme" onchange="updateTheme()"> - <option value="auto" <?php if (trim(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/theme")) == "auto") {echo("selected");} ?>><?= $lang["admin-customization"]["auto"] ?></option> - <option value="light" <?php if (trim(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/theme")) == "light") {echo("selected");} ?>><?= $lang["admin-customization"]["light"] ?></option> - <option value="dark" <?php if (trim(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/theme")) == "dark") {echo("selected");} ?>><?= $lang["admin-customization"]["dark"] ?></option> - </select> - <h3><?= $lang["admin-customization"]["color"] ?></h3> - <select id="colors" onchange="updateColors()"> - <option value="blue" <?php if (trim(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/color")) == "blue") {echo("selected");} ?>><?= $lang["admin-customization"]["colors"][0] ?></option> - <option value="green" <?php if (trim(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/color")) == "green") {echo("selected");} ?>><?= $lang["admin-customization"]["colors"][1] ?></option> - <option value="red" <?php if (trim(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/color")) == "red") {echo("selected");} ?>><?= $lang["admin-customization"]["colors"][2] ?></option> - <option value="orange" <?php if (trim(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/color")) == "orange") {echo("selected");} ?>><?= $lang["admin-customization"]["colors"][3] ?></option> - <option value="purple" <?php if (trim(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/color")) == "purple") {echo("selected");} ?>><?= $lang["admin-customization"]["colors"][4] ?></option> - <option value="brown" <?php if (trim(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/color")) == "brown") {echo("selected");} ?>><?= $lang["admin-customization"]["colors"][5] ?></option> - <option value="white" <?php if (trim(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/color")) == "white") {echo("selected");} ?>><?= $lang["admin-customization"]["colors"][6] ?></option> - </select> -</div> - -<h3><?= $lang["admin-customization"]["theme"] ?></h3> -<div class="mdc-card mdc-card--outlined <?php if (trim(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/theme")) == "auto") {echo("mdc-card--selected");} ?>" onclick="document.getElementById('theme').value = 'auto';updateTheme();" style="width:256px;margin:10px;display:inline-block;"> - <div class="mdc-card__primary-action" tabindex="0" style="padding:0;"> - <div class="mdc-card__media mdc-card__media--16-9" style="background-image: url('<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/image/demos/theme-auto.jpg');"></div> - <div class="mdc-card-wrapper__text-section" style="padding-left:5px;padding-right:5px;"> - <h2 style="margin-bottom:5px;" class="mdc-typography mdc-typography--headline6"><?= $lang["admin-customization"]["auto2"] ?></h2> - <h3 style="margin-top:5px;" class="mdc-typography mdc-typography--subtitle2"><?= $lang["admin-customization"]["descriptions"][0] ?></h3> - </div> - </div> -</div> -<div class="mdc-card mdc-card--outlined <?php if (trim(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/theme")) == "dark") {echo("mdc-card--selected");} ?>" onclick="document.getElementById('theme').value = 'dark';updateTheme();" style="width:256px;margin:10px;display:inline-block;"> - <div class="mdc-card__primary-action" tabindex="0" style="padding:0;"> - <div class="mdc-card__media mdc-card__media--16-9" style="background-image: url('<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/image/demos/theme-dark.jpg');"></div> - <div class="mdc-card-wrapper__text-section" style="padding-left:5px;padding-right:5px;"> - <h2 style="margin-bottom:5px;" class="mdc-typography mdc-typography--headline6"><?= $lang["admin-customization"]["dark"] ?></h2> - <h3 style="margin-top:5px;" class="mdc-typography mdc-typography--subtitle2"><?= $lang["admin-customization"]["descriptions"][1] ?></h3> - </div> - </div> -</div> -<div class="mdc-card mdc-card--outlined <?php if (trim(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/theme")) == "light") {echo("mdc-card--selected");} ?>" onclick="document.getElementById('theme').value = 'light';updateTheme();" style="width:256px;margin:10px;display:inline-block;"> - <div class="mdc-card__primary-action" tabindex="0" style="padding:0;"> - <div class="mdc-card__media mdc-card__media--16-9" style="background-image: url('<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/image/demos/theme-light.jpg');"></div> - <div class="mdc-card-wrapper__text-section" style="padding-left:5px;padding-right:5px;"> - <h2 style="margin-bottom:5px;" class="mdc-typography mdc-typography--headline6"><?= $lang["admin-customization"]["light"] ?></h2> - <h3 style="margin-top:5px;" class="mdc-typography mdc-typography--subtitle2"><?= $lang["admin-customization"]["descriptions"][2] ?></h3> - </div> - </div> -</div> - -<h3><?= $lang["admin-customization"]["color"] ?></h3> -<div class="mdc-card mdc-card--outlined <?php if (trim(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/color")) == "blue") {echo("mdc-card--selected");} ?>" onclick="document.getElementById('colors').value = 'blue';updateColors();" style="width:256px;margin:10px;display:inline-block;"> - <div class="mdc-card__primary-action" tabindex="0" style="padding:0;"> - <div class="mdc-card-wrapper__text-section" style="padding-left:5px;padding-right:5px;"> - <table> - <tbody> - <tr> - <td><div style="background-image: url('<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/image/demos/color-blue.jpg');width: 73px;height: 73px;background-size: cover;margin-left: -10px;margin-top: -10px;margin-bottom: -10px;"></div></td> - <td><h2 style="margin-bottom:5px;margin-top: 5px;margin-left: 10px;" class="mdc-typography mdc-typography--headline6"><?= $lang["admin-customization"]["colors2"][0] ?></h2></td> - </tr> - </tbody> - </table> - </div> - </div> -</div> -<div class="mdc-card mdc-card--outlined <?php if (trim(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/color")) == "green") {echo("mdc-card--selected");} ?>" onclick="document.getElementById('colors').value = 'green';updateColors();" style="width:256px;margin:10px;display:inline-block;"> - <div class="mdc-card__primary-action" tabindex="0" style="padding:0;"> - <div class="mdc-card-wrapper__text-section" style="padding-left:5px;padding-right:5px;"> - <table> - <tbody> - <tr> - <td><div style="background-image: url('<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/image/demos/color-green.jpg');width: 73px;height: 73px;background-size: cover;margin-left: -10px;margin-top: -10px;margin-bottom: -10px;"></div></td> - <td><h2 style="margin-bottom:5px;margin-top: 5px;margin-left: 10px;" class="mdc-typography mdc-typography--headline6"><?= $lang["admin-customization"]["colors2"][1] ?></h2></td> - </tr> - </tbody> - </table> - </div> - </div> -</div> -<div class="mdc-card mdc-card--outlined <?php if (trim(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/color")) == "red") {echo("mdc-card--selected");} ?>" onclick="document.getElementById('colors').value = 'red';updateColors();" style="width:256px;margin:10px;display:inline-block;"> - <div class="mdc-card__primary-action" tabindex="0" style="padding:0;"> - <div class="mdc-card-wrapper__text-section" style="padding-left:5px;padding-right:5px;"> - <table> - <tbody> - <tr> - <td><div style="background-image: url('<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/image/demos/color-red.jpg');width: 73px;height: 73px;background-size: cover;margin-left: -10px;margin-top: -10px;margin-bottom: -10px;"></div></td> - <td><h2 style="margin-bottom:5px;margin-top: 5px;margin-left: 10px;" class="mdc-typography mdc-typography--headline6"><?= $lang["admin-customization"]["colors2"][2] ?></h2></td> - </tr> - </tbody> - </table> - </div> - </div> -</div> -<div class="mdc-card mdc-card--outlined <?php if (trim(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/color")) == "orange") {echo("mdc-card--selected");} ?>" onclick="document.getElementById('colors').value = 'orange';updateColors();" style="width:256px;margin:10px;display:inline-block;"> - <div class="mdc-card__primary-action" tabindex="0" style="padding:0;"> - <div class="mdc-card-wrapper__text-section" style="padding-left:5px;padding-right:5px;"> - <table> - <tbody> - <tr> - <td><div style="background-image: url('<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/image/demos/color-orange.jpg');width: 73px;height: 73px;background-size: cover;margin-left: -10px;margin-top: -10px;margin-bottom: -10px;"></div></td> - <td><h2 style="margin-bottom:5px;margin-top: 5px;margin-left: 10px;" class="mdc-typography mdc-typography--headline6"><?= $lang["admin-customization"]["colors2"][3] ?></h2></td> - </tr> - </tbody> - </table> - </div> - </div> -</div> -<div class="mdc-card mdc-card--outlined <?php if (trim(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/color")) == "purple") {echo("mdc-card--selected");} ?>" onclick="document.getElementById('colors').value = 'purple';updateColors();" style="width:256px;margin:10px;display:inline-block;"> - <div class="mdc-card__primary-action" tabindex="0" style="padding:0;"> - <div class="mdc-card-wrapper__text-section" style="padding-left:5px;padding-right:5px;"> - <table> - <tbody> - <tr> - <td><div style="background-image: url('<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/image/demos/color-purple.jpg');width: 73px;height: 73px;background-size: cover;margin-left: -10px;margin-top: -10px;margin-bottom: -10px;"></div></td> - <td><h2 style="margin-bottom:5px;margin-top: 5px;margin-left: 10px;" class="mdc-typography mdc-typography--headline6"><?= $lang["admin-customization"]["colors2"][4] ?></h2></td> - </tr> - </tbody> - </table> - </div> - </div> -</div> -<div class="mdc-card mdc-card--outlined <?php if (trim(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/color")) == "brown") {echo("mdc-card--selected");} ?>" onclick="document.getElementById('colors').value = 'brown';updateColors();" style="width:256px;margin:10px;display:inline-block;"> - <div class="mdc-card__primary-action" tabindex="0" style="padding:0;"> - <div class="mdc-card-wrapper__text-section" style="padding-left:5px;padding-right:5px;"> - <table> - <tbody> - <tr> - <td><div style="background-image: url('<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/image/demos/color-brown.jpg');width: 73px;height: 73px;background-size: cover;margin-left: -10px;margin-top: -10px;margin-bottom: -10px;"></div></td> - <td><h2 style="margin-bottom:5px;margin-top: 5px;margin-left: 10px;" class="mdc-typography mdc-typography--headline6"><?= $lang["admin-customization"]["colors2"][5] ?></h2></td> - </tr> - </tbody> - </table> - </div> - </div> -</div> -<div class="mdc-card mdc-card--outlined <?php if (trim(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/color")) == "white") {echo("mdc-card--selected");} ?>" onclick="document.getElementById('colors').value = 'white';updateColors();" style="width:256px;margin:10px;display:inline-block;"> - <div class="mdc-card__primary-action" tabindex="0" style="padding:0;"> - <div class="mdc-card-wrapper__text-section" style="padding-left:5px;padding-right:5px;"> - <table> - <tbody> - <tr> - <td><div style="background-image: url('<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/image/demos/color-white.jpg');width: 73px;height: 73px;background-size: cover;margin-left: -10px;margin-top: -10px;margin-bottom: -10px;"></div></td> - <td><h2 style="margin-bottom:5px;margin-top: 5px;margin-left: 10px;" class="mdc-typography mdc-typography--headline6"><?= $lang["admin-customization"]["colors2"][6] ?></h2></td> - </tr> - </tbody> - </table> - </div> - </div> -</div> - -<?php require_once $_SERVER['DOCUMENT_ROOT'] . "/cms-special/admin-v2/\$resources/postcontent.php"; ?> -<script> - -function updateColors() { - $('body').fadeOut(200); - document.getElementById('colors').disabled = true; - var formData = new FormData(); - formData.append("color", document.getElementById('colors').value); - $.ajax({ - type: "POST", - dataType: 'html', - url: "<?= $GLOBALS["SYSTEM_ROOT"] ?>/api/admin/customization_colors.php", - success: function (data) { - if (data == "ok") { - console.log("Saved") - setTimeout(() => { - document.getElementById('colors').disabled = false; - ajaxPageReload(); - }, 500) - } else { - alert("<?= $lang["admin-errors"]["errorprefix"] ?>" + data); - } - }, - error: function (error) { - alert("<?= $lang["admin-errors"]["connerror"] ?>"); - }, - data: formData, - cache: false, - contentType: false, - processData: false - }); -} - -function updateTheme() { - $('body').fadeOut(200); - document.getElementById('theme').disabled = true; - var formData = new FormData(); - formData.append("theme", document.getElementById('theme').value); - $.ajax({ - type: "POST", - dataType: 'html', - url: "<?= $GLOBALS["SYSTEM_ROOT"] ?>/api/admin/customization_theme.php", - success: function (data) { - if (data == "ok") { - console.log("Saved") - setTimeout(() => { - document.getElementById('theme').disabled = false; - ajaxPageReload(); - }, 500) - } else { - alert("<?= $lang["admin-errors"]["errorprefix"] ?>" + data); - } - }, - error: function (error) { - alert("<?= $lang["admin-errors"]["connerror"] ?>"); - }, - data: formData, - cache: false, - contentType: false, - processData: false - }); -} - -</script>
\ No newline at end of file diff --git a/Neutron-trunk/cms-special/admin-v2/error/index.php b/Neutron-trunk/cms-special/admin-v2/error/index.php deleted file mode 100644 index 54f3910..0000000 --- a/Neutron-trunk/cms-special/admin-v2/error/index.php +++ /dev/null @@ -1,11 +0,0 @@ -<?php require_once "../../../resources/private/relative.php"; getRelativeDetails("cms-special"); ?> -<?php $pageConfig = [ "domName" => "Erreur", "headerName" => "Erreur" ]; require_once $_SERVER['DOCUMENT_ROOT'] . "/cms-special/admin-v2/\$resources/precontent.php"; ?> - <h1><div style="text-align: center;"><?= $lang["admin-errors"]["common"]['title'] ?></div></h1> - <p><div style="text-align: center;"><?= $lang["admin-errors"]["common"]['message'] ?></div></p> - <p><div style="text-align: center;"> - <ul> - <li><a href="<?= file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/api/bugs") ?>" target="_blank"><?= $lang["admin-errors"]["common"]['report'] ?></a></li> - <li><a href="<?= $GLOBALS["SYSTEM_ROOT"] ?>/cms-special/admin-v2/home"><?= $lang["admin-errors"]["common"]['home'] ?></a></li> - </ul> - </div></p> -<?php require_once $_SERVER['DOCUMENT_ROOT'] . "/cms-special/admin-v2/\$resources/postcontent.php"; ?> diff --git a/Neutron-trunk/cms-special/admin-v2/flags/index.php b/Neutron-trunk/cms-special/admin-v2/flags/index.php deleted file mode 100644 index 102861b..0000000 --- a/Neutron-trunk/cms-special/admin-v2/flags/index.php +++ /dev/null @@ -1,75 +0,0 @@ -<?php require_once "../../../resources/private/relative.php"; getRelativeDetails("cms-special"); ?> -<?php - -/** @var boolean $__electrode */ -if (isset($__electrode) && $__electrode) { - header("Location: {$GLOBALS["SYSTEM_ROOT"]}/cms-special/admin-v2/home"); - require $_SERVER['DOCUMENT_ROOT'] . "/api/electrode/quit.php";quit(); -} - -function fflag($name, $title, $description) { - echo('<div class="widget"><div id="header-' . $name . '" class="widget-header '); - if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/flag_{$name}")) { echo("enabled"); } else { echo("disabled"); } - echo("\"><table><tbody><tr><td><label class=\"switch\"><input name=\"{$name}\" type=\"checkbox\" onclick=\"updateWidgetStatus('{$name}')\" onchange=\"updateWidgetStatus('{$name}')\""); - if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/flag_{$name}")) { echo(" checked"); } - echo("><span class=\"slider round\"></span></label></td><td class=\"widget-header-info\"><b>{$title}</b></td></tr></tbody></table></div><p>{$description}</p></div>"); -} - -$pageConfig = [ "domName" => "Drapeaux", "headerName" => "Drapeaux" ]; require_once $_SERVER['DOCUMENT_ROOT'] . "/cms-special/admin-v2/\$resources/precontent.php"; ?> - <p><table class="message_info"><tbody><tr><td><img src="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/image/message_info.svg" class="message_img"></td><td style="width:100%;"><p><?= $lang["admin-flags"]["notice"] ?></p></td></tr></tbody></table></p> - -<?php fflag("boundaries", "Show Layout Boundaries", "Shows a thin colored border around different DOM elements.") ?> -<?php fflag("trace", "Trace Rendering Process", "Shows technical info on the bottom of each page. May contain personal/confidential information!") ?> - -<?php require_once $_SERVER['DOCUMENT_ROOT'] . "/cms-special/admin-v2/\$resources/postcontent.php"; ?> - -<script> - -function updateWidgetStatus(widget) { - checkbox = document.getElementsByName(widget)[0] - if (typeof checkbox == "undefined") {} else { - if (checkbox.checked) { - enabled = true; - document.getElementById('header-' + widget).classList.remove('disabled'); - document.getElementById('header-' + widget).classList.add('enabled'); - } else { - enabled = false; - document.getElementById('header-' + widget).classList.remove('enabled'); - document.getElementById('header-' + widget).classList.add('disabled'); - } - Array.from(document.getElementsByTagName('input')).forEach((el) => {el.disabled = true}) - - var formData = new FormData(); - formData.append("element", widget); - if (enabled) { - url = "<?= $GLOBALS["SYSTEM_ROOT"] ?>/api/admin/flag_enable.php"; - } else { - url = "<?= $GLOBALS["SYSTEM_ROOT"] ?>/api/admin/flag_disable.php"; - } - $.ajax({ - type: "POST", - dataType: 'html', - url: url, - success: function (data) { - if (data == "ok") { - setTimeout(() => { - location.reload(); - }, 500) - } else { - alert("<?= $lang["admin-errors"]["errorprefix"] ?>" + data); - } - }, - error: function (error) { - alert("<?= $lang["admin-errors"]["connerror"] ?>"); - window.onbeforeunload = undefined; - }, - data: formData, - cache: false, - contentType: false, - processData: false - }); - - } -} - -</script>
\ No newline at end of file diff --git a/Neutron-trunk/cms-special/admin-v2/footer/index.php b/Neutron-trunk/cms-special/admin-v2/footer/index.php deleted file mode 100644 index bc37967..0000000 --- a/Neutron-trunk/cms-special/admin-v2/footer/index.php +++ /dev/null @@ -1,71 +0,0 @@ -<?php require_once "../../../resources/private/relative.php"; getRelativeDetails("cms-special"); ?> -<?php $loadEditor = false;$pageConfig = [ "domName" => "Apparence", "headerName" => "Apparence" ]; require_once $_SERVER['DOCUMENT_ROOT'] . "/cms-special/admin-v2/\$resources/precontent.php"; ?> - <h2><?= $lang["admin-appearance"]["footer"] ?></h2> - <span id="footer-error-box" class="hide"><div id="error"><span id="footer-error"><?= $lang["admin-appearance"]["error"] ?></span></div></span> - <div id="footer-settings"><div style="text-align: center;"> - <div style="text-align: center;"><?= $lang["admin-appearance"]["fdesc"] ?></div> - <div name="content" id="fedit"> - <?= file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/footer") ?> - </div><br> - <a onclick="updateFooter()" class="button"><?= $lang["admin-appearance"]["publish"] ?></a> - <script src="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/js/ckeditor5/ckeditor.js"></script><script src="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/js/ckeditor5/translations/<?= $langsel ?>.js"></script> - <script> - let editor; - ClassicEditor - .create( document.querySelector( '#fedit' ), { - language: { - ui: '<?= $langsel ?>', - content: '<?= $langsel ?>' - }, - toolbar: [ - 'heading', '|', 'bold', 'italic', 'link', '|', 'mediaembed', 'blockquote', 'inserttable', '|', 'bulletedList', 'numberedList', '|', 'undo', 'redo' - ] - } ) - .then( newEditor => { - editor = newEditor; - } ) - .catch( error => { - console.error( error ); - } ); - </script></div> - <p><table class="message_info"><tbody><tr><td><img src="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/image/message_info.svg" class="message_img"></td><td style="width:100%;"><p><?= $lang["admin-appearance"]["fdisc"][0] ?></p><p><?= $lang["admin-appearance"]["fdisc"][1] ?></p></td></tr></tbody></table></p> - </div> - <div style="text-align: center;"><div id="footer-loader" class="hide"><img src="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/image/loader.svg" class="loader"></div></div> -<?php require_once $_SERVER['DOCUMENT_ROOT'] . "/cms-special/admin-v2/\$resources/postcontent.php"; ?> - -<script> - -function updateFooter() { - document.getElementById('footer-loader').classList.remove('hide') - document.getElementById('footer-settings').classList.add('hide') - var formData = new FormData(); - formData.append("footer", editor.getData()); - document.getElementById('footer-error-box').classList.add("hide") - $.ajax({ - type: "POST", - dataType: 'html', - url: "<?= $GLOBALS["SYSTEM_ROOT"] ?>/api/admin/footer.php", - success: function (data) { - if (data == "ok") { - location.href = "<?= $GLOBALS["SYSTEM_ROOT"] ?>/cms-special/admin-v2/$panes/personalization.php"; - } else { - document.getElementById('footer-error').innerHTML = data - document.getElementById('footer-error-box').classList.remove("hide") - document.getElementById('footer-loader').classList.add('hide') - document.getElementById('footer-settings').classList.remove('hide') - } - }, - error: function (error) { - document.getElementById('footer-error').innerHTML = "<?= $lang["admin-errors"]["connerror"] ?>" - document.getElementById('footer-error-box').classList.remove("hide") - document.getElementById('footer-loader').classList.add('hide') - document.getElementById('footer-settings').classList.remove('hide') - }, - data: formData, - cache: false, - contentType: false, - processData: false - }); -} - -</script>
\ No newline at end of file diff --git a/Neutron-trunk/cms-special/admin-v2/galery/addcategory/index.php b/Neutron-trunk/cms-special/admin-v2/galery/addcategory/index.php deleted file mode 100644 index a40e31b..0000000 --- a/Neutron-trunk/cms-special/admin-v2/galery/addcategory/index.php +++ /dev/null @@ -1,2 +0,0 @@ -<?php require_once "../../../../resources/private/relative.php"; getRelativeDetails("cms-special"); ?>
-<?php header("Location: {$GLOBALS["SYSTEM_ROOT"]}/cms-special/admin-v2/gallery/addcategory") ?>
\ No newline at end of file diff --git a/Neutron-trunk/cms-special/admin-v2/galery/index.php b/Neutron-trunk/cms-special/admin-v2/galery/index.php deleted file mode 100644 index f0e5652..0000000 --- a/Neutron-trunk/cms-special/admin-v2/galery/index.php +++ /dev/null @@ -1,2 +0,0 @@ -<?php require_once "../../../resources/private/relative.php"; getRelativeDetails("cms-special"); ?>
-<?php header("Location: {$GLOBALS["SYSTEM_ROOT"]}/cms-special/admin-v2/gallery") ?>
\ No newline at end of file diff --git a/Neutron-trunk/cms-special/admin-v2/galery/publish/index.php b/Neutron-trunk/cms-special/admin-v2/galery/publish/index.php deleted file mode 100644 index 91e2a81..0000000 --- a/Neutron-trunk/cms-special/admin-v2/galery/publish/index.php +++ /dev/null @@ -1,2 +0,0 @@ -<?php require_once "../../../../resources/private/relative.php"; getRelativeDetails("cms-special"); ?>
-<?php header("Location: {$GLOBALS["SYSTEM_ROOT"]}/cms-special/admin-v2/gallery/publish") ?>
\ No newline at end of file diff --git a/Neutron-trunk/cms-special/admin-v2/gallery/addcategory/index.php b/Neutron-trunk/cms-special/admin-v2/gallery/addcategory/index.php deleted file mode 100644 index e29a1aa..0000000 --- a/Neutron-trunk/cms-special/admin-v2/gallery/addcategory/index.php +++ /dev/null @@ -1,39 +0,0 @@ -<?php require_once "../../../../resources/private/relative.php"; getRelativeDetails("cms-special"); ?> -<?php $pageConfig = [ "domName" => "Nouvelle catégorie - Galerie de photos", "headerName" => "Nouvelle catégorie" ]; require_once $_SERVER['DOCUMENT_ROOT'] . "/cms-special/admin-v2/\$resources/precontent.php"; ?> - <div id="hidding"> - <input type="text" id="catname" placeholder="<?= $lang["admin-gallery"]["addcat"]["placeholder"] ?>"> - <p><i><?= $lang["admin-gallery"]["addcat"]["same"] ?></i></p> - <p><div style="text-align: center;"><a class="button" onclick="createCat()"><?= $lang["admin-gallery"]["addcat"]["confirm"] ?></a></div></p> - </div> -<?php require_once $_SERVER['DOCUMENT_ROOT'] . "/cms-special/admin-v2/\$resources/postcontent.php"; ?> - -<script> - -function createCat() { - document.getElementById('hidding').classList.add('hide') - var formData = new FormData(); - formData.append("category", document.getElementById('catname').value); - $.ajax({ - type: "POST", - dataType: 'html', - url: "<?= $GLOBALS["SYSTEM_ROOT"] ?>/api/admin/galery_create_category.php", - success: function (data) { - if (data == "ok") { - location.href = "<?= $GLOBALS["SYSTEM_ROOT"] ?>/cms-special/admin-v2/gallery"; - } else { - alert("<?= $lang["admin-errors"]["errorprefix"] ?>" + data) - document.getElementById('hidding').classList.remove('hide') - } - }, - error: function (error) { - alert("<?= $lang["admin-errors"]["connerror"] ?>") - document.getElementById('hidding').classList.remove('hide') - }, - data: formData, - cache: false, - contentType: false, - processData: false - }); -} - -</script>
\ No newline at end of file diff --git a/Neutron-trunk/cms-special/admin-v2/gallery/index.php b/Neutron-trunk/cms-special/admin-v2/gallery/index.php deleted file mode 100644 index 7c25c60..0000000 --- a/Neutron-trunk/cms-special/admin-v2/gallery/index.php +++ /dev/null @@ -1,218 +0,0 @@ -<?php require_once "../../../resources/private/relative.php"; getRelativeDetails("cms-special"); ?> -<?php $pageConfig = [ "domName" => "Galerie de photos", "headerName" => "Galerie de photos" ]; require_once $_SERVER['DOCUMENT_ROOT'] . "/cms-special/admin-v2/\$resources/precontent.php"; ?> -<?php - -if (!file_exists($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/galery")) { - mkdir($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/galery"); - mkdir($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/galery/categories"); - mkdir($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/galery/pictures"); -} - -?> - <h3><?= $lang["admin-gallery"]["general"]['title'] ?></h3> - <ul> - <li><?php - - $count = 0; - $dirs = scandir($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/galery/categories"); - foreach ($dirs as $el) { - if ($el == "." || $el == "..") {} else { - $count = $count + 1; - } - } - if ($count != 0) { - echo($count); - } else { - echo($lang["admin-gallery"]["none"]); - } - - ?> <?= $lang["admin-gallery"]["lists"]['categories'] ?><?php if ($count > 1) {echo("s");} ?> - <?php - - $count = 0; - $dirs = scandir($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/galery/pictures"); - foreach ($dirs as $el) { - if ($el == "." || $el == "..") {} else { - $count = $count + 1; - } - } - if ($count != 0) { - echo($count); - } else { - echo($lang["admin-gallery"]["none"]); - } - - ?> <?= $lang["admin-gallery"]["lists"]['picture'] ?><?php if ($count > 1) {echo("s");} ?></li> - <li><a class="sblink" href="<?= $GLOBALS["SYSTEM_ROOT"] ?>/cms-special/admin-v2/gallery/addcategory"><?= $lang["admin-gallery"]["categories"]["add"] ?></a></li> - </ul> - <h3><?= $lang["admin-gallery"]["categories"]['title'] ?></h3> - <i><?= $lang["admin-gallery"]["categories"]['edit'] ?></i> - <ul> - <?php - - $dirs = scandir($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/galery/categories"); - foreach ($dirs as $el) { - if ($el == "." || $el == "..") {} else { - echo("<li>" . file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/galery/categories/" . $el) . ", <a class=\"sblink\" onclick=\"deleteCategory('{$el}')\">" . $lang["admin-gallery"]["categories"]['delete'] . "</a></li>"); - } - } - - ?> - </ul> - <h3><?= $lang["admin-gallery"]["pictures"]['title'] ?></h3> - <ul> - <?php - - $count = 0; - $dirs = scandir($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/galery/pictures"); - foreach ($dirs as $el) { - if ($el == "." || $el == "..") {} else { - $count = $count + 1; - } - } - if ($count == 0) { - echo("<i>" . $lang["admin-gallery"]["pictures"]['none'] . "</i><p><a class=\"sblink\" href=\"{$GLOBALS["SYSTEM_ROOT"]}/cms-special/admin-v2/gallery/publish\">" . $lang["admin-gallery"]["pictures"]['add'] . "</a></p>"); - } else { - foreach ($dirs as $el) { - if ($el == "." || $el == "..") {} else { - if (isset(explode('|', file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/galery/pictures/" . $el))[2])) { - echo("<li><i>" . explode('|', file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/galery/pictures/" . $el))[2] . "</i>, "); - } else { - echo("<li><code>" . $el ."</code>, "); - } - if (explode('|', file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/galery/pictures/" . $el))[1] == "unclassed") { - echo($lang["gallery"]["unclassed"]); - } else { - echo(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/galery/categories/" . explode('|', file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/galery/pictures/" . $el))[1])); - } - echo(", <a onclick=\"labelPicture('$el')\" class=\"sblink\">{$lang["admin-gallery"]["general"]["label"]}</a> - <a href=\"{$GLOBALS["SYSTEM_ROOT"]}" . explode('|', file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/galery/pictures/" . $el))[0] . "\" class=\"sblink\" download>" . $lang["admin-gallery"]["pictures"]['download'] . "</a> - <a onclick=\"confirmDelete('$el')\" class=\"sblink\">" . $lang["admin-gallery"]["pictures"]['delete'] . "</a></li>"); - } - } - echo("<b><a class=\"sblink\" href=\"{$GLOBALS["SYSTEM_ROOT"]}/cms-special/admin-v2/gallery/publish\">" . $lang["admin-gallery"]["pictures"]['add'] . "</a></b>"); - } - - ?> - </ul> -<?php require_once $_SERVER['DOCUMENT_ROOT'] . "/cms-special/admin-v2/\$resources/postcontent.php"; ?> - -<script> - -function confirmDelete(id) { - if (confirm("<?= $lang["admin-gallery"]["delete"]['title'][0] ?>\n<?= $lang["admin-gallery"]["delete"]['title'][1] ?>")) { - $('#settings').fadeOut(200) - document.title = "<?= $lang["admin-gallery"]["delete"]['removing'] ?>" - var formData = new FormData(); - formData.append("id", id); - $.ajax({ - type: "POST", - dataType: 'html', - url: "<?= $GLOBALS["SYSTEM_ROOT"] ?>/api/admin/galery_delete_image.php", - success: function (data) { - if (data == "ok") { - reloadPage() - } else { - alert("<?= $lang["admin-errors"]["errorprefix"] ?>" + data) - reloadPage() - } - }, - error: function (error) { - alert("<?= $lang["admin-errors"]["connerror"] ?>") - reloadPage() - }, - data: formData, - cache: false, - contentType: false, - processData: false - }); - } -} - -function deleteCategory(id) { - if (confirm('<?= $lang["admin-gallery"]["delete"]['category'] ?>')) { - $('#settings').fadeOut(200) - document.title = "<?= $lang["admin-gallery"]["delete"]['catrm'] ?>" - var formData = new FormData(); - formData.append("id", id); - $.ajax({ - type: "POST", - dataType: 'html', - url: "<?= $GLOBALS["SYSTEM_ROOT"] ?>/api/admin/galery_delete_category.php", - success: function (data) { - if (data == "ok") { - reloadPage() - } else { - alert("<?= $lang["admin-errors"]["errorprefix"] ?>" + data, true) - } - }, - error: function (error) { - alert("<?= $lang["admin-errors"]["connerror"] ?>", true) - }, - data: formData, - cache: false, - contentType: false, - processData: false - }); - } -} - -function labelPicture(id) { - text = prompt("<?= $lang["admin-gallery"]["label"] ?>") - if (typeof text == "string") { - $('#settings').fadeOut(200) - document.title = "<?= $lang["admin-gallery"]["labelling"] ?>" - var formData = new FormData(); - formData.append("id", id); - formData.append("label", text); - $.ajax({ - type: "POST", - dataType: 'html', - url: "<?= $GLOBALS["SYSTEM_ROOT"] ?>/api/admin/galery_label_picture.php", - success: function (data) { - if (data == "ok") { - reloadPage() - } else { - alert("<?= $lang["admin-errors"]["errorprefix"] ?>" + data, true) - } - }, - error: function (error) { - alert("<?= $lang["admin-errors"]["connerror"] ?>", true) - }, - data: formData, - cache: false, - contentType: false, - processData: false - }); - } -} - -function changeState() { - document.getElementById('state').disabled = true; - var formData = new FormData(); - if (document.getElementById('state').checked) { - formData.append("state", "1"); - } else { - formData.append("state", "0"); - } - $.ajax({ - type: "POST", - dataType: 'html', - url: "<?= $GLOBALS["SYSTEM_ROOT"] ?>/api/admin/galery_toggle_state.php", - success: function (data) { - if (data == "ok") { - document.getElementById('state').disabled = false; - } else { - alert("<?= $lang["admin-errors"]["errorprefix"] ?>" + data) - document.getElementById('state').disabled = false; - } - }, - error: function (error) { - alert("<?= $lang["admin-errors"]["connerror"] ?>") - document.getElementById('state').disabled = false; - }, - data: formData, - cache: false, - contentType: false, - processData: false - }); -} - -</script> diff --git a/Neutron-trunk/cms-special/admin-v2/gallery/publish/index.php b/Neutron-trunk/cms-special/admin-v2/gallery/publish/index.php deleted file mode 100644 index 1217164..0000000 --- a/Neutron-trunk/cms-special/admin-v2/gallery/publish/index.php +++ /dev/null @@ -1,57 +0,0 @@ -<?php require_once "../../../../resources/private/relative.php"; getRelativeDetails("cms-special"); ?> -<?php $pageConfig = [ "domName" => "Nouvelle photo - Galerie de photos", "headerName" => "Nouvelle photo" ]; require_once $_SERVER['DOCUMENT_ROOT'] . "/cms-special/admin-v2/\$resources/precontent.php"; ?> - <div id="hidding"> - <p><?= $lang["admin-gallery"]["publish"]["category"] ?> <select id="category"> - <option value="unclassed" selected><?= $lang["admin-gallery"]["publish"]["default"] ?></option> - <?php - - $categories = scandir($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/galery/categories"); - foreach ($categories as $category) { - if (trim($category) != "" && $category != "." && $category != "..") { - $catname = file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/galery/categories/" . $category); - echo("<option value=\"" . $category . "\">" . $catname . "</option>"); - } - } - - ?> - </select></p> - <p><?= $lang["admin-gallery"]["publish"]["file"] ?> <input type="file" id="file"> <i><?= $lang["admin-gallery"]["publish"]["max"] ?> <?= ini_get("upload_max_filesize") ?></i></p> - <p><div style="text-align: center;"><a class="button" onclick="createCat()"><?= $lang["admin-gallery"]["publish"]["publish"] ?></a></div></p> - </div> -<?php require_once $_SERVER['DOCUMENT_ROOT'] . "/cms-special/admin-v2/\$resources/postcontent.php"; ?> - -<script> - -function createCat() { - document.getElementById('hidding').classList.add('hide') - var formData = new FormData(); - if (document.getElementById('file').value.trim() != "") { - formData.append("file", document.getElementById('file').files[0], document.getElementById('file').files[0].name); - } - formData.append("category", document.getElementById('category').value); - $.ajax({ - type: "POST", - dataType: 'html', - url: "<?= $GLOBALS["SYSTEM_ROOT"] ?>/api/admin/galery_publish_photo.php", - success: function (data) { - if (data == "ok") { - location.href = "<?= $GLOBALS["SYSTEM_ROOT"] ?>/cms-special/admin-v2/gallery"; - } else { - alert("<?= $lang["admin-errors"]["errorprefix"] ?>" + data) - document.getElementById('hidding').classList.remove('hide') - } - }, - error: function (error) { - alert("<?= $lang["admin-errors"]["connerror"] ?>") - document.getElementById('hidding').classList.remove('hide') - }, - data: formData, - cache: false, - contentType: false, - processData: false - }); -} - -document.getElementById('file').value = ""; - -</script>
\ No newline at end of file diff --git a/Neutron-trunk/cms-special/admin-v2/home/all/db.json b/Neutron-trunk/cms-special/admin-v2/home/all/db.json deleted file mode 100644 index 8a6ad37..0000000 --- a/Neutron-trunk/cms-special/admin-v2/home/all/db.json +++ /dev/null @@ -1,178 +0,0 @@ -[ - { - "name": "pages", - "id": 0, - "icon": "insert_drive_file", - "items": [ - { - "name": "list", - "id": 0, - "icon": "list_alt", - "page": "pages" - }, - { - "name": "create", - "id": 1, - "icon": "add", - "page": "pages/add" - } - ] - }, - { - "name": "gallery", - "id": 1, - "icon": "photo", - "items": [ - { - "name": "list", - "id": 2, - "icon": "photo_library", - "page": "gallery" - }, - { - "name": "add", - "id": 3, - "icon": "add_photo_alternate", - "page": "gallery/publish" - }, - { - "name": "category", - "id": 4, - "icon": "local_offer", - "page": "gallery/addcategory" - }, - { - "name": "userspace", - "id": 5, - "icon": "image_search", - "page": "../gallery" - } - ] - }, - { - "name": "calendar", - "id": 2, - "icon": "event", - "items": [ - { - "name": "all", - "id": 6, - "icon": "event", - "page": "calendar" - }, - { - "name": "create", - "id": 7, - "icon": "event_available", - "page": "calendar/add" - }, - { - "name": "userspace", - "id": 8, - "icon": "event_note", - "page": "../calendar" - } - ] - }, - { - "name": "plugins", - "id": 3, - "icon": "extension", - "items": [ - { - "name": "all", - "id": 9, - "icon": "extension", - "page": "plugins" - } - ] - }, - { - "name": "technical", - "id": 4, - "icon": "build_circle", - "items": [ - { - "name": "all", - "id": 12, - "icon": "engineering", - "page": "advanced" - }, - { - "name": "advanced", - "id": 13, - "icon": "build_circle", - "page": "advanced/jsonconf" - } - ] - }, - { - "name": "data", - "id": 5, - "icon": "pie_chart", - "items": [ - { - "name": "reset", - "id": 15, - "icon": "delete", - "page": "reset" - }, - { - "name": "stats", - "id": 16, - "icon": "pie_chart", - "page": "stats" - }, - { - "name": "logs", - "id": 17, - "icon": "subject", - "page": "logs" - } - ] - }, - { - "name": "updates", - "id": 6, - "icon": "cloud_download", - "items": [ - { - "name": "info", - "id": 19, - "icon": "info", - "page": "about" - } - ] - }, - { - "name": "apparence", - "id": 7, - "icon": "brush", - "items": [ - { - "name": "general", - "id": 22, - "icon": "brush", - "page": "appearance" - }, - { - "name": "theme", - "id": 23, - "icon": "palette", - "page": "customization" - }, - { - "name": "language", - "id": 26, - "icon": "language", - "page": "language" - }, - { - "name": "flags", - "id": 27, - "icon": "flag", - "page": "flags" - } - ] - } -] diff --git a/Neutron-trunk/cms-special/admin-v2/home/all/index.php b/Neutron-trunk/cms-special/admin-v2/home/all/index.php deleted file mode 100644 index a780757..0000000 --- a/Neutron-trunk/cms-special/admin-v2/home/all/index.php +++ /dev/null @@ -1,4 +0,0 @@ -<?php require_once "../../../../resources/private/relative.php"; getRelativeDetails("cms-special"); ?> -<?php - -header("Location: {$GLOBALS["SYSTEM_ROOT"]}/cms-special/admin-v2/home");
\ No newline at end of file diff --git a/Neutron-trunk/cms-special/admin-v2/home/appearance/index.php b/Neutron-trunk/cms-special/admin-v2/home/appearance/index.php deleted file mode 100644 index c5cff76..0000000 --- a/Neutron-trunk/cms-special/admin-v2/home/appearance/index.php +++ /dev/null @@ -1,45 +0,0 @@ -<?php require_once "../../../../resources/private/relative.php"; getRelativeDetails("cms-special"); ?> -<?php - -$pageConfig = [ "domName" => "Tableau de bord", "headerName" => "Tableau de bord" ]; require_once $_SERVER['DOCUMENT_ROOT'] . "/cms-special/admin-v2/\$resources/precontent.php"; ?> -<div style="text-align: center;"> - <a href="<?= $GLOBALS["SYSTEM_ROOT"] ?>/cms-special/admin-v2/home" class="mdc-button mdc-button--outlined"> - <div class="mdc-button__ripple"></div> - <i class="material-icons-outlined mdc-button__icon" aria-hidden="true">arrow_back</i> - <span class="mdc-button__label"><?= $lang["admin-home"]["items"][7] ?></span> - </a> - - <h1><?= $lang["admin-home"]["appearance"]['greeting'] ?></h1> - - <div id="home-grid"> - <div class="home-grid-item"> - <a title="<?= $lang["admin-home"]["appearance"]['items'][0] ?>" id="home-grid-item-appearance" href="<?= $GLOBALS["SYSTEM_ROOT"] ?>/cms-special/admin-v2/appearance" class="material-icons-outlined mdc-top-app-bar__navigation-icon mdc-icon-button home-grid-item-button">tour</a> - <br> - <?= $lang["admin-home"]["appearance"]['items'][0] ?> - </div> - <div class="home-grid-item"> - <a title="<?= $lang["admin-home"]["appearance"]['items'][1] ?>" id="home-grid-item-appearance" href="<?= $GLOBALS["SYSTEM_ROOT"] ?>/cms-special/admin-v2/customization" class="material-icons-outlined mdc-top-app-bar__navigation-icon mdc-icon-button home-grid-item-button">palette</a> - <br> - <?= $lang["admin-home"]["appearance"]['items'][1] ?> - </div> - <div class="home-grid-item"> - <a title="<?= $lang["admin-home"]["appearance"]['items'][3] ?>" id="home-grid-item-appearance" href="<?= $GLOBALS["SYSTEM_ROOT"] ?>/cms-special/admin-v2/language" class="material-icons-outlined mdc-top-app-bar__navigation-icon mdc-icon-button home-grid-item-button">language</a> - <br> - <?= $lang["admin-home"]["appearance"]['items'][3] ?> - </div> - <div class="home-grid-item"> - <a title="<?= $lang["admin-home"]["appearance"]['items'][4] ?>" id="home-grid-item-appearance" href="<?= $GLOBALS["SYSTEM_ROOT"] ?>/cms-special/admin-v2/plugins" class="material-icons-outlined mdc-top-app-bar__navigation-icon mdc-icon-button home-grid-item-button">extension</a> - <br> - <?= $lang["admin-home"]["appearance"]['items'][4] ?> - </div> - <?php /** @var boolean $__electrode */ - if (!isset($__electrode) || !$__electrode): ?> - <div class="home-grid-item"> - <a title="<?= $lang["admin-home"]["appearance"]['items'][5] ?>" id="home-grid-item-appearance" href="<?= $GLOBALS["SYSTEM_ROOT"] ?>/cms-special/admin-v2/flags" class="material-icons-outlined mdc-top-app-bar__navigation-icon mdc-icon-button home-grid-item-button">flag</a> - <br> - <?= $lang["admin-home"]["appearance"]['items'][5] ?> - </div> - <?php endif; ?> - </div> -</div> -<?php require_once $_SERVER['DOCUMENT_ROOT'] . "/cms-special/admin-v2/\$resources/postcontent.php"; ?>
\ No newline at end of file diff --git a/Neutron-trunk/cms-special/admin-v2/home/data/index.php b/Neutron-trunk/cms-special/admin-v2/home/data/index.php deleted file mode 100644 index ee9d7bc..0000000 --- a/Neutron-trunk/cms-special/admin-v2/home/data/index.php +++ /dev/null @@ -1,27 +0,0 @@ -<?php require_once "../../../../resources/private/relative.php"; getRelativeDetails("cms-special"); ?> -<?php - -$pageConfig = [ "domName" => "Tableau de bord", "headerName" => "Tableau de bord" ]; require_once $_SERVER['DOCUMENT_ROOT'] . "/cms-special/admin-v2/\$resources/precontent.php"; ?> -<div style="text-align: center;"> - <a href="<?= $GLOBALS["SYSTEM_ROOT"] ?>/cms-special/admin-v2/home" class="mdc-button mdc-button--outlined"> - <div class="mdc-button__ripple"></div> - <i class="material-icons-outlined mdc-button__icon" aria-hidden="true">arrow_back</i> - <span class="mdc-button__label"><?= $lang["admin-home"]["items"][7] ?></span> - </a> - - <h1><?= $lang["admin-home"]["data"]['greeting'] ?></h1> - - <div id="home-grid"> - <div class="home-grid-item"> - <a title="<?= $lang["admin-home"]["data"]['items'][0] ?>" id="home-grid-item-data" href="<?= $GLOBALS["SYSTEM_ROOT"] ?>/cms-special/admin-v2/stats" class="material-icons-outlined mdc-top-app-bar__navigation-icon mdc-icon-button home-grid-item-button">pie_chart</a> - <br> - <?= $lang["admin-home"]["data"]['items'][0] ?> - </div> - <div class="home-grid-item"> - <a title="<?= $lang["admin-home"]["data"]['items'][1] ?>" id="home-grid-item-data" href="<?= $GLOBALS["SYSTEM_ROOT"] ?>/cms-special/admin-v2/logs" class="material-icons-outlined mdc-top-app-bar__navigation-icon mdc-icon-button home-grid-item-button">text_snippet</a> - <br> - <?= $lang["admin-home"]["data"]['items'][1] ?> - </div> - </div> -</div> -<?php require_once $_SERVER['DOCUMENT_ROOT'] . "/cms-special/admin-v2/\$resources/postcontent.php"; ?>
\ No newline at end of file diff --git a/Neutron-trunk/cms-special/admin-v2/home/housekeeping/index.php b/Neutron-trunk/cms-special/admin-v2/home/housekeeping/index.php deleted file mode 100644 index 7e0cf3e..0000000 --- a/Neutron-trunk/cms-special/admin-v2/home/housekeeping/index.php +++ /dev/null @@ -1,27 +0,0 @@ -<?php require_once "../../../../resources/private/relative.php"; getRelativeDetails("cms-special"); ?> -<?php - -$pageConfig = [ "domName" => "Tableau de bord", "headerName" => "Tableau de bord" ]; require_once $_SERVER['DOCUMENT_ROOT'] . "/cms-special/admin-v2/\$resources/precontent.php"; ?> -<div style="text-align: center;"> - <a href="<?= $GLOBALS["SYSTEM_ROOT"] ?>/cms-special/admin-v2/home" class="mdc-button mdc-button--outlined"> - <div class="mdc-button__ripple"></div> - <i class="material-icons-outlined mdc-button__icon" aria-hidden="true">arrow_back</i> - <span class="mdc-button__label"><?= $lang["admin-home"]["items"][7] ?></span> - </a> - - <h1><?= $lang["admin-home"]["housekeeping"]['greeting'] ?></h1> - - <div id="home-grid"> - <div class="home-grid-item"> - <a title="<?= $lang["admin-home"]["housekeeping"]['items'][0] ?>" id="home-grid-item-housekeeping" href="<?= $GLOBALS["SYSTEM_ROOT"] ?>/cms-special/admin-v2/reset" class="material-icons-outlined mdc-top-app-bar__navigation-icon mdc-icon-button home-grid-item-button">restore</a> - <br> - <?= $lang["admin-home"]["housekeeping"]['items'][0] ?> - </div> - <div class="home-grid-item"> - <a title="<?= $lang["admin-home"]["housekeeping"]['items'][1] ?>" id="home-grid-item-housekeeping" href="<?= $GLOBALS["SYSTEM_ROOT"] ?>/cms-special/admin-v2/about" class="material-icons-outlined mdc-top-app-bar__navigation-icon mdc-icon-button home-grid-item-button">info</a> - <br> - <?= $lang["admin-home"]["housekeeping"]['items'][1] ?> - </div> - </div> -</div> -<?php require_once $_SERVER['DOCUMENT_ROOT'] . "/cms-special/admin-v2/\$resources/postcontent.php"; ?>
\ No newline at end of file diff --git a/Neutron-trunk/cms-special/admin-v2/home/index.php b/Neutron-trunk/cms-special/admin-v2/home/index.php deleted file mode 100644 index 7a41bf4..0000000 --- a/Neutron-trunk/cms-special/admin-v2/home/index.php +++ /dev/null @@ -1,58 +0,0 @@ -<?php require_once "../../../resources/private/relative.php"; getRelativeDetails("cms-special"); ?> -<?php - -$pageConfig = [ "domName" => "Tableau de bord", "headerName" => "Tableau de bord" ]; require_once $_SERVER['DOCUMENT_ROOT'] . "/cms-special/admin-v2/\$resources/precontent.php"; ?> -<div style="text-align: center;"> - <a title="<?= $lang["admin-home"]["language"] ?>/Switch Language" href="<?= $GLOBALS["SYSTEM_ROOT"] ?>/cms-special/admin-v2/language" class="material-icons-outlined mdc-top-app-bar__navigation-icon mdc-icon-button" id="language-selector">translate</a> - - <h1><?= $lang["admin-home"]["greeting"] ?></h1> - - <div id="home-grid"> - <div class="home-grid-item"> - <a title="<?= $lang["admin-home"]["items"][0] ?>" id="home-grid-item-pages" href="<?= $GLOBALS["SYSTEM_ROOT"] ?>/cms-special/admin-v2/pages" class="material-icons-outlined mdc-top-app-bar__navigation-icon mdc-icon-button home-grid-item-button">layers</a> - <br> - <?= $lang["admin-home"]["items"][0] ?> - </div> - <div class="home-grid-item"> - <a title="<?= $lang["admin-home"]["items"][1] ?>" id="home-grid-item-calendar" href="<?= $GLOBALS["SYSTEM_ROOT"] ?>/cms-special/admin-v2/calendar" class="material-icons-outlined mdc-top-app-bar__navigation-icon mdc-icon-button home-grid-item-button">event_note</a><br> - <?= $lang["admin-home"]["items"][1] ?> - </div> - <div class="home-grid-item"> - <a title="<?= $lang["admin-home"]["items"][2] ?>" id="home-grid-item-gallery" href="<?= $GLOBALS["SYSTEM_ROOT"] ?>/cms-special/admin-v2/gallery" class="material-icons-outlined mdc-top-app-bar__navigation-icon mdc-icon-button home-grid-item-button">photo</a><br> - <?= $lang["admin-home"]["items"][2] ?> - </div> - <div class="home-grid-item"> - <a title="<?= $lang["admin-home"]["items"][3] ?>" id="home-grid-item-appearance" href="<?= $GLOBALS["SYSTEM_ROOT"] ?>/cms-special/admin-v2/home/appearance" class="material-icons-outlined mdc-top-app-bar__navigation-icon mdc-icon-button home-grid-item-button">brush</a><br> - <?= $lang["admin-home"]["items"][3] ?> - </div> - <div class="home-grid-item"> - <a title="<?= $lang["admin-home"]["items"][4] ?>" id="home-grid-item-data" href="<?= $GLOBALS["SYSTEM_ROOT"] ?>/cms-special/admin-v2/home/data" class="material-icons-outlined mdc-top-app-bar__navigation-icon mdc-icon-button home-grid-item-button">dns</a><br> - <?= $lang["admin-home"]["items"][4] ?> - </div> - <div class="home-grid-item"> - <a title="<?= $lang["admin-home"]["items"][5] ?>" id="home-grid-item-housekeeping" href="<?= $GLOBALS["SYSTEM_ROOT"] ?>/cms-special/admin-v2/home/housekeeping" class="material-icons-outlined mdc-top-app-bar__navigation-icon mdc-icon-button home-grid-item-button">cleaning_services</a><br> - <?= $lang["admin-home"]["items"][5] ?> - </div> - </div> - - <br> - - <a onclick="document.getElementsByTagName('spotlight-bar')[0].show()" class="mdc-button mdc-button--outlined"> - <div class="mdc-button__ripple"></div> - <i class="material-icons-outlined mdc-button__icon" aria-hidden="true">settings</i> - <span class="mdc-button__label"><?= $lang["admin-home"]["items"][6] ?></span> - </a> - - <a href="<?= $GLOBALS["SYSTEM_ROOT"] ?>/cms-special/admin-v2/logout" class="mdc-button mdc-button--outlined"> - <div class="mdc-button__ripple"></div> - <i class="material-icons-outlined mdc-button__icon" aria-hidden="true">power_settings_new</i> - <span class="mdc-button__label"><?= $lang["admin-home"]["items"][8] ?></span> - </a> - - <a href="<?= $GLOBALS["SYSTEM_ROOT"] ?>/?source=admin" target="_blank" class="mdc-button mdc-button--outlined"> - <div class="mdc-button__ripple"></div> - <i class="material-icons-outlined mdc-button__icon" aria-hidden="true">public</i> - <span class="mdc-button__label"><?= $lang["admin-home"]["items"][9] ?></span> - </a> -</div> -<?php require_once $_SERVER['DOCUMENT_ROOT'] . "/cms-special/admin-v2/\$resources/postcontent.php"; ?> diff --git a/Neutron-trunk/cms-special/admin-v2/housekeeping/index.php b/Neutron-trunk/cms-special/admin-v2/housekeeping/index.php deleted file mode 100644 index cc06932..0000000 --- a/Neutron-trunk/cms-special/admin-v2/housekeeping/index.php +++ /dev/null @@ -1,2 +0,0 @@ -<?php require_once "../../../resources/private/relative.php"; getRelativeDetails("cms-special"); ?>
-<?php header("Location: {$GLOBALS["SYSTEM_ROOT"]}/cms-special/admin-v2/home/housekeeping"); ?>
\ No newline at end of file diff --git a/Neutron-trunk/cms-special/admin-v2/housekeeping/reset/index.php b/Neutron-trunk/cms-special/admin-v2/housekeeping/reset/index.php deleted file mode 100644 index 1bf27eb..0000000 --- a/Neutron-trunk/cms-special/admin-v2/housekeeping/reset/index.php +++ /dev/null @@ -1,2 +0,0 @@ -<?php require_once "../../../../resources/private/relative.php"; getRelativeDetails("cms-special"); ?>
-<?php header("Location: {$GLOBALS["SYSTEM_ROOT"]}/cms-special/admin-v2/reset"); ?>
\ No newline at end of file diff --git a/Neutron-trunk/cms-special/admin-v2/index.php b/Neutron-trunk/cms-special/admin-v2/index.php deleted file mode 100644 index a7c6c9a..0000000 --- a/Neutron-trunk/cms-special/admin-v2/index.php +++ /dev/null @@ -1,148 +0,0 @@ -<?php - -require_once "../../resources/private/relative.php"; getRelativeDetails("cms-special"); -require_once $_SERVER['DOCUMENT_ROOT'] . "/api/lang/processor.php"; -require_once $_SERVER['DOCUMENT_ROOT'] . "/cms-special/admin-v2/\$resources/session.php"; - -global $lang; - -?> -<!DOCTYPE html> -<html> - -<head> - <meta charset="UTF-8"> - <meta name="viewport" content="width=device-width, initial-scale=1.0"> - <title>Neutron</title> - <link rel="stylesheet" href="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/css/ajax.css"> - <link rel="stylesheet" href="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/css/admin_v2/main.css"> - <link rel="stylesheet" href="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/css/admin_v2/navigation.css"> - <link rel="stylesheet" href="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/css/admin_v2/iframe.css"> - <?php if (strpos($_SERVER['HTTP_USER_AGENT'], "Chrome/")): ?> - <link rel="stylesheet" href="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/css/admin_v2/chromium.css"> - <style>:root { --mpcms-banner: url(<?php - - if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/resources/upload/banner.jpg")) { - echo('"' . $GLOBALS["SYSTEM_ROOT"] . '/resources/upload/banner.jpg"'); - } else { - echo('"' . $GLOBALS["SYSTEM_ROOT"] . '/resources/image/default.jpg"'); - } - - ?>); }</style> - <?php endif; ?> - <link rel="icon" href="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/image/siteicon.png"> - <script src="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/js/jquery.js"></script> -</head> - -<body> - <div class="bg"></div> - <main> - <aside> - <a href="<?= $GLOBALS["SYSTEM_ROOT"] ?>/" id="nav-header"> - <img src="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/upload/siteicon.png" id="nav-header-icon"> - <div id="nav-header-names-outer"> - <div id="nav-header-names"> - <b><?= file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/sitename") ?></b><br> - <?php - - if (file_exists($GLOBALS['ORIGINAL_DOCUMENT_ROOT'] . "/NeutronCloud")): - echo("Cloud X" . trim(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/Tier"))); - else: - echo($lang["admin-v2"]["on-premises"]); - endif; - - ?> - </div> - </div> - </a> - <div id="nav-items"> - <div class="nav-item selected" data-pane="system"> - <img class="nav-item-icon" src="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/image/admin2/system.png" alt=""> - <span class="nav-item-name"><?= $lang["admin-v2"]["drawer"][0] ?></span> - </div> - - <div class="nav-item" data-pane="content"> - <img class="nav-item-icon" src="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/image/admin2/content.png" alt=""> - <span class="nav-item-name"><?= $lang["admin-v2"]["drawer"][1] ?></span> - </div> - - <div class="nav-item" data-pane="personalization"> - <img class="nav-item-icon" src="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/image/admin2/personalization.png" alt=""> - <span class="nav-item-name"><?= $lang["admin-v2"]["drawer"][2] ?></span> - </div> - - <div class="nav-item" data-pane="features"> - <img class="nav-item-icon" src="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/image/admin2/features.png" alt=""> - <span class="nav-item-name"><?= $lang["admin-v2"]["drawer"][3] ?></span> - </div> - - <div class="nav-item" data-pane="accounts"> - <img class="nav-item-icon" src="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/image/admin2/accounts.png" alt=""> - <span class="nav-item-name"><?= $lang["admin-v2"]["drawer"][4] ?></span> - </div> - - <div class="nav-item" data-pane="language"> - <img class="nav-item-icon" src="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/image/admin2/language.png" alt=""> - <span class="nav-item-name"><?= $lang["admin-v2"]["drawer"][5] ?></span> - </div> - - <div class="nav-item" data-pane="security"> - <img class="nav-item-icon" src="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/image/admin2/security.png" alt=""> - <span class="nav-item-name"><?= $lang["admin-v2"]["drawer"][6] ?></span> - </div> - - <div class="nav-item" data-pane="maintenance"> - <img class="nav-item-icon" src="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/image/admin2/maintenance.png" alt=""> - <span class="nav-item-name"><?= $lang["admin-v2"]["drawer"][7] ?></span> - </div> - - <?php if (false): ?> - <div class="nav-item" data-pane="cloud"> - <img class="nav-item-icon" src="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/image/admin2/cloud.png" alt=""> - <span class="nav-item-name"><?= $lang["admin-v2"]["drawer"][8] ?></span> - </div> - <?php endif; ?> - - <?php if (false): ?> - <div class="nav-item" data-pane="electrode"> - <img class="nav-item-icon" src="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/image/admin2/electrode.png" alt=""> - <span class="nav-item-name"><?= $lang["admin-v2"]["drawer"][9] ?></span> - </div> - <?php endif; ?> - - <script> - Array.from(document.getElementsByClassName("nav-item")).forEach((item) => { - item.onclick = () => { - Array.from(document.getElementsByClassName("nav-item")).forEach((i) => { - i.classList.remove("selected"); - }) - item.classList.add("selected") - - document.getElementById("main-iframe").src = "<?= $GLOBALS["SYSTEM_ROOT"] ?>/cms-special/admin-v2/$panes/" + item.getAttribute("data-pane") + ".php"; - document.getElementById("main-title-inner").innerText = item.children[1].innerText; - } - }) - </script> - </div> - </aside> - - <article id="main-content"> - <div id="main-title" style="margin-top: 2px;"><span id="main-title-inner"><?= $lang["admin-v2"]["drawer"][0] ?></span> <span class="main-title-home-outer" onclick='$(".selected").click()'><img class="main-title-home" src="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/image/admin2/home.png" alt=""></span></div> - <iframe id="main-iframe" src="<?= $GLOBALS["SYSTEM_ROOT"] ?>/cms-special/admin-v2/$panes/system.php"></iframe> - </article> - - <script> - document.getElementById("main-iframe").onload = () => { - if (document.getElementById("main-iframe").contentDocument.title !== "base") { - document.getElementById("main-title").style.marginTop = "0"; - $(".main-title-home-outer").fadeIn(200); - } else { - document.getElementById("main-title").style.marginTop = "2px"; - $(".main-title-home-outer").fadeOut(200); - } - } - </script> - </main> -</body> - -</html>
\ No newline at end of file diff --git a/Neutron-trunk/cms-special/admin-v2/language/index.php b/Neutron-trunk/cms-special/admin-v2/language/index.php deleted file mode 100644 index 5d069d7..0000000 --- a/Neutron-trunk/cms-special/admin-v2/language/index.php +++ /dev/null @@ -1,9 +0,0 @@ -<?php require_once "../../../resources/private/relative.php"; getRelativeDetails("cms-special"); ?> -<?php $pageConfig = [ "domName" => "Langue et région", "headerName" => "Langue et région" ]; require_once $_SERVER['DOCUMENT_ROOT'] . "/cms-special/admin-v2/\$resources/precontent.php"; ?> -<?php - -if (isset($_GET['_'])) { - file_put_contents($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/lang", trim($_GET['_'])); -} - -echo("<script>window.parent.location.reload();</script>");
\ No newline at end of file diff --git a/Neutron-trunk/cms-special/admin-v2/login-old/index.php b/Neutron-trunk/cms-special/admin-v2/login-old/index.php deleted file mode 100644 index a2f09ba..0000000 --- a/Neutron-trunk/cms-special/admin-v2/login-old/index.php +++ /dev/null @@ -1,122 +0,0 @@ -<?php require_once "../../../resources/private/relative.php"; getRelativeDetails("cms-special"); ?> -<?php - -$invalid = false; - -if (isset($_POST['authkey'])) { - require $_SERVER['DOCUMENT_ROOT'] . "/api/electrode/quit.php";quit("UNSUPPORTED"); -} else { - if (isset($_POST['password'])) { - if (isset($_GET['pr'])) { - if (isset($_GET['pa'])) { - $callback = $_GET['pr'] . $_GET['pa']; - } else { - $callback = $_GET['pr']; - } - } else { - $callback = "{$GLOBALS["SYSTEM_ROOT"]}/cms-special/admin-v2"; - } - if (password_verify($_POST['password'], file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/password"))) { - $token = str_ireplace("/", "-", password_hash(password_hash(rand(0, 999999) + rand(0, 999999) + rand(0, 999999) + rand(0, 999999) + rand(0, 999999), PASSWORD_BCRYPT, ['cost' => 12,]), PASSWORD_BCRYPT, ['cost' => 12,])); - if (!file_exists($_SERVER['DOCUMENT_ROOT'] . "/data/tokens")) { - mkdir($_SERVER['DOCUMENT_ROOT'] . "/data/tokens"); - } - $tokens = scandir($_SERVER['DOCUMENT_ROOT'] . "/data/tokens"); - foreach ($tokens as $atoken) { - if ($atoken == "." || $atoken == "..") {} else { - unlink($_SERVER['DOCUMENT_ROOT'] . "/data/tokens/" . $atoken); - } - } - file_put_contents($_SERVER['DOCUMENT_ROOT'] . "/data/tokens/" . $token, ""); - header("Set-Cookie: _NEUTRON_ADMIN_TOKEN={$token}; Path=/; Http-Only; SameSite=Strict"); - header("Location: " . $callback); - return; - } else { - $invalid = true; - } - } -} - -if (isset($_COOKIE['_NEUTRON_ADMIN_TOKEN']) && $_COOKIE['_NEUTRON_ADMIN_TOKEN'] != "." && $_COOKIE['_NEUTRON_ADMIN_TOKEN'] != ".." && $_COOKIE['_NEUTRON_ADMIN_TOKEN'] != "/" && strpos($_COOKIE['_NEUTRON_ADMIN_TOKEN'], "/") === false) { - if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/data/tokens/" . $_COOKIE['_NEUTRON_ADMIN_TOKEN'])) { - if (isset($_GET['pr'])) { - if (isset($_GET['pa'])) { - $callback = $_GET['pr'] . $_GET['pa']; - } else { - $callback = $_GET['pr']; - } - } else { - $callback = "{$GLOBALS["SYSTEM_ROOT"]}/cms-special/admin-v2"; - } - header("Location: " . $callback); - } -} - -?> - -<?php ob_start();echo("<!--\n\n" . str_replace('%year%', date('Y'), file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/resources/private/license")) . "\n\n-->") ?> -<?php - -if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent")) { - $ready = true; -} else { - $ready = false; -} - -?> - -<!DOCTYPE html> -<html lang="fr"> -<head> - <meta charset="UTF-8"> - <meta name="viewport" content="width=device-width, initial-scale=1.0"> - <meta http-equiv="X-UA-Compatible" content="ie=edge"> - <link rel="stylesheet" href="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/css/admin.css"> - <link rel="stylesheet" href="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/css/fonts-import.css"> - <link rel="stylesheet" href="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/css/ui.css"> - <?php require_once $_SERVER['DOCUMENT_ROOT'] . "/resources/private/header.php"; ?> - <title><?php - - if ($ready) { - echo($lang["login"]["login"] . " - " . $lang["login"]["title"] . " - " . file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/sitename")); - } else { - echo("Neutron"); - } - - ?></title> - <?php - if (!$ready) { - require $_SERVER['DOCUMENT_ROOT'] . "/api/electrode/quit.php";quit("<script>location.href = '{$GLOBALS["SYSTEM_ROOT"]}/cms-special/setup';</script></head>"); - } - ?> -</head> -<body id="login"> - <div class="centered"> - <img src="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/upload/siteicon.png" style="border-radius:100%;" class="intro-element"> - <h2 style="margin-bottom:0;"><?= $lang["login"]["title"] ?></h2> - <p><small><?= str_replace("}", "</a>", str_replace("{", "<a class=\"clink\" href=\"{$GLOBALS["SYSTEM_ROOT"]}/cms-special/admin-v2/login\">", $lang["login"]["redirect"])); ?></small></p> - <p><?php - - if (isset($_GET['authkey'])) { - echo('<small>' . $lang["login"]["uauth"] . '<br><a href="." class="clink">' . $lang['login']['pass'] . '</a></small>'); - } else { - echo('<small>' . $lang["login"]["upass"] . '<br><a href="./?authkey" class="clink">' . $lang['login']['auth'] . '</a></small>'); - } - - ?></p> - <?php if ($invalid) {echo('<div id="error">' . $lang["login"]["invalid"] . '</div>');} ?> - - <?php if (!isset($_GET['authkey'])): ?> - <form action="./<?php if (isset($_GET['pr'])) {echo("?pr=" . $_GET['pr']);if (isset($_GET['pa'])) {echo("&pa=" . urlencode($_GET['pa']));}} ?>" method="post"> - <input name="password" type="password" placeholder="<?= isset($_GET['authkey']) ? $lang["login"]["authph"] : $lang["login"]["password"] ?>"><br><br> - <input type="submit" class="button" value="<?= $lang["login"]["login"] ?>"> - </form><br> - <?php else: ?> - <form action="#" method="post"> - <input name="authkey" type="password" placeholder="<?= isset($_GET['authkey']) ? $lang["login"]["authph"] : $lang["login"]["password"] ?>" disabled><br><br> - <small><?= $lang["login"]["nokey"][0] . " <a class=\"clink\" href=\"{$GLOBALS["SYSTEM_ROOT"]}/cms-special/admin-v2/login\">" . $lang["login"]["nokey"][1] . "</a> " . $lang["login"]["nokey"][2] ?></small> - </form><br> - <?php endif ?> - </div> -</body> -</html>
\ No newline at end of file diff --git a/Neutron-trunk/cms-special/admin-v2/login/index.php b/Neutron-trunk/cms-special/admin-v2/login/index.php deleted file mode 100644 index 6472865..0000000 --- a/Neutron-trunk/cms-special/admin-v2/login/index.php +++ /dev/null @@ -1,219 +0,0 @@ -<?php require_once "../../../resources/private/relative.php"; getRelativeDetails("cms-special"); ?> -<?php - -if (isset($_COOKIE['_NEUTRON_ADMIN_TOKEN']) && $_COOKIE['_NEUTRON_ADMIN_TOKEN'] != "." && $_COOKIE['_NEUTRON_ADMIN_TOKEN'] != ".." && $_COOKIE['_NEUTRON_ADMIN_TOKEN'] != "/" && strpos($_COOKIE['_NEUTRON_ADMIN_TOKEN'], "/") === false) { - if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/data/tokens/" . $_COOKIE['_NEUTRON_ADMIN_TOKEN'])) { - if (isset($_GET['pr'])) { - if (isset($_GET['pa'])) { - $callback = $_GET['pr'] . $_GET['pa']; - } else { - $callback = $_GET['pr']; - } - } else { - $callback = "{$GLOBALS["SYSTEM_ROOT"]}/cms-special/admin-v2"; - } - header("Location: " . $callback); - } -} - -if (isset($_GET['pr'])) { - if (isset($_GET['pa'])) { - $callback = $_GET['pr'] . $_GET['pa']; - } else { - $callback = $_GET['pr']; - } -} else { - $callback = "{$GLOBALS["SYSTEM_ROOT"]}/cms-special/admin-v2"; -} - -?> - -<?php ob_start();echo("<!--\n\n" . str_replace('%year%', date('Y'), file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/resources/private/license")) . "\n\n-->") ?> -<?php - -if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent")) { - $ready = true; -} else { - $ready = false; -} - -require_once $_SERVER['DOCUMENT_ROOT'] . "/resources/private/headers/preprocessor.php"; - -?> - -<!DOCTYPE html> -<html lang="fr"> -<head> - <meta charset="UTF-8"> - <meta name="viewport" content="width=device-width, initial-scale=1.0"> - <meta http-equiv="X-UA-Compatible" content="ie=edge"> - <link rel="stylesheet" href="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/css/admin.css"> - <link rel="stylesheet" href="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/css/fonts-import.css"> - <link rel="stylesheet" href="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/css/ui.css"> - <link rel="stylesheet" href="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/css/alerts.css"> - <link rel="stylesheet" href="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/css/codename.css"> - <link rel="stylesheet" href="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/css/ajax.css"> - <link href="<?= $_MD_INCLUDES ?>/material-components-web.min.css" rel="stylesheet"> - <script src="<?= $_MD_INCLUDES ?>/material-components-web.min.js"></script> - <link rel="stylesheet" href="<?= $_MDI_PATH ?>"> - <?php - echo('<link rel="stylesheet" href="' . $GLOBALS["SYSTEM_ROOT"] . '/cms-special/admin-v2/$resources/index-dark.css">'); - ?> - <title><?php - - if ($ready) { - echo($lang["login"]["login"] . " - " . $lang["login"]["title"] . " - " . file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/sitename")); - } else { - echo("Neutron"); - } - - ?></title> - <?php - if (!$ready) { - require $_SERVER['DOCUMENT_ROOT'] . "/api/electrode/quit.php";quit("<script>location.href = '{$GLOBALS["SYSTEM_ROOT"]}/cms-special/setup';</script></head>"); - } - ?> - <?php require_once $_SERVER['DOCUMENT_ROOT'] . "/resources/private/headers/documenthead.php"; ?> - <script> - - window.onerror = () => { - location.href = "<?= $GLOBALS["SYSTEM_ROOT"] ?>/cms-special/admin-v2/login-old"; - } - - </script> -</head> -<body id="login"> - <?php require_once $_SERVER['DOCUMENT_ROOT'] . "/resources/private/headers/documentbody.php"; ?> - <div id="loader" style="backdrop-filter: blur(10px);display:none;z-index:99;"> - <svg class="spinner" width="48px" height="48px" viewBox="0 0 66 66" xmlns="http://www.w3.org/2000/svg"> - <circle class="path" fill="none" stroke-width="6" stroke-linecap="round" cx="33" cy="33" r="30"></circle> - </svg> - </div> - <div id="admin"> - <main class="main-content" id="main-content"> - <div class="content"> - <div class="inner"> - <img src="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/upload/siteicon.png" style="border-radius:100%;" class="intro-element"> - <h2><?= file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/sitename"); ?></h2> - - <div id="loginwith"> - <button class="mdc-button mdc-button--raised" id="loginwith-password" onclick="disableAuthKey();"> - <div class="mdc-button__ripple"></div> - <i class="material-icons-outlined mdc-button__icon" aria-hidden="true">vpn_key</i> - <span class="mdc-button__label"><?= $lang["admin-login"]["modes"][0] ?></span> - </button> - <?php if (file_exists($GLOBALS["ORIGINAL_DOCUMENT_ROOT"] . "/NeutronCloud") && is_file($GLOBALS["ORIGINAL_DOCUMENT_ROOT"] . "/NeutronCloud")): ?> - <button onclick="window.parent.location.href='https://admin.minteck.org/NeutronManage/?_='+location.pathname.split('/')[1];" class="mdc-button mdc-button--outlined" id="loginwith-authkey"> - <div class="mdc-button__ripple"></div> - <i class="material-icons-outlined mdc-button__icon" aria-hidden="true">admin_panel_settings</i> - <span class="mdc-button__label">Cloud Admin Console</span> - </button> - <?php else: ?> - <button class="mdc-button mdc-button--outlined" id="loginwith-authkey" <?php if (!file_exists($_SERVER['DOCUMENT_ROOT'] . "/data/authkey")) { echo("disabled"); } else { echo('onclick="enableAuthKey();"'); } ?>> - <div class="mdc-button__ripple"></div> - <i class="material-icons-outlined mdc-button__icon" aria-hidden="true">fingerprint</i> - <span class="mdc-button__label"><?= $lang["admin-login"]["modes"][1] ?></span> - </button> - <?php endif; ?> - </div> - <script>useAuthKey = false;</script> - - <div id="login-password"> - <div class="nd_Field fallback nd_Field_input" id="searchbox"> - <input id="password-box" type="password" placeholder="<?= $lang["admin-login"]["password"] ?>" spellcheck="false" autocomplete="off"> - </div> - </div> - - <div id="login-authkey" style="display:none;"> - <div class="nd_Field fallback nd_Field_input" id="searchbox"> - <input id="authkey-box" type="password" placeholder="<?= $lang["admin-login"]["key"] ?>" spellcheck="false" autocomplete="off"> - </div> - </div> - - <button class="mdc-button mdc-button--raised" id="loginwith-password" onclick="loginConfirm();"> - <div class="mdc-button__ripple"></div> - <span class="mdc-button__label"><?= $lang["admin-login"]["confirm"] ?></span> - </button> - - <p> - <small id="links"> - <a onclick="window.parent.location.href = '<?= $GLOBALS["SYSTEM_ROOT"] ?>/';" class="sblink"> - <?= $lang["admin-login"]["back"] ?></a> - - <a onclick="window.open('<?= file_get_contents($_SERVER['DOCUMENT_ROOT'] . '/api/bugs') ?>');" target="_blank" class="sblink"> - <?= $lang["admin-login"]["report"] ?></a> - - <a onclick="window.open('<?= file_get_contents($_SERVER['DOCUMENT_ROOT'] . '/api/public') ?>');" class="sblink"> - <?= $lang["admin-login"]["branding"] ?></a> - </small> - </p> - </div> - </div> - </main> - </div> -</body> - -<script> - function alert(message) { - alert_full(message); - } - - function enableAuthKey() { - useAuthKey = true; - document.getElementById('loginwith-authkey').classList.remove('mdc-button--outlined'); - document.getElementById('loginwith-authkey').classList.add('mdc-button--raised'); - document.getElementById('loginwith-password').classList.remove('mdc-button--raised'); - document.getElementById('loginwith-password').classList.add('mdc-button--outlined'); - document.getElementById('login-password').style.display = "none"; - document.getElementById('login-authkey').style.display = ""; - document.getElementById('password-box').value = ""; - document.getElementById('authkey-box').value = ""; - document.getElementById('authkey-box').focus(); - } - - function disableAuthKey() { - useAuthKey = false; - document.getElementById('loginwith-authkey').classList.add('mdc-button--outlined'); - document.getElementById('loginwith-authkey').classList.remove('mdc-button--raised'); - document.getElementById('loginwith-password').classList.add('mdc-button--raised'); - document.getElementById('loginwith-password').classList.remove('mdc-button--outlined'); - document.getElementById('login-password').style.display = ""; - document.getElementById('login-authkey').style.display = "none"; - document.getElementById('password-box').value = ""; - document.getElementById('authkey-box').value = ""; - document.getElementById('password-box').focus(); - } - - function loginConfirm() { - $("#loader").fadeIn(200); - var formData = new FormData(); - if (useAuthKey) { - formData.append("password", document.getElementById('authkey-box').value); - formData.append("authkey", "1"); - } else { - formData.append("password", document.getElementById('password-box').value); - } - $.ajax({ - type: "POST", - dataType: 'html', - url: "<?= $GLOBALS["SYSTEM_ROOT"] ?>/api/admin/login.php", - success: function (data) { - $("#loader").fadeOut(200); - if (data == "ok") { - location.href = "<?= $callback ?>"; - } else { - alert(data) - } - }, - error: function (error) { - $("#loader").fadeOut(200); - alert("<?= $lang["admin-errors"]["connerror"] ?>") - }, - data: formData, - cache: false, - contentType: false, - processData: false - }); - } -</script> -</html>
\ No newline at end of file diff --git a/Neutron-trunk/cms-special/admin-v2/logout/index.php b/Neutron-trunk/cms-special/admin-v2/logout/index.php deleted file mode 100644 index 12c5319..0000000 --- a/Neutron-trunk/cms-special/admin-v2/logout/index.php +++ /dev/null @@ -1,15 +0,0 @@ -<?php require_once "../../../resources/private/relative.php"; getRelativeDetails("cms-special"); ?> -<?php - -if (isset($_COOKIE['_NEUTRON_ADMIN_TOKEN']) && $_COOKIE['_NEUTRON_ADMIN_TOKEN'] != "." && $_COOKIE['_NEUTRON_ADMIN_TOKEN'] != ".." && $_COOKIE['_NEUTRON_ADMIN_TOKEN'] != "/" && strpos($_COOKIE['_NEUTRON_ADMIN_TOKEN'], "/") === false) { - if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/data/tokens/" . $_COOKIE['_NEUTRON_ADMIN_TOKEN'])) { - $tokens = scandir($_SERVER['DOCUMENT_ROOT'] . "/data/tokens"); - foreach ($tokens as $token) { - if ($token == "." || $token == "..") {} else { - unlink($_SERVER['DOCUMENT_ROOT'] . "/data/tokens/" . $token); - } - } - } -} -header("Location: {$GLOBALS["SYSTEM_ROOT"]}/cms-special/admin-v2/login"); -require $_SERVER['DOCUMENT_ROOT'] . "/api/electrode/quit.php";quit();
\ No newline at end of file diff --git a/Neutron-trunk/cms-special/admin-v2/logs/index.php b/Neutron-trunk/cms-special/admin-v2/logs/index.php deleted file mode 100644 index 1bb62df..0000000 --- a/Neutron-trunk/cms-special/admin-v2/logs/index.php +++ /dev/null @@ -1,17 +0,0 @@ -<?php require_once "../../../resources/private/relative.php"; getRelativeDetails("cms-special"); ?> -<?php $pageConfig = [ "domName" => "Historique d'activité", "headerName" => "Historique d'activité" ]; require_once $_SERVER['DOCUMENT_ROOT'] . "/cms-special/admin-v2/\$resources/precontent.php"; ?> - <div id="logs"> - <?php - - if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/system.log")) { - $file = file($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/system.log"); - for ($i = max(0, count($file)-100); $i < count($file); $i++) { - echo $file[$i] . "<br>"; - } - } else { - echo($lang["admin-logs"]["nothing"][0] . "<br><br>" . $lang["admin-logs"]["nothing"][1]); - } - - ?> - </div><br><br> -<?php require_once $_SERVER['DOCUMENT_ROOT'] . "/cms-special/admin-v2/\$resources/postcontent.php"; ?>
\ No newline at end of file diff --git a/Neutron-trunk/cms-special/admin-v2/pages/add/index.php b/Neutron-trunk/cms-special/admin-v2/pages/add/index.php deleted file mode 100644 index 823d9d4..0000000 --- a/Neutron-trunk/cms-special/admin-v2/pages/add/index.php +++ /dev/null @@ -1,145 +0,0 @@ -<?php require_once "../../../../resources/private/relative.php"; getRelativeDetails("cms-special"); ?> -<?php $pageConfig = [ "domName" => "Nouvelle page - Pages", "headerName" => "Nouvelle page" ]; require_once $_SERVER['DOCUMENT_ROOT'] . "/cms-special/admin-v2/\$resources/precontent.php"; ?> - <p> - <form name="settings"> - <div class="nd_Field nd_Field_input nd_Field__centered" id="namebox"> - <input id="name" name="name" type="text" placeholder="<?= $lang["admin-pages"]["pagename"] ?>" spellcheck="false" autocomplete="off"> - <label for="name"><?= $lang["admin-pages"]["pagename"] ?></label> - </div><br> - <input style="display:none;" type="radio" id="type-visual" value="visual" onchange="switchEditor()" name="type" checked> - <input style="display:none;" type="radio" id="type-html" onchange="switchEditor()" value="html" name="type"> - <div style="text-align: center;"><div id="ptype-visual" class="mdc-card mdc-card--outlined mdc-card--selected" onclick="document.getElementsByName('type')[0].value = 'visual';switchEditor();" style="width:256px;margin:10px;display:inline-block;"> - <div class="mdc-card__primary-action" tabindex="0" style="padding:0;"> - <div class="mdc-card-wrapper__text-section" style="padding-left:5px;padding-right:5px;"> - <h2 style="margin-bottom:5px;" class="mdc-typography mdc-typography--headline6"><?= $lang["admin-pages"]["editors"][0] ?></h2> - <h3 style="margin-top:5px;" class="mdc-typography mdc-typography--subtitle2"><?= $lang["admin-pages"]["editordescs"][0] ?></h3> - </div> - </div> - </div> - <div id="ptype-html" class="mdc-card mdc-card--outlined" onclick="document.getElementsByName('type')[0].value = 'html';switchEditor();" style="width:256px;margin:10px;display:inline-block;"> - <div class="mdc-card__primary-action" tabindex="0" style="padding:0;"> - <div class="mdc-card-wrapper__text-section" style="padding-left:5px;padding-right:5px;"> - <h2 style="margin-bottom:5px;" class="mdc-typography mdc-typography--headline6"><?= $lang["admin-pages"]["editors"][1] ?></h2> - <h3 style="margin-top:5px;" class="mdc-typography mdc-typography--subtitle2"><?= $lang["admin-pages"]["editordescs"][1] ?></h3> - </div> - </div> - </div></div> - </form> - </p> - <div id="editing"><div id="editor-visual"> - <?php - require_once $_SERVER['DOCUMENT_ROOT'] . "/resources/private/VisualEditor$2.php"; - ?></div> - <div id="editor-html" class="hide"> - <?php require_once $_SERVER['DOCUMENT_ROOT'] . "/resources/private/CodeEditor$2.php" ?> - </div> - </div> - <div class="hide" id="loader" style="text-align: center;"><img src="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/image/loader.svg" class="loader"></div> -<?php require_once $_SERVER['DOCUMENT_ROOT'] . "/cms-special/admin-v2/\$resources/postcontent.php"; ?> - -<script> - window.onbeforeunload = function (e) { - e = e || window.event; - - // For IE and Firefox prior to version 4 - if (e) { - e.returnValue = "<?= $lang["admin-pages"]["quitwarn"] ?>"; - } - - // For Safari - return "<?= $lang["admin-pages"]["quitwarn"] ?>"; - }; -</script> - -<script> - -function createPageVisual() { - Array.from(document.getElementsByTagName('input')).forEach((el) => {el.disabled = true}) - document.getElementById('loader').classList.remove('hide') - document.getElementById('editing').classList.add('hide') - var formData = new FormData(); - formData.append("title", document.getElementById('name').value); - formData.append("type", "0"); - formData.append("content", editor.getData()); - $.ajax({ - type: "POST", - dataType: 'html', - url: "<?= $GLOBALS["SYSTEM_ROOT"] ?>/api/admin/create_page.php", - success: function (data) { - if (data == "ok") { - location.href = "<?= $GLOBALS["SYSTEM_ROOT"] ?>/cms-special/admin-v2/pages"; - } else { - alert("<?= $lang["admin-errors"]["errorprefix"] ?>" + data) - Array.from(document.getElementsByTagName('input')).forEach((el) => {el.disabled = false}) - document.getElementById('loader').classList.add('hide') - document.getElementById('editing').classList.remove('hide') - } - }, - error: function (error) { - alert("<?= $lang["admin-errors"]["connerror"] ?>") - document.getElementById('loader').classList.add('hide') - document.getElementById('editing').classList.remove('hide') - }, - data: formData, - cache: false, - contentType: false, - processData: false - }); -} - -function createPageVisualNoBack() { - Array.from(document.getElementsByTagName('input')).forEach((el) => {el.disabled = true}) - document.getElementById('loader').classList.remove('hide') - document.getElementById('editing').classList.add('hide') - var formData = new FormData(); - formData.append("title", document.getElementById('name').value); - formData.append("type", "0"); - formData.append("content", editor.getData()); - $.ajax({ - type: "POST", - dataType: 'html', - url: "<?= $GLOBALS["SYSTEM_ROOT"] ?>/api/admin/create_page.php", - success: function (data) { - if (data == "ok") { - alert("<?= $lang["admin-pages"]["saved"] ?>"); - Array.from(document.getElementsByTagName('input')).forEach((el) => {el.disabled = false}) - document.getElementById('loader').classList.add('hide') - document.getElementById('editing').classList.remove('hide') - } else { - alert("<?= $lang["admin-errors"]["errorprefix"] ?>" + data) - Array.from(document.getElementsByTagName('input')).forEach((el) => {el.disabled = false}) - document.getElementById('loader').classList.add('hide') - document.getElementById('editing').classList.remove('hide') - } - }, - error: function (error) { - alert("<?= $lang["admin-errors"]["connerror"] ?>") - document.getElementById('loader').classList.add('hide') - document.getElementById('editing').classList.remove('hide') - }, - data: formData, - cache: false, - contentType: false, - processData: false - }); -} - -function switchEditor() { - if (document.forms['settings'].type.value == "visual") { - document.getElementById('editor-visual').classList.remove('hide') - document.getElementById('editor-html').classList.add('hide') - document.getElementById('ptype-html').classList.remove('mdc-card--selected'); - document.getElementById('ptype-visual').classList.add('mdc-card--selected'); - } else { - document.getElementById('editor-visual').classList.add('hide') - document.getElementById('editor-html').classList.remove('hide') - document.getElementById('ptype-visual').classList.remove('mdc-card--selected'); - document.getElementById('ptype-html').classList.add('mdc-card--selected'); - loadAce() - } - document.body.focus(); -} - -document.forms['settings'].type.value = "visual" - -</script>
\ No newline at end of file diff --git a/Neutron-trunk/cms-special/admin-v2/pages/delete/index.php b/Neutron-trunk/cms-special/admin-v2/pages/delete/index.php deleted file mode 100644 index 964c208..0000000 --- a/Neutron-trunk/cms-special/admin-v2/pages/delete/index.php +++ /dev/null @@ -1,88 +0,0 @@ -<?php require_once "../../../../resources/private/relative.php"; getRelativeDetails("cms-special"); ?> -<?php - -if (isset($_GET['slug'])) { - $currentSlug = $_GET['slug']; - if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/pages/" . $currentSlug)) {} else { - header("Location: /cms-special/admin-v2/pages"); - require $_SERVER['DOCUMENT_ROOT'] . "/api/electrode/quit.php";quit(); - } -} else { - header("Location: /cms-special/admin-v2/pages"); - require $_SERVER['DOCUMENT_ROOT'] . "/api/electrode/quit.php";quit(); -} - -?> -<?php $pageConfig = [ "domName" => "Pages", "headerName" => "Pages" ]; require_once $_SERVER['DOCUMENT_ROOT'] . "/cms-special/admin-v2/\$resources/precontent.php"; ?> -<?php - -if ($currentSlug == "index") { - $currentName = "{$lang["admin-pages"]["home"]}"; - echo("<script>page = \"index\"</script>"); -} else { - $currentName = file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/" . $currentSlug . "/pagename"); - echo("<script>page = \"{$currentSlug}\"</script>"); -} - -?> - <div id="confirm"> - <div style="text-align:center;"> - <p><?= $lang["admin-pages"]["deletec"][0] . $currentName . $lang["admin-pages"]["deletec"][1] ?></p> - <?php - - if ($currentSlug == "index") { - require $_SERVER['DOCUMENT_ROOT'] . "/api/electrode/quit.php";quit("<i>{$lang["admin-pages"]["deletec"][2]}</i></div></body></html>"); - } - - ?> - <!--<ul> - <li><a onclick="deletePage()" class="sblink" title="<?= $lang["admin-pages"]["deleteyl"] ?>"><?= $lang["admin-pages"]["deletey"] ?></a></li> - <li><a onclick="location.href='/cms-special/admin-v2/pages/manage/?slug=<?= $currentSlug ?>'" class="sblink" title="<?= $lang["admin-pages"]["deletenl"] ?>"><?= $lang["admin-pages"]["deleten"] ?></a></li> - </ul>--> - <a title="<?= $lang["admin-pages"]["deletenl"] ?>" onclick="location.href='/cms-special/admin-v2/pages';" class="mdc-button mdc-button--raised"> - <div class="mdc-button__ripple"></div> - <span class="mdc-button__label"><?= $lang["admin-pages"]["deleten"] ?></span> - </a> - <a title="<?= $lang["admin-pages"]["deleteyl"] ?>" onclick="deletePage();" class="mdc-button mdc-button--outlined"> - <div class="mdc-button__ripple"></div> - <span class="mdc-button__label"><?= $lang["admin-pages"]["deletey"] ?></span> - </a> - </div> - </div> - <div class="hide" id="loader" style="text-align: center;"><img src="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/image/loader.svg" class="loader"> - </div> -<?php require_once $_SERVER['DOCUMENT_ROOT'] . "/cms-special/admin-v2/\$resources/postcontent.php"; ?> - -<script> - -function deletePage() { - document.getElementById('confirm').classList.add('hide') - document.getElementById('loader').classList.remove('hide') - var formData = new FormData(); - formData.append("page", "<?= $currentSlug ?>"); - $.ajax({ - type: "POST", - dataType: 'html', - url: "<?= $GLOBALS["SYSTEM_ROOT"] ?>/api/admin/delete_page.php", - success: function (data) { - if (data == "ok") { - location.href = "<?= $GLOBALS["SYSTEM_ROOT"] ?>/cms-special/admin-v2/pages"; - } else { - alert("<?= $lang["admin-errors"]["errorprefix"] ?>" + data) - document.getElementById('loader').classList.add('hide') - document.getElementById('confirm').classList.remove('hide') - } - }, - error: function (error) { - alert("<?= $lang["admin-errors"]["connerror"] ?>") - document.getElementById('loader').classList.add('hide') - document.getElementById('confirm').classList.remove('hide') - }, - data: formData, - cache: false, - contentType: false, - processData: false - }); -} - -</script>
\ No newline at end of file diff --git a/Neutron-trunk/cms-special/admin-v2/pages/edit/index.php b/Neutron-trunk/cms-special/admin-v2/pages/edit/index.php deleted file mode 100644 index 3044904..0000000 --- a/Neutron-trunk/cms-special/admin-v2/pages/edit/index.php +++ /dev/null @@ -1,194 +0,0 @@ -<?php require_once "../../../../resources/private/relative.php"; getRelativeDetails("cms-special"); ?> -<?php - -if (isset($_GET['slug'])) { - $currentSlug = $_GET['slug']; - if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/pages/" . $currentSlug)) {} else { - header("Location: /cms-special/admin-v2/pages"); - require $_SERVER['DOCUMENT_ROOT'] . "/api/electrode/quit.php";quit(); - } -} else { - header("Location: /cms-special/admin-v2/pages"); - require $_SERVER['DOCUMENT_ROOT'] . "/api/electrode/quit.php";quit(); -} - -?> -<?php $pageConfig = [ "domName" => "Pages", "headerName" => "Pages" ]; require_once $_SERVER['DOCUMENT_ROOT'] . "/cms-special/admin-v2/\$resources/precontent.php"; ?> - <div id="editing"> - <?php - - if ($currentSlug == "index") { - $currentName = "{$lang["admin-pages"]["home"]}"; - echo("<script>page = \"index\"</script>"); - } else { - $currentName = file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/" . $currentSlug . "/pagename"); - echo("<script>page = \"{$currentSlug}\"</script>"); - } - - $type = file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/pagetypes/" . $currentSlug); - if (isset($_GET['forcehtml'])) { - $type = "1"; - } - if ($type == "0") { - require_once $_SERVER['DOCUMENT_ROOT'] . "/resources/private/VisualEditor.php"; - } - if ($type == "1"): - - ?> - <p><table class="message_warning"><tbody><tr><td><img src="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/image/message_warning.svg" class="message_img"></td><td style="width:100%;"><p><?= $lang["admin-pages"]["htmlw"][0] ?></p><p><?= $lang["admin-pages"]["htmlw"][1] ?></p></td></tr></tbody></table></p> - <?php - - require_once $_SERVER['DOCUMENT_ROOT'] . "/resources/private/CodeEditor.php"; - endif; - - ?> - </div> - <div class="hide" id="loader" style="text-align: center;"><img src="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/image/loader.svg" class="loader"></div> -<?php require_once $_SERVER['DOCUMENT_ROOT'] . "/cms-special/admin-v2/\$resources/postcontent.php"; ?> - -<script> - window.onbeforeunload = function (e) { - e = e || window.event; - - // For IE and Firefox prior to version 4 - if (e) { - e.returnValue = "<?= $lang["admin-pages"]["quitwarn"] ?>"; - } - - // For Safari - return "<?= $lang["admin-pages"]["quitwarn"] ?>"; - }; -</script> - -<script> - -function updatePage() { - document.getElementById('loader').classList.remove('hide') - document.getElementById('editing').classList.add('hide') - var formData = new FormData(); - formData.append("title", "<?= $currentSlug ?>"); - formData.append("content", editor.getData()); - $.ajax({ - type: "POST", - dataType: 'html', - url: "<?= $GLOBALS["SYSTEM_ROOT"] ?>/api/admin/edit_page.php", - success: function (data) { - if (data == "ok") { - window.onbeforeunload = null; - location.href = "<?= $GLOBALS["SYSTEM_ROOT"] ?>/cms-special/admin-v2/pages"; - } else { - alert("<?= $lang["admin-errors"]["errorprefix"] ?>" + data) - document.getElementById('loader').classList.add('hide') - document.getElementById('editing').classList.remove('hide') - } - }, - error: function (error) { - alert("<?= $lang["admin-errors"]["connerror"] ?>") - document.getElementById('loader').classList.add('hide') - document.getElementById('editing').classList.remove('hide') - }, - data: formData, - cache: false, - contentType: false, - processData: false - }); -} - -function updatePageNoBack() { - document.getElementById('loader').classList.remove('hide') - document.getElementById('editing').classList.add('hide') - var formData = new FormData(); - formData.append("title", "<?= $currentSlug ?>"); - formData.append("content", editor.getData()); - $.ajax({ - type: "POST", - dataType: 'html', - url: "<?= $GLOBALS["SYSTEM_ROOT"] ?>/api/admin/edit_page.php", - success: function (data) { - if (data == "ok") { - alert("<?= $lang["admin-pages"]["saved"] ?>"); - document.getElementById('loader').classList.add('hide') - document.getElementById('editing').classList.remove('hide') - } else { - alert("<?= $lang["admin-errors"]["errorprefix"] ?>" + data) - document.getElementById('loader').classList.add('hide') - document.getElementById('editing').classList.remove('hide') - } - }, - error: function (error) { - alert("<?= $lang["admin-errors"]["connerror"] ?>") - document.getElementById('loader').classList.add('hide') - document.getElementById('editing').classList.remove('hide') - }, - data: formData, - cache: false, - contentType: false, - processData: false - }); -} - -function updatePageHTMLNoBack() { - document.getElementById('loader').classList.remove('hide') - document.getElementById('editing').classList.add('hide') - var formData = new FormData(); - formData.append("title", "<?= $currentSlug ?>"); - formData.append("content", ace.edit("editor").getValue()); - $.ajax({ - type: "POST", - dataType: 'html', - url: "<?= $GLOBALS["SYSTEM_ROOT"] ?>/api/admin/edit_page.php", - success: function (data) { - if (data == "ok") { - alert("<?= $lang["admin-pages"]["saved"] ?>"); - document.getElementById('loader').classList.add('hide') - document.getElementById('editing').classList.remove('hide') - } else { - alert("<?= $lang["admin-errors"]["errorprefix"] ?>" + data) - document.getElementById('loader').classList.add('hide') - document.getElementById('editing').classList.remove('hide') - } - }, - error: function (error) { - alert("<?= $lang["admin-errors"]["connerror"] ?>") - document.getElementById('loader').classList.add('hide') - document.getElementById('editing').classList.remove('hide') - }, - data: formData, - cache: false, - contentType: false, - processData: false - }); -} - -function updatePageHTML() { - document.getElementById('loader').classList.remove('hide') - document.getElementById('editing').classList.add('hide') - var formData = new FormData(); - formData.append("title", "<?= $currentSlug ?>"); - formData.append("content", ace.edit("editor").getValue()); - $.ajax({ - type: "POST", - dataType: 'html', - url: "<?= $GLOBALS["SYSTEM_ROOT"] ?>/api/admin/edit_page.php", - success: function (data) { - if (data == "ok") { - location.href = "<?= $GLOBALS["SYSTEM_ROOT"] ?>/cms-special/admin-v2/pages"; - } else { - alert("<?= $lang["admin-errors"]["errorprefix"] ?>" + data) - document.getElementById('loader').classList.add('hide') - document.getElementById('editing').classList.remove('hide') - } - }, - error: function (error) { - alert("<?= $lang["admin-errors"]["connerror"] ?>") - document.getElementById('loader').classList.add('hide') - document.getElementById('editing').classList.remove('hide') - }, - data: formData, - cache: false, - contentType: false, - processData: false - }); -} - -</script>
\ No newline at end of file diff --git a/Neutron-trunk/cms-special/admin-v2/pages/index.php b/Neutron-trunk/cms-special/admin-v2/pages/index.php deleted file mode 100644 index 71b55db..0000000 --- a/Neutron-trunk/cms-special/admin-v2/pages/index.php +++ /dev/null @@ -1,66 +0,0 @@ -<?php require_once "../../../resources/private/relative.php"; getRelativeDetails("cms-special"); ?> -<?php $pageConfig = [ "domName" => "Pages", "headerName" => "Gestionnaire de pages" ]; require_once $_SERVER['DOCUMENT_ROOT'] . "/cms-special/admin-v2/\$resources/precontent.php"; ?> - - <div class="admin-pages-list"> - <?php - - $pages = scandir($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/pages/"); - $sizetotal = 0; - foreach ($pages as $page) { - if ($page != "." && $page != "..") { - $type = file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/pagetypes/" . $page); - $size = filesize($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/pages/" . $page); - if ($size > 1024) { - if ($size > 1048576) { - $sizestr = round($size / 1048576, 2) . " " . $lang["sizes"]["mib"]; - } else { - $sizestr = round($size / 1024, 2) . " " . $lang["sizes"]["kib"]; - } - } else { - $sizestr = $size . " " . $lang["sizes"]["bytes"]; - } - $sizetotal = $sizetotal + $size; - $sizestr = str_replace(".", ",", $sizestr); - if ($page == "index"): ?> -<!-- echo("<li><a href='/cms-special/admin-v2/pages/manage/?slug={$page}' class='sblink' title='{$lang['admin-pages']['lore']}'>{$lang['admin-pages']['home']}</a> ({$page}), {$typestr}, {$sizestr}</li>");--> - <div class="mdc-card mdc-card--outlined" style="width:256px;margin:10px;display:inline-block;"> - <div class="mdc-card-wrapper__text-section" style="padding-left:5px;padding-right:5px;"> - <h2 style="margin-bottom:5px;white-space: nowrap;overflow: hidden !important;text-overflow: ellipsis;" class="mdc-typography mdc-typography--headline6"><?= $lang["admin-pages"]["home"] ?></h2> - <h3 style="margin-top:5px;" class="mdc-typography mdc-typography--subtitle2"><?php $text = strip_tags(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/pages/" . $page));if (strlen($text)>100){echo(substr($text,0,100) . " …");}else{echo($text);} ?></h3> - </div><br><br> - <div class="mdc-card__actions mdc-card__actions-pages-list"> - <a href="<?= $GLOBALS["SYSTEM_ROOT"] ?>/cms-special/admin-v2/pages/edit/?slug=<?= $page ?>" title="<?= $lang["admin-pages"]["editl"] ?>" class="mdc-button mdc-card__action mdc-card__action--button"> - <div class="mdc-button__ripple"></div> - <span class="mdc-button__label"><?= $lang["admin-pages"]["edit"] ?></span> - </a> - <a href="<?= $GLOBALS["SYSTEM_ROOT"] ?>/cms-special/admin-v2/pages/edit/?slug=<?= $page ?>&forcehtml" class="material-icons mdc-icon-button mdc-card__action mdc-card__action--icon mdi-icbtn-card" title="<?= $lang["admin-pages"]["editcode"] ?>">code</a> - </div> - </div> - <?php else: ?> - <div class="mdc-card mdc-card--outlined" style="width:256px;margin:10px;display:inline-block;"> - <div class="mdc-card-wrapper__text-section" style="padding-left:5px;padding-right:5px;"> - <h2 style="margin-bottom:5px;white-space: nowrap;overflow: hidden !important;text-overflow: ellipsis;" class="mdc-typography mdc-typography--headline6"><?= file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/" . $page . "/pagename") ?></h2> - <h3 style="margin-top:5px;" class="mdc-typography mdc-typography--subtitle2"><?php $text = strip_tags(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/pages/" . $page));if (strlen($text)>100){echo(substr($text,0,100) . " …");}else{echo($text);} ?></h3> - </div><br><br> - <div class="mdc-card__actions mdc-card__actions-pages-list"> - <a href="<?= $GLOBALS["SYSTEM_ROOT"] ?>/cms-special/admin-v2/pages/edit/?slug=<?= $page ?>" title="<?= $lang["admin-pages"]["editl"] ?>" class="mdc-button mdc-card__action mdc-card__action--button"> - <div class="mdc-button__ripple"></div> - <span class="mdc-button__label"><?= $lang["admin-pages"]["edit"] ?></span> - </a> - <a href="<?= $GLOBALS["SYSTEM_ROOT"] ?>/cms-special/admin-v2/pages/rename/?slug=<?= $page ?>" class="material-icons mdc-icon-button mdc-card__action mdc-card__action--icon mdi-icbtn-card" title="<?= $lang["admin-pages"]["renamel"] ?>">create</a> - <a href="<?= $GLOBALS["SYSTEM_ROOT"] ?>/cms-special/admin-v2/pages/delete/?slug=<?= $page ?>" class="material-icons mdc-icon-button mdc-card__action mdc-card__action--icon mdi-icbtn-card" title="<?= $lang["admin-pages"]["deletel"] ?>">delete</a> - </div> - </div> - <?php endif; - } - } - ?> - </div> - <p><div style="text-align: center;"> - <a title="<?= $lang["admin-pages"]["alore"] ?>" href="<?= $GLOBALS["SYSTEM_ROOT"] ?>/cms-special/admin-v2/pages/add" class="mdc-button mdc-button--outlined"> - <div class="mdc-button__ripple"></div> - <i class="material-icons-outlined mdc-button__icon" aria-hidden="true">add</i> - <span class="mdc-button__label"><?= $lang["admin-pages"]["create"] ?></span> - </a> - </div></p> -<?php require_once $_SERVER['DOCUMENT_ROOT'] . "/cms-special/admin-v2/\$resources/postcontent.php"; ?>
\ No newline at end of file diff --git a/Neutron-trunk/cms-special/admin-v2/pages/rename/index.php b/Neutron-trunk/cms-special/admin-v2/pages/rename/index.php deleted file mode 100644 index cf7b67e..0000000 --- a/Neutron-trunk/cms-special/admin-v2/pages/rename/index.php +++ /dev/null @@ -1,89 +0,0 @@ -<?php require_once "../../../../resources/private/relative.php"; getRelativeDetails("cms-special"); ?> -<?php - -if (isset($_GET['slug'])) { - $currentSlug = $_GET['slug']; - if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/pages/" . $currentSlug)) {} else { - header("Location: /cms-special/admin-v2/pages"); - require $_SERVER['DOCUMENT_ROOT'] . "/api/electrode/quit.php";quit(); - } -} else { - header("Location: /cms-special/admin-v2/pages"); - require $_SERVER['DOCUMENT_ROOT'] . "/api/electrode/quit.php";quit(); -} - -?> -<?php $pageConfig = [ "domName" => "Pages", "headerName" => "Pages" ]; require_once $_SERVER['DOCUMENT_ROOT'] . "/cms-special/admin-v2/\$resources/precontent.php"; ?> -<?php - -if ($currentSlug == "index") { - $currentName = "{$lang["admin-pages"]["home"]}"; - echo("<script>page = \"index\"</script>"); -} else { - $currentName = file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/" . $currentSlug . "/pagename"); - echo("<script>page = \"{$currentSlug}\"</script>"); -} - -?> - <div id="confirm"> - <p><?= $lang["admin-pages"]["renamew"][0] . $currentName . $lang["admin-pages"]["renamew"][1] ?></p> - <?php - - if ($currentSlug == "index") { - require $_SERVER['DOCUMENT_ROOT'] . "/api/electrode/quit.php";quit("<i>{$lang["admin-pages"]["renamew"][2]}</i></div></body></html>"); - } - - ?> - <div class="nd_Field nd_Field_input nd_Field__centered nd_Field__disabled" id="onamebox"> - <input id="oldname" name="oldname" type="text" placeholder="<?= $lang["admin-pages"]["oname"] ?>" spellcheck="false" disabled autocomplete="off" value="<?= $currentName ?>"> - <label for="name"><?= $lang["admin-pages"]["oname"] ?></label> - </div><div class="nd_Field nd_Field_input nd_Field__centered" id="nnamebox"> - <input id="newname" name="newname" type="text" placeholder="<?= $lang["admin-pages"]["nname"] ?>" spellcheck="false" autocomplete="off" value="<?= $currentName ?>"> - <label for="name"><?= $lang["admin-pages"]["nname"] ?></label> - </div> - <p><div style="text-align: center;"> - <a title="<?= $lang["admin-pages"]["renamel2"] ?>" onclick="renamePage();" class="mdc-button mdc-button--raised"> - <div class="mdc-button__ripple"></div> - <i class="material-icons-outlined mdc-button__icon" aria-hidden="true">edit</i> - <span class="mdc-button__label"><?= $lang["admin-pages"]["rename2"] ?></span> - </a> - </div></p> - </div> - <div class="hide" id="loader" style="text-align: center;"><img src="/resources/image/loader.svg" class="loader"> - </div> -<?php require_once $_SERVER['DOCUMENT_ROOT'] . "/cms-special/admin-v2/\$resources/postcontent.php"; ?> - -<script> - -function renamePage() { - document.getElementById('confirm').classList.add('hide') - document.getElementById('loader').classList.remove('hide') - var formData = new FormData(); - formData.append("page", "<?= $currentSlug ?>"); - formData.append("newname", document.getElementById('newname').value); - $.ajax({ - type: "POST", - dataType: 'html', - url: "<?= $GLOBALS["SYSTEM_ROOT"] ?>/api/admin/rename_page.php", - success: function (data) { - if (data == "ok") { - location.href = "<?= $GLOBALS["SYSTEM_ROOT"] ?>/cms-special/admin-v2/pages"; - } else { - alert("<?= $lang["admin-errors"]["errorprefix"] ?>" + data) - document.getElementById('loader').classList.add('hide') - document.getElementById('confirm').classList.remove('hide') - } - }, - error: function (error) { - alert("<?= $lang["admin-errors"]["connerror"] ?>") - document.getElementById('loader').classList.add('hide') - document.getElementById('confirm').classList.remove('hide') - }, - data: formData, - cache: false, - contentType: false, - processData: false - }); -} - -</script>
\ No newline at end of file diff --git a/Neutron-trunk/cms-special/admin-v2/password/index.php b/Neutron-trunk/cms-special/admin-v2/password/index.php deleted file mode 100644 index 2ea9e60..0000000 --- a/Neutron-trunk/cms-special/admin-v2/password/index.php +++ /dev/null @@ -1,51 +0,0 @@ -<?php require_once "../../../resources/private/relative.php"; getRelativeDetails("cms-special"); ?> -<?php $loadEditor = false;$pageConfig = [ "domName" => "Apparence", "headerName" => "Apparence" ]; require_once $_SERVER['DOCUMENT_ROOT'] . "/cms-special/admin-v2/\$resources/precontent.php"; ?> - <h2><?= $lang["admin-appearance"]["password"] ?></h2> - <span id="password-error-box" class="hide"><div id="error"><span id="password-error"><?= $lang["admin-appearance"]["error"] ?></span></div></span> - <div id="password-settings" style="text-align: center;"> - <p><?= $lang["admin-appearance"]["oldpass"] ?> <input type="password" id="old-password" placeholder="<?= $lang["admin-appearance"]["secure"] ?>"></p> - <p><?= $lang["admin-appearance"]["newpass"] ?> <input type="password" id="new-password" placeholder="<?= $lang["admin-appearance"]["secure"] ?>"></p> - <p><?= $lang["admin-appearance"]["passrep"] ?> <input type="password" id="repeat-password" placeholder="<?= $lang["admin-appearance"]["secure"] ?>"></p> - <a onclick="changePassword()" class="button"><?= $lang["admin-appearance"]["change"] ?></a> - </div> - <div style="text-align: center;"><div id="password-loader" class="hide"><img src="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/image/loader.svg" class="loader"></div></div> -<?php require_once $_SERVER['DOCUMENT_ROOT'] . "/cms-special/admin-v2/\$resources/postcontent.php"; ?> - -<script> - -function changePassword() { - document.getElementById('password-loader').classList.remove('hide') - document.getElementById('password-settings').classList.add('hide') - var formData = new FormData(); - formData.append("oldpass", document.getElementById('old-password').value); - formData.append("newpass", document.getElementById('new-password').value); - formData.append("newpassr", document.getElementById('repeat-password').value); - document.getElementById('password-error-box').classList.add("hide") - $.ajax({ - type: "POST", - dataType: 'html', - url: "<?= $GLOBALS["SYSTEM_ROOT"] ?>/api/admin/password.php", - success: function (data) { - if (data == "ok") { - location.href = "<?= $GLOBALS["SYSTEM_ROOT"] ?>/cms-special/admin-v2/$panes/accounts.php"; - } else { - document.getElementById('password-error').innerHTML = data - document.getElementById('password-error-box').classList.remove("hide") - document.getElementById('password-loader').classList.add('hide') - document.getElementById('password-settings').classList.remove('hide') - } - }, - error: function (error) { - document.getElementById('password-error').innerHTML = "<?= $lang["admin-errors"]["connerror"] ?>" - document.getElementById('password-error-box').classList.remove("hide") - document.getElementById('password-loader').classList.add('hide') - document.getElementById('password-settings').classList.remove('hide') - }, - data: formData, - cache: false, - contentType: false, - processData: false - }); -} - -</script>
\ No newline at end of file diff --git a/Neutron-trunk/cms-special/admin-v2/plugins/index.php b/Neutron-trunk/cms-special/admin-v2/plugins/index.php deleted file mode 100644 index 2676076..0000000 --- a/Neutron-trunk/cms-special/admin-v2/plugins/index.php +++ /dev/null @@ -1,79 +0,0 @@ -<?php require_once "../../../resources/private/relative.php"; getRelativeDetails("cms-special"); ?> -<?php - -$pageConfig = [ "domName" => "Extensions", "headerName" => "Extensions" ]; require_once $_SERVER['DOCUMENT_ROOT'] . "/cms-special/admin-v2/\$resources/precontent.php"; ?> - <p><table class="message_info"><tbody><tr><td><img src="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/image/message_info.svg" class="message_img"></td><td style="width:100%;"><p><?= $lang["admin-plugins"]["newnotice"] ?></p></td></tr></tbody></table></p> - <?php - - $widgets = scandir($_SERVER['DOCUMENT_ROOT'] . "/widgets/"); - $json = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/widgets.json")); - foreach ($widgets as $widget) { - if ($widget != "." && $widget != ".." && $widget != ".htaccess") { - $config = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/widgets/" . $widget . "/feature.json")); - echo("<div class=\"widget\"><div id=\"header-{$widget}\" class=\"widget-header "); - if (array_search($widget, $json->list) === false) { - echo("disabled"); - } else { - echo("enabled"); - } - echo("\"><table><tbody><tr><td><label class=\"switch\"><input name=\"" . $widget . "\" type=\"checkbox\" onclick=\"updateWidgetStatus('" . $widget . "')\" onchange=\"updateWidgetStatus('" . $widget . "')\""); - if (array_search($widget, $json->list) === false) {} else { - echo(" checked"); - } - echo("><span class=\"slider round\"></span></label></td><td class=\"widget-header-info\"><b>" . getName($config) . "</b>"); - if (isset($config->config)) { - echo("<a href=\"" . $config->config . "\" title=\"" . $lang["admin-plugins"]["config"] . "\" class=\"configure_ext\"><img src=\"{$GLOBALS["SYSTEM_ROOT"]}/resources/image/ext-settings.svg\"></a>"); - } - echo("</td></tr></tbody></table></div><p>" . getDescription($config) . "</p>"); - echo("</div>"); - } - } - - ?> -<?php require_once $_SERVER['DOCUMENT_ROOT'] . "/cms-special/admin-v2/\$resources/postcontent.php"; ?> - -<script> - -function updateWidgetStatus(widget) { - checkbox = document.getElementsByName(widget)[0] - if (typeof checkbox == "undefined") {} else { - if (checkbox.checked) { - document.getElementById('header-' + widget).classList.remove('disabled'); - document.getElementById('header-' + widget).classList.add('enabled'); - } else { - document.getElementById('header-' + widget).classList.remove('enabled'); - document.getElementById('header-' + widget).classList.add('disabled'); - } - Array.from(document.getElementsByTagName('input')).forEach((el) => {el.disabled = true}) - - var formData = new FormData(); - formData.append("element", widget); - formData.append("value", checkbox.checked.toString()); - $.ajax({ - type: "POST", - dataType: 'html', - url: "<?= $GLOBALS["SYSTEM_ROOT"] ?>/api/admin/widgets.php", - success: function (data) { - if (data == "ok") { - alert("<?= $lang["admin-plugins"]["saved"] ?>"); - setTimeout(() => { - Array.from(document.getElementsByTagName('input')).forEach((el) => {el.disabled = false}) - }, 500) - } else { - alert("<?= $lang["admin-errors"]["errorprefix"] ?>" + data); - } - }, - error: function (error) { - alert("<?= $lang["admin-errors"]["connerror"] ?>"); - window.onbeforeunload = undefined; - }, - data: formData, - cache: false, - contentType: false, - processData: false - }); - - } -} - -</script>
\ No newline at end of file diff --git a/Neutron-trunk/cms-special/admin-v2/reset/index.php b/Neutron-trunk/cms-special/admin-v2/reset/index.php deleted file mode 100644 index 5c1471e..0000000 --- a/Neutron-trunk/cms-special/admin-v2/reset/index.php +++ /dev/null @@ -1,118 +0,0 @@ -<?php require_once "../../../resources/private/relative.php"; getRelativeDetails("cms-special"); ?> -<?php $pageConfig = [ "domName" => "Réinitialisation - Maintenance", "headerName" => "Réinitialisation" ]; require_once $_SERVER['DOCUMENT_ROOT'] . "/cms-special/admin-v2/\$resources/precontent.php"; ?> - <div id="page-confirm"> - <div style="text-align: center;"><p><?= $lang["admin-housekeeping"]["disclaimer"][0] ?><ul><li><?= $lang["admin-housekeeping"]["disclaimer"][1] ?></li><li><?= $lang["admin-housekeeping"]["disclaimer"][2] ?></li><li><?= $lang["admin-housekeeping"]["disclaimer"][3] ?></li><li><?= $lang["admin-housekeeping"]["disclaimer"][4] ?></li></ul></p> - <p><b><?= $lang["admin-housekeeping"]["confirm"] ?></b></p><input id="confirm" onkeyup="validate()" onkeydown="validate()" onchange="validate()" type="text" placeholder="<?= $lang["admin-housekeeping"]["confirmboxph"] ?>"></div> - <p><div style="text-align: center;"><a onclick="confirmPass()" id="reset-confirm" class="hide button-dangerous"><?= $lang["admin-housekeeping"]["confirmbutton"] ?></a></div></p> - </div> - <div id="page-select" class="hide"> - <?= $lang["admin-housekeeping"]["select"][0] ?> - <p><table class="message_warning"><tbody><tr><td><img src="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/image/message_warning.svg" class="message_img"></td><td style="width:100%;"><p><?= $lang["admin-housekeeping"]["select"][1] ?></p></td></tr></tbody></table></p> - <div class="reset-option" onclick="resetKeep()"> - <b><?= $lang["admin-housekeeping"]["select"][2] ?></b> - <p><?= $lang["admin-housekeeping"]["select"][3] ?></p> - </div> - <div class="reset-option" onclick="resetClear()"> - <b><?= $lang["admin-housekeeping"]["select"][4] ?></b> - <p><?= $lang["admin-housekeeping"]["select"][5] ?></p> - </div> - </div> - </div> - <div class="hide" id="resetbox-placeholder"> - <div id="resetbox" class="centered"> - <p><?= $lang["admin-housekeeping"]["select"][6] ?></p> - <div id="loader" style="text-align: center;"><img src="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/image/loader.svg" class="loader"></div> - <p><small><?= $lang["admin-housekeeping"]["select"][7] ?><br><span id="reset-message">-</span></small></p> - </div> -<?php require_once $_SERVER['DOCUMENT_ROOT'] . "/cms-special/admin-v2/\$resources/postcontent.php"; ?> - -<script> - -function resetKeep() { - document.getElementById('reset-message').innerHTML = "<?= $lang["admin-housekeeping"]["select"][2] ?>" - progressbox(true) - var formData = new FormData(); - formData.append("keep", "1"); - $.ajax({ - type: "POST", - dataType: 'html', - url: "<?= $GLOBALS["SYSTEM_ROOT"] ?>/api/admin/reset.php", - success: function (data) { - if (data == "ok") { - window.parent.location.href = "<?= $GLOBALS["SYSTEM_ROOT"] ?>/cms-special/admin-v2/resetted"; - } else { - alert("<?= $lang["admin-errors"]["errorprefix"] ?>" + data + "\n\n<?= $lang["admin-errors"]["housekeeping"][0] ?>") - Array.from(document.getElementsByTagName('input')).forEach((el) => {el.disabled = false}) - progressbox(false) - } - }, - error: function (error) { - alert("<?= $lang["admin-errors"]["connerror"] ?>\n\n<?= $lang["admin-errors"]["housekeeping"][1] ?>") - progressbox(false) - }, - data: formData, - cache: false, - contentType: false, - processData: false - }); -} - -function resetClear() { - document.getElementById('reset-message').innerHTML = "<?= $lang["admin-housekeeping"]["select"][4] ?>" - progressbox(true) - var formData = new FormData(); - formData.append("keep", "0"); - $.ajax({ - type: "POST", - dataType: 'html', - url: "<?= $GLOBALS["SYSTEM_ROOT"] ?>/api/admin/reset.php", - success: function (data) { - if (data == "ok") { - window.parent.location.href = "<?= $GLOBALS["SYSTEM_ROOT"] ?>/cms-special/admin-v2/resetted"; - } else { - alert("<?= $lang["admin-errors"]["errorprefix"] ?>" + data + "\n\n<?= $lang["admin-errors"]["housekeeping"][0] ?>") - Array.from(document.getElementsByTagName('input')).forEach((el) => {el.disabled = false}) - progressbox(false) - } - }, - error: function (error) { - alert("<?= $lang["admin-errors"]["connerror"] ?>\n\n<?= $lang["admin-errors"]["housekeeping"][1] ?>") - progressbox(false) - }, - data: formData, - cache: false, - contentType: false, - processData: false - }); -} - -function progressbox(toggle) { - if (typeof toggle != "boolean") { - throw new TypeError("Argument 1 expected to be boolean, " + typeof toggle + " given") - } else { - if (toggle) { - $('#resetbox-placeholder').fadeIn(200) - document.getElementById('settings').classList.add('blurred') - } else { - $('#resetbox-placeholder').fadeOut(200) - document.getElementById('settings').classList.remove('blurred') - } - } -} - -function confirmPass() { - document.getElementById('page-confirm').classList.add('hide') - document.getElementById('page-select').classList.remove('hide') -} - -function validate() { - if (document.getElementById('confirm').value == "<?= trim(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/sitename")) ?>") { - document.getElementById('reset-confirm').classList.remove('hide') - } else { - document.getElementById('reset-confirm').classList.add('hide') - } -} - -document.getElementById('confirm').value = "" - -</script> diff --git a/Neutron-trunk/cms-special/admin-v2/resetted/index.php b/Neutron-trunk/cms-special/admin-v2/resetted/index.php deleted file mode 100644 index 21fe104..0000000 --- a/Neutron-trunk/cms-special/admin-v2/resetted/index.php +++ /dev/null @@ -1,21 +0,0 @@ -<?php require_once "../../../resources/private/relative.php"; getRelativeDetails("cms-special"); ?> -<?php ob_start();echo("<!--\n\n" . str_replace('%year%', date('Y'), file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/resources/private/license")) . "\n\n-->") ?> - -<!DOCTYPE html> -<html lang="fr"> -<head> - <meta charset="UTF-8"> - <meta name="viewport" content="width=device-width, initial-scale=1.0"> - <meta http-equiv="X-UA-Compatible" content="ie=edge"> - <link rel="stylesheet" href="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/css/admin.css"> - <link rel="stylesheet" href="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/css/fonts-import.css"> - <link rel="stylesheet" href="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/css/ui.css"> - <title>Neutron</title> -</head> -<body> - <div id="settings" class="centered"> - <img src="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/image/resetted.png" height="64px" width="64px"> - <p><a href="<?= $GLOBALS["SYSTEM_ROOT"] ?>/" class="button">OK</a></p> - </div> -</body> -</html>
\ No newline at end of file diff --git a/Neutron-trunk/cms-special/admin-v2/stats/index.php b/Neutron-trunk/cms-special/admin-v2/stats/index.php deleted file mode 100644 index 28fd46d..0000000 --- a/Neutron-trunk/cms-special/admin-v2/stats/index.php +++ /dev/null @@ -1,280 +0,0 @@ -<?php require_once "../../../resources/private/relative.php"; getRelativeDetails("cms-special"); ?> -<?php $pageConfig = [ "domName" => "Statistiques", "headerName" => "Statistiques" ]; require_once $_SERVER['DOCUMENT_ROOT'] . "/cms-special/admin-v2/\$resources/precontent.php"; ?> -<?php if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/stats")) { echo("<h2>" . $lang["admin-stats"]["new"] . "</h2><p>" . $lang["admin-stats"]["notice"] . "</p>"); } ?> -<?php - -function gystat($year, $month, $showYear = false) { - global $lang; - - if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/newstats/" . $year . "/" . $month)) { - - $files = scandir($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/newstats/" . $year . "/" . $month); - $cmonth = 0; - foreach ($files as $file) { - if ($file != "." && $file != "..") { - $count = count(explode("\n", trim(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/newstats/" . $year . "/" . $month . "/" . $file)))); - if ($count > 0) { - $cmonth = $cmonth + $count; - } - } - } - - if ($cmonth > 0) { - if ($cmonth > 1) { - if ($showYear) { - echo("<tr><td><b>{$lang["admin-stats"]["months"][$month - 1]} {$year}{$lang["admin-stats"]["separator"]}</b></td><td> {$cmonth}</td><td> {$lang["admin-stats"]["visits2"]}</td></tr>"); - } else { - echo("<tr><td><b>{$lang["admin-stats"]["months"][$month - 1]}{$lang["admin-stats"]["separator"]}</b></td><td> {$cmonth}</td><td> {$lang["admin-stats"]["visits2"]}</td></tr>"); - } - } else { - if ($showYear) { - echo("<tr><td><b>{$lang["admin-stats"]["months"][$month - 1]} {$year}{$lang["admin-stats"]["separator"]}</b></td><td> {$cmonth}</td><td> {$lang["admin-stats"]["visit1"]}</td></tr>"); - } else { - echo("<tr><td><b>{$lang["admin-stats"]["months"][$month - 1]}{$lang["admin-stats"]["separator"]}</b></td><td> {$cmonth}</td><td> {$lang["admin-stats"]["visit1"]}</td></tr>"); - } - } - } - } -} - -?> -<h3><?= $lang["admin-stats"]["thisMonth"]?></h3> -<table> - <tbody> - <?php - - if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/newstats/" . date('Y') . "/" . date('m'))) { - $mtxt = $lang["admin-stats"]["monthslc"][date('m') - 1]; - - $files = scandir($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/newstats/" . date('Y') . "/" . date('m')); - foreach ($files as $file) { - if ($file != "." && $file != "..") { - $count = count(explode("\n", trim(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/newstats/" . date('Y') . "/" . date('m') . "/" . $file)))); - if ($count > 0) { - $day = (int)trim($file); - if ($count > 1) { - echo("<tr><td><b>{$day} {$mtxt}{$lang["admin-stats"]["separator"]}</b></td><td> {$count}</td><td> {$lang["admin-stats"]["visits2"]}</td></tr>"); - } else { - echo("<tr><td><b>{$day} {$mtxt}{$lang["admin-stats"]["separator"]}</b></td><td> {$count}</td><td> {$lang["admin-stats"]["visit1"]}</td></tr>"); - } - } - } - } - } - - ?> - </tbody> -</table> - -<h3><?= $lang["admin-stats"]["year"]?></h3> -<table> - <tbody> - <?php - - gystat(date('Y'), "01", false); - gystat(date('Y'), "02", false); - gystat(date('Y'), "03", false); - gystat(date('Y'), "04", false); - gystat(date('Y'), "05", false); - gystat(date('Y'), "06", false); - gystat(date('Y'), "07", false); - gystat(date('Y'), "08", false); - gystat(date('Y'), "09", false); - gystat(date('Y'), "10", false); - gystat(date('Y'), "11", false); - gystat(date('Y'), "12", false); - - ?> - </tbody> -</table> - -<h3><?= $lang["admin-stats"]["last2"]?><?= date('Y') - 1 ?></h3> -<table> - <tbody> - <?php - - gystat(date('Y') - 1, "1", true); - gystat(date('Y') - 1, "2", true); - gystat(date('Y') - 1, "3", true); - gystat(date('Y') - 1, "4", true); - gystat(date('Y') - 1, "5", true); - gystat(date('Y') - 1, "6", true); - gystat(date('Y') - 1, "7", true); - gystat(date('Y') - 1, "8", true); - gystat(date('Y') - 1, "9", true); - gystat(date('Y') - 1, "10", true); - gystat(date('Y') - 1, "11", true); - gystat(date('Y') - 1, "12", true); - - ?> - </tbody> -</table> - -<?php if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/stats")): ?> -<hr style="border-top:none;"> -<h2><?= $lang["admin-stats"]["old"] ?></h2> -<p><?= $lang["admin-stats"]["notice"] ?></p> - <h3><?= $lang["admin-stats"]["thisMonth"]?></h3> -<table><tbody><?php - -$dates = scandir($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/stats"); -foreach ($dates as $date) { - if ($date != "." && $date != "..") { - if (startsWith($date, date("Y-m-"))) { - $newdate = str_replace(date("Y-m-"), "", $date); - $newdatestr = $newdate . date("/m/Y"); - echo("<tr><td><b>{$newdatestr}{$lang["admin-stats"]["separator"]}</b></td><td>" . file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/stats/" . $date) . "</td><td> {$lang["admin-stats"]["visits"]}</td></tr>"); - } - } -} - -?> -</tbody></table> - <h3><?= $lang["admin-stats"]["year"] ?></h3> - <table> - <tbody> - <?php - - $visits = []; - $visits['01'] = 0; - $visits['02'] = 0; - $visits['03'] = 0; - $visits['04'] = 0; - $visits['05'] = 0; - $visits['06'] = 0; - $visits['07'] = 0; - $visits['08'] = 0; - $visits['09'] = 0; - $visits['10'] = 0; - $visits['11'] = 0; - $visits['12'] = 0; - $lists = scandir($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/stats"); - foreach ($lists as $list) { - if (startsWith($list, date("Y") . "-01")) { - $visits['01'] = $visits['01'] + (int)file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/stats/" . $list); - } - if (startsWith($list, date("Y") . "-02")) { - $visits['02'] = $visits['02'] + (int)file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/stats/" . $list); - } - if (startsWith($list, date("Y") . "-03")) { - $visits['03'] = $visits['03'] + (int)file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/stats/" . $list); - } - if (startsWith($list, date("Y") . "-04")) { - $visits['04'] = $visits['04'] + (int)file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/stats/" . $list); - } - if (startsWith($list, date("Y") . "-05")) { - $visits['05'] = $visits['05'] + (int)file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/stats/" . $list); - } - if (startsWith($list, date("Y") . "-06")) { - $visits['06'] = $visits['06'] + (int)file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/stats/" . $list); - } - if (startsWith($list, date("Y") . "-07")) { - $visits['07'] = $visits['07'] + (int)file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/stats/" . $list); - } - if (startsWith($list, date("Y") . "-08")) { - $visits['08'] = $visits['08'] + (int)file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/stats/" . $list); - } - if (startsWith($list, date("Y") . "-09")) { - $visits['09'] = $visits['09'] + (int)file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/stats/" . $list); - } - if (startsWith($list, date("Y") . "-10")) { - $visits['10'] = $visits['10'] + (int)file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/stats/" . $list); - } - if (startsWith($list, date("Y") . "-11")) { - $visits['11'] = $visits['11'] + (int)file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/stats/" . $list); - } - if (startsWith($list, date("Y") . "-12")) { - $visits['12'] = $visits['12'] + (int)file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/stats/" . $list); - } - } - - echo("<tr><td><b>{$lang["admin-stats"]["months"][0]}{$lang["admin-stats"]["separator"]}</b></td><td>{$visits['01']}</td><td> {$lang["admin-stats"]["visits"]}</td></tr>"); - echo("<tr><td><b>{$lang["admin-stats"]["months"][1]}{$lang["admin-stats"]["separator"]}</b></td><td>{$visits['02']}</td><td> {$lang["admin-stats"]["visits"]}</td></tr>"); - echo("<tr><td><b>{$lang["admin-stats"]["months"][2]}{$lang["admin-stats"]["separator"]}</b></td><td>{$visits['03']}</td><td> {$lang["admin-stats"]["visits"]}</td></tr>"); - echo("<tr><td><b>{$lang["admin-stats"]["months"][3]}{$lang["admin-stats"]["separator"]}</b></td><td>{$visits['04']}</td><td> {$lang["admin-stats"]["visits"]}</td></tr>"); - echo("<tr><td><b>{$lang["admin-stats"]["months"][4]}{$lang["admin-stats"]["separator"]}</b></td><td>{$visits['05']}</td><td> {$lang["admin-stats"]["visits"]}</td></tr>"); - echo("<tr><td><b>{$lang["admin-stats"]["months"][5]}{$lang["admin-stats"]["separator"]}</b></td><td>{$visits['06']}</td><td> {$lang["admin-stats"]["visits"]}</td></tr>"); - echo("<tr><td><b>{$lang["admin-stats"]["months"][6]}{$lang["admin-stats"]["separator"]}</b></td><td>{$visits['07']}</td><td> {$lang["admin-stats"]["visits"]}</td></tr>"); - echo("<tr><td><b>{$lang["admin-stats"]["months"][7]}{$lang["admin-stats"]["separator"]}</b></td><td>{$visits['08']}</td><td> {$lang["admin-stats"]["visits"]}</td></tr>"); - echo("<tr><td><b>{$lang["admin-stats"]["months"][8]}{$lang["admin-stats"]["separator"]}</b></td><td>{$visits['09']}</td><td> {$lang["admin-stats"]["visits"]}</td></tr>"); - echo("<tr><td><b>{$lang["admin-stats"]["months"][9]}{$lang["admin-stats"]["separator"]}</b></td><td>{$visits['10']}</td><td> {$lang["admin-stats"]["visits"]}</td></tr>"); - echo("<tr><td><b>{$lang["admin-stats"]["months"][10]}{$lang["admin-stats"]["separator"]}</b></td><td>{$visits['11']}</td><td> {$lang["admin-stats"]["visits"]}</td></tr>"); - echo("<tr><td><b>{$lang["admin-stats"]["months"][11]}{$lang["admin-stats"]["separator"]}</b></td><td>{$visits['12']}</td><td> {$lang["admin-stats"]["visits"]}</td></tr>"); - ?> - </tbody> - </table> - <h3><?= $lang["admin-stats"]["last"] ?></h3> - <table> - <tbody> - <?php - - $visits = []; - $visits['01'] = 0; - $visits['02'] = 0; - $visits['03'] = 0; - $visits['04'] = 0; - $visits['05'] = 0; - $visits['06'] = 0; - $visits['07'] = 0; - $visits['08'] = 0; - $visits['09'] = 0; - $visits['10'] = 0; - $visits['11'] = 0; - $visits['12'] = 0; - $lists = scandir($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/stats"); - foreach ($lists as $list) { - if (startsWith($list, ((int)date("Y") - 1) . "-01")) { - $visits['01'] = $visits['01'] + (int)file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/stats/" . $list); - } - if (startsWith($list, ((int)date("Y") - 1) . "-02")) { - $visits['02'] = $visits['02'] + (int)file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/stats/" . $list); - } - if (startsWith($list, ((int)date("Y") - 1) . "-03")) { - $visits['03'] = $visits['03'] + (int)file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/stats/" . $list); - } - if (startsWith($list, ((int)date("Y") - 1) . "-04")) { - $visits['04'] = $visits['04'] + (int)file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/stats/" . $list); - } - if (startsWith($list, ((int)date("Y") - 1) . "-05")) { - $visits['05'] = $visits['05'] + (int)file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/stats/" . $list); - } - if (startsWith($list, ((int)date("Y") - 1) . "-06")) { - $visits['06'] = $visits['06'] + (int)file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/stats/" . $list); - } - if (startsWith($list, ((int)date("Y") - 1) . "-07")) { - $visits['07'] = $visits['07'] + (int)file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/stats/" . $list); - } - if (startsWith($list, ((int)date("Y") - 1) . "-08")) { - $visits['08'] = $visits['08'] + (int)file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/stats/" . $list); - } - if (startsWith($list, ((int)date("Y") - 1) . "-09")) { - $visits['09'] = $visits['09'] + (int)file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/stats/" . $list); - } - if (startsWith($list, ((int)date("Y") - 1) . "-10")) { - $visits['10'] = $visits['10'] + (int)file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/stats/" . $list); - } - if (startsWith($list, ((int)date("Y") - 1) . "-11")) { - $visits['11'] = $visits['11'] + (int)file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/stats/" . $list); - } - if (startsWith($list, ((int)date("Y") - 1) . "-12")) { - $visits['12'] = $visits['12'] + (int)file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/stats/" . $list); - } - } - - echo("<tr><td><b>{$lang["admin-stats"]["months"][0]} " . ((int)date("Y") - 1) . "{$lang["admin-stats"]["separator"]}</b></td><td>{$visits['01']}</td><td> {$lang["admin-stats"]["visits"]}</td></tr>"); - echo("<tr><td><b>{$lang["admin-stats"]["months"][1]} " . ((int)date("Y") - 1) . "{$lang["admin-stats"]["separator"]}</b></td><td>{$visits['02']}</td><td> {$lang["admin-stats"]["visits"]}</td></tr>"); - echo("<tr><td><b>{$lang["admin-stats"]["months"][2]} " . ((int)date("Y") - 1) . "{$lang["admin-stats"]["separator"]}</b></td><td>{$visits['03']}</td><td> {$lang["admin-stats"]["visits"]}</td></tr>"); - echo("<tr><td><b>{$lang["admin-stats"]["months"][3]} " . ((int)date("Y") - 1) . "{$lang["admin-stats"]["separator"]}</b></td><td>{$visits['04']}</td><td> {$lang["admin-stats"]["visits"]}</td></tr>"); - echo("<tr><td><b>{$lang["admin-stats"]["months"][4]} " . ((int)date("Y") - 1) . "{$lang["admin-stats"]["separator"]}</b></td><td>{$visits['05']}</td><td> {$lang["admin-stats"]["visits"]}</td></tr>"); - echo("<tr><td><b>{$lang["admin-stats"]["months"][5]} " . ((int)date("Y") - 1) . "{$lang["admin-stats"]["separator"]}</b></td><td>{$visits['06']}</td><td> {$lang["admin-stats"]["visits"]}</td></tr>"); - echo("<tr><td><b>{$lang["admin-stats"]["months"][6]} " . ((int)date("Y") - 1) . "{$lang["admin-stats"]["separator"]}</b></td><td>{$visits['07']}</td><td> {$lang["admin-stats"]["visits"]}</td></tr>"); - echo("<tr><td><b>{$lang["admin-stats"]["months"][7]} " . ((int)date("Y") - 1) . "{$lang["admin-stats"]["separator"]}</b></td><td>{$visits['08']}</td><td> {$lang["admin-stats"]["visits"]}</td></tr>"); - echo("<tr><td><b>{$lang["admin-stats"]["months"][8]} " . ((int)date("Y") - 1) . "{$lang["admin-stats"]["separator"]}</b></td><td>{$visits['09']}</td><td> {$lang["admin-stats"]["visits"]}</td></tr>"); - echo("<tr><td><b>{$lang["admin-stats"]["months"][9]} " . ((int)date("Y") - 1) . "{$lang["admin-stats"]["separator"]}</b></td><td>{$visits['10']}</td><td> {$lang["admin-stats"]["visits"]}</td></tr>"); - echo("<tr><td><b>{$lang["admin-stats"]["months"][10]} " . ((int)date("Y") - 1) . "{$lang["admin-stats"]["separator"]}</b></td><td>{$visits['11']}</td><td> {$lang["admin-stats"]["visits"]}</td></tr>"); - echo("<tr><td><b>{$lang["admin-stats"]["months"][11]} " . ((int)date("Y") - 1) . "{$lang["admin-stats"]["separator"]}</b></td><td>{$visits['12']}</td><td> {$lang["admin-stats"]["visits"]}</td></tr>"); - ?> - </tbody> - </table> - <?php endif; ?> -<?php require_once $_SERVER['DOCUMENT_ROOT'] . "/cms-special/admin-v2/\$resources/precontent.php"; ?>
\ No newline at end of file diff --git a/Neutron-trunk/cms-special/admin-v2/widgets/index.php b/Neutron-trunk/cms-special/admin-v2/widgets/index.php deleted file mode 100644 index d0890d0..0000000 --- a/Neutron-trunk/cms-special/admin-v2/widgets/index.php +++ /dev/null @@ -1,5 +0,0 @@ -<?php require_once "../../../resources/private/relative.php"; getRelativeDetails("cms-special"); ?> -<?php - -header("Location: {$GLOBALS["SYSTEM_ROOT"]}/cms-special/admin-v2/plugins"); -require $_SERVER['DOCUMENT_ROOT'] . "/api/electrode/quit.php";quit();
\ No newline at end of file |