gaim/www
Clone
Summary
Browse
Changes
Graph
Make a note of the Glib 2.8.x problems. Also add a link to the gnome bugzilla for the window obscured detection not working.
2006-01-10, Daniel Atallah
a6049f693d90
Make a note of the Glib 2.8.x problems. Also add a link to the gnome bugzilla for the window obscured detection not working.
<?
$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
"
;
}
?>