New staff.php:
<?php
require_once("backend/functions.php");
dbconn();
loggedinonly();
$dt = get_date_time(gmtime() - 180);
$res = SQL_Query_exec("SELECT `users`.`id`, `users`.`username`, `users`.`class`, `users`.`last_access`, `users`.`country` FROM `users` INNER JOIN `groups` ON `users`.`class` = `groups`.`group_id` WHERE `users`.`enabled` = 'yes' AND `users`.`status` = 'confirmed' AND `groups`.`staff_page` = 'yes' ORDER BY `username`");
while ( $row = mysql_fetch_assoc( $res ) )
{
$flag = SQL_Query_exec("SELECT name,flagpic FROM countries WHERE id=$row[country]") or sqlerr();
if ($row2 = mysql_fetch_assoc($flag)) {
$country = "<img src=".$site_config['SITEURL']."/images/countries/$row2[flagpic] width='22' height='14' title='$row2[name]' />";
} else {
$country = "<img src=".$site_config['SITEURL']."/images/countries/unknown.gif width='22' height='14' title='Homeless!' />";
}
$table[$row["class"]] = $table[$row["class"]] .
"<td style='padding-bottom:7px; padding-right:7px'><img src='images/button_o".($row["last_access"] > $dt ? "n" : "ff")."line.png' alt='' /> ".
"<a href='account-details.php?id=".$row["id"]."'><b>".class_user($row["username"])."</b></a> ".
"".$country." ".
"<a href='mailbox.php?compose&id=".$row["id"]."'><img src='images/button_pm.gif' border='0' alt='' /></a></td>";
++$col[$row["class"]];
if ($col[$row["class"]] <= 3)
$table[$row["class"]] = $table[$row["class"]] . "<td></td>";
else
{
$table[$row["class"]] = $table[$row["class"]] . "</tr><tr>";
$col[$row["class"]] = 0;
}
}
$where = null;
if ($CURUSER["edit_users"] == "no")
$where = "AND `staff_public` = 'yes'";
$res = SQL_Query_exec("SELECT `group_id`, `level`, `staff_public` FROM `groups` WHERE `staff_page` = 'yes' $where ORDER BY `staff_sort`");
if (mysql_num_rows($res) == 0)
show_error_msg(T_("ERROR"), T_("NO_STAFF_HERE"), 1);
stdhead(T_("STAFF"));
begin_frame(T_("STAFF"));
?>
<table cellpadding="0" width="100%" align="center">
<?php while ($row = mysql_fetch_assoc($res)): if ( !isset($table[$row["group_id"]]) ) continue; ?>
<tr>
<td colspan="14"> </td>
</tr>
<tr>
<td colspan="14"><b><?php echo T_($row["level"]); ?></b> <?php if ($row["staff_public"] == "no") echo("<font color='#ff0000'>[".T_("HIDDEN FROM PUBLIC")."]</font>"); ?></td>
</tr>
<tr>
<td colspan="14"><hr color="#0FA3D5" size="1" /></td>
</tr>
<tr>
<?php echo $table[$row["group_id"]]; ?>
</tr>
<tr>
<td colspan="14"></td>
</tr>
<?php endwhile; ?>
</table>
<?php
end_frame();
stdfoot();
?>I use class colors function: [url="http://www.torrenttrader.pw/topic/12259-class-colors-function"]https://www.torrentt...colors-function[/url]
If you have not installed this mod, simply replace:
".class_user($row["username"])."
with:
".$row["username"]."I think it looks better with flags

[url="http://devscorner.xyz/applications/core/interface/file/attachment.php?id=6391"]countries.zip[/url]
[url="http://devscorner.xyz/applications/core/interface/file/attachment.php?id=6392"]countries.sql.zip[/url]
<?php
require_once("backend/functions.php");
dbconn();
loggedinonly();
$dt = get_date_time(gmtime() - 180);
$res = SQL_Query_exec("SELECT `users`.`id`, `users`.`username`, `users`.`class`, `users`.`last_access`, `users`.`country` FROM `users` INNER JOIN `groups` ON `users`.`class` = `groups`.`group_id` WHERE `users`.`enabled` = 'yes' AND `users`.`status` = 'confirmed' AND `groups`.`staff_page` = 'yes' ORDER BY `username`");
while ( $row = mysql_fetch_assoc( $res ) )
{
$flag = SQL_Query_exec("SELECT name,flagpic FROM countries WHERE id=$row[country]") or sqlerr();
if ($row2 = mysql_fetch_assoc($flag)) {
$country = "<img src=".$site_config['SITEURL']."/images/countries/$row2[flagpic] width='22' height='14' title='$row2[name]' />";
} else {
$country = "<img src=".$site_config['SITEURL']."/images/countries/unknown.gif width='22' height='14' title='Homeless!' />";
}
$table[$row["class"]] = $table[$row["class"]] .
"<td style='padding-bottom:7px; padding-right:7px'><img src='images/button_o".($row["last_access"] > $dt ? "n" : "ff")."line.png' alt='' /> ".
"<a href='account-details.php?id=".$row["id"]."'><b>".class_user($row["username"])."</b></a> ".
"".$country." ".
"<a href='mailbox.php?compose&id=".$row["id"]."'><img src='images/button_pm.gif' border='0' alt='' /></a></td>";
++$col[$row["class"]];
if ($col[$row["class"]] <= 3)
$table[$row["class"]] = $table[$row["class"]] . "<td></td>";
else
{
$table[$row["class"]] = $table[$row["class"]] . "</tr><tr>";
$col[$row["class"]] = 0;
}
}
$where = null;
if ($CURUSER["edit_users"] == "no")
$where = "AND `staff_public` = 'yes'";
$res = SQL_Query_exec("SELECT `group_id`, `level`, `staff_public` FROM `groups` WHERE `staff_page` = 'yes' $where ORDER BY `staff_sort`");
if (mysql_num_rows($res) == 0)
show_error_msg(T_("ERROR"), T_("NO_STAFF_HERE"), 1);
stdhead(T_("STAFF"));
begin_frame(T_("STAFF"));
?>
<table cellpadding="0" width="100%" align="center">
<?php while ($row = mysql_fetch_assoc($res)): if ( !isset($table[$row["group_id"]]) ) continue; ?>
<tr>
<td colspan="14"> </td>
</tr>
<tr>
<td colspan="14"><b><?php echo T_($row["level"]); ?></b> <?php if ($row["staff_public"] == "no") echo("<font color='#ff0000'>[".T_("HIDDEN FROM PUBLIC")."]</font>"); ?></td>
</tr>
<tr>
<td colspan="14"><hr color="#0FA3D5" size="1" /></td>
</tr>
<tr>
<?php echo $table[$row["group_id"]]; ?>
</tr>
<tr>
<td colspan="14"></td>
</tr>
<?php endwhile; ?>
</table>
<?php
end_frame();
stdfoot();
?>I use class colors function: [url="http://www.torrenttrader.pw/topic/12259-class-colors-function"]https://www.torrentt...colors-function[/url]
If you have not installed this mod, simply replace:
".class_user($row["username"])."
with:
".$row["username"]."I think it looks better with flags

[url="http://devscorner.xyz/applications/core/interface/file/attachment.php?id=6391"]countries.zip[/url]
[url="http://devscorner.xyz/applications/core/interface/file/attachment.php?id=6392"]countries.sql.zip[/url]