diff --git a/common/account_utils.php b/common/account_utils.php new file mode 100644 index 0000000..6d67431 --- /dev/null +++ b/common/account_utils.php @@ -0,0 +1,45 @@ +prepare($sql); + $stmt->execute($variables); + return $stmt->fetch(); + +} + +function db_execute_all($sql, $variables=[]): bool|array +{ + global $pdo; + + $stmt = $pdo->prepare($sql); + $stmt->execute($variables); + return $stmt->fetchAll(); + +} + +function db_query($sql): bool|PDOStatement +{ + global $pdo; + + return $pdo->query($sql); +} diff --git a/styles/base.css b/styles/base.css index 0fe5414..fe34949 100644 --- a/styles/base.css +++ b/styles/base.css @@ -8,6 +8,11 @@ body { margin: 0; + + display: flex; + flex-direction: column; + + min-height: 100vh; } header { @@ -17,6 +22,8 @@ header { gap: 1rem; + flex: 0; + justify-content: space-between; background: var(--flax); @@ -25,6 +32,12 @@ header { main { flex: 1; + + margin: 16px; +} + +footer { + flex: 0; } #content { @@ -38,6 +51,29 @@ main { } } +/* Error box */ + +.errorbox { + display: block; + text-align: center; +} + +body > .errorbox { + flex: 1; + margin: auto; + + align-content: center; +} + +.errorbox > * { + margin: 5px; +} + +.errorbox > .icon { + color: var(--error-fg, red); + font-size: 4em; +} + /* Font things */ .bc-1 { font-weight: 700; diff --git a/views/home.php b/views/home.php index 510bb4c..93f70e4 100644 --- a/views/home.php +++ b/views/home.php @@ -7,11 +7,10 @@ -

ByeCorps ID

+
+

ByeCorps ID

+
- - - diff --git a/views/partials/error.php b/views/partials/error.php new file mode 100644 index 0000000..0ff6acf --- /dev/null +++ b/views/partials/error.php @@ -0,0 +1,13 @@ + + +
+
+ +
+

An error occurred.

+

+
diff --git a/views/partials/head.php b/views/partials/head.php index 121a746..4fb9c30 100644 --- a/views/partials/head.php +++ b/views/partials/head.php @@ -2,7 +2,7 @@ - +
- Login disabled. +
diff --git a/views/profile.php b/views/profile.php new file mode 100644 index 0000000..0859187 --- /dev/null +++ b/views/profile.php @@ -0,0 +1,31 @@ + + + + + + + + + + + +

+ + + + + diff --git a/views/signup.php b/views/signup.php new file mode 100644 index 0000000..b3d9bbc --- /dev/null +++ b/views/signup.php @@ -0,0 +1 @@ +