Advertisement
BimoSora

edit vpn

Aug 31st, 2019
1,985
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 16.23 KB | None | 0 0
  1. <?php
  2. session_start();
  3. if($_SESSION['group_name'] <> 'Administrator'){
  4. echo '<meta http-equiv="Refresh" Content="0; URL=../../id/error">';
  5. exit;
  6. }
  7. ?>
  8.  
  9. <!doctype html>
  10. <html class="no-js" lang="en" dir="ltr">
  11.  
  12. <head>
  13. <meta charset="utf-8">
  14. <meta http-equiv="x-ua-compatible" content="ie=edge">
  15. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  16. <title>GONIT - Admin Edit user VPN</title>
  17. <link rel="icon" href="../../id/images/icon.ico">
  18. <link rel="stylesheet" href="../../id/css/foundation.css">
  19. <link rel="stylesheet" href="../../id/css/app.css">
  20. <script src="../../id/js/ckeditor/ckeditor.js"></script>
  21. <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.js" integrity="sha256-WpOohJOqMqqyKL9FccASB9O0KwACQJpFTUBLTYOVvVU=" crossorigin="anonymous"></script>
  22. </head>
  23.  
  24. <body>
  25. <div class="grid-y medium-grid-frame">
  26. <?php
  27. include "../../connection.php";
  28. $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");
  29. $query->bindParam(":nourut", $_GET['id']);
  30. $query->execute();
  31. echo '<div class="text-center"><h5>';
  32. if($query->rowCount() == 0){
  33. die("User VPN Tidak Ditemukan");
  34. }else{
  35. $data = $query->fetch();
  36. }
  37. echo '</h5></div>';
  38. ?>
  39. <?php include '../../id/element/admin/menu-admin-header.php';?>
  40. <div class="cell medium-auto medium-cell-block-container">
  41. <div class="grid-x">
  42. <div class="body-background-dashboard2 medium-cell-block-y">
  43. <div class="grid-y grid-padding-y">
  44. <div class="large-12 medium-12 small-12 cell">
  45. <div class="grid-x grid-padding-x grid-padding-y">
  46. <div class="large-12 medium-12 small-12 title-text-dashboard2 cell">
  47. <h6>
  48. <?php
  49. include '../../id/text/menu.php';
  50. $hasil= strtoupper($uservpn4);
  51. echo $hasil;
  52. ?>
  53. </h6>
  54. <div class="line4"></div>
  55. <div id="clockbox2"></div>
  56. <script src="../../id/js/clock2.js"></script>
  57. </div>
  58. </div>
  59. <div class="grid-x grid-padding-x grid-padding-y">
  60. <div class="large-12 medium-12 small-12 text-right cell">
  61. <form method="post" name="form" action="../../id/admin/user-vpn-proses">
  62. <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> &nbsp;&nbsp;
  63. <span><a href="../../id/admin/produk"><img src="https://img.icons8.com/office/20/000000/close-window--v2.png"> Tutup</a></span>
  64. <input type="hidden" name="nourut" value="<?=$_GET['nourut'] ?>">
  65. </div>
  66. <div class="large-12 medium-12 small-12 description cell">
  67. <?php
  68. require_once("../../id/kurs/kurs.php");
  69. $dataata = kurs("bca");
  70. $money = $dataata[0];
  71.  
  72. function rupiah($angka){
  73. $hasil_rupiah = "Rp " . number_format($angka,3,'.','.');
  74. return $hasil_rupiah;
  75. }
  76. ?>
  77. <table class="unstriped">
  78. <thead>
  79. <tr>
  80. <th>Description</th>
  81. <th class="text-right">Harga</th>
  82. </tr>
  83. </thead>
  84. <tbody>
  85. <tr>
  86. <td>
  87. <?php echo $data['profile']; ?>
  88. </td>
  89. <td class="text-right">
  90. <b>
  91. <?php
  92. $a = $data['harga'];
  93. $b = $money;
  94. $total= $a * $b;
  95. echo rupiah($total);
  96. ?>
  97. </b>
  98. </td>
  99. </tr>
  100.  
  101. <tr>
  102. <td>
  103. 10% PPN
  104. </td>
  105. <td class="text-right">
  106. <b>
  107. <?php
  108. $aa = $total;
  109. $bb = 10;
  110. $cc = 100;
  111. $total2 = $total * $bb / $cc;
  112. echo rupiah($total2);
  113. ?>
  114. </b>
  115. </td>
  116. </tr>
  117. <tr>
  118. <td>
  119. Total terakhir pembelian
  120. </td>
  121. <td class="text-right">
  122. <b>
  123. <?php
  124. $aaa = $total2;
  125. $bbb = $total;
  126. $ccc = $data['jangka'];
  127. $hargaakhir = $aaa + $bbb * $ccc;
  128. echo rupiah($hargaakhir);
  129. ?>
  130. </b>
  131. </td>
  132. </tr>
  133. <tr>
  134. <td>
  135. </td>
  136. <td class="text-right">
  137. <?php
  138. if ($data['profile'] == 'Gratis') { ?>
  139. <b>2 Hari</b>
  140. <?php }
  141. else if ($data['profile'] == 'Premium') { ?>
  142. <b><?php echo $data['jangka']; ?> Bulan</b>
  143. <?php } ?>
  144. </td>
  145. </tr>
  146. <tr>
  147. <td>
  148. </td>
  149. <td class="text-right">
  150. <?php
  151. if ($data['profile'] == 'Gratis') { ?>
  152.  
  153. <?php }
  154. else if ($data['profile'] == 'Premium') { ?>
  155. Kode Pembayaran #<?php echo $data['nourut']; ?>
  156. <?php } ?>
  157.  
  158. </td>
  159. </tr>
  160. </tbody>
  161. </table>
  162. </div>
  163. <div class="large-4 medium-4 small-12 cell">
  164. <label><h6>Nama</h6></label>
  165. <input type="text" placeholder="Nama" name="name" value="<?php echo $data['name']; ?>">
  166. </div>
  167. <div class="large-4 medium-4 small-12 cell">
  168. <label><h6>Kata sandi</h6></label>
  169. <input type="password" placeholder="*****" name="password" id="myInput" value="<?php echo $data['password']; ?>">
  170. </div>
  171. <div class="large-4 medium-4 small-12 show-password2 cell">
  172. <div class="password3">
  173. <input type="checkbox" onclick="myFunction()" >
  174. </div> &nbsp; Lihat kata sandi
  175. </div>
  176. <div class="large-6 medium-6 small-12 cell">
  177. <label><h6>Local Address</h6></label>
  178. <input type="text" name="local" value="<?php echo $data['local']; ?>">
  179. </div>
  180. <div class="large-6 medium-6 small-12 cell">
  181. <label><h6>Remote Address</h6></label>
  182. <input type="text" name="remote" value="<?php echo $data['remote']; ?>">
  183. </div>
  184. <div class="large-6 medium-6 small-12 cell">
  185. <div class="large-12 medium-12 small-12 cell">
  186. <?php
  187. if ($data['profile'] == 'Gratis') { ?>
  188. <label><h6>Masa aktif</h6></label>
  189. <select name="jangka">
  190. <option value="<?php echo $data['jangka']; ?>">2 Hari</option>
  191. </select>
  192. <?php }
  193. else if ($data['profile'] == 'Premium') { ?>
  194. <label><h6>Masa aktif</h6></label>
  195. <select name="jangka">
  196. <option value="<?php echo $data['jangka']; ?> "><?php echo $data['jangka']; ?> Bulan</option>
  197. </select>
  198. <?php } ?>
  199. </div>
  200. </div>
  201. <div class="large-6 medium-6 small-12 cell">
  202. <label><h6>Status</h6></label>
  203. <select name="billing_status">
  204. <option selected value="Belum dibayar">Belum dibayar</option>
  205. <option value="Dibayar">Dibayar</option>
  206. <option value="Biaya kurang">Biaya kurang</option>
  207. <option value="Menangguhkan">Menangguhkan</option>
  208. <option value="Batal">Batal</option>
  209. </select>
  210. </div>
  211. <input type="hidden" name="profile" value="<?php echo $data['profile']; ?>">
  212. <input type="hidden" name="quotadownload" value="<?php echo $data['quotadownload']; ?>">
  213. <input type="hidden" name="quotaupload" value="<?php echo $data['quotaupload']; ?>">
  214. </form>
  215. </div>
  216. </div>
  217. </div>
  218. </div>
  219. </div>
  220. </div>
  221. </div>
  222.  
  223. <script src="../../id/js/show-password.js"></script>
  224. <script src="../../id/js/vendor/jquery.js"></script>
  225. <script src="../../id/js/vendor/what-input.js"></script>
  226. <script src="../../id/js/vendor/foundation.js"></script>
  227. <script src="../../id/js/app.js"></script>
  228.  
  229. </body>
  230.  
  231. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement