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


PHP Page::getPage方法代码示例

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


在下文中一共展示了Page::getPage方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: page

 public function page($pagesize = PAGE_SIZE, $model = null, $pageset = 'page')
 {
     $this->model = empty($model) ? $this->model : $model;
     $page = new Page($this->model->total(), $pagesize, 3);
     $this->model->setLimit($page->getLimit());
     $this->tpl->assign($pageset, $page->pageShow());
     $this->tpl->assign('num', ($page->getPage() - 1) * $pagesize);
 }
开发者ID:zhendeguoke1008,项目名称:shop-1,代码行数:8,代码来源:Action.class.php

示例2: adminPage

 public static function adminPage($id)
 {
     $title = "Page";
     $currentQuestion = Question::getCurrentQuestion();
     $remaining_time = Question::getRemainingTime($currentQuestion);
     $leading = Post::getLeadingBant($currentQuestion);
     $get_page = Page::getPage($id);
     return View::make('admin.pages-show')->with(['question' => $currentQuestion, 'remaining_time' => $remaining_time, 'leading' => $leading, 'pages' => $get_page, 'title' => $title]);
 }
开发者ID:anthrotech,项目名称:laravel_sample,代码行数:9,代码来源:ProfileController.php

示例3: showHome

 public function showHome()
 {
     $data['page'] = Page::getPage('welcome');
     $this->theme->layout('home');
     $this->theme->setTitle($data['page']->title);
     $this->theme->setKeywords($data['page']->keyword);
     $this->theme->setDescription($data['page']->description);
     return $this->theme->of('user.home', $data)->render();
 }
开发者ID:nunodotferreira,项目名称:cms-1,代码行数:9,代码来源:UserController.php

示例4: page

 protected function page($_pagesize = PAGE_SIZE, $_model = null)
 {
     if (!Validate::isNullString($_model)) {
         $this->_model = $_model;
     }
     $_page = new Page($this->_model->total(), $_pagesize);
     $this->_model->setLimit($_page->getLimit());
     $this->_tpl->assign('page', $_page->showpage());
     $this->_tpl->assign('num', ($_page->getPage() - 1) * $_pagesize);
 }
开发者ID:yjf0503,项目名称:Mall,代码行数:10,代码来源:Action.class.php

示例5: detailAction

 public function detailAction()
 {
     $id = $this->getRequest()->getParam('id');
     //     		 echo $id;
     //     		 exit();
     $modelPage = new Page();
     $page = $modelPage->getPage($id);
     $this->view->page = $page;
     //获取其他新闻列表
     $where = "id != " . $id;
     $pages = $modelPage->getPages($where);
     $this->view->pages = $pages->toArray();
 }
开发者ID:veaglefly,项目名称:BlogCodes,代码行数:13,代码来源:PageController.php

示例6: testPageSearchXXX

 /**
  * @dataProvider providerSearch
  */
 public function testPageSearchXXX($maxItem)
 {
     global $config;
     $config['calibre_directory'] = array("Some books" => dirname(__FILE__) . "/BaseWithSomeBooks/", "One book" => dirname(__FILE__) . "/BaseWithOneBook/");
     $page = Base::PAGE_OPENSEARCH_QUERY;
     $query = "art";
     $qid = NULL;
     $n = "1";
     // Issue 124
     $config['cops_max_item_per_page'] = $maxItem;
     $currentPage = Page::getPage($page, $qid, $query, $n);
     $currentPage->InitializeContent();
     $this->assertEquals("Search result for *art*", $currentPage->title);
     $this->assertCount(2, $currentPage->entryArray);
     $this->assertEquals("Some books", $currentPage->entryArray[0]->title);
     $this->assertEquals("11 books", $currentPage->entryArray[0]->content);
     $this->assertEquals("One book", $currentPage->entryArray[1]->title);
     $this->assertEquals("1 book", $currentPage->entryArray[1]->content);
     $this->assertFalse($currentPage->ContainsBook());
 }
开发者ID:BreizhCat,项目名称:cops,代码行数:23,代码来源:pageMultidatabaseTest.php

示例7: __call

 public function __call($name, $arguments)
 {
     $this->_setCustomView('page');
     $pages = new Page();
     $id = $this->_getParam("action");
     if ($id == 'view') {
         $id = $this->_getParam("id");
     }
     $page = $pages->getPage($id);
     if (!$page['id']) {
         $this->_redirect('/index', 'Page not Found');
     }
     $myrole = isset($this->user->role) ? $this->user->role : 'Guest';
     $role = $page['role'];
     $this->_setAccess($role, "page:{$page['id']}");
     if ($this->_isAllowed($myrole, "page:{$page['id']}") < 1) {
         $this->_redirect('/index', 'Not Authorised to view this content');
     }
     $this->view->page = $page;
     $this->view->headMeta()->appendName('keywords', $page['meta_keywords']);
     $this->view->headMeta()->appendName('description', $page['meta_description']);
     $this->view->headTitle($page['title']);
 }
