Login
Username: Password:
Remember me

[Sign Up] / [Recover Password]

Theme / Language

Popular
New Torrents
new name
Size: 18.40 MB
Most active
new name
S: 74 L: 3
New Posters
Flags into Staff page
Controls ·  Search New posts · Mark unread

You are in: Forum / Forum / v2.08 / v2.08 Mods Completed

Unknown User
2012-12-22 03:39:02
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='' />&nbsp; ".
"<a href='account-details.php?id=".$row["id"]."'><b>".class_user($row["username"])."</b></a>&nbsp; ".
"".$country."&nbsp; ".
"<a href='mailbox.php?compose&amp;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">&nbsp;</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]
staff.png
staff.png
countries.zip
Download
countries.sql.zip
Download
Unknown User
2012-12-22 23:03:26
Yeah should be default imo  :)  Good work!
Unknown User
2012-12-23 01:39:38
looks cool, 1 thing thought should include an zip or something with the flags.. Or atleast an location to get them from LOL.. You know newbies here.. they cant do anything themselves.
Unknown User
2012-12-23 02:02:56
You have right ArcticWolf  :)   I update the first post with countries (flags) and countries.sql for database.
Unknown User
2013-01-08 23:17:49
Do we need to install the sql?
Unknown User
2013-01-08 23:58:52
not 100% sure, some people might need it LOL, it looks like the stock sql from 2.08 but again not everyone that uses 2.08+ addons runs 2.08 LOL!!!
Unknown User
2013-07-30 18:47:40
VERY well done MAX, love yr add-on improvements mate
Unknown User
2020-07-05 00:08:35
[php]

<?php
require_once("backend/functions.php");
dbconn();
loggedinonly(true);

$dt = get_date_time(gmtime() - 120);

$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]");
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='' />&nbsp; ".
       "<a href='account-details.php?id=".$row["id"]."'><b>".class_user($row["username"])."</b></a>&nbsp; "."".$country."&nbsp; ".
       "<a href='mailbox.php?compose&amp;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">&nbsp;</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();
?>

[/php]
Users online

No users online

Search



Statistics

    Torrents

  • Tracking: 3
  • Todays torrents: 0
  • Seeders: 0
  • Leechers: 0
  • Peers: 0
  • Downloaded: 89.96 GB
  • Uploaded: 9.86 GB

  • Members

  • We have: 838
  • New today: 0
  • Guest today: 9

  • Online

  • Total online: 9
  • Members: 0
  • Guests online: 9
  • Comments: 3
  • Messages: 1,728