Esempio n. 1
1
function GamePage()
{
    global $base_uri;
    $uid = params('user');
    if (!isset($_SESSION['uid'])) {
        return 0;
    } else {
        createToken($_SESSION['uid']);
    }
    $reg = 0;
    $shit = 0;
    if (!isset($uid) || $uid == "") {
        $uid = $_SESSION['uid'];
    } else {
        if (!check_registration($uid)) {
            $reg = 1;
        }
        $shit = 1;
    }
    $user = getUserInfo($_SESSION['access_token'], $uid, 'photo_max');
    if ($reg) {
        register($uid, $user['first_name'], $user['last_name']);
    }
    echo $user['first_name'] . " " . $user['last_name'];
    echo "<img src=\"" . $user['photo_max'] . "\" /><br><br>";
    if ($shit) {
        echo "<a href=\"/shit/" . $_SESSION['uid'] . "/" . $uid . "/" . getToken($_SESSION['uid']) . "\">shit</a><br>";
    }
    $friends = getUserFriends($_SESSION['access_token'], $uid);
    foreach ($friends as $friend) {
        echo $friend["first_name"] . " " . $friend["last_name"] . "<br>";
        echo "<a href=\"{$base_uri}/game/" . $friend['uid'] . "\"><img src=\"" . $friend["photo_50"] . "\" /></a><hr>";
    }
}
Esempio n. 2
0
                } else {
                    $db->query("DELETE FROM " . USERPREFIX . "_social_login WHERE sid='{$social_user['sid']}'");
                }
            }
        } else {
            if (empty($social_user['email'])) {
                enter_mail();
            }
            $i = 1;
            $check_name = $social_user['nickname'];
            while (!check_name($check_name)) {
                $i++;
                $check_name = $social_user['nickname'] . '_' . $i;
            }
            $social_user['nickname'] = $check_name;
            if (check_registration($social_user['nickname'], $social_user['email'], $social_user)) {
                register_user($social_user);
            }
        }
    } else {
        echo str_replace("{text}", $social_user, $popup);
        die;
    }
} elseif (isset($_GET['sub']) and !$is_logged and $config['allow_social'] and $config['allow_registration']) {
    include_once ENGINE_DIR . '/data/socialconfig.php';
    $url = false;
    $not_allow_symbol = array("\"", "`", "\t", '\\n', '\\r', "\n", "\r", '\\', ",", "/", "¬", "#", ";", ":", "~", "[", "]", "{", "}", ")", "(", "*", "^", "%", "\$", "<", ">", "?", "!", '"', "'", " ", "&");
    $_POST['email'] = str_replace($not_allow_symbol, '', $_POST['email']);
    $check = check_email($_POST['email']);
    if ($check !== true) {
        enter_mail($check);
Esempio n. 3
0
}
//--------------------------------------------------------------
// decide what to do
//	listed below are all of the possible commands
switch ($_POST['page_flag']) {
    case 'start':
        // normal operation
        break;
    case 'check_email':
        check_email();
        if ($task == 'edit' && $_POST['sys_flag'] == 'donate') {
            $task = 'donate_now';
        }
        break;
    case 'check_registration':
        check_registration();
        break;
    case 'edit':
        $task = 'edit';
        break;
    case 'password_reminder':
        $task = 'password_reminder';
        break;
    case 'password_sender':
        check_password_reminder();
        break;
    case 'logout':
        delete_cookie();
        $loggedin = FALSE;
        $admin = FALSE;
        // you will never go past this point as it's done through Ajax!!!!