本文整理汇总了PHP中xtable::nodata方法的典型用法代码示例。如果您正苦于以下问题:PHP xtable::nodata方法的具体用法?PHP xtable::nodata怎么用?PHP xtable::nodata使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类xtable
的用法示例。
在下文中一共展示了xtable::nodata方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: xtable
<?php
$fmod = 'golongan';
$xtable = new xtable($fmod);
$xtable->use_urut('psb_golongan');
// Query
$t = mysql_query("SELECT * FROM psb_golongan ORDER BY urut");
$xtable->ndata = mysql_num_rows($t);
$xtable->btnbar_f('add', 'updn');
if ($xtable->ndata > 0) {
// Table head
$xtable->head('Nama golongan', 'Keterangan');
while ($r = mysql_fetch_array($t)) {
$xtable->row_begin($r['replid']);
$xtable->td($r['golongan'], 200);
$xtable->td($r['keterangan']);
$xtable->opt_ud($r['replid']);
$xtable->row_end();
}
$xtable->foot();
} else {
$xtable->nodata();
}
示例2:
echo '<div class="infobox">Item yang sudah di cek : <b>'.$ncek_y.'</b> dari <b>'.$ncek.'</b> item.</div>';
} else {
echo '<div class="infobox">Semua item sebanyak <b>'.$ncek.'</b> item sudah dicek.</div>';
}
$xtable->search_box('cari barkode');
if($xtable->ndata>0){
// Table head
$xtable->head('@barkode','@judul','@Cek~C','@Waktu cek');
while($r=mysql_fetch_array($t)){$xtable->row_begin();
$t1=mysql_query("SELECT pus_buku.barkode,pus_katalog.judul FROM pus_buku LEFT JOIN pus_katalog ON pus_katalog.replid=pus_buku.katalog WHERE pus_buku.replid='".$r['buku']."'");
//echo
$r1=mysql_fetch_array($t1);
$xtable->td($r['barkode'],120);
$xtable->td(buku_judul($r['judul']));
$s='<span style="color:'.($r['cek']=='Y'?'':'#ff0000').'"><b>'.$r['cek'].'</b></span>';
$xtable->td($s,40,'c');
$d=explode(" ",$r['ts']);
if($r['cek']=='Y') $xtable->td(fftgl($d[0])." - ".$d[1],160);
else $xtable->td('-',160);
$xtable->row_end();}$xtable->foot();
}else{$xtable->nodata();}
echo '</div></td></tr>';
$fform->foot(1,0);
?>
示例3: while
$xtable->head('Pemilik file', 'Judul', 'Nama file', 'Deskripsi', 'Tanggal upload');
while ($r = mysql_fetch_array($t)) {
$xtable->row_begin();
$xtable->td($r['nadmin'], 200);
$xtable->td($r['nama'], 200);
$xtable->td($r['fname'], 200);
$xtable->td($r['keterangan']);
$xtable->td(fftgljam($r['waktu']), 200);
if (admin_isadministrator()) {
$s = '';
$s .= '<td width="60px" align="center">';
$s .= '<button class="btn" title="Download" onclick="file_download(' . $r['replid'] . ')"><div class="bi_binb"> </div></button> ';
$s .= '<button class="btn" title="Hapus" onclick="' . $fmod . '_form(\'df\',' . $r['replid'] . ')"><div class="bi_delb"> </div></button>';
$s .= '</td>';
echo $s;
} else {
$s = '';
$s .= '<td width="90px" align="center">';
$s .= '<button class="btn" onclick="file_download(' . $r['replid'] . ')"><div class="bi_bin">Download</div></button> ';
$s .= '</td>';
echo $s;
}
//$xtable->row_end();
}
?>
</table>
<form target="_blank" id="getfile" method="post" action="download.php" class="iform"><input type="hidden" id="fid" name="fid" value="0" /></form>
<?php
} else {
$xtable->nodata('', 'mengupload');
}
示例4:
if($xtable->ndata>0){
// Table head
$xtable->head('@Barkode','@!Nomor ID','@sumber','@harga~R','@Tanggal diperoleh','@Status','@lokasi','@tingkat');
while($r=mysql_fetch_array($t)){$xtable->row_begin($r['replid']);
$xtable->td($r['barkode']);
$xtable->td($r['idbuku'],120);
//$xtable->td($r['callnumber'],120);
$xtable->td($r['sumber']==0?'Beli':'Pemberian',100);
$xtable->td($r['satuan'].' '.$r['harga'],80,'r');
$xtable->td(fftgl($r['tanggal']),120);
if($r['status']==1){
$s='Tersedia';
} else {
$s='<table cellspacing="0" cellpadding="0" width="100%"><tr>';
$s.='<td style="border:none"><span class="sfont">Dipinjam</span></td>';
$s.='<td style="border:none" width="24px" align="right"><button title="Tampilkan info peminjam" class="btn"><div class="bi_usr2b"> </div></button></td>';
$s.='</tr></table>';
$s='Dipinjam';
}
//$xtable->td($s,100);
//echo '<td style="width:100px;text-align:left">'.$s.'</td>';
$xtable->td($s,100);
$xtable->td($r['nlokasi'],150);
$xtable->td($r['ntingkat'],120);
if($SOUF==0) $xtable->opt_ud($r['replid']);
}$xtable->foot();
}else{$xtable->nodata('','pada lokasi ini');}
?>
示例5: while
$db->where("kategorirek='{$kat}'");
}
$t = $db->query();
$xtable->ndata = mysql_num_rows($t);
$t = $db->query($xtable->pageorder_sql('kode', 'nama'));
$xtable->btnbar_f('add');
if ($xtable->ndata > 0) {
// Table head
$xtable->head('@Kode{C}', '@Rekening', 'Keterangan');
$lkat = 0;
while ($r = mysql_fetch_array($t)) {
$kr = substr($r['kode'], 0, 1);
if ($lkat != $r['kategorirek'] && $kat == 0) {
$l = strlen($r['kode']) - 1;
$xtable->row_begin();
$xtable->td('<b>' . sprintf($kr . "%0" . $l . "d", 0) . '</b>', 100, 'c');
$xtable->td('<b>' . kategorirek_name($r['kategorirek']) . '</b>', 250);
$xtable->td();
$xtable->td();
}
$xtable->row_begin();
$xtable->td($r['kode'], 100, 'c');
$xtable->td($r['nama'], 250);
$xtable->td(nl2br($r['keterangan']));
$xtable->opt_ud($r['replid']);
$lkat = $r['kategorirek'];
}
$xtable->foot();
} else {
$xtable->nodata('', $kat == 0 ? "" : "pada kategori rekening " . strtolower($kategorirek[$kat]));
}