コード例 #1
0
ファイル: settings.php プロジェクト: jeffpiazza/derbynet
    <div class="settings_group_settings">
      <p>
        <input id="n-den" name="n-den-trophies" type="number" min="0" max="20" data-enhanced="true"
               value="<?php 
echo read_raceinfo('n-den-trophies', 3);
?>
"/>
        <label for="n-den">Number of trophies per <?php 
echo group_label_lc();
?>
</label>
      </p>
      <p>
        <input id="n-pack" name="n-pack-trophies" type="number" min="0" max="20" data-enhanced="true"
               value="<?php 
echo read_raceinfo('n-pack-trophies', 3);
?>
"/>
        <label for="n-pack">Number of trophies for the <?php 
echo supergroup_label_lc();
?>
</label>
      </p>
      <p>
        <input type="hidden" name="use-xbs-checkbox" value="yes"/>
        <input id="use-xbs" name="use-xbs" data-enhanced="true"
                type="checkbox"<?php 
if ($use_xbs) {
    echo ' checked="checked"';
}
?>
コード例 #2
0
ファイル: judging.php プロジェクト: jeffpiazza/derbynet
$banner_title = 'Judging';
require 'inc/banner.inc';
require_once 'inc/standings.inc';
// TODO: Magical '3' for 'other' awards...
$awardTypeOther = read_single_value('SELECT awardtypeid FROM AwardTypes WHERE awardtype = \'Other\'', array(), 3);
$awards = array(array('Most', 'Aerodynamic'), array('Most', 'Amazing'), array('Best', 'Animal Theme'), array('Most', 'Artistic'), array('Most', 'Astonishing'), array('Most', 'Attractive'), array('Most', 'Awesome'), array('Most', 'Box-Like'), array('Most', 'Cheerful'), array('Most', 'Colorful'), array('', 'Coolest Car'), array('Most', 'Cosmic'), array('Most', 'Creative'), array('Most', 'Creative Use of Materials'), array('', 'Cubbiest Car'), array('Most', 'Decals'), array('Best', 'Detail'), array('Most', 'Distinct'), array('Most', 'Distinguished'), array('Best', 'Driver in the Car'), array('Most', 'Elaborate'), array('Most', 'Expensive-Looking'), array('Most', 'Extraordinary'), array('Most', 'Extreme'), array('', 'Fanciest'), array('Most', 'Fascinating'), array('', 'Fastest-Looking Car'), array('Most', 'Funky'), array('', 'Funniest'), array('Most', 'Futuristic'), array('Most', 'Galactic'), array('', 'Glossiest'), array('Most', 'Grandiose'), array('Most', 'Humorous'), array('Most', 'Imaginative Design'), array('Most', 'Impressive'), array('Most', 'Incredible'), array('Most', 'Innovative'), array('Most', 'Interesting'), array('Most', 'Inventive'), array('Most', 'Magnificent'), array('Most', 'Majestic'), array('Most', 'Original'), array('Most', 'Outstanding'), array('Most', 'Patriotic'), array('Most', 'Phenomenal'), array('Most', 'Radical'), array('Most', 'Realistic-Looking'), array('Most', 'Remarkable'), array('Most', 'Resourceful'), array('', 'Scariest'), array('Best', 'Scout Theme'), array('', 'Shiniest Car'), array('', 'Sleekest Car'), array('', 'Smoothest Finish'), array('Most', 'Spirited'), array('', 'Sportiest-Looking'), array('Most', 'Stellar'), array('', 'Strangest Shape'), array('Most', 'Unusual'), array('Best', 'Use of Color'), array('Best', 'Use of the Color Blue'), array('Best', 'Use of the Color Green'), array('Best', 'Use of the Color Orange'), array('Best', 'Use of the Color Purple'), array('Best', 'Use of the Color Red'), array('Best', 'Use of the Color Yellow'), array('Best', 'Use of the Color _____'), array('Best', 'Vehicle Not a Car'), array('Best', 'Wedge Shape'), array('', 'Zaniest'));
$sql = 'SELECT racerid, carnumber, lastname, firstname, class' . ' FROM RegistrationInfo' . ' INNER JOIN Classes' . ' ON Classes.classid = RegistrationInfo.classid' . ' WHERE passedinspection = 1 AND exclude = 0' . ' ORDER BY carnumber';
$racers = array();
$stmt = $db->query($sql);
foreach ($stmt as $rs) {
    $racerid = $rs['racerid'];
    $racers[$racerid] = array('racerid' => $racerid, 'carnumber' => $rs['carnumber'], 'lastname' => $rs['lastname'], 'firstname' => $rs['firstname'], 'class' => $rs['class'], 'awards' => array());
}
$stmt->closeCursor();
$n_den_trophies = read_raceinfo('n-den-trophies', 3);
$n_pack_trophies = read_raceinfo('n-pack-trophies', 3);
require_once 'inc/ordinals.inc';
$speed_trophies = top_finishers_by_class($n_den_trophies);
foreach ($speed_trophies as $classid => $den_trophies) {
    for ($place = 0; $place < count($den_trophies); ++$place) {
        $racerid = $den_trophies[$place];
        $racers[$racerid]['awards'][] = ordinal(1 + $place) . ' in ' . group_label_lc();
    }
}
$pack_trophies = top_finishers_overall($n_pack_trophies);
for ($place = 0; $place < count($pack_trophies); ++$place) {
    $racerid = $pack_trophies[$place];
    $racers[$racerid]['awards'][] = ordinal(1 + $place) . ' in ' . supergroup_label_lc();
}
$sql = 'SELECT awardname, racerid' . ' FROM Awards' . ' ORDER BY sort';
$stmt = $db->query($sql);
コード例 #3
0
ファイル: coordinator.php プロジェクト: jeffpiazza/derbynet
</div>

