SaveConfig(); default: $this->ShowConfig(); break; } } /** * Save posted configuration options * */ public function SaveConfig(){ global $langmessage; $format = htmlspecialchars($_POST['date_format']); if( @date($format) ){ $this->config['date_format'] = $format; } $this->config['commenter_website'] = (string)$_POST['commenter_website']; if( isset($_POST['comment_captcha']) ){ $this->config['comment_captcha'] = true; }else{ $this->config['comment_captcha'] = false; } if( !\gp\tool\Files::SaveData($this->config_file, 'config', $this->config) ){ message($langmessage['OOPS']); return false; } message($langmessage['SAVED']); return true; } /** * Show EasyComments configuration options * */ public function ShowConfig(){ global $langmessage; $defaults = $this->Defaults(); $array = $_POST + $this->config; echo '