<?php
	
	function player($user_id)
	{
		
		$query	=	@mysql_query(sprintf(
			'SELECT
					`id`,
					`login`,
					`align`,
					`lastActive`
				FROM
					`users`
				WHERE
					`id`	=	%d',
			$user_id
		));
		
		if (@mysql_num_rows($query) != 0)
		{
			
			$user	=	@mysql_fetch_assoc($query);
			
			return sprintf(
				'<img src="/images/icon/align/%s.png" alt="" /> <a href="/user/%d">%s</a>',
				$user['align'] . ($user['lastActive']	>	time()	-	(60	*	15)	?	''	:	'-off'),
				$user['id'],
				$user['login']
			);
			
		}
		
	}
	
	
?>