function judge_alert($round, $bid, $tid, $location, $likes, $dislikes, $table_styles, $id)
{
    if (table_round($tid, $round)) {
        $unavailable = unavailable($bid, $location, $round, $tid);
        $entry_conflict = entry_conflict($bid, $table_styles);
        $at_table = at_table($bid, $tid);
        if ($unavailable) {
            $r = "bg-purple text-purple|<span class=\"fa fa-check\"></span> <strong>Assigned.</strong> Paricipant is assigned to another table in this round.";
        }
        if ($entry_conflict) {
            $r = "bg-info text-info|<span class=\"fa fa-ban\"></span> <strong>Disabled.</strong> Participant has an entry at this table.";
        }
        if (!$unavailable && !$entry_conflict) {
            $r = like_dislike($likes, $dislikes, $table_styles);
        }
    } else {
        $r = '';
    }
    return $r;
}
Example #2
0
function getnumber($arr, $country, $selected = 0)
{
    if ($arr === false) {
        return unavailable();
    }
    $res = "<select class=\"form_input_select\" name=\"number\" onchange=\"this.form.submit();\">\n";
    $res .= "<option value=\"0\">Select a number</option>\n";
    if ($arr) {
        $i = 0;
        foreach ($arr as $c) {
            if ($i++ == 0) {
                continue;
            }
            $res .= "<option value=\"{$c['0']}\"";
            if ($c[0] == $selected) {
                $res .= " selected";
            }
            $res .= ">{$c['0']} ({$c['1']}/{$c['2']})</option>\n";
        }
    }
    $res .= "</select>";
    return $res;
}
Example #3
0
function getnumber($arr, $country, $selected=0) {
	if($arr === false)
		return unavailable();
	$res = "<select class=\"form_input_select\" name=\"number\" onchange=\"this.form.submit();\">\n";
	$res .= "<option value=\"0\">Select a number</option>\n";
	if($arr) {
		$i = 0;
		foreach($arr as $c) {
			if($i++ == 0)
				continue;
			$res .= "<option value=\"$c[0]\"";
			if($c[0] == $selected)
				$res .= " selected";
			$res .= ">$c[0] ($c[1]/$c[2])</option>\n";
		}
	}
	$res .= "</select>";
	return $res;
}
do {
    $assign_row_color = "";
    $assign_flag = "";
    for ($i = 1; $i < $row_flights['flightRound'] + 1; $i++) {
        if (table_round($row_tables_edit['id'], $i)) {
            $flights_display = "";
            if (at_table($row_brewer['uid'], $row_tables_edit['id'])) {
                $assign_row_color = "bg-orange text-orange";
                $assign_flag = "<span class=\"fa fa-check\"></span> <strong>Assigned.</strong> Participant is assigned to this table.";
            } else {
                $judge_alert = judge_alert($i, $row_brewer['uid'], $row_tables_edit['id'], $location, $judge_info[2], $judge_info[3], $row_tables_edit['tableStyles'], $row_tables_edit['id']);
                $judge_alert = explode("|", $judge_alert);
                $assign_row_color = $judge_alert[0];
                $assign_flag = "<div>" . $judge_alert[1] . "</div>";
            }
            $unavailable = unavailable($row_brewer['uid'], $row_tables_edit['tableLocation'], $i, $row_tables_edit['id']);
            //if (at_table($row_brewer['uid'],$row_tables_edit['id'])) $output_datatables_body .= "<div class=\"alert alert-warning\"><span class=\"fa fa-exclamation-triangle\"> <strong>Assigned.</strong> Participant is assigned to this table.</div>";
            //else $output_datatables_body .= judge_alert($i,$row_brewer['uid'],$row_tables_edit['id'],$location,$judge_info[2],$judge_info[3],$row_tables_edit['tableStyles'],$row_tables_edit['id']);
            $flights_display .= $assign_flag;
            $flights_display .= assign_to_table($row_tables_edit['id'], $row_brewer['uid'], $filter, $total_flights, $i, $location, $row_tables_edit['tableStyles'], $queued);
        }
    }
    $table_location = "Y-" . $row_tables_edit['tableLocation'];
    $judge_info = judge_info($row_brewer['uid']);
    $judge_info = explode("^", $judge_info);
    $bjcp_rank = explode(",", $judge_info[5]);
    $display_rank = bjcp_rank($bjcp_rank[0], 1);
    if ($judge_info[4] == "Y") {
        $display_rank .= "<br /><em>Certified Mead Judge</em>";
    }
    if (!empty($bjcp_rank[1])) {
 function judge_alert($round, $bid, $tid, $location, $likes, $dislikes, $table_styles, $id)
 {
     if (table_round($tid, $round)) {
         $unavailable = unavailable($bid, $location, $round, $tid);
         $entry_conflict = entry_conflict($bid, $table_styles);
         $at_table = at_table($bid, $tid);
         //if (strpos($at_table,$tid) !== false) $already = TRUE;
         if ($unavailable) {
             $r = '<div class="orange judge-alert">Already Assigned to This Round</div>';
         }
         //if ($already) $r = '<div class="purple judge-alert">Already Assigned to this Table</div>';
         if ($entry_conflict) {
             $r = '<div class="blue judge-alert">Disabled - Participant has an Entry at this Table</div>';
         }
         if (!$unavailable && !$entry_conflict) {
             $r = like_dislike($likes, $dislikes, $table_styles);
         }
     } else {
         $r = '';
     }
     return $r;
 }