Oppaitime's version of Gazelle
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.

index.php 2.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. <?
  2. if (isset($_GET['api']) && $_GET['api'] == 1) {
  3. $DB->query("
  4. SELECT First, Second
  5. FROM misc
  6. WHERE Name='CoinBadge'");
  7. if ($DB->has_results()) {
  8. list($Purchases, $Price) = $DB->next_record();
  9. } else {
  10. $DB->query("
  11. INSERT INTO misc
  12. (Name, First, Second)
  13. VALUES ('CoinBadge', 0, 1000)");
  14. list($Purchases, $Price) = [0, 1000];
  15. }
  16. $Response->purchases = $Purchases;
  17. $Response->price = $Price;
  18. echo json_encode($Response);
  19. } else {
  20. enforce_login();
  21. if ($LoggedUser['DisablePoints']) {
  22. View::show_header('Store'); ?>
  23. <div class='thin'>
  24. <h2 id='general'>Denied</h2>
  25. <div class='box pad' style='padding: 10px 10px 10px 20px;'>
  26. <p>You are not allowed to spend <?=BONUS_POINTS?>.</p>
  27. </div>
  28. </div>
  29. <? View::show_footer();
  30. } else {
  31. if (isset($_REQUEST['item'])) {
  32. switch ($_REQUEST['item']) {
  33. case 'upload_1GB':
  34. include(SERVER_ROOT.'/sections/store/upload_1GB.php');
  35. break;
  36. case 'upload_10GB':
  37. include(SERVER_ROOT.'/sections/store/upload_10GB.php');
  38. break;
  39. case 'upload_100GB':
  40. include(SERVER_ROOT.'/sections/store/upload_100GB.php');
  41. break;
  42. case 'upload_1000GB':
  43. include(SERVER_ROOT.'/sections/store/upload_1000GB.php');
  44. break;
  45. case '1k_points':
  46. include(SERVER_ROOT.'/sections/store/1k_points.php');
  47. break;
  48. case '10k_points':
  49. include(SERVER_ROOT.'/sections/store/10k_points.php');
  50. break;
  51. case '100k_points':
  52. include(SERVER_ROOT.'/sections/store/100k_points.php');
  53. break;
  54. case '1m_points':
  55. include(SERVER_ROOT.'/sections/store/1m_points.php');
  56. break;
  57. case 'token':
  58. include(SERVER_ROOT.'/sections/store/token.php');
  59. break;
  60. case 'freeleechize':
  61. include(SERVER_ROOT.'/sections/store/freeleechize.php');
  62. break;
  63. case 'freeleechpool':
  64. include(SERVER_ROOT.'/sections/store/freeleechpool.php');
  65. break;
  66. case 'invite':
  67. include(SERVER_ROOT.'/sections/store/invite.php');
  68. break;
  69. case 'title':
  70. include(SERVER_ROOT.'/sections/store/title.php');
  71. break;
  72. case 'promotion':
  73. include(SERVER_ROOT.'/sections/store/promotion.php');
  74. break;
  75. case 'become_admin':
  76. include(SERVER_ROOT.'/sections/store/become_admin.php');
  77. break;
  78. case 'badge':
  79. include(SERVER_ROOT.'/sections/store/badge.php');
  80. break;
  81. case 'coinbadge':
  82. include(SERVER_ROOT.'/sections/store/coinbadge.php');
  83. break;
  84. case 'capture_user':
  85. include(SERVER_ROOT.'/sections/store/capture_user.php');
  86. break;
  87. default:
  88. error(404);
  89. break;
  90. }
  91. } else {
  92. include(SERVER_ROOT.'/sections/store/store.php');
  93. }
  94. }
  95. }
  96. ?>