,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"); > 0) { echo "\n"; echo "\n"; echo "\n" pg_Result($result, 0, "title"); echo "\n"; echo "\n" pg_Result($result, 0, "description"); if (pg_result($result, 0, "books") != "") { echo "\n"; echo "\n" pg_Result($result, 0, "books"); } echo "\n"; echo "\n" pg_Result($result, 0, "credits"); if (pg_result($result, 0, "web") != "") { echo "\n"; echo "\n" pg_Result($result, 0, "web"), pg_Result($result, 0, "web"); } $i = 0; echo "\n"; echo "\n"; pg_freeresult($result_tas); } echo "
Title:%s
Description:%s
Text:%s
Credits:%d
Course Web Page:%s
Sections:\n"; echo ""; while ($i < $num) { $enroll_code = pg_Result($result, $i, "enroll_code"); if ($enroll_code < 99) { echo "\n"; } else { echo "\n" $enroll_code; } if (pg_result($result, $i, "last_name") != "Fraser") { $first_initial = pg_result($result, $i, "first_name"); if ($first_initial != "") { $first_initial = sprintf("%s. ", substr($first_initial,0,1)); } } else { $first_initial = pg_result($result, $i, "first_name") + " "; } if (pg_result($result, $i, "name_release") < $release_level) { echo "\n"; echo "\n" pg_Result($result, $i, "times"); echo "\n"; echo "\n" pg_Result($result, $i, "notes"); echo "\n"; $i++; } echo "
Lecture
%05d%s%s
\n" $first_initial, pg_result($result, $i, "last_name"); } else { echo "
%s%s
\n" pg_Result($result, $i, "instructor"), $first_initial, pg_Result($result, $i, "last_name"); } echo "
%s"; tagged_room_number(pg_Result($result, $i, "room_bldg"),pg_Result($result, $i, "room_number")); if (pg_result($result, $i, "alt_room_number") != "") { echo "
"; tagged_room_number(pg_Result($result, $i, "alt_room_bldg"),pg_Result($result, $i, "alt_room_number")); echo " (Discussion)\n"; } echo "
%s
\n"; $result_tas = pg_Exec($conn, "select a.userid,i.name_release,i.first_name,i.last_name from tas a,people i where a.quarter = '$quarter_code' and a.xyear = $year and a.userid = i.userid and a.class_code='$class_code' order by i.last_name,i.first_name"); if (!$result_tas) { echo "An error occured.\n"; exit; } $num_tas = pg_NumRows($result_tas); if ($num_tas > 0) { echo "
TA:"; $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,"
  • Office Hours","
"); $j++; } echo "
\n"; } else { echo "Not offered this quarter\n"; exit; } pg_FreeResult($result); pg_Close($conn); >