本文整理汇总了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);
}
示例2: actionOne
public function actionOne()
{
$id = $_GET['id'];
$news = News::getOne($id);
$view = new View();
$view->item = $news;
$view->display('news/one.php');
}
示例3: actionOne
public function actionOne()
{
echo 'act';
die;
$id = $_GET['id'];
$item = News::getOne($id);
include __DIR__ . '/../view/news/one.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');
}
示例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);
}
示例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';
}
示例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';
}
示例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');
}
示例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');
}
示例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
示例11: actionOne
public function actionOne($id)
{
$items = News::getOne($id);
include __DIR__ . '/../views/index.php';
}
示例12: actionOne
public function actionOne()
{
$id = isset($_GET['id']) ? $_GET['id'] : '2';
$items = News::getOne($id);
include __DIR__ . '/../views/view.php';
}