diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..bb232ea --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +REFRENCE_ONLY/ +.DS_Store diff --git a/auth.php b/auth.php new file mode 100644 index 0000000..003e659 --- /dev/null +++ b/auth.php @@ -0,0 +1,9 @@ + diff --git a/config.php b/config.php index 1519378..992d932 100644 --- a/config.php +++ b/config.php @@ -11,6 +11,12 @@ if (!isset($_SERVER['HTTP_X_REQUESTED_WITH']) || strtolower($_SERVER['HTTP_X_REQ exit('Access denied'); } +session_start(); +if (!isset($_SESSION['logged_in']) || $_SESSION['logged_in'] !== true) { + http_response_code(401); + exit(json_encode(['error' => 'Unauthorized'])); +} + // Configuration data $config = [ 'api' => [ diff --git a/index.php b/index.php index 701c760..1546310 100644 --- a/index.php +++ b/index.php @@ -1,3 +1,6 @@ + @@ -251,11 +254,29 @@ padding: 20px; } } + + .logout-btn { + position: absolute; + top: 20px; + right: 20px; + background: rgba(255, 255, 255, 0.2); + color: white; + text-decoration: none; + padding: 8px 15px; + border-radius: 4px; + font-size: 14px; + transition: background 0.2s; + } + + .logout-btn:hover { + background: rgba(255, 255, 255, 0.3); + }
+ Logout

OMG Static - H&M v1.01

Select an action and configure the required parameters

diff --git a/login.php b/login.php new file mode 100644 index 0000000..3208d14 --- /dev/null +++ b/login.php @@ -0,0 +1,152 @@ + + + + + + + Login - OMG Static - H&M + + + + + + +
+
+

OMG Static - H&M

+

Please login to continue

+
+ + +
+ + +
+
+ + +
+ +
+ + +
+ + +
+
+ + diff --git a/logout.php b/logout.php new file mode 100644 index 0000000..6cba1e4 --- /dev/null +++ b/logout.php @@ -0,0 +1,6 @@ +