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.

Donations.php 4.6KB

11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  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. <?php if ($db_link) { ?>
  50. <b>Last 5 donations:</b><br/>
  51. <?php }
  52. while ($sql_row = mysql_fetch_assoc($sql_donations_last5)) {
  53. echo "" . date("Y-m-d", strtotime($sql_row["dt"])) . " - " . $sql_row["amount"] . "&euro;<br/>";
  54. }
  55. ?>
  56. </td><td valign="bottom" width="150px">
  57. <a class="FlattrButton" style="display:none;" href="http://kxstudio.sourceforge.net/"></a>
  58. <noscript>
  59. <a href="http://flattr.com/thing/1098067/KXStudio" target="_blank">
  60. <img src="http://api.flattr.com/button/flattr-badge-large.png" alt="Flattr this" title="Flattr this" border="0" /></a>
  61. </noscript>
  62. </td><td valign="bottom" width="150px">
  63. <form action="https://www.paypal.com/cgi-bin/webscr" method="post">
  64. <input type="hidden" name="cmd" value="_s-xclick">
  65. <input type="hidden" name="hosted_button_id" value="A8QZW5UPVZGTW">
  66. <input type="hidden" name="currency_code" value="EUR">
  67. <input type="hidden" name="notify_url" value="http://kxstudio.sourceforge.net/donate/ipn.php"/>
  68. <input type="hidden" name="return" value="http://kxstudio.sourceforge.net/donate/thankyou.php"/>
  69. <input type="hidden" name="rm" value="2"/>
  70. <input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif" border="0" name="submit" alt="PayPal">
  71. <img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">
  72. </form>
  73. </td><td align="center" valign="bottom" width="220px">
  74. <form action="https://www.paypal.com/cgi-bin/webscr" method="post">
  75. <input type="hidden" name="cmd" value="_s-xclick">
  76. <input type="hidden" name="hosted_button_id" value="7G5AKFSNVDBX8">
  77. <table>
  78. <tr><td>
  79. <input type="hidden" name="on0" value="Quantity">Quantity</td></tr>
  80. <tr><td>
  81. <select name="os0">
  82. <option value="Small">Small : &euro;5.00 EUR - monthly</option>
  83. <option value="Medium">Medium : &euro;10.00 EUR - monthly</option>
  84. <option value="Large">Large : &euro;25.00 EUR - monthly</option>
  85. </select>
  86. </td></tr>
  87. </table>
  88. <input type="hidden" name="currency_code" value="EUR">
  89. <input type="hidden" name="notify_url" value="http://kxstudio.sourceforge.net/donate/ipn.php"/>
  90. <input type="hidden" name="return" value="http://kxstudio.sourceforge.net/donate/thankyou.php"/>
  91. <input type="hidden" name="rm" value="2"/>
  92. <input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_subscribe_LG.gif" border="0" name="submit" alt="PayPal">
  93. <img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">
  94. </form>
  95. </td></tr>
  96. </table>
  97. <p><br/></p>
  98. <?php
  99. include_once("includes/footer.php");
  100. ?>