public function overwriteRead($return) { $objs = $return['objs']; foreach ($objs as $obj) { if (isset($obj->news_postdate)) { $obj->news_postdate = date("d-m-Y", strtotime($obj->news_postdate)); } if (isset($obj->news_updatedate)) { $obj->news_updatedate = date("d-m-Y", strtotime($obj->news_updatedate)); } if (isset($obj->news_validity_begin)) { $obj->news_validity_begin = date("d-m-Y", strtotime($obj->news_validity_begin)); } if (isset($obj->news_validity_end)) { $obj->news_validity_end = date("d-m-Y", strtotime($obj->news_validity_end)); } if (isset($obj->news_author)) { $acc = new Account(); $acc->getByID($obj->news_author); $obj->news_author = $acc->admin_nama_depan; } if (isset($obj->news_channel_id)) { $acc = new NewsChannel(); $acc->getByID($obj->news_channel_id); $obj->news_channel_id = $acc->channel_name; } } //pr($return); return $return; }
public function overwriteRead($return) { $objs = $return['objs']; foreach ($objs as $obj) { if (isset($obj->webapps_channel_id)) { $acc = new NewsChannel(); $acc->getByID($obj->webapps_channel_id); $obj->webapps_channel_id = $acc->channel_name; } } //pr($return); return $return; }
public static function viewFeed() { $id = isset($_GET['id']) ? addslashes($_GET['id']) : die("No ID"); //echo $id; $np = new NewsPortal(); $np->getByID($id); $ch = new NewsChannel(); $ch->getByID($np->news_channel_id); $gw = new GalleryWeb(); ?> <div class="col-md-8 col-md-offset-2"> <h1 style="padding-bottom: 0; margin-bottom: 0; margin-bottom: 10px;"> <?php echo stripslashes($np->news_title); ?> </h1> <div class="breadcrumbs">News <?php if ($np->news_channel_id > 0) { ?> / <a href="<?php echo _SPPATH; ?> newsfeed?cat=<?php echo $np->news_channel_id; ?> "><?php echo $ch->channel_name; ?> </a><?php } ?> </div> <small style="font-size: 12px;"><?php echo indonesian_date($np->news_postdate); ?> </small> <?php if ($np->news_image != "") { ?> <div class="bigimage" style="padding-bottom: 10px;"> <img style="width: 100%; padding-top: 20px;" src="<?php echo _SPPATH . $gw->uploadURL . $np->news_image; ?> "> </div> <?php } ?> <div class="postcontent" style="margin-bottom: 20px;"> <?php echo stripslashes($np->news_text); ?> </div> <?php if ($np->news_comment_allow) { PageCommentWeb::beginComment($id, "newsfeed"); } ?> </div> <?php //pr($np); }