# ---------------------------------------------------------------------- # BLOG: CONTROL # ---------------------------------------------------------------------- */ /* --- CONSTRUCT CLASS --- */ $_get = new BLOG_GET(); $_update = new BLOG_UPDATE(); $prepared_news_title = $_get->get_all_news_title(); $array_news_title = array(); foreach ($prepared_news_title as $news_title) { array_push($array_news_title, $news_title->news_title); } $news_date = filter_var($_REQUEST['news_date'], FILTER_SANITIZE_STRING); $news_alias = filter_var($_REQUEST['news_alias'], FILTER_SANITIZE_STRING); //$secure_news_title = $_get->secure_blog_detail($anti_link, $get_post_news_title, $array_news_title); $blog_detail = $_get->get_blog_detail($news_alias); $category = $_get->get_all_news_category(); $archive = $_get->get_all_archive(); $totalPrev = $_get->countPrevBlog($blog_detail->news_date); $totalNext = $_get->countNextBlog($blog_detail->news_date); if ($totalPrev->rows > 0) { $prevBlog = $_get->prevBlog($blog_detail->news_date); } else { $prevBlog = 'none'; } if ($totalNext->rows > 0) { $nextBlog = $_get->nextBlog($blog_detail->news_date); } else { $nextBlog = 'none'; } /* --- SHARER --- */
/* --- CONSTRUCT CLASS --- */ $_get = new BLOG_GET(); $_update = new BLOG_UPDATE(); $prepared_news_title = $_get->get_all_news_title(); $array_news_title = array(); foreach($prepared_news_title as $news_title){ array_push($array_news_title, $news_title->news_title); } $news_alias = filter_var($_REQUEST['news_alias'], FILTER_SANITIZE_STRING); $news_id = filter_var($_REQUEST['news_id'], FILTER_SANITIZE_NUMBER_INT); //$secure_news_title = $_get->secure_blog_detail($anti_link, $get_post_news_title, $array_news_title); $blog_detail = $_get->get_blog_detail($news_id); $category = $_get->get_all_news_category(); $archive = $_get->get_all_archive(); $allImg = $_get->get_all_news_image($news_id); $mainCategory = $_get->get_main_category($blog_detail->news_category); if($mainCategory->main_id == 1){ $backLink = BASE_URL.'#projects'; }else{ $backLink = BASE_URL.'project-detail/'.$mainCategory->main_id.'/'.cleanurl($mainCategory->parent_name); } ?>