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


PHP News::getAll方法代码示例

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


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

示例1: actionAll

 public function actionAll()
 {
     $items = News::getAll();
     $view = new View();
     $view->items = $items;
     $view->display('view.php');
 }
开发者ID:serjnobelev,项目名称:web,代码行数:7,代码来源:NewsController.php

示例2: actionAll

 public function actionAll()
 {
     $news = News::getAll();
     $view = new View();
     $view->items = $news;
     $view->display('news/all.php');
 }
开发者ID:Alex4S,项目名称:beta,代码行数:7,代码来源:NewsController.php

示例3: actionOne

 public function actionOne()
 {
     $id = $_GET['id'];
     $items = News::delOne($id);
     News::getAll();
     require_once __DIR__ . '/../views/one.php';
 }
开发者ID:razvedos201,项目名称:stz,代码行数:7,代码来源:NewsController.php

示例4: actionGetAll

 public function actionGetAll()
 {
     $NewsItems = News::getAll();
     $ViewObj = new View();
     $ViewObj->assign('items', $NewsItems);
     $template = 'news/news_view.php';
     $ViewObj->display($template);
 }
开发者ID:Alexandr1987,项目名称:barricade,代码行数:8,代码来源:NewsController.php

示例5: indexAction

 public function indexAction()
 {
     $this->view->Title = "Management news";
     $this->view->headTitle($this->view->Title);
     $page = $this->getRequest()->getParam('page');
     $condition = array();
     list($this->view->Pager, $this->view->News) = News::getAll($condition, $page);
 }
开发者ID:hoaitn,项目名称:base-zend,代码行数:8,代码来源:NewsController.php

示例6: indexAction

 public function indexAction()
 {
     $group = $this->getRequest()->getParam("group");
     $condition = array("group_id=?" => $group);
     $page = $this->getRequest()->getParam('page');
     list($this->view->Pager, $this->view->News) = News::getAll($condition, $page, 10, $order = 'id DESC');
     $this->view->Group = $group;
     $GroupName = NewGroup::getById($group);
     $this->view->Title = $GroupName->name;
     $this->view->headTitle($this->view->Title);
 }
开发者ID:hoaitn,项目名称:base-zend,代码行数:11,代码来源:NewsController.php

示例7: actionAll

 public function actionAll()
 {
     $items = News::getAll();
     include __DIR__ . '/../views/news/all.php';
 }
开发者ID:cadaver1986,项目名称:kurs,代码行数:5,代码来源:NewsController.php

示例8: 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

示例9: News

<?php

/**
 * Created by PhpStorm.
 * User: Alex Sandiyarov
 * Date: 13.12.15
 * Time: 12:17
 */
$news = new News();
$a = $news->getAll();
var_dump($a);
//$news->add($data);
//$news->update($title2, $id);
$a = new sql();
$a->get('*', 'news', 'ORDER BY date DESC');
print_r($a->packToArray());
print_r($a->get('*', 'news', 'WHERE  id = 4'));
$a->insert('news', 'id, title', '"34543435434534353453455", "sadsadas"');
$a->update('news', 'title = "KUKU"', '4');
开发者ID:Alex4S,项目名称:beta,代码行数:19,代码来源:index.php

示例10: News

        //Vars
        $news_title = $selectNewsArticle['news_title'];
        $news_desc = $selectNewsArticle['news_description'];
        $news_content = $selectNewsArticle['news_content'];
        //View
        include 'views/admin_page.php';
        break;
    case 'logout':
        // View
        include 'views/logout.php';
        break;
    case 'policy':
        // View
        include 'views/policy.php';
        break;
        //Default Page
    //Default Page
    default:
        // Model
        $News = new News();
        $getNews = $News->getAll();
        $Section1 = new Section1();
        $getSection1 = $Section1->getAll();
        // View
        include "views/navigation.php";
        include 'views/header.php';
        include 'views/home.php';
        break;
}
//Footer
include "views/footer.php";
开发者ID:MuhoX,项目名称:ProjectMD-IV,代码行数:31,代码来源:index.php

示例11: DB

<?php

require_once __DIR__ . './classes/DB.php';
require_once __DIR__ . './models/news.php';
$db = new DB();
$items = $db->query('SELECT * FROM news');
$news = new News();
$items = News::getAll();
include __DIR__ . '/view/index.php';
phpinfo();
开发者ID:gulnyr,项目名称:dz2,代码行数:10,代码来源:index.php

示例12: actionAll

 public function actionAll()
 {
     $newsItems = News::getAll();
     include __DIR__ . "/../views/newsAll.php";
 }
开发者ID:nltsm,项目名称:test,代码行数:5,代码来源:NewsController.php


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