Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- //Script by Yoga Wahyu Firmansyah
- session_start();
- if(!isset($_SESSION['username'])) {
- header('location:../login.php'); }
- else { $username = $_SESSION['username']; }
- require_once("../koneksi.php");
- $query = mysql_query("SELECT * FROM user WHERE username = '$username'");
- $get = mysql_fetch_array($query);
- ?>
- <?php
- require_once("../koneksi.php");
- $link = $_POST['usrnmlink'];
- $type = $_POST['layanan'];
- $jumlah = $_POST['jumlah'];
- if ($type == 1) {
- $layanan = "Instagram Followers Server 1 HQ, Instant, Super Fast | Max Order 8000";
- $harg = $jumlah*17;
- } else if ($type == 2) {
- $layanan = "Instagram Followers Server 2 Slow Server";
- $harg = $jumlah*15;
- } else if ($type == 3) {
- $layanan = "Instagram Followers Server 3 Super Fast & Instant | Max Order 350000";
- $harg = $jumlah*22;
- } else if ($type == 4) {
- $layanan = "Instagram Followers HQ WP";
- $harg = $jumlah*16;
- } else if ($type == 5) {
- $layanan = "Instagram Likes Server 1 Super Fast & HQ | Max 10000";
- $harg = $jumlah*13;
- } else if ($type == 20) {
- $layanan = "Instagram Likes Server 2 Super Fast & HQ | Max 10000";
- $harg = $jumlah*15;
- } else if ($type == 32) {
- $layanan = "Instagram Followers Very Fast WP";
- $harg = $jumlah*16;
- } else if ($type == 31) {
- $layanan = "Instagram Views Server WP";
- $harg = $jumlah*20;
- } else if ($type == 69) {
- $layanan = "Instagram Instagram Followers Real Indonesia";
- $harg = $jumlah*85;
- } else {
- $harg = "Error";
- }
- if ($get['saldo'] < $harg) { ?>
- <div class="alert alert-danger">
- Gagal : Saldo tidak mencukupi.
- </div>
- <? } else if (!$link || !$jumlah) { ?>
- <div class="alert alert-danger">
- Gagal : Masih ada data yang kosong.
- </div>
- <? } else {
- $api_key = "4xp6rg9riypd012f5qd0s5ef9d15j9ed"; // API Key PanelPedia
- $link = $_POST['usrnmlink'];
- $type = $_POST['layanan'];
- $jumlah = $_POST['jumlah'];
- $postdata = 'api_key='.$api_key.'&link='.$link.'&type='.$type.'&jumlah='.$jumlah.'';
- $ch = curl_init();
- curl_setopt($ch, CURLOPT_URL, 'http://panelpedia.id/api.php');
- curl_setopt ($ch, CURLOPT_POST, 1);
- curl_setopt ($ch, CURLOPT_POSTFIELDS, $postdata);
- curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
- curl_setopt ($ch, CURLOPT_SSL_VERIFYPEER, false);
- $store = curl_exec ($ch);
- curl_close ($ch);
- $json = json_decode($store,true);
- if ($json['result'] == "error") { ?>
- Order error karena <?php echo $json['reason']; ?>
- <? } else if ($json['result'] == "success") {
- $no = $json['id'];
- $tanggal = date("Y-m-d H:i:s");
- $simpan = mysql_query("UPDATE user SET saldo=saldo-$harg WHERE username = '$username'");
- $simpan = mysql_query("INSERT INTO historyall VALUES('','$no','$username', '$layanan', '$harg', 'Sukses', 'Url/Username : $link', '$tanggal', '$jumlah')");
- if($simpan) { ?>
- ==================================<br />
- Pembelian <?php echo $layanan; ?> Sukses!<br />
- No Order : <?php echo $no; ?><br />
- Username/Link : <?php echo $link; ?><br />
- Jumlah : <?php echo $jumlah; ?><br />
- Harga : <?php echo $harg; ?><br />
- Layanan : <?php echo $layanan; ?><br />
- Tanggal : <?php echo $tanggal; ?><br />
- ==================================<br />
- <? } else { ?>
- ERROR
- <? } }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement