From 0a0cacac3bd3d233113ad3b1a8e93f9941df38ec Mon Sep 17 00:00:00 2001 From: marc-go Date: Sat, 24 Jan 2026 19:19:59 +0100 Subject: [PATCH] Begin Setup --- api/setup/setup.php | 25 ++++++++++++++ front/css/setup.css | 81 +++++++++++++++++++++++++++++++++++++++++++++ front/index.php | 3 +- front/setup.html | 23 ++++++++++++- 4 files changed, 129 insertions(+), 3 deletions(-) create mode 100644 api/setup/setup.php create mode 100644 front/css/setup.css diff --git a/api/setup/setup.php b/api/setup/setup.php new file mode 100644 index 0000000..58a7765 --- /dev/null +++ b/api/setup/setup.php @@ -0,0 +1,25 @@ +setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); + +$sql = " +CREATE TABLE IF NOT EXISTS users ( + id INT(11) PRIMARY KEY AUTOINCREMENT, + username VARCHAR(30) PRIMARY KEY, + mail VARCHAR(50), + passwd VARCHAR(100) +) +"; \ No newline at end of file diff --git a/front/css/setup.css b/front/css/setup.css new file mode 100644 index 0000000..a74f0b1 --- /dev/null +++ b/front/css/setup.css @@ -0,0 +1,81 @@ +body { + font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif; + display: grid; + place-items: center; + height: 100vh; + overflow: hidden; + background-color: #fafafa; +} + +.page-content { + padding: 10px; + width: 350px; + height: 625px; + text-align: center; + box-shadow: 0 2px 100px rgba(0, 0, 0, 0.1), 0 8px 16px rgba(0, 0, 0, 0.1); + border-radius: 30pt; + background-color: #ffffff; + display: grid; + place-items: center; + transition: all 0.3s ease-in-out; +} + +.page { + display: flex; + flex-direction: column; + align-items: center; + text-align: center; + gap: 10px; + transition: all 0.3s ease-in-out; +} + +.header { + position: relative; + top: 10px; + bottom: 10px; +} + +#control { + display: none; +} + +h1 { + font-size: 30pt; +} + +h2 { + font-size: 20pt; +} + +input { + border: 1px solid #e0e0e0; + width: 200px; + height: 30px; + border-radius: 10pt; + padding: 5px; +} + +input:focus { + outline: 2px solid #000000; +} + +button { + margin-bottom: 10px; + width: 100px; + height: 30px; + background-color: #000000; + color: #ffffff; + display: grid; + place-items: center; + text-align: center; + border: none; + transition: all 0.3s ease-in-out; +} + +button:hover { + transform: scale(1.1); +} + +button:active { + transform: scale(0.8); +} \ No newline at end of file diff --git a/front/index.php b/front/index.php index 52809d4..bb99f22 100644 --- a/front/index.php +++ b/front/index.php @@ -9,11 +9,10 @@ * By RootMarc */ - require "main.php"; -$mcServ = new mgServ(); +$mcServ = new mcServ(); if (!$mcServ->checkConf()) { header("Location: /setup.html"); diff --git a/front/setup.html b/front/setup.html index 5d2353f..69c32af 100644 --- a/front/setup.html +++ b/front/setup.html @@ -4,8 +4,29 @@ mgServ // Setup + -
+
+

mcServControl

+

Setup

+
+
+
+
+

Admin User

+

Create an Admin User

+ +

+

+

+

+ + +
+
+
+
\ No newline at end of file