Include("physweb.def"); if ($quarter_code == "") { $quarter_code = $thisquarter; } if ($year == "") { $year = $thisyear; } $conn = pg_Connect("localhost", "5432", "", "", "physics"); if (!$conn) { echo "An error occured.\n"; exit; } $result = pg_Exec($conn, "select a.*,i.name_release,i.first_name,i.last_name,b.* from classes a,class_codes b,people i where a.quarter = '$quarter_code' and a.xyear = $year and a.instructor = i.userid and a.class_code = b.class_code and a.class_code='$class_code' order by b.number,b.number_ext,a.section_of using >,a.enroll_code"); if (!$result) { echo "An error occured.\n"; exit; } $Name=sprintf("%s %d%s, %s %s", pg_result($result,0,"dept"), pg_result($result,0,"number"), pg_result($result,0,"number_ext"), $quarter[$quarter_code], $year); $CurrentKey="Edu"; include("HeadScript.phtml"); include("BodyTop.phtml"); include("BodyTopTitle.phtml"); > $num = pg_NumRows($result); if ($num > 0) { echo "
| Title: | \n"; echo "%s | |||||||
| Description: | \n"; echo "%s | |||||||
| Text: | \n"; echo "%s | |||||||
| Credits: | \n"; echo "%d | |||||||
| Course Web Page: | \n"; echo "%s | |||||||
| Sections: | \n";
echo "
| |||||||
| TA: | \n"; echo "";
$j = 0;
while ($j < $num_tas) {
$first_initial = pg_result($result_tas, $j, "first_name");
/*
if ($first_initial != "") { $first_initial = sprintf("%s. ",
substr($first_initial,0,1)); }
*/
$first_initial += " ";
if (pg_result($result_tas, $j, "name_release") < $release_level) {
echo "%s%s \n" $first_initial, pg_result($result_tas, $j, "last_name"); } else { echo "%s%s \n" pg_Result($result_tas, $j, "userid"), $first_initial, pg_Result($result_tas, $j, "last_name"); } print_office_hours_table_full($conn,pg_Result($result_tas, $j, "userid"),$quarter_code,$year,"
|