function addOsuAccount($username, $password, $playerID)
{
    $db = sqlconn();
    //if user already exist
    if (getPlayerIDFromOsu($username) != '') {
        echo "Already in db<br>";
        return false;
    }
    $query = 'INSERT INTO `users_accounts` (ID, osuname, playerID) 
			VALUES (NULL, :osuname, :playerID)';
    $prepared = $db->prepare($query);
    $prepared->bindParam(':osuname', $username, PDO::PARAM_STR);
    $prepared->bindParam(':playerID', $playerID, PDO::PARAM_INT);
    $success = $prepared->execute();
    //echo 'Executed insert query: '.($prepared->execute() ? 'ok' : 'failed').'<br>';
    if (!success) {
        echo 'SQL error: ';
        print_r($prepared->errorInfo());
        echo '<br>';
    }
    return checkOsuLogin($username, $password);
    //adding to database
}
    exit(displayError('disabled'));
}
$replayID = 0;
$replayLocation = '/home/osuserve/public_html/web/replay/';
$IV = $_POST['iv'];
$key = 'h89f2-890h2h89b34g-h80g134n90133';
$scoreEncrypted = $_POST["score"];
$scoreDecrypted = decryptText($scoreEncrypted);
$score = explode(':', $scoreDecrypted);
//BOOM
//get playerID
$playerID = getPlayerIDFromOsu($score[1]);
if ($playerID == '') {
    displayError('nouser');
}
if (!checkOsuLogin($score[1], $_POST["pass"])) {
    displayError('pass');
}
if (isUserBanned($playerID)) {
    displayError('ban');
}
//set failed or not
//pass: 2
//quit: 1
//fail: 0
$completed = 2;
if (isset($_POST['x'])) {
    //user didnt finish map
    $completed = $_POST['x'];
}
addToDatabase($score, $playerID, $completed);
colour: (byte.byte.byte)
wait: (int)		//wait ms before showing
time: (int)		//no idea
hold: (int)		//wait this made it way more confusing now

some fancy colors:
255.255.0	Gold
255.0.255	pink-ish color
0.255.255	Cyan
*/
echo '9.28235' . "\r\n";
//no idea, unused
if ($playerID == '') {
    exit;
}
if (!checkOsuLogin($username, $passwordHash)) {
    echo "\r\n";
    echo scoreString(0, 'You', 1, 0, 0, 10, 50, 1, 0, 0, 0, 0, 0, 1, 0);
    echo scoreString(0, 'are', 0, 0, 0, 0, 50, 1, 10, 0, 0, 0, 0, 2, 0);
    echo scoreString(0, 'invalid!', -1, 0, 2, 10, 0, 1, 0, 0, 0, 0, 0, 3, 0);
    exit;
}
if (isUserBanned($playerID)) {
    echo "\r\n";
    echo scoreString(0, 'You', 1, 0, 0, 10, 50, 1, 0, 0, 0, 0, 0, 1, 0);
    echo scoreString(0, 'are', 0, 0, 0, 0, 50, 1, 10, 0, 0, 0, 0, 2, 0);
    echo scoreString(0, 'banned!', -1, 0, 2, 10, 0, 1, 0, 0, 0, 0, 0, 3, 0);
    exit;
}
getScores($c, $mode, $playerID);
//personal score