diff --git a/about.php b/about.php index c7312a7..a50808e 100644 --- a/about.php +++ b/about.php @@ -2,14 +2,14 @@ - +
@@ -53,7 +53,7 @@

To mrHDash...

- + \ No newline at end of file diff --git a/account.php b/account.php index 0e7be57..2c9d141 100644 --- a/account.php +++ b/account.php @@ -15,34 +15,48 @@ if (isset($_SESSION["loggedin"]) && $_SESSION["loggedin"] === true) { ?>
-

Account settings

-
- Invite Codes"; - $token_request = mysqli_query($conn, "SELECT * FROM tokens WHERE used = 0"); - while ($token = mysqli_fetch_array($token_request)) { - ?> - - - - -
-

Danger ahead

+

Settings

+

Account

Resetting your password regularly is a good way of keeping your account safe

Reset Password

Don't leave! I'm with the science team!

Logout -
+ + +
+

Admin controlls

+
+

Invite Codes

+ +
+ + + +
+

Database info

+ Address: ".$database['ip'].":".$database['port']."

"; + echo "

Username: ".$database['username']."

"; + echo "

Password: Not displayed

"; + echo "

Database: ".$database['database']."

"; + ?> +
+ diff --git a/app/image/edit_author.php b/app/image/edit_author.php index f1263c6..2d3f52f 100644 --- a/app/image/edit_author.php +++ b/app/image/edit_author.php @@ -28,14 +28,14 @@ if (isset($_POST['submit'])) { if (mysqli_stmt_execute($stmt)) { ?> connect_error) { - echo ""; + ?> + + data as $settings_list) { + foreach ($settings_list->website as $website) { + foreach ($website->database as $database) { + + } + foreach ($website->debug as $debug) { + + } + foreach ($website->plugins as $plugins) { + + } + } +} +$database = $user_settings["website"]["database"]; +$debug = $user_settings["website"]["debug"]; +$plugins = $user_settings["website"]["plugins"]; diff --git a/app/settings/user_settings.json b/app/settings/user_settings.json new file mode 100644 index 0000000..944bc95 --- /dev/null +++ b/app/settings/user_settings.json @@ -0,0 +1,50 @@ +{ + "website": { + "name": "Only Legs", + "description": "A simple gallery with multiple users in mind", + "welcome_msg": [ + "*internal screaming*", + "Don't forget to drink water!", + "Bruh", + "Fluffy made this!", + "maybe", + "I'm gay", + "I wish we were better strangers.", + "Just like Minecraft!", + "If I were you, I'd run now", + "This is the part where I kill you", + "SILICA GEL \"DO NOT EAT\".", + "This was supposed to be a simple project", + "AAAAAAAAAAAAAAAAAAAA", + "Let me out", + "nice", + "I'm glad you're here", + "The weather is dry", + "Need me a man 👀", + "Gods die too.", + "Eat hotchip and lie" + ], + "license":"GPL 3.0", + "database": { + "ip": "192.168.0.79", + "port": "3306", + "username": "uwu", + "password": "fennec621", + "database": "gallery" + }, + "debug": { + "testing": true, + "version": "22.09.08" + } + }, + "plugins": { + "sniffle": { + "location": "Sniffle/sniffle.js", + "using": true + }, + "flyout": { + "location": "Flyout/flyout.js", + "using": true + } + } +} \ No newline at end of file diff --git a/css/main.css b/css/main.css index 3734153..a3b2265 100644 --- a/css/main.css +++ b/css/main.css @@ -172,6 +172,31 @@ nav .btn { margin-bottom: 1rem; } +.gallery-order { + margin-bottom: 1rem; + display: flex; + flex-direction: row; +} +.gallery-order h1, +.gallery-order h2, +.gallery-order h3, +.gallery-order h4, +.gallery-order h5 { + font-family: "Lexend Deca", sans-serif; +} +.gallery-order p, +.gallery-order a, +.gallery-order button, +.gallery-order input { + font-family: "Secular One", sans-serif; +} +.gallery-order > * { + margin-right: 0.5rem; +} +.gallery-order > *:last-child { + margin-right: 0; +} + .gallery-root { margin-bottom: 1rem; padding: 0.25rem; @@ -528,11 +553,34 @@ nav .btn { font-family: "Secular One", sans-serif; } -/* - |------------------------------------------------------------- - | SIGNUP - |------------------------------------------------------------- -*/ +.admin-root { + margin-bottom: 1rem; + padding: 0.5rem 0.5rem 0 0.5rem; + width: calc(100% - 1.4rem); + background-color: #151515; + color: #E8E3E3; + border-radius: 0rem; + border: 0.2rem solid #8C977D; + box-shadow: 6px 6px 2px rgba(21, 21, 21, 0.5333333333); +} +.admin-root > * { + margin-top: 0; + margin-bottom: 0.5rem; +} +.admin-root h1, +.admin-root h2, +.admin-root h3, +.admin-root h4, +.admin-root h5 { + font-family: "Lexend Deca", sans-serif; +} +.admin-root p, +.admin-root a, +.admin-root button, +.admin-root input { + font-family: "Secular One", sans-serif; +} + .signup-root { margin-bottom: 1rem; padding: 0.5rem 0.5rem 0 0.5rem; @@ -562,11 +610,6 @@ nav .btn { font-family: "Secular One", sans-serif; } -/* - |------------------------------------------------------------- - | LOGIN - |------------------------------------------------------------- -*/ .login-root { margin-bottom: 1rem; padding: 0.5rem 0.5rem 0 0.5rem; diff --git a/css/normalize.css b/css/normalize.css deleted file mode 100644 index 192eb9c..0000000 --- a/css/normalize.css +++ /dev/null @@ -1,349 +0,0 @@ -/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */ - -/* Document - ========================================================================== */ - -/** - * 1. Correct the line height in all browsers. - * 2. Prevent adjustments of font size after orientation changes in iOS. - */ - -html { - line-height: 1.15; /* 1 */ - -webkit-text-size-adjust: 100%; /* 2 */ -} - -/* Sections - ========================================================================== */ - -/** - * Remove the margin in all browsers. - */ - -body { - margin: 0; -} - -/** - * Render the `main` element consistently in IE. - */ - -main { - display: block; -} - -/** - * Correct the font size and margin on `h1` elements within `section` and - * `article` contexts in Chrome, Firefox, and Safari. - */ - -h1 { - font-size: 2em; - margin: 0.67em 0; -} - -/* Grouping content - ========================================================================== */ - -/** - * 1. Add the correct box sizing in Firefox. - * 2. Show the overflow in Edge and IE. - */ - -hr { - box-sizing: content-box; /* 1 */ - height: 0; /* 1 */ - overflow: visible; /* 2 */ -} - -/** - * 1. Correct the inheritance and scaling of font size in all browsers. - * 2. Correct the odd `em` font sizing in all browsers. - */ - -pre { - font-family: monospace, monospace; /* 1 */ - font-size: 1em; /* 2 */ -} - -/* Text-level semantics - ========================================================================== */ - -/** - * Remove the gray background on active links in IE 10. - */ - -a { - background-color: transparent; -} - -/** - * 1. Remove the bottom border in Chrome 57- - * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari. - */ - -abbr[title] { - border-bottom: none; /* 1 */ - text-decoration: underline; /* 2 */ - text-decoration: underline dotted; /* 2 */ -} - -/** - * Add the correct font weight in Chrome, Edge, and Safari. - */ - -b, -strong { - font-weight: bolder; -} - -/** - * 1. Correct the inheritance and scaling of font size in all browsers. - * 2. Correct the odd `em` font sizing in all browsers. - */ - -code, -kbd, -samp { - font-family: monospace, monospace; /* 1 */ - font-size: 1em; /* 2 */ -} - -/** - * Add the correct font size in all browsers. - */ - -small { - font-size: 80%; -} - -/** - * Prevent `sub` and `sup` elements from affecting the line height in - * all browsers. - */ - -sub, -sup { - font-size: 75%; - line-height: 0; - position: relative; - vertical-align: baseline; -} - -sub { - bottom: -0.25em; -} - -sup { - top: -0.5em; -} - -/* Embedded content - ========================================================================== */ - -/** - * Remove the border on images inside links in IE 10. - */ - -img { - border-style: none; -} - -/* Forms - ========================================================================== */ - -/** - * 1. Change the font styles in all browsers. - * 2. Remove the margin in Firefox and Safari. - */ - -button, -input, -optgroup, -select, -textarea { - font-family: inherit; /* 1 */ - font-size: 100%; /* 1 */ - line-height: 1.15; /* 1 */ - margin: 0; /* 2 */ -} - -/** - * Show the overflow in IE. - * 1. Show the overflow in Edge. - */ - -button, -input { /* 1 */ - overflow: visible; -} - -/** - * Remove the inheritance of text transform in Edge, Firefox, and IE. - * 1. Remove the inheritance of text transform in Firefox. - */ - -button, -select { /* 1 */ - text-transform: none; -} - -/** - * Correct the inability to style clickable types in iOS and Safari. - */ - -button, -[type="button"], -[type="reset"], -[type="submit"] { - -webkit-appearance: button; -} - -/** - * Remove the inner border and padding in Firefox. - */ - -button::-moz-focus-inner, -[type="button"]::-moz-focus-inner, -[type="reset"]::-moz-focus-inner, -[type="submit"]::-moz-focus-inner { - border-style: none; - padding: 0; -} - -/** - * Restore the focus styles unset by the previous rule. - */ - -button:-moz-focusring, -[type="button"]:-moz-focusring, -[type="reset"]:-moz-focusring, -[type="submit"]:-moz-focusring { - outline: 1px dotted ButtonText; -} - -/** - * Correct the padding in Firefox. - */ - -fieldset { - padding: 0.35em 0.75em 0.625em; -} - -/** - * 1. Correct the text wrapping in Edge and IE. - * 2. Correct the color inheritance from `fieldset` elements in IE. - * 3. Remove the padding so developers are not caught out when they zero out - * `fieldset` elements in all browsers. - */ - -legend { - box-sizing: border-box; /* 1 */ - color: inherit; /* 2 */ - display: table; /* 1 */ - max-width: 100%; /* 1 */ - padding: 0; /* 3 */ - white-space: normal; /* 1 */ -} - -/** - * Add the correct vertical alignment in Chrome, Firefox, and Opera. - */ - -progress { - vertical-align: baseline; -} - -/** - * Remove the default vertical scrollbar in IE 10+. - */ - -textarea { - overflow: auto; -} - -/** - * 1. Add the correct box sizing in IE 10. - * 2. Remove the padding in IE 10. - */ - -[type="checkbox"], -[type="radio"] { - box-sizing: border-box; /* 1 */ - padding: 0; /* 2 */ -} - -/** - * Correct the cursor style of increment and decrement buttons in Chrome. - */ - -[type="number"]::-webkit-inner-spin-button, -[type="number"]::-webkit-outer-spin-button { - height: auto; -} - -/** - * 1. Correct the odd appearance in Chrome and Safari. - * 2. Correct the outline style in Safari. - */ - -[type="search"] { - -webkit-appearance: textfield; /* 1 */ - outline-offset: -2px; /* 2 */ -} - -/** - * Remove the inner padding in Chrome and Safari on macOS. - */ - -[type="search"]::-webkit-search-decoration { - -webkit-appearance: none; -} - -/** - * 1. Correct the inability to style clickable types in iOS and Safari. - * 2. Change font properties to `inherit` in Safari. - */ - -::-webkit-file-upload-button { - -webkit-appearance: button; /* 1 */ - font: inherit; /* 2 */ -} - -/* Interactive - ========================================================================== */ - -/* - * Add the correct display in Edge, IE 10+, and Firefox. - */ - -details { - display: block; -} - -/* - * Add the correct display in all browsers. - */ - -summary { - display: list-item; -} - -/* Misc - ========================================================================== */ - -/** - * Add the correct display in IE 10+. - */ - -template { - display: none; -} - -/** - * Add the correct display in IE 10. - */ - -[hidden] { - display: none; -} diff --git a/css/scss/_body.scss b/css/scss/_body.scss index 219618f..95072f3 100644 --- a/css/scss/_body.scss +++ b/css/scss/_body.scss @@ -26,6 +26,22 @@ } } +.gallery-order { + @include defaultFont(); + + margin-bottom: 1rem; + + display: flex; + flex-direction: row; + + & > * { + margin-right: 0.5rem; + } + & > *:last-child { + margin-right: 0; + } +} + .gallery-root { margin-bottom: 1rem; padding: 0.25rem; @@ -263,24 +279,16 @@ @include defaultDecoration($green); @include defaultFont(); } - -/* - |------------------------------------------------------------- - | SIGNUP - |------------------------------------------------------------- -*/ +.admin-root { + @include defaultDecoration($green); + @include defaultFont(); +} .signup-root { @include defaultDecoration($green); @include defaultFont(); // By default its hidden, in place is login display: none; } - -/* - |------------------------------------------------------------- - | LOGIN - |------------------------------------------------------------- -*/ .login-root { @include defaultDecoration($green); @include defaultFont(); diff --git a/default.json b/default.json deleted file mode 100644 index 9c531dd..0000000 --- a/default.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "name": "Only Legs", - "description": "A simple gallery with multiple users in mind", - "welcome_msg": [ - "*internal screaming*", - "Don't forget to drink water!", - "Bruh", - "Fluffy made this!", - "maybe", - "I'm gay", - "I wish we were better strangers.", - "Just like Minecraft!", - "If I were you, I'd run now", - "This is the part where I kill you", - "SILICA GEL \"DO NOT EAT\".", - "This was supposed to be a simple project", - "AAAAAAAAAAAAAAAAAAAA", - "Let me out", - "nice", - "I'm glad you're here", - "The weather is dry", - "Need me a man 👀", - "Gods die too.", - "Eat hotchip and lie" - ], - "database": { - "ip": "192.168.0.79", - "port": "3306", - "username": "uwu", - "password": "fennec621", - "database": "gallery" - }, - "testing": true, - "version": "15.08.22", - "license":"GPL 3.0" -} \ No newline at end of file diff --git a/image.php b/image.php index 7fde9df..c7a32cc 100644 --- a/image.php +++ b/image.php @@ -2,7 +2,7 @@ - + @@ -18,8 +18,13 @@ | many rewrites and hours of learning.... |------------------------------------------------------------- */ - include __DIR__."/ui/required.php"; - include __DIR__."/ui/nav.php"; + include "ui/required.php"; + include "ui/nav.php"; + + include "app/image/get_image_info.php"; + include "app/image/image_privilage.php"; + + include "app/format/string_to_tags.php"; /* @@ -372,7 +377,7 @@ } ?> - + \ No newline at end of file diff --git a/index.php b/index.php index 0b0e949..8d8d2e0 100644 --- a/index.php +++ b/index.php @@ -2,18 +2,18 @@ - + @@ -40,14 +40,19 @@ include __DIR__."/ui/nav.php"; } // Random welcome message - $import_welcome = file_get_contents("default.json"); - $import_decode = json_decode($import_welcome, true); - $welcome_message = $import_decode['welcome_msg']; + $welcome_message = $user_settings['website']['welcome_msg']; echo "

".$welcome_message[array_rand($welcome_message, 1)]."

"; ?> -