How to Install?
1. Go to your team.php file in htdocs.
2. Open the file and afterwards delete all the content in the php script.
3. Copy my Script and paste it into your script.
4. Save it and you are done.
FAQ
Q: Which Programm should I use to edit the file?
A: Notepad ++ is the easiest tool and easy to handle.
Q: Invalid Subtopic. Why does this appear?
A: Make sure you have edited your index.php file so which means you should have the script registered.
Updated:
CREDITS FOR GESIOR (Standard Version)
CREDITS FOR ZONET (Improved the php script with css part)
CREDITS FOR ACHTUNG (General Improvement)
1. Go to your team.php file in htdocs.
2. Open the file and afterwards delete all the content in the php script.
3. Copy my Script and paste it into your script.
4. Save it and you are done.
FAQ
Q: Which Programm should I use to edit the file?
A: Notepad ++ is the easiest tool and easy to handle.
Q: Invalid Subtopic. Why does this appear?
A: Make sure you have edited your index.php file so which means you should have the script registered.
PHP:
<?php
$main_content .= '<style type="text/css">
tr.over:hover {
background-color: lightgrey;
}
</style>';
$list = $SQL->query('SELECT name,online,group_id,world_id FROM players WHERE players.group_id > 1 ORDER BY group_id DESC');
$showed_players = 0;
$groups = simplexml_load_file($config['site']['server_path'].'/data/XML/groups.xml') or die('<b>Could not load groups!</b>');
foreach($groups->group as $g)
$groupList[(int)$g['id']] = $g['name'];
$main_content .= '<center><h2>Support in game</h2></center>';
$headline = "<table border=0 cellspacing=1 cellpadding=4 width=100%>
<tr bgcolor=\"".$config['site']['vdarkborder']."\">
<td width=\"20%\"><font class=white><b>Group</b></font></td>
<td width=\"45%\"><font class=white><b>Name</b></font></td>
<td width=\"15%\"><font class=white><b>Status</b></font></td>
<td width=\"20%\"><font class=white><b>World</b></font></td>";
$group_id = 0;
foreach($list as $gm)
{
if($gm['online'] == 0)
$player_list_status = '<font color="red">Offline</font>';
else
$player_list_status = '<font color="green">Online</font>';
if(is_int($showed_players / 2))
$bgcolor = $config['site']['darkborder'];
else
$bgcolor = $config['site']['lightborder'];
if($group_id != (int)$gm['group_id'])
{
if($group_id != 0)
$main_content .= "</table><br>";
$main_content .= $headline;
$group_id = (int)$gm['group_id'];
}
$showed_players++;
$main_content .= '<tr bgcolor="'.$bgcolor.'" class="over"><td>' . $groupList[(int)$gm['group_id']] . '</td><td><a href="?subtopic=characters&name='.urlencode($gm['name']).'">'.$gm['name'].'</a></td><td>'.$player_list_status.'</td><td>'.$config['site']['worlds'][$gm['world_id']].'</td></tr>';
}
$main_content .= "</table>";
$main_content .= "
<table border='0' CELLSPACING=1 CELLPADDING=4 WIDTH=100%><tbody><TR><td><div style='text-align: right; margin: 20px auto; font-size: 10px;'>
Coded by <a target='blank' href='http://otland.net/members/achtung/'>AchTung</a></div></td></tr></tbody></table>";
?>
Updated:
PHP:
<style type="text/css">
tr.over:hover {
background-color: lightgrey;
}
</style>
<?php
if($groups = simplexml_load_file($config['site']['server_path'].'/data/XML/groups.xml') or die('<b>Could not load groups!</b>'))
foreach($groups->group as $g)
$groupList[(int)$g['id']] = $g['name'];
$list = $SQL->query("SELECT `name`, `online`, `group_id`, `world_id` FROM `players` WHERE `group_id` > 1 ORDER BY `group_id` DESC");
$showed_players = 0;
$main_content .= '<center><h2>Support in game</h2></center><br>';
$headline = '<table border="0" cellspacing="1" cellpadding="1" width="100%">
<tr bgcolor="'.$config['site']['vdarkborder'].'">
<td width="20%"><font class=white><b>Group</b></font></td>
<td width="45%"><font class=white><b>Name</b></font></td>
<td width="15%"><font class=white><b>Status</b></font></td>
<td width="20%"><font class=white><b>World</b></font></td>';
$group_id = 0;
foreach($list as $gm)
{
if($group_id != (int)$gm['group_id'])
{
if($group_id != 0)
$main_content .= '</table><br />';
$main_content .= $headline;
$group_id = (int)$gm['group_id'];
}
$main_content .= '<tr bgcolor="'.(is_int($showed_players++ / 2) ? $config['site']['darkborder'] : $config['site']['lightborder']).'" class="over"><td>'.$groupList[(int)$gm['group_id']].'</td><td><a href="?subtopic=characters&name='.urlencode($gm['name']).'">'.$gm['name'].'</a></td><td><font color="'.($gm['online'] == 0 ? 'red">Offline' : 'green">Online').'</font></td><td>'.$config['site']['worlds'][$gm['world_id']].'</td></tr>';
}
$main_content .= '</table><table border="0" cellspacing="1" cellpadding="4" width="100%"><tbody><tr><td><div style="text-align: right; margin: 20px auto; font-size: 10px;">Coded by <a target="_blank" href="http://otland.net/members/achtung/">AchTung</a></div></td></tr></tbody></table>';
?>
CREDITS FOR GESIOR (Standard Version)
CREDITS FOR ZONET (Improved the php script with css part)
CREDITS FOR ACHTUNG (General Improvement)
Attachments
-
Support List.jpg37.3 KB · Views: 1,618 · VirusTotal
Last edited by a moderator: