Location: PHPKode > projects > H-tracker > staff.php
<?
//
//  H-Tracker v0.2
//    http://h-tracker.org
//    Based on TorrentTrader (http://www.torrenttrader.org)
//
//
require "backend/functions.php";

dbconn();
loggedinonly();

stdhead("Staff");

    // Display Staff List to all users
    begin_frame("" . STAFF.  "");

    // Get current datetime
    $dt = get_date_time(gmtime() - 180);
    // Search User Database for Moderators and above and display in alphabetical order
    $res = mysql_query("SELECT id, username, class,last_access FROM users WHERE class >=3 AND status='confirmed' ORDER BY username") or sqlerr();
    $num = mysql_num_rows($res);
    while ($arr = mysql_fetch_assoc($res))
    {
        $staff_table[$arr['class']]=$staff_table[$arr['class']].
            "<td><img src=images/users/o".($arr[last_access]>$dt?"n":"ff")."line.png border=0 alt=\"O".($arr[last_access]>$dt?"n":"ff")."line\"></td>".
            "<td><a href=account-details.php?id=$arr[id]>$arr[username]</a></td>".
               "<td><a href=mailbox.php?compose&id=$arr[id]>".
            "<img src=images/button_pm.gif border=0></a></td><td> </td>";
        // Show 3 staff per row, separated by an empty column
        ++ $col[$arr['class']];
        if ($col[$arr['class']]<=4)
            $staff_table[$arr['class']]=$staff_table[$arr['class']]."<td> </td>";
        else
        {
            $staff_table[$arr['class']]=$staff_table[$arr['class']]."</tr><tr height=15>";
            $col[$arr['class']]=2;
        }
    }
?>
<BR>
<table width=98% align=center class=tablebg>
<tr><td><br>
<table width=96% align=center class=row2>
<? if (get_user_class() >= 5) {
?>
<tr>
    <td colspan=14 class=rowTabHead><b>Administrators</b><font class="error"> [HIDDEN FROM PUBLIC]</font></td>
</tr>
<tr class=row2> 
    <?=$staff_table[7]?>
</tr>
<tr>
    <td colspan=14><br></td>
</tr>
<?
}
?>

<tr>
    <td colspan=14 class=rowTabHead><b>Super Moderators</b></td>
</tr>
<tr class=row2>
    <?=$staff_table[6]?>
</tr>
<tr>
    <td colspan=14><br></td>
</tr>
<tr>
    <td colspan=14 class=rowTabHead><b>Moderators</b></td>
</tr>
<tr class=row2>
    <?=$staff_table[5]?>
</tr>
<tr>
    <td colspan=14><br></td>
</tr>
<? if (get_user_class() >= 5) {
?>
<tr>
    <td colspan=14 class=rowTabHead><b>VIP Members</b><font class="error"> [HIDDEN FROM PUBLIC]</font></td>
</tr>
<tr class=row2> 
    <?=$staff_table[3]?>
</tr>
<tr>
    <td colspan=14><br></td>
</tr>
<tr>
    <td colspan=14 class=rowTabHead><b>Uploaders</b><font class="error"> [HIDDEN FROM PUBLIC]</font></td>
</tr>
<tr class=row2> 
    <?=$staff_table[4]?>
</tr>
<tr>
    <td colspan=14><br></td>
</tr>
<tr>
    <!-- Define table column widths -->
    <td width="20"></td>
    <td width="100"></td>
    <td width="25"></td>
    <td width="35"></td>
    <td width="90"></td>
    <td width="20"></td>
    <td width="100"></td>
    <td width="25"></td>
    <td width="35"></td>
    <td width="90"></td>
    <td width="20"></td>
    <td width="100"></td>
    <td width="25"></td>
    <td width="35"></td>
</tr>
<?
}
?>

</table><br></td></tr></table>
<?
end_frame(); 
if (!$act) {
$dt = gmtime() - 180;
$dt = sqlesc(get_date_time($dt));
// LIST ALL FIRSTLINE SUPPORTERS
// Search User Database for Firstline Support and display in alphabetical order
$res = mysql_query("SELECT * FROM users WHERE support='yes' AND status='confirmed' ORDER BY username LIMIT 10") or sqlerr();
while ($arr = mysql_fetch_assoc($res))
{
$land = mysql_query("SELECT name,flagpic FROM countries WHERE id=$arr[country]") or sqlerr();
$arr2 = mysql_fetch_assoc($land);
if(!$arr2['flagpic'])
$arr2['flagpic'] = "none.png border=0 alt=\"Country not selected\"";
$firstline .= "<tr><td class=row2 align=center><a href=account-details.php?id=".$arr['id'].">".$arr['username']."</a></td>
<td class=row1 align=center> ".("'".$arr['last_access']."'">$dt?"<img src=".$site_config["SITEURL"]."/images/users/online.png border=0 alt=\"online\">":"<img src=".$site_config["SITEURL"]."/images/users/offline.png border=0 alt=\"offline\">" )."</td>".
"<td class=row2 align=center><a href=mailbox.php?compose&id=".$arr['id'].">"."<img src=".$site_config["SITEURL"]."/images/button_pm.gif border=0 alt\"Send Pm\"></a></td>".
"<td class=row1 align=center><img src=".$site_config["SITEURL"]."/images/flags/".$arr2['flagpic']." border=0 alt=\"".$arr2['name']."\"></td>".
"<td class=row2>".$arr['supportfor']."</td></tr>\n";
}

begin_frame("Firstline Support");
?>

<table class="table_table" width="98%" align="center">
<tr>
<td class="tablebg" width="96%" colspan="11">General support questions should preferably be directed to these users. Note that they are volunteers, giving away their time and effort to help you.
Treat them accordingly. (Languages listed are those besides English.)<br><br></td></tr>
<tr>
<td class=rowTabHead width="40" align="center"><b>Username</b></td>
<td class=rowTabHead width="5" align="center"><b>Active</b></td>
<td class=rowTabHead width="5" align="center"><b>Contact</b></td>
<td class=rowTabHead width="40" align="center"><b>Country</b></td>
<td class=rowTabHead width="200" align="center"><b>Support for:</b></td>
</tr>
<?=$firstline?>

</tr>
<br>
<tr><td class=rowTabHead colspan="6" align="center"><a href=contactstaff.php><b>Contact Staff</b></a></td>
</tr>
</table>
<?
end_frame();
}

stdfoot();
?>
Return current item: H-tracker