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 3.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  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 = array(
  17. "purchases" => $Purchases,
  18. "price" => $Price,
  19. );
  20. echo json_encode($Response);
  21. } else {
  22. enforce_login();
  23. if ($LoggedUser['DisablePoints']) {
  24. View::show_header('Store'); ?>
  25. <div class='thin'>
  26. <h2 id='general'>Denied</h2>
  27. <div class='box pad' style='padding: 10px 10px 10px 20px;'>
  28. <p>You are not allowed to spend <?=BONUS_POINTS?>.</p>
  29. </div>
  30. </div>
  31. <? View::show_footer();
  32. } else {
  33. if (isset($_REQUEST['item'])) {
  34. switch ($_REQUEST['item']) {
  35. case 'upload_1GB':
  36. include(SERVER_ROOT.'/sections/store/upload_1GB.php');
  37. break;
  38. case 'upload_10GB':
  39. include(SERVER_ROOT.'/sections/store/upload_10GB.php');
  40. break;
  41. case 'upload_100GB':
  42. include(SERVER_ROOT.'/sections/store/upload_100GB.php');
  43. break;
  44. case 'upload_1000GB':
  45. include(SERVER_ROOT.'/sections/store/upload_1000GB.php');
  46. break;
  47. case '1k_points':
  48. include(SERVER_ROOT.'/sections/store/1k_points.php');
  49. break;
  50. case '10k_points':
  51. include(SERVER_ROOT.'/sections/store/10k_points.php');
  52. break;
  53. case '100k_points':
  54. include(SERVER_ROOT.'/sections/store/100k_points.php');
  55. break;
  56. case '1m_points':
  57. include(SERVER_ROOT.'/sections/store/1m_points.php');
  58. break;
  59. case 'token':
  60. include(SERVER_ROOT.'/sections/store/token.php');
  61. break;
  62. case 'freeleechize':
  63. include(SERVER_ROOT.'/sections/store/freeleechize.php');
  64. break;
  65. case 'freeleechpool':
  66. include(SERVER_ROOT.'/sections/store/freeleechpool.php');
  67. break;
  68. case 'invite':
  69. include(SERVER_ROOT.'/sections/store/invite.php');
  70. break;
  71. case 'title':
  72. include(SERVER_ROOT.'/sections/store/title.php');
  73. break;
  74. case 'promotion':
  75. include(SERVER_ROOT.'/sections/store/promotion.php');
  76. break;
  77. case 'become_admin':
  78. include(SERVER_ROOT.'/sections/store/become_admin.php');
  79. break;
  80. case 'badge':
  81. include(SERVER_ROOT.'/sections/store/badge.php');
  82. break;
  83. case 'coinbadge':
  84. include(SERVER_ROOT.'/sections/store/coinbadge.php');
  85. break;
  86. case 'capture_user':
  87. include(SERVER_ROOT.'/sections/store/capture_user.php');
  88. break;
  89. default:
  90. error(404);
  91. break;
  92. }
  93. } else {
  94. include(SERVER_ROOT.'/sections/store/store.php');
  95. }
  96. }
  97. }
  98. ?>