Пример #1
0
<?php

require_once 'account1.php';
require_once 'exchangeQueryTools.php';
$btcToUSD = getSpot();
$btcToBuy = number_format($_GET['deposited'] / $btcToUSD, 8);
?>
<html>
<head>
<meta http-equiv="refresh" content="10; url=http://placeholder/bitcoin/atm/" />	
<script type="text/javascript">
	var printData = "You have purchased <?php 
echo $btcToBuy;
?>
 BTC\n from Mt. Gox.\n \n Thank you for using BitcoinATM.";
</script>
<?php 
include '../MouseCursor.inc';
include '../ReceiptPrinterCode.inc';
?>
</head>
<body onload="window_onload();">
<div id="debug"></div>
<?php 
if (!isset($_GET['address']) || !isset($_GET['deposited'])) {
    echo "Missing parameter.";
} else {
    echo "<p>You have bought &#3647;{$btcToBuy} from Mt. Gox.</p>";
    echo "<p>Printing receipt...</p>";
    echo "<p>Thank you for using BitcoinATM</p>";
    /*$rval = mtgox_query('0/withdraw.php',
Пример #2
0
body
{
   background-color: #FFFFFF;
   color: #000000;
}
</style>
<script type="text/javascript" src="../js/nodebug.js"></script>
<script type="text/javascript" src="../js/post_to_url.js"></script>
<?php 
include '../ActiveX/BillAcceptorClass.inc';
include 'account1.php';
include 'exchangeQueryTools.php';
?>
<script type="text/javascript">
	var btcPrice = <?php 
echo getSpot();
?>
;
	var address = "<?php 
echo $_GET['address'];
?>
";
</script>
<script type="text/javascript" src="../js/billacceptor.js"></script>
<script type="text/javascript">
	setOnBuy(doSendAndPrintReceipt);
	
	function doSendAndPrintReceipt() {
		post_to_url(
			'sendAndPrintReceipt.php',{
				address: address,
<?php

require_once 'account1.php';
require_once 'mtgoxQueryTools.php';
echo '<p>spot price: ' . getSpot() . '</p>';
echo '<p>you have $' . getBalanceUSD() . ' and &#3647;' . getBalanceBTC() . '</p>';