<?php
	function top_pages ($list,$number,$name){

		$top = mysql_query("SELECT * FROM `$list` ORDER BY `$number` DESC LIMIT 0,10");

		while($sql = mysql_fetch_array($top)){

			$code .= '<li><div class="top_game_name">'.$sql[$name].'</div><div class="top_game_cs">'.$sql[$number].'</div></li>';

		}

		return $code;

	}