本文整理汇总了PHP中paging::getPaging方法的典型用法代码示例。如果您正苦于以下问题:PHP paging::getPaging方法的具体用法?PHP paging::getPaging怎么用?PHP paging::getPaging使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类paging
的用法示例。
在下文中一共展示了paging::getPaging方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: paging
}
$pager = mysql_query("SELECT id FROM shoutbox");
$jumlah = mysql_num_rows($pager);
$limit = 20;
if (empty($_GET['offset']) and !isset($_GET['offset'])) {
$offset = 0;
} else {
$offset = int_filter($_GET['offset']);
}
$a = new paging($limit);
// Pembagian halaman dimulai
if (!isset($_GET['pg'], $_GET['stg'])) {
$_GET['pg'] = 1;
$_GET['stg'] = 1;
}
$paging = $a->getPaging($jumlah, $_GET['pg'], $_GET['stg']);
if (!empty($paging)) {
$content .= '<br><br>';
$content .= $paging;
$content .= '';
}
$content .= '<form method="post" action="#"><table style="width:100%">';
$perintah = "SELECT * FROM shoutbox ORDER BY id DESC LIMIT {$offset},{$limit}";
$hasil = mysql_query($perintah);
$no = 0;
while ($data = mysql_fetch_array($hasil)) {
$WAKTu = $data['waktu'];
$NAMA = $data['nama'];
$EMAIL = $data['email'];
$ISI = $data['isi'];
$KET = $data['ket'];
示例2: while
$tengah .= '<div class="border">';
$tengah .= "Ditemukan <b>" . $jumlah . "</b> artikel mengandung kata: <b>{$query}</b>";
$tengah .= '</div>';
$tengah .= '<div class="border">';
while ($data = $koneksi_db->sql_fetchrow($hasil2)) {
$tengah .= "<p class=\"konten\"><a href=\"?pilih=news&mod=yes&aksi=lihat&id={$data['0']}\">{$data['1']}</a><br />";
$data[5] = datetimes($data['tgl']);
$tengah .= "<span class=\"keterangan\">{$data['5']} - by : <a href=\"?pilih=news&mod=yes&aksi=pesan&id={$data['0']}\">{$data['3']}</a></span></p>";
}
$tengah .= '</div>';
if ($jumlah >= 10) {
if (empty($_GET['offset']) and !isset($_GET['offset'])) {
$offset = 0;
}
if (empty($_GET['pg']) and !isset($_GET['pg'])) {
$pg = 1;
}
if (empty($_GET['stg']) and !isset($_GET['stg'])) {
$stg = 1;
}
$tengah .= '<div class="border" style="text-align:center;">';
$tengah .= $a->getPaging($jumlah, $pg, $stg);
$tengah .= '</div>';
}
}
//akhir if $s1
if ($s1) {
$tengah .= '<div class="error">Pencarian dengan kata kunci : <b>' . $query . '</b> <br />tidak ditemukan</div>';
}
}
echo $tengah;
示例3: increment
$KETERANGAN = str_replace('\\"', '"', substr(preg_replace('#(\\>(((?>([^><]+|(?R)))*)\\<))#se', "preg_replace('#(" . $highlight_match . ")#i', '<span class=\\'pencarian\\'>\\\\1</span>', '\\0')", '>' . $KETERANGAN . '<'), 1, -1));
$dl .= '<input type="hidden" name="judul_array[]" value="' . $JUDUL . '" />';
$dl .= "<input type=\"checkbox\" name=\"links[]\" value=\"{$ID}\" style=\"border:none\" /> <b><a href='{$URL}' title='{$URL}' target='_blank'>{$JUDUL}</a></b>" . cek_baru_links($ID, $CONFIG['new_update'], 'id', $GLOBALS['tabel']['link']) . "\n<br />{$KETERANGAN}<br />\n<b>Added on:</b> {$DATE} <b>View:</b> {$HIT} <br /><br />\n";
}
mysql_free_result($hasil4);
$dl .= '<br /><a href="javascript:checkall(\'links\', \'links[]\')" title=\'Select All\'>Check All</a> ';
$dl .= '
<input type="submit" name="edit_form" value="Edit" /> <input type="submit" name="hapus_form" value="Hapus" />';
$dl .= '</form>';
$dl .= "<br /><br />";
if (!isset($pg, $stg)) {
$pg = 1;
$stg = 1;
}
$dl .= $A->getPaging($jumlah, $pg, $stg);
}
}
//end !isset edit_form
}
$admin = $keterangan;
$admin .= $dl;
echo <<<js
<script type="text/javascript">
<!-- //hide
function increment(fieldName)
{
\tdocument.getElementById(fieldName).value++;
}
all_checked = true;
function checkall(formName, boxName) {
示例4: header
$admin .= "</table>";
$admin .= "</form>";
$admin .= '</div>';
}
if ($jumlah > $maxadmindata) {
if (empty($_GET['offset']) and !isset($_GET['offset'])) {
$offset = 0;
}
if (empty($_GET['pg']) and !isset($_GET['pg'])) {
$pg = 1;
}
if (empty($_GET['stg']) and !isset($_GET['stg'])) {
$stg = 1;
}
$admin .= '<div class="border"><center>';
$admin .= $a->getPaging($jumlah, $pg, $stg);
$admin .= '</center></div>';
}
}
if ($_GET['aksi'] == "pubnews") {
global $koneksi_db;
$id = int_filter($_GET['id']);
$topik = int_filter($_GET['topik']);
$koneksi_db->sql_query("update artikel set publikasi='1' WHERE id='{$id}'");
$admin .= '<div class="error">Artikel telah di Publish</div>';
header("location:?pilih=news&mod=yes&aksi=listnews");
exit;
}
if ($_GET['aksi'] == "unpubnews") {
global $koneksi_db;
$id = int_filter($_GET['id']);
示例5: COUNT
}
$num = mysql_query("SELECT COUNT(id) as t FROM `tbl_kalender` {$query_add}");
$rows = mysql_fetch_row($num);
$jumlah = $rows[0];
mysql_free_result($num);
$a = new paging($limit);
// Pembagian halaman dimulai
if (!isset($_GET['pg'], $_GET['stg'])) {
$_GET['pg'] = 1;
$_GET['stg'] = 1;
}
$waktu_value = !isset($_GET['waktu']) ? date('Y-m-d') : $_GET['waktu'];
$content .= '<div class="border">';
$content .= '<form method="get" action="#">Waktu Mulai : <input type="text" name="waktu" value="' . $waktu_value . '" /> <input type="submit" name="submit_kal" value="cari" /><input type="hidden" name="pilih" value="calendar" /><input type="hidden" name="mod" value="yes" /><br />Format : YYYY-mm-dd / YYYY-mm / YYYY / mm-dd</form>';
$content .= '</div><br />';
$halamanpage = $a->getPaging($jumlah, $_GET['pg'], $_GET['stg']);
if (!empty($halamanpage)) {
$content .= '<div class="border">';
$content .= $halamanpage;
$content .= '</div>';
}
$query = mysql_query("SELECT * FROM `tbl_kalender` {$query_add} ORDER BY `waktu_mulai` DESC LIMIT {$offset}, {$limit}");
while ($getdata = mysql_fetch_assoc($query)) {
$content .= '<table style="border:1px solid #e1e1e1;" width="100%">
<tr>
<td width="20%"><b>' . $getdata['judul'] . '</b> <a href="admin.php?pilih=calendar&mod=yes&action=delete&id=' . $getdata['id'] . '" onclick="GP_popupConfirmMsg(\'Apakah Anda Yakin Ingin Menghapus Data Ini\')"><img src="images/delete.gif" align="middle" border="0" alt="del" /></a> <a href="admin.php?pilih=calendar&mod=yes&action=edit&id=' . $getdata['id'] . '"><img src="images/edit.gif" align="middle" border="0" alt="edit" /></a></td>
</tr>
<tr>
<td width="20%"><small>' . nl2br($getdata['isi']) . '</small></td>
</tr>
<tr>