Advertisement
wisnu223

oper wonderful

Jun 28th, 2016
155
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.15 KB | None | 0 0
  1. <?php
  2. //Script by Yoga Wahyu Firmansyah
  3.  
  4. session_start();
  5.  
  6. if(!isset($_SESSION['username'])) {
  7. header('location:../login.php'); }
  8. else { $username = $_SESSION['username']; }
  9. require_once("../koneksi.php");
  10.  
  11. $query = mysql_query("SELECT * FROM user WHERE username = '$username'");
  12. $get = mysql_fetch_array($query);
  13. ?>
  14.  
  15. <?php
  16. require_once("../koneksi.php");
  17. $link = $_POST['usrnmlink'];
  18. $type = $_POST['layanan'];
  19. $jumlah = $_POST['jumlah'];
  20.  
  21. if ($type == 1) {
  22. $layanan = "Instagram Followers Server 1 HQ, Instant, Super Fast | Max Order 8000";
  23. $harg = $jumlah*17;
  24. } else if ($type == 2) {
  25. $layanan = "Instagram Followers Server 2 Slow Server";
  26. $harg = $jumlah*15;
  27. } else if ($type == 3) {
  28. $layanan = "Instagram Followers Server 3 Super Fast & Instant | Max Order 350000";
  29. $harg = $jumlah*22;
  30. } else if ($type == 4) {
  31. $layanan = "Instagram Followers HQ WP";
  32. $harg = $jumlah*16;
  33. } else if ($type == 5) {
  34. $layanan = "Instagram Likes Server 1 Super Fast & HQ | Max 10000";
  35. $harg = $jumlah*13;
  36. } else if ($type == 20) {
  37. $layanan = "Instagram Likes Server 2 Super Fast & HQ | Max 10000";
  38. $harg = $jumlah*15;
  39. } else if ($type == 32) {
  40. $layanan = "Instagram Followers Very Fast WP";
  41. $harg = $jumlah*16;
  42. } else if ($type == 31) {
  43. $layanan = "Instagram Views Server WP";
  44. $harg = $jumlah*20;
  45. } else if ($type == 69) {
  46. $layanan = "Instagram Instagram Followers Real Indonesia";
  47. $harg = $jumlah*85;
  48. } else {
  49. $harg = "Error";
  50. }
  51.  
  52. if ($get['saldo'] < $harg) { ?>
  53. <div class="alert alert-danger">
  54. Gagal : Saldo tidak mencukupi.
  55. </div>
  56. <? } else if (!$link || !$jumlah) { ?>
  57. <div class="alert alert-danger">
  58. Gagal : Masih ada data yang kosong.
  59. </div>
  60. <? } else {
  61.  
  62. $api_key = "4xp6rg9riypd012f5qd0s5ef9d15j9ed"; // API Key PanelPedia
  63. $link = $_POST['usrnmlink'];
  64. $type = $_POST['layanan'];
  65. $jumlah = $_POST['jumlah'];
  66.  
  67. $postdata = 'api_key='.$api_key.'&link='.$link.'&type='.$type.'&jumlah='.$jumlah.'';
  68. $ch = curl_init();
  69. curl_setopt($ch, CURLOPT_URL, 'http://wonderful-panel.com/api.php');
  70. curl_setopt ($ch, CURLOPT_POST, 1);
  71. curl_setopt ($ch, CURLOPT_POSTFIELDS, $postdata);
  72. curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
  73. curl_setopt ($ch, CURLOPT_SSL_VERIFYPEER, false);
  74. $store = curl_exec ($ch);
  75. curl_close ($ch);
  76. $json = json_decode($store,true);
  77.  
  78. if ($json['result'] == "error") { ?>
  79. Order error karena <?php echo $json['reason']; ?>
  80. <? } else if ($json['result'] == "success") {
  81. $no = $json['id'];
  82. $tanggal = date("Y-m-d H:i:s");
  83.  
  84. $simpan = mysql_query("UPDATE user SET saldo=saldo-$harg WHERE username = '$username'");
  85. $simpan = mysql_query("INSERT INTO historyall VALUES('','$no','$username', '$layanan', '$harg', 'Sukses', 'Url/Username : $link', '$tanggal', '$jumlah')");
  86. if($simpan) { ?>
  87. ==================================<br />
  88. Pembelian <?php echo $layanan; ?> Sukses!<br />
  89. No Order : <?php echo $no; ?><br />
  90. Username/Link : <?php echo $link; ?><br />
  91. Jumlah : <?php echo $jumlah; ?><br />
  92. Harga : <?php echo $harg; ?><br />
  93. Layanan : <?php echo $layanan; ?><br />
  94. Tanggal : <?php echo $tanggal; ?><br />
  95. ==================================<br />
  96. <? } else { ?>
  97. ERROR
  98. <? } }
  99. }
  100. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement