コード例 #1
0
ファイル: login.php プロジェクト: Oper8or/PUDS
        $current_dir_url .= $_SERVER["SERVER_NAME"];
    }
    $current_dir_url .= dirname($_SERVER['PHP_SELF']);
    return $current_dir_url;
}
function GetSteamNorm($Steam64)
{
    $authserver = bcsub($Steam64, '76561197960265728') & 1;
    //Get the third number of the steamid
    $authid = (bcsub($Steam64, '76561197960265728') - $authserver) / 2;
    //Concatenate the STEAM_ prefix and the first number, which is always 0, as well as colons with the other two numbers
    $steamid = "STEAM_0:{$authserver}:{$authid}";
    return $steamid;
}
$curdirectory = curDirectory();
$curdomain = curDomain();
if (empty($_STEAMAPI)) {
    echo "<h1>You have not configured PUDS installer correctly! Please edit login.php and put your Steam API Key in the top of the file and try again!</h1>";
} else {
    if (!isset($_SESSION['id'])) {
        echo "\n\t\t\t\t<p>Please login to configure Wullys PayPal-ULX Donation System</p>\n\t\t\t\t<form action='?login' method='post'>\n\t\t\t\t<input type='image' src='http://cdn.steamcommunity.com/public/images/signinthroughsteam/sits_small.png'>\n\t\t\t</form>\n\t\t\t<h2>Instructions for use:</h2>\n\t\t\t<p>Sign in through steam. If you are the first user it will make you admin.</p>\n\t\t\t<p>You will be told your not admin, Log out then Log in again to be authenticated as admin.</p>";
        try {
            $openid = new LightOpenID($curdomain);
            if (!$openid->mode) {
                if (isset($_GET['login'])) {
                    $openid->identity = 'http://steamcommunity.com/openid/?l=english';
                    // This is forcing english because it has a weird habit of selecting a random language otherwise
                    header('Location: ' . $openid->authUrl());
                }
            } elseif ($openid->mode == 'cancel') {
                echo 'User has canceled authentication!';
コード例 #2
0
ファイル: install.php プロジェクト: Oper8or/PUDS
    } else {
        $current_dir_url .= $_SERVER["SERVER_NAME"];
    }
    $current_dir_url .= dirname($_SERVER['PHP_SELF']);
    return $current_dir_url;
}
//Session information
$steam64 = $_SESSION['id'];
$steamID = $_SESSION['sid'];
$friendlyName = $_SESSION['name'];
$mAvatar = $_SESSION['mAvatar'];
//Defaults
if (empty($UseDB)) {
    $UseDB = 'true';
}
if (empty($_STEAMAPI)) {
    $_STEAMAPI = $_SESSION['steamAPI'];
}
if (empty($HOST)) {
    $HOST = 'localhost';
}
if (empty($payPalURL)) {
    $payPalURL = 'https://www.paypal.com/cgi-bin/webscr';
}
if (empty($website)) {
    $website = curDomain();
}
if (empty($currency)) {
    $currency = 'GBP';
}
if (empty($payPalEmail)) {