本文整理汇总了PHP中url::shortLink方法的典型用法代码示例。如果您正苦于以下问题:PHP url::shortLink方法的具体用法?PHP url::shortLink怎么用?PHP url::shortLink使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类url
的用法示例。
在下文中一共展示了url::shortLink方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: tujuanDes
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;
}
示例2: feedCheckIn
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;
}
示例3: parseToXML
$idkota = $_GET['idkota'];
$query = "SELECT b.nama, a.gambar ,c.kategori,pos_lat, pos_long FROM " . $app[table][destinasi] . " as a LEFT JOIN " . $app[table][destinasi_bahasa] . " as b ON (a.id_reff = b.id_reff ) JOIN " . $app[table][destinasi_kategori] . " as c ON (a.id_kat=c.id) WHERE a.id_kota ='" . $idkota . "' AND a.status='aktif' ";
$dbu->query($query, $rnear, $hit_near);
$dnear = "";
if ($hit_near > 0) {
// Header File XML
header("Content-type: text/xml");
// Parent node XML
echo '<markers>';
while ($row = $dbu->fetch($rnear)) {
// Menambahkan ke node dokumen XML
echo '<marker ';
echo 'name="' . $row['nama'] . '" ';
echo 'gambar="' . $app[data_www] . "/destinasi/gambar/" . $row['gambar'] . '" ';
echo 'kategori="' . parseToXML($row['kategori']) . '" ';
echo 'button="' . $app[http] . "/" . $dbu->lookup('nama', 'action', "action='21' and id_bahasa='" . $_SESSION[bhs] . "'") . "/" . $urlx->shortLink($row['nama']) . "/" . '" ';
echo 'lat="' . $row['pos_lat'] . '" ';
echo 'lng="' . $row['pos_long'] . '" ';
echo '/>';
}
echo '</markers>';
}
function parseToXML($htmlStr)
{
$xmlStr = str_replace('<', '<', $htmlStr);
$xmlStr = str_replace('>', '>', $xmlStr);
$xmlStr = str_replace('"', '"', $xmlStr);
$xmlStr = str_replace("'", "'", $xmlStr);
$xmlStr = str_replace('&', '', $xmlStr);
$xmlStr = str_replace(" ", "", $xmlStr);
$xmlStr = str_replace("-", "", $xmlStr);
示例4:
echo $app[css_www];
?>
/images/ic_agn.png"></a>
</div>
</div>
<div class="breadcrumb"><a href="<?php
echo $app["www"] . "/" . $dbu->lookup('nama', 'action', "action='1' and id_bahasa='" . $_SESSION[bhs] . "'") . "/";
?>
">Home</a> > <a href="<?php
echo $app["www"] . "/" . $dbu->lookup('nama', 'action', "action='4' and id_bahasa='" . $_SESSION[bhs] . "'") . "/";
?>
">Forum</a> > <a href="<?php
echo $app["www"] . "/" . $dbu->lookup('nama', 'action', "action='4' and id_bahasa='" . $_SESSION[bhs] . "'") . "/article/";
?>
">Article</a> > <a href="<?php
echo $app[www] . "/" . $dbu->lookup('nama', 'action', "action='4' and id_bahasa='" . $_SESSION[bhs] . "'") . "/article/" . $urlx->shortLink($dfa[destinasi]) . "/";
?>
"><?php
echo $dfa[destinasi];
?>
</a> > <?php
echo $dfa[id];
?>
</div>
<div class="paging_thread add_fix">
<a class="add_f" href="#">Post Reply</a>
<div class="pull-right">
<ul class="pagination">
<li class="page-count">Page 1 of 411</li>
<li class="active"><a>1</a></li>
<li><a href="#">2</a></li>
示例5:
$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]) . "/";
?>
"><span><?php
echo $dforum[judul];
示例6: strtoupper
echo $dbu->lookup("thumb", "destinasi", "id='" . $rela[idchild] . "'");
?>
">
</div>
<div class="text">
<h1><?php
echo strtoupper($rela[nama]);
?>
</h1>
<p><?php
echo $rela[slogan];
?>
</p>
</div>
<a href="<?php
echo $app[www] . "/" . $dbu->lookup('nama', 'action', "action='21' and id_bahasa='" . $_SESSION[bhs] . "'") . "/" . $urlx->shortLink($rela[nama]) . "/";
?>
"><div class="explore">DETAILS</div></a>
</li>
<?php
}
?>
</ul>
</div>
<?php
}
?>
<?php
$sql = "SELECT a.nama, a.slogan, b.id as idchild FROM " . $app[table][destinasi_bahasa] . " as a LEFT JOIN " . $app[table][destinasi] . " as b ON(a.id_reff = b.id_reff) WHERE b.id_kat ='" . $desbhs[id_kat] . "' AND a.id_bahasa ='" . $_SESSION[bhs] . "' AND b.id <> '" . $desbhs[iddes] . "'";
//echo $sql;exit;
$dbu->query($sql, $rsrelated, $rsrelhit);
示例7: htmlentities
//echo $sql;
#verification mail sent
$subject = 'refreshin.co.id verification email';
$to = $email_reg;
$headers = "From: " . strip_tags("webmaster@bisnisokey.com") . "\r\n";
//$headers .= "Reply-To: ". strip_tags($p_email) . "\r\n";
//$headers .= "CC: susan@example.com\r\n";
$headers .= "MIME-Version: 1.0\r\n";
$headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n";
$message = '<html><body>';
$message .= '<img src="' . $app["http"] . "/" . $app["data_www"] . "/konfig/logo/" . $pg_config[logo] . '" alt="refreshin.co.id" title="refreshin.co.id" />';
$message .= '<table rules="all" style="border-color: #666;" cellpadding="10">';
$message .= "<tr style='background: #eee;'><td><strong>username : </strong> </td><td>" . strip_tags($nama_reg) . "</td></tr>";
$message .= "<tr><td><strong>email : </strong> </td><td>" . strip_tags($email_reg) . "</td></tr>";
$message .= "<tr><td><strong></strong>Password:</td><td>" . strip_tags($pwd_reg) . "</td></tr>";
$message .= '<tr><td><strong>click this link to verify:</strong> </td><td><a href="' . $app["http"] . "/member_verify/" . $urlx->shortLink($nama_reg) . "/" . '" target="_blank">VERIVY</a></td></tr>';
$message .= '<tr><td><strong>click this link if you never register to our website</strong> </td><td><a href="' . $app["http"] . "/member_unreg/" . $urlx->shortLink($nama_reg) . "/" . '" target="_blank">UNREG</a></td></tr>';
$message .= "<tr><td><strong> </strong> </td><td>" . htmlentities("one more step to be a family member of refreshin.co.id") . "</td></tr>";
$message .= "</table>";
$message .= "</body></html>";
//echo $message;exit;
if (mail($to, $subject, $message, $headers)) {
$_SESSION["MSGX"] = "Email Verifikasi telah Dikirim ke Email Yang Anda Daftarkan <br /> silahkan periksa email anda <br /><br /> note: jika tidak ada coba periksa di folder spam";
echo "<script type='text/javascript'>\n\t\t\t\t\t\twindow.location='" . $app["www"] . "/home/';\t\t\t\n\t\t\t\t\t</script>";
} else {
$_SESSION["MSGX"] = "maaf email verifikasi gagal terkirim !";
echo "<script type='text/javascript'>\n\t\t\t\t\t\twindow.location='" . $app["www"] . "/home/';\t\t\n\t\t\t\t\t\t</script>";
}
exit;
}
} elseif ($act == 'desfilter') {
示例8: json_encode
$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);
示例9: ON
// 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];
?>
</span>
</a>
示例10:
?>
<span class="border"></span></h1>
<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="' . $app["www"] . "/" . $dbu->lookup('nama', 'action', "action='22'") . "/" . $urlx->shortLink($dkat[kategori]) . "/" . '"><div class="bullet-cat-near' . $active . '"><img src="' . $app["data_www"] . '/destinasi_kategori/icon/' . $dkat[icon] . '"></div></a>
<span class="tip-content">' . $dkat[kategori] . '</span>
</li>';
}
?>
</ul>
</div>
<?php
while ($prop = $dbu->fetch($rsprop)) {
?>
示例11: app
$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 ='" . $_SESSION[member][id] . "'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;
}
示例12: in
<div class="content add_fix">
<div class="content_category add_fix">
<div class="tagline">
<h1>What will</h1>
<h2>Refreshin</h2>
<h3>you</h3>
</div>
<ul class="destination_category">
<?php
while ($deskat = $dbu->fetch($rskat)) {
?>
<li>
<a href="<?php
$jumlah = $dbu->count_record("id", $app[table][destinasi], "where id_kat in (select id from destinasi_kategori where kategori='" . $deskat[kategori] . "')");
if ($jumlah > 0) {
echo $app["www"] . "/" . $dbu->lookup('nama', 'action', "action='22'") . "/" . $urlx->shortLink($deskat[kategori]) . "/";
} else {
echo "javascript:valid()";
}
?>
">
<div class="title">
<span class="border"></span>
<b><?php
echo $deskat[kategori];
?>
</b>
</div>
<div class="ico_cat"><img src="<?php
echo $app["data_www"];
?>
示例13: app
<?php
include "../../application.php";
$appx = new app();
$dbu = new db();
$urlx = new url();
$dbu->connect();
$hasil = "";
if ($_POST['keyword']) {
$keyword = $_POST['keyword'];
$boldy = $keyword;
$keyword = "'%" . $keyword . "%'";
$sql = "SELECT nama FROM " . $app[table][destinasi_bahasa] . " WHERE nama LIKE {$keyword} and id_bahasa='" . $_SESSION[bhs] . "'ORDER BY nama";
//echo $sql;
$dbu->query($sql, $rs, $nr);
//echo $nr;
if ($nr) {
$hasil = '<ul id="daftar_destinasi">';
while ($results = $dbu->fetch($rs)) {
$bold = str_replace($_POST['keyword'], '<span style="font-weight:bold;color:#6475F5;">' . $boldy . "</span>", $results[nama]);
$hasil .= '<li onclick="pilihDestinasi(\'' . $results[nama] . '\',\'' . $app[www] . "/" . $dbu->lookup('nama', 'action', "action='21' and id_bahasa='" . $_SESSION[bhs] . "'") . "/" . $urlx->shortLink($results[nama]) . "/" . '\')">' . $bold . '</li>';
}
$hasil .= "</ul>";
}
echo $hasil;
unset($dbu);
unset($appx);
}
示例14: stats
<?php
$stats = new stats();
$dbu = new db();
$appx = new app();
$urlx = new url();
$stats->log_stats($rs_act["nama"], $act, $p_id, $sub, $step, $cat, $status, $tab);
$app['nopage'] = $rs_act["action"];
if (!$p_id) {
//echo "masuk";exit;
$kat = $dbu->lookup("kategori", $app[table][destinasi_kategori], "status = 'aktif' AND id_bahasa='" . $_SESSION[bhs] . "' ORDER BY kategori asc");
$p_id = $urlx->shortLink(strip_tags($kat));
header("location: {$app['www']}/" . $dbu->lookup('nama', 'action', "action='23' and id_bahasa='" . $_SESSION[bhs] . "'") . "/" . $p_id . "/");
} else {
$kat = "%" . str_replace("-", "%", $p_id) . "%";
$kat = $dbu->lookup("kategori", $app[table][destinasi_kategori], "kategori LIKE '" . $kat . "'");
}
$rkat = $dbu->get_recordset($app[table][destinasi_kategori], " status = 'aktif' AND id_bahasa = '" . $_SESSION[bhs] . "' ORDER BY kategori asc");
//echo $pid; exit;
include "fill/fill_nearby.php";
?>
示例15: app
include "../../application.php";
$appx = new app();
$appx->load_lib('url');
$dbu = new db();
$urlx = new url();
$dbu->connect();
$tnt = explode("|", $_POST[tnt]);
//print_r($tnt);exit;
$app[act] = $tnt[0];
$app[p_id] = $tnt[1];
$prop[id] = $tnt[2];
$limit = $_POST[awal];
$sql = "SELECT id, nama , thumb from " . $app[table][kota] . " where id_provinsi ='" . $prop[id] . "' order by nama asc limit " . $limit . ",8";
//echo $sql;
$dbu->query($sql, $rskota, $nrkota);
$response = '';
while ($kota = $dbu->fetch($rskota)) {
$response .= '<li>
<div class="img_box">
<img src="' . $app[data_www] . '/kota/thumb/' . $kota[thumb] . '">
</div>
<div class="text">
<h1>' . $kota[nama] . '</h1>
<p>' . $dbu->lookup('deskripsi', $app[table][kota_bahasa], "id_kota ='" . $kota[id] . "' AND id_bahasa='" . $_SESSION[bhs] . "'") . '</p>
</div>
<a href="' . $app[www] . "/" . $app[act] . "/" . $app[p_id] . "/" . $urlx->shortLink($kota[nama]) . "_" . $urlx->shortLink($dbu->lookup('nama', "provinsi", "id ='" . $prop[id] . "'")) . "/" . '"><div class="explore">EXPLORE MORE</div></a>
</li>';
}
unset($dbu);
echo $response;