本文整理汇总了PHP中RSS::rotowire方法的典型用法代码示例。如果您正苦于以下问题:PHP RSS::rotowire方法的具体用法?PHP RSS::rotowire怎么用?PHP RSS::rotowire使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类RSS
的用法示例。
在下文中一共展示了RSS::rotowire方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: foreach
function affiche_news_ticker($id_pool, $id_saison, $rss_feed, $last_time_rss, $rssData, $sess)
{
echo "<div id=\"slider1\" class=\"contentslide\">\n";
echo "<div class=\"opacitylayer\">\n";
$newsA = $this->getNews($id_pool, $id_saison);
if (count($newsA) > 0) {
foreach ($newsA as $index => $news) {
//$news = str_replace("\"","\\\"",$news);
echo "<div class=\"contentdiv\">\n";
echo $news;
echo "</div>\n";
}
// Feed RSS
if ($rss_feed == "Y") {
if (time() - $last_time_rss > 600 || $rssData == "") {
$RSSread = new RSS();
if ($RSSread->rotowire($titleA, $contentA, $linkA)) {
foreach ($titleA as $my_index => $title) {
$title = trim($title);
$content = trim($contentA[$my_index]);
$link = trim($linkA[$my_index]);
if ($title == "") {
continue;
}
$my_rssData[] = "<i><u>{$title}</u></i><br><a href='{$link}' target='_blank' style='color: white;'>{$content}</a>";
echo "<div class=\"contentdiv\">\n";
echo "<i><u>{$title}</u></i><br><a href='{$link}' target='_blank' style='color: white;'>{$content}</a>";
echo "</div>\n";
}
}
$sess->setSessVar('rssData', $my_rssData);
$sess->setSessVar('last_time_rss', time());
} else {
if (count($rssData) > 0) {
foreach ($rssData as $rss_item) {
$my_rssData[] = $rss_item;
echo "<div class=\"contentdiv\">\n";
echo $rss_item;
echo "</div>\n";
}
}
}
}
} else {
// Feed RSS
if ($rss_feed == "Y") {
if (time() - $last_time_rss > 600 || $rssData == "") {
$RSSread = new RSS();
if ($RSSread->rotowire($titleA, $contentA, $linkA)) {
foreach ($titleA as $my_index => $title) {
$title = trim($title);
$content = trim($contentA[$my_index]);
$link = trim($linkA[$my_index]);
if ($title == "") {
continue;
}
$my_rssData[] = "<i><u>{$title}</u></i><br><a href='{$link}' target='_blank' style='color: white;'>{$content}</a>";
echo "<div class=\"contentdiv\">\n";
echo "<i><u>{$title}</u></i><br><a href='{$link}' target='_blank' style='color: white;'>{$content}</a>";
echo "</div>\n";
}
} else {
}
$sess->setSessVar('rssData', $my_rssData);
$sess->setSessVar('last_time_rss', time());
} else {
if (count($rssData) > 0) {
$index_rendu = count($newsA);
foreach ($rssData as $rss_item) {
$my_rssData[] = $rss_item;
echo "<div class=\"contentdiv\">\n";
echo $rss_item;
echo "</div>\n";
}
} else {
}
}
} else {
}
}
echo "</div>\n";
echo "</div>\n";
echo "<div class=\"pagination\" id=\"paginate-slider1\"></div>\n";
echo "<script type=\"text/javascript\">\n";
//Define: ContentSlider("slider_ID", [autorotate_miliseconds], [custompaginatelinkstext], [customnextlinktext])
echo "ContentSlider(\"slider1\",8000)\n";
echo "</script>\n";
unset($newsA, $RSSread, $title, $content, $my_rssData, $index_rendu, $pool, $sess);
}