Example #1
0
 function render_body()
 {
     $username = $this->get_username();
     prof_course_pref_form($username);
     prof_load_pref_form($username);
     prof_special_request_form($username);
     $semester = CURRENT_SEMESTER;
     if (isset($_SESSION['semester'])) {
         $semester = $_SESSION['semester'];
     }
     $year = CURRENT_YEAR;
     if (isset($_SESSION['year'])) {
         $year = $_SESSION['year'];
     }
     $sections = get_sections_assigned_to($this->get_username(), $semester, $year);
     dom::h3('section-title', 'Assigned to me');
     dom::push_div('section');
     dom::push_form('prefs.php');
     dom::label('semester:');
     dom::dropdown('semester', list_semesters(), $semester, true);
     dom::label('year:');
     dom::dropdown('year', list_years(), $year, true);
     dom::hidden('action', 'set_semester');
     dom::br();
     dom::pop();
     dom::push_table();
     dom::push_tr();
     dom::th('Course Code');
     dom::th('Title');
     dom::th('Time');
     dom::th('Days');
     dom::th('Room');
     dom::th('Building');
     dom::th('Semester');
     dom::th('Year');
     dom::pop();
     while ($r = mysql_fetch_assoc($sections)) {
         dom::push_tr();
         dom::td($r['code']);
         dom::td($r['title']);
         dom::td($r['time']);
         dom::td($r['days']);
         dom::td($r['room']);
         dom::td($r['building']);
         dom::td($r['semester']);
         dom::td($r['year']);
         dom::pop();
     }
     dom::pop();
     dom::pop();
 }
Example #2
0
 function render_body()
 {
     dom::h3('', 'Raw SQL');
     dom::push_form('lists.php');
     dom::textarea("sql");
     dom::br();
     dom::hidden('action', 'sql');
     dom::submit();
     dom::pop();
     list_instructors();
     list_sections();
     list_books();
     list_courses();
 }
Example #3
0
function prof_special_request_form($username)
{
    $courses = all_course_data();
    dom::h3('section-title', 'Special Reqeusts');
    dom::push_div('section');
    dom::push_form();
    dom::label('Course:');
    dom::dropdown('course_id', $courses);
    dom::textinput('title', 'Title');
    dom::label('Justification');
    dom::textarea('justification');
    dom::hidden('username', $username);
    dom::hidden('action', 'special_request');
    dom::br();
    dom::submit();
    dom::pop();
    dom::pop();
}