コード例 #1
0
ファイル: Settings.php プロジェクト: Galihom/phpVMS
 protected function PIREP_AddField()
 {
     if ($this->post->title == '') {
         echo 'No field name entered!';
         return;
     }
     $ret = PIREPData::AddField($this->post->title, $this->post->type, $this->post->options);
     if (DB::errno() != 0) {
         $this->set('message', 'There was an error saving the field: ' . DB::error());
         $this->render('core_error.tpl');
     } else {
         LogData::addLog(Auth::$userinfo->pilotid, 'Added PIREP field "' . $this->post->title . '"');
         $this->set('message', 'Added PIREP field "' . $this->post->title . '"');
         $this->render('core_success.tpl');
     }
 }