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/pdf/ |
Upload File : |
<?php if (!isset($_GET["leagueID"])) { header("Location: /"); } include "../globalVars.php"; $leagueID = $_GET["leagueID"]; $leagueQuery = mysqli_query($conn, "SELECT * FROM leagueConfig WHERE id = '$leagueID'"); while ($lQ = mysqli_fetch_array($leagueQuery)) { $leagueType = $lQ["leagueType"]; $hasMiniLeagues = $lQ["hasMiniLeagues"]; $homeAndAway = $lQ["homeAndAway"]; $startDate = $lQ["startDate"]; $tStartMonth = date("F", strtotime($startDate)); $tStartYear = date("Y", strtotime($startDate)); $startDisplay = date("jS F, Y", strtotime($startDate)); $pointsWin = $lQ["pointsWin"]; $pointsDraw = $lQ["pointsDraw"]; $pointsRink = $lQ["pointsRink"]; } $leagueGroupQuery = mysqli_query($conn, "SELECT groupTitle FROM leagueGroups WHERE id = '$leagueType'"); while ($lGQ = mysqli_fetch_array($leagueGroupQuery)) { $leagueGroup = $lGQ["groupTitle"]; } $leagueTitle = "$leagueGroup $tStartMonth $tStartYear"; ?> <!doctype html> <html> <head> <meta charset="utf-8"> <title><?php echo $leagueTitle ?> | <?php echo $companyName ?></title> <meta name="author" content="www.modsnetwebsitedesign.com"/> <meta name="DC.Title" content="<?php echo $leagueTitle ?> | <?php echo $companyName ?>"/> <meta name="DC.Creator" content="https://www.modsnetwebsitedesign.com"/> <meta name="og:title" content="<?php echo $leagueTitle ?> | <?php echo $companyName ?>"> <meta name="og:description" content="<?php echo $leagueTitle ?> <?php echo $companyName ?>"> <meta name="og:image" content="<?php echo $Iurl ?>og-image.jpg"> <meta name="og:image:secure_url" content="<?php echo $Iurl ?>og-image.jpg"> <meta property="og:updated_time" content="1651497389" /> <meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no, width=device-width" /> <link rel="shortcut icon" type="image/x-icon" href="<?php echo $ENurl ?>favicon.ico"/> <link rel="icon" type="image/ico" href="<?php echo $Iurl ?>favicon.png" /> <link rel="apple-touch-icon" href="<?php echo $Iurl ?>favicon-60.png"> <link rel="apple-touch-icon" sizes="76x76" href="<?php echo $Iurl ?>favicon-76.png"> <link rel="apple-touch-icon" sizes="120x120" href="<?php echo $Iurl ?>favicon-120.png"> <link rel="apple-touch-icon" sizes="152x152" href="<?php echo $Iurl ?>favicon-152.png"> <link rel="preconnect" href="https://fonts.googleapis.com"> <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> <link href="https://fonts.googleapis.com/css2?family=Arimo:wght@700&family=Open+Sans:wght@400;600;700&family=Roboto:wght@700&display=swap" rel="stylesheet"> <link type="text/css" href="<?php echo $url ?>pdf/stylesheet-fixtures.css" rel="stylesheet" media="all" /> </head> <body> <div class="pdfPage"> <div class="header"> <div class="logo"> <a href="<?php echo $url ?>"><img src="<?php echo $Iurl ?>logo.png" width="69" height="98"alt="<?php echo $leagueTitle ?> | <?php echo $companyName ?>" title="<?php echo $leagueTitle ?> | <?php echo $companyName ?>"></a> <div class="logoTitle"> <div class="logoTitleT"> <a href="<?php echo $url ?>"> <span class="logoTitleInt">Federación Andaluza de Bolos</span> <span class="logoTitleAl">AlmerÃa</span> </a> </div> </div> </div> <div class="fixturesHeader"> <div class="fixturesHeaderT"> <p><?php echo $leagueTitle ?></p> </div> </div> </div> <div class="main"> <h1>League Standings</h1> <?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"]; ?> <h3><?php echo $miniLeagueTitle ?></h3> <table class="leagueTable"> <thead> <th class="tN"> </th> <th class="tS">P</th> <th class="tS">W</th> <th class="tS">D</th> <th class="tS">L</th> <th class="tM">SF</th> <th class="tM">SA</th> <th class="tL">Diff</th> <th class="tL">Rink Pts</th> <th class="tL tP">Pts</th> </thead> <tbody> <?php $leagueStandingQuery = mysqli_query($conn, "SELECT team, COUNT(*) AS played, COUNT(CASE WHEN homeScore > awayScore THEN 1 END) AS won, COUNT(CASE WHEN homeScore = awayScore THEN 1 END) AS drawn, COUNT(CASE WHEN awayScore> homeScore THEN 1 END) AS lost, SUM(homeScore) AS shotsFor, SUM(awayScore) AS shotsAgainst, SUM(homeScore) - SUM(awayScore) AS shotsDiff, SUM(homeRinkPts) AS rinkPts, SUM( CASE WHEN homeScore > awayScore THEN $pointsWin ELSE 0 END + CASE WHEN homeScore = awayScore THEN $pointsDraw ELSE 0 END + homeRinkPts ) AS pts FROM ( SELECT homeTeam AS team, homeScore, awayScore, homeRinkPts, awayRinkPts from leagueResults WHERE miniLeagueID = '$miniLeagueID' AND ((homeTeam != '') AND (awayTeam != '')) AND ((homeScore >= 0) AND (awayScore >= 0)) AND (weekID < 900) UNION ALL SELECT awayTeam AS team, awayScore, homeScore, awayRinkPts, homeRinkPts from leagueResults WHERE miniLeagueID = '$miniLeagueID' AND ((homeTeam != '') AND (awayTeam != '')) AND ((homeScore >= 0) AND (awayScore >= 0)) AND (weekID < 900) ) AS a GROUP BY team ORDER BY pts DESC, shotsDiff DESC") or die (mysqli_error($conn)); if (mysqli_num_rows($leagueStandingQuery) > 0) { $addedTeams = array(); while ($lSQ = mysqli_fetch_array($leagueStandingQuery)) { $teamName = $lSQ["team"]; $addedTeams[] = $teamName; $matchesPlayed = $lSQ["played"]; $matchesWon = $lSQ["won"]; $matchesDrawn = $lSQ["drawn"]; $matchesLost = $lSQ["lost"]; $shotsFor = $lSQ["shotsFor"]; $shotsAgainst = $lSQ["shotsAgainst"]; $shotsDiff = $lSQ["shotsDiff"]; $rinkPts = $lSQ["rinkPts"]; $totalPts = $lSQ["pts"]; ?> <tr> <td class="tN"><?php echo $teamName ?></td> <td><?php echo $matchesPlayed ?></td> <td><?php echo $matchesWon ?></td> <td><?php echo $matchesDrawn ?></td> <td><?php echo $matchesLost ?></td> <td><?php echo $shotsFor ?></td> <td><?php echo $shotsAgainst ?></td> <td><?php echo $shotsDiff ?></td> <td><?php echo $rinkPts ?></td> <td class="tP"><?php echo $totalPts ?></td> </tr> <?php } $defaultLeagueQuery = mysqli_query($conn, "SELECT * FROM leagueMiniLeaguesTeams WHERE miniLeagueID = '$miniLeagueID' AND (teamName NOT IN ('". implode("', '", $addedTeams) ."')) ORDER BY teamName ASC"); while ($dLQ = mysqli_fetch_array($defaultLeagueQuery)) { $missingTeamName = $dLQ["teamName"]; ?> <tr> <td class="tN ttt"><?php echo $missingTeamName ?></td> <td>0</td> <td>0</td> <td>0</td> <td>0</td> <td>0</td> <td>0</td> <td>0</td> <td>0</td> <td class="tP">0</td> </tr> <?php } } else { $defaultLeagueQuery = mysqli_query($conn, "SELECT * FROM leagueMiniLeaguesTeams WHERE miniLeagueID = '$miniLeagueID' ORDER BY teamName ASC"); while ($dLQ = mysqli_fetch_array($defaultLeagueQuery)) { $teamName = $dLQ["teamName"]; ?> <tr> <td class="tN"><?php echo $teamName ?></td> <td>0</td> <td>0</td> <td>0</td> <td>0</td> <td>0</td> <td>0</td> <td>0</td> <td>0</td> <td class="tP">0</td> </tr> <?php } } ?> </tbody> </table> <?php } ?> </div> </div>