';
print '';
if ($data_len > 0) {
print '';
print 'Below are all courses found in the database: | ';
print ' ';
for ($i = 0; $i < $data_len; $i++) {
print '';
$cname = explode(",", $data[$i]['cnamedesc']);
print '' . $cname[0] . ' | ';
print ' ';
}
} else {
print '';
print 'No courses found in the database. | ';
print ' ';
}
print '';
print ' ';
} else if ($_GET['func'] == 'register') {
$data = $_SESSION['coursesdata'];
$data_len = count($data);
$scheduledata = $_SESSION['scheduledata'];
print '';
if (isset($_SESSION['msg'])) {
$len = strlen($_SESSION['msg']);
} else {
$len = 0;
}
if ($len > 0) {
print('' . $_SESSION['msg'] . ' | ');
$_SESSION['msg'] = "";
}
print '';
print 'Register for Course(s) | ';
print ' ';
print '';
print '';
} else if ($_GET['func'] == 'editcourse') {
$data = $_SESSION['coursesdata'];
$teacherdata = $_SESSION['teacherscheduledata'];
if (($data == null) || ($teacherdata == null)) {
print '';
print '';
print 'Edit Course Information | ';
print ' ';
print 'Cannot get course information | ';
print ' ';
return;
}
print '';
print '';
}
?>
|
|