Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?
- $host = "127.0.0.1"; // here is your Database address
- $mysql_user = "root"; // Database UserName
- $mysql_pass ="xxxxxxx"; // Database Password
- $db = "mangos"; //Database Name
- $gm_color="#FF0000"; // This is the GM color at list and u can change it!
- @mysql_connect ("$host", "$mysql_user", "$mysql_pass") or die ("MySql Connection Error");
- @mysql_select_db ("$db") or die ("Database Connection Has Failed");
- $query = mysql_query("SELECT name, gmstate, online FROM `character` WHERE `online`= 1 ORDER BY name");
- $count=0;
- while ($row_list = mysql_fetch_object($query)) {
- if ( $row_list->gmstate == 1 ) {
- $count++;
- print ("<font color=\"$gm_color\">");
- echo $row_list->name;
- print ("</font>, ");
- }
- else{
- echo $row_list->name;
- print (", ");
- $count++;
- }
- }
- print ("<center><br><br>$count Players Online<br><br></center>");
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement