Esempio n. 1
0
     get_info();
     show_end();
 } else {
     $row = $result->fetch_array();
     $info = new A2User($row['UserID'], $row['password'], $row['psid'], $row['email'], $row['last_name'], $row['first_name'], $row['access_level']);
     if ($info->getAccess() == 0) {
         $_SESSION['option'] = "logged_on";
         $result = $db->query("select * from Courses where Courses.psid = " . $info->getPsid());
         $rows = $result->num_rows;
         $studentCourseList = array();
         for ($i = 0; $i < $rows; $i++) {
             $course = $result->fetch_array();
             $studentCourse = new Course($course['Term'], $course['Department'], $course['Class_Number'], $course['Grade'], $course['GPA']);
             $studentCourseList[$i] = $studentCourse;
         }
         $info->addCourses($studentCourseList);
         $coursesTaken = show_classes($info);
         show_requirements($coursesTaken);
         log_out();
         //if we matched, and we are an advisor. show the info and search option
     } elseif ($info->getAccess() == 1) {
         echo "Search For a Student: <br/><br/>";
         $_SESSION['option'] = "searchstudent";
         student_search();
     } elseif ($info->getAccess() == 2) {
         echo "Search For a Student: <br/><br/>";
         $_SESSION['option'] = "searchstudent";
         student_search();
         add_remove();
     } else {
         echo "You have been removed from the system. Contact the admin</br>";