moved website outside of panel folder

This commit is contained in:
Frank Harris 2026-05-13 20:00:40 -04:00
parent 92ac778956
commit 08f07dca97
10328 changed files with 90 additions and 501 deletions

View file

@ -1,32 +0,0 @@
<?php
/**
* Session bridge to keep panel + storefront logins in sync.
* Always call this before rendering billing pages.
*/
if (session_status() === PHP_SESSION_NONE) {
session_name('opengamepanel_web');
session_start();
}
// If the panel session is populated, mirror into website-specific keys.
if (!empty($_SESSION['user_id']) && empty($_SESSION['website_user_id'])) {
$_SESSION['website_user_id'] = (int)$_SESSION['user_id'];
if (!empty($_SESSION['users_login'])) {
$_SESSION['website_username'] = $_SESSION['users_login'];
}
if (!empty($_SESSION['users_group'])) {
$_SESSION['website_user_role'] = $_SESSION['users_group'];
}
}
// If the website session is populated but the panel keys are missing, mirror back.
if (!empty($_SESSION['website_user_id']) && empty($_SESSION['user_id'])) {
$_SESSION['user_id'] = (int)$_SESSION['website_user_id'];
if (!empty($_SESSION['website_username'])) {
$_SESSION['users_login'] = $_SESSION['website_username'];
}
if (!empty($_SESSION['website_user_role'])) {
$_SESSION['users_group'] = $_SESSION['website_user_role'];
}
}