Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- require('../functions.php');
- require('../config.php');
- if($_GET['crypt'] == 8898753125564561 && isset($_GET['name']) && isset($_GET['pass']))
- {
- //replace spaces with an underscore (_)
- //clean the query with mysql_real_escape_string
- $name = mysql_real_escape_string(str_replace('_', ' ', $_GET['name']));
- $password = md5(sha1(md5(sha1(strtolower($_GET['password'])))));
- $query = mysql_query("SELECT `acc_status` FROM users WHERE username = '$name' AND password = '$password' LIMIT 1");
- if(mysql_num_rows($query) >= 1)
- {
- //successfull login
- //lets return their rank
- $rank = mysql_fetch_assoc($query);
- //return their rank
- //0 == banned
- //1 == user
- //2 == forum_moderator
- //3 == administrator
- echo $rank['acc_status'];
- }
- else
- {
- //incorrect password/username combination
- echo -1;
- }
- }
- else
- {
- //something failed (either incorrect crypt ID or a required field is missing)
- echo -2;
- }
- ?>
Add Comment
Please, Sign In to add comment