Jump to content
MakeWebGames

Staff!! (HELP)


NationGamer

Recommended Posts

could someone look through the sql at the top and tell me if it is correct and the way the ranks are called from the sql thanks

BTW not my staff list just using this one before i change my staff list

 

<?php

include "globals.php";
$staff=array();
$q=$db->query("SELECT  u.*,s.*,c.* FROM users u LEFT JOIN staff_users s ON u.userid=s.id LEFT JOIN gangs c ON u.gang=c.gangID ORDER BY userid ASC");
while($r=$db->fetch_row($q))
{
$staff[$r['userid']]=$r;
}
echo"<table width=100% border=1  style=text-align:center; class=table>";
print "

<h2 style='padding-top:10px;'> Staff List</h2></div>


[b]Admins[/b]


<table width=80% border=1  style=text-align:center; class=table><tr style='background:gray'><th>User</th> <th>Duties</th> <th>Level</th> <th>Money</th> 

<th>Last Seen</th> <th>Status</th> </tr>";

foreach($staff as  $r)
{
if($r['rank']==Admin)
{
if ($r['gangPREF'] != "") 
{ 
$gangtag = "[url='gangs.php?action=view&ID={$r['][{$r['gangPREF']}][/url]";
} else  {
$gangtag = "";
}
if($r['laston'] >= time()-15*60) { $on="<font color=green>[b]Online[/b]</font>"; } else { $on="<font color=red>[b]Offline[/b]</font>"; }
print "<tr> <td>[url='viewuser.php?u={$r[']{$r['username']}[/url] [{$r['userid']}]</td> <td> {$r['duties']}</td> <td>{$r['level']}</td> <td>\${$r

['money']}</td> <td>".date('F j, Y, g:i:s a',$r['laston'])."</td> <td>$on</td> </tr>";
}
}
print "</table>";
print "[b]Secretaries[/b]

<table width=80% border=1  style=text-align:center; class=table><tr style='background:gray'><th>User</th> <th>Duties</th> <th>Level</th> <th>Money</th> 

<th>Last Seen</th> <th>Status</th> </tr>";
foreach($staff as  $r)
{
if($r['rank']==GM)
{
if ($r['gangPREF'] != "") 
{ 
$gangtag = "[url='gangs.php?action=view&ID={$r['][{$r['gangPREF']}][/url]";
} else  {
$gangtag = "";
}
if($r['laston'] >= time()-15*60) { $on="<font color=green>[b]Online[/b]</font>"; } else { $on="<font color=red>[b]Offline[/b]</font>"; }
print "<tr> <td>[url='viewuser.php?u={$r[']{$r['username']}[/url] [{$r['userid']}]</td> <td> {$r['duties']}</td> <td>{$r['level']}</td> <td>\${$r

['money']}</td> <td>".date('F j, Y, g:i:s a',$r['laston'])."</td> <td>$on</td> </tr>";
}
}
print "</table>";
print "[b]Assistants[/b]

<table width=80% border=1  style=text-align:center; class=table><tr style='background:gray'><th>User</th> <th>Duties</th> <th>Level</th> <th>Money</th> 

<th>Last Seen</th> <th>Status</th> </tr>";
foreach($staff as  $r)
{
if($r['rank']==FM)
{
if ($r['gangPREF'] != "") 
{ 
$gangtag = "[url='gangs.php?action=view&ID={$r['][{$r['gangPREF']}][/url]";
} else  {
$gangtag = "";
}
if($r['laston'] >= time()-15*60) { $on="<font color=green>[b]Online[/b]</font>"; } else { $on="<font color=red>[b]Offline[/b]</font>"; }
print "<tr> <td>[url='viewuser.php?u={$r[']{$r['username']}[/url] [{$r['userid']}]</td> <td> {$r['duties']}</td> <td>{$r['level']}</td> <td>\${$r

['money']}</td> <td>".date('F j, Y, g:i:s a',$r['laston'])."</td> <td>$on</td> </tr>";
}
}
print "</table></div><div></div>
</div></div></div></div></div>";

$h->endpage();
?>
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...