locale = self::get_faqAdminLocale(); // Save if (!empty($this->save)) { $this->SaveFaqAdmin(); } $this->FaqAdminForm(); } private function SaveFaqAdmin() { $inputArray = [ 'faq_allow_submission' => form_sanitizer($this->faq_allow_submission, 0, 'faq_allow_submission') ]; // Update if (\defender::safe()) { foreach ($inputArray as $settings_name => $settings_value) { $inputSettings = [ 'settings_name' => $settings_name, 'settings_value' => $settings_value, 'settings_inf' => 'faq', ]; dbquery_insert(DB_SETTINGS_INF, $inputSettings, 'update', ['primary_key' => 'settings_name']); } addNotice('success', $this->locale['900']); redirect(FUSION_REQUEST); } addNotice('danger', $this->locale['901']); self::$faq_settings = $inputArray; } private function FaqAdminForm() { echo openform('settingsform', 'post', FUSION_REQUEST, ['class' => 'spacer-sm']). "
".$this->locale['faq_0400']."
\n". form_select('faq_allow_submission', $this->locale['faq_0005'], self::$faq_settings['faq_allow_submission'], [ 'inline' => TRUE, 'options' => [$this->locale['disable'], $this->locale['enable']] ]). form_button('savesettings', $this->locale['750'], $this->locale['750'], ['class' => 'btn-success', 'icon' => 'fa fa-hdd-o']). closeform(); } }