public function form_options() { if (!isset($_GET['task'])) { $this->save_db(); } require_once WD_FM_DIR . "/admin/models/FMModelManage_fm.php"; $model = new FMModelManage_fm(); require_once WD_FM_DIR . "/admin/views/FMViewManage_fm.php"; $view = new FMViewManage_fm($model); // $id = ((isset($_POST['current_id']) && esc_html($_POST['current_id']) != '') ? esc_html($_POST['current_id']) : 0); global $wpdb; $id = (int) WDW_FM_Library::get('current_id', $wpdb->get_var("SELECT MAX(id) FROM " . $wpdb->prefix . "formmaker")); $view->form_options($id); }