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


PHP Pages::get方法代码示例

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


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

示例1: index

 public function index()
 {
     Cache::loadPage('', 30);
     $inputData = array();
     $postid = 0;
     Model::loadWithPath('page', System::getThemePath() . 'model/');
     if (!($match = Uri::match('page\\/(.*?)\\.html$'))) {
         Redirect::to('404page');
     }
     $friendly_url = addslashes($match[1]);
     $loadData = Pages::get(array('cacheTime' => 30, 'where' => "where friendly_url='{$friendly_url}'"));
     if (!isset($loadData[0]['pageid'])) {
         Redirect::to('404page');
     }
     $inputData = $loadData[0];
     $postid = $loadData[0]['pageid'];
     if (Uri::isNull()) {
         System::setTitle(ucfirst($loadData[0]['title']));
     }
     $keywords = isset($loadData[0]['keywords'][4]) ? $loadData[0]['keywords'] : System::getKeywords();
     System::setKeywords($keywords);
     if ($loadData[0]['page_type'] == 'fullwidth') {
         self::makeContent('pageFullWidth', $inputData);
     } else {
         self::makeContent('page', $inputData);
     }
     Cache::savePage();
 }
开发者ID:neworldwebsites,项目名称:noblessecms,代码行数:28,代码来源:themePage.php

示例2: form

 public function form()
 {
     $this->views = new Views(new Template("admin"));
     Phalanx::loadClasses('Pages');
     $this->views->data = Pages::get($this->get->page_id);
     $this->views->display('pages_form.phtml');
 }
开发者ID:alegalliard,项目名称:aug,代码行数:7,代码来源:PagesController.php

示例3: insertProcess

function insertProcess()
{
    $send = Request::get('send');
    $valid = Validator::make(array('send.title' => 'min:1|slashes', 'send.content' => 'min:1', 'send.keywords' => 'slashes', 'send.page_type' => 'slashes', 'send.allowcomment' => 'slashes'));
    if (!$valid) {
        throw new Exception("Error Processing Request: " . Validator::getMessage());
    }
    $friendlyUrl = trim(String::makeFriendlyUrl($send['title']));
    $getData = Pages::get(array('where' => "where friendly_url='{$friendlyUrl}'"));
    if (isset($getData[0]['pageid'])) {
        throw new Exception("This page exists in database.");
    }
    $uploadMethod = Request::get('uploadMethod');
    switch ($uploadMethod) {
        case 'frompc':
            if (Request::hasFile('imageFromPC')) {
                if (Request::isImage('imageFromPC')) {
                    $send['image'] = File::upload('imageFromPC');
                }
            }
            break;
        case 'fromurl':
            if (Request::isImage('imageFromUrl')) {
                $url = Request::get('imageFromUrl');
                $send['image'] = File::upload('uploadFromUrl');
            }
            break;
    }
    if (!($id = Pages::insert($send))) {
        throw new Exception("Error. " . Database::$error);
    }
}
开发者ID:neworldwebsites,项目名称:noblessecms,代码行数:32,代码来源:pages.php

示例4: pageProcess

function pageProcess($inputData)
{
    $match = Uri::match('^page-(\\d+)-(.*?)\\.html');
    if (!$match) {
        Redirect::to('404page');
        // Alert::make('Page not found');
    }
    $id = $match[1];
    $friendly_url = $match[2];
    $loadData = Pages::get(array('where' => "where pageid='{$id}' AND friendly_url='{$friendly_url}' AND status='1'"));
    if (!isset($loadData[0]['title'])) {
        Redirect::to('404page');
        // Alert::make('Page not found');
    }
    $inputData['title'] = $loadData[0]['title'];
    $inputData['content'] = $loadData[0]['content'];
    $inputData['page_type'] = $loadData[0]['page_type'];
    if (strlen($loadData[0]['keywords']) > 5) {
        $inputData['keywords'] = $loadData[0]['keywords'];
    }
    return $inputData;
}
开发者ID:neworldwebsites,项目名称:noblessecms,代码行数:22,代码来源:page.php

示例5: edit

 public function edit()
 {
     if (!($match = Uri::match('\\/edit\\/(\\d+)'))) {
         Redirect::to(ADMINCP_URL . 'pages/');
     }
     $pageid = $match[1];
     $post = array('alert' => '');
     if (Request::has('btnSave')) {
         try {
             updateProcess($pageid);
             $post['alert'] = '<div class="alert alert-success">Save changes success.</div>';
         } catch (Exception $e) {
             $post['alert'] = '<div class="alert alert-warning">' . $e->getMessage() . '</div>';
         }
     }
     $loadData = Pages::get(array('where' => "where pageid='{$pageid}'", 'isHook' => 'no', 'cache' => 'no'));
     $post['edit'] = $loadData[0];
     System::setTitle('Edit page - ' . ADMINCP_TITLE);
     View::make('admincp/head');
     self::makeContents('pagesEdit', $post);
     View::make('admincp/footer');
 }
开发者ID:neworldwebsites,项目名称:noblessecms,代码行数:22,代码来源:controlPages.php

示例6: getPage

 /**
  * Get a page from IMDb, which will be cached in memory for repeated use
  * @param string $context Name of the page or some other context to build the URL with to retrieve the page
  * @return string
  */
 protected function getPage($context = null)
 {
     return $this->pages->get($this->buildUrl($context));
 }
开发者ID:riverstore,项目名称:imdbphp,代码行数:9,代码来源:MdbBase.php

示例7: getPages

 private function getPages()
 {
     $allPages = new Pages(new OneDimension($this->orygWidth, $this->leftRightMargin, $this->width), new OneDimension($this->orygHeight, $this->topBottomMargin, $this->height), $this->sep);
     return $allPages->get();
 }
开发者ID:drezynsoft,项目名称:split-image,代码行数:5,代码来源:FilesData.php

示例8:

@extends('layouts.qlm_administrator')
@section('content')
<?php 
$_countPage = DB::table('qlm_pagedetails')->count();
$pages = Pages::get();
?>
  <!-- Page Heading -->
<div id="errorMessage" class="alert alert-success" style="display: none;">Delete page successfully!</div>
                <div class="row">
                    <div class="col-lg-12">
                        <h1 class="page-header">
                             List of pages
                        </h1>
                    </div>
                </div>
                <!-- /.row -->
                <div class="row">
                    <div class="col-lg-12 col-md-12">
                        <div class="panel panel-primary">
                            <div class="panel-heading">
                                <div class="row">
                                    <div class="col-xs-3">
                                        <i class="fa fa-edit fa-5x"></i>
                                    </div>
                                    <div class="col-xs-9 text-right">
                                        <div class="huge">{{ $_countPage }}</div>
                                        <div>pages in database!</div>
                                    </div>
                                </div>
                            </div>
                            <a href="{{asset('qlm-admin/add-new-page')}}">
开发者ID:ndmson,项目名称:QLM,代码行数:31,代码来源:pages.blade.php


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