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


PHP paging::simple方法代碼示例

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


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

示例1: intval

            }
        }
        $hook->redirect($refresh);
    } else {
        $hook->redirect($refresh);
    }
} else {
    $tpl->setfile(array('body' => 'member.tpl'));
    $cond = " active=0";
    $cat = $oClass->view($cond);
    $total = $cat->num_rows();
    $orderby = "timestamp DESC";
    $start = LIMIT * intval($_GET['page']);
    $url = './?mod=' . $system->module . '&parentid=' . intval($_GET['parentid']) . '&type=' . intval($_GET['type']);
    $dp = new paging($url, $total, LIMIT);
    $request['divpage'] = $dp->simple();
    $cat = $oClass->view($cond, $start, LIMIT, $orderby);
    while ($rs = $cat->fetch()) {
        //$rs['delete'] = $rs['is_admin']?'':'style="display: inline;"';
        $rs['checked'] = $rs['active'] ? 'checked' : '';
        $rs['avatar'] = $rs['avatar'] ? '<a href="' . _UPLOAD . $rs['avatar'] . '" class="divbox"><img src="' . _UPLOAD . $rs['avatar'] . '" width="30" height="30" /></a>' : '';
        $tpl->assign($rs, 'user');
    }
    $breadcrumb->reset();
    $menu = explode('.', $_SESSION['cms_menu']);
    $breadcrumb->assign("", $MenuName[$menu[0]]);
    $level = $MenuLink[$menu[0]][$menu[1]];
    $breadcrumb->assign($level['link'], $level['name']);
}
$request['breadcrumb'] = $breadcrumb->parse();
$tpl->assign($request);
開發者ID:ngukho,項目名稱:mvc-cms,代碼行數:31,代碼來源:action.viewinactive.php

示例2: intval

*/
$limit = 30;
$start = $limit * intval($request['page']);
$featuredon = $request['id'];
if ($pro['featuredon']) {
    $tmp = explode(',', $pro['featuredon']);
    $tmp[] = $request['id'];
    $featuredon = implode(',', $tmp);
}
$cond = " c.catid = " . $request['catid'] . " AND c.id NOT IN(" . $featuredon . ")";
$result = $oClass->view($request['type'], $request['catid'], NULL, $cond);
$total = $result->num_rows();
$result = $oClass->view($request['type'], $request['catid'], NULL, $cond, $start, $limit);
while ($rs = $result->fetch()) {
    $rs = $hook->format($rs);
    $tpl->assign($rs, 'product');
}
$dP = new paging($_SERVER['QUERY_STRING'], $total, $limit);
$request['divpage'] = $dP->simple(5);
$featuredon = 0;
if ($pro['featuredon']) {
    $tmp = explode(',', $pro['featuredon']);
    $featuredon = implode(',', $tmp);
}
$result = $oClass->view($request['type'], -1, NULL, " c.id IN(" . $featuredon . ")");
while ($rs = $result->fetch()) {
    $rs = $hook->format($rs);
    $tpl->assign($rs, 'current');
}
$request['breadcrumb'] = $breadcrumb->parse();
$tpl->assign($request);
開發者ID:ngukho,項目名稱:mvc-cms,代碼行數:31,代碼來源:action.featureon.php


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