本文整理汇总了PHP中data::gennews方法的典型用法代码示例。如果您正苦于以下问题:PHP data::gennews方法的具体用法?PHP data::gennews怎么用?PHP data::gennews使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类data
的用法示例。
在下文中一共展示了data::gennews方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: data
<?php
$data = new data();
$id = $_SESSION['user']['id'] ? $_SESSION['user']['id'] : $_COOKIE['user_id'];
$result = $data->vipnews($id, 6);
$result1 = $data->gennews($id, 6);
if (isset($_SESSION['idnews'])) {
$idnews = $_SESSION['idnews'];
}
if (Route::dispatcher() == "vip-news") {
$result = $data->vipnews($id, 0);
?>
<div class = "news-page-title">VIP-Новости</div>
<div><?php
echo $result;
?>
</div>
<div class = "clear"></div>
<?php
} elseif (Route::dispatcher() == "gen-news") {
$result2 = $data->gennews($id, 0);
?>
<div class = "news-page-title">Новости</div>
<div><?php
echo $result2;
?>
</div>
<div class = "clear"></div>
示例2: data
<?php
$data = new data();
if (isset($_SESSION['idnews'])) {
$idnews = $_SESSION['idnews'];
}
?>
<?php
if (Route::dispatcher() == "gen-news") {
?>
<?php
$result1 = $data->gennews(0);
?>
<div class = "news-page-title">Новости</div>
<div><?php
echo $result1;
?>
</div>
<div class = "clear"></div>
<?php
} elseif (Route::dispatcher() == "view-news") {
?>
<?php
$result = $data->viewnews($idnews);
?>
<?php
echo $result;
?>