コード例 #1
0
    <?php 
if (!isset($data['params'])) {
    $teams = $data['teams'];
    $objTeam = $data['objTeam'];
} else {
    $objTeam = new Team();
    $teams = $objTeam->getAllTeams();
}
?>
        
        
        <h2>Catergories 
            <!--
<span style="float:right;font-size:12px;cursor:pointer;"><a href="#" id="addTeam"><u>Add Team</u></a></span>
-->
        </h2>    
        <table cellpadding="0" cellspacing="0" border="0" class="tbl_repeat" id="categoriesTable" style="margin-bottom:0px;" data-object="team">
            <tr>
                <th style="border-right:dashed 1px #222;width:120px;">Name</th>
                <th style="width:50px;">EXCO</th>
                <th style="width:50px;">Project</th>
                <th>Action</th>
            </tr>
        <?php 
foreach ($teams as $team) {
    $disabledEXCO = '';
    $disabledProject = '';
    $disabled = '';
    if ($team['exco'] == '1') {
        $disabledEXCO = $objTeam->checkTeamExistsInInvolvements($team['id'], true);
    }
コード例 #2
0
ファイル: Clue.php プロジェクト: rjwalsh88/BawkApp
 public function getHistogram()
 {
     $clueStates = $this->getClueStates();
     $teams = Team::getAllTeams();
     if (count($clueStates) == 0) {
         return "<span style=\"font-size: 12px;\"><b>All hidden</b></span>";
     }
     $counts = array(0, 0, 0, 0, 0);
     foreach ($teams as $team) {
         $clueState = $this->getClueState($team);
         $state = $clueState ? $clueState->getState() : STATE_HIDDEN;
         $counts[$state]++;
     }
     if ($counts[STATE_ANSWERED] == count($teams)) {
         return "<span style=\"font-size: 12px;\"><b>All answered</b></span>";
     }
     $text = '';
     foreach (State::getAllStates() as $key => $value) {
         if ($text != '') {
             $text .= ', ';
         }
         $text .= "<b>" . $counts[$key] . "</b> " . $value;
     }
     return '<span style="font-size: 12px;">' . $text . "</span>";
 }
コード例 #3
0
ファイル: teams.php プロジェクト: rjwalsh88/BawkApp
    foreach ($members as $member) {
        switch ($position) {
            case POSITION_NONE:
                return '';
            case POSITION_ACCOUNT:
                $text .= $member->getDisplayName() . ' ';
            case POSITION_PLAYER:
            case POSITION_ADMIN:
                $text .= $member->getDisplayName() . ' (<i>';
                $text .= $member->getPhoneNumber() . '</i>) ';
                $text .= '<br />';
        }
    }
    return $text;
}
$teams = Team::getAllTeams();
if (count($teams) == 0 && $position >= POSITION_ACCOUNT) {
    $page->addElement('No teams');
}
foreach ($teams as $team) {
    $page->addElement(UIText::exactText(team_summary($position, $team)));
    $page->addElement(UIText::exactText(team_members($position, $team)));
}
if ($position >= POSITION_ADMIN) {
    $page->addElement(UIText::exactText(<<<EOT
<form method="POST" action="teams.php">
Name: <input type="text" name="name" />
<input type="submit" name="new" value="Create New Team" />
</form>
EOT
)->setTitle('Create Team (Admin only)'));