<div id='new_round_modal' class="modal_dialog block_buttons hidden">
  <form>
    <input type="hidden" name="action" value="roster.new"/>
    <input type="hidden" name="roundid" id="new_round_roundid"/>

    <div id="multi_flipswitches" class="multi_den_only">
    </div>

    <p>Choose top</p>
    <input type="number" name="top" id="now_round_rop" value="3"/>

    <div class="single_den_only">
    <?php 
if (read_raceinfo('use-subgroups')) {
    ?>
      <p>racers from</p>
      <div class="centered_flipswitch">
        <input type="checkbox" data-role="flipswitch" name="bucketed" id="bucketed"
               data-on-text="Each <?php 
    echo subgroup_label();
    ?>
" data-off-text="Overall"/>
      </div>
    <?php 
} else {
    ?>
      <p>racers</p>
    <?php 
}
コード例 #4
0
<script type="text/javascript" src="js/dashboard-ajax.js"></script>
<script type="text/javascript" src="js/modal.js"></script>
<script type="text/javascript" src="js/kiosk-dashboard.js"></script>
</head>
<body>
<?php 
$banner_title = 'Kiosk Dashboard';
require 'inc/banner.inc';
require_once 'inc/ajax-failure.inc';
?>

<div class="standings-control hidden control_group block_buttons">
  <div class="round-select">
    <h3>Display standings for:</h3>
      <?php 
$current = read_raceinfo('standings-message');
$current_roundid = explode('-', $current)[0];
?>

    <select>
      <?php 
require_once 'inc/standings.inc';
$sel = ' selected="selected"';
if ($current == '') {
    echo '<option ' . $sel . ' disabled="1">Please choose what standings to display</option>';
}
echo '<option data-roundid=""' . ($current != '' && $current_roundid == '' ? $sel : '') . '>' . supergroup_label() . '</option>';
foreach (standings_round_names() as $round) {
    echo '<option data-roundid="' . $round['roundid'] . '"' . ($current_roundid == $round['roundid'] ? $sel : '') . '>' . htmlspecialchars($round['name'], ENT_QUOTES, 'UTF-8') . '</option>' . "\n";
}
?>
コード例 #5
0
ファイル: checkin.php プロジェクト: jeffpiazza/derbynet
// "exclusively by scout" award.
// Here on the server side, a GET request sends HTML for the whole
// page.  POST requests to make changes to the database are sent to
// action.php, and produce just a small XML document.
// TODO- subgroups explanation
// $use_subgroups, from GPRM settings, tells whether we're using
// "subgroups" within each racing group.
$use_subgroups = read_raceinfo_boolean('use-subgroups');
// Our pack provides an "exclusively by scout" award, based on a
// signed statement from the parent.  Collecting the statement is part
// of the check-in process, so there's provision for a checkbox on the
// check-in form.  For groups that don't do this, $xbs will be false
// (and $xbs_award_name will be blank), and the checkboxes won't be
// shown.
$xbs = read_raceinfo_boolean('xbs-award');
$xbs_award_name = read_raceinfo('xbs-award');
$order = '';
if (isset($_GET['order'])) {
    $order = $_GET['order'];
}
// Values are: name, den, car
if (!$order) {
    $order = 'name';
}
// The table of racers can be presented in order by name, car, or
// den (and then by name within the den).  Each sortable column has
// a header which is a link to change the ordering, with the
// exception that the header for the column for ordering currently
// in use is NOT a link (because it wouldn't do anything).
function column_header($text, $o)
{