Chiptuning, Auto Tuning und Motortuning
Chiptuning und Motortuning

Beiträge im Chiptuning Forum

Beiträge im Chiptuning Forum

sql_query($sql); $row_count = $db->sql_numrows($topicscount_query); //$max_count = $row_count/100; $max_count = $row_count/50; if($HTTP_GET_VARS[next]>0 && $HTTP_GET_VARS[next]<=$max_count) { $next = $HTTP_GET_VARS[next]; }else { $next=0; } // SQL statement to fetch active topics of public forums // ORDER BY p.post_time DESC LIMIT ".($next*100).",100"; $sql = "SELECT t.topic_id, t.topic_title, t.topic_last_post_id FROM " . TOPICS_TABLE . " AS t, " . POSTS_TABLE . " AS p, " . FORUMS_TABLE . " AS f WHERE t.forum_id = f.forum_id AND f.forum_id NOT IN (53,54) AND f.auth_view = " . AUTH_ALL . " AND p.topic_id = t.topic_id AND p.post_id = t.topic_last_post_id ORDER BY p.post_time DESC LIMIT ".($next*50).",50"; $topics_query = $db->sql_query($sql); if ( !$topics_query ) { message_die(GENERAL_ERROR, "Keine aktiven Beiträge", "", __LINE__, __FILE__, $sql); } else if ( !$db->sql_numrows($topics_query) ) { message_die(GENERAL_MESSAGE, $lang['Nichts gefunden']); } else { while ($topic = $db->sql_fetchrow($topics_query)) { // echo "".$topic["topic_title"]."
\n"; //echo "".$topic["topic_title"]."
" .$topic['topic_title']. "

\n"; //echo '' . $topicrow['topic_title'] . '  ' .$topicrow['topic_title'].'
'; } } echo " Im Chiptuning Forum finden Sie folgende Seiten mit Beiträgen:
"; for($ii=0; $ii<$max_count; $ii++) { if($ii+1<$max_count) { if($ii==$next) { echo("Neueste Beiträge im Chiptuning Forum: Die 50 neuesten Beiträge
"); }else{ $iii=($ii*50)+1; $iiii=$iii+49; echo("Beiträge ".($iii)." bis ".($iiii)." im Chiptuning Forum: hier
"); } }else{ if($ii==$next) { echo("".($ii+1)." Siten
"); }else{ echo("Älteste Beiträge im Chiptuning Forum: Die ältesten Beiträge
"); } } } echo " Hier sind oben die neuesten Beiträge und unten die ältesten Beiträge gelistet. "; $sql = "SELECT t.topic_id FROM " . TOPICS_TABLE . " AS t, " . POSTS_TABLE . " AS p, " . FORUMS_TABLE . " AS f WHERE t.forum_id = f.forum_id AND f.auth_view = " . AUTH_ALL . " AND p.topic_id = t.topic_id AND p.post_id = t.topic_last_post_id ORDER BY p.post_time ASC"; $topicscount_query = $db->sql_query($sql); $row_count = $db->sql_numrows($topicscount_query); //$max_count = $row_count/100; $max_count = $row_count/50; if($HTTP_GET_VARS[next]>0 && $HTTP_GET_VARS[next]<=$max_count) { $next = $HTTP_GET_VARS[next]; }else { $next=0; } // SQL statement to fetch active topics of public forums // ORDER BY p.post_time DESC LIMIT ".($next*100).",100"; $sql = "SELECT t.topic_id, t.topic_title, t.topic_last_post_id FROM " . TOPICS_TABLE . " AS t, " . POSTS_TABLE . " AS p, " . FORUMS_TABLE . " AS f WHERE t.forum_id = f.forum_id AND f.forum_id NOT IN (53,54) AND f.auth_view = " . AUTH_ALL . " AND p.topic_id = t.topic_id AND p.post_id = t.topic_last_post_id ORDER BY p.post_time ASC LIMIT ".($next*50).",50"; $topics_query = $db->sql_query($sql); if ( !$topics_query ) { message_die(GENERAL_ERROR, "Keine aktiven Beiträge", "", __LINE__, __FILE__, $sql); } else if ( !$db->sql_numrows($topics_query) ) { message_die(GENERAL_MESSAGE, $lang['Nichts gefunden']); } else { while ($topic = $db->sql_fetchrow($topics_query)) { // echo "".$topic["topic_title"]."
\n"; //echo "".$topic["topic_title"]."
" .$topic['topic_title']. "

\n"; //echo '' . $topicrow['topic_title'] . '  ' .$topicrow['topic_title'].'
'; } } echo "

und hier in anderer Sortierung:
"; for($ii=0; $ii<$max_count; $ii++) { if($ii+1<$max_count) { if($ii==$next) { echo("Älteste Beiträge im Chiptuning Forum: Die 50 ältesten Beiträge
"); }else{ $iii=($ii*50)+1; $iiii=$iii+49; echo("Beiträge ".($iii)." bis ".($iiii)." im Chiptuning Forum: 50 Beiträge
"); } }else{ if($ii==$next) { echo(" ".($ii+1)."TEST "); }else{ echo("Neueste Beiträge im Chiptuning Forum: Die neuesten Beiträge
"); } } } echo " Hier sind die Beiträge andersrum geordnet, oben sind die ältesten Beiträge und unten die neuesten Beiträge gelistet. "; ?>