From 65093ca0b556d603ade209c6fbdf72b03ebd9f4a Mon Sep 17 00:00:00 2001 From: Flatlogic Bot Date: Thu, 26 Feb 2026 00:40:09 +0000 Subject: [PATCH] Alpha v1.1 --- admin.php | 53 +++++++++++++++++++++++------- db/add_is_blinking_to_statuses.php | 11 +++++++ db/add_is_playable_to_factions.php | 11 +++++++ gm_console.php | 21 ++++++++++-- index.php | 20 +++++++++-- 5 files changed, 100 insertions(+), 16 deletions(-) create mode 100644 db/add_is_blinking_to_statuses.php create mode 100644 db/add_is_playable_to_factions.php diff --git a/admin.php b/admin.php index bfbddf3..51624d9 100644 --- a/admin.php +++ b/admin.php @@ -41,6 +41,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['action']) && $_POST[' $slug = $_POST['slug']; $icon = $_POST['icon']; $description = $_POST['description']; + $is_blinking = isset($_POST['is_blinking']) ? 1 : 0; $modifier_ids = isset($_POST['modifiers']) ? $_POST['modifiers'] : []; $image_url = null; @@ -98,13 +99,14 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['action']) && $_POST[' $slug = $_POST['slug']; $color = $_POST['color']; $description = $_POST['description']; + $is_blinking = isset($_POST['is_blinking']) ? 1 : 0; if ($id > 0) { - $stmt = $db->prepare("UPDATE celestial_object_statuses SET name = ?, slug = ?, color = ?, description = ? WHERE id = ?"); - $stmt->execute([$name, $slug, $color, $description, $id]); + $stmt = $db->prepare("UPDATE celestial_object_statuses SET name = ?, slug = ?, color = ?, description = ?, is_blinking = ? WHERE id = ?"); + $stmt->execute([$name, $slug, $color, $description, $is_blinking, $id]); } else { - $stmt = $db->prepare("INSERT INTO celestial_object_statuses (name, slug, color, description) VALUES (?, ?, ?, ?)"); - $stmt->execute([$name, $slug, $color, $description]); + $stmt = $db->prepare("INSERT INTO celestial_object_statuses (name, slug, color, description, is_blinking) VALUES (?, ?, ?, ?, ?)"); + $stmt->execute([$name, $slug, $color, $description, $is_blinking]); } header("Location: admin.php?tab=statuses&success=1"); exit; @@ -123,6 +125,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['action']) && $_POST[' $name = $_POST['name']; $slug = $_POST['slug']; $description = $_POST['description']; + $is_blinking = isset($_POST['is_blinking']) ? 1 : 0; if ($id > 0) { $stmt = $db->prepare("UPDATE settlement_types SET name = ?, slug = ?, description = ? WHERE id = ?"); @@ -149,6 +152,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['action']) && $_POST[' $slug = $_POST['slug']; $type = $_POST['type']; $description = $_POST['description']; + $is_blinking = isset($_POST['is_blinking']) ? 1 : 0; if ($id > 0) { $stmt = $db->prepare("UPDATE modifiers SET name = ?, slug = ?, type = ?, description = ? WHERE id = ?"); @@ -175,6 +179,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['action']) && $_POST[' $slug = $_POST['slug']; $fa_icon = $_POST['fa_icon']; $color = $_POST['color']; + $is_playable = isset($_POST['is_playable']) ? 1 : 0; $image_url = null; $alliance_ids = isset($_POST['alliances']) ? $_POST['alliances'] : []; @@ -192,11 +197,11 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['action']) && $_POST[' } } if ($id > 0) { - $stmt = $db->prepare("UPDATE factions SET name = ?, slug = ?, image_url = ?, fa_icon = ?, color = ? WHERE id = ?"); - $stmt->execute([$name, $slug, $image_url, $fa_icon, $color, $id]); + $stmt = $db->prepare("UPDATE factions SET name = ?, slug = ?, image_url = ?, fa_icon = ?, color = ?, is_playable = ? WHERE id = ?"); + $stmt->execute([$name, $slug, $image_url, $fa_icon, $color, $is_playable, $id]); } else { - $stmt = $db->prepare("INSERT INTO factions (name, slug, image_url, fa_icon, color) VALUES (?, ?, ?, ?, ?)"); - $stmt->execute([$name, $slug, $image_url, $fa_icon, $color]); + $stmt = $db->prepare("INSERT INTO factions (name, slug, image_url, fa_icon, color, is_playable) VALUES (?, ?, ?, ?, ?, ?)"); + $stmt->execute([$name, $slug, $image_url, $fa_icon, $color, $is_playable]); $id = $db->lastInsertId(); } @@ -227,6 +232,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['action']) && $_POST[' $slug = $_POST['slug']; $icon = $_POST['icon']; $description = $_POST['description']; + $is_blinking = isset($_POST['is_blinking']) ? 1 : 0; $show_in_header = isset($_POST["show_in_header"]) ? 1 : 0; $image_url = null; @@ -273,6 +279,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['action']) && $_POST[' $name = $_POST['name']; $slug = $_POST['slug']; $description = $_POST['description']; + $is_blinking = isset($_POST['is_blinking']) ? 1 : 0; if ($id > 0) { $stmt = $db->prepare("UPDATE lootboxes SET name = ?, slug = ?, description = ? WHERE id = ?"); @@ -414,6 +421,7 @@ if ($tab === 'users') {