Neji_Hyuuga Posted November 16, 2008 Posted November 16, 2008 <?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 Quote
POG1 Posted November 16, 2008 Posted November 16, 2008 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(); ?> Quote
Neji_Hyuuga Posted November 16, 2008 Author Posted November 16, 2008 Re: Need Help With My Staff List thanks mate for that but it only shows me wot the admins have in crystals and donator days mate how do i make it so secretary and assistant have that as well Quote
Neji_Hyuuga Posted November 16, 2008 Author Posted November 16, 2008 Re: Need Help With My Staff List got it now mate cheers for the help i really do appreciate it Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.