Permalink
Browse files

v2.2.3

  • Loading branch information...
Kevin Roth
Kevin Roth committed Sep 6, 2016
1 parent cbefc9c commit 11f637b5873fa68624598bd33cb1763962721133
Showing with 47 additions and 22 deletions.
  1. +12 −0 CHANGELOG.md
  2. +2 −2 README.md
  3. +19 −7 entry_form.php
  4. BIN images/helmets_big/ari1.gif
  5. BIN images/helmets_big/ari2.gif
  6. BIN images/helmets_big/atl1.gif
  7. BIN images/helmets_big/atl2.gif
  8. BIN images/helmets_big/bal1.gif
  9. BIN images/helmets_big/bal2.gif
  10. BIN images/helmets_big/buf1.gif
  11. BIN images/helmets_big/buf2.gif
  12. BIN images/helmets_big/car1.gif
  13. BIN images/helmets_big/car2.gif
  14. BIN images/helmets_big/chi1.gif
  15. BIN images/helmets_big/chi2.gif
  16. BIN images/helmets_big/cin1.gif
  17. BIN images/helmets_big/cin2.gif
  18. BIN images/helmets_big/cle1.gif
  19. BIN images/helmets_big/cle2.gif
  20. BIN images/helmets_big/dal1.gif
  21. BIN images/helmets_big/dal2.gif
  22. BIN images/helmets_big/den1.gif
  23. BIN images/helmets_big/den2.gif
  24. BIN images/helmets_big/det1.gif
  25. BIN images/helmets_big/det2.gif
  26. BIN images/helmets_big/gb1.gif
  27. BIN images/helmets_big/gb2.gif
  28. BIN images/helmets_big/hou1.gif
  29. BIN images/helmets_big/hou2.gif
  30. BIN images/helmets_big/ind1.gif
  31. BIN images/helmets_big/ind2.gif
  32. BIN images/helmets_big/jax1.gif
  33. BIN images/helmets_big/jax2.gif
  34. BIN images/helmets_big/kc1.gif
  35. BIN images/helmets_big/kc2.gif
  36. BIN images/helmets_big/mia1.gif
  37. BIN images/helmets_big/mia2.gif
  38. BIN images/helmets_big/min1.gif
  39. BIN images/helmets_big/min2.gif
  40. BIN images/helmets_big/ne1.gif
  41. BIN images/helmets_big/ne2.gif
  42. BIN images/helmets_big/no1.gif
  43. BIN images/helmets_big/no2.gif
  44. BIN images/helmets_big/nyg1.gif
  45. BIN images/helmets_big/nyg2.gif
  46. BIN images/helmets_big/nyj1.gif
  47. BIN images/helmets_big/nyj2.gif
  48. BIN images/helmets_big/oak1.gif
  49. BIN images/helmets_big/oak2.gif
  50. BIN images/helmets_big/phi1.gif
  51. BIN images/helmets_big/phi2.gif
  52. BIN images/helmets_big/pit1.gif
  53. BIN images/helmets_big/pit2.gif
  54. BIN images/helmets_big/sd1.gif
  55. BIN images/helmets_big/sd2.gif
  56. BIN images/helmets_big/sea1.gif
  57. BIN images/helmets_big/sea2.gif
  58. BIN images/helmets_big/sf1.gif
  59. BIN images/helmets_big/sf2.gif
  60. BIN images/helmets_big/stl1.gif
  61. BIN images/helmets_big/stl2.gif
  62. BIN images/helmets_big/tb1.gif
  63. BIN images/helmets_big/tb2.gif
  64. BIN images/helmets_big/ten1.gif
  65. BIN images/helmets_big/ten2.gif
  66. BIN images/helmets_big/was1.gif
  67. BIN images/helmets_big/was2.gif
  68. BIN images/helmets_small/ARIL.gif
  69. BIN images/helmets_small/ARIR.gif
  70. BIN images/helmets_small/ATLL.gif
  71. BIN images/helmets_small/ATLR.gif
  72. BIN images/helmets_small/BALL.gif
  73. BIN images/helmets_small/BALR.gif
  74. BIN images/helmets_small/BUFL.gif
  75. BIN images/helmets_small/BUFR.gif
  76. BIN images/helmets_small/CARL.gif
  77. BIN images/helmets_small/CARR.gif
  78. BIN images/helmets_small/CHIL.gif
  79. BIN images/helmets_small/CHIR.gif
  80. BIN images/helmets_small/CINL.gif
  81. BIN images/helmets_small/CINR.gif
  82. BIN images/helmets_small/CLEL.gif
  83. BIN images/helmets_small/CLER.gif
  84. BIN images/helmets_small/DALL.gif
  85. BIN images/helmets_small/DALR.gif
  86. BIN images/helmets_small/DENL.gif
  87. BIN images/helmets_small/DENR.gif
  88. BIN images/helmets_small/DETL.gif
  89. BIN images/helmets_small/DETR.gif
  90. BIN images/helmets_small/GBL.gif
  91. BIN images/helmets_small/GBR.gif
  92. BIN images/helmets_small/HOUL.gif
  93. BIN images/helmets_small/HOUR.gif
  94. BIN images/helmets_small/INDL.gif
  95. BIN images/helmets_small/INDR.gif
  96. BIN images/helmets_small/JAXL.gif
  97. BIN images/helmets_small/JAXR.gif
  98. BIN images/helmets_small/KCL.gif
  99. BIN images/helmets_small/KCR.gif
  100. BIN images/helmets_small/MIAL.gif
  101. BIN images/helmets_small/MIAR.gif
  102. BIN images/helmets_small/MINL.gif
  103. BIN images/helmets_small/MINR.gif
  104. BIN images/helmets_small/NEL.gif
  105. BIN images/helmets_small/NER.gif
  106. BIN images/helmets_small/NOL.gif
  107. BIN images/helmets_small/NOR.gif
  108. BIN images/helmets_small/NYGL.gif
  109. BIN images/helmets_small/NYGR.gif
  110. BIN images/helmets_small/NYJL.gif
  111. BIN images/helmets_small/NYJR.gif
  112. BIN images/helmets_small/OAKL.gif
  113. BIN images/helmets_small/OAKR.gif
  114. BIN images/helmets_small/PHIL.gif
  115. BIN images/helmets_small/PHIR.gif
  116. BIN images/helmets_small/PITL.gif
  117. BIN images/helmets_small/PITR.gif
  118. BIN images/helmets_small/SDL.gif
  119. BIN images/helmets_small/SDR.gif
  120. BIN images/helmets_small/SEAL.gif
  121. BIN images/helmets_small/SEAR.gif
  122. BIN images/helmets_small/SFL.gif
  123. BIN images/helmets_small/SFR.gif
  124. BIN images/helmets_small/STLL.gif
  125. BIN images/helmets_small/STLR.gif
  126. BIN images/helmets_small/TBL.gif
  127. BIN images/helmets_small/TBR.gif
  128. BIN images/helmets_small/TENL.gif
  129. BIN images/helmets_small/TENR.gif
  130. BIN images/helmets_small/WASL.gif
  131. BIN images/helmets_small/WASR.gif
  132. BIN images/logos/{STL.gif → LA.gif}
  133. 0 images/logos/{STL.svg → LA.svg}
  134. +4 −4 includes/functions.php
  135. +6 −4 results.php
  136. +2 −2 schedule_edit.php
  137. +2 −2 schedules.php
  138. +0 −1 user_edit.php
