gaim/www
Clone
Summary
Browse
Changes
Graph
Add Sametime to the list of supported protocols, add 'Novell' in front of GroupWise to match the About box, remove 'MSN window closing notification' from the feature list.
2006-03-20, Richard Laager
bb70bdbaeb5e
Add Sametime to the list of supported protocols, add 'Novell' in front of GroupWise to match the About box, remove 'MSN window closing notification' from the feature list.
<?
$page
->
title
=
'News'
;
require
(
'template.inc.php'
);
require
(
'news.inc.php'
);
?>
<div
id=
"rss"
>
Get
the
news
in
RSS
<a
href=
"/rss.php/news"
><img
src=
"/images/feed-icon.png"
width=
"24"
height=
"24"
border=
"0"
alt=
"XML"
/></a>
</div>
<?php
if
(
isset
(
$_GET
[
'start'
]))
$start
=
$_GET
[
'start'
];
else
$start
=
0
;
if
(
isset
(
$_GET
[
'limit'
]))
$limit
=
$_GET
[
'limit'
];
else
$limit
=
5
;
if
(
isset
(
$_GET
[
'id'
]))
$id
=
$_GET
[
'id'
];
else
$id
=
0
;
if
(
$id
==
0
)
$entries
=
load_news_range
(
$start
,
$limit
);
else
$entries
=
load_news_story
(
$id
);
foreach
(
$entries
as
$entry
)
{
print
"<br />
\n
"
;
print
"<h2 class=
\"
news
\"
>
$entry->title
</h2>
\n
"
;
print
"<div class=
\"
newsdate
\"
><a href=
\"
index.php?id="
.
$entry
->
id
.
"
\"
>
$entry->date
</a></div>
\n
"
;
foreach
(
$entry
->
paragraphs
as
$paragraph
)
{
print
"<p>"
.
$paragraph
.
"</p>
\n
"
;
}
}
if
(
$id
!=
0
)
{
print
"<a href=
\"
index.php
\"
>« Current News</a>"
;
}
else
{
print
"<table border=
\"
0
\"
width=
\"
100%
\"
>
\n
"
;
print
" <tr>
\n
"
;
print
" <td style=
\"
border: 0;
\"
>"
;
if
(
$start
>
0
)
{
print
"<a href=
\"
index.php?start="
;
print
((
$start
-
$limit
>
0
)
?
(
$start
-
$limit
)
:
0
);
print
"&limit=
$limit
\"
>« Newer News</a>"
;
}
else
{
print
" "
;
}
print
"</td>
\n
"
;
print
" <td align=
\"
right
\"
style=
\"
border: 0;
\"
>"
;
print
"<a href=
\"
index.php?start="
;
print
(
$start
+
$limit
);
print
"&limit=
$limit
\"
>"
;
print
"Older News »</a>"
;
print
"</td>
\n
"
;
print
" </tr>
\n
"
;
print
"</table>
\n
"
;
}
?>