<?php
// (c) 2014-2015 Timothy Pearson
// All Rights Reserved

include("tde-head-and-foot.php");
doHeader("Support Trinity", "Development", "Donations");
?>

<h2>The Trinity project needs your support!</h2>
    <p>
    While Trinity is free software, making it is not free.<br>
    Developing and maintaining Trinity takes an enormous amount of effort, and relies heavily on both a fast
    Internet connection and large, power-hungry computers for the build farm and Web services.
    </p>
    <p>
    If you can, please help to both assist the Trinity development team and pay for the various resources in
    use by donating here:
    </p>

<?php
	$donation_complete = false;
	$donation_aborted = false;
	if (isset($_GET['action'])) {
		if ($_GET['action'] == "done") {
			$donation_complete = true;
		}
		else if ($_GET['action'] == "cancel") {
			$donation_aborted = true;
		}
	}
	if ($donation_complete == true) {
		echo "	<fieldset>";
		echo "	<legend>Donation Received</legend>";
		echo "    <font color=\"green\"><b>Thank you for your donation to the Trinity Desktop project!</b></font><br>&nbsp;<br>Your funding will help to create an even better TDE experience into the future.";
		echo "	</fieldset>";
	}
	else if ($donation_aborted == true) {
		echo "	<fieldset>";
		echo "	<legend>Donation Cancelled</legend>";
		echo "    <font color=\"red\"><b>We're sorry you changed your mind.</b></font><br>&nbsp;<br>However, if you love TDE there are other ways to get involved and help the project!<br>Check out our <a href=\"/helpwanted.php\">Get Involved</a> page for more ideas.";
		echo "	</fieldset>";
	}
	else {
		echo "	<fieldset>";
		echo "	<legend>Via PayPal</legend>";
		echo "	<form action=\"https://www.paypal.com/cgi-bin/webscr\" method=\"post\" target=\"_top\">";
		echo "	<input type=\"hidden\" name=\"cmd\" value=\"_s-xclick\">";
		echo "	<input type=\"hidden\" name=\"hosted_button_id\" value=\"HVGH827GE28G2\">";
		echo "	<input type=\"image\" src=\"https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif\" border=\"0\" name=\"submit\" alt=\"PayPal - The safer, easier way to pay online!\">";
		echo "	<img alt=\"\" border=\"0\" src=\"https://www.paypalobjects.com/en_US/i/scr/pixel.gif\" width=\"1\" height=\"1\">";
		echo "	</form>";
		echo "	</fieldset>";
		echo "	</form>";
		echo "	<p>";
		echo "	<fieldset>";
		echo "	<legend>Via BitCoin</legend>";
		echo "		<a href=\"bitcoin:1H1RMzujpGC9wZPSjZ6hWqz4BxQ5dzhHti?amount=0.05&amp;label=Trinity%20Desktop%20Environment%20Donation\">Donate 50mBTC to TDE!</a><BR>";
		echo "		<B>Pay to:</B> 1H1RMzujpGC9wZPSjZ6hWqz4BxQ5dzhHti<BR>";
		echo "		<B>Suggestion:</B> 0.05 BTC<BR>";
		echo "		<B>Message:</B> Trinity Desktop Environment Donation";
		echo "	</fieldset>";
		echo "	<p>";
		echo "    Every little bit helps and is much appreciated!";
		echo "  </p>";
	}
?>

<?php
	doFooter();
?>