@@ -1,6 +1,18 @@
# Change Log
All notable changes to this project will be documented in this file.
## 2.2.3 - 9/5/2016
### Changed
- Updated README.md with new minimum requirements
### Fixed
- LA Rams Logo was not displaying
- Results showed week 1 winners before any games have been played
- Team record and team streak are no longer displayed for week 1 until scores have been entered
### Removed
- Removed old helmet logos
## 2.2.2 - 7/12/2016
### Changed/Fixed
- Time zone offset is now set automatically, based on new SERVER_TIMEZONE constant. This should fix [issue #2](https://github.com/rothkj1022/phppickem/issues/2) and [issue #16](https://github.com/rothkj1022/phppickem/issues/16)
@@ -4,8 +4,8 @@ PHP Pick 'Em is a free php web application that allows you to host a weekly NFL
## Minimum Requirements
* PHP version 4.3 or greater
* MySQL version 4.0 or greater with mysqli enabled
* PHP version 5.2 or greater
* MySQL version 5.0 or greater with mysqli enabled
* Mcrypt module for password encryption
@@ -159,14 +159,14 @@ function checkRadios() {
$scoreEntered = false;
$homeTeam = new team($row['homeID']);
$visitorTeam = new team($row['visitorID']);
$homeScore = (int)$row['homeScore'];
$visitorScore = (int)$row['visitorScore'];
$rowclass = (($i % 2 == 0) ? ' class="altrow"' : '');
echo ' <div class="matchup">' . "\n";
echo ' <div class="row bg-row1">'."\n";
if (strlen($row['homeScore']) > 0 && strlen($row['visitorScore']) > 0) {
if (!empty($homeScore) || !empty($visitorScore)) {
//if score is entered, show score
$scoreEntered = true;
$homeScore = (int)$row['homeScore'];
$visitorScore = (int)$row['visitorScore'];
if ($homeScore > $visitorScore) {
$winnerID = $row['homeID'];
} else if ($visitorScore > $homeScore) {
@@ -207,13 +207,25 @@ function checkRadios() {
echo ' <div class="row bg-row3">'."\n";
echo ' <div class="col-xs-6 center">'."\n";
echo ' <div class="team">' . $visitorTeam->city . ' ' . $visitorTeam->team . '</div>'."\n";
echo ' <div class="record">Record: ' . getTeamRecord($visitorTeam->teamID) . '</div>'."\n";
echo ' <div class="streak">Streak: ' . getTeamStreak($visitorTeam->teamID) . '</div>'."\n";
$teamRecord = trim(getTeamRecord($visitorTeam->teamID));
if (!empty($teamRecord)) {
echo ' <div class="record">Record: ' . $teamRecord . '</div>'."\n";
}
$teamStreak = trim(getTeamStreak($visitorTeam->teamID));
if (!empty($teamStreak)) {
echo ' <div class="streak">Streak: ' . $teamStreak . '</div>'."\n";
}
echo ' </div>'."\n";
echo ' <div class="col-xs-6 center">' . "\n";
echo ' <div class="team">' . $homeTeam->city . ' ' . $homeTeam->team . '</div>'."\n";
echo ' <div class="record">Record: ' . getTeamRecord($homeTeam->teamID) . '</div>'."\n";
echo ' <div class="streak">Streak: ' . getTeamStreak($homeTeam->teamID) . '</div>'."\n";
$teamRecord = trim(getTeamRecord($homeTeam->teamID));
if (!empty($teamRecord)) {
echo ' <div class="record">Record: ' . $teamRecord . '</div>'."\n";
}
$teamStreak = trim(getTeamStreak($homeTeam->teamID));
if (!empty($teamStreak)) {
echo ' <div class="streak">Streak: ' . $teamStreak . '</div>'."\n";
}
echo ' </div>' . "\n";
echo ' </div>'."\n";
if ($row['expired']) {
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
@@ -333,12 +333,12 @@ function getTeamRecord($teamID) {
$sql = "select weekNum, (homeScore > visitorScore) as gameWon, (homeScore = visitorScore) as gameTied ";
$sql .= "from " . DB_PREFIX . "schedule ";
$sql .= "where (homeScore is not null and visitorScore is not null)";
$sql .= "where (homeScore not in(null, '0') and visitorScore not in(null, '0'))";
$sql .= " and homeID = '" . $teamID . "' ";
$sql .= "union ";
$sql .= "select weekNum, (homeScore < visitorScore) as gameWon, (homeScore = visitorScore) as gameTied ";
$sql .= "from " . DB_PREFIX . "schedule ";
$sql .= "where (homeScore is not null and visitorScore is not null)";
$sql .= "where (homeScore not in(null, '0') and visitorScore not in(null, '0'))";
$sql .= " and visitorID = '" . $teamID . "' ";
$sql .= "order by weekNum";
//echo $sql;
@@ -368,12 +368,12 @@ function getTeamStreak($teamID) {
$sql = "select weekNum, (homeScore > visitorScore) as gameWon, (homeScore = visitorScore) as gameTied ";
$sql .= "from " . DB_PREFIX . "schedule ";
$sql .= "where (homeScore is not null and visitorScore is not null)";
$sql .= "where (homeScore not in(null, '0') and visitorScore not in(null, '0'))";
$sql .= " and homeID = '" . $teamID . "' ";
$sql .= "union ";
$sql .= "select weekNum, (homeScore < visitorScore) as gameWon, (homeScore = visitorScore) as gameTied ";
$sql .= "from " . DB_PREFIX . "schedule ";
$sql .= "where (homeScore is not null and visitorScore is not null)";
$sql .= "where (homeScore not in(null, '0') and visitorScore not in(null, '0'))";
$sql .= " and visitorID = '" . $teamID . "' ";
$sql .= "order by weekNum";
//echo $sql;
@@ -40,19 +40,21 @@
$games[$row['gameID']]['gameID'] = $row['gameID'];
$games[$row['gameID']]['homeID'] = $row['homeID'];
$games[$row['gameID']]['visitorID'] = $row['visitorID'];
if (strlen($row['homeScore']) > 0 && strlen($row['visitorScore']) > 0) {
if ((int)$row['homeScore'] > (int)$row['visitorScore']) {
$homeScore = (int)$row['homeScore'];
$visitorScore = (int)$row['visitorScore'];
if ($homeScore + $visitorScore > 0) {
if ($homeScore > $visitorScore) {
$games[$row['gameID']]['winnerID'] = $row['homeID'];
}
if ((int)$row['visitorScore'] > (int)$row['homeScore']) {
if ($visitorScore > $homeScore) {
$games[$row['gameID']]['winnerID'] = $row['visitorID'];
}
} else {
$games[$row['gameID']]['winnerID'] = '';
$allScoresIn = false;
}
}
$query->free;
$query->close();
//get array of player picks
$playerPicks = array();
@@ -210,8 +210,8 @@
$visitorTeam = new team($row['visitorID']);
$rowclass = (($i % 2 == 0) ? ' class="altrow"' : '');
echo ' <tr' . $rowclass . '>' . "\n";
echo ' <td><img src="images/helmets_small/' . $homeTeam->teamID . 'R.gif" /></td>' . "\n";
echo ' <td><img src="images/helmets_small/' . $visitorTeam->teamID . 'L.gif" /></td>' . "\n";
echo ' <td><img src="images/logos/' . $homeTeam->teamID . '.svg" /></td>' . "\n";
echo ' <td><img src="images/logos/' . $visitorTeam->teamID . '.svg" /></td>' . "\n";
echo ' <td>' . $visitorTeam->teamName . ' @ ' . $homeTeam->teamName . '</td>' . "\n";
if (is_numeric($row['homeScore']) && is_numeric($row['visitorScore'])) {
//if score is entered, show result
@@ -74,8 +74,8 @@
$visitorTeam = new team($row['visitorID']);
$rowclass = (($i % 2 == 0) ? ' class="altrow"' : '');
echo ' <tr' . $rowclass . '>' . "\n";
echo ' <td><img src="images/helmets_small/' . $homeTeam->teamID . 'R.gif" /></td>' . "\n";
echo ' <td><img src="images/helmets_small/' . $visitorTeam->teamID . 'L.gif" /></td>' . "\n";
echo ' <td><img src="images/logos/' . $homeTeam->teamID . '.svg" /></td>' . "\n";
echo ' <td><img src="images/logos/' . $visitorTeam->teamID . '.svg" /></td>' . "\n";
echo ' <td>' . $visitorTeam->teamName . ' @ ' . $homeTeam->teamName . '</td>' . "\n";
if (is_numeric($row['homeScore']) && is_numeric($row['visitorScore'])) {
//if score is entered, show result
@@ -5,7 +5,6 @@
if (isset($_POST['submit'])) {
$my_form = new validator;
$mail = new PHPMailer();
if($my_form->checkEmail($_POST['email'])) { // check for good mail

0 comments on commit 11f637b

Please sign in to comment.