KXStudio Website https://kx.studio/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

114 lines
4.6KB

  1. <?php
  2. $PAGE_TITLE = "KXStudio : Donations";
  3. $PAGE_TYPE = "DONATIONS";
  4. $PAGE_SOURCE_1 = ARRAY("/Donations");
  5. $PAGE_SOURCE_2 = ARRAY("Donations");
  6. include_once("includes/header.php");
  7. require "donate/config.php";
  8. require "donate/connect.php";
  9. ?>
  10. <p>
  11. KXStudio is and always be a free and open-source project to everyone.<br/>
  12. Donations will help ensure that developers have the needed enthusiasm and motivation to keep working hard on the project.<br/>
  13. Just because we're open-source doesn't mean we're allergic to money. ;)
  14. </p>
  15. <p>
  16. Currently the KXStudio project accepts donations via Flattr or PayPal.<br/>
  17. You can do a one-time donation or subscribe monthly.<br/>
  18. In either case, we thank you in advance for any donation you make!<br/>
  19. </p>
  20. <p>
  21. Note that PayPal takes a minimum 5% fee on all donations (10&euro; becomes 9.31&euro;).<br/>
  22. You can bypass this fee by sending money directly to falktx@falktx.com as a friend.<br/>
  23. <br/>
  24. </p>
  25. <?php
  26. $cur_amount = 0.0;
  27. if ($db_link) {
  28. $sql_donations_month = mysql_query("SELECT * FROM donations WHERE MONTH(dt) = MONTH(NOW()) AND YEAR(dt) = YEAR(NOW())");
  29. $sql_donations_last5 = mysql_query("SELECT * FROM donations ORDER BY dt DESC LIMIT 5");
  30. if (mysql_num_rows($sql_donations_month)) {
  31. while ($sql_row = mysql_fetch_assoc($sql_donations_month)) {
  32. $cur_amount += $sql_row["amount"];
  33. }
  34. }
  35. $cur_percent = $cur_amount / 300.0 * 100.0;
  36. if ($cur_percent > 100.0) {
  37. $cur_percent = 100.0;
  38. }
  39. ?>
  40. <div id="donations_container">
  41. This month donations: <?php print_r($cur_amount); ?> of 300.0 &euro; target<br/>
  42. <div id="donations_bar"><div style="width:<?php print_r($cur_percent); ?>%"></div></div>
  43. <p><br/></p>
  44. </div>
  45. <?php } /* $db_link */ ?>
  46. <table>
  47. <tr><td width="40px">
  48. </td><td valign="bottom" width="200px">
  49. <b>Last 5 donations:</b><br/>
  50. <?php
  51. while ($sql_row = mysql_fetch_assoc($sql_donations_last5)) {
  52. echo "" . date("Y-m-d", strtotime($sql_row["dt"])) . " - " . $sql_row["amount"] . "&euro;<br/>";
  53. }
  54. ?>
  55. </td><td valign="bottom" width="150px">
  56. <a class="FlattrButton" style="display:none;" href="http://kxstudio.sourceforge.net/"></a>
  57. <noscript>
  58. <a href="http://flattr.com/thing/1098067/KXStudio" target="_blank">
  59. <img src="http://api.flattr.com/button/flattr-badge-large.png" alt="Flattr this" title="Flattr this" border="0" /></a>
  60. </noscript>
  61. </td><td valign="bottom" width="150px">
  62. <form action="https://www.paypal.com/cgi-bin/webscr" method="post">
  63. <input type="hidden" name="cmd" value="_s-xclick">
  64. <input type="hidden" name="hosted_button_id" value="A8QZW5UPVZGTW">
  65. <input type="hidden" name="currency_code" value="EUR">
  66. <input type="hidden" name="notify_url" value="http://kxstudio.sourceforge.net/donate/ipn.php"/>
  67. <input type="hidden" name="return" value="http://kxstudio.sourceforge.net/donate/thankyou.php"/>
  68. <input type="hidden" name="rm" value="2"/>
  69. <input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif" border="0" name="submit" alt="PayPal">
  70. <img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">
  71. </form>
  72. </td><td align="center" valign="bottom" width="220px">
  73. <form action="https://www.paypal.com/cgi-bin/webscr" method="post">
  74. <input type="hidden" name="cmd" value="_s-xclick">
  75. <input type="hidden" name="hosted_button_id" value="7G5AKFSNVDBX8">
  76. <table>
  77. <tr><td>
  78. <input type="hidden" name="on0" value="Quantity">Quantity</td></tr>
  79. <tr><td>
  80. <select name="os0">
  81. <option value="Small">Small : &euro;5.00 EUR - monthly</option>
  82. <option value="Medium">Medium : &euro;10.00 EUR - monthly</option>
  83. <option value="Large">Large : &euro;25.00 EUR - monthly</option>
  84. </select>
  85. </td></tr>
  86. </table>
  87. <input type="hidden" name="currency_code" value="EUR">
  88. <input type="hidden" name="notify_url" value="http://kxstudio.sourceforge.net/donate/ipn.php"/>
  89. <input type="hidden" name="return" value="http://kxstudio.sourceforge.net/donate/thankyou.php"/>
  90. <input type="hidden" name="rm" value="2"/>
  91. <input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_subscribe_LG.gif" border="0" name="submit" alt="PayPal">
  92. <img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">
  93. </form>
  94. </td></tr>
  95. </table>
  96. <p><br/></p>
  97. <?php
  98. include_once("includes/footer.php");
  99. ?>