All pastes #197818 Raw Edit

Someone

public php v1 · immutable
·published 2006-10-11 15:29 UTC
rendered paste body
<?phpif ( !defined('IN_PHPBB') ){	die("Hacking attempt");}if(!function_exists(imp_tagcloud_block_func)){	function imp_tagcloud_block_func()	{		global $template, $portal_config, $userdata, $board_config, $db, $phpEx;		$sql = "SELECT phpbb_tags.tag_name, phpbb_tags.tag_id, COUNT(phpbb_topics_tags.topic_id) AS counter FROM phpbb_tags, phpbb_topics_tags WHERE phpbb_topics_tags.tag_id=phpbb_tags.tag_id GROUP BY phpbb_tags.tag_id ORDER BY phpbb_tags.tag_name;";		if (!$result1 = $db->sql_query($sql))		{			message_die(GENERAL_ERROR, 'Could not query forums information', '', __LINE__, __FILE__, $sql);		}		$forum_data = array();		while( $row1 = $db->sql_fetchrow($result1) )		{			$forum_data[] = $row1;		}		$number_tags = $db->sql_numrows($result1);		$style_row = 'static';		$template->assign_block_vars($style_row,"");		for ($i = 0; $i < $number_tags; $i++)		{			$template->assign_block_vars($style_row . '.tags_row', array(				'U_TITLE' => "search.$phpEx?search_tag=".$forum_data[$i]['tag_id']."&search_tag_name=".$forum_data[$i]['tag_name'],				'L_TITLE' => $forum_data[$i]['tag_name'],				'S_TAGCOUNT' => $forum_data[$i]['counter']				)			);		}	}}imp_tagcloud_block_func();?>