當前位置: 首頁>>代碼示例>>PHP>>正文


PHP db::get_record方法代碼示例

本文整理匯總了PHP中db::get_record方法的典型用法代碼示例。如果您正苦於以下問題:PHP db::get_record方法的具體用法?PHP db::get_record怎麽用?PHP db::get_record使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在db的用法示例。


在下文中一共展示了db::get_record方法的9個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: db

 function display_block_sosmedia($model = '')
 {
     global $app;
     $dbu = new db();
     $config = $dbu->get_record("configuration", "id", 1);
     if (!$model) {
         include "{$app['path']}/bagian/bag_sosmedia.php";
     } else {
         include "{$app['path']}/bagian/bag_sosmedia_" . $model . ".php";
     }
 }
開發者ID:salomay,項目名稱:refreshin,代碼行數:11,代碼來源:usrlib.php

示例2: header

*******************************************************************************/
if ($act == "set_hot") {
    $admlib->validate('tour_edit');
    $dbu->set_hot("berita", "id", $p_id, $hot, "hit");
    $_SESSION['msg'] = "status hot destinasi berhasil di update ....";
    $_SESSION['alt'] = "info";
    header("location: " . $urlx->get_referer());
}
/*******************************************************************************
* Action : view
*******************************************************************************/
if ($act == "view") {
    $admlib->validate('tour_view');
    $admlib->set_aktip("tourcms_destinasi");
    $formix->init();
    $page = $dbu->get_record("destinasi", "id", $p_id);
    $form = $page;
    $formix->populate($form);
    include "tmp_view.php";
    exit;
}
/*******************************************************************************
* Action : add
*******************************************************************************/
if ($act == "add") {
    $admlib->set_aktip("tourcms_destinasi");
    $admlib->validate('tour_add');
    $formix->init();
    if ($step == 1) {
        $formix->populate($form);
        //print_r($app[me]);
開發者ID:salomay,項目名稱:refreshin,代碼行數:31,代碼來源:index.php

示例3: stats

<?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";
開發者ID:salomay,項目名稱:refreshin,代碼行數:16,代碼來源:coretan_community_detail.php

示例4: app

<?php

include "../application.php";
$appx = new app();
$appx->load_lib('stats', 'url', 'msg', 'form', 'nav', 'file', 'admlib', 'usrlib');
## START #######################################################################
$appx->set_default($act, '');
$appx->set_default($step, 1);
$admlibx = new admlib();
$dbu = new db();
$formix = new form();
$msgx = new msg();
$dbu->connect();
if ($act == "" || $act == 'traveler_friend') {
    $formix->populate($form);
    $pgconfig = $dbu->get_record("konfig", "id", 1);
    if ($_SESSION['adminsession']) {
        header("location: {$app['webmin']}/index.php?act=home");
    } elseif ($_SESSION['membersession']) {
        header("location: {$app['webmin']}/index.php?act=member");
    } else {
        include "dsp_login.php";
    }
    exit;
}
/*******************************************************************************
* login
* gambaran : validasi login
*******************************************************************************/
if ($act == "login") {
    $formix->init();
開發者ID:salomay,項目名稱:refreshin,代碼行數:31,代碼來源:index.php

示例5: db

 function get_top_parent($id, &$parent)
 {
     global $app;
     // $appx = new app();
     $dbu = new db();
     $adminlib = new admlib();
     $data = $dbu->get_record('product_parent', 'id', $id);
     $parent[] = $data['name'];
     if ($data['parent_id'] != 0) {
         $admlib->get_top_parent($data['parent_id'], $parent);
     } else {
         $parent = array_reverse($parent);
         $parent = implode(" => ", $parent);
     }
     return $parent;
 }
開發者ID:salomay,項目名稱:refreshin,代碼行數:16,代碼來源:admlib.php

示例6: set_lang

 function set_lang($model = '')
 {
     global $app;
     if (!$model) {
         $config = db::get_record("configuration", "id", 1);
         $bahasa = $config[default_lang];
     } else {
         if ($model == "eng") {
             $bahasa = "ina";
         } elseif ($model == "ina") {
             $bahasa = "eng";
         }
         //$app[bahasa] = $model;
     }
     return $bahasa;
 }
開發者ID:salomay,項目名稱:refreshin,代碼行數:16,代碼來源:app.php

示例7:

						</li>
						<?php 
}
?>
					</ul>
					<img class="bg_destination_category" src="<?php 
echo $app["css_www"];
?>
/img/bg-destination-category.jpg">
				</div><!-- /.content_category -->
				<div class="latest_update add_fix">
					<h1>Latest Update<span class="border"></span></h1>
					<ul class="update_list add_fix">
						<?php 
while ($rsnew = $dbu->fetch($rstip)) {
    $newskat = $dbu->get_record('berita_kategori', "id='" . $rsnew[id_kat] . "' and id_bahasa='id'");
    $newsbhs = $dbu->get_record('berita_bahasa', "id_berita='" . $rsnew[id] . "' and id_bahasa='id'");
    ?>
							<li>
							<a href="<?php 
    echo $app["www"] . "/" . $dbu->lookup('nama', 'action', "action='51'") . "/" . $urlx->shortLink($newsbhs[judul]) . "_" . $rsnew[id] . "/";
    ?>
">

								<div class="img_box">
									<div class="icon"><img src="<?php 
    echo $app["data_www"];
    ?>
/berita/icon/<?php 
    echo $newskat[icon];
    ?>
開發者ID:salomay,項目名稱:refreshin,代碼行數:31,代碼來源:fill_home.php

示例8: stats

<?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='" . $idnya . "' 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";
開發者ID:salomay,項目名稱:refreshin,代碼行數:24,代碼來源:coretan_profil.php

示例9: msg

$msgx = new msg();
$urlx = new url();
$filex = new file();
$appx->set_default($act, 'update');
$appx->set_default($step, 1);
$dbu->connect();
$admlib->validate("sett");
/*******************************************************************************
* Action : change
*******************************************************************************/
if ($act == "update") {
    $admlib->validate('sett_edit,sett_add');
    $formix->init();
    if ($step == "1") {
        $admlib->set_aktip("sett_configbhs");
        $config = $dbu->get_record("konfig", "id", 1);
        $form = $config;
        $formix->populate($form);
        include "tmp_config.php";
        exit;
    }
    if ($step == "2") {
        $formix->serialize_form();
        $formix->validate('', 'p_judul,p_judul_cms,p_domain');
        if ($formix->is_error()) {
            $msgx->build_msg();
            header("location: index.php?act=update&error=1&referer=" . $urlx->get_referer());
            exit;
        }
        $data = $dbu->get_record("konfig", "id", 1);
        $id = rand(1, 999) . date("dmYHis");
開發者ID:salomay,項目名稱:refreshin,代碼行數:31,代碼來源:index.php


注:本文中的db::get_record方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。