Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- define('IN_MYBB', false);
- require_once './global.php';
- if($_POST["apikey"] == "YOURAPIKEYHERE")
- {
- if($_GET["action"] == "login")
- {
- $query = $db->query("SELECT * FROM " . TABLE_PREFIX . " WHERE username='".$db->escape_string($_POST['username'])."'");
- if($query->num_rows == 0)
- {
- echo "USER_NOTFOUND";
- } else {
- while($result = $db->fetch_array($query))
- {
- $end_password = $result['password'];
- if(md5(md5($result['salt']).md5($_POST["password"])) == $end_password)
- {
- echo "OK_LOGINSUCCESS";
- } else {
- echo "FAIL_WRONGLOGINDATA";
- }
- }
- }
- }
- } else {
- die("Access denied.");
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement