So dann hab das hier mal kurz gemacht, eine neue Datei
include/contents/narchiv.php erstellen
<?php
defined ('main') or die ( 'no direct access' );
$title = $allgAr['title'].' :: Newsarchiv';
$hmenu = 'Newsarchiv';
$design = new design ( $title , $hmenu );
$design->header();
$limit = 20;
$page = ( $menu->getA(1) == 'p' ? $menu->getE(1) : 1 );
$MPL = db_make_sites ($page , "WHERE news_recht >= ".$_SESSION['authright'] , $limit , '?narchiv' , 'news' );
$anfang = ($page - 1) * $limit;
$abf = "SELECT
a.news_title as title,
a.news_id as id,
DATE_FORMAT(a.news_time,'%d. %m. %Y') as datum,
DATE_FORMAT(a.news_time,'%W') as dayofweek,
a.news_kat as kate,
b.name as username,
b.id as uid,
c.name as editor
FROM prefix_news as a
LEFT JOIN prefix_user as b ON a.user_id = b.id
LEFT JOIN prefix_user as c ON a.editor_id = c.id
WHERE ".$_SESSION['authright']." <= a.news_recht
OR a.news_recht = 0
ORDER BY news_time DESC
LIMIT ".$anfang.",".$limit;
echo "<table width=\"100%\">
<tr class=\"Chead\"><th>Titel</th><th>Author</th><th>Datum</th><th>Kategorie</th></tr>";
$erg = db_query($abf);
while ($row = db_fetch_object($erg)) {
echo "<tr class=\"Cnorm\"><td><a href=\"index.php?news-$row->id\">$row->title</a></td><td><a href=\"index.php?user-details-$row->uid\">$row->username</a>".(empty($row->editor) ? '':" (Last edit: $row->editor)")."</td><td>$row->datum</td><td>$row->kate</td></tr>";
}
echo "</table><br />
<div align=\"center\">$MPL</div>
";
$design->footer();
?>
und hier für
ohne Editor-Modul
<?php
defined ('main') or die ( 'no direct access' );
$title = $allgAr['title'].' :: Newsarchiv';
$hmenu = 'Newsarchiv';
$design = new design ( $title , $hmenu );
$design->header();
$limit = 20;
$page = ( $menu->getA(1) == 'p' ? $menu->getE(1) : 1 );
$MPL = db_make_sites ($page , "WHERE news_recht >= ".$_SESSION['authright'] , $limit , '?narchiv' , 'news' );
$anfang = ($page - 1) * $limit;
$abf = "SELECT
a.news_title as title,
a.news_id as id,
DATE_FORMAT(a.news_time,'%d. %m. %Y') as datum,
DATE_FORMAT(a.news_time,'%W') as dayofweek,
a.news_kat as kate,
b.name as username,
b.id as uid
FROM prefix_news as a
LEFT JOIN prefix_user as b ON a.user_id = b.id
WHERE ".$_SESSION['authright']." <= a.news_recht
OR a.news_recht = 0
ORDER BY news_time DESC
LIMIT ".$anfang.",".$limit;
echo "<table width=\"100%\">
<tr class=\"Chead\"><th>Titel</th><th>Author</th><th>Datum</th><th>Kategorie</th></tr>";
$erg = db_query($abf);
while ($row = db_fetch_object($erg)) {
echo "<tr class=\"Cnorm\"><td><a href=\"index.php?news-$row->id\">$row->title</a></td><td><a href=\"index.php?user-details-$row->uid\">$row->username</a></td><td>$row->datum</td><td>$row->kate</td></tr>";
}
echo "</table><br />
<div align=\"center\">$MPL</div>
";
$design->footer();
?>