当前位置: 首页>>代码示例>>PHP>>正文


PHP Page::Page方法代码示例

本文整理汇总了PHP中Page::Page方法的典型用法代码示例。如果您正苦于以下问题:PHP Page::Page方法的具体用法?PHP Page::Page怎么用?PHP Page::Page使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Page的用法示例。


在下文中一共展示了Page::Page方法的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("查看博文管理列表");
 }
开发者ID:yfg2014,项目名称:yangphp_4,代码行数:30,代码来源:blog.class.php

示例2: 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;
 }
开发者ID:hetykai,项目名称:feidaoyu,代码行数:25,代码来源:Basic.class.php

示例3: PageLogout

 public function PageLogout($row)
 {
     global $sDB, $sRequest, $sUser;
     parent::Page($row);
     $this->handleLogout();
     $this->redirect();
 }
开发者ID:PiratenparteiHessen,项目名称:wikiarguments,代码行数:7,代码来源:logout.php

示例4: PageManageGroup

 public function PageManageGroup($row)
 {
     global $sDB, $sRequest, $sQuery, $sUser, $sTemplate;
     parent::Page($row);
     if (!$this->group || !$this->group->groupId() || !$this->group->isAdmin($sUser->getUserId())) {
         header("Location: " . $sTemplate->getRoot());
         exit;
     }
     if ($sRequest->getInt("update_other_settings")) {
         $this->handleUpdateOtherSettings();
     }
     if ($sRequest->getInt("add_users")) {
         $this->handleAddUsers();
     }
     if ($sRequest->getInt("delete_user")) {
         $this->handleDeleteUser();
     }
     if ($sRequest->getInt("change_permissions")) {
         $this->handleChangePermissions();
     }
     if ($sRequest->getInt("delete_group")) {
         $this->handleDeleteGroup();
     }
     if ($sRequest->getInt("update_ownership")) {
         $this->handleChangeOwnership();
     }
 }
开发者ID:PiratenparteiHessen,项目名称:wikiarguments,代码行数:27,代码来源:manageGroup.php

示例5: 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;
 }
开发者ID:yfg2014,项目名称:yangphp_4,代码行数:25,代码来源:Templet.class.php

示例6: PageNewCounterArgument

 public function PageNewCounterArgument($row)
 {
     global $sDB, $sRequest, $sUser;
     parent::Page($row);
     $questionTitle = $sRequest->getString("title");
     $this->question = false;
     $argumentTitle = $sRequest->getString("argument");
     $this->view = VIEW_NEW_COUNTER_ARGUMENT;
     $this->argument = false;
     $this->faction = $sRequest->getInt("faction");
     validateFaction($this->faction);
     $res = $sDB->exec("SELECT * FROM `questions` WHERE `url` = '" . mysql_real_escape_string($questionTitle) . "' LIMIT 1;");
     while ($row = mysql_fetch_object($res)) {
         $this->question = new Question($row->questionId, $row);
     }
     if (!$this->question) {
         $sTemplate->error($sTemplate->getString("ERROR_INVALID_QUESTION"));
     }
     foreach ($this->question->arguments() as $k => $v) {
         if ($v->urlPlain() == $argumentTitle) {
             $this->argument = $v;
             break;
         }
     }
     if (!$this->argument) {
         $sTemplate->error($sTemplate->getString("ERROR_INVALID_ARGUMENT"));
     }
     if ($sRequest->getInt("new_counter_argument")) {
         if ($this->handleNewCounterArgument()) {
             header("Location: " . $this->redirectUrl);
             exit;
         }
     }
 }
开发者ID:roewi,项目名称:wikiarguments,代码行数:34,代码来源:newCounterArgument.php

示例7: PageNewArgument

 public function PageNewArgument($row)
 {
     global $sDB, $sRequest, $sTemplate, $sUser, $sNotify;
     parent::Page($row);
     $questionTitle = $sRequest->getString("title");
     $this->question = false;
     $this->view = VIEW_NEW_ARGUMENT;
     $this->faction = $sRequest->getInt("faction");
     validateFaction($this->faction);
     $res = $sDB->exec("SELECT * FROM `questions` WHERE `url` = '" . mysql_real_escape_string($questionTitle) . "' LIMIT 1;");
     while ($row = mysql_fetch_object($res)) {
         $this->question = new Question($row->questionId, $row);
     }
     if (!$this->question) {
         $sTemplate->error($sTemplate->getString("ERROR_INVALID_QUESTION"));
     }
     if ($sRequest->getInt("new_argument")) {
         $argumentId = $this->handleNewArgument();
         if ($argumentId) {
             $argument = new Argument($argumentId);
             $sNotify->notifyNewArgument($this->question, $argument);
             $sUser->follow($this->question->questionId());
             header("Location: " . $this->redirectUrl);
             exit;
         }
     }
 }
