function recalculateScores($structure) { Standings::resetScores($this->name); $matches2 = $this->getRoundMatches("ALL"); foreach ($matches2 as $match) { //echo "about to update scores"; $match->fixScores($structure); } }
echo $r['pilotEmail']; ?> <br /> <b>Corporation history:</b><br /> <?php $character = Character::fromECMSRow($r); //echo "char ID: ". $character-> //TODO: current corp and alliance $corpIds = API::getCorporationHistoryIds($character); if (!$corpIds or !is_array($corpIds)) { echo $corpIds . "<br/>"; //should contain some error info } else { $reportedNothing = true; foreach ($corpIds as $id) { $standing = Standings::checkCorpStandings($id); if (!$standing) { echo "Standing could not be queried!<br/>"; $reportedNothing = false; } elseif ($standing < -9) { //TODO get corp name echo "<font color='red'>Hostile corp: {$id}</font><br/>"; $reportedNothing = false; } elseif ($standing < 0) { //TODO get corp name echo "<font color='orange'>Hostile corp: {$id}</font><br/>"; $reportedNothing = false; } } if ($reportedNothing) { echo "History seems OK.<br/>";
<!DOCTYPE html> <!--[if lt IE 7]><html class="no-js lt-ie9 lt-ie8 lt-ie7" lang="en" xml:lang="en"><![endif]--> <!--[if IE 7]><html class="no-js lt-ie9 lt-ie8" lang="en" xml:lang="en"><![endif]--> <!--[if IE 8]><html class="no-js lt-ie9" lang="en" xml:lang="en"><![endif]--><!--[if gt IE 8]><!--> <html class="no-js" lang="en" xml:lang="en" xmlns="http://www.w3.org/1999/xhtml"> <!--<![endif]--> <head> <meta name="viewport" content="width=device-width, initial-scale=1.0"/> <title>Old Boys Soccer League</title> <link rel="stylesheet" href="css/uikit.min.css" /> <script src="jquery-2.1.4.min.js"></script> <script src="js/uikit.min.js"> </script> <link type='text/css' title='standard' rel='stylesheet' href='style_standings.css' /> <link type='text/css' title='standard' rel='stylesheet' href='media.css' /> </head> <body class="en" > <div class="container"> <div class="navbar navbar-sectionheader"> <div class="header-top"> <img class="header-image" src="../oldboys_pictures/OldboysLogoPNG.png" /> </div> <div class="menu-wrap"> <!-- This is the container enabling the JavaScript --> <div class="uk-button-dropdown" data-uk-dropdown> <!-- This is the button toggling the dropdown -->
public function fixScores($structure) { // Goes through all matches in this round and updates scores //echo $this->playera_wins . $this->playera_losses; $thisevent = Event::findBySubevent($this->subevent); $playera_standing = new Standings($thisevent->name, $this->playera); $playerb_standing = new Standings($thisevent->name, $this->playerb); if ($this->playera_wins > $this->playerb_wins) { $playera_standing->score += 3; $playera_standing->matches_won += 1; if ($structure == "Single Elimination") { $playerb_standing->active = 0; } $this->result = 'A'; } else { $playerb_standing->score += 3; $playerb_standing->matches_won += 1; if ($structure == "Single Elimination") { $playera_standing->active = 0; } $this->result = 'B'; } if (strcmp($playera_standing->player, $playerb_standing->player) == 0) { //Might need this later if I want to rebuild bye score with standings $playera_standing->byes++; $playerb_standing->byes++; $playerb_standing->save(); } else { $playera_standing->matches_played++; $playera_standing->games_played += $this->playera_wins + $this->playera_losses; $playera_standing->games_won += $this->playera_wins; //echo "****playeragameswon".$playera_standing->games_won; $playerb_standing->matches_played++; $playerb_standing->games_played += $this->playera_wins + $this->playera_losses; $playerb_standing->games_won += $this->playerb_wins; } $playera_standing->save(); $playerb_standing->save(); }
function getStandings() { $standings = new Standings(); echo $standings->getStandings(); }
function standingsList($event) { Standings::printEventStandings($event->name, Player::loginName()); }
private static function getStandingsXml() { self::$standingsXml = API::getApiXmlByUrl(self::$url); //todo remove and fix //CURL error: Unknown SSL protocol error in connection to standings.goonfleet.com:443 //sent update request to provider echo self::$standingsXml . "<br/>"; if (!self::$standingsXml) { self::$errorInfo = "Unknown error."; } if (StrHelper::startsWith(self::$standingsXml, "CURL")) { self::$errorInfo = self::$standingsXml; } if (isset(self::$standingsXml->error['code'])) { self::$errorInfo = self::$standingsXml->error['code'] . " " . self::$standingsXml->error; } }
public static function writeSeed($eventname, $playername, $seed) { $standing = new Standings($eventname, $playername); $standing->seed = $seed; $standing->save(); }
echo "<br />"; print_ratingsHistory($_GET['format']); } elseif ($dispmode == 'allmatches') { print_allMatchForm($player); print_matchTable($player); } elseif ($dispmode == 'Filter Matches') { print_allMatchForm($player); print_matchTable($player); } elseif ($dispmode == 'changepass') { print_changePassForm($player, $result); } elseif ($dispmode == 'submit_result') { print_submit_resultForm($_GET['player'], $_GET['match_id']); } elseif ($dispmode == 'verify_result') { print_verify_resultForm($_POST['report'], $_POST['match_id'], $_POST['player']); } elseif ($dispmode == 'standings') { Standings::printEventStandings($_GET['event'], Player::loginName()); } elseif ($dispmode == 'verifymtgo') { print_verifyMtgoForm($player, $result); // print_manualverifyMtgoForm(); } elseif ($dispmode == 'drop_form') { print_dropConfirm($_GET['event'], $player); } else { print_mainPlayerCP($player); } } ?> </div> <!-- gatherling_main box --> </div> <!-- grid 10 suff 1 pre 1 --> <?php print_footer();