本文整理匯總了PHP中Page::getCurrent方法的典型用法代碼示例。如果您正苦於以下問題:PHP Page::getCurrent方法的具體用法?PHP Page::getCurrent怎麽用?PHP Page::getCurrent使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Page
的用法示例。
在下文中一共展示了Page::getCurrent方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: defshow
public function defshow()
{
$this->pageinfo();
include _APP_PATH . "libs/adodb/adodb-pager1.inc.php";
$this->result["sites"]["contents"] = "active";
if ($this->mPur->adminCheck("PW_BLOG", "1") == false) {
sysMsg("非法授權頁麵,請與管理員聯係");
}
$sql = "SELECT post_title,ID,post_date,post_modified,flag FROM wp_posts WHERE post_status='publish' ORDER BY post_modified DESC";
$pager = new Page();
$get_page = is_numeric($_GET["page"]) ? $get_page : 1;
$pagesize = $_GET["pagesize"] ? $_GET["pagesize"] : $size;
$pager->Page($key = '', $pagesize, $groupsize = 0, $current = $get_page);
$pager->execute($this->mDb, $sql);
$pages['link'] = $pager->pageLinks();
$pages['frontlink'] = $pager->searchlinks();
$pages['fromto'] = $pager->fromto();
$pages['total'] = $pager->getTotalpage();
$pages['current'] = $pager->getCurrent();
$pages['totalnum'] = $pager->getTotalnum();
$pages['jump'] = $pager->jump();
$pages['pagenum'] = $pagesize;
$rs = $pager->getResult();
$r["logs"] = $rs;
$r["pages"] = $pages;
$this->result["logs"] = $r["logs"];
$this->result["pages"] = $r["pages"];
$this->tplname = 'admin/blog';
$this->mLog->adminLog("查看博文管理列表");
}
示例2: getList
public function getList($size = _PAGES)
{
$sql = "SELECT * FROM " . get_table("asks");
if ($_GET["title"]) {
$sqlv[] = " (title LIKE '%" . $_GET["title"] . "%') ";
}
if ($sqlv) {
$sql .= " WHERE " . implode("AND", $sqlv);
}
//$sql .=" ORDER BY $order";
//echo $sql;
$pager = new Page();
$get_page = is_numeric($_GET["page"]) ? $get_page : 1;
$pagesize = $_GET["pagesize"] ? $_GET["pagesize"] : $size;
$pager->Page($key = '', $pagesize, $groupsize = 0, $current = $get_page);
$pager->execute($this->mDb, $sql);
$pages['link'] = $pager->pageLinks();
$pages['frontlink'] = $pager->searchlinks();
$pages['fromto'] = $pager->fromto();
$pages['total'] = $pager->getTotalpage();
$pages['current'] = $pager->getCurrent();
$pages['totalnum'] = $pager->getTotalnum();
$pages['jump'] = $pager->jump();
$pages['pagenum'] = $pagesize;
$rs = $pager->getResult();
$r["logs"] = $rs;
$r["pages"] = $pages;
return $r;
}
示例3: getList
public function getList()
{
$sql = " SELECT t1. * , t2.admin AS username FROM templet t1,admins t2 WHERE t1.uid = t2.id ";
if ($_GET["ttype"] == "0") {
$sql .= " AND ttype=0";
} elseif ($_GET["ttype"]) {
$sql .= " AND ttype=" . $_GET["ttype"];
}
$pager = new Page();
$get_page = is_numeric($_GET["page"]) ? $get_page : 1;
$pagesize = $_GET["pagesize"] ? $_GET["pagesize"] : _PAGES;
$pager->Page($key = '', $pagesize, $groupsize = 0, $current = $get_page);
$pager->execute($this->mDb, $sql);
$pages['link'] = $pager->pageLinks();
$pages['fromto'] = $pager->fromto();
$pages['total'] = $pager->getTotalpage();
$pages['current'] = $pager->getCurrent();
$pages['totalnum'] = $pager->getTotalnum();
$pages['jump'] = $pager->jump();
$pages['pagenum'] = $pagesize;
$rs = $pager->getResult();
$r["logs"] = $rs;
$r["pages"] = $pages;
return $r;
}
示例4: getList
public function getList($table, $where, $size = _PAGES)
{
$sql = "SELECT * FROM " . get_table($table);
if ($where) {
$sql .= " WHERE " . implode("AND", $where);
}
$sql .= " ORDER BY id DESC";
$pager = new Page();
$get_page = is_numeric($_GET["page"]) ? $get_page : 1;
$pagesize = $_GET["pagesize"] ? $_GET["pagesize"] : $size;
$pager->Page($key = '', $pagesize, $groupsize = 0, $current = $get_page);
$pager->execute($this->mDb, $sql);
$pages['link'] = $pager->pageLinks();
$pages['frontlink'] = $pager->searchlinks();
$pages['fromto'] = $pager->fromto();
$pages['total'] = $pager->getTotalpage();
$pages['current'] = $pager->getCurrent();
$pages['totalnum'] = $pager->getTotalnum();
$pages['jump'] = $pager->jump();
$pages['pagenum'] = $pagesize;
$rs = $pager->getResult();
$r["logs"] = $rs;
$r["pages"] = $pages;
return $r;
}
示例5: getList
public function getList($cateid, $size = _PAGES)
{
$sql = "SELECT * FROM " . get_table("cases");
if ($_GET["title"]) {
$sqlv[] = " (title LIKE '%" . $_GET["title"] . "%') ";
}
if ($_GET["keyword"]) {
$sqlv[] = " (cprodname LIKE '%" . $_GET["keyword"] . "%' OR eprodname LIKE '%" . $_GET["keyword"] . "%' OR jprodname LIKE '%" . $_GET["keyword"] . "%') ";
}
if ($_GET["sku"]) {
$sqlv[] = " sku LIKE '" . $_GET["sku"] . "%' ";
}
if ($_GET["quantity"]) {
$sqlv[] = " quantity = '" . $_GET["quantity"] . "%' ";
}
if ($_GET["status"] || $_GET["status"] == '0') {
$sqlv[] = " status = '" . $_GET["status"] . "' ";
}
if ($_GET["is_best"] || $_GET["is_best"] == '0') {
$sqlv[] = " is_best = '" . $_GET["is_best"] . "' ";
}
if ($cateid) {
if (is_array($cateid)) {
$cateid = implode(",", $cateid);
}
$sqlv[] = " class_id IN ({$cateid})";
}
if ($sqlv) {
$sql .= " WHERE " . implode("AND", $sqlv);
}
//$sql .=" ORDER BY $order";
//echo $sql;
$pager = new Page();
$get_page = is_numeric($_GET["page"]) ? $get_page : 1;
$pagesize = $_GET["pagesize"] ? $_GET["pagesize"] : $size;
$pager->Page($key = '', $pagesize, $groupsize = 0, $current = $get_page);
$pager->execute($this->mDb, $sql);
$pages['link'] = $pager->pageLinks();
$pages['frontlink'] = $pager->searchlinks();
$pages['fromto'] = $pager->fromto();
$pages['total'] = $pager->getTotalpage();
$pages['current'] = $pager->getCurrent();
$pages['totalnum'] = $pager->getTotalnum();
$pages['jump'] = $pager->jump();
$pages['pagenum'] = $pagesize;
$rs = $pager->getResult();
$r["logs"] = $rs;
$r["pages"] = $pages;
return $r;
}
示例6: getList
public function getList()
{
$sql = " SELECT t1.*,t2.admin AS username FROM reports t1, admins t2 WHERE t1.uid =t2.id ORDER BY id DESC";
$pager = new Page();
$get_page = is_numeric($_GET["page"]) ? $get_page : 1;
$pager->Page($key = '', $size = _PAGE_SIZE, $groupsize = 0, $current = $get_page);
$pager->execute($this->mDb, $sql);
$pages['link'] = $pager->searchlinks();
$pages['fromto'] = $pager->fromto();
$pages['total'] = $pager->getTotalpage();
$pages['current'] = $pager->getCurrent();
$pages['totalnum'] = $pager->getTotalnum();
$pages['jump'] = $pager->jump();
$pages['pagenum'] = $size;
$rs = $pager->getResult();
$r["logs"] = $rs;
$r["pages"] = $pages;
return $r;
}
示例7: getList
public function getList()
{
$sql = "SELECT * FROM " . get_table("admins");
$pager = new Page();
$get_page = is_numeric($_GET["page"]) ? $get_page : 1;
$pagesize = $_GET["pagesize"] ? $_GET["pagesize"] : _PAGES;
$pager->Page($key = '', $pagesize, $groupsize = 0, $current = $get_page);
$pager->execute($this->mDb, $sql);
$pages['link'] = $pager->pageLinks();
$pages['fromto'] = $pager->fromto();
$pages['total'] = $pager->getTotalpage();
$pages['current'] = $pager->getCurrent();
$pages['totalnum'] = $pager->getTotalnum();
$pages['jump'] = $pager->jump();
$pages['pagenum'] = $pagesize;
$rs = $pager->getResult();
$r["logs"] = $rs;
$r["pages"] = $pages;
return $r;
}
示例8: getListByUid
public function getListByUid($uid, $size = _PAGES)
{
$sql = "SELECT * FROM " . get_table("events") . " WHERE uid={$uid} ORDER BY id DESC";
//echo $sql;
$pager = new Page();
$get_page = is_numeric($_GET["page"]) ? $get_page : 1;
$pagesize = $_GET["pagesize"] ? $_GET["pagesize"] : $size;
$pager->Page($key = '', $pagesize, $groupsize = 0, $current = $get_page);
$pager->execute($this->mDb, $sql);
$pages['link'] = $pager->pageLinks();
$pages['frontlink'] = $pager->searchlinks();
$pages['fromto'] = $pager->fromto();
$pages['total'] = $pager->getTotalpage();
$pages['current'] = $pager->getCurrent();
$pages['totalnum'] = $pager->getTotalnum();
$pages['jump'] = $pager->jump();
$pages['pagenum'] = $pagesize;
$rs = $pager->getResult();
$r["logs"] = $rs;
$r["pages"] = $pages;
return $r;
}
示例9: getList
public function getList()
{
$sql = "SELECT * FROM " . get_table("logs");
if (!empty($_GET["stime"])) {
$w[] = "addtime >= '" . $_GET["stime"] . " 00:00:00'";
}
if (!empty($_GET["etime"])) {
$w[] = "addtime <= '" . $_GET["etime"] . " 23:59:59'";
}
if (!empty($_GET["utype"])) {
$w[] = "utype = '" . $_GET["utype"] . "'";
}
if (!empty($_GET["uname"])) {
$w[] = "uname like '" . $_GET["uname"] . "'";
}
if ($w) {
$sql .= " WHERE ";
if (is_array($w)) {
$sql .= implode(" AND ", $w);
}
}
$sql .= " ORDER BY id DESC";
$pager = new Page();
$get_page = is_numeric($_GET["page"]) ? $get_page : 1;
$pagesize = $_GET["pagesize"] ? $_GET["pagesize"] : _PAGES;
$pager->Page($key = '', $pagesize, $groupsize = 0, $current = $get_page);
$pager->execute($this->mDb, $sql);
$pages['link'] = $pager->pageLinks();
$pages['fromto'] = $pager->fromto();
$pages['total'] = $pager->getTotalpage();
$pages['current'] = $pager->getCurrent();
$pages['totalnum'] = $pager->getTotalnum();
$pages['jump'] = $pager->jump();
$pages['pagenum'] = $pagesize;
$rs = $pager->getResult();
$r["logs"] = $rs;
$r["pages"] = $pages;
return $r;
}
示例10: getList
public function getList($classid, $t, $lang, $size = 30)
{
if ($_GET["auditing"]) {
$t = $_GET["auditing"];
}
$sql = "SELECT * FROM " . get_table("goods") . " ORDER BY id DESC";
$pager = new Page();
$get_page = is_numeric($_GET["page"]) ? $get_page : 1;
$pagesize = $_GET["pagesize"] ? $_GET["pagesize"] : _PAGES;
$pager->Page($key = '', $pagesize, $groupsize = 0, $current = $get_page);
$pager->execute($this->mDb, $sql);
$pages['link'] = $pager->pageLinks();
$pages['fromto'] = $pager->fromto();
$pages['total'] = $pager->getTotalpage();
$pages['current'] = $pager->getCurrent();
$pages['totalnum'] = $pager->getTotalnum();
$pages['jump'] = $pager->jump();
$pages['pagenum'] = $pagesize;
$rs = $pager->getResult();
$r["logs"] = $rs;
$r["pages"] = $pages;
return $r;
}
示例11: templet
public function templet()
{
$this->pageinfo();
include _APP_PATH . "libs/adodb/adodb-pager1.inc.php";
$sql = "SELECT * FROM " . get_table("template") . " WHERE type=1 ORDER BY id DESC";
$pager = new Page();
$get_page = is_numeric($_GET["page"]) ? $get_page : 1;
$pagesize = $_GET["pagesize"] ? $_GET["pagesize"] : $size;
$pager->Page($key = '', $pagesize, $groupsize = 0, $current = $get_page);
$pager->execute($this->mDb, $sql);
$pages['link'] = $pager->pageLinks();
$pages['frontlink'] = $pager->searchlinks();
$pages['fromto'] = $pager->fromto();
$pages['total'] = $pager->getTotalpage();
$pages['current'] = $pager->getCurrent();
$pages['totalnum'] = $pager->getTotalnum();
$pages['jump'] = $pager->jump();
$pages['pagenum'] = $pagesize;
$rs = $pager->getResult();
$r["logs"] = $rs;
$r["pages"] = $pages;
$this->result["logs"] = $r["logs"];
$this->result["pages"] = $r["pages"];
if ($_GET["id"]) {
$sql = "SELECT * FROM " . get_table("template") . " WHERE type=1 AND id=" . $_GET["id"];
$this->result["log"] = $this->mDb->getrow($sql);
}
$this->tplname = 'message_templet';
$this->mLog->adminLog("查看短信列表");
}
示例12: is_page_visible
function is_page_visible()
{
return Page::getCurrent('visible');
}
示例13: getFilebyUid
/**
*
* 用戶上傳圖片
* @param array $uid 用戶id
*/
public function getFilebyUid($uid, $utpye, $isimage = 1)
{
$sql = "SELECT * FROM " . get_table("attachments") . " WHERE pid=0 AND uid={$uid} AND utype='{$utpye}' AND isimage={$isimage} ORDER by id DESC";
$pager = new Page();
$get_page = is_numeric($_GET["page"]) ? $get_page : 1;
$pagesize = $_GET["pagesize"] ? $_GET["pagesize"] : 24;
$pager->Page($key = '', $pagesize, $groupsize = 0, $current = $get_page);
$pager->execute($this->mDb, $sql);
$pages['link'] = $pager->pageLinks();
$pages['frontlink'] = $pager->searchlinks();
$pages['fromto'] = $pager->fromto();
$pages['total'] = $pager->getTotalpage();
$pages['current'] = $pager->getCurrent();
$pages['totalnum'] = $pager->getTotalnum();
$pages['jump'] = $pager->jump();
$pages['pagenum'] = $pagesize;
$rs = $pager->getResult();
$r["logs"] = $rs;
$r["pages"] = $pages;
return $r;
}
示例14: getVoucherListbyUid
public function getVoucherListbyUid($uid)
{
$sql = "SELECT t1.*,t2.* FROM " . get_table("voucherts") . " t1, " . get_table("vouchertype") . " t2 WHERE t1.uid={$uid} AND t1.vid=t2.id ORDER BY t1.id DESC";
$pager = new Page();
$get_page = is_numeric($_GET["page"]) ? $get_page : 1;
$pagesize = $_GET["pagesize"] ? $_GET["pagesize"] : $size;
$pager->Page($key = '', $pagesize, $groupsize = 0, $current = $get_page);
$pager->execute($this->mDb, $sql);
$pages['link'] = $pager->pageLinks();
$pages['frontlink'] = $pager->searchlinks();
$pages['fromto'] = $pager->fromto();
$pages['total'] = $pager->getTotalpage();
$pages['current'] = $pager->getCurrent();
$pages['totalnum'] = $pager->getTotalnum();
$pages['jump'] = $pager->jump();
$pages['pagenum'] = $pagesize;
$rs = $pager->getResult();
$r["logs"] = $rs;
$r["pages"] = $pages;
return $r;
}
示例15: getProdutctSaleList
public function getProdutctSaleList($type, $status, $size)
{
if ($status) {
$sql = "SELECT t1.price AS saleprice , t1.point , t1.date_end, t1.date_start, t1.quantity AS quantity_limit,t1.point,(t1.quantity-t1.sold_quantity) AS residue,t1.buyusers , t2 . * FROM " . get_table("product_sales") . " t1," . get_table("products") . " t2 WHERE t1.pid=t2.id AND t1.type={$type} AND t2.status=1";
} else {
$sql = "SELECT t1.*,t2.cprodname,t2.status FROM " . get_table("product_sales") . " t1," . get_table("products") . " t2 WHERE t1.pid=t2.id AND t1.type={$type}";
}
$sql .= " ORDER by t1.date_end";
$pager = new Page();
$get_page = is_numeric($_GET["page"]) ? $get_page : 1;
$pagesize = $_GET["pagesize"] ? $_GET["pagesize"] : $size;
$pager->Page($key = '', $pagesize, $groupsize = 0, $current = $get_page);
$pager->execute($this->mDb, $sql);
$pages['link'] = $pager->pageLinks();
$pages['frontlink'] = $pager->searchlinks();
$pages['fromto'] = $pager->fromto();
$pages['total'] = $pager->getTotalpage();
$pages['current'] = $pager->getCurrent();
$pages['totalnum'] = $pager->getTotalnum();
$pages['jump'] = $pager->jump();
$pages['pagenum'] = $pagesize;
$rs = $pager->getResult();
if ($status) {
foreach ($rs as $key => $val) {
if (strtotime($val["date_end"]) <= time()) {
$rs[$key]["date_end"] = 1;
}
}
}
$r["logs"] = $rs;
$r["pages"] = $pages;
return $r;
}