Ejemplo n.º 1
0
 public static function view_loop()
 {
     if (self::$cur_id == -1) {
         if (!isset($_REQUEST['tutor_id'])) {
             _e("Tutor Not Found", "ttr-db");
             return false;
         }
         self::$tutor = TTR_db::get_tutor($_REQUEST['tutor_id']);
         if (!isset(self::$tutor)) {
             _e("Tutor Not Found", "ttr-db");
             return false;
         } else {
             self::$cur_id++;
             return true;
         }
     } else {
         if (self::$cur_id == 0) {
             self::$cur_id++;
             return true;
         } else {
             self::$cur_id = -1;
             return false;
         }
     }
 }