예제 #1
0
파일: Settings.php 프로젝트: Galihom/phpVMS
 protected function PIREP_SaveFields()
 {
     if ($this->post->title == '') {
         $this->set('message', 'The title cannot be blank');
         $this->render('core_error.tpl');
         return false;
     }
     $res = PIREPData::EditField($this->post->fieldid, $this->post->title, $this->post->type, $this->post->options);
     if (DB::errno() != 0) {
         $this->set('message', 'There was an error saving the field');
         $this->render('core_error.tpl');
     } else {
         LogData::addLog(Auth::$userinfo->pilotid, 'Edited PIREP field "' . $this->post->title . '"');
         $this->set('message', 'Edited PIREP field "' . $this->post->title . '"');
         $this->render('core_success.tpl');
     }
 }