Line 112... |
Line 94... |
112 |
if ($formatdate=='jm') {$res .= strftime('%d.%m',strtotime($date)).': ';}
|
94 |
if ($formatdate=='jm') {$res .= strftime('%d.%m',strtotime($date)).': ';}
|
113 |
if ($formatdate=='jma') {$res .= strftime('%d.%m.%Y',strtotime($date)).': ';}
|
95 |
if ($formatdate=='jma') {$res .= strftime('%d.%m.%Y',strtotime($date)).': ';}
|
114 |
if ($formatdate=='jmh') {$res .= strftime('%d.%m %H:%M',strtotime($date)).': ';}
|
96 |
if ($formatdate=='jmh') {$res .= strftime('%d.%m %H:%M',strtotime($date)).': ';}
|
115 |
if ($formatdate=='jmah') {$res .= strftime('%d.%m.%Y %H:%M',strtotime($date)).': ';}
|
97 |
if ($formatdate=='jmah') {$res .= strftime('%d.%m.%Y %H:%M',strtotime($date)).': ';}
|
- |
|
98 |
$res .= '<a class="lien_rss" href="'.$href;
|
- |
|
99 |
if ($nouvelle_fenetre==1) $res .= '" onclick="window.open(this.href); return false;';
|
- |
|
100 |
$res .= '">'.$title.'</a></li>'."\n";
|
- |
|
101 |
}
|
- |
|
102 |
}
|
- |
|
103 |
else {
|
- |
|
104 |
$i=0;
|
- |
|
105 |
foreach ($rss->items as $item) {
|
- |
|
106 |
$href = $item['link'];
|
- |
|
107 |
$title = $item['title'];
|
- |
|
108 |
$res .= '<li class="titre_rss">'."\n";
|
- |
|
109 |
if (isset($item['pubdate'])) $date=$item['pubdate'];
|
- |
|
110 |
elseif ((!isset($item['pubdate']))and(isset($item['date_timestamp']))) $date=$item['date_timestamp'];
|
- |
|
111 |
else $formatdate='';
|
- |
|
112 |
if ($formatdate=='jm') {$res .= strftime('%d.%m',strtotime($date)).': ';}
|
- |
|
113 |
if ($formatdate=='jma') {$res .= strftime('%d.%m.%Y',strtotime($date)).': ';}
|
- |
|
114 |
if ($formatdate=='jmh') {$res .= strftime('%d.%m %H:%M',strtotime($date)).': ';}
|
- |
|
115 |
if ($formatdate=='jmah') {$res .= strftime('%d.%m.%Y %H:%M',strtotime($date)).': ';}
|
116 |
$res .= '<a class="lien_rss" href="'.$href;
|
116 |
$res .= '<a class="lien_rss" href="'.$href;
|
117 |
if ($nouvelle_fenetre==1) $res .= '" onclick="window.open(this.href); return false;';
|
117 |
if ($nouvelle_fenetre==1) $res .= '" onclick="window.open(this.href); return false;';
|
118 |
$res .= '">'.$title.'</a></li>'."\n";
|
118 |
$res .= '">'.$title.'</a></li>'."\n";
|
119 |
$i++;
|
119 |
$i++;
|
120 |
if ($i>=$nb) break;
|
120 |
if ($i>=$nb) break;
|
121 |
}
|
121 |
}
|
122 |
}
|
122 |
}
|
123 |
$res .= '</ul>'."\n";
|
123 |
$res .= '</ul>'."\n";
|
124 |
}
|
124 |
}
|
125 |
//echo '<pre>'.var_dump($rss->items).'</pre><br /><br />';
|
125 |
//echo '<pre>'.var_dump($rss->items).'</pre><br /><br />';
|
126 |
return $res;
|
126 |
return $res;
|
127 |
}
|
127 |
}
|
128 |
?>
|
128 |
?>
|