diff --git a/account.php b/account.php
index 100e762..76f2c63 100644
--- a/account.php
+++ b/account.php
@@ -164,18 +164,77 @@
Invite Codes
-
-
- 0) {
+ while ($token = mysqli_fetch_array($token_request)) {
+ ?>
+
+
+
+
+
+
+ No invite codes/tokens :c
+ ";
+ }
?>
+
+
Admin
@@ -207,7 +266,20 @@
}
?>
-
+
+
diff --git a/app/account/load.php b/app/account/load.php
new file mode 100644
index 0000000..6304e0b
--- /dev/null
+++ b/app/account/load.php
@@ -0,0 +1,35 @@
+is_admin($conn, $_SESSION['id'])) {
+ ?>
+
+
ID
User IP
Action
Time
+
+
+
+
+
+
+ ".$log_time->format('Y-m-d H:i:s T')." (".$diff->time($log['time']).")";
+ ?>
+
+ is_admin($conn, $_SESSION['id'])) {
+ // Prepare sql
+ $sql = "UPDATE tokens SET used = True WHERE code = ?";
+ $stmt = mysqli_prepare($conn, $sql);
+ mysqli_stmt_bind_param($stmt, "s", $param_token);
+ $param_token = $_POST['regenerate'];
+
+ if (mysqli_stmt_execute($stmt)) {
+ // Generate Token
+ $token_array = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890abcdefghijklmnopqrstuvwxyz';
+ $new_token = substr(str_shuffle($token_array), 0, 15);
+
+ if (mysqli_query($conn, "INSERT INTO tokens (code, used) VALUES('$new_token', 0)")) {
+ echo true;
+ } else {
+ echo false;
+ }
+ } else {
+ echo false;
+ }
+ }
+}
+
+if (isset($_POST['generate'])) {
+ if ($user_info->is_admin($conn, $_SESSION['id'])) {
+ // Generate Token
+ $token_array = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890abcdefghijklmnopqrstuvwxyz';
+ $new_token = substr(str_shuffle($token_array), 0, 15);
+
+ if (mysqli_query($conn, "INSERT INTO tokens (code, used) VALUES('$new_token', 0)")) {
+ echo true;
+ } else {
+ echo false;
+ }
+ }
+}
+
+if (isset($_POST['delete'])) {
+ if ($user_info->is_admin($conn, $_SESSION['id'])) {
+ // Prepare sql
+ $sql = "UPDATE tokens SET used = True WHERE id = ?";
+ $stmt = mysqli_prepare($conn, $sql);
+ mysqli_stmt_bind_param($stmt, "i", $param_token);
+ $param_token = $_POST['delete'];
+
+ if (mysqli_stmt_execute($stmt)) {
+ echo true;
+ } else {
+ echo false;
+ }
+ }
+}
diff --git a/app/sanity/sanity.php b/app/sanity/sanity.php
index 0537420..def5d9f 100644
--- a/app/sanity/sanity.php
+++ b/app/sanity/sanity.php
@@ -1,7 +1,7 @@
0 {
+ border-radius: calc($rad - 0.5rem);
+ } @else {
+ border-radius: calc(3px * 2);
+ }
+ border: $fg $border-thickness solid;
+ opacity: 0;
+
+ transition: all 0.1s ease-in-out;
+
+ pointer-events: none;
+ }
+ */
}
.btn:hover {
outline: #E8E3E3 0.2rem solid;
color: #E8E3E3;
cursor: pointer;
+ /*
+ &::after {
+ opacity: 1;
+ width: calc(100% + calc($border-thickness * 2));
+ height: calc(100% + calc($border-thickness * 2));
+ top: calc($border-thickness * -1);
+ left: calc($border-thickness * -1);
+ }
+ */
}
.btn:where(input[type=file])::-webkit-file-upload-button {
margin: -0.25rem 0.5rem -0.25rem -0.25rem;
diff --git a/css/main.scss b/css/main.scss
index 422f187..a3fcdc1 100644
--- a/css/main.scss
+++ b/css/main.scss
@@ -68,6 +68,7 @@ body {
width: 100%;
+ position: relative;
display: block;
box-sizing: border-box;
@@ -86,11 +87,45 @@ body {
transition: outline 0.1s cubic-bezier(.19, 1, .22, 1);
+ /*
+ &::after {
+ content: "";
+ position: absolute;
+ box-sizing: border-box;
+ width: calc(100% + calc($border-thickness * 4));
+ height: calc(100% + calc($border-thickness * 4));
+ top: calc($border-thickness * -2);
+ left: calc($border-thickness * -2);
+ z-index: +1;
+ @if calc($rad - 0.5rem) > 0 {
+ border-radius: calc($rad - 0.5rem);
+ } @else {
+ border-radius: calc(3px * 2);
+ }
+ border: $fg $border-thickness solid;
+ opacity: 0;
+
+ transition: all 0.1s ease-in-out;
+
+ pointer-events: none;
+ }
+ */
+
&:hover {
outline: $white 0.2rem solid;
color: $fg;
cursor: pointer;
+
+ /*
+ &::after {
+ opacity: 1;
+ width: calc(100% + calc($border-thickness * 2));
+ height: calc(100% + calc($border-thickness * 2));
+ top: calc($border-thickness * -1);
+ left: calc($border-thickness * -1);
+ }
+ */
}
&:where(input[type="file"])::file-selector-button {
diff --git a/css/scss/_body.scss b/css/scss/_body.scss
index d324de2..da6626d 100644
--- a/css/scss/_body.scss
+++ b/css/scss/_body.scss
@@ -975,7 +975,7 @@
color: #00000000;
position: relative;
- &::after {
+ &::before {
content: "Hover to show code";
color: $fg;
@@ -988,12 +988,26 @@
&:hover {
color: $fg;
- &::after {
+ &::before {
content: "";
}
}
}
+.btn-code-reg {
+ width: auto !important;
+ display: inline-block !important;
+
+ img {
+ margin: auto 2px;
+
+ width: 1.25rem;
+ height: 1.25rem;
+
+ display: block;
+ }
+}
+
#sanityCheck {
padding: 0;