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


PHP News::getOne方法代码示例

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


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

示例1: actionOne

 public function actionOne()
 {
     $id = isset($_GET['id']) ? $_GET['id'] : 1;
     $view = new View();
     $page = new PageController();
     $view->assign('item', News::getOne($id));
     $view->assign('links', $page->createLink($this->ctrl));
     $view->display($this->view_one);
 }
开发者ID:alexx-gsm,项目名称:php_blog,代码行数:9,代码来源:AbstractController.php

示例2: actionOne

 public function actionOne()
 {
     $id = $_GET['id'];
     $news = News::getOne($id);
     $view = new View();
     $view->item = $news;
     $view->display('news/one.php');
 }
开发者ID:Alex4S,项目名称:beta,代码行数:8,代码来源:NewsController.php

示例3: actionOne

 public function actionOne()
 {
     echo 'act';
     die;
     $id = $_GET['id'];
     $item = News::getOne($id);
     include __DIR__ . '/../view/news/one.php';
 }
开发者ID:gulnyr,项目名称:dz22,代码行数:8,代码来源:NewsController.php

示例4: actionOne

 public function actionOne()
 {
     $id = $_GET['id'];
     $item = News::getOne($id);
     $view = new View();
     $view->assign('item', $item);
     $view->display('news/one.php');
 }
开发者ID:asart,项目名称:phpversus2,代码行数:8,代码来源:NewsController.php

示例5: actionGetOne

 public function actionGetOne()
 {
     $RecId = isset($_GET['id']) ? (int) $_GET['id'] : null;
     $Item = News::getOne($RecId);
     $ViewObj = new View();
     $ViewObj->assign('item', $Item);
     $template = 'news/news_one_view.php';
     $ViewObj->display($template);
 }
开发者ID:Alexandr1987,项目名称:barricade,代码行数:9,代码来源:NewsController.php

示例6: actionOne

 public function actionOne()
 {
     // echo 'actionOne';    //die; //$id- то что хочет пользователь
     $id = $_GET['id'];
     //echo $id;die;
     $item = News::getOne($id);
     //var_dump($item);die;
     include __DIR__ . '/../views/news/one.php';
 }
开发者ID:Oksana-999,项目名称:test_3,代码行数:9,代码来源:NewsController.php

示例7: actionOne

 public function actionOne()
 {
     $id = $_GET['id'];
     $news_one = News::getOne($id);
     $view = new View();
     // Объекс отображение
     //$view->assign('item', $news_one); //Параметры
     $view->display('news/one.php');
     // Подключение шаблона
     //include __DIR__.'/../views/news/one.php';
 }
开发者ID:believe2013,项目名称:urok5,代码行数:11,代码来源:NewsController.php

示例8: actionOne

 public function actionOne()
 {
     // echo 'actionOne';
     $id = $_GET['id'];
     $item = News::getOne($id);
     // echo json_encode($item);
     //die;
     //var_dump($item);
     $view = new View();
     $view->item = $item;
     /*$view->assign('item', $item);
       $view->render('news/one.php');*/
     $view->display('news/one.php');
 }
开发者ID:Elbar,项目名称:AdvancedPHP,代码行数:14,代码来源:NewsController.php

示例9: News

<?php

include 'config.php';
include 'classes/News.php';
include 'classes/DataBase.php';
include 'classes/AddNews.php';
$page = new News();
if (isset($_GET['id'])) {
    $id = (int) $_GET['id'];
    if ($id != 0) {
        $text = $page->getOne($id);
        echo $page->getBody($text, 'view');
    } else {
        exit('wrong');
    }
} else {
    $text = $page->getAll();
    echo $page->getBody($text, 'main');
}
开发者ID:bohdan1217,项目名称:repos,代码行数:19,代码来源:index.php

示例10: News

     include 'views/header.php';
     include 'views/home.php';
     break;
     // Register Page
 // Register Page
 case 'register':
     // View
     include "views/navigation.php";
     include "views/register.php";
     break;
     //News Page
 //News Page
 case 'news':
     // Model
     $News = new News();
     $getArticle = $News->getOne($id);
     // View
     include "views/navigation.php";
     include "views/news.php";
     break;
     //About Page
 //About Page
 case 'about':
     // Model
     $Section1 = new Section1();
     $getSection = $Section1->getOne($id);
     // View
     include "views/navigation.php";
     include "views/about.php";
     break;
     //Admin Login Page
开发者ID:MuhoX,项目名称:ProjectMD-IV,代码行数:31,代码来源:index.php

示例11: actionOne

 public function actionOne($id)
 {
     $items = News::getOne($id);
     include __DIR__ . '/../views/index.php';
 }
开发者ID:Koiephp,项目名称:inmag,代码行数:5,代码来源:newscontrollers.php

示例12: actionOne

 public function actionOne()
 {
     $id = isset($_GET['id']) ? $_GET['id'] : '2';
     $items = News::getOne($id);
     include __DIR__ . '/../views/view.php';
 }
开发者ID:serjnobelev,项目名称:web,代码行数:6,代码来源:NewsController.php


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