if (isset($_POST['insert'])) { $title = $_POST['title']; $title_en = $_POST['title_en']; $image = $_POST["image"]; $text = $_POST['text']; $source = $_POST['source']; $video = $_POST['video']; $description = $_POST['description']; $keywords = $_POST['keywords']; $read_time = $_POST['read_time']; $admin_id = $_SESSION['MM_admin_id']; $hit_count = 0; $add_time = time(); $modify_time = 0; $activate = 0; $insert_blog = BLOGS::blogs_Insert($title, $title_en, $image, $text, $source, $video, $description, $read_time, $hit_count, $admin_id, $add_time, $modify_time, $activate); if ($insert_blog) { $blog_id = DatabaseHandler::GetOne("SELECT `id` FROM blogs WHERE `add_time` = '{$add_time}' ; "); $keywords = explode(",", $keywords); foreach ($keywords as $keyword) { $keyword = trim($keyword); BLOG_KEYWORDS::blog_keywords_Insert($blog_id, $keyword); } if (isset($_POST['types'])) { $types = $_POST['types']; foreach ($types as $type) { $type = explode("-", $type); B_T::b_t_Insert($blog_id, $type['1']); } } if (isset($_POST['subjects'])) {