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


PHP News::getNews方法代码示例

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


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

示例1: actionIndex

 /**
  * Action для страницы "Новости"
  */
 public function actionIndex()
 {
     $categories = Category::getCategoriesList();
     $news = News::getNews();
     require_once ROOT . '/views/news/index.php';
     return true;
 }
开发者ID:KazakovVS,项目名称:Store,代码行数:10,代码来源:NewsController.php

示例2: run

 public function run()
 {
     $news = News::getNews($this->offset, $this->limit, $this->type);
     switch ($this->type) {
         case 1:
             $this->echoPicText($news);
             break;
         case 2:
             $this->echoPic($news);
             break;
     }
 }
开发者ID:ancon,项目名称:ptLive,代码行数:12,代码来源:live.php

示例3: News

*/
define('LANG_FILE', 'editor.php');
define('NO_2LEVEL_CHK', 1);
require_once $root_path . 'include/inc_front_chain_lang.php';
require_once $root_path . 'include/inc_cafe_get_menu.php';
$returnfile = $_SESSION['sess_file_return'] . URL_APPEND;
$breakfile = $_SESSION['sess_file_break'] . URL_APPEND;
$dept_nr = 2;
/* 2= cafeteria */
if (!isset($mode)) {
    $mode = '';
}
/* Get the news article */
require_once $root_path . 'include/care_api_classes/class_news.php';
$newsobj = new News();
$news =& $newsobj->getNews($nr);
# Start Smarty templating here
/**
 * LOAD Smarty
 */
# Note: it is advisable to load this after the inc_front_chain_lang.php so
# that the smarty script can use the user configured template theme
require_once $root_path . 'gui/smarty_template/smarty_care.class.php';
$smarty = new smarty_care('common');
# Hide the title bar
$smarty->assign('bHideTitleBar', TRUE);
$smarty->assign('news_normal_display_width', $news_normal_display_width);
# Headline title
$smarty->assign('LDHeadline', $LDCafeNews);
# Collect javascript code
ob_start();
开发者ID:patmark,项目名称:care2x-tz,代码行数:31,代码来源:cafenews-read.php

示例4: getPage

 public function getPage()
 {
     $back = '';
     $back .= "\n\t\t\t<div id='xy_jobTwo_body'>\n\t\t\t\t<div>\n\t\t\t\t\t<img src='{$this->arr['root_dir']}img/xy/jobTwo.jpg' class='xy_jobTwo_img'/>\n\t\t\t\t</div>\n\t\t";
     $page1 = 1;
     $page2 = 1;
     $page_str = $this->arr['news_page'];
     $news = new News($this->arr);
     foreach ($this->arr['xml']->header->nav->li as $li) {
         if (strtolower($li['kind']) === 'a4') {
             foreach ($li->span as $span) {
                 $title = strtolower($span['title']);
                 $skind = strtolower($span['kind']);
                 $news_type = (int) $span['news-type'];
                 if ($page_str === 1) {
                     $page = 1;
                 } else {
                     $kind = substr($page_str, 0, 2);
                     if ($kind === $skind) {
                         $arr = explode('_', $page_str);
                         $page = (int) $arr[1];
                     } else {
                         $page = 1;
                     }
                 }
                 $back .= $news->getNews($news_type, $title, $page, 9, array('kind' => "{$skind}"), 'wrapNews2');
                 $back .= "</div>";
             }
         }
     }
     return $back;
 }
开发者ID:AJLoveChina,项目名称:meAjax,代码行数:32,代码来源:page.php

示例5: actionIndex

 /**
  * Action для страницы "Управление новостями"
  */
 public function actionIndex()
 {
     $newsList = News::getNews();
     require_once ROOT . '/views/admin_news/index.php';
     return true;
 }
开发者ID:KazakovVS,项目名称:Store,代码行数:9,代码来源:AdminNewsController.php

示例6: News

<?php

include_once "../includes/webservice.inc.php";
$webService = new Webservices_Writer();
$webService->init();
/* to get news details */
$news = new News();
$result = $news->getNews();
if (count($result) > 0) {
    $webService->createXMLInstance();
    $webService->appendArrayToRootNode('', $result);
    $webService->displayXML();
}
/* end */
开发者ID:rapsody,项目名称:HeartwebApp,代码行数:14,代码来源:news.php

示例7: NewsComponent

<?php

$page = PageContent::getInstance();
$id = Url::getCurrentUrl()->getQueryVar('id');
$news = News::getNews($id);
$page->addComponent(new NewsComponent($news));
开发者ID:KasaiDot,项目名称:Zero-Fansub-website,代码行数:6,代码来源:news2.php

示例8: showAction

 public function showAction()
 {
     $matches = MatchController::getQueryBuilder()->sortBy('time')->reverse()->limit(6)->fromPage(1);
     return array("matches" => $matches->getModels(), "news" => News::getNews(0, 5));
 }
开发者ID:blast007,项目名称:bzion,代码行数:5,代码来源:HomeController.php


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