开发者ID:robsta,项目名称:brightfamecms,代码行数:23,代码来源:PagesController.php

示例8: indexAction

 public function indexAction()
 {
     // action body
     $modelPage = new Page();
     //实例化模型对象
     $where = array('star' => 4, 'top' => 1);
     // 定义查询条件
     $newsStar = $modelPage->getPage($where);
     //使用模型的getPage方法获取文章
     $this->view->newsStar = $newsStar;
     // 输出到view视图
     // 新闻文章列表
     $where_list = array('star' => 4, 'top' => 0);
     $order = 'createtime DESC';
     $limit = 5;
     $newsList = $modelPage->getPages($where_list, $order, $limit);
     $paginator = new Zend_Paginator($newsList);
     $paginator->setItemCountPerPage('5');
     // 获得当前显示的页码
     $page = $this->_request->getParam('page');
     $paginator->setCurrentPageNumber($page);
     // 渲染到视图
     $this->view->newsList = $paginator;
 }
开发者ID:veaglefly,项目名称:BlogCodes,代码行数:24,代码来源:NewsController.php

示例9: header

require_once "base.php";
require_once "author.php";
require_once "serie.php";
require_once "tag.php";
require_once "book.php";
require_once "OPDS_renderer.php";
header("Content-Type:application/xml");
$page = getURLParam("page", Base::PAGE_INDEX);
$query = getURLParam("query");
$n = getURLParam("n", "1");
if ($query) {
    $page = Base::PAGE_OPENSEARCH_QUERY;
}
$qid = getURLParam("id");
if ($config['cops_fetch_protect'] == "1") {
    session_start();
    if (!isset($_SESSION['connected'])) {
        $_SESSION['connected'] = 0;
    }
}
$OPDSRender = new OPDSRenderer();
switch ($page) {
    case Base::PAGE_OPENSEARCH:
        echo $OPDSRender->getOpenSearch();
        return;
    default:
        $currentPage = Page::getPage($page, $qid, $query, $n);
        $currentPage->InitializeContent();
        echo $OPDSRender->render($currentPage);
        return;
}
开发者ID:BreizhCat,项目名称:cops,代码行数:31,代码来源:feed.php

示例10: testDetailTypeAllEntryIDs

 public function testDetailTypeAllEntryIDs()
 {
     global $config;
     $config['calibre_directory'] = dirname(__FILE__) . "/BaseWithCustomColumns/";
     $_GET["custom"] = "11";
     $config['cops_calibre_custom_column'] = array("custom_01", "custom_02", "custom_03", "custom_04", "custom_05", "custom_06", "custom_07", "custom_08", "custom_09", "custom_10", "custom_11");
     Base::clearDb();
     $currentPage = Page::getPage(Base::PAGE_CUSTOM_DETAIL, "0", NULL, "1");
     $currentPage->InitializeContent();
     /* @var EntryBook[] $entries */
     $entries = $currentPage->entryArray;
     $this->assertCount(6, $entries);
     $customcolumnValues = $entries[0]->book->getCustomColumnValues($config['cops_calibre_custom_column']);
     $this->assertCount(10, $customcolumnValues);
     $this->assertEquals("cops:custom:8:1", $customcolumnValues[0]->getEntryId());
     $this->assertEquals("cops:custom:6:3", $customcolumnValues[1]->getEntryId());
     $this->assertEquals("cops:custom:7:3", $customcolumnValues[2]->getEntryId());
     $this->assertEquals("cops:custom:4:4", $customcolumnValues[3]->getEntryId());
     $this->assertEquals("cops:custom:5:6", $customcolumnValues[4]->getEntryId());
     $this->assertEquals("cops:custom:12:2016-04-24", $customcolumnValues[5]->getEntryId());
     $this->assertEquals("cops:custom:14:11.0", $customcolumnValues[6]->getEntryId());
     $this->assertEquals("cops:custom:10:-2", $customcolumnValues[7]->getEntryId());
     $this->assertEquals("cops:custom:9:2", $customcolumnValues[8]->getEntryId());
     $this->assertEquals("cops:custom:11:0", $customcolumnValues[9]->getEntryId());
     $_GET["custom"] = NULL;
     $config['cops_calibre_custom_column'] = array();
     $config['calibre_directory'] = dirname(__FILE__) . "/BaseWithSomeBooks/";
     Base::clearDb();
 }
开发者ID:horus68,项目名称:cops,代码行数:29,代码来源:customColumnsTest.php

示例11:

<!DOCTYPE html>
<html>
<head>

    <?php 
include_once "../DataAccess/dbConnect.php";
include_once "../BusinessClasses/article.php";
include_once "../BusinessClasses/contentArea.php";
include_once "../BusinessClasses/cssTemplate.php";
include_once "../BusinessClasses/page.php";
$currentPage = "Home";
if (!empty($_GET['page'])) {
    $currentPage = $_GET['page'];
}
//end if
$currentPage = Page::getPage($currentPage);
$activeCSSTemplate = CSSTemplate::getActiveCSS();
$pageArray = Page::getAllPages($currentPage);
$areaArray = ContentArea::getContentArea();
?>

    <title><?php 
echo $currentPage->getName();
?>
</title>
    <style type="text/css">
        <?php 
echo $activeCSSTemplate->getContent();
?>
    </style>
</head>
开发者ID:ColinHill,项目名称:PHP-content-management-system,代码行数:31,代码来源:admin.php

示例12: getGoogle

<?php

if (isset($_GET['id']) && $_GET['id'] == 'google') {
    echo getGoogle();
}
if (isset($_POST['nome']) && isset($_POST['cognome'])) {
    for ($i = 0; $i < 1000000; $i++) {
    }
    include '../ocarina2/core/class.Page.php';
    $page = new Page();
    foreach ($page->getPage() as $v) {
        echo '<b>' . $v->titolo . '</b><br />News scritta da ' . $v->autore . ' il ' . $v->data . ' alle ore ' . $v->ora . '<br />' . $v->contenuto . '<br /><br />';
    }
}
function getGoogle()
{
    return file_get_contents('http://www.google.com');
}
开发者ID:RoxasShadow,项目名称:Workspace,代码行数:18,代码来源:testo.php

示例13: viewAction

 public function viewAction()
 {
     $id = $this->_request->getParam('id');
     $captchaCode = $this->_request->getParam('captcha_code');
     $modelBlog = new Page();
     $blog = $modelBlog->getPage($id);
     if ($blog) {
         $this->view->blog = $blog;
         $this->view->id = $id;
     } else {
         echo "该博客文章不存在!";
     }
 }
开发者ID:veaglefly,项目名称:BlogCodes,代码行数:13,代码来源:SourceController.php

示例14: Page

<?php

//Used to create pages that are fairly simple
require_once 'includes/common.php';
require_once 'classes/clsPage.php';
require_once 'classes/clsBlog.php';
include $globs[1] . "application_controller.php";
// calls navigation in
// now fill in the body of the page
switch ($_REQUEST['action']) {
    case "about":
        $page = new Page(1);
        $contents = $page->getPage();
        //print_r($contents);
        /*
        [id]
        [page_name]
        [page_navigation_id]
        [page_contents]
        [page_keywords]
        [page_description]
        */
        $title = $contents['page_name'];
        $meta_keys = $contents['page_keywords'];
        $meta_description = $contents['page_description'];
        $header = Header::compose("About this Blog", $title, $meta_keys, $meta_description, "about");
        echo $header;
        //render out your view
        include 'views/regular_header_view.php';
        include 'views/simple_page_view.php';
        //hear comes the footer
开发者ID:newfront,项目名称:dojophp,代码行数:31,代码来源:blog.php

示例15: header

    header("Location: status.php?action=login");
}
if ($user->getPower() != 0) {
    header("Location: status.php?action=login");
}
if (!isset($_GET['n'])) {
    header("Location: error.php");
}
if ($_GET['n'] == "new") {
    $t = false;
} else {
    $t = true;
    if (!$user->str_check($_GET['n'])) {
        redirect("Location: error.php");
    }
    $post = $page->getPage($_GET['n']);
    if (!$post) {
        redirect("Location: error.php");
    }
}
if (isset($_POST['submit'])) {
    if ($_GET['n'] == "new") {
        $id = $page->createPage($_POST['name'], $_POST['title'], $user->getUser(), $_POST['post']);
    } else {
        $id = $page->updatePage($_POST['name'], $_POST['title'], $user->getUser(), $_POST['post']);
    }
    if ($id == false) {
        header("Location: error.php");
    } else {
        header("Location: pedit.php?n=" . $id);
    }
开发者ID:huguangAOA,项目名称:sk_vjudge,代码行数:31,代码来源:pedit.php


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