distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /* USAGE OF THIS PAGE: This is an internal page used only by standings.php. dayid is an optional parameter; if specified, results count only the scores of the day with the given id. roundid is an optional parameter; if specified and dayid is not specified, results count only the scores of the round with the given id With no parameters, this returns the overall standings. The result is not well-formed html, as it is intended for inclusion in the standings.php page */ require_once 'common.inc'; startpage(UNRESTRICTED); echo get_standings(isset($_GET['dayid']) ? $_GET['dayid'] : null, isset($_GET['roundid']) ? $_GET['roundid'] : null); ?>
$days[$dayid] = $dayname; } $stmt->close(); foreach ($rounds as $roundid => $roundname) { printf('<option value="r%d" %s> > %s</option>', $roundid, (!is_null($round_get) and $round_get == $roundid) ? 'selected="selected"' : '', $roundname); foreach ($round_days[$roundid] as $dayid) { printf('<option value="d%d" %s> > > %s</option>', $dayid, (!is_null($day_get) and $day_get == $dayid) ? 'selected="selected"' : '', $days[$dayid]); } } foreach ($roundless_days as $dayid) { printf('<option value="d%d" %s> > > %s</option>', $dayid, (!is_null($day_get) and $day_get == $dayid) ? 'selected="selected"' : '', $days[$dayid]); } $mysqli->close(); ?> </select> <button id="reloadbutton" type="submit">Reload</button> </form> <div id="standings"> <?php echo get_standings($day_get, $round_get); ?> </div> <p class="footnote">Note that scores are tentative and unofficial. Responses that do not match the regular expression pattern for any given response, correct or incorrect, are neither given credit nor penalized.</p> <?php footer(); ?> </body> </html>
<?php /* * Created on Sep 18, 2007 * * This file is not meant to be hit on its own. It is to be an include only. */ if (isset($GAME_TYPE) && ($GAME_TYPE == 'season' || $GAME_TYPE == 'pre' || $GAME_TYPE == 'post')) { //Do nothing } else { $GAME_TYPE = 'season'; } global $Link; get_standings(); /* * ******************************************************************************** * ******************************************************************************** * **************************L O C A L F U N C T I O N S************************** * ******************************************************************************** * ******************************************************************************** */ /* * Get Team Name */ function get_sked_team_name($teamId) { $teamName = ""; global $Link; $teamSelect = 'SELECT teamName FROM ' . TEAMS . ' WHERE teamID=' . $teamId; $teamResult = mysql_query($teamSelect, $Link); if ($teamResult && mysql_num_rows($teamResult) > 0) {