aboutsummaryrefslogtreecommitdiff
path: root/Neutron-trunk/cms-special/admin-v2/$resources/session.php
diff options
context:
space:
mode:
Diffstat (limited to 'Neutron-trunk/cms-special/admin-v2/$resources/session.php')
-rw-r--r--Neutron-trunk/cms-special/admin-v2/$resources/session.php11
1 files changed, 11 insertions, 0 deletions
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