From 2f6e25d2ad5aa2ba6eefce2383d59e53043dec04 Mon Sep 17 00:00:00 2001 From: CMDR furrycat Date: Mon, 1 Feb 2016 09:15:58 -0500 Subject: [PATCH] Endorsement key and new missing evidence endorsement. --- lib/race.php | 51 +++++++++++++++++++++++++++++--- propel/build/classes/buckyball/Entry.php | 5 ++++ 2 files changed, 52 insertions(+), 4 deletions(-) diff --git a/lib/race.php b/lib/race.php index 8d0eb20..18be530 100644 --- a/lib/race.php +++ b/lib/race.php @@ -139,19 +139,38 @@ 'orange' => "Non-prizewinning competitor's best entry", 'blue' => "Competitor's other entries" ); + $endorsements = Entry::EndorsementKeys(); + asort($endorsements); if ($type == 'html') { echo "\n"; echo "\n"; - echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "
Highlight key
Highlight keyEndorsement key
\n"; + echo "\n"; foreach ($keys as $key => $description) { echo "\n"; } foreach ($rows as $key => $description) { - echo "\n"; + echo "\n"; } echo "
$description
$description
$description
\n"; + echo "
\n"; + echo "\n"; + foreach ($endorsements as $e) { + $description = Entry::EndorsementDescription($e); + echo "\n"; + } + echo "
$e$description
\n"; + echo "
\n"; } else if ($type == 'bbcode') { echo "[/table]\n"; @@ -161,22 +180,46 @@ echo "[td]"; echo "[b]Highlight key[/b]"; echo "[/td]"; + echo "[td]"; + echo "[b]Endorsement key[/b]"; + echo "[/td]"; echo "[/tr]\n"; + echo "[tr]\n"; + echo "[td]\n"; + echo "[table]\n"; foreach ($keys as $key => $description) { echo "[tr]"; - echo "[td\"bgcolor: " . colour($key)[0] . "\"][color=" . entry_fgcolor(0, 0) . "]"; + echo "[td=\"bgcolor: " . colour($key)[0] . "\"][color=" . entry_fgcolor(0, 0) . "]"; echo $description; echo "[/color][/td]"; echo "[/tr]\n"; } foreach ($rows as $key => $description) { echo "[tr]"; - echo "[td\"bgcolor: " . entry_bgcolor(1, 0) . "\"][color=" . colour($key)[0] . "]"; + echo "[td=\"bgcolor: " . entry_bgcolor(1, 0) . "\"][color=" . colour($key)[1] . "]"; echo $description; echo "[/color][/td]"; echo "[/tr]\n"; } echo "[/table]\n"; + echo "[/td]\n"; + echo "[td]\n"; + echo "[table]\n"; + foreach ($endorsements as $e) { + $description = Entry::EndorsementDescription($e); + echo "[tr]"; + echo "[td]"; + echo $e; + echo "[/td]"; + echo "[td]"; + echo $description; + echo "[/td]"; + echo "[/tr]"; + } + echo "[/table]\n"; + echo "[/td]\n"; + echo "[/tr]\n"; + echo "[/table]\n"; echo "\n"; } } diff --git a/propel/build/classes/buckyball/Entry.php b/propel/build/classes/buckyball/Entry.php index daac314..508cb6d 100644 --- a/propel/build/classes/buckyball/Entry.php +++ b/propel/build/classes/buckyball/Entry.php @@ -21,6 +21,7 @@ class Entry extends BaseEntry 'f' => array('FSD injection', 1 << 2), 'j' => array('joker card', 1 << 3), 'x' => array('excluded from ranking', 1 << 4), + 'm' => array('missing evidence', 1 << 5) ); function Endorsements() { @@ -95,6 +96,10 @@ class Entry extends BaseEntry return $this->hasEndorsement('x'); } + function missingEvidence() { + return $this->hasEndorsement('m'); + } + function getEndorsementString($delimiter = '') { $ret = array(); foreach ($this->EndorsementKeys() as $e) { -- 2.7.4