Temos pavadinimas: WordPress, Shopify ir PHPFusion programuotojų bendruomenė :: (ieskau) html sripto kur rodo ip ir ar uzbanintas ar ne

Parašė mNm.· 2014 Kov. 24 21:03:21
#8


$hostname = "localhost"; // amxbans  ip
$username = "root"; // amxbans  login
$password = ""; // amxbans password
$database = "db"; //amxbans database
 
$connect = mysql_connect($hostname, $username, $password) or die(mysql_error());
$select = mysql_select_db($database, $connect) or die(mysql_error());
 
 
$banas = mysql_query("SELECT player_ip,bid FROM amx_bans WHERE player_ip = '$ip' LIMIT 1");
$row = mysql_fetch_array($banas, MYSQL_ASSOC);
 
if(!$row) {
	echo "Statusas: <b><span style=\"color:green\">Neužbanintas </span></b><br>";
} else { 
	echo "Statusas: <b><span style=\"color:red\">UŽBANINTAS! </span></b><br>";
}

Redagavo mNm.· 2014 Kov. 24 21:03:33