private static function insert() { CHECK::is_must($_POST["callback"], $_POST["subject"], $_POST["content"], $_POST["parent"]); if (CHECK::is_pass()) { CRUD::$parent_tb_name = 'products_cate'; if (is_array($_POST['related'])) { $_POST['related'] = json_encode($_POST['related']); } else { $_POST['related'] = ''; } $_POST['createdate'] = date('Y-m-d H:i:s'); CRUD::dataInsert('products', $_POST, true, true, true); if (!empty(DB::$error)) { CRUD::args_output(); $msg = DB::$error; $path = CORE::$manage . 'products/add/'; } else { $msg = self::$lang["modify_done"]; $path = CORE::$manage . 'products/'; } } else { CRUD::args_output(); $msg = CHECK::$alert; $path = CORE::$manage . 'products/add/'; } CORE::msg($msg, $path); }
private static function insert() { CHECK::is_must($_POST["callback"], $_POST["subject"], $_POST["content"], $_POST["parent"]); if (CHECK::is_pass()) { CRUD::$parent_tb_name = 'faq_cate'; CRUD::dataInsert('faq', $_POST, true); if (!empty(DB::$error)) { CRUD::args_output(); $msg = DB::$error; $path = CORE::$manage . 'faq/add/'; } else { $msg = self::$lang["modify_done"]; $path = CORE::$manage . 'faq/'; } } else { CRUD::args_output(); $msg = CHECK::$alert; $path = CORE::$manage . 'faq/add/'; } CORE::msg($msg, $path); }