<?
include_once("$INCLUDE_DIR/xml.inc");
if(!isset($_GET['file']))
$file = 'news';
else
$file = $_GET['file'];
function nav_links($start, $pos, $num_parsed, $limsize, $cpage)
{
$num_parsed--;
if($start > 0 || $num_parsed > $pos)
{
echo '<div class="commonMain">';
echo '<div class="commonContent boldlinks">';
if($start > 0)
{
echo '<div' . (($num_parsed > $pos) ? ' class="float"' : '') . ">\n";
echo '<a href="/?content=parse&file='. $cpage . '&start='
. ($start - $limsize) . '"><<< Prev</a>';
echo "\n<br /></div>\n";
}
if($num_parsed > $pos)
{
echo "<div class=\"right\">\n";
echo '<a href="/?content=parse&file=' . $cpage . '&start='
. ($start + $limsize) . '">Next >>></a>';
echo "\n</div>\n";
}
echo "\n</div>\n</div>\n";
}
}
$parsed = get_items("rss/$file.rss");
$start = 0;
if(isset($_GET['start']))
$start = $_GET['start'];
if($start < 0) $start = 0;
if(isset($_GET['id']))
{
$id = $_GET['id'];
$pn = id2pagenum($parsed, $id);
if($pn >= 0) $start = $pn;
}
$limsize = 10;
$limit = $start + $limsize;
// nav_links($start, $limit - 1, count($parsed['title']), $limsize, $file);
$tpl_data = read_file("templates/$file.tmpl");
$mod_lnk = "<a href=\"/?content=modify&file=$file";
for($i = $start; $i < count($parsed['title']) && $i < $limit; $i++)
{
if(isset($username))
echo data_2_html($parsed, $i, $tpl_data,
'<div class="right" style="border-top: 1px solid black; margin-top: 15px; padding: .5em">'.
"$mod_lnk&mode=add&where=-1\">Add last</a>\n | ".
"$mod_lnk&mode=add&where=$i\">Add here</a>\n | ".
"$mod_lnk&mode=modify&where=$i\">Modify</a>\n | ".
"$mod_lnk&mode=delete&where=$i\">Delete</a>\n".
'</div>' );
else
echo data_2_html($parsed, $i, $tpl_data);
}
nav_links($start, $limit - 1, count($parsed['title']), $limsize, $file);
?>
Latest News
Latest Software
read 0.3.6
kal, 2004/04/30 07:14:24.
nroff 1.10
kal, 2004/04/22 08:29:10.
Nenscript 1.13.3
kal, 2004/04/22 08:23:53.
necho 0.2.3
kal, 2004/04/19 10:58:47.
dgrep 0.1.4
kal, 2004/04/19 10:49:42.
kal, 2004/04/30 07:14:24.
nroff 1.10
kal, 2004/04/22 08:29:10.
Nenscript 1.13.3
kal, 2004/04/22 08:23:53.
necho 0.2.3
kal, 2004/04/19 10:58:47.
dgrep 0.1.4
kal, 2004/04/19 10:49:42.
Select Theme
Links