本文整理汇总了PHP中Page::execute方法的典型用法代码示例。如果您正苦于以下问题:PHP Page::execute方法的具体用法?PHP Page::execute怎么用?PHP Page::execute使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Page
的用法示例。
在下文中一共展示了Page::execute方法的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: execute
public function execute()
{
$db = $this->getContext()->getDB();
$request = $this->getContext()->getRequest();
$this->setRobots("noindex,nofollow");
$runID = $request->getInt("run_id");
$clientID = $request->getInt("client_id");
if ($runID && $clientID) {
$row = $db->getRow(str_queryf("SELECT\n\t\t\t\t\tresults\n\t\t\t\tFROM\n\t\t\t\t\trun_client\n\t\t\t\tWHERE run_id = %u\n\t\t\t\tAND client_id = %u;", $runID, $clientID));
if ($row) {
if ($row->results) {
header("Content-Type: text/html; charset=utf-8");
header("Content-Encoding: gzip");
echo $row->results;
// Prevent Page from building
exit;
} else {
// The row exists but there are no results yet
$this->runClientFound = true;
}
}
}
// We're still here, continue building the page,
parent::execute();
}
示例3: execute
public function execute()
{
$action = SaverunAction::newFromContext($this->getContext());
$action->doAction();
$this->setAction($action);
parent::execute();
}
示例4: 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;
}
示例5: 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;
}
示例6: 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;
}
示例7: 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;
}
示例8: 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;
}
示例9: 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;
}
示例10: 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;
}
示例11: 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;
}
示例12: 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;
}
示例13: 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("查看短信列表");
}
示例14: getListUser
public function getListUser($cateid, $size = _PAGES, $uid)
{
$sql = "SELECT * FROM " . get_table("articles");
if ($_GET["status"] || $_GET["status"] == '0') {
$sqlv[] = " status = '" . $_GET["status"] . "' ";
}
if ($cateid) {
if (is_array($cateid)) {
$cateid = implode(",", $cateid);
}
$sqlv[] = " class_id IN ({$cateid})";
}
if ($sqlv) {
$sql .= " WHERE " . implode("AND", $sqlv);
}
$sql .= " And uid={$uid} And status=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;
return $r;
}
示例15: 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;
}