orm to frontend connected. for a time, i'll be trying multiple solutions at once.

This commit is contained in:
2025-05-16 16:41:07 -06:00
parent 228cf1137b
commit a93c30c40f
38 changed files with 1442 additions and 2407 deletions
+8 -8
View File
@@ -1,7 +1,7 @@
<?php
require_once 'functions/init.php';
require_once 'functions/functions.php';
include_once 'functions/account_functions.php';
require_once 'functions/core.php';
include_once 'functions/user.php';
// UI Components
foreach (glob('components/user/*.php') as $file)
@@ -45,7 +45,7 @@ if (isset($_POST['form_id'])) {
break;
case 'reset_pw_form':
$msg = reset_password(
($_SESSION['role_id'] <= admin && $_SESSION['user_id'] != $_POST['user_id'] ? $_POST['user_id'] : $_SESSION['user_id']),
($_SESSION['role_id'] <= developer && $_SESSION['user_id'] != $_POST['user_id'] ? $_POST['user_id'] : $_SESSION['user_id']),
$_POST['new_pw'],
$_POST['verify_new_pw']
);
@@ -53,7 +53,7 @@ if (isset($_POST['form_id'])) {
break;
case 'update_email_form':
$msg = update_email(
($_SESSION['role_id'] <= admin && $_SESSION['user_id'] != $_POST['user_id'] ? $_POST['user_id'] : $_SESSION['user_id']),
($_SESSION['role_id'] <= developer && $_SESSION['user_id'] != $_POST['user_id'] ? $_POST['user_id'] : $_SESSION['user_id']),
$_POST['new_email'],
$_POST['verify_new_email']
);
@@ -61,7 +61,7 @@ if (isset($_POST['form_id'])) {
break;
case 'update_username_form':
$msg = update_username(
($_SESSION['role_id'] <= admin && $_SESSION['user_id'] != $_POST['user_id'] ? $_POST['user_id'] : $_SESSION['user_id']),
($_SESSION['role_id'] <= developer && $_SESSION['user_id'] != $_POST['user_id'] ? $_POST['user_id'] : $_SESSION['user_id']),
$_POST['new_username'],
$_POST['verify_new_username']
);
@@ -77,7 +77,7 @@ if (isset($_POST['form_id'])) {
break;
case 'delete_account_form':
$msg = delete_account(
($_SESSION['role_id'] <= admin && $_SESSION['user_id'] != $_POST['user_id'] ? $_POST['user_id'] : $_SESSION['user_id']),
($_SESSION['role_id'] <= developer && $_SESSION['user_id'] != $_POST['user_id'] ? $_POST['user_id'] : $_SESSION['user_id']),
$_POST['delete_password'],
$_POST['delete_verify_password']
);
@@ -93,7 +93,7 @@ if (isset($_POST['form_id'])) {
echo $msg;
}
include_once 'components/head.php';
include_once 'components/core/head.php';
switch ($_GET['view']) {
case 'login':
@@ -110,4 +110,4 @@ switch ($_GET['view']) {
break;
}
include_once 'components/foot.php';
include_once 'components/core/foot.php';