BimoSora

search

Jun 10th, 2020
180
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.32 KB | None | 0 0
  1. <div class="large-12 medium-12 small-12 cell">
  2. <form action="lisensi.php" method="POST">
  3. <div class="grid-x grid-margin-x">
  4. <div class="large-6 medium-6 small-6 cell">
  5. <label><h6>Nomor lisensi</h6></label>
  6. <input class="login-box-input" type="text" name="license_number2" value="">
  7. <input class="login-box-input" type="hidden" name="license_status2" value="Aktif">
  8. </div>
  9. <div class="large-6 medium-6 small-6 search cell">
  10. <span><button class="posting" type="submit" name="cari" value="cari"><img src="../id/images/icons/20/search.png"></button></span> &nbsp;&nbsp;
  11. </div>
  12. </div>
  13. </form>
  14. <div class="large-12 medium-12 small-12 cell">
  15. <?php
  16. if(isset($_POST['cari'])){
  17. $pencarian="".$_POST['license_number2']."";
  18. $pencarian2="".$_POST['license_status2']."";
  19. $tw_vpn_license = $db->prepare("SELECT * FROM tw_vpn_license WHERE license_number LIKE :license AND license_status LIKE :status");
  20. $tw_vpn_license->BindParam(":license",$pencarian);
  21. $tw_vpn_license->BindParam(":status",$pencarian2);
  22. $tw_vpn_license->execute();
  23. }
  24. $no = 1;
  25. while($data = $tw_vpn_license->fetch()){
  26. ?>
  27. <div class="large-12 medium-12 small-12 cell">
  28. <?php if ($data['license_number'] == $pencarian) { ?>
  29.  
  30. <div class="large-12 medium-12 small-12 cell">
  31. Nomor lisensi:
  32. <?php echo $data['license_number']; ?>
  33. </div>
  34. <div class="large-12 medium-12 small-12 cell">
  35. IP address:
  36. <?php $ip_server = $_SERVER['SERVER_ADDR']; ?>
  37. <?php if ($data['license_ip'] == $ip_server) { ?>
  38. <?php echo $data['license_ip']; ?>
  39. <?php } else { ?>
  40. IP address tidak sama
  41. <?php } ?>
  42. </div>
  43.  
  44. <?php } else { ?>
  45. Tidak ditemukan
  46. <?php } ?>
  47. </div>
  48. <?php } ?>
  49. </div>
  50. </div>
Add Comment
Please, Sign In to add comment