Hi ich suche ein Newsarchiv ohne Druckoption hat jemand so etwas oder weiß wo es sowas gibt.´?
Wenn nicht vieleicht wie man sowas macht?
Vielen Dank für eure Bemühungen und Hilfe.
Hier kann eine Notiz zum Merk-Eintrag hinzugefügt werden (optional)
| Geschlossen | ||

<?php
defined ('main') or die ( 'no direct access' );
$title = $allgAr['title'].' :: Newsarchiv';
$hmenu = 'Newsarchiv';
$design = new design ( $title , $hmenu );
$design->header();
$limit = 50;
$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();
?>

<tr class="Chead"><th>Titel</th><th>Author</th><th>Datum</th><th>Kategorie</th></tr>";
<tr class="Chead"><th>Titel</th><th>Author</th><th>Datum</th><th>Kommentare</th></tr>";
$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,
COUNT(c.id) 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
LEFT JOIN prefix_koms as c ON a.news_id = c.uid
WHERE ".$_SESSION['authright']." <= a.news_recht
OR a.news_recht = 0
GROUP BY a.news_id,a.news_title,a.news_time,b.name,b.id
ORDER BY news_time DESC
LIMIT ".$anfang.",".$limit;


| Geschlossen | ||
![]() |
Zurück zu Module und Modifikationen | |