function tujuanDes($destkota, $stat = 'provinsi', $tambah) { global $app; $dbu = new db(); $appx = new app(); $urlx = new url(); if ($stat == "destinasi") { while ($desty = $dbu->fetch($destkota)) { $destinasi = $desty[nama]; $desty[thumb] = $appx->cekFile("/destinasi/thumb/", $desty[thumb], 'default.jpg'); $desty[thumb] = $app[data_www] . "/destinasi/thumb/" . $desty[thumb]; $outnya .= '<li> <div class="img_box"> <img src="' . $desty[thumb] . '"> </div> <div class="text"> <h1>' . $destinasi . '</h1> <p>' . $dbu->lookup('deskripsi', $app[table][destinasi_bahasa], "id_reff ='" . $desty[id_reff] . "' AND id_bahasa='" . $_SESSION[bhs] . "'") . '</p> </div> <a href="' . $app[www] . "/" . $dbu->lookup('nama', 'action', "action='21' and id_bahasa='" . $_SESSION[bhs] . "'") . "/" . $urlx->shortLink($destinasi) . "/" . '"><div class="explore">EXPLORE MORE</div></a> </li>'; } } elseif ($stat == "provinsi") { while ($desty = $dbu->fetch($destkota)) { $destinasi = $desty[nama]; $desty[thumb] = $appx->cekFile("/destinasi/thumb/", $desty[thumb], 'default.jpg'); $desty[thumb] = $app[data_www] . "/destinasi/thumb/" . $desty[thumb]; $outnya .= '<li> <div class="img_box"> <img src="' . $desty[thumb] . '"> </div> <div class="text"> <h1>' . $destinasi . '</h1> <p>' . $dbu->lookup('deskripsi', $app[table][destinasi_bahasa], "id_reff ='" . $desty[id_reff] . "' AND id_bahasa='" . $_SESSION[bhs] . "'") . '</p> </div> <a href="' . $app[www] . "/" . $dbu->lookup('nama', 'action', "action='21' and id_bahasa='" . $_SESSION[bhs] . "'") . "/" . $urlx->shortLink($destinasi) . "/" . '"><div class="explore">EXPLORE MORE</div></a> </li>'; } } else { //echo "sedel";exit; while ($dkota = $dbu->fetch($destkota)) { $dkota[thumb] = $appx->cekFile("/kota/thumb/", $dkota[thumb], 'default.jpg'); $dkota[thumb] = $app[data_www] . "/kota/thumb/" . $dkota[thumb]; //echo "asdasdas".$dkota[thumb]; $outnya .= '<li> <div class="img_box"> <img src="' . $dkota[thumb] . '"> </div> <div class="text"> <h1>' . $dkota[nama] . '</h1> <p>' . $dbu->lookup('deskripsi', $app[table][kota_bahasa], "id_kota ='" . $dkota[id] . "' AND id_bahasa='" . $_SESSION[bhs] . "'") . '</p> </div> <a href="' . $app[www] . "/" . $dbu->lookup('nama', 'action', "action='2' and id_bahasa='" . $_SESSION[bhs] . "'") . "/id_" . $urlx->shortLink($dkota[nama]) . "_" . $urlx->shortLink($tambah) . "/" . '"><div class="explore">EXPLORE MORE</div></a> </li>'; } } return $outnya; }
function feedCheckIn($dfeed, $sBahasa, $member) { global $app; $appx = new app(); $dbu = new db(); $urlx = new url(); $fcek_in = ""; $icon = $app[css_www] . "/images/ic_cat_2.png"; $avatar = $appx->cekFile('/pengguna/avatar/', $member[avatar], 'default.jpg'); $avatar = $app[data_www] . '/pengguna/avatar/' . $avatar; $linkAva = $app["www"] . "/" . $dbu->lookup('nama', 'action', "action='8' and id_bahasa ='" . $sBahasa . "'") . "/" . $urlx->shortLink($member[username]) . "/"; $fcek_in = '<div class="con_newsfeed add_fix"> <div class="line_newsfeed"> <div class="circle_pict circle_pict_nf"><a href="' . $linkAva . '"><img src="' . $avatar . '"></a></div> <div class="bar"></div> <div class="ic_cat"><a href="#"><img src="' . $icon . '"></a></div> </div>'; $dipost = $appx->time_delta('now', $dfeed[tgl_post], 0, 2, true); if ($_SESSION[member][id] != "") { $bolehKomen = '<li> <div class="circle_pict circle_pict_nf"><a href="' . $linkAva . '"><img src="' . $avatar . '"></a></div> <textarea id="cekin" placeholder="Write your comment..."></textarea> </li>'; } $sql = "SELECT a.nama , b.nama as kota , c.nama as provinsi, d.nama as negara FROM " . $app[table][destinasi_bahasa] . " as a LEFT JOIN " . $app[table][destinasi] . " as e ON (a.id_reff = e.id_reff) LEFT JOIN " . $app[table][kota] . " as b ON(e.id_kota = b.id) LEFT JOIN " . $app[table][provinsi] . " as c ON(b.id_provinsi = c.id) LEFT JOIN " . $app[table][negara] . " as d ON(c.id_negara = d.id) LEFT JOIN " . $app[table][cekin] . " as f ON(e.id = f.id_destinasi ) LEFT JOIN " . $app[table][pengguna_feed] . " as g ON(f.id = g.id_tabel) WHERE g.id ='" . $dfeed[id] . "' AND a.id_bahasa ='" . $sBahasa . "'"; $lokasi = $dbu->get_recordmix($sql); $cekin_di = '<span>Check in at <a href="#"><i>' . $lokasi[nama] . '(' . $lokasi[kota] . '), ' . $lokasi[provinsi] . ', ' . $lokasi[negara] . '</i></a></span>'; $fcek_in .= '<div class="box_con_newsfeed"> <h1>' . $member[nama] . '</h1> <span>' . $dipost . '</span> <div class="frame_post"> ' . $cekin_di . ' <div class="box_comment"> <ul class="add_fix" id="list_cekin" rel="cekin_' . $dfeed[id_tabel] . '"> ' . $bolehKomen; #komen cekin--------------------------- $sql = "SELECT a.nama , a.avatar, a.username, b.id, b.komen, b.tgl_post as tgl_komen FROM " . $app[table][pengguna] . " as a LEFT JOIN " . $app[table][cekin_komen] . " as b ON(b.id_user = a.id) WHERE b.id_cekin = '" . $dfeed[id_tabel] . "'"; $dbu->query($sql, $rkomen, $nkomen); if ($nkomen > 0) { while ($dkomen = $dbu->fetch($rkomen)) { $dkomen[avatar] = $appx->cekFile("/pengguna/avatar/", $dkomen[avatar]); $other_avatar = $app[data_www] . '/pengguna/avatar/' . $dkomen[avatar]; $other_linkAva = $app["www"] . "/" . $dbu->lookup('nama', 'action', "action='8' and id_bahasa ='" . $sBahasa . "'") . "/" . $urlx->shortLink($dkomen[username]) . "/"; $fcek_in .= '<li> <div class="circle_pict circle_pict_nf"><a href="' . $other_linkAva . '"><img src="' . $other_avatar . '"></a></div> <div class="text_box_c"> <h1>' . $dkomen[nama] . '</h1> <p>' . $dkomen[komen] . '</p> </div> </li>'; } } $fcek_in .= '</ul></div></div></div></div>'; return $fcek_in; }
<?php $stats = new stats(); $dbu = new db(); $appx = new app(); $appx->load_lib('feed'); $feedex = new feed(); $stats->log_stats($rs_act["nama"], $act, $p_id, $sub, $step, $cat, $status, $tab); $app['nopage'] = $rs_act["action"]; //echo $p_id;exit; $pid = str_replace("-", "%", $p_id); $idnya = $dbu->lookup("id", $app[table][komunitas], "nama LIKE '%" . $pid . "%'"); $komm = $dbu->get_record($app[table][komunitas], "id = '" . $idnya . "'"); $komm[logo] = $appx->cekFile('/komunitas/logo/', $komm[logo], 'default.png'); $komm[logo] = $app[data_www] . '/komunitas/logo/' . $komm[logo]; include "fill/fill_community_detail.php";
<form action=""> <label class="custom-select"> <select> <option>Date</option> </select> </label> </form> </div> </div> <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 } ?>
$dbu->connect(); $appx->load_lib('url'); $uly = new url(); //Get our locations from the database. $radius = 20; // Search the rows in the markers table $kat = ""; if ($_POST[kate] != "") { $kat = "WHERE a.id_kat ='" . $_POST[kate] . "'"; } $lat = $_POST[lat]; $lng = $_POST[lng]; //$alamat = $_POST[alamat]; $urlnya = $dbu->lookup('nama', 'action', "action='21' and id_bahasa='" . $_SESSION[bhs] . "'"); $query = "SELECT distinct a.website, b.nama as dest,a.id_kat, b.slogan, b.alamat, a.pos_lat as lat , a.pos_long as lng, ( 3959 * acos( cos( radians('" . $lat . "') ) * cos( radians( a.pos_lat ) ) * cos( radians( a.pos_long ) - radians('" . $lng . "') ) + sin( radians('" . $lat . "') ) * sin( radians( a.pos_lat ) ) ) ) AS distance, a.thumb, a.icon_map ,LTRIM(' url') as urlc FROM " . $app[table][destinasi] . " as a LEFT JOIN " . $app[table][destinasi_bahasa] . " as b ON(a.id_reff = b.id_reff) " . $kat . " HAVING distance < '" . $radius . "' ORDER BY distance asc"; $dbu->query($query, $rnear, $hit_near); $dnear = ""; if ($hit_near > 0) { $hit = 0; while ($nea = $dbu->fetch($rnear)) { $nea[urlc] = $app[www] . "/" . $urlnya . "/" . $uly->shortLink($nea[dest]) . "/"; $nea[thumb] = $appx->cekFile('/destinasi/thumb/', $nea[thumb], 'default.jpg'); $nea[thumb] = $app[data_www] . '/destinasi/thumb/' . $nea[thumb]; $nea[icon_map] = $appx->cekFile('/destinasi/icon/', $nea[icon_map], 'default.png'); $nea[icon_map] = $app[data_www] . '/destinasi/icon/' . $nea[icon_map]; $dnear[$hit] = $nea; $hit++; } } header('Content-Type: application/json'); echo json_encode($dnear);
$urlx = new url(); if ($id_related != "") { // AND $dnews[id_reff]!=0 $sql = "SELECT a.id, b.username , c.judul, c.thumb FROM " . $app[table][berita] . " as a LEFT JOIN " . $app[table][pengguna] . " as b ON (a.id_user = b.id) LEFT JOIN " . $app[table][berita_bahasa] . " as c ON (c.id_berita = a.id) WHERE a.id_reff='" . $id_related . "' AND a.ket_id ='" . $tabel . "' AND a.id <> '" . $idnya . "' ORDER BY a.tgl_post DESC LIMIT 5 "; //echo $sql;exit; $dbu->query($sql, $rsnews, $hit_related); } if ($hit_related > 0) { ?> <div class="thread related_news"> <h1 class="main_title" style="padding: 15px 15px 7px;">RELATED NEWS<span class="border"></span></h1> <ul> <?php while ($dtnews = $dbu->fetch($rsnews)) { $dtnews[thumb] = $appx->cekFile('/berita/thumb/', $dtnews[thumb], 'default.jpg'); $dtnews[thumb] = $app[data_www] . "/berita/thumb/" . $dtnews[thumb]; $linkAva = $app["www"] . "/" . $dbu->lookup('nama', 'action', "action='8' and id_bahasa ='" . $_SESSION[bhs] . "'") . "/" . $urlx->shortLink($dtnews[username]) . "/"; ?> <li> <a href="<?php echo $app["www"] . "/" . $dbu->lookup('nama', 'action', "action='51'") . "/" . $urlx->shortLink($dtnews[judul]) . "_" . $dtnews[id] . "/"; ?> "> <div class="thumb_img"><img src="<?php echo $dtnews[thumb]; ?> " width="97" height="84"></div> <span><?php echo $dtnews[judul]; ?>
<?php $stats = new stats(); $dbu = new db(); $appx = new app(); $appx->load_lib('feed'); $feedex = new feed(); $stats->log_stats($rs_act["nama"], $act, $p_id, $sub, $step, $cat, $status, $tab); $app['nopage'] = $rs_act["action"]; //echo $p_id;exit; $pid = str_replace("-", "%", $p_id); $idnya = $dbu->lookup("id", $app[table][pengguna], "username LIKE '%" . $pid . "%'"); $dprof = $dbu->get_record("pengguna", "id = '" . $idnya . "'"); $dprof[avatar] = $appx->cekFile("/pengguna/avatar/", $dprof[avatar]); $rsact = $dbu->get_recordset("pengguna_feed", "id_user='******' and status='aktif' ORDER BY tgl_post desc LIMIT 10"); //$rsnegara=$dbu->get_recordset("negara", "status ='aktif'"); $feed = ""; while ($dfeed = $dbu->fetch($rsact)) { if ($dfeed[tabel] == "cekin") { $feed = $feedex->feedCheckIn($dfeed, $_SESSION[bhs], $dprof); } } //exit; include "fill/fill_profil.php";
</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> </div> <div class="author add_fix">
</div> </div> <div class="litle_quotes"><img src="<?php echo $app[css_www]; ?> /images/ic_q_left.png"><?php echo $dnews[sinopsis]; ?> <img src="<?php echo $app[css_www]; ?> /images/ic_q_right.png"></div> </div> <div class="box_main_info add_fix det_news"> <?php $dnews[gambar] = $appx->cekFile('/berita/gambar/', $dnews[gambar], 'default.jpg'); $dnews[gambar] = $app[data_www] . "/berita/gambar/" . $dnews[gambar]; ?> <a class="main_image fancybox-buttons" data-fancybox-group="button" href="<?php echo $dnews[gambar]; ?> "><img src="<?php echo $dnews[gambar]; ?> " alt=""></a> </div> <div class="rich_text"> <?php echo $dnews[isi]; ?> </div>
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]) . "/"; } ?> <li> <div class="circle_pict"><a href="<?php echo $linkAva; ?> "><img src="<?php echo $avatar; ?> "></a></div> <a href="<?php echo $app[www] . "/" . $dbu->lookup('nama', 'action', "action='41' and id_bahasa='" . $_SESSION[bhs] . "'") . "/" . $urlx->shortLink($dforum[judul]) . "/"; ?>
<div class="my_location"> <div id="gg_loc"></div> <p><a id="mappy" href="#" >Show Map</a></p> </div> <div class="boxcon_search_destination add_fix" style="display:none;"> <div class="map_search" id="google_map" style="width:100%;margin-right:0;height:400px;"></div> </div> </div> <!-- .search_destination --> <div class="location_destination"> <div class="near-cat add_fix"> <span>Choose Category :</span> <ul> <?php while ($dkat = $dbu->fetch($rkat)) { $active = ""; $dkat[icon] = $appx->cekFile('/destinasi_kategori/icon/', $dkat[icon]); $pkat = $urlx->shortLink($dkat[kategori]); if ($p_id == $pkat) { $active = " active"; } echo '<li>'; ?> <a href="#" OnClick="setKategori(<?php echo $dkat[id]; ?> )" > <?php echo '<div id="' . $dkat[id] . '" value="' . strtoupper($dkat[kategori]) . '" class="bullet-cat-near"><img src="' . $app["data_www"] . '/destinasi_kategori/icon/' . $dkat[icon] . '"></div></a> <span class="tip-content">' . $dkat[kategori] . '</span> </li>';
$appx = new app(); $urlx = new url(); if ($id_related != "") { // AND $dnews[id_reff]!=0 $sql = "SELECT a.id, a.thumb , b.nama, e.nama as negara FROM " . $app[table][destinasi] . " as a LEFT JOIN " . $app[table][destinasi_bahasa] . " as b ON (a.id_reff = b.id_reff) LEFT JOIN " . $app[table][kota] . " as c ON (a.id_kota = c.id) LEFT JOIN " . $app[table][provinsi] . " as d ON (c.id_provinsi = d.id) LEFT JOIN " . $app[table][negara] . " as e ON (d.id_negara = e.id) WHERE a.id='" . $id_related . "' OR a.id_parent ='" . $id_related . "' ORDER BY a.tgl_post DESC LIMIT 5 "; //echo $sql;exit; $dbu->query($sql, $rsnews, $hit_related); } if ($hit_related > 0) { ?> <div class="near_place"> <h1 class="main_title" style="padding: 15px 15px 7px;">NEARBY PLACE<span class="border"></span></h1> <ul> <?php while ($dtnews = $dbu->fetch($rsnews)) { $dtnews[thumb] = $appx->cekFile('/destinasi/thumb/', $dtnews[thumb], 'default.jpg'); $dtnews[thumb] = $app[data_www] . "/destinasi/thumb/" . $dtnews[thumb]; $linkAva = $app["www"] . "/" . $dbu->lookup('nama', 'action', "action='8' and id_bahasa ='" . $_SESSION[bhs] . "'") . "/" . $urlx->shortLink($dtnews[username]) . "/"; ?> <li class="add_fix"> <a href="<?php echo $app[www] . "/" . $dbu->lookup('nama', 'action', "action='21' and id_bahasa='" . $_SESSION[bhs] . "'") . "/" . $urlx->shortLink($dtnews[nama]) . "/"; ?> "> <div class="thumb_img"><img src="<?php echo $dtnews[thumb]; ?> "></div> <div class="con_near_place"> <span><?php echo $dtnews[nama];
$appx = new app(); $dbu = new db(); $appx->load_lib('url'); $urlx = new url(); $dbu->connect(); if ($_POST['komen'] and $_POST[idc]) { $komen = strip_tags($_POST[komen]); $komen = $appx->badWord($komen); $tgl_post = date("Y-m-d H:i:s"); $idca = explode("_", $_POST[idc]); $idc = $idca[1]; $sql = "INSERT INTO " . $app[table][cekin_komen] . " (id_cekin,id_user,komen,tgl_post) VALUES('" . $idc . "','" . $_SESSION[member][id] . "','" . $komen . "','" . $tgl_post . "')"; $dbu->qry($sql); $idcek = $dbu->lookup("id", "cekin_komen", "id_user ='******'AND id_cekin='" . $idc . "' AND tgl_post ='" . $tgl_post . "' ORDER BY tgl_post desc"); $sql = "INSERT INTO " . $app[table][pengguna_feed] . " (id_user,tabel,id_tabel,keterangan,tgl_post) VALUES('" . $_SESSION[member][id] . "','" . $app[table][cekin_komen] . "','" . $idcek . "','" . $cekin[2] . "','" . $tgl_post . "')"; $dbu->qry($sql); $dkomen[nama] = $dbu->lookup("nama", "pengguna", "id ='" . $_SESSION[member][id] . "'"); $dkomen[avatar] = $appx->cekFile("/pengguna/avatar/", $_SESSION[member][ava]); $other_avatar = $app[data_www] . '/pengguna/avatar/' . $dkomen[avatar]; $other_linkAva = $app["www"] . "/" . $dbu->lookup('nama', 'action', "action='8' and id_bahasa ='" . $sBahasa . "'") . "/" . $urlx->shortLink($_SESSION[member][id]) . "/"; $fcek_in .= '<li> <div class="circle_pict circle_pict_nf"><a href="' . $other_linkAva . '"><img src="' . $other_avatar . '"></a></div> <div class="text_box_c"> <h1>' . $dkomen[nama] . '</h1> <p>' . $komen . '</p> </div> </li>'; unset($dbu); unset($appx); echo $fcek_in; }