1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | <?php # Copyright by Manuel Staechele # Support www.ilch.de defined ( 'main' ) or die ( 'no direct access' ); $query = "SELECT a.id, a.name, a.rep, c.erst as last, c.id as pid, c.time, b.name AS fname FROM prefix_topics a LEFT JOIN prefix_forums b ON b.id = a.fid LEFT JOIN prefix_posts c ON c.id = a.last_post_id LEFT JOIN prefix_groupusers vg ON vg.uid = ".$_SESSION['authid']." AND vg.gid = b.view LEFT JOIN prefix_groupusers rg ON rg.uid = ".$_SESSION['authid']." AND rg.gid = b.reply LEFT JOIN prefix_groupusers sg ON sg.uid = ".$_SESSION['authid']." AND sg.gid = b.start WHERE (( ".$_SESSION['authright']." <= b.view AND b.view < 1) OR ( ".$_SESSION['authright']." <= b.reply AND b.reply < 1) OR ( ".$_SESSION['authright']." <= b.start AND b.start < 1) OR vg.fid IS NOT NULL OR rg.fid IS NOT NULL OR sg.fid IS NOT NULL OR -9 >= ".$_SESSION['authright']." ) ORDER BY c.time DESC LIMIT 0,6"; echo '<table width="100%" cellpadding="0" cellspacing="0" border="0">' ; $resultID = db_query( $query ); while ( $row = db_fetch_assoc( $resultID )) { $row [ 'date' ] = date ( 'd.m.y - H:i' , $row [ 'time' ]); $row [ 'page' ] = ceil ( ( $row [ 'rep' ]+1) / $allgAr [ 'Fpanz' ] ); echo '<tr><td align="center" height="35" width="40"><img src="include/images/icons/page.png" /></td><td><a style="color:#feae01; font-size:11px; font-weight:bold;" href="index.php?forum-showposts-' . $row [ 'id' ]. '-p' . $row [ 'page' ]. '#' . $row [ 'pid' ]. '" title="' . $row [ 'date' ]. '">' .(( strlen ( $row [ 'name' ])<30) ? $row [ 'name' ] : substr ( $row [ 'name' ],0,15). '...' ). '</a><br><span style="font-size:9px">' . $row [ 'fname' ]. '</span></td></tr><tr><td colspan="2" height="1" bgcolor="#cccccc"></td></tr>' ; } echo '</table>' ; ?> |