Skip to content
Merged

Dev #18

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,3 @@ Big props to the squad for bringing the vision to life. 🙌
- **Phase 4:** Final Launch 🚀

## 📢 Updates

Follow the repo for the latest commits, sneak peeks, and chaos.
> *Spoiler: it’s gonna be 🔥.*

---

Binary file added UML-Diagram.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 7 additions & 7 deletions public/admin/adminContactDashboard.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,15 @@
// needed to load the database stuff variables
require_once("../php/connect.php");

$host = $_ENV['DB_HOST'];
$user = $_ENV['DB_USER'];
$pass = $_ENV['DB_PASS'];
$dbname = $_ENV['DB_NAME'];
$port = $_ENV['DB_PORT'];


try {
$conn = new PDO("mysql:host=$host;port=$port;dbname=$dbname", $user, $pass);
$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
global $conn;

if (!$conn) {
var_dump($_ENV); // Check if .env is loaded
die("Database connection is not established.");
}
Comment on lines +10 to +13
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Security concern: Environment variable exposure in debug output.

The var_dump($_ENV) statement on line 11 could potentially expose sensitive environment variables (including database credentials, API keys, etc.) in production environments or logs.

Consider these safer alternatives:

-    if (!$conn) {
-        var_dump($_ENV); // Check if .env is loaded
-        die("Database connection is not established.");
-    }
+    if (!$conn) {
+        error_log("Database connection is not established. Check .env file configuration.");
+        die("Database connection error. Please check server configuration.");
+    }

This approach logs the issue for debugging without exposing sensitive data to users.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
if (!$conn) {
var_dump($_ENV); // Check if .env is loaded
die("Database connection is not established.");
}
if (!$conn) {
error_log("Database connection is not established. Check .env file configuration.");
die("Database connection error. Please check server configuration.");
}
🤖 Prompt for AI Agents
In public/admin/adminContactDashboard.php around lines 10 to 13, remove the
var_dump($_ENV) statement to avoid exposing sensitive environment variables.
Instead, replace it with a safer logging mechanism that records the database
connection failure internally without displaying environment details to the
user. Ensure the error message shown to users is generic and does not reveal any
sensitive information.

// Handle deletion
if (isset($_POST['delete'])) {
$contactus_id = $_POST['contactus_id'];
Expand Down Expand Up @@ -59,6 +58,7 @@
</tr>
</thead>
<tbody>
<!-- Loop Through all the submissions -->
<?php foreach ($contacts as $contact): ?>
<tr>
<td><?php echo htmlspecialchars($contact['contactus_id']); ?></td>
Expand Down
2 changes: 1 addition & 1 deletion public/admin/adminResults.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
$stmt = $conn->prepare("INSERT INTO MatchResults (game_title, winner, score, match_type, match_date) VALUES (?, ?, ?, ?, ?)");
$stmt->execute([$game_title, $winner, $score, $match_type, $match_date]);

// Redirect to avoid form re-submission on page reload
// Redirect so it doesnt re-sends the data on page reload
header("Location: " . $_SERVER['REQUEST_URI']);
exit();

Expand Down
75 changes: 75 additions & 0 deletions public/css/style.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 0 additions & 9 deletions public/html/agenda.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,30 +13,21 @@

<tr data-event="speedrun" class="tooltip-container">
<td>BLD Charity Speedrun Showdown
<!--Hover Text-->
<span class="tooltip">ADD DESCRIPTION HERE</span></td>

<td>Sponsor Run / Charity Event</td>
<td>July 13, 2025</td>
</tr>
<tr data-event="bbq" class="tooltip-container">
<td>Annual Bloodline BBQ Bash
<!--Hover Text-->
<span class="tooltip">ADD DESCRIPTION HERE</span></td>
<td>Community Meet-Up / BBQ</td>
<td>August 24, 2025</td>
</tr>
<tr data-event="showdown" class="tooltip-container">
<td>BLD 2v2 Ultimate Showdown
<!--Hover Text-->
<span class="tooltip">ADD DESCRIPTION HERE</span></td>
<td>Tournament (Valorant / CS2 / Rocket League)</td>
<td>October 5–7, 2025</td>
</tr>
</tbody>
</table>
</section>

<script>

</script>
Binary file modified public/images/Los_Angeles_downtown_banner.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified public/images/background-rotated.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified public/images/background.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified public/images/news/BLD-PARTNERSHIP-razer.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified public/images/news/BLD-vct-won.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified public/images/news/cubert-academy.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified public/images/news/worldcuppartner.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified public/images/player1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified public/images/player2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified public/images/player3.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion public/includes/header.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!-- header.php -->
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
<meta name="viewport" content="width=device-width, initial-scale=0.5">
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Questionable viewport scaling setting.

Setting initial-scale=0.5 will make the page appear zoomed out by 50% on mobile devices, potentially making text and UI elements too small to read comfortably. This contradicts responsive design best practices.

Consider using the standard responsive viewport setting:

-    <meta name="viewport" content="width=device-width, initial-scale=0.5">
+    <meta name="viewport" content="width=device-width, initial-scale=1.0">

This will ensure the page displays at the intended size and works well with the responsive CSS being added.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
<meta name="viewport" content="width=device-width, initial-scale=0.5">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
🤖 Prompt for AI Agents
In public/includes/header.php at line 4, the meta viewport tag uses
initial-scale=0.5, which causes the page to appear zoomed out and text too small
on mobile devices. Replace initial-scale=0.5 with initial-scale=1.0 and set
width=device-width to follow standard responsive design practices, ensuring the
page displays correctly on various screen sizes.

<link rel="stylesheet" href="../css/style.css">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
Expand All @@ -19,6 +19,7 @@
<div class="nav-item"><a href="index.php?page=home">Home</a></div>
<div class="nav-item"><a href="index.php?page=home#team">Team</a></div>
<div class="nav-item"><a href="index.php?page=contactus">Contact us</a></div>
<div class="nav-item"><a href="index.php?page=agenda">Agenda</a></div>
<div class="nav-item"><a href="index.php?page=signup">Signup</a></div>
<div class="nav-item"><a href="index.php?page=history">History</a></div>
<div class="nav-item"><a href="index.php?page=results">Results</a></div>
Expand Down