PHPFusion\PrivateMessages::display_settings PHP Method

display_settings() public method

PM settings page
public display_settings ( )
    public function display_settings()
    {
        global $userdata, $locale;
        if (isset($_POST['save_options'])) {
            $data = array("user_id" => $userdata['user_id'], "user_pm_email_notify" => form_sanitizer($_POST['pm_email_notify'], 0, "pm_email_notify"), "user_pm_save_sent" => form_sanitizer($_POST['pm_save_sent'], 0, "pm_save_sent"));
            dbquery_insert(DB_USERS, $data, "update");
            addNotice("success", $locale['445']);
            redirect(BASEDIR . "messages.php?folder=options");
        }
        ob_start();
        echo openform('pm_form', 'post', BASEDIR . "messages.php?folder=" . $_GET['folder']);
        $options = array("0" => $locale['520'], "1" => $locale['521'], "2" => $locale['522']);
        echo form_select('pm_email_notify', $locale['621'], $userdata['user_pm_email_notify'], array("options" => $options));
        $options = array("0" => $locale['520'], "1" => $locale['523'], "2" => $locale['524']);
        echo form_select('pm_save_sent', $locale['622'], $userdata['user_pm_save_sent'], array("options" => $options));
        echo form_button('save_options', $locale['623'], $locale['623'], array("class" => "btn btn-primary"));
        echo closeform();
        $this->info['options_form'] = ob_get_contents();
        ob_end_clean();
    }