function p() { $id = isset($_GET['id']) ? addslashes($_GET['id']) : 0; if ($id) { $page = new Page(); $page->getByID($id); if (!isset($page->post_title) || $page->post_title == '') { die('Not Found'); } //add channel feb 2015 $a = NewsChannel::myChannels(); if ($page->page_channel_id > 0) { if (!in_array($page->page_channel_id, $a)) { echo 'Not Authorize To View'; return ""; } } $pc = new PageContainer(); if ($page->post_gallery_id > 0) { $pc->getByID($page->post_gallery_id); } $page->setSEO(); $gw = new GalleryWeb(); ?> <style> .pl_file_item { padding : 10px; clear : both; text-decoration : underline; color : #0072b1; cursor : pointer; margin : 5px; background-color : #efefef; } .if_text { height : 30px; line-height : 30px; float : left; margin-left : 10px; } .fotoIF { width : 30px; height : 30px; overflow : hidden; float : left; } .fotoIF img { width : 30px; } .h3pv { font-size : 18px; border-bottom : 1px dashed #333; padding-bottom : 10px; margin-bottom : 0px; } </style> <h1 style="padding-bottom: 0; margin-bottom: 0; margin-bottom: 10px;"><?php echo stripslashes($page->post_title); ?> </h1> <div class="breadcrumbs">Pages <?php if ($page->post_gallery_id > 0) { ?> / <a href="<?php echo _SPPATH; ?> pagecontainer?mode=<?php echo $pc->container_id; ?> "><?php echo $pc->container_name; ?> </a><?php } ?> </div> <small style="font-size: 12px;"><?php echo indonesian_date($page->post_modified); ?> </small> <?php if ($page->post_image != "") { ?> <div class="bigimage" style="padding-bottom: 10px;"> <img style="width: 100%; padding-top: 20px;" src="<?php echo _SPPATH . $gw->uploadURL . $page->post_image; ?> "> </div> <?php } ?> <div class="postcontent"> <?php $content = stripslashes($page->post_content); $content = str_replace('#tbs_video#', '<video id="player_normal" width="100%" controls src="', $content); $content = str_replace('#/tbs_video#', '"></video>', $content); echo $content; ?> </div> <?php if ($page->post_files != "") { ?> <div class="clearfix" style="padding: 10px;"> <h3 class="h3pv"><?php echo Lang::t('Attachments'); ?> </h3> </div> <div style=""> <?php $exp = explode(",", trim(rtrim($page->post_files))); $arrNames = array(); foreach ($exp as $fil) { // echo $fil."<br>"; if ($fil == "") { continue; } $exp2 = explode(".", $fil); $if = new \InputFileModel(); // echo $exp2[0]."<br>"; $if->getByID($exp2[0]); $arrNames[] = $if; $text .= $if->printLink(); } echo $text; ?> </div><?php } ?> <?php if ($page->comment_allowed) { ?> <div class="clearfix" style="padding: 10px;"></div> <?php PageCommentWeb::beginComment($id); } // pr($page); /* $str = ''; global $template; if($page->post_gallery_id != 0 || $page->post_event_id != 0){ if($page->post_event_id!=0){ $event = new Event(); $event->getByID($page->post_event_id); // pr($event); $str .= '<div class="event-item"><div class="event-name">'.$event->cal_name.'</div></div>'; $efi = new EfiHome(); $_GET['eid'] = $page->post_event_id; $efi->eventview(1); } if($page->post_gallery_id!=0){ $gal = new Gallery(); $gal->getByID($page->post_gallery_id); //pr($gal); $str .= '<div class="gallery-item"><div class="gallery-name">'.$gal->gallery_name.'</div></div>'; $efi = new EfiHome(); $_GET['gid'] = $page->post_gallery_id; $efi->galleryview(1); } //$template->useSidebar = 1; //$template->sideBar = $str; }*/ /* ?> <div class="fb-comments" data-href="http://developers.facebook.com/docs/plugins/comments/" data-width="100%" data-numposts="5" data-colorscheme="light"></div> <?*/ } }
function p() { $id = isset($_GET['id']) ? addslashes($_GET['id']) : 0; if ($id) { $page = new Page(); $page->getByID($id); if (!isset($page->post_title) || $page->post_title == '') { die('Not Found'); } //add channel feb 2015 // $a = NewsChannel::myChannels(); // if($page->page_channel_id>0) // if(!in_array($page->page_channel_id, $a)){ // echo 'Not Authorize To View'; // return ""; // } $pc = new PageContainer(); if ($page->post_gallery_id > 0) { $pc->getByID($page->post_gallery_id); } $page->setSEO(); // $gw = new GalleryWeb(); ?> <div class="container attop" > <div class="col-md-8 col-md-offset-2"> <h1 style="padding-bottom: 0; margin-bottom: 0; margin-bottom: 10px;"><?php echo stripslashes($page->post_title); ?> </h1> <!-- <div class="breadcrumbs">Pages--> <!-- --><?php // if ($page->post_gallery_id > 0) { ?> <!--/--> <!-- <a href="--><?php //= _SPPATH; ?> <!--pagecontainer?mode=--><?php //= $pc->container_id; ?> <!--">--><?php //= $pc->container_name; ?> <!--</a>--><?php // } ?> <!-- </div>--> <!-- <small style="font-size: 12px;">--><?php //= indonesian_date($page->post_modified); ?> <!--</small>--> <?php if ($page->post_image != "") { ?> <div class="bigimage" style="padding-bottom: 10px;"> <img style="width: 100%; padding-top: 20px;" src="<?php echo _SPPATH . _PHOTOURL . $page->post_image; ?> "> </div> <?php } ?> <div class="postcontent"> <?php $content = stripslashes($page->post_content); $content = str_replace('#tbs_video#', '<video id="player_normal" width="100%" controls src="', $content); $content = str_replace('#/tbs_video#', '"></video>', $content); echo $content; ?> </div> <?php if ($page->post_files != "") { ?> <div class="clearfix" style="padding: 10px;"> <h3 class="h3pv"><?php echo Lang::t('Attachments'); ?> </h3> </div> <div style=""> <?php $exp = explode(",", trim(rtrim($page->post_files))); $arrNames = array(); foreach ($exp as $fil) { // echo $fil."<br>"; if ($fil == "") { continue; } $exp2 = explode(".", $fil); $if = new \InputFileModel(); // echo $exp2[0]."<br>"; $if->getByID($exp2[0]); $arrNames[] = $if; $text .= $if->printLink(); } echo $text; ?> </div><?php } ?> <?php if ($page->comment_allowed) { ?> <div class="clearfix" style="padding: 10px;"></div> <?php PageCommentWeb::beginComment($id); } // pr($page); /* $str = ''; global $template; if($page->post_gallery_id != 0 || $page->post_event_id != 0){ if($page->post_event_id!=0){ $event = new Event(); $event->getByID($page->post_event_id); // pr($event); $str .= '<div class="event-item"><div class="event-name">'.$event->cal_name.'</div></div>'; $efi = new EfiHome(); $_GET['eid'] = $page->post_event_id; $efi->eventview(1); } if($page->post_gallery_id!=0){ $gal = new Gallery(); $gal->getByID($page->post_gallery_id); //pr($gal); $str .= '<div class="gallery-item"><div class="gallery-name">'.$gal->gallery_name.'</div></div>'; $efi = new EfiHome(); $_GET['gid'] = $page->post_gallery_id; $efi->galleryview(1); } //$template->useSidebar = 1; //$template->sideBar = $str; }*/ /* ?> <div class="fb-comments" data-href="http://developers.facebook.com/docs/plugins/comments/" data-width="100%" data-numposts="5" data-colorscheme="light"></div> <?*/ ?> </div></div><?php } }