示例#1
0
<div class="panel panel-default" style="padding: 20px;">
	<?php 
$ToSLink = Setting::QuickValue("tos_link");
if (!empty($ToSLink)) {
    echo '
				<div class="alert alert-warning" role="alert">
					<b>Notice:</b> By donating you agree to our <a href="' . $ToSLink . '">Terms of Service!</a>
				</div>
			';
}
?>
	
	<h3 style="margin-left: 20px;">Donate</h3>

	<br />
	
	<?php 
$PresetAmounts = array(5, 10, 15, 20, 25, 30);
foreach ($PresetAmounts as $Amount) {
    echo '
				<form name="form_' . $Amount . '" method="POST" action="?page=donate" style="display: inline-block;">
					<input type="hidden" name="go" value="true" />
					<input type="hidden" name="amount" value="' . $Amount . '" />
				
					<button style="background-color: #EEE;border: 1px solid #CCC;padding: 10px;display: inline-block;margin: 10px;color: #428bca;">
						<img src="includes/images/money_dollar.png" /> <b>' . number_format((double) $Amount, 2, '.', '') . '</b>
					</button>
				</form>
			';
}
?>
示例#2
0
<div class="row">
	<div class="col-md-4">
		<div class="panel panel-primary">
			<div class="panel-heading">
				<h3 class="panel-title" style="font-size: 12px;height: 12px;">Send Credits</h3>
			</div>
		
			<div class="panel-body">
				<?php 
if (Setting::QuickValue("credittransfer") == false) {
    echo '<i style="font-size: 12px;">This feature has been disabled.</i>';
} else {
    ?>
				<form method="POST" action="?page=account" class="form-inline" role="form">
					<input type="hidden" name="sendCredits" value="1" />
					
					<div class="row" style="line-height: 38px;">
						<div class="col-md-4" style="text-align: right;">
							<b>Amount</b>
						</div>
						
						<div class="col-md-8" style="text-align: right;">
							<input type="text" name="amount" class="form-control" placeholder="$5.50" style="float: left;width: 80px;margin-right: 10px;" />
						</div>
					</div>
					
					<div class="row" style="line-height: 38px;">
						<div class="col-md-4" style="text-align: right;">
							<b>To</b>
						</div>
					
示例#3
0
<?php

if (isset($_POST["sendCredits"]) && Setting::QuickValue("credittransfer") == true) {
    $Amount = intval(str_replace("\$", "", $_POST["amount"]));
    $ToSteam = $_POST["toSteam"];
    if ($Amount == null || 0 >= $Amount || $Amount > User::$ActiveUser->GetValue("Credit")) {
        echo '
				<div class="alert alert-danger" role="alert">
					There was an error trying to transfer those credits...
				</div>
			';
    } else {
        $ToUser = User::GetByField("User", "SteamID", $ToSteam);
        if (!isset($ToUser) || !$ToUser->IsReal()) {
            echo '
					<div class="alert alert-danger" role="alert">
						No user was found with that SteamID!
					</div>
				';
        } else {
            User::$ActiveUser->AddCredit(-1 * $Amount);
            $ToUser->AddCredit($Amount);
            echo '
					<div class="alert alert-success" role="alert">
						Sent $' . number_format($Amount, 2) . ' to SteamID ' . $ToSteam . '
					</div>
				';
        }
    }
}
示例#4
0
<div class="panel panel-default">
	<div class="panel-body">
		<?php 
echo Setting::QuickValue("homehtml");
?>
	</div>
</div>
示例#5
0
curl_setopt($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $req);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($ch, CURLOPT_FORBID_REUSE, 1);
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Connection: Close'));
if (!($res = curl_exec($ch))) {
    curl_close($ch);
    exit;
}
curl_close($ch);
if (strcmp($res, "VERIFIED") == 0) {
    /* SETUP OUR VARIABLES */
    $Email = Setting::QuickValue("pp_email");
    $Currency = Setting::GetByField("Setting", "SysName", "pp_currency")->GetValue();
    $first_name = $_POST['first_name'];
    $last_name = $_POST['last_name'];
    $item_name = $_POST['item_name'];
    $item_number = intval($_POST['item_number']);
    $payment_status = $_POST['payment_status'];
    $payment_amount = floatval($_POST['mc_gross']);
    $payment_currency = $_POST['mc_currency'];
    $txn_id = $_POST['txn_id'];
    $receiver_email = $_POST['receiver_email'];
    $payer_email = $_POST['payer_email'];
    $custom = $_POST['custom'];
    /* MAKE SURE THEY ARENT TRYING ANYTHING TRICKY */
    if ($payment_currency != $Currency) {
        die("");
示例#6
0
<?php

if (isset($_POST["go"])) {
    global $GMDConfig;
    $Amount = intval($_POST["amount"]);
    $PageURL = $GMDConfig["Domain"] . $GMDConfig["Path"];
    die('
			<form id="donateForm" action="https://www.paypal.com/cgi-bin/webscr" method="POST">
				<input type="hidden" name="cmd" value="_xclick">
				<input type="hidden" name="notify_url" value="http://' . $PageURL . '?page=ipn">
				<input type="hidden" name="image_url" value="' . ($PageURL . Setting::QuickValue("banner")) . '">
				<input type="hidden" name="business" value="' . Setting::QuickValue("pp_email") . '">
				<input type="hidden" name="currency_code" value="' . Setting::QuickValue("pp_currency") . '">
				<input type="hidden" name="amount" value="' . $Amount . '">
				<input id="coinName" type="hidden" name="item_name" value="Donation">
				<input type="hidden" name="custom" value="' . User::$ActiveUser->GetValue("SteamID") . '">
			</form>
			
			<div class="panel panel-default" style="padding: 40px;">
				<h3>Donate</h3>
				<br />
				Please wait while you are being redirected...
			</div>
			
			<script>document.getElementById( "donateForm" ).submit();</script>
		');
}