當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。