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.0KB

8 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  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. <br/>
  20. </p>
  21. <?php
  22. if ($db_link) {
  23. $cur_amount = 0.0;
  24. $sql_donations = mysql_query("SELECT * FROM donations WHERE MONTH(dt) = MONTH(NOW()) AND YEAR(dt) = YEAR(NOW())");
  25. if (mysql_num_rows($sql_donations)) {
  26. while ($sql_row = mysql_fetch_assoc($sql_donations)) {
  27. $cur_amount += $sql_row["amount"];
  28. }
  29. }
  30. $cur_percent = $cur_amount / 300.0 * 100.0;
  31. if ($cur_percent > 100.0) {
  32. $cur_percent = 100.0;
  33. }
  34. ?>
  35. <div id="donations_container">
  36. This month donations: <?php print_r($cur_amount); ?> of 300.0 &euro; target<br/>
  37. <div id="donations_bar"><div style="width:<?php print_r($cur_percent); ?>%"></div></div>
  38. <p><br/></p>
  39. </div>
  40. <?php } /* $db_link */ ?>
  41. <table>
  42. <tr><td width="40px;">
  43. </td><td valign="bottom" width="150px">
  44. <a class="FlattrButton" style="display:none;" href="http://kxstudio.sourceforge.net/"></a>
  45. <noscript>
  46. <a href="http://flattr.com/thing/1098067/KXStudio" target="_blank">
  47. <img src="http://api.flattr.com/button/flattr-badge-large.png" alt="Flattr this" title="Flattr this" border="0" /></a>
  48. </noscript>
  49. </td><td valign="bottom" width="150px">
  50. <form action="https://www.paypal.com/cgi-bin/webscr" method="post">
  51. <input type="hidden" name="cmd" value="_s-xclick">
  52. <input type="hidden" name="hosted_button_id" value="A8QZW5UPVZGTW">
  53. <input type="hidden" name="currency_code" value="EUR">
  54. <input type="hidden" name="notify_url" value="http://kxstudio.sourceforge.net/donate/ipn.php"/>
  55. <input type="hidden" name="return" value="http://kxstudio.sourceforge.net/donate/thankyou.php"/>
  56. <input type="hidden" name="rm" value="2"/>
  57. <input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif" border="0" name="submit" alt="PayPal">
  58. <img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">
  59. </form>
  60. </td><td align="center" valign="bottom" width="220px">
  61. <form action="https://www.paypal.com/cgi-bin/webscr" method="post">
  62. <input type="hidden" name="cmd" value="_s-xclick">
  63. <input type="hidden" name="hosted_button_id" value="7G5AKFSNVDBX8">
  64. <table>
  65. <tr><td>
  66. <input type="hidden" name="on0" value="Quantity">Quantity</td></tr>
  67. <tr><td>
  68. <select name="os0">
  69. <option value="Small">Small : €5.00 EUR - monthly</option>
  70. <option value="Medium">Medium : €10.00 EUR - monthly</option>
  71. <option value="Large">Large : €25.00 EUR - monthly</option>
  72. </select>
  73. </td></tr>
  74. </table>
  75. <input type="hidden" name="currency_code" value="EUR">
  76. <input type="hidden" name="notify_url" value="http://kxstudio.sourceforge.net/donate/ipn.php"/>
  77. <input type="hidden" name="return" value="http://kxstudio.sourceforge.net/donate/thankyou.php"/>
  78. <input type="hidden" name="rm" value="2"/>
  79. <input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_subscribe_LG.gif" border="0" name="submit" alt="PayPal">
  80. <img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">
  81. </form>
  82. </td></tr>
  83. </table>
  84. <p><br/></p>
  85. <?php
  86. include_once("includes/footer.php");
  87. ?>