From faeab2134c7e905b4e058a28de7f8b5fac99eca7 Mon Sep 17 00:00:00 2001 From: Lauren Hinnen Date: Thu, 3 Sep 2026 19:51:44 -0500 Subject: [PATCH] NavBar & SideBar Works... Kinda. Not Customized Yet. --- TargetScanner/alchemyIngredientPage.php | 21 ++++++++++++- TargetScanner/config.php | 28 +++++++++++++++++ TargetScanner/index.php | 2 ++ TargetScanner/nav.php | 35 +++++----------------- TargetScanner/sidebar.js | 13 ++++++++ TargetScanner/sidebar.php | 40 ++++++++++++++++++++----- TargetScanner/style.css | 31 +++++++++++++++++++ 7 files changed, 134 insertions(+), 36 deletions(-) create mode 100644 TargetScanner/config.php create mode 100644 TargetScanner/sidebar.js diff --git a/TargetScanner/alchemyIngredientPage.php b/TargetScanner/alchemyIngredientPage.php index 8dd46cf..6b91f22 100755 --- a/TargetScanner/alchemyIngredientPage.php +++ b/TargetScanner/alchemyIngredientPage.php @@ -1,3 +1,4 @@ + @@ -8,7 +9,25 @@ - +Alchemy Market Prices"; + // Run database query where profession = 'alchemy' +} elseif ($current_prof === 'blacksmithing' || $active_profession === 'blacksmithing') { + echo "

Blacksmithing Market Prices

"; + // Run database query where profession = 'blacksmithing' +} else { + echo "

Unknown Profession

"; +} +?> \ No newline at end of file diff --git a/TargetScanner/config.php b/TargetScanner/config.php new file mode 100644 index 0000000..d262d04 --- /dev/null +++ b/TargetScanner/config.php @@ -0,0 +1,28 @@ + ['Page Name', 'pageIcon'] */ +$menu_items = [ + 'index.php' => ['Home', 'logo.png'], + 'alchemyIngredientPage.php' => ['Alchemy', 'alchemy.png'], + 'blacksmithing.php' => ['Blacksmithing', 'blacksmithing.png'], + 'engineering.php' => ['Engineering', 'engineering.png'], + 'jewelcrafting.php' => ['Jewelcrafting', 'jewelcrafting.png'], + 'leatherworking.php' => ['Leatherworking', 'leatherworking.png'], + 'tailoring.php' => ['Tailoring', 'tailoring.png'], +]; + +$active_profession = ''; // File Name, e.g., 'alchemyIngredientPage' or 'blacksmithing' +$active_profession_title = ''; // Page Name, e.g., 'Alchemy' or 'Blacksmithing' + +/* Finds & Sets Active Profession Page */ +foreach ($menu_items as $file => $info) { + $root_file_name = pathinfo($file, PATHINFO_FILENAME); // Extracts File Name ONLY, Not File Path + + if (str_starts_with($current_file, $root_file_name)) { + $active_profession = $root_file_name; + $active_profession_title = $info[0]; + break; + } +} \ No newline at end of file diff --git a/TargetScanner/index.php b/TargetScanner/index.php index 33d6bc1..c3d85e0 100755 --- a/TargetScanner/index.php +++ b/TargetScanner/index.php @@ -1,3 +1,4 @@ + @@ -11,6 +12,7 @@ \ No newline at end of file diff --git a/TargetScanner/nav.php b/TargetScanner/nav.php index 52f3926..5236fae 100755 --- a/TargetScanner/nav.php +++ b/TargetScanner/nav.php @@ -1,40 +1,21 @@ - ['Page Name', 'pageIcon'] */ -$menu_items = [ - 'index.php' => ['Home', 'logo.png'], - 'alchemyIngredientPage.php' => ['Alchemy', 'alchemy.png'], - 'blacksmithing.php' => ['Blacksmithing', 'blacksmithing.png'], - 'engineering.php' => ['Engineering', 'engineering.png'], - 'jewelcrafting.php' => ['Jewelcrafting', 'jewelcrafting.png'], - 'leatherworking.php' => ['Leatherworking', 'leatherworking.png'], - 'tailoring.php' => ['Tailoring', 'tailoring.png'], -]; -?> - +