getContentsByTags('staticpage','aboutchiz',1); $smarty->assign('aboutchiz',$aboutchiz); $personalprofile = $articles->getContentsByTags('staticpage','personalprofile',1); $smarty->assign('personalprofile',$personalprofile); $biography = $articles->getContentsByTags('staticpage','biography',1); $smarty->assign('biography',$biography); $features = $articles->getContentsByTags('news','features',4); $smarty->assign('features',$features); $latest = $articles->getContentsBySection('news',4); $smarty->assign('latest',$latest); } elseif($section == 'gallery') { $var = "chizescudero dot com - Official Website of Sen. Chiz Escudero - Photo Gallery"; $template = "inside_pages_gallery.tpl"; $latest = $articles->getContentsBySection('news',5); $smarty->assign('latest',$latest); $photos = $articles->getPhotoList(6); $smarty->assign('photos',$photos); $photos_action = $articles->getPhotoList(6, 'chizinaction'); $smarty->assign('photos_action',$photos_action); } elseif($section == 'comments_message') { $var = "chizescudero dot com - Official Website of Sen. Chiz Escudero - Views and Comments"; $template = "inside_comments_message.tpl"; $content_id = $_GET['id']; $smarty->assign('content_id',$content_id); $type = $_GET['type']; $smarty->assign('type',$type); if($_POST) { $name = $_POST['comment_name']; $address = $_POST['comment_add']; $email = $_POST['comment_email']; $mobile = $_POST['comment_mobile']; $message = $_POST['comment_message']; $content_id = $_POST['content_id']; $type = $_POST['type']; if(($name== '') || ($address== '') || ($email== '') || ($message== '')) { if($name== '') $notify = "Name field is required"; elseif($address== '') $notify = "Address field is required"; elseif($email== '') $notify = "Email Address field is required"; elseif($message== '') $notify = "Message field is required"; else $notify = "All Fields with * are required"; $smarty->assign('name',$name); $smarty->assign('address',$address); $smarty->assign('email',$email); $smarty->assign('message',$message); } else { $data = array( 'article_id' => $content_id, 'type' => $type, 'name' => $name, 'home_add' => $address, 'email_add' => $email, 'mobile_no' => $mobile, 'message' => $message, 'status' => "0", 'date' => date('Y:m:d H:i:s') ); $articles->insert_comments($data); $notify = "Successfully sent."; } $smarty->assign('notify',$notify); } } /*elseif($section == 'comments_register') { $var = "chizescudero dot com - Official Website of Sen. Chiz Escudero - Comment Registration"; $template = "inside_comments_register.tpl"; }*/ elseif($section == 'comments') { $var = "chizescudero dot com - Official Website of Sen. Chiz Escudero - Views and Comments"; $template = "inside_comments.tpl"; $type = $_GET['type']; if($type) { $comments = $articles->getComments($type,4); $smarty->assign('comments',$comments); $template = "inside_comments_detailed.tpl"; } else { $quote = $articles->getComments('quote',2); $smarty->assign('quote',$quote); $story = $articles->getComments('story',2); $smarty->assign('story',$story); } } elseif($section == 'chizincongress') { $var = "chizescudero dot com - Official Website of Sen. Chiz Escudero - Chiz in Congress"; $template = "inside_chiz_in_congress.tpl"; $chizincongress = $articles->getContentsByTags('staticpage','chizincongress',1); $smarty->assign('chizincongress',$chizincongress); $otherrep = $articles->getContentsByTags('staticpage','otherrepresentations',1); $smarty->assign('otherrep',$otherrep); $accomplishments = $articles->getContentsByTags('staticpage','accomplishments',1); $smarty->assign('accomplishments',$accomplishments); $housebills = $articles->getContentsByTags('staticpage','housebills',1); $smarty->assign('housebills',$housebills); $features = $articles->getContentsByTags('news','features',4); $smarty->assign('features',$features); $latest = $articles->getContentsBySection('news',4); $smarty->assign('latest',$latest); } elseif($section == 'insidereleases') { $var = "chizescudero dot com - Official Website of Sen. Chiz Escudero - Chiz in Congress"; $template = "inside_pages_releases.tpl"; } elseif($section == 'video') { $var = "chizescudero dot com - Official Website of Sen. Chiz Escudero - Chiz in Congress"; $template = "inside_pages_video.tpl"; $id = $_GET['id']; $videoDetails = $articles->getVideo($id); $smarty->assign('videoDetails',$videoDetails); $videos = $articles->getVideoList(4,'chiz',$id); $smarty->assign('videos',$videos); } elseif($section == 'mediaroom') { $var = "chizescudero dot com - Official Website of Sen. Chiz Escudero - Media Room"; $template = "inside_media_room.tpl"; $id = $_GET['id']; $article_content = $articles->getContentsByTags('news','mainmediaroom',1); if($id) { $page = $_GET['page']; $link_title = $_GET['title']; } else { $id = $article_content[0]['id']; $link_title = $article_content[0]['link_title']; } $content = html_entity_decode($article_content[0]['main_content']); $content2 = explode("",$content); if(count($content2) > 1) { if($page == 0) $page = 1; $paging = "PAGE : "; for($a =0; $a $b "; } $content3 = $content2[$page-1]; $article_content[0]['main_content'] = $content3; } //$smarty->assign('articles',$article_content); $smarty->assign('paging',$paging); $smarty->assign('media',$article_content); $videos = $articles->getVideoList(3,'chiz'); $smarty->assign('videos',$videos); $features = $articles->getContentsByTags('news','features',4); $smarty->assign('features',$features); $latest = $articles->getContentsBySection('news',4); $smarty->assign('latest',$latest); } elseif($section == 'teamchiz') { $var = "chizescudero dot com - Official Website of Sen. Chiz Escudero - Team Chiz"; $template = "inside_team_chiz.tpl"; $teamchiz = $articles->getContentsByTags('staticpage','teamchiz',1); $smarty->assign('teamchiz',$teamchiz); } elseif($section == 'blog') { $var = "chizescudero dot com - Official Website of Sen. Chiz Escudero - Chiz Blogs"; $template = "inside_chiz_blogs.tpl"; $id = $_GET['id']; $article_content = $articles->getArticleDetails($id); $tags = $article_content[0]['keywords']; $related = $articles->getRelated($tags ,5 ,$id); $latest = $articles->getContentsBySection('blog',5); $page = $_GET['page']; $link_title = $_GET['title']; $content = html_entity_decode($article_content[0]['main_content']); $content2 = explode("",$content); if(count($content2) > 1) { if($page == 0) $page = 1; $paging = "PAGE : "; for($a =0; $a $b "; } $content3 = $content2[$page-1]; $article_content[0]['main_content'] = $content3; } $smarty->assign('articles',$article_content); $smarty->assign('paging',$paging); $smarty->assign('related',$related); $smarty->assign('latest',$latest); } elseif($section == 'chizblogs') { $var = "chizescudero dot com - Official Website of Sen. Chiz Escudero - Chiz Blogs"; $template = "inside_chiz_blogs.tpl"; $id = $_GET['id']; $article_content = $articles->getContentsBySection('blog',1); if($id) { $page = $_GET['page']; $link_title = $_GET['title']; } else { $id = $article_content[0]['id']; $link_title = $article_content[0]['link_title']; } $tags = $article_content[0]['keywords']; $related = $articles->getRelated($tags ,5 ,$id); $latest = $articles->getContentsBySection('blog',5); $content = html_entity_decode($article_content[0]['main_content']); $content2 = explode("",$content); if(count($content2) > 1) { if($page == 0) $page = 1; $paging = "PAGE : "; for($a =0; $a $b "; } $content3 = $content2[$page-1]; $article_content[0]['main_content'] = $content3; } $smarty->assign('articles',$article_content); $smarty->assign('paging',$paging); $smarty->assign('related',$related); $smarty->assign('latest',$latest); } elseif($section == 'story') { $template = "story_details.tpl"; $id = $_GET['id']; $page = $_GET['page']; $link_title = $_GET['title']; $article_content = $articles->getArticleDetails($id); $content = html_entity_decode($article_content[0]['main_content']); $content2 = explode("",$content); $tags = $article_content[0]['keywords']; $related = $articles->getRelated($tags ,5 ,$id); $latest = $articles->getContentsBySection('news',5); if(count($content2) > 1) { if($page == 0) $page = 1; $paging = "PAGE : "; for($a =0; $a $b "; } $content3 = $content2[$page-1]; $article_content[0]['main_content'] = $content3; } $smarty->assign('latest',$latest); $smarty->assign('related',$related); $smarty->assign('articles',$article_content); $smarty->assign('paging',$paging); // for sorsogon page $smarty->assign('static_id',$id); $var = "chizescudero dot com - Official Website of Sen. Chiz Escudero - ".$article_content[0]['title']; } else { $var = "chizescudero dot com - Official Website of Sen. Chiz Escudero - Home"; $template = "index_main_v2.tpl"; $latestrelease = $articles->getContentsByTags('news','mainnews',1); $smarty->assign('latestrelease',$latestrelease); $chizblog = $articles->getContentsBySection('blog',1); $smarty->assign('chizblog',$chizblog); $speeches = $articles->getContentsByTags('news','speech',1); $smarty->assign('speeches',$speeches); $senateagenda = $articles->getContentsByTags('staticpage','senateagenda',1); $smarty->assign('senateagenda',$senateagenda); $sorsogon = $articles->getContentsByTags('staticpage','sorsogon',1); $smarty->assign('sorsogon',$sorsogon); $videos = $articles->getVideoList(1,'mainvideo',$id); $smarty->assign('videos',$videos); } $smarty->assign('web_root', WEB_ROOT); $smarty->assign('title',$var); $smarty->display($template); ?>