\n"; print_menu(); $query = mysql_query("SELECT * FROM forum"); if (!isset($_GET['start'])){ $start = 0; } else{ $start = $_GET['start']; } $number = 0; while ($data = mysql_fetch_array($query)){ $number++; } $query = mysql_query("SELECT * FROM forum ORDER BY ID DESC"); $counter = 0; while ($data = mysql_fetch_array($query)){ if ($start === "-1" || $start > $number){ $html .= "
\n"; $html .= "\n"; if (!eregi("src=", $data[COMMENT])){ $data[COMMENT] = eregi_replace("http://([A-Za-z0-9#%:_&%=\.\?\/\-]*)","\\0", $data[COMMENT]); } $data[COMMENT] = str_replace("\n", "
", $data[COMMENT]); $html .= "

" . strtr(stripslashes($data[COMMENT]), $smiles) . "
"; if (isset($_COOKIE['UL']) && isset($_COOKIE['UP'])){ $html .= "" . $data[NICK] . ""; } else{ $html .= "". $data[NICK] . ""; } $html .= ", " . $data[DATE] . ", " . $data[TIME] . "\n"; $html .= "\n"; } else{ if ($counter < $start){ $counter++; } elseif ($counter >= $start && $counter <= ($start + $posts)){ $html .= "


\n"; $html .= "\n"; if (!eregi("src=", $data[COMMENT])){ $data[COMMENT] = eregi_replace("http://([A-Za-z0-9#%:_&%=\.\?\/\-]*)","\\0", $data[COMMENT]); } $data[COMMENT] = str_replace("\n", "
", $data[COMMENT]); $html .= "

" . strtr(stripslashes($data[COMMENT]), $smiles) . "
"; if (isset($_COOKIE['UL']) && isset($_COOKIE['UP'])){ $html .= "" . $data[NICK] . ""; } else{ $html .= "" . $data[NICK] . ""; } $html .= ", ". $data[DATE] . ", " . $data[TIME] . "\n"; $html .= "\n"; $counter++; } else{ break; } } } $html .= "


\n"; $first = 0; $link = 1; $html .= "\n\n"; $html .= "\n"; $html .= "\n"; $html .= "\n"; $html .= "\n"; $html .= "\n"; $html .= "
\n"; $html .= "\n"; $html .= "
\n"; $html .= "\n\n"; } } $html .= ""; echo $html; print_footer(); ?>