Пример #1
0
            $info["points"] += $donationpoints;
            $info["donation_total"] += $amount;
            $info["donation_credited"] += $donationpoints;
            sql_set_info($steamid, $db, $info);
            ?>
			    <h2>Donation complete - Thank you!</h2>
			    <?php 
            $pdata = sql_get_info($steamid, $db);
            $current_points = $pdata["points"];
            $past_donations = $pdata["donation_total"];
            $infostring = $current_points . " Points";
            if ($past_donations > 0) {
                $infostring .= ", " . dollars($past_donations) . " Donated";
            }
            //Workaround so we don't have to use the STEAM API again...
            output_steam_info($steamid, array(0 => array("steamid" => $steamid, "personaname" => $_POST["steam_personaname"], "personastate" => $_POST["steam_personastate"], "gameid" => $_POST["steam_gameid"], "avatarfull" => $_POST["steam_avatarfull"])), $infostring);
            ?>
			    <p>Please rejoin the game for your points to update on the server.</p>
			    <?php 
        } catch (\Stripe\Error\ApiConnection $e) {
            output_error("Networking error ApiConnection");
        } catch (\Stripe\Error\InvalidRequest $e) {
            output_error("Error: Form was resubmitted");
        } catch (\Stripe\Error\Api $e) {
            output_error("Networking error Api");
        } catch (\Stripe\Error\Card $e) {
            output_error("Error: Your card could not be charged!");
            //Uncomment for more info about why cards can't be charged
            //$e_json = $e->getJsonBody();
            //print_r($e_json['error']);
        }
Пример #2
0
</h2>

	<?php 
$current_points = 0;
$past_donations = 0;
$db = sql_start();
if ($steamid) {
    $pdata = sql_get_info($steamid, $db);
    $current_points = $pdata["points"];
    $past_donations = $pdata["donation_total"];
    $infostring = $current_points . " Points";
    if ($past_donations > 0) {
        $infostring .= ", " . dollars($past_donations) . " Donated";
    }
    $players = fetch_steam_info($steamid);
    output_steam_info($steamid, $players, $infostring);
    ?>
		<p style="margin-top:0px;">
			Validated Successfully - <a href="index.php?logout" class="hoverul">Sign Out</a>
		</p>
		<?php 
} else {
    ?>
		<p>
		<a href="<?php 
    echo $steamsignin->genUrl();
    ?>
"><img src="steamsignin.png" class="steambutton" alt="Sign in through Steam"></a>
		<br>
		Click this button to sign in through your Steam account.<br>
		This is only for validation - no private account information will be shared with us!