示例#1
0
/**
 * aggregates all data from schemas for
 * the purpose of html drop down selectors
 */
function all_teachers_data()
{
    $teachers = array();
    $all_teachers = get_all_profs();
    while ($row = mysql_fetch_assoc($all_teachers)) {
        $teachers[$row['id']] = $row['username'] . ' - ' . $row['first_name'] . " " . $row['last_name'];
    }
    return $teachers;
}
示例#2
0
function list_instructors()
{
    $profs = get_all_profs();
    $names = array();
    while ($row = mysql_fetch_assoc($profs)) {
        $names[] = $row['username'] . ' - ' . $row['first_name'] . ' ' . $row['last_name'];
    }
    dom::h3('section-title', 'List Professors');
    dom::push_div('section');
    dom::ul($names);
    dom::pop();
}