Exemplo n.º 1
0
 public function schedule()
 {
     $type = \Hnust\input('type');
     $week = \Hnust\input('week');
     $term = \Hnust\input('term');
     $week = strlen($week) ? $week : \Hnust\week();
     $term = strlen($term) ? $term : Config::getConfig('current_term');
     $isDownload = \Hnust\input('download/b', false);
     $schedule = new \Hnust\Analyse\Schedule($this->sid);
     if ($isDownload) {
         $schedule->getExcel($this->uid, $this->sid, $term);
     } else {
         $this->data = $schedule->getSchdule($this->sid, $term, $type, $week);
         $this->info = array('sid' => $this->sid, 'week' => $week, 'term' => $term, 'terms' => $this->getTerms(), 'remarks' => $this->data['remarks']);
         $this->msg = $schedule->error;
         unset($this->data['remarks']);
     }
 }