本文整理汇总了PHP中Page函数的典型用法代码示例。如果您正苦于以下问题:PHP Page函数的具体用法?PHP Page怎么用?PHP Page使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了Page函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: index
public function index()
{
$select['name'] = I('name');
$select['card'] = I('card');
$select['position'] = I('position');
$where = array();
if (!empty($select['name'])) {
$where['name'] = array('like', '%' . $select['name'] . '%');
}
if (!empty($select['card'])) {
$where['card'] = $select['card'];
}
if (!empty($select['position'])) {
$where['position'] = $select['position'];
}
$count = M('Score')->where($where)->count();
// 查询满足要求的总记录数
$size = C('PAGE_ZIAE');
$item = Page($count, $size);
$list = M('Score')->where($where)->order('times DESC,id DESC')->limit($item['limit'])->select();
$this->assign('list', $list);
$this->assign('page', $item['show']);
$this->assign('select', $select);
$this->display();
}
示例2: rollBackCont
static function rollBackCont($pid, $log)
{
$Cont = Page($pid);
if ($Cont->access() < 2) {
return false;
}
backToLog($pid, $log);
}
示例3: onBefore
static function onBefore($fn, $pid)
{
$Cont = Page($pid);
self::$Layouter = new cmsLayouter3($Cont->vs['module']);
$LPage = self::$Layouter->getLayoutPage();
if ($LPage->access() < 2) {
return false;
}
}
示例4: getDataByType
/**
*******************************
* Auth:dingwei
* Time:2016-5-14 14:55:37
* Desc:获取下载列表
********************************
*/
private function getDataByType($pid = 1)
{
$count = M('Article')->where("category=" . $pid)->count();
// 查询满足要求的总记录数
$size = C('PAGE_ZIAE');
$item = Page($count, $size);
$list = M('Article')->where("category=" . $pid)->order('ctime DESC,id DESC')->limit($item['limit'])->select();
$data = array('list' => $list, 'page' => $item['show']);
return $data;
}
示例5: getLayoutPage
function getLayoutPage()
{
if (!isset($this->LPage)) {
$Tmp = Page(5)->Childs(array('module' => $this->mod));
$this->LPage = array_shift($Tmp);
if (!$this->LPage) {
$this->LPage = Page(5)->createChild(array('module' => $this->mod, 'access' => 1, 'offline' => 0));
$this->LPage->Title($this->mod);
}
}
return $this->LPage;
}
示例6: cms_parentText
function cms_parentText($name, $Cont = null)
{
$Cont = $Cont === null ? Page() : $Cont;
$Text = false;
while ($Cont) {
$Texts = $Cont->Texts();
if (isset($Texts[$name])) {
$Text = $Texts[$name];
break;
}
$Cont = $Cont->Parent();
}
return $Text;
}
示例7: checkInstalled
static function checkInstalled()
{
if (!cms::PageByModule('cms.backend')) {
$P = Page(1)->createChild(array('visible' => 0, 'module' => 'cms.layout.backend', 'access' => 0, 'offline' => 0, 'sort' => 20, 'searchable' => 0));
$P->changeGroup(1, 0);
$P->changeGroup(2, 0);
$P->changeGroup(3, 0);
$P->Cont(1)->setModule('cms.backend');
$P->title()->get('de')->set('Backend');
$P->SET['childXML'] = '<page visible="1"></page>';
G()->SET['cms']['backend']->setDefault((string) $P);
G()->SET['cms']['backend']['lastpage']->setDefault((string) $P);
}
G()->SET['cms']['backend']['lastpage']->custom();
}
示例8: qgCms_parentText
function qgCms_parentText($name, $Cont = null)
{
$d = debug_backtrace();
$d = $d[0];
trigger_error('deprecated ' . $d['file'] . ' :' . $d['line']);
$Cont = $Cont === null ? Page() : $Cont;
$Text = false;
while ($Cont) {
$Texts = $Cont->Texts();
if (isset($Texts[$name])) {
$Text = $Texts[$name];
break;
}
$Cont = $Cont->Parent();
}
return $Text;
}
示例9: serverInterface_cms_frontend_0_widget
function serverInterface_cms_frontend_0_widget($pid, $widget, $params = array())
{
$P = Page($pid);
if ($P->access() < 2) {
return false;
}
if (strpos($widget, '/')) {
return null;
}
global $cmsWidgetCont;
$cmsWidgetCont = $P;
L::nsStart('cms');
$T = new Template();
$T->assign('Cont', $P);
$T->assign('param', $params);
L::nsStop();
// todo: better at end?
return $T->get(sysPATH . 'cms.frontend.0/view/widgets/' . $widget . '.php');
}
示例10: G
html::addCssFile(sysURL . 'core/js/c1/css/normalize.css', 'be-layout');
html::addCssFile(sysURL . 'core/js/c1/css/recommend.css', 'be-layout');
html::addCssFile(sysURL . 'core/js/c1/css/theme.css', 'be-layout');
html::$meta['viewport'] = 'width=device-width, initial-scale=1, maximum-scale=1';
$Page = $Cont->Page;
G()->SET['cms']['backend']['lastpage']->setUser($Page->id);
?>
<div>
<div id=header>
<div id=logo></div>
<div id=logo2></div>
</div>
<div id=container>
<ul id=nav>
<?php
foreach (Page(G()->SET['cms']['backend']->v)->Childs('navi') as $C) {
?>
<li class="<?php
echo $Page->in($C) ? 'active' : '';
?>
">
<a class=item href="<?php
echo $C->url();
?>
" style="background-image:url(<?php
echo path2uri($C->Cont(1)->modPath);
?>
pub/16.png)">
<?php
echo $C->title();
?>
示例11: shift
function shift($dep = 0, $period = 0)
{
$this->data['title'] = $this->title;
permission();
$data['path_file'] = $this->filename;
permissionkaryawan($this->session->userdata('webmaster_id'), $data['path_file']);
$data['main_content'] = $data['path_file'];
$data['filename'] = $this->filename;
$data['title'] = $this->title;
$path_paging = base_url() . $this->filename . "/main/" . $dep . "/" . $period;
$uri_segment = 5;
$pg = $this->uri->segment($uri_segment);
$per_page = 15;
//End Global
//$data['opt_pic'] = GetOptPIC();
$data['opt_pic'][''] = "";
//$data['opt_dep'] = GetOptDepartment();
//$data['opt_dep'][''] = "";
$filter = array("bulan" => "order/asc", "tahun" => "order/asc", "person_nm" => "order/asc");
//$filter = array("tahun"=> "order/asc", "bulan"=> "order/asc", "person_nm"=> "order/asc");
$filter_where_in = array();
if ($dep && $dep != "-") {
$exp = explode("-", $dep);
$dep = array();
foreach ($exp as $r) {
$dep[] = $r;
}
$filter_where_in['id_department'] = $dep;
} else {
$dep = array();
}
if ($period) {
$period = urldecode($period);
} else {
$period = date("M Y");
}
$filter['bulan'] = "where/" . GetMonthIndex(substr($period, 0, 3));
$filter['tahun'] = "where/" . substr($period, 4, 4);
$data['dep'] = $dep;
$data['period'] = $period;
$data['grid'] = array("Name", "Bulan", "Shift 1", "Shift 2", "Shift 3", "Reguler", "Off");
$data['query_all'] = GetAll('kg_view_jadwal_shift', $filter, $filter_where_in);
$filter['limit'] = $pg . "/" . $per_page;
$data['query_list'] = GetAll('kg_view_jadwal_shift', $filter, $filter_where_in);
$data['list'] = array("person_nm", "bulan", "jum_p", "jum_s", "jum_m", "jum_ns", "jum_off");
//lastq();
//Page
$pagination = Page($data['query_all']->num_rows(), $per_page, $pg, $path_paging, $uri_segment);
if (!$pagination) {
$pagination = "<strong>1</strong>";
}
$data['pagination'] = $pagination;
//End Page
$this->load->view('shift', $data);
}
示例12: echo
<a href="<?php
echo $href;
?>
" class=-title><?php
echo (string) $C->Title() ? $C->Title() : $P->Title();
?>
</a>
<?php
if ($Cont->SET['breadcrumb']->setType('bool')->v) {
?>
<div class=-breadcrumb>
<?php
$all = array();
foreach (Page($id)->Path() as $PathP) {
if ($PathP->id === 1) {
continue;
}
//if ($PathP === $P) continue;
$all[] = qgCms_link($PathP);
}
echo implode($separator, $all);
?>
</div>
<?php
}
?>
<a href="<?php
echo $href;
示例13: clipboardSet
static function clipboardSet($pid)
{
if ($pid && Page($pid)->access() < 2) {
return;
}
G()->SET['cms']['clipboard']->setUser((int) $pid);
G()->Answer = array('cmsInfo' => L('Gehen Sie zu einer andere Seite und fügen Sie den Inhalt ein'));
}
示例14: insertBefore
function insertBefore($page, $before = null)
{
$Page = Page($page);
$Before = Page($before);
if ($this->in($Page)) {
return false;
}
$type = $Page->vs['type'];
$sort = null;
$i = 0;
foreach ($this->Childs(array('type' => $type)) as $Child) {
if ($Page === $Child) {
continue;
}
if ($Before === $Child) {
$sort = $i++;
}
$Child->_setVs(array('sort' => $i++));
}
$sort = $sort !== null ? $sort : $i++;
$Page->_setVs(array('basis' => $this, 'sort' => $sort));
$Page->Parent = $Page->Path = $this->Childs = $this->Bough = null;
// clear cache
$Page->urlsSeoGen();
// generate urls
//cms::buildLftRgt();
return true;
}
示例15: onBefore
static function onBefore($fn, $pid)
{
if (Page($pid)->access() < 2) {
return false;
}
}