Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- @mysql_connect( "localhost", "fku", "fku" ) or die( "Couldn't connect!" );
- @mysql_select_db( "fku" ) or die( "Couldn't select DB!" );
- if ( isset($_GET["user"] ) && isset($_GET["pass"] ) )
- {
- $Username = $_GET["user"];
- $Password = $_GET["pass"];
- if ( Is_User_Member($Username, $Password) )
- {
- $groupSQL = mysql_query( "SELECT `usergroupid` FROM `user` WHERE `username` = '$Username'" );
- $dumpTable = mysql_fetch_assoc( $groupSQL );
- $groups = $dumpTable[ 'usergroupid' ];
- if( $groups == 6 )
- echo "Admin";
- else if( $groups == 7 )
- echo "Moderators";
- else if( $groups == 2 )
- echo "Registered";
- else if( $groups == 5 )
- echo "Super Moderators";
- else if( $groups == 1 )
- echo "UnRegistered";
- else if( $groups == 3 )
- echo "Awaiting Email";
- else if( $groups == 9 )
- echo "Premium";
- else if( $groups == 10 )
- echo "Graphics";
- else if( $groups == 8 )
- Die("");
- else
- echo "Unknown User Group ID";
- }
- }
- function Is_User_Member( $username, $password )
- {
- if ( $username !== NULL && $password !== NULL )
- {
- $query = sprintf("SELECT `password`,`salt` FROM `user` WHERE `username`='%s'", $username);
- $result = mysql_query($query);
- while ( $array = mysql_fetch_assoc($result) )
- {
- $vBpass = $array[ 'password' ];
- $vBsalt = $array[ 'salt' ];
- }
- $hashedPass = md5(md5($password) . $vBsalt);
- if ( $hashedPass == $vBpass )
- return true;
- else
- return false;
- }
- }
- ?>
Add Comment
Please, Sign In to add comment