Ich bekomme leider diese Abfrage nicht sauber zum laufen und hab hier die Logik noch nicht ganz durchschauen können:
$MPL = db_make_sites ($page , "WHERE ".($katchoice == 'showallcats'?'':"news_kat = BINARY '$katchoice' AND ")."news_recht >= ".$_SESSION['authright'] , $limit , '?newslibrary'.($katchoice == 'showallcats'?'':'-'.$katchoice) , 'news' );
$anfang = ($page - 1) * $limit;
$abf = "SELECT
a.news_id,
a.news_title,
a.news_image,
a.news_preview,
a.news_kat as kat,
a.klicks,
DATE_FORMAT(a.news_time,'%d.%m.%Y') as datum,
DATE_FORMAT(a.news_time,'%W') as dayofweek,
DATE_FORMAT(a.news_time,'%H:%i') as zeit,
DATE_FORMAT(a.news_time,'%D') as day,
DATE_FORMAT(a.news_time,'%b') as month,
DATE_FORMAT(a.news_time,'%y') as year,
b.name as username,
b.id as uid,
a.edit_time,
c.id as eid,
c.name as editorname
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 (".($katchoice == 'showallcats'?'':"a.news_kat = BINARY '$katchoice' AND ")
.$_SESSION['authright']." <= a.news_recht) AND (((" . pow(2, abs($_SESSION['authright'])) . " | a.news_recht) = a.news_recht) OR
(a.news_groups != 0 AND ((a.news_groups ^ $groups) != (a.news_groups | $groups)))) AND $news_kat
`show` > 0 AND `show` <= UNIX_TIMESTAMP() AND a.news_id != $tn_id AND `archiv` != 1 AND
(endtime IS NULL OR endtime > UNIX_TIMESTAMP())
ORDER BY news_time DESC
LIMIT $anfang,$limit";
Bin also für jede Hilfe dankbar
Gruss sladee
betroffene Homepage: externer Link
Zuletzt modifiziert von sladee am 16.09.2013 - 22:34:39


