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 include "globalVars.php"; $groupNameArray = array("", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"); if (isset($_POST["tT"])) { $tournType = $_POST["tT"]; $groupRulesQuery = mysqli_query($conn, "SELECT groupRules FROM leagueGroups WHERE id = '$tournType'"); while ($gRQ = mysqli_fetch_array($groupRulesQuery)) { $groupRules = $gRQ["groupRules"]; } echo $groupRules; } elseif (isset($_POST["nT"])) { $noTeams = $_POST["nT"]; $noMiniLeagues = $_POST["hML"]; if (isset($_POST["team"])) { $teamsList = array(); foreach($_POST["team"] as $groupID => $teamList) { foreach($teamList as $team) { $teamsList[] = $team; } } } $teamsPerGroup = $noTeams / $noMiniLeagues; $teamCount = array(); if (floor($teamsPerGroup) == $teamsPerGroup) { $evenDist = true; } else { $evenDist = false; } if ($noMiniLeagues > 1) { ?> <div id="roundSelect"> <?php $teamsLeft = $noTeams; $noGroups = $noMiniLeagues; for ($thisGroup = 1; $thisGroup <= $noMiniLeagues; $thisGroup++) { if ($evenDist == true) { $teamCount[$thisGroup] = $teamsPerGroup; } else { $teamsPerGroup = $teamsLeft / $noGroups; if (floor($teamsPerGroup) == $teamsPerGroup) { $thisGroupTeams = $teamsPerGroup; $teamCount[$thisGroup] = $thisGroupTeams; $teamsLeft = $teamsLeft - $thisGroupTeams; } else { $thisGroupTeams = floor($teamsPerGroup) + 1; $teamCount[$thisGroup] = $thisGroupTeams; $teamsLeft = $teamsLeft - $thisGroupTeams; } } ?> <a id="group<?php echo $thisGroup ?>"<?php if ($thisGroup == 1) {?> class="selectedRound"<?php } ?>>Mini League <?php echo $thisGroup ?></a> <?php $noGroups = $noGroups - 1; } ?> </div> <?php } else { $teamCount[1] = $noTeams; } ?> <div id="roundDisplay"> <?php $t = 0; for ($thisGroup = 1; $thisGroup <= $noMiniLeagues; $thisGroup++) { $noGroupTeams = $teamCount[$thisGroup]; ?> <div class="roundDisplay<?php if ($thisGroup == 1) {?> selectedRoundDisplay<?php } ?>" id="group<?php echo $thisGroup ?>Display"> <?php if ($noMiniLeagues > 1) { ?> <h3>Mini League <?php echo $thisGroup ?> Teams</h3> <div class="groupNameInp">Mini League Name: <input type="text" name="miniLeagueTitle[<?php echo $thisGroup ?>]" size="50" placeholder="eg: Group <?php echo $groupNameArray[$thisGroup] ?>" required /></div> <?php } else { ?> <h3>League Teams</h3> <?php } ?> <ul class="leagueTeams"> <?php for ($teamInp = 1; $teamInp <= $noGroupTeams; $teamInp++) { if (isset($_POST["team"])) { if (isset($teamsList[$t])) { $teamName = $teamsList[$t]; } else { $teamName = ""; } } else { $teamName = ""; } $t++; ?> <li><input type="text" class="teamName" name="team[<?php echo $thisGroup ?>][]" placeholder="Team <?php echo $t ?>" value="<?php echo $teamName ?>" required></li> <?php } ?> </ul> </div> <?php } ?> </div> <?php } elseif (isset($_POST["fxG"])) { function getWeekday($date) { return date('w', strtotime($date)); } function flip($match) { $components = explode(' v ', $match); return $components[1] ." v ". $components[0]; } function teamName($num, $names) { $i = $num - 1; if (sizeof($names) > $i && strlen(trim($names[$i])) > 0) { return trim($names[$i]); } else { return $num; } } function shuffleWithKeys(&$array) { $aux = array(); $keys = array_keys($array); shuffle($keys); foreach($keys as $key) { $aux[$key] = $array[$key]; unset($array[$key]); } return $aux; } function createFixtures($names, $homeAway) { $teams = sizeof($names); $ghost = false; if ($teams % 2 == 1) { $teams++; $ghost = true; $ghostID = $teams; } else { $ghostID = 0; } $totalRounds = $teams - 1; $matchesPerRound = $teams / 2; $rounds = array(); for ($i = 0; $i < $totalRounds; $i++) { $rounds[$i] = array(); } for ($round = 0; $round < $totalRounds; $round++) { for ($match = 0; $match < $matchesPerRound; $match++) { $home = ($round + $match) % ($teams - 1); $away = ($teams - 1 - $match + $round) % ($teams - 1); if ($match == 0) { $away = $teams - 1; } $rounds[$round][$match] = teamName($home + 1, $names) ." v ". teamName($away + 1, $names); } } $interleaved = array(); for ($i = 0; $i < $totalRounds; $i++) { $interleaved[$i] = array(); } $evn = 0; $odd = ($teams / 2); for ($i = 0; $i < sizeof($rounds); $i++) { if ($i % 2 == 0) { $interleaved[$i] = $rounds[$evn++]; } else { $interleaved[$i] = $rounds[$odd++]; } } $rounds = $interleaved; for ($round = 0; $round < sizeof($rounds); $round++) { if ($round % 2 == 1) { $rounds[$round][0] = flip($rounds[$round][0]); } } shuffle($rounds); $weekCount = 1; $fixtureID = 1; $fixtureMatch = 1; $toReturn = array(); for ($i = 0; $i < sizeof($rounds); $i++) { $weekNo = $i + 1; foreach ($rounds[$i] as $r) { $splitTeams = str_replace(" v ", "|", $r); $splitArray = explode("|", $splitTeams); $toReturn[$weekNo][$fixtureID][] = str_replace($ghostID, "", $splitArray[0]); $toReturn[$weekNo][$fixtureID][] = str_replace($ghostID, "", $splitArray[1]); $fixtureID++; $fixtureMatch++; } $weekCount++; } if ($homeAway == 1) { $newRounds = shuffleWithKeys($rounds); $weekNo = $i + 1; $toAdd = ceil($teams / 2); foreach ($newRounds as $fM => $round) { foreach($round as $mID => $r) { $fixtureMatch = ($fM * $toAdd) + ($mID + 1); $splitTeams = str_replace(" v ", "|", flip($r)); $splitArray = explode("|", $splitTeams); $toReturn[$weekNo][$fixtureMatch][] = str_replace($ghostID, "", $splitArray[0]); $toReturn[$weekNo][$fixtureMatch][] = str_replace($ghostID, "", $splitArray[1]); } $weekNo++; } } return($toReturn); } $fixtureGenType = $_POST["fxG"]; $leagueID = $_POST["lID"]; $leagueQuery = mysqli_query($conn, "SELECT hasMiniLeagues, noTeams, homeAndAway, hasPlayoff, matchDay, startDate FROM leagueConfig WHERE id = '$leagueID'"); while ($lQ = mysqli_fetch_array($leagueQuery)) { $hasMiniLeagues = $lQ["hasMiniLeagues"]; $noTeams = $lQ["noTeams"]; $homeAndAway = $lQ["homeAndAway"]; $hasPlayoff = $lQ["hasPlayoff"]; $matchDay = $lQ["matchDay"]; $startDate = $lQ["startDate"]; } $specifiedStartDay = getWeekday($startDate); if ($specifiedStartDay == $matchDay) { $week1Date = $startDate; } else { $dayWeek = array("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"); $thisWeekDay = $dayWeek[$matchDay]; $week1Date = date("Y-m-d", strtotime("$thisWeekDay this week", strtotime($startDate))); if ($week1Date < $startDate) { $week1Date = date("Y-m-d", strtotime("$week1Date +7 days", strtotime($startDate))); } } ?> <div id="roundDisplay"> <?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; } if ($fixtureGenType == 1) { for ($w = 1; $w <= $noWeeks; $w++) { if ($w > 1) { $plusDays = (($w - 1) * 7); $fixtureDate = date("d/m/Y", strtotime("$week1Date +$plusDays days")); } else { $fixtureDate = date("d/m/Y", strtotime("$week1Date")); } ?> <div class="roundDisplay fixtureDisplay selectedRoundDisplay"> <div class="listTitle listTitleW">Week <?php echo $w ?> Fixtures</div> <div class="roundDateInp">Date: <input type="text" name="fixtureDate[<?php echo $w ?>]" class="roundDate" size="50" value="<?php echo $fixtureDate ?>" /></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="matchVenueNInp">Venue: <select class="matchVenue" name="fixtureVenue[<?php echo $miniLeagueID ?>][<?php echo $w ?>]"> <option value="0">Select Venue</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 echo $clubName ?></option> <?php } ?> </select> </div> <?php $miniLeagueTeamsQuery = mysqli_query($conn, "SELECT * FROM leagueMiniLeaguesTeams WHERE miniLeagueID = '$miniLeagueID' ORDER BY id ASC"); $noTeams = mysqli_num_rows($miniLeagueTeamsQuery); if ($noTeams % 2 == 0) { } else { $noTeams = $noTeams - 1; } ?> <div class="playersListC"> <ul id="teams<?php echo $w ?>_<?php echo $miniLeagueID ?>" class="playersSet ui-sortable" data-nm="<?php echo $noTeams ?>" data-cw="fixtures<?php echo $w ?>_<?php echo $miniLeagueID ?>"> <?php while ($mLTQ = mysqli_fetch_array($miniLeagueTeamsQuery)) { $teamID = $mLTQ["id"]; $teamName = $mLTQ["teamName"]; ?> <li class="team<?php echo $teamID ?> ui-sortable-handle" data-m="<?php echo $miniLeagueID ?>" data-w="<?php echo $w ?>"><i class="fas fa-grip-horizontal"></i><input type="text" class="playerName" name="teams[<?php echo $miniLeagueID ?>][<?php echo $w ?>][]" size="50" value="<?php echo $teamName ?>" readonly /> <?php } ?> </ul> </div> <div class="fixturesListC"> <ul id="fixtures<?php echo $w ?>_<?php echo $miniLeagueID ?>" class="fixtureSet ui-sortable" data-nm="<?php echo $noTeams ?>" data-cw="teams<?php echo $w ?>_<?php echo $miniLeagueID ?>"> <?php for ($tp = 1; $tp <= $noTeams; $tp++) { ?> <li class="ui-sortable-placeholder ui-sortable-handle"></li> <?php } ?> </ul> </div> <?php } ?> </div> <?php } } else { ?> <div id="round1Display" class="roundDisplay selectedRoundDisplay"> <?php $fixturesList = array(); $miniLeagueQuery = mysqli_query($conn, "SELECT * FROM leagueMiniLeagues WHERE leagueID = '$leagueID' ORDER BY id ASC"); while ($mLQ = mysqli_fetch_array($miniLeagueQuery)) { $miniLeagueID = $mLQ["id"]; $teamsArray = array(); $miniLeagueTeamsQuery = mysqli_query($conn, "SELECT * FROM leagueMiniLeaguesTeams WHERE miniLeagueID = '$miniLeagueID' ORDER BY id ASC"); while ($mLTQ = mysqli_fetch_array($miniLeagueTeamsQuery)) { $teamID = $mLTQ["id"]; $teamsArray[] = $mLTQ["teamName"]; } $fixturesList[$miniLeagueID] = createFixtures($teamsArray, 1); } for ($w = 1; $w <= $noWeeks; $w++) { if ($w > 1) { $plusDays = (($w - 1) * 7); $fixtureDate = date("d/m/Y", strtotime("$week1Date +$plusDays days")); } else { $fixtureDate = date("d/m/Y", strtotime("$week1Date")); } ?> <div class="roundDisplay autoFixtures selectedRoundDisplay"> <div class="listTitle listTitleAG">Week <?php echo $w ?> Fixtures</div> <div class="roundDateInp">Date: <input type="text" name="fixtureDate[<?php echo $w ?>]" class="roundDate" size="50" value="<?php echo $fixtureDate ?>" /></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"]; $groupWeekFixtures = $fixturesList[$miniLeagueID][$w]; ?> <div class="listTitle listTitleAG"><?php echo $miniLeagueTitle ?></div> <div class="matchVenueNInp">Venue: <select class="matchVenue" name="fixtureVenue[<?php echo $miniLeagueID ?>][<?php echo $w ?>]"> <option value="0">Select Venue</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 echo $clubName ?></option> <?php } ?> </select> </div> <div class="fixturesListC"> <ul id="fixtures<?php echo $w ?>_<?php echo $miniLeagueID ?>" class="fixtureSet ui-sortable" data-nm="<?php echo $noTeams ?>" data-cw="fixtures<?php echo $w ?>_<?php echo $miniLeagueID ?>"> <?php foreach($groupWeekFixtures as $matchID => $teams) { $homeTeam = $teams[0]; $awayTeam = $teams[1]; if ($w > $homeWeeks) { $inputID = $miniLeagueID ."_". $matchID ."R"; $buttonClass = "swapFixtureR"; } else { $inputID = $miniLeagueID ."_". $matchID; $buttonClass = "swapFixture"; } if (trim($homeTeam) == "" || trim($awayTeam) == "") { } else { ?> <li id="home<?php echo $inputID ?>" class="ui-sortable-handle" data-m="<?php echo $miniLeagueID ?>" data-w="<?php echo $w ?>"><input type="text" class="playerName" name="teams[<?php echo $miniLeagueID ?>][<?php echo $w ?>][]" size="50" value="<?php echo $homeTeam ?>" readonly /><a class="<?php echo $buttonClass ?>">Swap Home/Away</a></li> <li id="away<?php echo $inputID ?>" class="ui-sortable-handle" data-m="<?php echo $miniLeagueID ?>" data-w="<?php echo $w ?>"><input type="text" class="playerName" name="teams[<?php echo $miniLeagueID ?>][<?php echo $w ?>][]" size="50" value="<?php echo $awayTeam ?>" readonly /></li> <?php } } ?> </ul> </div> <?php } ?> </div> <?php } } /* if ($hasPlayoff > 0) { ?> <div class="roundDisplay fixtureDisplay selectedRoundDisplay"> <?php if ($hasPlayoff == 1) { $plusDays = (($w - 1) * 7); $fixtureDate = date("d/m/Y", strtotime("$week1Date +$plusDays days")); $w++; if ($hasMiniLeagues == 2) { $groupTitles = array(); $miniLeagueQuery = mysqli_query($conn, "SELECT miniLeagueTitle FROM leagueMiniLeagues WHERE leagueID = '$leagueID' ORDER BY id ASC"); while ($mLQ = mysqli_fetch_array($miniLeagueQuery)) { $groupTitles[] = $mLQ["miniLeagueTitle"]; } ?> <div class="roundDisplay fixtureDisplay selectedRoundDisplay"> <div class="listTitle listTitleW">Final 1st Leg</div> <div class="roundDateInp">Date: <input type="text" name="fixtureDate[<?php echo $w ?>]" class="roundDate" size="50" value="<?php echo $fixtureDate ?>" /></div> <div class="fixturesListC"> <ul id="fixtures<?php echo $w ?>_<?php echo $miniLeagueID ?>" class="fixtureSet ui-sortable" data-nm="<?php echo $noTeams ?>" data-cw="teams<?php echo $w ?>_<?php echo $miniLeagueID ?>"> <li class="teamF ui-sortable-handle"><input type="text" class="playerName" size="50" placeholder="Winner <?php echo $groupTitles[0] ?>" value="" readonly /></li> <li class="teamF ui-sortable-handle"><input type="text" class="playerName" size="50" placeholder="Winner <?php echo $groupTitles[1] ?>" value="" readonly /></li> </ul> </div> </div> <?php $plusDays = (($w - 1) * 7); $fixtureDate = date("d/m/Y", strtotime("$week1Date +$plusDays days")); ?> <div class="roundDisplay fixtureDisplay selectedRoundDisplay"> <div class="listTitle listTitleW">Final 2nd Leg</div> <div class="roundDateInp">Date: <input type="text" name="fixtureDate[<?php echo $w ?>]" class="roundDate" size="50" value="<?php echo $fixtureDate ?>" /></div> <div class="fixturesListC"> <ul id="fixtures<?php echo $w ?>_<?php echo $miniLeagueID ?>" class="fixtureSet ui-sortable" data-nm="<?php echo $noTeams ?>" data-cw="teams<?php echo $w ?>_<?php echo $miniLeagueID ?>"> <li class="teamF ui-sortable-handle"><input type="text" class="playerName" size="50" placeholder="Winner <?php echo $groupTitles[1] ?>" value="" readonly /></li> <li class="teamF ui-sortable-handle"><input type="text" class="playerName" size="50" placeholder="Winner <?php echo $groupTitles[0] ?>" value="" readonly /></li> </ul> </div> </div> <?php } } elseif ($hasPlayoff == 2) { if ($hasMiniLeagues == 2) { $plusDays = (($w - 1) * 7); $w++; $fixtureDate = date("d/m/Y", strtotime("$week1Date +$plusDays days")); $groupTitles = array(); $miniLeagueQuery = mysqli_query($conn, "SELECT miniLeagueTitle FROM leagueMiniLeagues WHERE leagueID = '$leagueID' ORDER BY id ASC"); while ($mLQ = mysqli_fetch_array($miniLeagueQuery)) { $groupTitles[] = $mLQ["miniLeagueTitle"]; } ?> <div class="listTitle listTitleW">Final</div> <div class="roundDateInp">Date: <input type="text" name="fixtureDate[<?php echo $w ?>]" class="roundDate" size="50" value="<?php echo $fixtureDate ?>" /></div> <div class="fixturesListC"> <ul id="fixtures<?php echo $w ?>_<?php echo $miniLeagueID ?>" class="fixtureSet ui-sortable" data-nm="<?php echo $noTeams ?>" data-cw="teams<?php echo $w ?>_<?php echo $miniLeagueID ?>"> <li class="teamF ui-sortable-handle"><input type="text" class="playerName" size="50" placeholder="Winner <?php echo $groupTitles[0] ?>" value="" readonly /></li> <li class="teamF ui-sortable-handle"><input type="text" class="playerName" size="50" placeholder="Winner <?php echo $groupTitles[1] ?>" value="" readonly /></li> </ul> </div> <?php } else { $noFinalists = $hasMiniLeagues; $noRounds = 1; do { $compLeft = $noFinalists / 2; $noRounds++; } while ($compLeft > 2); $noMatches = 1; for ($thisRound = 1; $thisRound <= $noRounds; $thisRound++) { $noMatches = $noMatches * 2; $matchesArray[] = $noMatches; } $matchesArrayR = array_reverse($matchesArray); $matchesArrayC = 0; for ($thisRound = 1; $thisRound <= $noRounds; $thisRound++) { $noTeams = $matchesArrayR[$matchesArrayC]; $noMatches = $noTeams / 2; $plusDays = (($w - 1) * 7); $fixtureDate = date("d/m/Y", strtotime("$week1Date +$plusDays days")); $w++; $final = $noRounds; $semiFinal = $noRounds - 1; $qtrFinal = $noRounds - 2; if ($thisRound == $final) { $roundTitle = "Final"; $placeholder = "Winner Semi Final"; } elseif ($thisRound == $semiFinal) { $roundTitle = "Semi-Finals"; if ($noRounds == 2) { $placeholder = "Group Winner"; } else { $placeholder = "Winner Quarter Final"; } } elseif ($thisRound == $qtrFinal) { $roundTitle = "Quarter-Finals"; if ($noRounds == 3) { $placeholder = "Group Winner"; } else { $placeholder = "Round Winner"; } } else { $roundTitle = "Round $thisRound"; $placeholder = "Group Winner"; } ?> <div class="roundDisplay fixtureDisplay selectedRoundDisplay"> <div class="listTitle listTitleW"><?php echo $roundTitle ?></div> <div class="roundDateInp">Date: <input type="text" name="fixtureDate[<?php echo $w ?>]" class="roundDate" size="50" value="<?php echo $fixtureDate ?>" /></div> <ul id="fixtures<?php echo $w ?>_<?php echo $miniLeagueID ?>" class="fixtureSet ui-sortable" data-nm="<?php echo $noTeams ?>" data-cw="teams<?php echo $w ?>_<?php echo $miniLeagueID ?>"> <?php for ($i = 1; $i <= $noTeams; $i++) { ?> <li class="teamF ui-sortable-handle"><input type="text" class="playerName" size="50" placeholder="<?php echo $placeholder ?>" value="" readonly /></li> <?php } ?> </ul> </div> <?php $matchesArrayC++; } } } elseif ($hasPlayoff == 3) { if ($hasMiniLeagues == 1) { $plusDays = (($w - 1) * 7); $fixtureDate = date("d/m/Y", strtotime("$week1Date +$plusDays days")); $w++; ?> <div class="roundDisplay fixtureDisplay selectedRoundDisplay"> <div class="listTitle listTitleW">Final 1st Leg</div> <div class="roundDateInp">Date: <input type="text" name="fixtureDate[<?php echo $w ?>]" class="roundDate" size="50" value="<?php echo $fixtureDate ?>" /></div> <div class="fixturesListC"> <ul id="fixtures<?php echo $w ?>_<?php echo $miniLeagueID ?>" class="fixtureSet ui-sortable" data-nm="<?php echo $noTeams ?>" data-cw="teams<?php echo $w ?>_<?php echo $miniLeagueID ?>"> <li class="teamF ui-sortable-handle"><input type="text" class="playerName" size="50" placeholder="League 2nd place" value="" readonly /></li> <li class="teamF ui-sortable-handle"><input type="text" class="playerName" size="50" placeholder="League 1st place" value="" readonly /></li> </ul> </div> </div> <?php $plusDays = (($w - 1) * 7); $fixtureDate = date("d/m/Y", strtotime("$week1Date +$plusDays days")); ?> <div class="roundDisplay fixtureDisplay selectedRoundDisplay"> <div class="listTitle listTitleW">Final 2nd Leg</div> <div class="roundDateInp">Date: <input type="text" name="fixtureDate[<?php echo $w ?>]" class="roundDate" size="50" value="<?php echo $fixtureDate ?>" /></div> <div class="fixturesListC"> <ul id="fixtures<?php echo $w ?>_<?php echo $miniLeagueID ?>" class="fixtureSet ui-sortable" data-nm="<?php echo $noTeams ?>" data-cw="teams<?php echo $w ?>_<?php echo $miniLeagueID ?>"> <li class="teamF ui-sortable-handle"><input type="text" class="playerName" size="50" placeholder="League 1st place" value="" readonly /></li> <li class="teamF ui-sortable-handle"><input type="text" class="playerName" size="50" placeholder="League 2nd place" value="" readonly /></li> </ul> </div> </div> <?php } } elseif ($hasPlayoff == 4) { } ?> </div> <?php } */ ?> </div> <?php } ?>