function _AdvisingScreen::draw_box_top
Search API
4.x _AdvisingScreen.php | _AdvisingScreen::draw_box_top($title, $hideheaders = false, $table_width = 300) |
5.x _AdvisingScreen.php | _AdvisingScreen::draw_box_top($title, $hideheaders = false, $table_width = 300, $extra_classes = "") |
Used to draw the beginning of semester boxes and other boxes, for example the footnotes.
Parameters
string $title:
bool $hideheaders:
- If TRUE, then the course/hrs/grd headers will not be displayed.
int $table_width:
- The HTML table width, in pixels. If not set, it will default to 300 pixels wide.
Return value
string
1 call to _AdvisingScreen::draw_box_top()
- _AdvisingScreen::draw_semester_box_top in classes/
_AdvisingScreen.php - Uses the draw_box_top function, specifically for semesters.
File
- classes/
_AdvisingScreen.php, line 2759
Class
Code
function draw_box_top($title, $hideheaders = false, $table_width = 300) {
// returns the beginnings of the year tables...
// Get width values from width_array (supplied by calling function,
// for example, draw_year_box_top
$w1_1 = $this->width_array [0];
$w1_2 = $this->width_array [1];
$w1_3 = $this->width_array [2];
$w2 = $this->width_array [3];
$w3 = $this->width_array [4];
$w4 = $this->width_array [5];
$w5 = $this->width_array [6];
$w6 = $this->width_array [7];
if ($this->bool_popup == true)
{
$w1_1 = $this->popup_width_array [0];
$w1_2 = $this->popup_width_array [1];
$w1_3 = $this->popup_width_array [2];
$w2 = $this->popup_width_array [3];
$w3 = $this->popup_width_array [4];
$w4 = $this->popup_width_array [5];
$w5 = $this->popup_width_array [6];
$w6 = $this->popup_width_array [7];
}
$headers = array();
if ($hideheaders != true)
{
$headers [0] = t("Course");
$headers [1] = t("Hrs");
$headers [2] = t("Grd");
$headers [3] = t("Pts");
}
$rtn = "
<table border='0' width='$table_width' cellpadding='0' cellspacing='0' class='fp-box-top'>
<tr>
<td colspan='8' class='blueTitle' align='center' valign='top'>
";
$rtn .= fp_render_curved_line($title);
$rtn .= "
</td>
</tr>
";
if (!$hide_headers)
{
$rtn .= "
<tr height='20'>
<td width='$w1_1' align='left'>
</td>
<td width='$w1_2' align='left'>
</td>
<td width='$w1_3' align='left'>
</td>
<td align='left' width='$w2'>
<font size='2'><b>$headers [0]</b></font>
</td>
<td width='$w3' align='left'> </td>
<td width='$w4'>
<font size='2'><b>$headers [1]</b></font>
</td>
<td width='$w5'>
<font size='2'><b>$headers [2]</b></font>
</td>
<td width='$w6'>
<font size='2'><b>$headers [3]</b></font>
</td>
</tr>
";
}
return $rtn;
}