Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- * FILE DESCRIPTION: a class handling the integration of ScapeRune
- *
- * @Author: x_stormrider
- * @Date: 4/7/2017
- * @Time: 8:27 PM
- */
- if (isset($_GET['name']) && isset($_GET['pass'])) {
- require('../includes/config.php');
- require('../structure/database.php');
- $database = new database($db_host, $db_name, $db_user, $db_password);
- $data = $database->processQuery("SELECT password FROM users WHERE username = ? LIMIT 1", array($_GET['name']), true);
- $password = hash(sha256, md5(sha1($_GET['pass'])));
- $db_password = substr(substr($data[0]['password'], 54), 0, -3);
- echo ($password == $db_password) ? '1' : '0';
- } else {
- echo '0';
- }
- if (isset($_GET['name'])) {
- require('../includes/config.php');
- require('../structure/database.php');
- $database = new database($db_host, $db_name, $db_user, $db_password);
- $data = $database->processQuery("SELECT acc_status FROM users WHERE username = ? LIMIT 1", array($_GET['name']), true);
- $status = $data[0]['acc_status'];
- echo $status;
- } else {
- echo '0';
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement