當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Page函數代碼示例

本文整理匯總了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();
 }
開發者ID:wanggeopens,項目名稱:own-libs,代碼行數:25,代碼來源:EvaluationController.class.php

示例2: rollBackCont

 static function rollBackCont($pid, $log)
 {
     $Cont = Page($pid);
     if ($Cont->access() < 2) {
         return false;
     }
     backToLog($pid, $log);
 }
開發者ID:nikbucher,項目名稱:shwups-cms-v4,代碼行數:8,代碼來源:qg.php

示例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;
     }
 }
開發者ID:nuxodin,項目名稱:shwups-cms-v4,代碼行數:9,代碼來源:serverInterface.php

示例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;
 }
開發者ID:wanggeopens,項目名稱:own-libs,代碼行數:17,代碼來源:EmergencyController.class.php

示例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;
 }
開發者ID:nuxodin,項目名稱:shwups-cms-v4,代碼行數:12,代碼來源:qg.php

示例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;
}
開發者ID:nikbucher,項目名稱:shwups-cms-v4,代碼行數:14,代碼來源:functions.php

示例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();
 }
開發者ID:atifzaidi,項目名稱:shwups-cms,代碼行數:15,代碼來源:qg.php

示例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;
}
開發者ID:atifzaidi,項目名稱:shwups-cms,代碼行數:17,代碼來源:functions_page.inc.php

示例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');
}
開發者ID:nuxodin,項目名稱:shwups-cms-v4,代碼行數:19,代碼來源:qg.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();
    ?>
開發者ID:nuxodin,項目名稱:shwups-cms-v4,代碼行數:31,代碼來源:index.php

示例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);
 }
開發者ID:pay-test,項目名稱:ci2,代碼行數:55,代碼來源:attendance+-+Copy.php

示例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;
開發者ID:atifzaidi,項目名稱:shwups-cms,代碼行數:30,代碼來源:div.-res.php

示例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'));
 }
開發者ID:atifzaidi,項目名稱:shwups-cms,代碼行數:8,代碼來源:serverInterface_Cms.class.php

示例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;
 }
開發者ID:atifzaidi,項目名稱:shwups-cms,代碼行數:28,代碼來源:Page.class.php

示例15: onBefore

 static function onBefore($fn, $pid)
 {
     if (Page($pid)->access() < 2) {
         return false;
     }
 }
開發者ID:atifzaidi,項目名稱:shwups-cms,代碼行數:6,代碼來源:serverInterface.php


注:本文中的Page函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。