Public feed #2133368

Unnamed

public php v1 · immutable
Raw Edit
·published 2012-03-28 18:29 UTC
rendered paste body
if (strpos($CURUSER['openclose'], "[latestforum]") === false) {		$result6 = mysql_query("SELECT posts.body AS postbody, posts.id AS pid, posts.topicid, posts.userid AS userpost, posts.added, topics.id AS tid, topics.userid AS usertopic, topics.subject, topics.forumid, topics.lastpost, topics.views, forums.name, forums.minclassread, forums.postcount, users.username, topicposter.username AS tusername			FROM posts, topics, forums, users, users AS topicposter			WHERE posts.topicid = topics.id AND topics.forumid = forums.id AND posts.userid = users.id AND topics.userid = topicposter.id AND minclassread <=" . $CURUSER["class"] . " AND topics.forumid != 41			ORDER  BY posts.added DESC			LIMIT 5");		while ($array6 = mysql_fetch_assoc($result6)) {			print("<div class=savcolumn><table width=100% border=0 cellspacing=0 cellpadding=5><tr><td>\n");			print("In <a href=\"forums.php?action=viewtopic&topicid={$array6["tid"]}&page=p{$array6["pid"]}#{$array6["pid"]}\">{$array6["subject"]}</a>, <a href=userdetails.php?id={$array6["userpost"]}>{$array6["username"]}</a> wrote:\n<hr width=100% size=1 color=#cccccc noshade>\n");			$postbody = $array6["postbody"];			if (strlen($postbody) > 300) {				$postbody = substr($postbody, 0, 300);				$postbody .= "...";			}			$postbody = format_comment(strip_tags($postbody));			print("$postbody\n");			print("</td></tr></table></div><p>\n");		}	}