diff --git a/e107_admin/newspost.php b/e107_admin/newspost.php index 142652d1e..1a672f5f4 100644 --- a/e107_admin/newspost.php +++ b/e107_admin/newspost.php @@ -1254,6 +1254,22 @@ class admin_newspost $sql = e107::getDb(); $count = $sql->db_Delete("news","news_id IN (".implode(",",$ids).") "); } + + function batch_subdelete($ids, $value) + { + $sql = e107::getDb(); + $count = $sql->db_Delete("submitnews","submitnews_id IN (".implode(",",$ids).") "); + } + + function batch_subcategory($ids, $value) + { + if(!isset($this->news_categories[$value])) + { + $this->noPermissions(); + } + $sql = e107::getDb(); + $count = $sql->db_Update("submitnews","submitnews_category = ".$value." WHERE submitnews_id IN (".implode(",",$ids).") "); + } function batch_sticky($ids, $value) { @@ -2429,12 +2445,24 @@ class admin_newspost function show_submitted_news() - { - + { + + //TODO - image upload path should be e_MEDIA and using generic upload handler on submitnews.php. + $e107 = e107::getInstance(); $frm = e107::getForm(); - - if ($e107->sql->db_Select("submitnews", "*", "submitnews_id !='' ORDER BY submitnews_id DESC")) + $tp = e107::getParser(); + $sql = e107::getDb(); + + $newsCat = array(); + $sql->db_Select('news_category'); + while($row = $sql->db_Fetch()) + { + $newsCat[$row['category_id']] = $tp->toHTML($row['category_name'],FALSE,'TITLE'); + } + + + if ($sql->db_Select("submitnews", "*", "submitnews_id !='' ORDER BY submitnews_id DESC")) { $text .= "
"; }