"; while($row1 = mysql_fetch_array($query)) { $color = ($i % 2) ? 'c0c0c0' : '989898'; $query2 = mysql_query("select * from p_posts where post_cat LIKE '%$row1[post_cat]%' limit 1"); echo "$row1[cat_name]
$row1[cat_desc]"; while($row2=mysql_fetch_array($query2)) { $last_post = $row2[post_topic]; echo "".substr($last_post,0,25)." ..."; }//endwhile $i++; }//endwhile echo ""; }//end show_categories function show_forums() { $id = clean($_GET[id]); $query = mysql_query("select * from p_forums where f_cat LIKE '%$id%' order by f_id desc"); echo ""; while($row = mysql_Fetch_array($query)) { echo ""; }//end while echo "
$row[f_name]byrdsfv43
"; }//end show_forums function show_posts() { $f = clean($_GET[id]); $query = mysql_query("select * from p_posts where post_id LIKE '%$f%'"); while($row = mysql_fetch_array($query)) { echo "$row[post_topic]
"; }//end while }//end show posts function show_post() { $id = clean($_GET[id]); $query = mysql_query("select * from p_posts where post_id = '$id'"); while($row = mysql_fetch_array($query)) { echo "
post id/name$row[post_id] / $row[post_topic]
posted by$row[post_poster]
".bbcode($row[post_post])."

"; }//end while }//end show post function clean_for_code($str) { $str = htmlentities($str); return $str; }//end clean_for_code function clean($str) { $str = htmlspecialchars($str); $str = stripslashes($str); return $str; }//end clean function latest_posts() { $query = mysql_query("select * from p_posts") or dei(mysql_error()); while($row = mysql_fetch_array($query)) { echo $row[post_topic]."
"; }//endwhile }//end latest posts function search_forum() { echo "search"; }//end search forums ?>