开发者ID:PiratenparteiHessen,项目名称:wikiarguments,代码行数:27,代码来源:newArgument.php

示例8: 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;
 }
开发者ID:hetykai,项目名称:feidaoyu,代码行数:29,代码来源:Ask.class.php

示例9: PageEditQuestion

 public function PageEditQuestion($row)
 {
     global $sDB, $sRequest, $sQuery, $sUser, $sTemplate, $sSession;
     parent::Page($row);
     $this->view = VIEW_NEW_QUESTION;
     $questionTitle = $sRequest->getString("title");
     $this->question = false;
     $res = $sDB->exec("SELECT * FROM `questions` WHERE `url` = '" . mysql_real_escape_string($questionTitle) . "' LIMIT 1;");
     while ($row = mysql_fetch_object($res)) {
         $this->question = new Question($row->questionId, $row);
     }
     if (!$this->question || $this->question->authorId() != $sUser->getUserId()) {
         $sTemplate->error($sTemplate->getString("ERROR_INVALID_QUESTION"));
     }
     if (!$this->question->canEdit($sUser)) {
         $sSession->setVal('notification', $sTemplate->getString("QUESTION_EDIT_EXCEEDED"));
         $sSession->serialize();
         header("Location: " . $this->question->url());
         exit;
     }
     if ($sRequest->getInt("edit_question")) {
         if ($this->handleEditQuestion()) {
             header("Location: " . $this->redirectUrl);
             exit;
         }
     }
 }
开发者ID:PiratenparteiHessen,项目名称:wikiarguments,代码行数:27,代码来源:editQuestion.php

示例10: PageManageProfile

 public function PageManageProfile($row)
 {
     global $sDB, $sRequest, $sQuery, $sUser;
     parent::Page($row);
     if ($sRequest->getInt("updateProfile")) {
         $this->updateProfile();
     }
 }
开发者ID:PiratenparteiHessen,项目名称:wikiarguments,代码行数:8,代码来源:manageProfile.php

示例11: PageSponsors

 public function PageSponsors($row)
 {
     global $sDB, $sRequest, $sQuery, $sTemplate, $sUser;
     parent::Page($row);
     $this->page = $sRequest->getInt("page");
     $this->numPages = -1;
     $this->sponsors = false;
 }
开发者ID:PiratenparteiHessen,项目名称:wikiarguments,代码行数:8,代码来源:sponsors.php

示例12: StoolballPage

 function StoolballPage(SiteSettings $o_settings, $i_permission_required, $obsolete = false)
 {
     $this->i_constraint_type = StoolballPage::ConstrainNone();
     if (!SiteContext::IsDevelopment()) {
         $this->css_root = 'https://www.stoolball.org.uk';
         $this->resource_root = 'https://www.stoolball.org.uk';
     }
     parent::Page($o_settings, $i_permission_required);
 }
开发者ID:stoolball-england,项目名称:stoolball-england-website,代码行数:9,代码来源:stoolball-page.class.php

示例13: SmartyPage

 function SmartyPage()
 {
     parent::Page();
     $this->_smarty =& new Smarty();
     $this->_smarty->template_dir = APPLICATION_HOME . '/Templates';
     $this->_smarty->compile_dir = APPLICATION_HOME . '/Templates_c';
     $this->_smarty->use_sub_dirs = true;
     $this->setTempalte($this->getName() . '.tpl');
 }
开发者ID:BackupTheBerlios,项目名称:skyapp,代码行数:9,代码来源:SmartyPage.php

示例14: kibopage

 function kibopage()
 {
     parent::Page();
     $this->forms = array();
     $this->box = array();
     $this->userdata = array();
     $this->backtracking = new kibo_backtracking($this->session);
     $this->version = TIC_VERSION;
     $this->template->assign('version', TIC_VERSION . " " . TIC_COPYRIGHT);
 }
开发者ID:Bobsel,项目名称:gn-tic,代码行数:10,代码来源:kibo.page.class.php

示例15: PageNewSponsor

 public function PageNewSponsor($row)
 {
     global $sDB, $sRequest, $sQuery, $sTemplate, $sUser;
     parent::Page($row);
     if ($sRequest->getInt("new_sponsor")) {
         if ($this->handleNewSponsor()) {
             header("Location: " . $sTemplate->getRoot());
             exit;
         }
     }
 }
开发者ID:PiratenparteiHessen,项目名称:wikiarguments,代码行数:11,代码来源:newSponsor.php


注:本文中的Page::Page方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。