diff --git a/admin/admin_nav.php b/admin/admin_nav.php index 8d3ece0..01ec0db 100644 --- a/admin/admin_nav.php +++ b/admin/admin_nav.php @@ -6,9 +6,20 @@ - + + TROJAN'S GENERAL DATA SHIT @@ -17,7 +28,7 @@

USER MANAGEMENT

 

DATA MANAGEMENT

@@ -29,7 +40,7 @@

!!!!! DANGER ZONE !!!!!

 

diff --git a/admin/data_management/game_form.php b/admin/data_management/game_form.php index ba1d083..9862377 100644 --- a/admin/data_management/game_form.php +++ b/admin/data_management/game_form.php @@ -70,6 +70,12 @@ try { // Try opening the SQL database connection + GAME ADDING FORM - +

ADD GAME RESULTS

diff --git a/admin/data_management/game_form_mobile.php b/admin/data_management/game_form_mobile.php new file mode 100644 index 0000000..7d473e3 --- /dev/null +++ b/admin/data_management/game_form_mobile.php @@ -0,0 +1,168 @@ +setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); + + // Grab the list of users from the user list + // We will also grab all the people that have been registered/won before + $sqlGetUserData = $conn->prepare("SELECT username FROM " . $userTableName . ""); + $sqlGetTourneyData = $conn->prepare("SELECT tournamentName,winner1,winner2,winner3,winner4 FROM " . $tournamentDataTableName . ""); + + // Execute SQL query + $sqlGetUserData->execute(); + $sqlGetTourneyData->execute(); + + // Get results from the USERS table + $results = $sqlGetUserData->fetchAll(PDO::FETCH_ASSOC); + + // Create new arrays to store values + $userList = array(); + $tourneyList = array(); + + // Move results to their own array, easier to convert for Javascript + foreach ($results as $result) { + $userList[] = $result["username"]; + } + + // Get results from the TOURNEY table + $results = $sqlGetTourneyData->fetchAll(PDO::FETCH_ASSOC); + + // Move results to their own array, easier to convert for Javascript + foreach ($results as $result) { + $userList[] = $result["winner1"]; + $userList[] = $result["winner2"]; + $userList[] = $result["winner3"]; + $userList[] = $result["winner4"]; + $tourneyList[] = $result["tournamentName"]; + } + + // Remove duplicate entries + $userList = array_unique($userList); + + // Sort the array to alphabetical order + sort($userList); + + +} catch (PDOException $e) { // failed connection + echo "Connection failed: " . $e->getMessage(); +} + +?> + + + + + + + + + + + + + + + + + + + + GAME ADDING FORM + + + + +
+ +

ADD GAME RESULTS

+

Add a recently-played game and save the results!

+
+

+
+ + +

+

+ + " tabindex="1" required> +

+

+
+
+ + + + +
+

+
+ +
+ +

+
+

+
+

If this game was part of a tournament, select it below

+ +

If you have uploaded a replay of this game to ballchasing.com, enter the ID code below.

+ +

+

If you have any notes about the game, leave them below

+ +
+ +

+ + +
+

+ +
+

+ +
+ + + \ No newline at end of file diff --git a/admin/data_management/tourney_form.php b/admin/data_management/tourney_form.php index 843d577..90c10aa 100644 --- a/admin/data_management/tourney_form.php +++ b/admin/data_management/tourney_form.php @@ -68,11 +68,7 @@ try { // Try opening the SQL database connection diff --git a/admin/data_management/tourney_form_mobile.php b/admin/data_management/tourney_form_mobile.php index aaa184b..e0b178a 100644 --- a/admin/data_management/tourney_form_mobile.php +++ b/admin/data_management/tourney_form_mobile.php @@ -67,6 +67,12 @@ try { // Try opening the SQL database connection + TOURNAMENT ADDING FORM