Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- session_start();
- if($_SESSION['group_name'] <> 'Administrator'){
- echo '<meta http-equiv="Refresh" Content="0; URL=../../id/error">';
- exit;
- }
- ?>
- <!doctype html>
- <html class="no-js" lang="en" dir="ltr">
- <head>
- <meta charset="utf-8">
- <meta http-equiv="x-ua-compatible" content="ie=edge">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <title>GONIT - Admin Edit user VPN</title>
- <link rel="icon" href="../../id/images/icon.ico">
- <link rel="stylesheet" href="../../id/css/foundation.css">
- <link rel="stylesheet" href="../../id/css/app.css">
- <script src="../../id/js/ckeditor/ckeditor.js"></script>
- <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.js" integrity="sha256-WpOohJOqMqqyKL9FccASB9O0KwACQJpFTUBLTYOVvVU=" crossorigin="anonymous"></script>
- </head>
- <body>
- <div class="grid-y medium-grid-frame">
- <?php
- include "../../connection.php";
- $query = $db->prepare("SELECT tw_user_vpn.*, tw_billing.billing_status FROM tw_user_vpn JOIN tw_billing ON tw_user_vpn.nourut = tw_billing.nourut WHERE tw_user_vpn.nourut = :nourut");
- $query->bindParam(":nourut", $_GET['id']);
- $query->execute();
- echo '<div class="text-center"><h5>';
- if($query->rowCount() == 0){
- die("User VPN Tidak Ditemukan");
- }else{
- $data = $query->fetch();
- }
- echo '</h5></div>';
- ?>
- <?php include '../../id/element/admin/menu-admin-header.php';?>
- <div class="cell medium-auto medium-cell-block-container">
- <div class="grid-x">
- <div class="body-background-dashboard2 medium-cell-block-y">
- <div class="grid-y grid-padding-y">
- <div class="large-12 medium-12 small-12 cell">
- <div class="grid-x grid-padding-x grid-padding-y">
- <div class="large-12 medium-12 small-12 title-text-dashboard2 cell">
- <h6>
- <?php
- include '../../id/text/menu.php';
- $hasil= strtoupper($uservpn4);
- echo $hasil;
- ?>
- </h6>
- <div class="line4"></div>
- <div id="clockbox2"></div>
- <script src="../../id/js/clock2.js"></script>
- </div>
- </div>
- <div class="grid-x grid-padding-x grid-padding-y">
- <div class="large-12 medium-12 small-12 text-right cell">
- <form method="post" name="form" action="../../id/admin/user-vpn-proses">
- <span><button class="posting" type="submit" name="submit" value="submit"><img src="https://img.icons8.com/office/20/000000/submit-resume.png"> Checkout </button></span>
- <span><a href="../../id/admin/produk"><img src="https://img.icons8.com/office/20/000000/close-window--v2.png"> Tutup</a></span>
- <input type="hidden" name="nourut" value="<?=$_GET['nourut'] ?>">
- </div>
- <div class="large-12 medium-12 small-12 description cell">
- <?php
- require_once("../../id/kurs/kurs.php");
- $dataata = kurs("bca");
- $money = $dataata[0];
- function rupiah($angka){
- $hasil_rupiah = "Rp " . number_format($angka,3,'.','.');
- return $hasil_rupiah;
- }
- ?>
- <table class="unstriped">
- <thead>
- <tr>
- <th>Description</th>
- <th class="text-right">Harga</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td>
- <?php echo $data['profile']; ?>
- </td>
- <td class="text-right">
- <b>
- <?php
- $a = $data['harga'];
- $b = $money;
- $total= $a * $b;
- echo rupiah($total);
- ?>
- </b>
- </td>
- </tr>
- <tr>
- <td>
- 10% PPN
- </td>
- <td class="text-right">
- <b>
- <?php
- $aa = $total;
- $bb = 10;
- $cc = 100;
- $total2 = $total * $bb / $cc;
- echo rupiah($total2);
- ?>
- </b>
- </td>
- </tr>
- <tr>
- <td>
- Total terakhir pembelian
- </td>
- <td class="text-right">
- <b>
- <?php
- $aaa = $total2;
- $bbb = $total;
- $ccc = $data['jangka'];
- $hargaakhir = $aaa + $bbb * $ccc;
- echo rupiah($hargaakhir);
- ?>
- </b>
- </td>
- </tr>
- <tr>
- <td>
- </td>
- <td class="text-right">
- <?php
- if ($data['profile'] == 'Gratis') { ?>
- <b>2 Hari</b>
- <?php }
- else if ($data['profile'] == 'Premium') { ?>
- <b><?php echo $data['jangka']; ?> Bulan</b>
- <?php } ?>
- </td>
- </tr>
- <tr>
- <td>
- </td>
- <td class="text-right">
- <?php
- if ($data['profile'] == 'Gratis') { ?>
- <?php }
- else if ($data['profile'] == 'Premium') { ?>
- Kode Pembayaran #<?php echo $data['nourut']; ?>
- <?php } ?>
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- <div class="large-4 medium-4 small-12 cell">
- <label><h6>Nama</h6></label>
- <input type="text" placeholder="Nama" name="name" value="<?php echo $data['name']; ?>">
- </div>
- <div class="large-4 medium-4 small-12 cell">
- <label><h6>Kata sandi</h6></label>
- <input type="password" placeholder="*****" name="password" id="myInput" value="<?php echo $data['password']; ?>">
- </div>
- <div class="large-4 medium-4 small-12 show-password2 cell">
- <div class="password3">
- <input type="checkbox" onclick="myFunction()" >
- </div> Lihat kata sandi
- </div>
- <div class="large-6 medium-6 small-12 cell">
- <label><h6>Local Address</h6></label>
- <input type="text" name="local" value="<?php echo $data['local']; ?>">
- </div>
- <div class="large-6 medium-6 small-12 cell">
- <label><h6>Remote Address</h6></label>
- <input type="text" name="remote" value="<?php echo $data['remote']; ?>">
- </div>
- <div class="large-6 medium-6 small-12 cell">
- <div class="large-12 medium-12 small-12 cell">
- <?php
- if ($data['profile'] == 'Gratis') { ?>
- <label><h6>Masa aktif</h6></label>
- <select name="jangka">
- <option value="<?php echo $data['jangka']; ?>">2 Hari</option>
- </select>
- <?php }
- else if ($data['profile'] == 'Premium') { ?>
- <label><h6>Masa aktif</h6></label>
- <select name="jangka">
- <option value="<?php echo $data['jangka']; ?> "><?php echo $data['jangka']; ?> Bulan</option>
- </select>
- <?php } ?>
- </div>
- </div>
- <div class="large-6 medium-6 small-12 cell">
- <label><h6>Status</h6></label>
- <select name="billing_status">
- <option selected value="Belum dibayar">Belum dibayar</option>
- <option value="Dibayar">Dibayar</option>
- <option value="Biaya kurang">Biaya kurang</option>
- <option value="Menangguhkan">Menangguhkan</option>
- <option value="Batal">Batal</option>
- </select>
- </div>
- <input type="hidden" name="profile" value="<?php echo $data['profile']; ?>">
- <input type="hidden" name="quotadownload" value="<?php echo $data['quotadownload']; ?>">
- <input type="hidden" name="quotaupload" value="<?php echo $data['quotaupload']; ?>">
- </form>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- <script src="../../id/js/show-password.js"></script>
- <script src="../../id/js/vendor/jquery.js"></script>
- <script src="../../id/js/vendor/what-input.js"></script>
- <script src="../../id/js/vendor/foundation.js"></script>
- <script src="../../id/js/app.js"></script>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement