当前位置: 首页>>代码示例>>PHP>>正文


PHP db::lookup方法代码示例

本文整理汇总了PHP中db::lookup方法的典型用法代码示例。如果您正苦于以下问题:PHP db::lookup方法的具体用法?PHP db::lookup怎么用?PHP db::lookup使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在db的用法示例。


在下文中一共展示了db::lookup方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: 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;
    }
开发者ID:salomay,项目名称:refreshin,代码行数:55,代码来源:feed.php

示例2: 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;
}
开发者ID:salomay,项目名称:refreshin,代码行数:59,代码来源:coretan_destinasi.php

示例3: app

<?php

include "../../application.php";
$appx = new app();
$dbu = new db();
$dbu->connect();
if ($_POST['cast']) {
    $cekin = explode("-", $_POST['cast']);
    $tgl_post = date("Y-m-d H:i:s");
    $sql = "INSERT INTO " . $app[table][cekin] . " (id_destinasi,id_user,tipe,tgl_post) VALUES('" . $cekin[0] . "','" . $cekin[1] . "','" . $cekin[2] . "','" . $tgl_post . "')";
    $dbu->qry($sql);
    $idcek = $dbu->lookup("id", "cekin", "id_user ='" . $_SESSION[member][id] . "' 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('" . $cekin[1] . "','" . $app[table][cekin] . "','" . $idcek . "','" . $cekin[2] . "','" . $tgl_post . "')";
    $dbu->qry($sql);
    unset($dbu);
    unset($appx);
    echo ".";
}
开发者ID:salomay,项目名称:refreshin,代码行数:18,代码来源:cekotw.php

示例4:

    <span class="ion-information-circled">
	</span> information</div>
    <div class="box-content" style="vertical-align:center;">
          <?php 
    echo $_SESSION["msg"];
    ?>
    </div>
    </div>
  <?php 
}
$_SESSION['msg'] = "";
$_SESSION['alt'] = "";
//print_r($app[me]);
?>
  <h2>Merubah <span class="label label-primary">Data Komunitas </span> "<?php 
echo $dbu->lookup("nama", "komunitas", "id ='" . $form[id] . "'");
?>
"</h2>
  <br/> 
<form method="post" enctype="multipart/form-data">
<div>
	<?php 
$sql = "SELECT id, nama from " . $app[table][kota] . " where status = 'aktif' ORDER BY nama asc";
//echo $sql;
$dbu->query($sql, $rsp, $nrp);
?>
	<div>pilih destinasi</div>
	<div>
	<select name="p_destinasi" id="p_destinasi" >
		<?php 
while ($frsp = $dbu->fetch($rsp)) {
开发者ID:salomay,项目名称:refreshin,代码行数:31,代码来源:tmp_update.php

示例5: array

    ?>
"><span class="ion-information-circled"></span> information</div>
    <div class="box-content" style="vertical-align:center;">
          <?php 
    echo $_SESSION["msg"];
    ?>
    </div>
    </div>
  <?php 
}
$_SESSION['msg'] = "";
$_SESSION['alt'] = "";
//print_r($rshasil);
?>
  <h2>Daftar <span class="label label-primary">Rute Destinasi</span> <?php 
echo $dbu->lookup("nama", "destinasi_bahasa", "id_reff ='" . $dbu->lookup("id_reff", "destinasi", "id='" . $p_id . "'") . "'");
?>
</h2>
  <br/> 
  <div class="table_filter" style="text-align:center;">
    <?php 
$array = array();
for ($i = 65; $i < 91; $i++) {
    $array[] = chr($i);
}
echo '<a href="index.php?act=browse&p_id=' . $p_id . '">#</a> &nbsp;';
foreach ($array as $k => $v) {
    echo '<a href="index.php?act=browse&p_id=' . $p_id . '&abjad=$v">' . $v . '</a> &nbsp;';
}
?>
   </div>
开发者ID:salomay,项目名称:refreshin,代码行数:31,代码来源:tmp_browse.php

示例6: db

echo $tampil->tampilkan_header('main');
echo $tampil->tampilkan_menu('main');
$dbu = new db();
$appx = new app();
$urlx = new url();
?>
<body >
	<div class="wrapall">
		<div class="wrapcontent">
			<div class="content add_fix">
				<div class="box-left-right add_fix">
					<div class="content_left thread_section">
						<div class="head_nf">
							<ul>
								<li><a href="<?php 
echo $app["www"] . "/" . $dbu->lookup('nama', 'action', "action='4' and id_bahasa='" . $_SESSION[bhs] . "'") . "/article/";
?>
">ARTICLE</a></li>
								<li><a href="<?php 
echo $app["www"] . "/" . $dbu->lookup('nama', 'action', "action='4' and id_bahasa='" . $_SESSION[bhs] . "'") . "/trip/";
?>
">TRIP</a></li>
								<li class="active"><a href="<?php 
echo $app["www"] . "/" . $dbu->lookup('nama', 'action', "action='4' and id_bahasa='" . $_SESSION[bhs] . "'") . "/store/";
?>
">STORE</a></li>
							</ul>
							<div class="box_ic_nf">
								<a class="ic_nf" href="#"><img src="<?php 
echo $app[css_www];
?>
开发者ID:salomay,项目名称:refreshin,代码行数:31,代码来源:fill_thread_store.php

示例7:

*******************************************************************************/
if ($act == "add") {
    $admlib->set_aktip("geocms_bhs");
    $admlib->validate('geol_add');
    $formix->init();
    if ($step == 1) {
        $formix->populate($form);
        include "tmp_add.php";
        exit;
    }
    if ($step == 2) {
        $formix->serialize_form();
        $formix->validate('', 'p_bahasa');
        // $formix->validate('email', "p_email");
        ## check duplicate ID
        $nama = $dbu->lookup("id", "bahasa", "id ='" . $p_idbhs . "'");
        if ($nama) {
            $_SESSION['msg'] .= "ID bahasa {$p_bahasa} sudah terpakai untuk ID bahasa negara lain <br/>";
            $_SESSION['alt'] = "warning";
        }
        ## check duplicate bahasa
        $nama = $dbu->lookup("bahasa", "bahasa", "bahasa ='" . $p_bahasa . "' AND id_negara ='" . $p_negara . "'");
        if ($nama) {
            $_SESSION['msg'] .= "Nama {$p_bahasa} sudah terpakai untuk negara lain <br/>";
            $_SESSION['alt'] = "warning";
        }
        ## check duplicate negara
        $nama = $dbu->lookup("id_negara", "bahasa", "id_negara ='" . $p_negara . "'");
        if ($nama) {
            $_SESSION['msg'] .= "Negara " . $dbu->lookup("nama", "negara", "id ='" . $p_negara . "'") . " Sudah Memiliki bahasa terdaftar <br/>";
            $_SESSION['alt'] = "warning";
开发者ID:salomay,项目名称:refreshin,代码行数:31,代码来源:index.php

示例8: db

<?php

session_start();
$dbu = new db();
$urlx = new url();
?>

<div class="wrapheader">
			<div class="header">
				<div class="search_box">
					<input type="text" id="katakunci" placeholder="Search your destination...">
					<input type="submit" id="cari_search" value="">
				</div>
				<div id="hasilcari"></div>
				<a href="<?php 
echo $app["www"] . "/" . $dbu->lookup('nama', 'action', "action='23' and id_bahasa='" . $_SESSION[bhs] . "'") . "/";
?>
" class="nearby_link"><span>Nearby Place</span></a>
				<?php 
if ($_SESSION[member][id] != "") {
    ?>
				<div class="circle_pict ava_head">
					<a href="#"><img src="<?php 
    echo $app[data_www];
    ?>
/pengguna/avatar/<?php 
    echo $_SESSION[member][ava];
    ?>
"></a>
				</div>
				<div class="box_account">
开发者ID:salomay,项目名称:refreshin,代码行数:31,代码来源:header_main_part.php

示例9: 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);
开发者ID:salomay,项目名称:refreshin,代码行数:31,代码来源:locationDestinasi.php

示例10: stats

<?php

$stats = new stats();
$dbu = new db();
$stats->log_stats($rs_act["nama"], $act, $p_id, $sub, $step, $cat, $status, $tab);
$app['nopage'] = $rs_act["action"];
if ($p_id != "") {
    $berita = explode("_", $p_id);
    $sql = "UPDATE " . $app[table][berita] . " SET hit = hit + 1 WHERE id ='" . $berita[1] . "'";
    $dbu->qry($sql);
    $sql = "SELECT a.id, a.id_reff, a.ket_id, b.username , a.tgl_post , c.sinopsis, c.judul, c.isi, c.gambar  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='" . $berita[1] . "'";
    //echo $sql;exit;
    $dnews = $dbu->get_recordmix($sql);
    include "fill/fill_news_detail.php";
} else {
    header("location:" . $app["www"] . "/" . $dbu->lookup('nama', 'action', "action='1' and id_bahasa ='" . $_SESSION[bhs] . "'") . "/");
}
unset($dbu);
开发者ID:salomay,项目名称:refreshin,代码行数:18,代码来源:coretan_news_detail.php

示例11: usrlib

$tampil = new usrlib();
echo $tampil->tampilkan_doctype('main');
echo $tampil->tampilkan_header('main');
echo $tampil->tampilkan_menu('main');
$dbu = new db();
$appx = new app();
$urlx = new url();
?>
		<div class="wrapcontent">
			<div class="content add_fix">
				<div class="box-left-right add_fix">
					<div class="content_left thread_section">
						<div class="head_nf">
							<ul>
								<li class="active"><a href="<?php 
echo $app["www"] . "/" . $dbu->lookup('nama', 'action', "action='4' and id_bahasa='" . $_SESSION[bhs] . "'") . "/article/";
?>
">ARTICLE</a></li>
								<li><a href="<?php 
echo $app["www"] . "/" . $dbu->lookup('nama', 'action', "action='4' and id_bahasa='" . $_SESSION[bhs] . "'") . "/trip/";
?>
">TRIP</a></li>
								<li><a href="<?php 
echo $app["www"] . "/" . $dbu->lookup('nama', 'action', "action='4' and id_bahasa='" . $_SESSION[bhs] . "'") . "/store/";
?>
">STORE</a></li>
							</ul>
							<div class="box_ic_nf">
								<a class="ic_nf" href="#"><img src="<?php 
echo $app[css_www];
?>
开发者ID:salomay,项目名称:refreshin,代码行数:31,代码来源:fill_thread_article_detail.php

示例12: app

<?php

include "../../application.php";
$appx = new app();
$appx->load_lib('url');
$dbu = new db();
$urlx = new url();
$dbu->connect();
$cast = $_POST['cast'];
$cast = $app[www] . "/" . $dbu->lookup('nama', 'action', "action='2' and id_bahasa='" . $_SESSION[bhs] . "'") . "{$cast}";
unset($appx);
unset($dbu);
unset($urlx);
echo $cast;
开发者ID:salomay,项目名称:refreshin,代码行数:14,代码来源:loadDestinasi.php

示例13: url

<?php

$urlx = new url();
$dbu = new db();
?>
<script src="<?php 
echo $app["lib_www"];
?>
/js/basic.js"></script>
<div class="wrapfooter add_fix">
			<p>Copyright © 2015 All Rights Reserved.</p>
			<div class="secondary_menu">
				<ul>
					<li><a href="<?php 
echo $app["www"] . "/" . $dbu->lookup('nama', 'action', "action='13' and id_bahasa='" . $_SESSION[bhs] . "'") . "/";
?>
">FAQ</a></li>
					<li><a href="<?php 
echo $app["www"] . "/" . $dbu->lookup('nama', 'action', "action='12' and id_bahasa='" . $_SESSION[bhs] . "'") . "/";
?>
">Privacy Policy</a></li>
					<li><a href="<?php 
echo $app["www"] . "/" . $dbu->lookup('nama', 'action', "action='11' and id_bahasa='" . $_SESSION[bhs] . "'") . "/";
?>
">Contact Us</a></li>
					<li><a href="<?php 
echo $app["www"] . "/" . $dbu->lookup('nama', 'action', "action='10' and id_bahasa='" . $_SESSION[bhs] . "'") . "/";
?>
">About Us</a></li>
				</ul>
			</div>
开发者ID:salomay,项目名称:refreshin,代码行数:31,代码来源:footer_main_part.php

示例14: 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>
开发者ID:salomay,项目名称:refreshin,代码行数:31,代码来源:block_related_news.php

示例15:

				</div>
				<div class="box-left-right add_fix">
					<div class="content_left community_section">
						<div class="head_nf head_nf_community">
							<ul>
								<li class="active"><a href="#">ACTIVITY</a></li>
								<li><a href="#">TRIP</a></li>
								<li><a href="#">FRIENDS</a></li>
								<li><a href="#">PHOTO</a></li>
							</ul>
							<?php 
if ($dprof[id] != $_SESSION[member][id]) {
    #DEFAULT -> FOLLOW
    $foll = '<a href="#" id="cfollow" rel="follow_' . $dprof[id] . '" class="join_community">FOLLOW</a>';
    #CEK APPROVED FOLLOW -> UNFOLLOW
    $follx = $dbu->lookup("status", $app[table][daftar_teman], "id_user = '" . $_SESSION[member][id] . "' AND id_teman ='" . $dprof[id] . "' AND approved = 'Y'");
    if ($follx != "") {
        $foll = '<a href="#" id="cfollow" rel="unfollow_' . $dprof[id] . '" class="join_community">UNFOLLOW</a>';
    }
    #CEK NOT APPROVED YET
    $follx = $dbu->lookup("status", $app[table][daftar_teman], "id_user = '" . $_SESSION[member][id] . "' AND id_teman ='" . $dprof[id] . "' AND approved = 'N'");
    if ($follx != "") {
        $foll = '<a class="join_community">WAITING FOR APPROVAL</a>';
    }
}
#LINK FOLLOW / UNFOLLOW / WAIT 4 APPROVAL
echo $foll;
?>
						</div>
							<div class="box_itm_newsfeed add_fix">
								<?php 
开发者ID:salomay,项目名称:refreshin,代码行数:31,代码来源:fill_profil.php


注:本文中的db::lookup方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。