Ejemplo n.º 1
0
 echo "<td align=center class='barlabel'>" . ($row->waiting ? "Waiting: {$row->waiting}" : "") . "</td>\n";
 /* Bar graphs */
 $barfragwidth = 12;
 if ($row->capacity > 40) {
     $barfragwidth = 8;
 }
 if ($row->capacity > 60) {
     $barfragwidth = 4;
 }
 if ($row->capacity > 80) {
     $barfragwidth = 3;
 }
 echo "</tr><tr>\n";
 echo "<td></td>";
 echo "<td colspan=3>";
 bargraph2($row->reserved, "green", $row->released, "yellow", $row->capacity, "white", $barfragwidth);
 echo "</td>";
 echo "<td>";
 if ($row->waiting) {
     bargraph($row->waiting, "red");
 }
 echo "</td>\n";
 /* Personal event counts */
 echo "</tr><tr>\n";
 echo "<td></td>\n";
 echo "<td colspan=3 align='center' class='barlabel'>";
 if ($userix) {
     echo "You have {$myreserved} reservation" . ($myreserved != 1 ? "s" : "") . " for this event.";
 }
 echo "</td>";
 echo "<td class='barlabel'>";
Ejemplo n.º 2
0
<html>
<head>
<?php 
require_once "bargraph.php";
?>
</head><body>

<?php 
echo "<p>10 / 10  from 30<br/>\n";
bargraph2(10, "red", 10, "yellow", 30, "white");
echo "</p>";
echo "<p>10 / 20 from 30<br/>\n";
bargraph2(10, "red", 20, "yellow", 30, "white");
echo "</p>";
echo "<p>20 from 30<br/>\n";
bargraph2(20, "red", 0, "yellow", 30, "white");
echo "</p>";
echo "<p>0 from 30<br/>\n";
bargraph2(0, "red", 0, "yellow", 30, "white");
echo "</p>";
echo "<p>30 from 30<br/>\n";
bargraph2(30, "red", 0, "yellow", 30, "white");
echo "</p>";
echo "<p>0 / 30 from 30<br/>\n";
bargraph2(0, "red", 30, "yellow", 30, "white");
echo "</p>";
?>

</body>
</html>
Ejemplo n.º 3
0
 $price = $member ? $mbrprice : $guestprice;
 printf("<h3>%s - %s &nbsp; (Reservations: \$%.2f)</h3>\n", $eventnm, $eventdt, $price / $pricedivider);
 if (!$member) {
     warning(sprintf("If you were a member this reservation would only cost \$%.2f.", $mbrprice));
 }
 echo "<table width=100%>\n";
 echo "<tr><td width=50%>\n";
 /* Entire event counts */
 echo "<table><tr>\n";
 echo "<td align=left>Reserved: {$reserved}</td>\n";
 echo "<td align=center>Released: {$released}</td>\n";
 echo "<td align=right>Openings: {$openings}</td>\n";
 /* Bar graph */
 echo "</tr><tr>\n";
 echo "<td colspan=3>";
 bargraph2($reserved, "red", $released, "yellow", $capacity, "white", 12);
 echo "</td>";
 /* Add or waiting list control */
 if ($userix) {
     if ($openings) {
         echo "<td>";
         echo "Reserve";
         echo "</td>";
         echo "<td>";
         echo "<select name='add{$ix}'>";
         for ($i = 0; $i <= $openings; $i++) {
             echo "<option>{$i}</option>";
         }
         echo "</select>\n";
         echo "</td>\n";
     } else {
Ejemplo n.º 4
0
     }
     $LO_ret = array(0 => array());
     foreach ($assignments_RET as $assignment) {
         if ($do_stats && $_REQUEST['do_stats']) {
             if ($all_RET[$assignment['ASSIGNMENT_ID']]) {
                 $all = $all_RET[$assignment['ASSIGNMENT_ID']][1];
                 if ($assignment['POINTS'] != '-1' && $assignment['POINTS'] != '') {
                     $bargraph1 = bargraph1($assignment['POINTS'], $all['MIN'], $all['AVG'], $all['MAX'], $assignment['POINTS_POSSIBLE']);
                     $bargraph2 = bargraph2(0, $all['LOWER'], $all['HIGHER']);
                 } else {
                     $bargraph1 = bargraph1(true, $all['MIN'], $all['AVG'], $all['MAX'], $assignment['POINTS_POSSIBLE']);
                     $bargraph2 = bargraph2(true);
                 }
             } else {
                 $bargraph1 = bargraph1(false);
                 $bargraph2 = bargraph2(false);
             }
         }
         $LO_ret[] = array('TITLE' => $assignment['TITLE'], 'CATEGORY' => $assignment['CATEGORY'], 'POINTS' => ($assignment['POINTS'] == '-1' ? '*' : ($assignment['POINTS'] == '' ? '<FONT color=red>0</FONT>' : rtrim(rtrim($assignment['POINTS'], '0'), '.'))) . ' / ' . $assignment['POINTS_POSSIBLE'], 'PERCENT' => $assignment['POINTS_POSSIBLE'] == '0' ? 'e/c' : ($assignment['POINTS'] == '-1' ? '*' : number_format(100 * $assignment['POINTS'] / $assignment['POINTS_POSSIBLE'], 1) . '%'), 'LETTER' => $programconfig[$staff_id]['LETTER_GRADE_ALL'] == 'Y' ? '' : ($assignment['POINTS_POSSIBLE'] == '0' ? 'n/a' : ($assignment['POINTS'] == '-1' ? 'n/a' : ($assignment['POINTS_POSSIBLE'] >= $programconfig[$staff_id]['LETTER_GRADE_MIN'] ? '<b>' . _makeLetterGrade($assignment['POINTS'] / $assignment['POINTS_POSSIBLE'], $course['COURSE_PERIOD_ID'], $staff_id) . '</b>' : ''))), 'COMMENT' => $assignment['COMMENT'] . ($assignment['POINTS'] == '' ? ($assignment['COMMENT'] ? '<BR>' : '') . '<FONT color=red>no grade</FONT>' : '')) + ($do_stats && $_REQUEST['do_stats'] ? array('BAR1' => $bargraph1, 'BAR2' => $bargraph2) : array());
     }
     if ($_REQUEST['id'] == 'all') {
         echo '<BR>';
         DrawHeader('<B>' . substr($course['TITLE'], 0, strpos(str_replace(' - ', ' ^ ', $course['TITLE']), '^')) . '</B> - ' . substr($course['TITLE'], strrpos(str_replace(' - ', ' ^ ', $course['TITLE']), '^') + 2), "<A HREF=Modules.php?modname={$_REQUEST['modname']}" . ($do_stats ? "&do_stats={$_REQUEST['do_stats']}" : '') . ">" . _('Back to Totals') . "</A>");
     }
     unset($LO_ret[0]);
     ListOutput($LO_ret, $LO_columns, _('Assignment'), _('Assignments'), array(), array(), array('center' => false, 'save' => $_REQUEST['id'] != 'all', 'search' => false));
 } else {
     if ($_REQUEST['id'] != 'all') {
         DrawHeader(_('There are no grades available for this student.'));
     }
 }