Raised This Month: $ Target: $400
 0% 

Admin Display from SB


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
bouncer
Veteran Member
Join Date: Apr 2009
Old 11-02-2010 , 09:53   Re: Admin Display from SB
Reply With Quote #7

Code:
<?php /*
Rizlas Admin Display
*/
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
	<head>
		<meta http-equiv="content-type" content="text/html; charset=utf-8">
		<title>SB Admins Page</title>
	</head>

<STYLE TYPE='text/css' media='all'>@import "index.css";</style>
 
		 <?php
// the cache
include "cache.php";

// includes the connection file
include "connect.php";

$ch = new cache();
//find the data


//prepare the query
$sql = "SELECT user,authid,srv_group,gid FROM ADMINS_TABLE WHERE srv_group = 'Managers' OR srv_group = 'Council' OR srv_group = 'Honor Members' OR srv_group = 'Members' OR srv_group = 'Recruits' OR srv_group = 'Premium Gamers' ORDER BY gid ASC";

//perform the query and store the resource in '$query'
$query = mysql_query($sql);

//see if there are any results at all
if(mysql_num_rows($query) > 0)
{
    //there is one or more results, start printing the table
    print '<div align="center">
<a href="http://www.brotherhoodofgamers.com">
<img src="http://www.brotherhoodofgamers.com/bans/images/logos/sb-large.png" alt="Sourcebans Admins" title="[B-O-G] Admins & Premium Gamers"></a></div>

<p>This is some text test</p></div align="center"><table border="0" cellpadding="2" cellspacing="2" width="100%">';
    
    //fetch every possible row from the resource and do nice stuff with it
   while($info = mysql_fetch_assoc($query))
    {
        //convert the steamid into a community id
        $community_id = ((substr($info['authid'], 10)) * 2) + 1197960265728 + (substr($info['authid'], 8, 1));

$community_id = '7656'.$community_id; 
        
        //create a link to the Steam community profile
        $site = 'http://steamcommunity.com/profiles/'.$community_id;

        
        //print the table row with all the info
        print '<tr><td><img src="http://www.steamprofile.com/profile/simple/steam/'.$info['authid'].'.png" ></td><td align="center"><a href="steam://friends/add/'.$community_id.'">Add as Friend</a></td><td align="center"><a href='.$site.'>Steam Community Page</a></td><td>'.$info['srv_group'].'</td></tr><tr><td colspan="4"><hr></td></tr>';
    }
    //close the table
    print '</table><br><div align="center"><p><small>Special thanks to Voogru for the conversions, 8088 on Allied Modders for helping to fix. Steamprofile.com for their images. Depictation.net for their cache and whoever else I forgot! Sorry.<br><br>&copy; 2010 Brotherhood Of Gamers</p></small><br><br></div></div>';
}
//there are no results
else print 'No results';

echo date("D M j G:i:s T Y");
$ch->close();
	
?>
	</body>
</html>
__________________


bouncer is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 21:14.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode