diff options
Diffstat (limited to 'Neutron-trunk/cms-special/admin-v2')
63 files changed, 1039 insertions, 449 deletions
diff --git a/Neutron-trunk/cms-special/admin-v2/$panes/accounts.php b/Neutron-trunk/cms-special/admin-v2/$panes/accounts.php new file mode 100644 index 0000000..8ade4f5 --- /dev/null +++ b/Neutron-trunk/cms-special/admin-v2/$panes/accounts.php @@ -0,0 +1,64 @@ +<?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 new file mode 100644 index 0000000..9fd564b --- /dev/null +++ b/Neutron-trunk/cms-special/admin-v2/$panes/content.php @@ -0,0 +1,94 @@ +<?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 new file mode 100644 index 0000000..8e956d3 --- /dev/null +++ b/Neutron-trunk/cms-special/admin-v2/$panes/features.php @@ -0,0 +1,81 @@ +<?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 new file mode 100644 index 0000000..878bfc2 --- /dev/null +++ b/Neutron-trunk/cms-special/admin-v2/$panes/language.php @@ -0,0 +1,68 @@ +<?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 new file mode 100644 index 0000000..b49fcef --- /dev/null +++ b/Neutron-trunk/cms-special/admin-v2/$panes/maintenance.php @@ -0,0 +1,64 @@ +<?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 new file mode 100644 index 0000000..40991a8 --- /dev/null +++ b/Neutron-trunk/cms-special/admin-v2/$panes/personalization.php @@ -0,0 +1,94 @@ +<?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 new file mode 100644 index 0000000..31cdc52 --- /dev/null +++ b/Neutron-trunk/cms-special/admin-v2/$panes/security.php @@ -0,0 +1,80 @@ +<?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 index 916f798..34cbc91 100755..100644 --- a/Neutron-trunk/cms-special/admin-v2/$panes/system.php +++ b/Neutron-trunk/cms-special/admin-v2/$panes/system.php @@ -1,11 +1,33 @@ +<?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")) { @@ -25,27 +47,78 @@ <div id="system-head-version"> <div> <b>Neutron 10</b><br> - version <?= trim(file_get_contents($_SERVER["DOCUMENT_ROOT"] . "/api/prettyver")) ?> + 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"> + <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 class="inner-item-image" src="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/image/admin2/about.png"> + <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">About Neutron</span><br> - <span class="inner-item-description">View Neutron versions and data usage</span> + <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 class="inner-item-enter" src="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/image/admin2/enter.png"> + <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 index bca683b..e69de29 100755..100644 --- a/Neutron-trunk/cms-special/admin-v2/$resources/admin.js +++ b/Neutron-trunk/cms-special/admin-v2/$resources/admin.js @@ -1,16 +0,0 @@ -window.onscroll = () => { - // console.log("> Scroll"); - if (window.scrollY >= 52 && !document.getElementById('portal-background').classList.contains('scrolled')) { - // console.log("> ADD"); - document.getElementById('portal-background').classList.add('scrolled'); - } else if (window.scrollY < 52 && document.getElementById('portal-background').classList.contains('scrolled')) { - // console.log("> REMOVE"); - document.getElementById('portal-background').classList.remove('scrolled'); - } else { - // console.log("> Nothing"); - } -} - -window.onbeforeunload = () => { - window.parent.$("#loader").fadeIn(200); -}
\ No newline at end of file diff --git a/Neutron-trunk/cms-special/admin-v2/$resources/common.css b/Neutron-trunk/cms-special/admin-v2/$resources/common.css index 3826747..1276d2f 100755..100644 --- a/Neutron-trunk/cms-special/admin-v2/$resources/common.css +++ b/Neutron-trunk/cms-special/admin-v2/$resources/common.css @@ -47,15 +47,15 @@ html, body { .ttdemo { padding: 10px; - font-family: "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 !important; } * { - font-family: "CMS", "Ubuntu", "Roboto", "Google Sans", "Segoe UI", "Noto Sans", Tahoma, Geneva, Verdana, sans-serif; + 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: "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 !important; } #main-content { @@ -69,15 +69,10 @@ span, p, body, div, h1, h2, h3, h4, h5, h6 { overflow-y: auto; } -html, body, #app-grid { - height: 100%; -} - #app-frame { margin: -16px; border: none; width: calc(100% + 32px); - height: calc(100% + 32px); } .mdc-top-app-bar--fixed-adjust { diff --git a/Neutron-trunk/cms-special/admin-v2/$resources/header.php b/Neutron-trunk/cms-special/admin-v2/$resources/header.php index e69de29..e69de29 100755..100644 --- a/Neutron-trunk/cms-special/admin-v2/$resources/header.php +++ b/Neutron-trunk/cms-special/admin-v2/$resources/header.php diff --git a/Neutron-trunk/cms-special/admin-v2/$resources/index-auto.css b/Neutron-trunk/cms-special/admin-v2/$resources/index-auto.css index 773eab9..773eab9 100755..100644 --- a/Neutron-trunk/cms-special/admin-v2/$resources/index-auto.css +++ b/Neutron-trunk/cms-special/admin-v2/$resources/index-auto.css diff --git a/Neutron-trunk/cms-special/admin-v2/$resources/index-dark.css b/Neutron-trunk/cms-special/admin-v2/$resources/index-dark.css index 1683192..1683192 100755..100644 --- a/Neutron-trunk/cms-special/admin-v2/$resources/index-dark.css +++ b/Neutron-trunk/cms-special/admin-v2/$resources/index-dark.css diff --git a/Neutron-trunk/cms-special/admin-v2/$resources/index.css b/Neutron-trunk/cms-special/admin-v2/$resources/index.css index 57dd995..57dd995 100755..100644 --- a/Neutron-trunk/cms-special/admin-v2/$resources/index.css +++ b/Neutron-trunk/cms-special/admin-v2/$resources/index.css diff --git a/Neutron-trunk/cms-special/admin-v2/$resources/postcontent.php b/Neutron-trunk/cms-special/admin-v2/$resources/postcontent.php index 573a1d9..cface57 100755..100644 --- a/Neutron-trunk/cms-special/admin-v2/$resources/postcontent.php +++ b/Neutron-trunk/cms-special/admin-v2/$resources/postcontent.php @@ -3,4 +3,4 @@ </body> </html> -<script src="<?= $GLOBALS["SYSTEM_ROOT"] ?>/cms-special/admin/$resources/admin.js" charset="utf-8"></script>
\ No newline at end of file +<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 index af8d999..9b7e60c 100755..100644 --- a/Neutron-trunk/cms-special/admin-v2/$resources/precontent.php +++ b/Neutron-trunk/cms-special/admin-v2/$resources/precontent.php @@ -47,19 +47,19 @@ if (isset($lang["admin-titles"][$pageid])) { $invalid = false; -if (isset($_COOKIE['_NEUTRON_ADMIN_TOKEN']) && $_COOKIE['_NEUTRON_ADMIN_TOKEN'] != "." && $_COOKIE['_NEUTRON_ADMIN_TOKEN'] != ".." && $_COOKIE['_NEUTRON_ADMIN_TOKEN'] != "/") { +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/?pr=" . str_replace("/index.php", "", $_SERVER['SCRIPT_NAME']) . "&pa=" . urlencode("?" . explode("?", $_SERVER['REQUEST_URI'])[1]) . "'</script>"); + 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/?pr=" . str_replace("/index.php", "", $_SERVER['SCRIPT_NAME']) . "&pa=" . urlencode("?" . explode("?", $_SERVER['REQUEST_URI'])[1]) . "'</script>"); + 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/home';</script>"); + 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; @@ -112,7 +112,7 @@ require_once $_SERVER['DOCUMENT_ROOT'] . "/resources/private/headers/preprocesso ?> <!DOCTYPE html> -<html> +<html style="background-color:transparent !important;"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> @@ -127,19 +127,19 @@ require_once $_SERVER['DOCUMENT_ROOT'] . "/resources/private/headers/preprocesso <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/$resources/admin.js"></script> + <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/$resources/common.css" as="style"> - <link rel="preload" href="<?= $GLOBALS["SYSTEM_ROOT"] ?>/cms-special/admin/$resources/index.css" as="style"> - <link rel="preload" href="<?= $GLOBALS["SYSTEM_ROOT"] ?>/cms-special/admin/$resources/responsive.css" as="style"> - <link rel="preload" href="<?= $GLOBALS["SYSTEM_ROOT"] ?>/cms-special/admin/$resources/index-dark.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/$resources/admin.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 @@ -154,15 +154,27 @@ require_once $_SERVER['DOCUMENT_ROOT'] . "/resources/private/headers/preprocesso ?> <?php - if (file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/theme") == "dark") { - echo('<link rel="stylesheet" href="' . $GLOBALS["SYSTEM_ROOT"] . '/cms-special/admin/$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/$resources/index-auto.css">'); + /*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/$resources/index.css">'); - } + 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 @@ -199,8 +211,8 @@ require_once $_SERVER['DOCUMENT_ROOT'] . "/resources/private/headers/preprocesso ?> </head> -<body id="settings" style="overflow-x:hidden;"> - <?php require_once $_SERVER['DOCUMENT_ROOT'] . "/cms-special/admin/\$resources/spotlight.php"; ?> +<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"; @@ -209,15 +221,15 @@ require_once $_SERVER['DOCUMENT_ROOT'] . "/resources/private/headers/preprocesso $name = $pageConfig['headerName']; ?> - <div id="admin"> + <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/updates\">" . $lang["admin-home"]["updates"][1] . "</a></div>"); + 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/\$resources/header.php"; ?>
\ No newline at end of file + <?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 index 75810b1..75810b1 100755..100644 --- a/Neutron-trunk/cms-special/admin-v2/$resources/responsive.css +++ b/Neutron-trunk/cms-special/admin-v2/$resources/responsive.css diff --git a/Neutron-trunk/cms-special/admin-v2/$resources/session.php b/Neutron-trunk/cms-special/admin-v2/$resources/session.php new file mode 100644 index 0000000..ae480ba --- /dev/null +++ b/Neutron-trunk/cms-special/admin-v2/$resources/session.php @@ -0,0 +1,11 @@ +<?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 index bffaa87..625f734 100755..100644 --- a/Neutron-trunk/cms-special/admin-v2/$resources/spotlight-test.php +++ b/Neutron-trunk/cms-special/admin-v2/$resources/spotlight-test.php @@ -9,6 +9,6 @@ <link rel="stylesheet" href="/resources/lib/material/iconfont.css"> </head> <body> - <?php require_once $_SERVER['DOCUMENT_ROOT'] . "/cms-special/admin/\$resources/spotlight.php"; ?> + <?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 index f803f52..2a09ed3 100755..100644 --- a/Neutron-trunk/cms-special/admin-v2/$resources/spotlight.php +++ b/Neutron-trunk/cms-special/admin-v2/$resources/spotlight.php @@ -4,7 +4,7 @@ <?php -$data = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/cms-special/admin/home/all/db.json")); +$data = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/cms-special/admin-v2/home/all/db.json")); ?> <ul class="spotlight-elements"> diff --git a/Neutron-trunk/cms-special/admin-v2/.htaccess b/Neutron-trunk/cms-special/admin-v2/.htaccess index 90f6271..d53a146 100755..100644 --- a/Neutron-trunk/cms-special/admin-v2/.htaccess +++ b/Neutron-trunk/cms-special/admin-v2/.htaccess @@ -1,4 +1,4 @@ -ErrorDocument 404 "/cms-special/admin/error" -ErrorDocument 403 "/cms-special/admin/error" -ErrorDocument 401 "/cms-special/admin/error" -ErrorDocument 500 "/cms-special/admin/error"
\ No newline at end of file +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 index 1551ff0..c9791a0 100755..100644 --- a/Neutron-trunk/cms-special/admin-v2/about/index.php +++ b/Neutron-trunk/cms-special/admin-v2/about/index.php @@ -1,12 +1,12 @@ <?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/\$resources/precontent.php"; ?> +<?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"]["info"] ?></h3> + <h3><?= $lang["admin-about"]["new"]["overview"] ?></h3> <ul><li> <?php @@ -30,87 +30,69 @@ $sizestr = $size . " " . $lang["sizes"]["bytes"] . ""; } - echo("<li>" . $lang["admin-about"]["diskspace"][0] . " <b>" . $sizestr . "</b> " . $lang["admin-about"]["diskspace"][1] . "</li>"); + 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"]["disk"] ?></h3> - <div id="storagebar" value="0" max="1"></div> - <span style="margin-left: 10px;"></span> - <?php - $globalSize = $size; +<h3><?= $lang["admin-about"]["new"]["version"] ?></h3> - $size = 0; - getData($_SERVER['DOCUMENT_ROOT'] . "/api"); - $mpcmsSize = $size; - getData($_SERVER['DOCUMENT_ROOT'] . "/cms-special"); - $mpcmsSize = $mpcmsSize + $size; - getData($_SERVER['DOCUMENT_ROOT'] . "/widgets"); - $mpcmsSize = $mpcmsSize + $size; - - getData($_SERVER['DOCUMENT_ROOT'] . "/resources/css"); - $mpcmsSize = $mpcmsSize + $size; - getData($_SERVER['DOCUMENT_ROOT'] . "/resources/fonts"); - $mpcmsSize = $mpcmsSize + $size; - getData($_SERVER['DOCUMENT_ROOT'] . "/resources/i18n"); - $mpcmsSize = $mpcmsSize + $size; - getData($_SERVER['DOCUMENT_ROOT'] . "/resources/image"); - $mpcmsSize = $mpcmsSize + $size; - getData($_SERVER['DOCUMENT_ROOT'] . "/resources/js"); - $mpcmsSize = $mpcmsSize + $size; - getData($_SERVER['DOCUMENT_ROOT'] . "/resources/lib"); - $mpcmsSize = $mpcmsSize + $size; - getData($_SERVER['DOCUMENT_ROOT'] . "/resources/private"); - $mpcmsSize = $mpcmsSize + $size; +<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> - $size = 0; - getData($_SERVER['DOCUMENT_ROOT'] . "/data"); - $dataSize = $size; + <?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; ?> - $calSize = filesize($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/caldb.json"); - $confSize = filesize($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/sitename") + filesize($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/system.log") + filesize($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/widgets.json") + filesize($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/password") + filesize($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/footer"); - if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/widget-notes-data")) { - $confSize = $confSize + filesize($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/widget-notes-data"); - } - if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/widget-contact-data")) { - $confSize = $confSize + filesize($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/widget-contact-data"); - } + <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> - $size = 0; - getData($_SERVER['DOCUMENT_ROOT'] . "/resources/upload"); - $resSize = $size; +<h3><?= $lang["admin-about"]["new"]["system"] ?></h3> - $globalSize = $resSize + $mpcmsSize + $confSize + $dataSize + $calSize; +<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; ?> - ?> - <div style="display:grid;grid-template-columns:1fr 1fr 1fr 1fr;"> - <span><span style="margin-right:5px;border-radius:999px;vertical-align:middle;background-color:#8bcf69;position:relative;width:15px;height:15px;display:inline-block;"></span><span style="margin-right:30px;"><?= $lang["admin-about"]["categories"]['system'] ?> (<?= round(($mpcmsSize*100)/$globalSize, 2) ?>%)</span></span> - <span><span style="margin-right:5px;border-radius:999px;vertical-align:middle;background-color:#e6d450;position:relative;width:15px;height:15px;display:inline-block;"></span><span style="margin-right:30px;"><?= $lang["admin-about"]["categories"]['config'] ?> (<?= round(($dataSize*100)/$globalSize, 2) ?>%)</span></span> - <span><span style="margin-right:5px;border-radius:999px;vertical-align:middle;background-color:#cf82bf;position:relative;width:15px;height:15px;display:inline-block;"></span><span style="margin-right:30px;"><?= $lang["admin-about"]["categories"]['resources'] ?> (<?= round(($resSize*100)/$globalSize, 2) ?>%)</span></span> - <span><span style="margin-right:5px;border-radius:999px;vertical-align:middle;background-color:gray;position:relative;width:15px;height:15px;display:inline-block;"></span><span style="margin-right:30px;"><?= $lang["admin-about"]["categories"]['misc'] ?></span></span> - </div> - <!-- <?= $globalSize - ($mpcmsSize + $dataSize + $resSize) ?> - <?= "<br>" ?> - <?= (($mpcmsSize + $dataSize + $resSize) * 100)/$globalSize ?> --> - <style> - #storagebar { - height: 12px; - width: calc(100% - 16px); - margin: 8px; - border-radius: 5px; - box-shadow: 0 5px 5px -5px #999 inset; - background-image: linear-gradient( - 90deg, - #8bcf69 <?= round(($mpcmsSize*100)/$globalSize, 2) ?>%, - #e6d450 <?= round(($mpcmsSize*100)/$globalSize, 2) ?>%, - #e6d450 <?= round(($dataSize*100)/$globalSize, 2) ?>%, - #cf82bf <?= round(($dataSize*100)/$globalSize, 2) ?>%, - #cf82bf <?= round(($resSize*100)/$globalSize, 2) ?>%, - gray <?= round(($resSize*100)/$globalSize, 2) ?>%, - gray 100% - ); - background-size: 100% 100%; - } - </style> -<?php require_once $_SERVER['DOCUMENT_ROOT'] . "/cms-special/admin/\$resources/postcontent.php"; ?> + <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 index ae80b96..72a4fe1 100755..100644 --- a/Neutron-trunk/cms-special/admin-v2/advanced/index.php +++ b/Neutron-trunk/cms-special/admin-v2/advanced/index.php @@ -1,8 +1,8 @@ <?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/\$resources/precontent.php"; ?> +<?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/advanced/jsonconf" title="<?= $lang["admin-advanced-home"]["placeholders"]['dev'] ?>" class="sblink"><?= $lang["admin-advanced-home"]["dev"] ?></a> + <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/\$resources/postcontent.php"; ?>
\ No newline at end of file +<?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 index f087b1c..030c9bb 100755..100644 --- a/Neutron-trunk/cms-special/admin-v2/advanced/jsonconf/index.php +++ b/Neutron-trunk/cms-special/admin-v2/advanced/jsonconf/index.php @@ -1,11 +1,11 @@ <?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/\$resources/precontent.php"; ?> +<?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/\$resources/postcontent.php"; ?> +<?php require_once $_SERVER['DOCUMENT_ROOT'] . "/cms-special/admin-v2/\$resources/postcontent.php"; ?> <script> window.onbeforeunload = function (e) { @@ -36,7 +36,7 @@ function pushSettings() { success: function (data) { if (data == "ok") { window.onbeforeunload = undefined; - location.href = "/cms-special/admin/home"; + location.href = "/cms-special/admin-v2/home"; } else { alert("<?= $lang["admin-errors"]["errorprefix"] ?>" + data) Array.from(document.getElementsByTagName('input')).forEach((el) => {el.disabled = false}) diff --git a/Neutron-trunk/cms-special/admin-v2/appearance/index.php b/Neutron-trunk/cms-special/admin-v2/appearance/index.php index 22c5065..4d15264 100755..100644 --- a/Neutron-trunk/cms-special/admin-v2/appearance/index.php +++ b/Neutron-trunk/cms-special/admin-v2/appearance/index.php @@ -1,5 +1,5 @@ <?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/\$resources/precontent.php"; ?> +<?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> @@ -31,47 +31,7 @@ <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> - <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> - <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/\$resources/postcontent.php"; ?> +<?php require_once $_SERVER['DOCUMENT_ROOT'] . "/cms-special/admin-v2/\$resources/postcontent.php"; ?> <script> @@ -165,78 +125,10 @@ function submitData() { } }, 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 - }); -} - -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/login"; - } 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 - }); -} - -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/appearance"; - } 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') + 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, diff --git a/Neutron-trunk/cms-special/admin-v2/calendar/add/index.php b/Neutron-trunk/cms-special/admin-v2/calendar/add/index.php index 1029788..8d1169f 100755..100644 --- a/Neutron-trunk/cms-special/admin-v2/calendar/add/index.php +++ b/Neutron-trunk/cms-special/admin-v2/calendar/add/index.php @@ -1,5 +1,5 @@ <?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/\$resources/precontent.php"; ?> +<?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> @@ -78,7 +78,7 @@ <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/\$resources/postcontent.php"; ?> +<?php require_once $_SERVER['DOCUMENT_ROOT'] . "/cms-special/admin-v2/\$resources/postcontent.php"; ?> <script> @@ -120,7 +120,7 @@ function createCmsEvent() { url: "<?= $GLOBALS["SYSTEM_ROOT"] ?>/api/admin/calendar_create.php", success: function (data) { if (data == "ok") { - location.href = "<?= $GLOBALS["SYSTEM_ROOT"] ?>/cms-special/admin/calendar"; + location.href = "<?= $GLOBALS["SYSTEM_ROOT"] ?>/cms-special/admin-v2/calendar"; } else { alert("<?= $lang["admin-errors"]["errorprefix"] ?>" + data) document.getElementById('datainput').classList.remove('hide') diff --git a/Neutron-trunk/cms-special/admin-v2/calendar/index.php b/Neutron-trunk/cms-special/admin-v2/calendar/index.php index e596551..59851b9 100755..100644 --- a/Neutron-trunk/cms-special/admin-v2/calendar/index.php +++ b/Neutron-trunk/cms-special/admin-v2/calendar/index.php @@ -1,5 +1,5 @@ <?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/\$resources/precontent.php"; ?> +<?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")) { @@ -32,7 +32,7 @@ $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/calendar/manage/?id=" . $event->timestamp . "\" title=\"{$lang['admin-calendar']['manageph']}\">" . $lang["admin-calendar"]["manage"] . "</a></li>"); + 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 { @@ -47,12 +47,12 @@ <?php if (!$corrupted) { - echo('<br><li><i><a href="' . $GLOBALS["SYSTEM_ROOT"] . '/cms-special/admin/calendar/add" title="' . $lang["admin-calendar"]["addph"] . '" class="sblink">' . $lang["admin-calendar"]["add"] . '</a></i></li>'); + 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/\$resources/postcontent.php"; ?> +<?php include_once $_SERVER['DOCUMENT_ROOT'] . "/cms-special/admin-v2/\$resources/postcontent.php"; ?> <script> function updateNextEvents() { diff --git a/Neutron-trunk/cms-special/admin-v2/calendar/manage/index.php b/Neutron-trunk/cms-special/admin-v2/calendar/manage/index.php index a6f4ebd..db5d226 100755..100644 --- a/Neutron-trunk/cms-special/admin-v2/calendar/manage/index.php +++ b/Neutron-trunk/cms-special/admin-v2/calendar/manage/index.php @@ -1,9 +1,9 @@ <?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/\$resources/precontent.php"; ?> +<?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/calendar';</script>"); + 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); @@ -15,10 +15,10 @@ if (isJson($eventsraw)) { } } } else { - require $_SERVER['DOCUMENT_ROOT'] . "/api/electrode/quit.php";quit("<script>location.href = '" . $GLOBALS['SYSTEM_ROOT'] . "/cms-special/admin/calendar';</script>"); + 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/calendar';</script>"); + 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> @@ -41,10 +41,10 @@ if (!isset($event)) { </ul> <h3><?= $lang["admin-calendar"]["deleteask"] ?></h3> <ul id="delete"> - <li><a class="sblink" href="<?= $GLOBALS["SYSTEM_ROOT"] ?>/cms-special/admin/calendar" title="<?= $lang["admin-calendar"]["deletenoph"] ?>"><?= $lang["admin-calendar"]["deleteno"] ?></a></li> + <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/\$resources/postcontent.php"; ?> +<?php include_once $_SERVER['DOCUMENT_ROOT'] . "/cms-special/admin-v2/\$resources/postcontent.php"; ?> <script> @@ -58,7 +58,7 @@ function deleteEvent() { url: "<?= $GLOBALS["SYSTEM_ROOT"] ?>/api/admin/calendar_delete.php", success: function (data) { if (data == "ok") { - location.href = "<?= $GLOBALS["SYSTEM_ROOT"] ?>/cms-special/admin/calendar"; + location.href = "<?= $GLOBALS["SYSTEM_ROOT"] ?>/cms-special/admin-v2/calendar"; } else { alert("<?= $lang["admin-errors"]["errorprefix"] ?>" + data) document.getElementById('delete').classList.remove('hide') diff --git a/Neutron-trunk/cms-special/admin-v2/customization/index.php b/Neutron-trunk/cms-special/admin-v2/customization/index.php index 66aee2f..a50196b 100755..100644 --- a/Neutron-trunk/cms-special/admin-v2/customization/index.php +++ b/Neutron-trunk/cms-special/admin-v2/customization/index.php @@ -1,5 +1,5 @@ <?php require_once "../../../resources/private/relative.php"; getRelativeDetails("cms-special"); ?> -<?php $pageConfig = [ "domName" => "Personnalisation", "headerName" => "Personnalisation" ]; require_once $_SERVER['DOCUMENT_ROOT'] . "/cms-special/admin/\$resources/precontent.php"; ?> +<?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()"> @@ -148,7 +148,7 @@ </div> </div> -<?php require_once $_SERVER['DOCUMENT_ROOT'] . "/cms-special/admin/\$resources/postcontent.php"; ?> +<?php require_once $_SERVER['DOCUMENT_ROOT'] . "/cms-special/admin-v2/\$resources/postcontent.php"; ?> <script> function updateColors() { diff --git a/Neutron-trunk/cms-special/admin-v2/error/index.php b/Neutron-trunk/cms-special/admin-v2/error/index.php index c68c6a6..54f3910 100755..100644 --- a/Neutron-trunk/cms-special/admin-v2/error/index.php +++ b/Neutron-trunk/cms-special/admin-v2/error/index.php @@ -1,11 +1,11 @@ <?php require_once "../../../resources/private/relative.php"; getRelativeDetails("cms-special"); ?> -<?php $pageConfig = [ "domName" => "Erreur", "headerName" => "Erreur" ]; require_once $_SERVER['DOCUMENT_ROOT'] . "/cms-special/admin/\$resources/precontent.php"; ?> +<?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/home"><?= $lang["admin-errors"]["common"]['home'] ?></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/\$resources/postcontent.php"; ?> +<?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 index c243a49..102861b 100755..100644 --- a/Neutron-trunk/cms-special/admin-v2/flags/index.php +++ b/Neutron-trunk/cms-special/admin-v2/flags/index.php @@ -3,7 +3,7 @@ /** @var boolean $__electrode */ if (isset($__electrode) && $__electrode) { - header("Location: {$GLOBALS["SYSTEM_ROOT"]}/cms-special/admin/home"); + header("Location: {$GLOBALS["SYSTEM_ROOT"]}/cms-special/admin-v2/home"); require $_SERVER['DOCUMENT_ROOT'] . "/api/electrode/quit.php";quit(); } @@ -15,13 +15,13 @@ function fflag($name, $title, $description) { 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/\$resources/precontent.php"; ?> +$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/\$resources/postcontent.php"; ?> +<?php require_once $_SERVER['DOCUMENT_ROOT'] . "/cms-special/admin-v2/\$resources/postcontent.php"; ?> <script> diff --git a/Neutron-trunk/cms-special/admin-v2/footer/index.php b/Neutron-trunk/cms-special/admin-v2/footer/index.php new file mode 100644 index 0000000..bc37967 --- /dev/null +++ b/Neutron-trunk/cms-special/admin-v2/footer/index.php @@ -0,0 +1,71 @@ +<?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 index f2438e1..a40e31b 100755..100644 --- a/Neutron-trunk/cms-special/admin-v2/galery/addcategory/index.php +++ b/Neutron-trunk/cms-special/admin-v2/galery/addcategory/index.php @@ -1,2 +1,2 @@ <?php require_once "../../../../resources/private/relative.php"; getRelativeDetails("cms-special"); ?>
-<?php header("Location: {$GLOBALS["SYSTEM_ROOT"]}/cms-special/admin/gallery/addcategory") ?>
\ No newline at end of file +<?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 index 82ad59c..f0e5652 100755..100644 --- a/Neutron-trunk/cms-special/admin-v2/galery/index.php +++ b/Neutron-trunk/cms-special/admin-v2/galery/index.php @@ -1,2 +1,2 @@ <?php require_once "../../../resources/private/relative.php"; getRelativeDetails("cms-special"); ?>
-<?php header("Location: {$GLOBALS["SYSTEM_ROOT"]}/cms-special/admin/gallery") ?>
\ No newline at end of file +<?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 index ac5f616..91e2a81 100755..100644 --- a/Neutron-trunk/cms-special/admin-v2/galery/publish/index.php +++ b/Neutron-trunk/cms-special/admin-v2/galery/publish/index.php @@ -1,2 +1,2 @@ <?php require_once "../../../../resources/private/relative.php"; getRelativeDetails("cms-special"); ?>
-<?php header("Location: {$GLOBALS["SYSTEM_ROOT"]}/cms-special/admin/gallery/publish") ?>
\ No newline at end of file +<?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 index 68451fc..e29a1aa 100755..100644 --- a/Neutron-trunk/cms-special/admin-v2/gallery/addcategory/index.php +++ b/Neutron-trunk/cms-special/admin-v2/gallery/addcategory/index.php @@ -1,11 +1,11 @@ <?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/\$resources/precontent.php"; ?> +<?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/\$resources/postcontent.php"; ?> +<?php require_once $_SERVER['DOCUMENT_ROOT'] . "/cms-special/admin-v2/\$resources/postcontent.php"; ?> <script> @@ -19,7 +19,7 @@ function createCat() { url: "<?= $GLOBALS["SYSTEM_ROOT"] ?>/api/admin/galery_create_category.php", success: function (data) { if (data == "ok") { - location.href = "<?= $GLOBALS["SYSTEM_ROOT"] ?>/cms-special/admin/gallery"; + location.href = "<?= $GLOBALS["SYSTEM_ROOT"] ?>/cms-special/admin-v2/gallery"; } else { alert("<?= $lang["admin-errors"]["errorprefix"] ?>" + data) document.getElementById('hidding').classList.remove('hide') diff --git a/Neutron-trunk/cms-special/admin-v2/gallery/index.php b/Neutron-trunk/cms-special/admin-v2/gallery/index.php index 7623820..7c25c60 100755..100644 --- a/Neutron-trunk/cms-special/admin-v2/gallery/index.php +++ b/Neutron-trunk/cms-special/admin-v2/gallery/index.php @@ -1,5 +1,5 @@ <?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/\$resources/precontent.php"; ?> +<?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")) { @@ -42,7 +42,7 @@ if (!file_exists($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/galery")) { } ?> <?= $lang["admin-gallery"]["lists"]['picture'] ?><?php if ($count > 1) {echo("s");} ?></li> - <li><a class="sblink" href="<?= $GLOBALS["SYSTEM_ROOT"] ?>/cms-special/admin/gallery/addcategory"><?= $lang["admin-gallery"]["categories"]["add"] ?></a></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> @@ -70,7 +70,7 @@ if (!file_exists($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/galery")) { } } if ($count == 0) { - echo("<i>" . $lang["admin-gallery"]["pictures"]['none'] . "</i><p><a class=\"sblink\" href=\"{$GLOBALS["SYSTEM_ROOT"]}/cms-special/admin/gallery/publish\">" . $lang["admin-gallery"]["pictures"]['add'] . "</a></p>"); + 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 { @@ -87,12 +87,12 @@ if (!file_exists($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/galery")) { 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/gallery/publish\">" . $lang["admin-gallery"]["pictures"]['add'] . "</a></b>"); + 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/\$resources/postcontent.php"; ?> +<?php require_once $_SERVER['DOCUMENT_ROOT'] . "/cms-special/admin-v2/\$resources/postcontent.php"; ?> <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 index e2768ac..1217164 100755..100644 --- a/Neutron-trunk/cms-special/admin-v2/gallery/publish/index.php +++ b/Neutron-trunk/cms-special/admin-v2/gallery/publish/index.php @@ -1,5 +1,5 @@ <?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/\$resources/precontent.php"; ?> +<?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> @@ -18,7 +18,7 @@ <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/\$resources/postcontent.php"; ?> +<?php require_once $_SERVER['DOCUMENT_ROOT'] . "/cms-special/admin-v2/\$resources/postcontent.php"; ?> <script> @@ -35,7 +35,7 @@ function createCat() { url: "<?= $GLOBALS["SYSTEM_ROOT"] ?>/api/admin/galery_publish_photo.php", success: function (data) { if (data == "ok") { - location.href = "<?= $GLOBALS["SYSTEM_ROOT"] ?>/cms-special/admin/gallery"; + location.href = "<?= $GLOBALS["SYSTEM_ROOT"] ?>/cms-special/admin-v2/gallery"; } else { alert("<?= $lang["admin-errors"]["errorprefix"] ?>" + data) document.getElementById('hidding').classList.remove('hide') diff --git a/Neutron-trunk/cms-special/admin-v2/home/all/db.json b/Neutron-trunk/cms-special/admin-v2/home/all/db.json index 8a6ad37..8a6ad37 100755..100644 --- a/Neutron-trunk/cms-special/admin-v2/home/all/db.json +++ b/Neutron-trunk/cms-special/admin-v2/home/all/db.json diff --git a/Neutron-trunk/cms-special/admin-v2/home/all/index.php b/Neutron-trunk/cms-special/admin-v2/home/all/index.php index f844070..a780757 100755..100644 --- a/Neutron-trunk/cms-special/admin-v2/home/all/index.php +++ b/Neutron-trunk/cms-special/admin-v2/home/all/index.php @@ -1,4 +1,4 @@ <?php require_once "../../../../resources/private/relative.php"; getRelativeDetails("cms-special"); ?> <?php -header("Location: {$GLOBALS["SYSTEM_ROOT"]}/cms-special/admin/home");
\ No newline at end of file +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 index 318611a..c5cff76 100755..100644 --- a/Neutron-trunk/cms-special/admin-v2/home/appearance/index.php +++ b/Neutron-trunk/cms-special/admin-v2/home/appearance/index.php @@ -1,9 +1,9 @@ <?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/\$resources/precontent.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/home" class="mdc-button mdc-button--outlined"> + <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> @@ -13,33 +13,33 @@ $pageConfig = [ "domName" => "Tableau de bord", "headerName" => "Tableau de bord <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/appearance" class="material-icons-outlined mdc-top-app-bar__navigation-icon mdc-icon-button home-grid-item-button">tour</a> + <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/customization" class="material-icons-outlined mdc-top-app-bar__navigation-icon mdc-icon-button home-grid-item-button">palette</a> + <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/language" class="material-icons-outlined mdc-top-app-bar__navigation-icon mdc-icon-button home-grid-item-button">language</a> + <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/plugins" class="material-icons-outlined mdc-top-app-bar__navigation-icon mdc-icon-button home-grid-item-button">extension</a> + <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/flags" class="material-icons-outlined mdc-top-app-bar__navigation-icon mdc-icon-button home-grid-item-button">flag</a> + <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/\$resources/postcontent.php"; ?>
\ No newline at end of file +<?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 index 29205dc..ee9d7bc 100755..100644 --- a/Neutron-trunk/cms-special/admin-v2/home/data/index.php +++ b/Neutron-trunk/cms-special/admin-v2/home/data/index.php @@ -1,9 +1,9 @@ <?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/\$resources/precontent.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/home" class="mdc-button mdc-button--outlined"> + <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> @@ -13,15 +13,15 @@ $pageConfig = [ "domName" => "Tableau de bord", "headerName" => "Tableau de bord <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/stats" class="material-icons-outlined mdc-top-app-bar__navigation-icon mdc-icon-button home-grid-item-button">pie_chart</a> + <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/logs" class="material-icons-outlined mdc-top-app-bar__navigation-icon mdc-icon-button home-grid-item-button">text_snippet</a> + <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/\$resources/postcontent.php"; ?>
\ No newline at end of file +<?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 index 8c0deae..7e0cf3e 100755..100644 --- a/Neutron-trunk/cms-special/admin-v2/home/housekeeping/index.php +++ b/Neutron-trunk/cms-special/admin-v2/home/housekeeping/index.php @@ -1,9 +1,9 @@ <?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/\$resources/precontent.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/home" class="mdc-button mdc-button--outlined"> + <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> @@ -13,15 +13,15 @@ $pageConfig = [ "domName" => "Tableau de bord", "headerName" => "Tableau de bord <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/reset" class="material-icons-outlined mdc-top-app-bar__navigation-icon mdc-icon-button home-grid-item-button">restore</a> + <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/about" class="material-icons-outlined mdc-top-app-bar__navigation-icon mdc-icon-button home-grid-item-button">info</a> + <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/\$resources/postcontent.php"; ?>
\ No newline at end of file +<?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 index 327ab36..7a41bf4 100755..100644 --- a/Neutron-trunk/cms-special/admin-v2/home/index.php +++ b/Neutron-trunk/cms-special/admin-v2/home/index.php @@ -1,36 +1,36 @@ <?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/\$resources/precontent.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/language" class="material-icons-outlined mdc-top-app-bar__navigation-icon mdc-icon-button" id="language-selector">translate</a> + <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/pages" class="material-icons-outlined mdc-top-app-bar__navigation-icon mdc-icon-button home-grid-item-button">layers</a> + <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/calendar" class="material-icons-outlined mdc-top-app-bar__navigation-icon mdc-icon-button home-grid-item-button">event_note</a><br> + <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/gallery" class="material-icons-outlined mdc-top-app-bar__navigation-icon mdc-icon-button home-grid-item-button">photo</a><br> + <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/home/appearance" class="material-icons-outlined mdc-top-app-bar__navigation-icon mdc-icon-button home-grid-item-button">brush</a><br> + <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/home/data" class="material-icons-outlined mdc-top-app-bar__navigation-icon mdc-icon-button home-grid-item-button">dns</a><br> + <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/home/housekeeping" class="material-icons-outlined mdc-top-app-bar__navigation-icon mdc-icon-button home-grid-item-button">cleaning_services</a><br> + <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> @@ -43,7 +43,7 @@ $pageConfig = [ "domName" => "Tableau de bord", "headerName" => "Tableau de bord <span class="mdc-button__label"><?= $lang["admin-home"]["items"][6] ?></span> </a> - <a href="<?= $GLOBALS["SYSTEM_ROOT"] ?>/cms-special/admin/logout" class="mdc-button mdc-button--outlined"> + <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> @@ -55,4 +55,4 @@ $pageConfig = [ "domName" => "Tableau de bord", "headerName" => "Tableau de bord <span class="mdc-button__label"><?= $lang["admin-home"]["items"][9] ?></span> </a> </div> -<?php require_once $_SERVER['DOCUMENT_ROOT'] . "/cms-special/admin/\$resources/postcontent.php"; ?> +<?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 index a5d0bbc..cc06932 100755..100644 --- a/Neutron-trunk/cms-special/admin-v2/housekeeping/index.php +++ b/Neutron-trunk/cms-special/admin-v2/housekeeping/index.php @@ -1,2 +1,2 @@ <?php require_once "../../../resources/private/relative.php"; getRelativeDetails("cms-special"); ?>
-<?php header("Location: {$GLOBALS["SYSTEM_ROOT"]}/cms-special/admin/home/housekeeping"); ?>
\ No newline at end of file +<?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 index 35b36d1..1bf27eb 100755..100644 --- a/Neutron-trunk/cms-special/admin-v2/housekeeping/reset/index.php +++ b/Neutron-trunk/cms-special/admin-v2/housekeeping/reset/index.php @@ -1,2 +1,2 @@ <?php require_once "../../../../resources/private/relative.php"; getRelativeDetails("cms-special"); ?>
-<?php header("Location: {$GLOBALS["SYSTEM_ROOT"]}/cms-special/admin/reset"); ?>
\ No newline at end of file +<?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 index 55e029a..a7c6c9a 100755..100644 --- a/Neutron-trunk/cms-special/admin-v2/index.php +++ b/Neutron-trunk/cms-special/admin-v2/index.php @@ -1,4 +1,12 @@ -<?php require_once "../../resources/private/relative.php"; getRelativeDetails("cms-special"); ?> +<?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> @@ -30,7 +38,7 @@ <div class="bg"></div> <main> <aside> - <div id="nav-header"> + <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"> @@ -38,78 +46,80 @@ <?php if (file_exists($GLOBALS['ORIGINAL_DOCUMENT_ROOT'] . "/NeutronCloud")): - echo("Neutron Cloud X" . trim(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/Tier"))); + echo("Cloud X" . trim(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/Tier"))); else: - echo("Neutron On-premises"); + echo($lang["admin-v2"]["on-premises"]); endif; ?> </div> </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">System</span> + <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">Content</span> + <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">Personalization</span> + <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">Features</span> + <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">Accounts</span> + <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">Region & language</span> + <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">Data & security</span> + <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">Advanced options</span> + <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">Neutron Cloud</span> + <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">Electrode Server</span> + <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 = () => { - if (item.classList.contains("selected")) { return; } - 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").innerText = item.children[1].innerText; + document.getElementById("main-title-inner").innerText = item.children[1].innerText; } }) </script> @@ -117,9 +127,21 @@ </aside> <article id="main-content"> - <span id="main-title">System</span> + <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> diff --git a/Neutron-trunk/cms-special/admin-v2/language/index.php b/Neutron-trunk/cms-special/admin-v2/language/index.php index 4c16e04..5d069d7 100755..100644 --- a/Neutron-trunk/cms-special/admin-v2/language/index.php +++ b/Neutron-trunk/cms-special/admin-v2/language/index.php @@ -1,57 +1,9 @@ <?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/\$resources/precontent.php"; ?> -<div style="text-align: center;"><select id="langselect"> - <?php +<?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 - $langs = scandir($_SERVER['DOCUMENT_ROOT'] . "/resources/i18n"); - foreach ($langs as $language) { - if ($language != "." && $language != ".." && $language != ".htaccess") { - if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/resources/i18n/" . $language . "/\$metadata.json")) { - echo("<option value=\"" . $language . "\">"); - echo(json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/resources/i18n/" . $language . "/\$metadata.json"))->localized_name . " — " . json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/resources/i18n/" . $language . "/\$metadata.json"))->name); - echo("</option>"); - } - } - } - - ?> -</select> -</p> -<input id="langselect-confirm" type="button" value="OK" onclick="changeLanguage()"></div> -<?php require_once $_SERVER['DOCUMENT_ROOT'] . "/cms-special/admin/\$resources/postcontent.php"; ?> - -<script> - -function changeLanguage() { - document.getElementById('langselect').disabled = true; - document.getElementById('langselect-confirm').disabled = true; - var formData = new FormData(); - formData.append("lang", document.getElementById('langselect').value); - $.ajax({ - type: "POST", - dataType: 'html', - url: "<?= $GLOBALS["SYSTEM_ROOT"] ?>/api/admin/instant_language_change.php", - success: function (data) { - if (data == "ok") { - document.getElementById('langselect').disabled = false; - document.getElementById('langselect-confirm').disabled = false; - ajaxPageReload(); - } else { - alert("<?= $lang["admin-errors"]["errorprefix"] ?>" + data); - document.getElementById('langselect').disabled = false; - document.getElementById('langselect-confirm').disabled = false; - } - }, - error: function (error) { - alert("<?= $lang["admin-errors"]["connerror"] ?>\n\n<?= $lang["admin-errors"]["housekeeping"][1] ?>") - document.getElementById('langselect').disabled = false; - document.getElementById('langselect-confirm').disabled = false; - }, - data: formData, - cache: false, - contentType: false, - processData: false - }); +if (isset($_GET['_'])) { + file_put_contents($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/lang", trim($_GET['_'])); } -</script>
\ No newline at end of file +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 index d4428d7..a2f09ba 100755..100644 --- a/Neutron-trunk/cms-special/admin-v2/login-old/index.php +++ b/Neutron-trunk/cms-special/admin-v2/login-old/index.php @@ -14,7 +14,7 @@ if (isset($_POST['authkey'])) { $callback = $_GET['pr']; } } else { - $callback = "{$GLOBALS["SYSTEM_ROOT"]}/cms-special/admin/home"; + $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,])); @@ -37,7 +37,7 @@ if (isset($_POST['authkey'])) { } } -if (isset($_COOKIE['_NEUTRON_ADMIN_TOKEN']) && $_COOKIE['_NEUTRON_ADMIN_TOKEN'] != "." && $_COOKIE['_NEUTRON_ADMIN_TOKEN'] != ".." && $_COOKIE['_NEUTRON_ADMIN_TOKEN'] != "/") { +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'])) { @@ -46,7 +46,7 @@ if (isset($_COOKIE['_NEUTRON_ADMIN_TOKEN']) && $_COOKIE['_NEUTRON_ADMIN_TOKEN'] $callback = $_GET['pr']; } } else { - $callback = "{$GLOBALS["SYSTEM_ROOT"]}/cms-special/admin/home"; + $callback = "{$GLOBALS["SYSTEM_ROOT"]}/cms-special/admin-v2"; } header("Location: " . $callback); } @@ -94,7 +94,7 @@ if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent")) { <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/login\">", $lang["login"]["redirect"])); ?></small></p> + <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'])) { @@ -114,7 +114,7 @@ if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent")) { <?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/login\">" . $lang["login"]["nokey"][1] . "</a> " . $lang["login"]["nokey"][2] ?></small> + <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> diff --git a/Neutron-trunk/cms-special/admin-v2/login/index.php b/Neutron-trunk/cms-special/admin-v2/login/index.php index 57a1b6a..6472865 100755..100644 --- a/Neutron-trunk/cms-special/admin-v2/login/index.php +++ b/Neutron-trunk/cms-special/admin-v2/login/index.php @@ -1,7 +1,7 @@ <?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'] != "/") { +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'])) { @@ -10,7 +10,7 @@ if (isset($_COOKIE['_NEUTRON_ADMIN_TOKEN']) && $_COOKIE['_NEUTRON_ADMIN_TOKEN'] $callback = $_GET['pr']; } } else { - $callback = "{$GLOBALS["SYSTEM_ROOT"]}/cms-special/admin/home"; + $callback = "{$GLOBALS["SYSTEM_ROOT"]}/cms-special/admin-v2"; } header("Location: " . $callback); } @@ -23,7 +23,7 @@ if (isset($_GET['pr'])) { $callback = $_GET['pr']; } } else { - $callback = "{$GLOBALS["SYSTEM_ROOT"]}/cms-special/admin/home"; + $callback = "{$GLOBALS["SYSTEM_ROOT"]}/cms-special/admin-v2"; } ?> @@ -57,7 +57,7 @@ require_once $_SERVER['DOCUMENT_ROOT'] . "/resources/private/headers/preprocesso <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/$resources/index-dark.css">'); + echo('<link rel="stylesheet" href="' . $GLOBALS["SYSTEM_ROOT"] . '/cms-special/admin-v2/$resources/index-dark.css">'); ?> <title><?php @@ -77,14 +77,14 @@ require_once $_SERVER['DOCUMENT_ROOT'] . "/resources/private/headers/preprocesso <script> window.onerror = () => { - location.href = "<?= $GLOBALS["SYSTEM_ROOT"] ?>/cms-special/admin/login-old"; + 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="display:none;z-index:99;"> + <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> @@ -103,7 +103,7 @@ require_once $_SERVER['DOCUMENT_ROOT'] . "/resources/private/headers/preprocesso <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://minteck.ro.lt/admin/NeutronManage/?_='+location.pathname.split('/')[1];" class="mdc-button mdc-button--outlined" id="loginwith-authkey"> + <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> diff --git a/Neutron-trunk/cms-special/admin-v2/logout/index.php b/Neutron-trunk/cms-special/admin-v2/logout/index.php index 5c51269..12c5319 100755..100644 --- a/Neutron-trunk/cms-special/admin-v2/logout/index.php +++ b/Neutron-trunk/cms-special/admin-v2/logout/index.php @@ -1,7 +1,7 @@ <?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'] != "/") { +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) { @@ -11,5 +11,5 @@ if (isset($_COOKIE['_NEUTRON_ADMIN_TOKEN']) && $_COOKIE['_NEUTRON_ADMIN_TOKEN'] } } } -header("Location: {$GLOBALS["SYSTEM_ROOT"]}/cms-special/admin/login"); +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 index b653ad0..1bb62df 100755..100644 --- a/Neutron-trunk/cms-special/admin-v2/logs/index.php +++ b/Neutron-trunk/cms-special/admin-v2/logs/index.php @@ -1,5 +1,5 @@ <?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/\$resources/precontent.php"; ?> +<?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 @@ -14,4 +14,4 @@ ?> </div><br><br> -<?php require_once $_SERVER['DOCUMENT_ROOT'] . "/cms-special/admin/\$resources/postcontent.php"; ?>
\ No newline at end of file +<?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 index 54dacdb..823d9d4 100755..100644 --- a/Neutron-trunk/cms-special/admin-v2/pages/add/index.php +++ b/Neutron-trunk/cms-special/admin-v2/pages/add/index.php @@ -1,5 +1,5 @@ <?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/\$resources/precontent.php"; ?> +<?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"> @@ -35,7 +35,7 @@ </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/\$resources/postcontent.php"; ?> +<?php require_once $_SERVER['DOCUMENT_ROOT'] . "/cms-special/admin-v2/\$resources/postcontent.php"; ?> <script> window.onbeforeunload = function (e) { @@ -67,7 +67,7 @@ function createPageVisual() { url: "<?= $GLOBALS["SYSTEM_ROOT"] ?>/api/admin/create_page.php", success: function (data) { if (data == "ok") { - location.href = "<?= $GLOBALS["SYSTEM_ROOT"] ?>/cms-special/admin/pages"; + 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}) diff --git a/Neutron-trunk/cms-special/admin-v2/pages/delete/index.php b/Neutron-trunk/cms-special/admin-v2/pages/delete/index.php index 4cbcb49..964c208 100755..100644 --- a/Neutron-trunk/cms-special/admin-v2/pages/delete/index.php +++ b/Neutron-trunk/cms-special/admin-v2/pages/delete/index.php @@ -4,16 +4,16 @@ if (isset($_GET['slug'])) { $currentSlug = $_GET['slug']; if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/pages/" . $currentSlug)) {} else { - header("Location: /cms-special/admin/pages"); + header("Location: /cms-special/admin-v2/pages"); require $_SERVER['DOCUMENT_ROOT'] . "/api/electrode/quit.php";quit(); } } else { - header("Location: /cms-special/admin/pages"); + 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/\$resources/precontent.php"; ?> +<?php $pageConfig = [ "domName" => "Pages", "headerName" => "Pages" ]; require_once $_SERVER['DOCUMENT_ROOT'] . "/cms-special/admin-v2/\$resources/precontent.php"; ?> <?php if ($currentSlug == "index") { @@ -37,9 +37,9 @@ if ($currentSlug == "index") { ?> <!--<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/pages/manage/?slug=<?= $currentSlug ?>'" class="sblink" title="<?= $lang["admin-pages"]["deletenl"] ?>"><?= $lang["admin-pages"]["deleten"] ?></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/pages';" class="mdc-button mdc-button--raised"> + <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> @@ -51,7 +51,7 @@ if ($currentSlug == "index") { </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/\$resources/postcontent.php"; ?> +<?php require_once $_SERVER['DOCUMENT_ROOT'] . "/cms-special/admin-v2/\$resources/postcontent.php"; ?> <script> @@ -66,7 +66,7 @@ function deletePage() { url: "<?= $GLOBALS["SYSTEM_ROOT"] ?>/api/admin/delete_page.php", success: function (data) { if (data == "ok") { - location.href = "<?= $GLOBALS["SYSTEM_ROOT"] ?>/cms-special/admin/pages"; + location.href = "<?= $GLOBALS["SYSTEM_ROOT"] ?>/cms-special/admin-v2/pages"; } else { alert("<?= $lang["admin-errors"]["errorprefix"] ?>" + data) document.getElementById('loader').classList.add('hide') diff --git a/Neutron-trunk/cms-special/admin-v2/pages/edit/index.php b/Neutron-trunk/cms-special/admin-v2/pages/edit/index.php index b198566..3044904 100755..100644 --- a/Neutron-trunk/cms-special/admin-v2/pages/edit/index.php +++ b/Neutron-trunk/cms-special/admin-v2/pages/edit/index.php @@ -4,16 +4,16 @@ if (isset($_GET['slug'])) { $currentSlug = $_GET['slug']; if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/pages/" . $currentSlug)) {} else { - header("Location: /cms-special/admin/pages"); + header("Location: /cms-special/admin-v2/pages"); require $_SERVER['DOCUMENT_ROOT'] . "/api/electrode/quit.php";quit(); } } else { - header("Location: /cms-special/admin/pages"); + 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/\$resources/precontent.php"; ?> +<?php $pageConfig = [ "domName" => "Pages", "headerName" => "Pages" ]; require_once $_SERVER['DOCUMENT_ROOT'] . "/cms-special/admin-v2/\$resources/precontent.php"; ?> <div id="editing"> <?php @@ -44,7 +44,7 @@ if (isset($_GET['slug'])) { ?> </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/\$resources/postcontent.php"; ?> +<?php require_once $_SERVER['DOCUMENT_ROOT'] . "/cms-special/admin-v2/\$resources/postcontent.php"; ?> <script> window.onbeforeunload = function (e) { @@ -75,7 +75,7 @@ function updatePage() { success: function (data) { if (data == "ok") { window.onbeforeunload = null; - location.href = "<?= $GLOBALS["SYSTEM_ROOT"] ?>/cms-special/admin/pages"; + location.href = "<?= $GLOBALS["SYSTEM_ROOT"] ?>/cms-special/admin-v2/pages"; } else { alert("<?= $lang["admin-errors"]["errorprefix"] ?>" + data) document.getElementById('loader').classList.add('hide') @@ -172,7 +172,7 @@ function updatePageHTML() { url: "<?= $GLOBALS["SYSTEM_ROOT"] ?>/api/admin/edit_page.php", success: function (data) { if (data == "ok") { - location.href = "<?= $GLOBALS["SYSTEM_ROOT"] ?>/cms-special/admin/pages"; + location.href = "<?= $GLOBALS["SYSTEM_ROOT"] ?>/cms-special/admin-v2/pages"; } else { alert("<?= $lang["admin-errors"]["errorprefix"] ?>" + data) document.getElementById('loader').classList.add('hide') diff --git a/Neutron-trunk/cms-special/admin-v2/pages/index.php b/Neutron-trunk/cms-special/admin-v2/pages/index.php index d8e1e3d..71b55db 100755..100644 --- a/Neutron-trunk/cms-special/admin-v2/pages/index.php +++ b/Neutron-trunk/cms-special/admin-v2/pages/index.php @@ -1,5 +1,5 @@ <?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/\$resources/precontent.php"; ?> +<?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 @@ -22,18 +22,18 @@ $sizetotal = $sizetotal + $size; $sizestr = str_replace(".", ",", $sizestr); if ($page == "index"): ?> -<!-- echo("<li><a href='/cms-special/admin/pages/manage/?slug={$page}' class='sblink' title='{$lang['admin-pages']['lore']}'>{$lang['admin-pages']['home']}</a> ({$page}), {$typestr}, {$sizestr}</li>");--> +<!-- 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/pages/edit/?slug=<?= $page ?>" title="<?= $lang["admin-pages"]["editl"] ?>" class="mdc-button mdc-card__action mdc-card__action--button"> + <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/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> + <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: ?> @@ -43,12 +43,12 @@ <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/pages/edit/?slug=<?= $page ?>" title="<?= $lang["admin-pages"]["editl"] ?>" class="mdc-button mdc-card__action mdc-card__action--button"> + <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/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/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> + <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; @@ -57,10 +57,10 @@ ?> </div> <p><div style="text-align: center;"> - <a title="<?= $lang["admin-pages"]["alore"] ?>" href="<?= $GLOBALS["SYSTEM_ROOT"] ?>/cms-special/admin/pages/add" class="mdc-button mdc-button--outlined"> + <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/\$resources/postcontent.php"; ?>
\ No newline at end of file +<?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 index d7118ba..cf7b67e 100755..100644 --- a/Neutron-trunk/cms-special/admin-v2/pages/rename/index.php +++ b/Neutron-trunk/cms-special/admin-v2/pages/rename/index.php @@ -4,16 +4,16 @@ if (isset($_GET['slug'])) { $currentSlug = $_GET['slug']; if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/pages/" . $currentSlug)) {} else { - header("Location: /cms-special/admin/pages"); + header("Location: /cms-special/admin-v2/pages"); require $_SERVER['DOCUMENT_ROOT'] . "/api/electrode/quit.php";quit(); } } else { - header("Location: /cms-special/admin/pages"); + 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/\$resources/precontent.php"; ?> +<?php $pageConfig = [ "domName" => "Pages", "headerName" => "Pages" ]; require_once $_SERVER['DOCUMENT_ROOT'] . "/cms-special/admin-v2/\$resources/precontent.php"; ?> <?php if ($currentSlug == "index") { @@ -51,7 +51,7 @@ if ($currentSlug == "index") { </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/\$resources/postcontent.php"; ?> +<?php require_once $_SERVER['DOCUMENT_ROOT'] . "/cms-special/admin-v2/\$resources/postcontent.php"; ?> <script> @@ -67,7 +67,7 @@ function renamePage() { url: "<?= $GLOBALS["SYSTEM_ROOT"] ?>/api/admin/rename_page.php", success: function (data) { if (data == "ok") { - location.href = "<?= $GLOBALS["SYSTEM_ROOT"] ?>/cms-special/admin/pages"; + location.href = "<?= $GLOBALS["SYSTEM_ROOT"] ?>/cms-special/admin-v2/pages"; } else { alert("<?= $lang["admin-errors"]["errorprefix"] ?>" + data) document.getElementById('loader').classList.add('hide') diff --git a/Neutron-trunk/cms-special/admin-v2/password/index.php b/Neutron-trunk/cms-special/admin-v2/password/index.php new file mode 100644 index 0000000..2ea9e60 --- /dev/null +++ b/Neutron-trunk/cms-special/admin-v2/password/index.php @@ -0,0 +1,51 @@ +<?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 index 58be08f..2676076 100755..100644 --- a/Neutron-trunk/cms-special/admin-v2/plugins/index.php +++ b/Neutron-trunk/cms-special/admin-v2/plugins/index.php @@ -1,7 +1,7 @@ <?php require_once "../../../resources/private/relative.php"; getRelativeDetails("cms-special"); ?> <?php -$pageConfig = [ "domName" => "Extensions", "headerName" => "Extensions" ]; require_once $_SERVER['DOCUMENT_ROOT'] . "/cms-special/admin/\$resources/precontent.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 @@ -30,7 +30,7 @@ $pageConfig = [ "domName" => "Extensions", "headerName" => "Extensions" ]; requi } ?> -<?php require_once $_SERVER['DOCUMENT_ROOT'] . "/cms-special/admin/\$resources/postcontent.php"; ?> +<?php require_once $_SERVER['DOCUMENT_ROOT'] . "/cms-special/admin-v2/\$resources/postcontent.php"; ?> <script> diff --git a/Neutron-trunk/cms-special/admin-v2/reset/index.php b/Neutron-trunk/cms-special/admin-v2/reset/index.php index efa215c..5c1471e 100755..100644 --- a/Neutron-trunk/cms-special/admin-v2/reset/index.php +++ b/Neutron-trunk/cms-special/admin-v2/reset/index.php @@ -1,5 +1,5 @@ <?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/\$resources/precontent.php"; ?> +<?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> @@ -24,7 +24,7 @@ <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/\$resources/postcontent.php"; ?> +<?php require_once $_SERVER['DOCUMENT_ROOT'] . "/cms-special/admin-v2/\$resources/postcontent.php"; ?> <script> @@ -39,7 +39,7 @@ function resetKeep() { url: "<?= $GLOBALS["SYSTEM_ROOT"] ?>/api/admin/reset.php", success: function (data) { if (data == "ok") { - window.parent.location.href = "<?= $GLOBALS["SYSTEM_ROOT"] ?>/cms-special/admin/resetted"; + 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}) @@ -68,7 +68,7 @@ function resetClear() { url: "<?= $GLOBALS["SYSTEM_ROOT"] ?>/api/admin/reset.php", success: function (data) { if (data == "ok") { - window.parent.location.href = "<?= $GLOBALS["SYSTEM_ROOT"] ?>/cms-special/admin/resetted"; + 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}) diff --git a/Neutron-trunk/cms-special/admin-v2/resetted/index.php b/Neutron-trunk/cms-special/admin-v2/resetted/index.php index 21fe104..21fe104 100755..100644 --- a/Neutron-trunk/cms-special/admin-v2/resetted/index.php +++ b/Neutron-trunk/cms-special/admin-v2/resetted/index.php diff --git a/Neutron-trunk/cms-special/admin-v2/stats/index.php b/Neutron-trunk/cms-special/admin-v2/stats/index.php index 81b4b69..28fd46d 100755..100644 --- a/Neutron-trunk/cms-special/admin-v2/stats/index.php +++ b/Neutron-trunk/cms-special/admin-v2/stats/index.php @@ -1,5 +1,5 @@ <?php require_once "../../../resources/private/relative.php"; getRelativeDetails("cms-special"); ?> -<?php $pageConfig = [ "domName" => "Statistiques", "headerName" => "Statistiques" ]; require_once $_SERVER['DOCUMENT_ROOT'] . "/cms-special/admin/\$resources/precontent.php"; ?> +<?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 @@ -277,4 +277,4 @@ foreach ($dates as $date) { </tbody> </table> <?php endif; ?> -<?php require_once $_SERVER['DOCUMENT_ROOT'] . "/cms-special/admin/\$resources/precontent.php"; ?>
\ No newline at end of file +<?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 index ed6d9db..d0890d0 100755..100644 --- a/Neutron-trunk/cms-special/admin-v2/widgets/index.php +++ b/Neutron-trunk/cms-special/admin-v2/widgets/index.php @@ -1,5 +1,5 @@ <?php require_once "../../../resources/private/relative.php"; getRelativeDetails("cms-special"); ?> <?php -header("Location: {$GLOBALS["SYSTEM_ROOT"]}/cms-special/admin/plugins"); +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 |