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 = 10; include "globalVars.php"; include "header.php"; ?> <h2>Create a New League - Fixtures</h2> <?php if (isset($_POST["saveFixtures"])) { ///// 8 RINK POINTS - MANUALLY ENTERED (AWAY AUTO SET AFTER HOME INPUT 8 - X = AWAY RINK) \\\\\ ///// 2 MATCH POINTS FOR HIGHEST SHOTS - AUTO ENTERED AFTER SHOTS ENTERED) \\\\\ $leagueID = cleanPost($_POST["leagueID"], $conn); $matchDates = $_POST["fixtureDate"]; $matchVenues = $_POST["fixtureVenue"]; if (isset($_POST["teamsSel"])) { ///// MANUALLY CREATED FIXTURES \\\\\ $fixturesCreated = $_POST["teamsSel"]; } else { ///// AUTOMATIC FIXTURES \\\\\ $fixturesCreated = $_POST["teams"]; } foreach($fixturesCreated as $miniLeagueID => $fixtureList) { foreach($fixtureList as $weekID => $teams) { $datePosted = cleanPost($matchDates[$weekID], $conn); $fixtureVenue = cleanPost($matchVenues[$miniLeagueID][$weekID], $conn); list($matchDay, $matchMonth, $matchYear) = explode("/", $datePosted); $matchDate = $matchYear ."-". $matchMonth ."-". $matchDay; for ($i = 1; $i <= 1000; $i+=2) { if (array_key_exists($i, $teams)) { $h = $i - 1; $homeTeam = $teams[$h]; $awayTeam = $teams[$i]; mysqli_query($conn, "INSERT INTO leagueResults (miniLeagueID, weekID, fixtureDate, fixtureVenue, homeTeam, homeScore, awayTeam, awayScore) VALUES ('$miniLeagueID', '$weekID', '$matchDate', '$fixtureVenue', '". addslashes($homeTeam) ."', '-1', '". addslashes($awayTeam) ."', '-1')"); } else { break; } } } } include "xmlSitemap.php"; ?> <form action="leagueEdit-3.html" method="post" id="leagueNext"> <input type="hidden" name="leagueID" value="<?php echo $leagueID ?>" /> <input type="hidden" name="finalised" value="true" /> </form> <script type="text/javascript"> document.getElementById('leagueNext').submit(); </script> <?php } else { $leagueID = $_POST["leagueID"]; ?> <form action="leagueNew-2.html" method="post"> <input type="hidden" name="leagueID" id="leagueID" value="<?php echo $leagueID ?>"> <div class="descStTab"> <div class="pFormRow"> <div class="pFormTitle">How do you want the fixtures created?:</div> <div class="pFormSelect"> <select name="fixturesGen" id="fixturesGen"> <option value="" selected disabled>Select</option> <option value="1">Manually Created</option> <option value="2">Auto Generate the Fixtures</option> </select> <div class="pFormLabel"> <label class="labelName">How do you want the fixtures created?:</label> </div> </div> </div> </div> <div class="descStTab" id="fixtureList"> </div> <input type="submit" class="submitButton" id="saveFixtures" name="saveFixtures" value="Save Fixtures" disabled /> </form> <?php } ?> <?php include "footer.php"; ?>