23.07.2018, 16:47
I am sreach same banlist to web,but not funciton
Код:
c<? header('Content-Type: text/html; charset=utf-8'); ?> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <title>Banned Players of Terraria Server</title> </head> <body> <?php // You will need a MySQL user that has Read-Only access to the Bans table *only* // Any extra permissions above that, and you risk being attacked. // ** Change these settings to your MySQL configuration. $server = "82.208.17.10"; //localhost for the same computer, IP address or domain for anything else. $dbuser = "********"; //The username for the read-only account. $dbpass = "***********"; //This should be secure and unique (randomly generated is best). $dbname = "**********"; //The name of the Terraria database. $showip = false; //If you don't want everyone to see the banned IPs, change this to false. mysql_connect($server, $dbuser, $dbpass); mysql_select_db($dbname); $result = mysql_query("SELECT * FROM banned3 ORDER BY user_banned,user_banned_ip,user_banned_dynamic,dynamic_typ,user_banner,ban_reason,ban_od,ban_do DESC LIMIT 20"); echo "<table width=70% border=1 cellpadding=5 cellspacing=0>"; echo "<tr style=\"font-weight:bold\">"; echo"<td>Jmeno</td> <td>Zabanoval</td> <td>Duvod</td> <td>OD</td> <td>DO</td>"; while($row = mysql_fetch_assoc($result)){ if($col == "#eeeeee"){ $col = "#ffffff"; }else{ $col = "#eeeeee"; } echo "<tr bgcolor=$col>"; echo "<td>".$row['Jmeno']."</td>"; echo "<td>".$row['Zabanoval']."</td>"; echo "<td>".$row['Duvod']."</td>"; echo "<td>".$row['OD']."</td>"; echo "<td>".$row['Do']."</td>"; } echo "</table>"; ?> </body></html>