Jump to content
MakeWebGames

Need Help With My Staff List


Neji_Hyuuga

Recommended Posts

<?php
include "globals.php";
$staff=array();
$q=$db->query("SELECT * FROM users WHERE user_level IN(2,3,5) ORDER BY userid ASC");
while($r=$db->fetch_row($q))
{
$staff[$r['userid']]=$r;
}
print "[b]Admins[/b]

<table width=75% cellspacing=1 class='table'> <tr style='background:silver'><th>User</th> <th>Level</th> <th>Money</th> <th>Last Seen</th> <th>Status</th> </tr>";

foreach($staff as  $r)
{
if($r['user_level']==2)
{
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['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=75% cellspacing=1 class='table'> <tr style='background:silver'><th>User</th> <th>Level</th> <th>Money</th> <th>Last Seen</th> <th>Status</th> </tr>";
foreach($staff as  $r)
{
if($r['user_level']==3)
{
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['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=75% cellspacing=1 class='table'> <tr style='background:silver'><th>User</th> <th>Level</th> <th>Money</th> <th>Last Seen</th> <th>Status</th> </tr>";
foreach($staff as  $r)
{
if($r['user_level']==5)
{
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['level']}</td> <td>\${$r['money']}</td> <td>".date('F j, Y, g:i:s a',$r['laston'])."</td> <td>$on</td> </tr>";
}
}
print "</table>";

$h->endpage();
?>

 

i need help with this if someone could help me with it

it shows the amount of money my staff has and there levels

i want so it shows there crystals and donator days can anyone help with that please

Link to comment
Share on other sites

Re: Need Help With My Staff List

 

<?php
include "globals.php";
$staff=array();
$q=$db->query("SELECT * FROM users WHERE user_level IN(2,3,5) ORDER BY userid ASC");
while($r=$db->fetch_row($q))
{
$staff[$r['userid']]=$r;
}
print "[b]Admins[/b]

<table width=75% cellspacing=1 class='table'> <tr style='background:silver'><th>User</th> <th>Level</th> <th>Money</th> <th>Crystals</th> <th>Donator Days</th> <th>Last Seen</th> <th>Status</th> </tr>";

foreach($staff as  $r)
{
if($r['user_level']==2)
{
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['level']}</td> <td>\${$r['money']}</td> <td>{$r['crystals']}</td> <td>{$r['donatordays']}</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=75% cellspacing=1 class='table'> <tr style='background:silver'><th>User</th> <th>Level</th> <th>Money</th> <th>Last Seen</th> <th>Status</th> </tr>";
foreach($staff as  $r)
{
if($r['user_level']==3)
{
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['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=75% cellspacing=1 class='table'> <tr style='background:silver'><th>User</th> <th>Level</th> <th>Money</th> <th>Last Seen</th> <th>Status</th> </tr>";
foreach($staff as  $r)
{
if($r['user_level']==5)
{
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['level']}</td> <td>\${$r['money']}</td> <td>".date('F j, Y, g:i:s a',$r['laston'])."</td> <td>$on</td> </tr>";
}
}
print "</table>";

$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...