Server IP : 149.202.105.228 / Your IP : 216.73.216.18 Web Server : Apache System : Linux webm129.cluster030.gra.hosting.ovh.net 5.15.167-ovh-vps-grsec-zfs-classid #1 SMP Tue Sep 17 08:14:20 UTC 2024 x86_64 User : atfycaf ( 116275) PHP Version : 7.4.33 Disable Function : _dyuweyrj4,_dyuweyrj4r,dl MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/atfycaf/www/admin/ |
Upload File : |
<?php $thisCheckID = 11; include "globalVars.php"; if (isset($_POST["leagueID"])) { $leagueID = $_POST["leagueID"]; } else { header("Location: /admin/leagueEdit.html"); } $leagueURLQuery = mysqli_query($conn, "SELECT * FROM leagueConfig WHERE id = '$leagueID'"); while ($lUQ = mysqli_fetch_array($leagueURLQuery)) { $leagueURL = $lUQ["pageURL"]; $leagueType = $lUQ["leagueType"]; $hasMiniLeagues = $lUQ["hasMiniLeagues"]; $noTeams = $lUQ["noTeams"]; $hasPlayoff = $lUQ["hasPlayoff"]; $homeAndAway = $lUQ["homeAndAway"]; $startDate = $lUQ["startDate"]; $tStartMonth = date("F", strtotime($startDate)); $tStartYear = date("Y", strtotime($startDate)); $startDisplay = date("jS F, Y", strtotime($startDate)); $pointsWin = $lUQ["pointsWin"]; $pointsDraw = $lUQ["pointsDraw"]; $pointsRink = $lUQ["pointsRink"]; } $leagueTypeURLQuery = mysqli_query($conn, "SELECT pageURL, groupTitle FROM leagueGroups WHERE id = '$leagueType'"); while ($lTQ = mysqli_fetch_array($leagueTypeURLQuery)) { $leagueTypeURL = $lTQ["pageURL"]; $leagueGroup = $lTQ["groupTitle"]; } include "header.php"; ?> <h2>Update a League - League Fixtures</h2> <div class="formContainer"> <div class="functionButtons"> <form action="leagueEdit-1.html" method="post"> <input type="hidden" name="leagueID" value="<?php echo $leagueID ?>" /> <input type="submit" name="getLeague" value="Basic Details" /> </form> <form action="leagueEdit-2.html" method="post"> <input type="hidden" name="leagueID" value="<?php echo $leagueID ?>" /> <input type="submit" class="functionSelected" name="getLeague" value="Fixtures" /> </form> <?php if ($hasPlayoff > 0) { ?> <form action="leagueEdit-2-playoffs.html" method="post"> <input type="hidden" name="leagueID" value="<?php echo $leagueID ?>" /> <input type="submit" name="getLeague" value="Playoffs" /> </form> <?php } ?> <form action="leagueEdit-3.html" method="post"> <input type="hidden" name="leagueID" value="<?php echo $leagueID ?>" /> <input type="submit" name="getLeague" value="Page Content" /> </form> </div> </div> <p>The fixtures are available as a PDF to send in emails or print. This PDF is automatically updated with the latest scores once you have saved them.</p> <a href="/pdf/<?php echo $leagueTypeURL ?>-<?php echo $leagueURL ?>-league-fixtures.pdf" class="submitButton" target="_blank">Print League Fixtures</a> <div class="descStTab"> <h3>Fixtures</h3> <div id="roundDisplay"> <div id="round1Display" class="roundDisplay selectedRoundDisplay"> <?php if ($hasMiniLeagues > 1) { $miniLeagueIDQuery = mysqli_query($conn, "SELECT (SELECT COUNT(leagueMiniLeaguesTeams.id) FROM leagueMiniLeaguesTeams WHERE leagueMiniLeaguesTeams.miniLeagueID = leagueMiniLeagues.id) AS teamCount FROM leagueMiniLeagues WHERE leagueMiniLeagues.leagueID = '$leagueID' ORDER BY teamCount DESC LIMIT 0,1"); while ($mLQ = mysqli_fetch_array($miniLeagueIDQuery)) { $noTeams = $mLQ["teamCount"]; } } if ($noTeams % 2 == 0) { $noWeeks = $noTeams - 1; } else { $noWeeks = $noTeams; } $homeWeeks = $noWeeks; if ($homeAndAway == 0) { $noWeeks = $noWeeks * 2; } $miniLeagueBasicQuery = mysqli_query($conn, "SELECT id FROM leagueMiniLeagues WHERE leagueID = '$leagueID' ORDER BY id ASC LIMIT 0,1"); while ($mLBQ = mysqli_fetch_array($miniLeagueBasicQuery)) { $basicMiniLeagueID = $mLBQ["id"]; } for ($w = 1; $w <= $noWeeks; $w++) { $fixtureDateQuery = mysqli_query($conn, "SELECT fixtureDate FROM leagueResults WHERE miniLeagueID = '$basicMiniLeagueID' AND (weekID = '$w') ORDER BY id ASC"); while ($fDQ = mysqli_fetch_array($fixtureDateQuery)) { $fixtureDate = date("d/m/Y", strtotime($fDQ["fixtureDate"])); } ?> <div class="roundDisplay scoreFixtures selectedRoundDisplay"> <div class="listTitle listTitleAG">Week <?php echo $w ?> Fixtures</div> <?php $miniLeagueQuery = mysqli_query($conn, "SELECT * FROM leagueMiniLeagues WHERE leagueID = '$leagueID' ORDER BY id ASC"); while ($mLQ = mysqli_fetch_array($miniLeagueQuery)) { $miniLeagueID = $mLQ["id"]; $miniLeagueTitle = $mLQ["miniLeagueTitle"]; if (trim($miniLeagueTitle) != "") { ?> <div class="listTitle listTitleW"><?php echo $miniLeagueTitle ?></div> <?php } ?> <div class="fixturesListC"> <ul class="fixtureSet ui-sortable"> <?php $fixturesQuery = mysqli_query($conn, "SELECT * FROM leagueResults WHERE miniLeagueID = '$miniLeagueID' AND (weekID = '$w') ORDER BY id ASC"); while ($fQ = mysqli_fetch_array($fixturesQuery)) { $fixtureID = $fQ["id"]; $fixtureDate = date("d/m/Y", strtotime($fQ["fixtureDate"])); $fixtureVenue = $fQ["fixtureVenue"]; $homeTeam = $fQ["homeTeam"]; $homeScore = $fQ["homeScore"]; $homeRinkPts = $fQ["homeRinkPts"]; $awayTeam = $fQ["awayTeam"]; $awayScore = $fQ["awayScore"]; $awayRinkPts = $fQ["awayRinkPts"]; if ($homeScore == -1) { $homeScore = ""; $homeRinkPts = ""; } if ($awayScore == -1) { $awayScore = ""; $awayRinkPts = ""; } ?> <li id="home<?php echo $fixtureID ?>" class="ui-sortable-handle homeMatch"><input type="text" class="teamName" size="50" value="<?php echo $homeTeam ?>" /><?php if ($pointsRink != 0) { ?> <input type="number" class="fixtureRinkPts" placeholder="Rink Points" value="<?php echo $homeRinkPts ?>" min="0" max="<?php echo $pointsRink ?>" step="1"><?php } ?> <input type="number" class="fixtureScore" placeholder="Shots" value="<?php echo $homeScore ?>" min="0" step="1"> <div class="matchDateInp">Date: <input type="text" class="matchDate" data-mid="<?php echo $fixtureID ?>" size="50" value="<?php echo $fixtureDate ?>"></div> <div class="matchVenueInp">Venue: <select class="matchVenue" data-mid="<?php echo $fixtureID ?>"> <?php if ($fixtureVenue == 0) { ?> <option value="0" selected>None Set</option> <?php } $clubsQuery = mysqli_query($conn, "SELECT id, clubName FROM localClubs ORDER BY clubName ASC"); while ($cQ = mysqli_fetch_array($clubsQuery)) { $clubID = $cQ["id"]; $clubName = $cQ["clubName"]; ?> <option value="<?php echo $clubID ?>"<?php if ($clubID == $fixtureVenue) {?> selected<?php } ?>><?php echo $clubName ?></option> <?php } ?> </select> </div> </li> <li id="away<?php echo $fixtureID ?>" class="ui-sortable-handle"><input type="text" class="teamName" size="50" value="<?php echo $awayTeam ?>" /><?php if ($pointsRink != 0) { ?> <input type="number" class="fixtureRinkPts" placeholder="Rink Points" value="<?php echo $awayRinkPts ?>" min="0" max="<?php echo $pointsRink ?>" step="1"><?php } ?> <input type="number" class="fixtureScore" placeholder="Shots" value="<?php echo $awayScore ?>" min="0" step="1"></li> <?php } ?> </ul> </div> <?php } ?> </div> <?php } ?> </div> </div> </div> <?php include "footer.php"; ?>