function build_twitter_feed($var) { //print_r($xml->status); //$output = '<ul class="twitter-feed">'; foreach ($var as $tweet) { //print_r($tweet); $text = url::make_urls_links($tweet->text); $date = app::format_date($tweet->created_at, $app["bahasa"], "A"); $output .= '<div class="tweet"> <div class="title"><a class="title" target="blank" href="http://twitter.com/' . $tweet->user->screen_name . '">@' . $tweet->user->screen_name . '</a></div> <p>' . $text . '</p> <div class="hour">' . $date . '</div> <div class="clear"></div> </div>'; //$output .= '<li>'.$text.'</li>'; } //$output .= '</ul>'; return $output; }
<?php $stat = "index.php?act=set_status&p_id={$rshasil['id']}&status=" . $rshasil["status"]; if ($rshasil["status"] == 'aktif') { echo '<a href="' . $stat . '" title="' . $rshasil[status] . '"> <span class="ion-happy-outline"></span> </a>'; } else { echo '<a href="' . $stat . '" title="' . $rshasil[status] . '"> <span class="ion-sad-outline"></span> </a>'; } ?> </td> <td style="text-align:center;"><?php if ($rshasil["tgl_post"] != null && $rshasil["tgl_post"] != '0000-00-00') { $rshasil["tgl_post"] = $appx->format_date($rshasil["tgl_post"], ''); } else { $rshasil["tgl_post"] = ""; } echo $rshasil["tgl_post"]; ?> </td> <td style="text-align:center;"><?php if ($rshasil["tgl_modif"] != null && $rshasil["tgl_modif"] != '0000-00-00') { $rshasil["tgl_modif"] = $appx->format_date($rshasil["tgl_modif"], ''); } else { $rshasil["tgl_modif"] = ""; } echo $rshasil["tgl_modif"]; ?> </td>
<div class="latest_update add_fix"> <?php $tglnya = ""; $h1 = true; while ($dnews = $dbu->fetch($rnews)) { $dnews[icon] = $appx->cekFile('/berita/icon/', $dnews[icon], 'default.png'); $dnews[icon] = $app[data_www] . '/berita/icon/' . $dnews[icon]; $dnews[thumb] = $appx->cekFile('/berita/thumb/', $dnews[thumb], 'default.jpg'); $dnews[thumb] = $app[data_www] . '/berita/thumb/' . $dnews[thumb]; if ($h1 == true) { $tglnya = $dnews[tgl_post]; $h1 = false; ?> <h1><?php echo $appx->format_date($dnews[tgl_post], 'id', 'N'); ?> <span class="border"></span></h1> <ul class="update_list update_list_news add_fix"> <?php } ?> <li> <a href="<?php echo $app["www"] . "/" . $dbu->lookup('nama', 'action', "action='51'") . "/" . $urlx->shortLink($dnews[judul]) . "_" . $dnews[id] . "/"; ?> "> <div class="img_box"> <div class="icon"><img src="<?php echo $dnews[icon]; ?>
?> " /> <br> <input type="checkbox" class="checkbox" name="p_favico_del" value="1">check to remove <br /> <?php } } ?> <input name="p_favico" type="file" id="p_favico" /> </div> </div> <br/> <div> <div>tanggal update terakhir <?php if ($form["tgl_modif"] != null && $form["tgl_modif"] != '0000-00-00') { $form["tgl_modif"] = $appx->format_date($form["tgl_modif"], 'id'); } else { $form["tgl_modif"] = ""; } echo $form["tgl_modif"]; ?> </div> <br/> <hr/> <br/> <div >Yang Bertanda * Harus disi</div><br/> <div class="footer"> <input type="button" value="Update" onClick="set_action(this, 'update')"> <input type="reset" value="Reset" name="reset" class="btn btn-warning"> <input type="hidden" name="act"> <input type="button" value="Cancel" id="cancel">
echo $dfa[lastUpdate]; ?> </p> <div class="user_tools"> <a href="#"><i style="color:#085f7d;font-size:19px;" class="demo-icon icon-chat"></i> Multi Quote</a> <a href="#"><i style="color:#085f7d;font-size:19px;" class="demo-icon icon-comment"></i> Quote</a> </div> </div> </div> <!-- postlist --> <?php //$lalala = "aaa[/qreq]"; //echo strpos($lalala,"[/qreq]");exit; if ($nkomen > 0) { while ($dkomen = $dbu->fetch($rkomen)) { $tglpos = explode(" ", $dkomen[tgl_post]); $tglpost = $appx->format_date($tglpos[0], $_SESSION[bhs], 'N') . " | " . $tglpos[1]; $tgljoin = $appx->format_date($dkomen[tgljoin], $_SESSION[bhs], 'N'); $dkomen[avatar] = $appx->cekFile("/pengguna/avatar/", $dkomen[avatar]); $dkomen[avatar] = $app[data_www] . "/pengguna/avatar/" . $dkomen[avatar]; $linkAva = $app["www"] . "/" . $dbu->lookup('nama', 'action', "action='8' and id_bahasa ='" . $_SESSION[bhs] . "'") . "/" . $urlx->shortLink($dkomen[username]) . "/"; $hitJml = $dbu->count_record("SELECT count(id) as jumlah FROM " . $app[table][forum] . " WHERE id_user = '******'"); ?> <div class="postlist no-entry add_fix"> <div class="entry-head"> <div class="time_post"><?php echo $tglpost; ?> </div> <div class="shorcut_post"> <div class="report"><a href="#"><i style="color:#fff;" class="demo-icon icon-attention"></i></a></div> </div>
<?php if ($nof <= 0) { ?> <h1 class="main_title" style="background:none;">TODAY<span class="border"></span></h1> <ul> <li>NO Article Found</li> </ul> </div> <?php } else { $tglnya = ""; $h1 = true; while ($dforum = $dbu->fetch($rforum)) { if ($h1 == true) { $h1 = false; $tglnya = $appx->format_date($dforum[tgl_post], 'id', 'N'); $now = $appx->format_date(date("Y-m-d"), 'id', 'N'); $xtgl = $tglnya; if ($tglnya == $now) { $xtgl = "TODAY"; } ?> <h1 class="main_title" style="background:none;"><?php echo $xtgl; ?> <span class="border"></span></h1> <ul> <?php $avatar = $appx->cekFile('/pengguna/avatar/', $dforum[avatar], 'default.jpg'); $avatar = $app[data_www] . '/pengguna/avatar/' . $avatar; $linkAva = $app["www"] . "/" . $dbu->lookup('nama', 'action', "action='8' and id_bahasa ='" . $_SESSION[bhs] . "'") . "/" . $urlx->shortLink($dforum[username]) . "/";
?> /images/em.png"></a> </div> <div class="box_meta_overview"> <h1><?php echo ucfirst($desbhs[nama]) . ", " . ucfirst($desbhs[kota]) . ", " . ucfirst($desbhs[provinsi]); ?> </h1> <div class="box_postdate add_fix"> <div class="det_post_by">by <label><a href="#"><?php echo ucfirst($desbhs[username]); ?> </a></label></div> <span>|</span> <div class="det_date"><?php echo $appx->format_date($desbhs[diposting], $_SESSION[bhs]); ?> </div> </div> <div class="litle_quotes"><img src="<?php echo $app["css_www"]; ?> /images/ic_q_left.png"><?php echo ucfirst($desbhs[slogan]); ?> <img src="<?php echo $app["css_www"]; ?> /images/ic_q_right.png"></div> </div> <div class="box_main_info add_fix">
</a>'; } else { echo '<a href="' . $stat . '" title="' . $rshasil[status] . '"> <span class="ion-sad-outline"></span> </a>'; } ?> </td> <td style="text-align:center"> <?php echo $rshasil["username"]; ?> </td> <td style="text-align:center;"><?php if ($rshasil["tgl_terbentuk"] != null && $rshasil["tgl_terbentuk"] != '0000-00-00') { $rshasil["tgl_terbentuk"] = $appx->format_date($rshasil["tgl_terbentuk"], ''); } else { $rshasil["tgl_terbentuk"] = ""; } echo $rshasil["tgl_terbentuk"]; ?> </td> <td style="text-align:center;"><?php if ($rshasil["tgl_post"] != null && $rshasil["tgl_post"] != '0000-00-00') { $rshasil["tgl_post"] = $appx->format_date($rshasil["tgl_post"], ''); } else { $rshasil["tgl_post"] = ""; } echo $rshasil["tgl_post"]; ?> </td>
$xpid = ""; if ($sub != "") { $xpid = str_replace("page-", "", $sub); $awal = ($xpid - 1) * $limitx; $limit = "LIMIT " . $awal . ", " . $limitx; } else { header("location:" . $app[www] . "/" . $dbu->lookup('nama', 'action', "action='41' and id_bahasa='" . $_SESSION[bhs] . "'") . "/" . $urlx->shortLink($p_id) . "/page-1/"); //exit; } $pid = str_replace("-", "%", $p_id); $sql = "SELECT a.id, a.judul, a.id_destinasi, a.isi, a.tgl_post, a.tgl_modif as lastUpdate, b.username , b.avatar, b.tgl_post as tgljoin, c.nama as destinasi FROM " . $app[table][forum] . " as a LEFT JOIN " . $app[table][pengguna] . " as b ON(a.id_user = b.id) LEFT JOIN " . $app[table][destinasi] . " as d ON(a.id_destinasi = d.id) LEFT JOIN " . $app[table][destinasi_bahasa] . " as c ON(d.id_reff = c.id_reff) WHERE a.judul LIKE '" . $pid . "' AND c.id_bahasa ='" . $_SESSION[bhs] . "' AND a.tipe ='article' AND a.status ='aktif'"; //echo $sql;exit; $dfa = $dbu->get_recordmix($sql); if ($dfa[id] != "") { $tglpos = explode(" ", $dfa[tgl_post]); $tglpost = $appx->format_date($tglpos[0], $_SESSION[bhs], 'N') . " | " . $tglpos[1]; $tgljoin = $appx->format_date($dfa[tgljoin], $_SESSION[bhs], 'N'); $dfa[avatar] = $appx->cekFile("/pengguna/avatar/", $dfa[avatar]); $dfa[avatar] = $app[data_www] . "/pengguna/avatar/" . $dfa[avatar]; $linkAva = $app["www"] . "/" . $dbu->lookup('nama', 'action', "action='8' and id_bahasa ='" . $_SESSION[bhs] . "'") . "/" . $urlx->shortLink($dfa[username]) . "/"; $hitJml = $dbu->count_record("SELECT count(id) as jumlah FROM " . $app[table][forum] . " WHERE id_user = '******'"); if ($dfa[lastUpdate] != null && $dfa[lastUpdate] != '0000-00-00 00:00:00') { $tgledit = explode(" ", $dfa[lastUpdate]); $tglEdit = $appx->format_date($tgledit[0], $_SESSION[bhs], 'N') . " " . $tgledit[1]; $dfa[lastUpdate] = $tglEdit; } else { $dfa[lastUpdate] = $tglpost; } #per page komen ----------------------- $sql = "SELECT a.id,a.id_komen, a.isi , a.tgl_post, a.tgl_modif as lastUpdate, b.username , b.avatar, b.tgl_post as tgljoin FROM " . $app[table][forum_komen] . " as a LEFT JOIN " . $app[table][pengguna] . " as b ON(a.id_user = b.id) WHERE a.id_forum = '" . $dfa[id] . "' AND a.status ='aktif' ORDER BY tgl_post DESC " . $limit; //echo $sql; exit;
<span class="border"></span> <h2><?php echo $newsbhs[judul]; ?> </h2> <p><?php echo $newsbhs[sinopsis]; ?> </p> <div class="post_by">oleh <i><?php echo $dbu->lookup('nama', 'pengguna', "id='" . $rsnew[id_user] . "'"); ?> </i></div> <div class="info"> <div class="date"><?php echo $appx->format_date($rsnew[tgl_post], 'id', 'N'); ?> </div> <div class="view"><?php echo $appx->number_to_K($rsnew[hit]); ?> </div> </div> </div> </a> </li> <?php $hit++; } ?>