本文整理汇总了PHP中xtable::use_db方法的典型用法代码示例。如果您正苦于以下问题:PHP xtable::use_db方法的具体用法?PHP xtable::use_db怎么用?PHP xtable::use_db使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类xtable
的用法示例。
在下文中一共展示了xtable::use_db方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: xtable
}
$PSBar->end();
if ($PSBar->pass) {
if ($opt == 'af' || $opt == 'uf') {
require_once VWDIR . 'siswa_form.php';
} else {
$xtable = new xtable($fmod, 'siswa');
$xtable->search_keyon('nis=>aka_siswa.nis:EQ', 'nama=>aka_siswa.nama:LIKE');
$xtable->docname = "Data Siswa Angkatan " . angkatan_name($angk);
$xtable->printparams = array('angkatan' => angkatan_name($angk));
// Query
$db = new xdb("aka_siswa");
$db->field("aka_siswa:replid,nis,nisn,nama,tmplahir,tgllahir");
$db->where_and("aka_siswa.angkatan='{$angk}'");
$db->where_and($xtable->search_sql_get());
$t = $xtable->use_db($db, $xtable->pageorder_sql('nis', 'nisn', 'nama'));
$xtable->btnbar_f('print', 'srcbox');
if ($xtable->ndata > 0) {
// Table head
$xtable->head('@!NIS', '@!NISN', '@nama', 'Tempat Tanggal lahir', '{50px}');
while ($r = mysql_fetch_array($t)) {
$xtable->row_begin();
$xtable->td($r['nis'], 80);
$xtable->td($r['nisn'], 120);
$xtable->td($r['nama']);
$xtable->td($r['tmplahir'] . ', ' . fftgl($r['tgllahir']), 100);
//$s='<button class="btn" title="Keluarkan siswa dari kelas ini." onclick="siswa_form(\'df\',\''.$r['replid'].'\')"><div class="bi_canb"> </div></button>';
$xtable->opt($r['replid'], 'v');
$xtable->row_end();
}
$xtable->foot();
示例2: iSelect
$lokasi = lokasi_r($lok);
$PSBar = new PSBar_2();
// Page selection bar
$PSBar->begin();
if (count($lokasi) > 0) {
$PSBar->selection('lokasi', iSelect('lokasi', $lokasi, $lok, $PSBar->selws, $fmod . "_get()"));
} else {
$PSBar->end();
hiddenval('lokasi', $lok);
lokasi_warn();
exit;
}
$PSBar->end();
// Query
$db = new xdb("sar_grup", "", "lokasi='{$lok}'");
$t = $xtable->use_db($db, $xtable->pageorder_sql('kode', 'nama'));
$xtable->btnbar_begin();
$xtable->btnbar_add();
echo '<div class="sfont" style="float:right;margin-top:4px">Total aset: ' . fRp(lokasi_aset($lok)) . '</div>';
$xtable->btnbar_end();
if ($xtable->ndata > 0) {
// Table head
$xtable->head('@kode', '@nama Grup barang', 'Jumlah unit~C', 'Unit tersedia~C', 'Unit dipinjam~C', 'Total aset~R', 'Keterangan');
$nom = 1;
while ($r = mysql_fetch_array($t)) {
$xtable->row_begin($r['replid']);
$n = mysql_num_rows(mysql_query("SELECT replid FROM sar_barang WHERE grup='" . $r['replid'] . "'"));
$xtable->td($r['kode'], 100);
$xtable->td($r['nama'], 200);
$xtable->td($n, 100, 'c');
$xtable->td(0, 100, 'c');
示例3: gpost
$xtable->noopt = true;
$lok = gpost('lokasi');
$grup = gpost('grup');
$kat = $cid;
hiddenval('lokasi', $lok);
hiddenval('grup', $grup);
hiddenval('katalog', $kat);
if ($opt == 'af' || $opt == 'uf') {
require_once VWDIR . 'katalog_form.php';
} else {
// Katalog Query
$tk = mysql_query("SELECT * FROM sar_katalog WHERE replid='{$cid}'");
$rk = mysql_fetch_array($tk);
// Query
//$sql="SELECT * FROM sar_barang WHERE katalog='$cid'";
$t = $xtable->use_db(new xdb("sar_barang", "", "katalog='{$cid}'"), $xtable->pageorder_sql('kode', 'barkode', 'kondisi'));
$xtable->btnbar_f(iBtn('Grup barang', 'bi_arrow', 'title="Kembali ke grup barang" onclick="katalog_unit_back()"'));
hiddenval('opf', 'uni');
hiddenval('kondisi_1', mysql_num_rows(mysql_query("SELECT replid FROM sar_barang WHERE katalog='{$cid}' AND kondisi='1'")));
hiddenval('kondisi_2', mysql_num_rows(mysql_query("SELECT replid FROM sar_barang WHERE katalog='{$cid}' AND kondisi='2'")));
hiddenval('kondisi_3', mysql_num_rows(mysql_query("SELECT replid FROM sar_barang WHERE katalog='{$cid}' AND kondisi='3'")));
hiddenval('kondisi_4', mysql_num_rows(mysql_query("SELECT replid FROM sar_barang WHERE katalog='{$cid}' AND kondisi='4'")));
?>
<div class="tbltopmbar" style="float:left;margin-top:10px;margin-bottom:10px">
<table class="stable" cellspacing="0" cellpadding="0" width="100%"><tr valign="top">
<td width="400px">
<table class="stable" cellspacing="0" cellpadding="0">
<tr height="24px"><td colspan="2"><b>Informasi Barang :</b></td></tr>
<tr height="24px"><td width="140px">Nama barang:</td><td><?php
echo $rk['nama'];
?>
示例4: iSelect
$lokasi = lokasi_r($lok);
$PSBar = new PSBar_2();
// Page selection bar
$PSBar->begin();
if (count($lokasi) > 0) {
$PSBar->selection('lokasi', iSelect('lokasi', $lokasi, $lok, $PSBar->selws, $fmod . "_get()"));
} else {
$PSBar->end();
hiddenval('lokasi', $lok);
lokasi_warn();
exit;
}
$PSBar->end();
// Query
$db = new xdb("sar_aktivitas", "", "lokasi='{$lok}'");
$t = $xtable->use_db($db, $xtable->pageorder_sql('tanggal1'));
$xtable->btnbar_f('add');
if ($xtable->ndata > 0) {
// Table head
$xtable->head('@Tanggal', 'Aktivitas', 'Keterangan');
while ($r = mysql_fetch_array($t)) {
$xtable->row_begin();
$xtable->td(fftgl($r['tanggal1']) . ' - ' . fftgl($r['tanggal2']), 200);
$xtable->td(nl2br($r['aktivitas']), 250);
$xtable->td(nl2br($r['keterangan']));
$xtable->opt_ud($r['replid']);
$xtable->row_end();
}
$xtable->foot();
} else {
$xtable->nodata();
示例5: xtable
<?php
$fmod = 'departemen';
$xtable = new xtable($fmod);
// Query
$t = $xtable->use_db(new xdb("departemen"), $xtable->pageorder_sql('nama', 'alamat', 'telepon'));
$xtable->btnbar_f('add');
if ($xtable->ndata > 0) {
// Table head
$xtable->head('@Nama Departemen', '@Alamat', '@Telepon');
while ($r = mysql_fetch_array($t)) {
$xtable->row_begin($r['replid']);
$xtable->td($r['nama'], 200);
$xtable->td(nl2br($r['alamat']));
$xtable->td($r['telepon'], 150);
/*
$q=mysql_query("SELECT LENGTH(photo) AS psize FROM departemen WHERE replid='".$r['replid']."'");
$h=mysql_fetch_array($q);
if($h['psize']>0){
$p='<img src="photo/$.php?id='.$r['replid'].'" width="100px"/>';
}else{
$p='';
}
*/
//$xtable->td('',150,'c');
$xtable->opt_ud($r['replid']);
$xtable->row_end();
}
$xtable->foot();
} else {
$xtable->nodata();