<?
	function query ($text) {
		return mysql_query($text);
	}
	
	function fetch($text) {
		return mysql_fetch_array(query($text));
	}
	
	function user ($uid) {
		return fetch("SELECT * FROM users WHERE uid=".$uid);
	}
	
	function fight_bot($cfight) {
		return fetch("SELECT * FROM fight_bots WHERE cfight=".$cfight);
	}
	
	function chat($time,$chat_time,$to,$from,$type,$message) {
		query ("INSERT INTO chat VALUES ('".$time."','".$chat_time."','".$to."','".$from."','".$type."','".$message."')");
	}
?>