本文整理汇总了PHP中Newsletter::getFields方法的典型用法代码示例。如果您正苦于以下问题:PHP Newsletter::getFields方法的具体用法?PHP Newsletter::getFields怎么用?PHP Newsletter::getFields使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Newsletter
的用法示例。
在下文中一共展示了Newsletter::getFields方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Newsletter
<?php
include "includes/functions.inc";
$news = null;
$next_link = null;
$previous_link = null;
$del = Tools::valueGet("news_id");
if ($news_id = Tools::valueGet("news_id")) {
$news = new Newsletter($news_id);
$newsletter = $news->getFields();
$del = $news_id;
} else {
$news = new Newsletter($school->getLastNewsId());
$newsletter = $news->getFields();
$del = $news->getID();
}
if ($news_id = $news->getNextId($school->getId())) {
$next_link = $news_id;
} else {
$next_link = $school->getLastNewsId();
}
if ($news_id = $news->getPreviousId($school->getId())) {
$previous_link = $news_id;
} else {
$previous_link = $school->getLastNewsId();
}
//echo $user->getType();
if ($user->getType() == "parent") {
include "app/parent/news_letter.php";
} elseif ($user->getType() == "admin") {
$delete_link = "process/workers/del_news.php?guid={$del}";
示例2: Newsletter
<?php
if ($news_id = $school->getLastNewsId()) {
$news = new Newsletter($news_id);
$news_row = $news->getFields();
$date = date("F j, Y", strtotime($news_row['date']));
echo "<a href=\"news_letter.php?guid={$news_row['news_id']}\">\n <section class=\"widget bg-primary material-shadow\" data-toggle=\"tooltip\" data-placement=\"bottom\" title=\"\" data-original-title=\"Newsletter: {$news_row['title']}\">\n <div class=\"equal-blocks\">\n <div class=\"col-xs-6 block\">\n <div class=\"text-center\">\n <i class=\"fa fa-envelope-o fa-5x\"></i>\n <h6 class=\"text-uppercase\">News Letter</h6>\n </div>\n </div>\n <div class=\"col-xs-6 block bg-primary brtr brbr p15\">\n <div class=\"arrow left\"></div>\n <div class=\"widget-body\">\n <em>\n {$news_row['title']}<br>\n <span class=\"small\">{$date}</p></em>\n </div>\n </div>\n </div>\n </section>\n </a>";
} else {
echo "\n <section class=\"widget bg-primary material-shadow\" data-toggle=\"tooltip\" data-placement=\"bottom\" title=\"\" data-original-title=\"No Newsletter\">\n <div class=\"equal-blocks\">\n <div class=\"col-xs-6 block\">\n <div class=\"text-center\">\n <i class=\"fa fa-envelope-o fa-5x\"></i>\n <h6 class=\"text-uppercase\">News Letter</h6>\n </div>\n </div>\n <div class=\"col-xs-6 block bg-primary brtr brbr p15\">\n <div class=\"arrow left\"></div>\n <div class=\"widget-body\">\n <em>School Management hasn't updated any News Letter\n <a></a><br>\n <a class=\"small\"></a></em>\n </div>\n </div>\n </div>\n </section>";
}