Advertisement
Christiandian

Untitled

Nov 17th, 2019
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.38 KB | None | 0 0
  1. function formtambahkerusakan(){
  2. $this->koneksi = new Akses;
  3. $this->koneksi->link;
  4.  
  5. echo '<style>.a{
  6. margin-left:auto;
  7. margin-righ:auto;
  8. }
  9. .c{
  10. margin-top:0px;
  11. margin-left:0px;
  12. }
  13. fieldset{
  14. display : block;
  15. margin-left: auto;
  16. margin-right:auto;
  17. padding-top: 0.35em;
  18. padding-bottom: 0.625em;
  19. padding-left: 0.75em;
  20. padding-right: 0.75em;
  21. border: 2px groove (internal value);
  22. }</style>';
  23. // $data = mysqli_query($this->koneksi->link, "select kd_mesin from mesin order by kd_mesin DESC");
  24. // $fdata = mysqli_fetch_array($data);
  25. // $id = $fdata['kd_mesin'];
  26. // $nourut = substr($id, 4, 2);
  27. // $tambah = (int) $nourut + 1;
  28.  
  29. // if (strlen($tambah) == 2) {
  30. // $format = "MSN" . "000" . $tambah;
  31. // } else {
  32. // $format = "MSN" . "00" . $tambah;
  33. // /*echo $format;*/
  34. // }
  35.  
  36. echo "<form name=tkerusakan action=simpan_tambah_kerusakan.php method=post>
  37. <h1 align=center>Tambah Data Kerusakan</h1><br><br>
  38. <fieldset style='width:400px;'><legend style='font-size: 20px; margin-right:360px;'>Kerusakan</legend>
  39. <table class=a>
  40. <tr>
  41. <td>Kode Kerusakan</td>
  42. <td> <input type=text name=kd_kerusakan class='form-control' placeholder='Kode Kerusakan'></td>
  43. </tr>"
  44.  
  45. <select name="kode_mesin" class="form-control">
  46. <option>-----Pilih----</option>
  47. <?php
  48. $query= mysqli_query($koneksi->conn, "SELECT*FROM kerusakan");
  49. while ($row = mysqli_fetch_array($query)){?>
  50. <option value="<?php echo $row['kd_mesin'];?>">
  51. <?php echo $row['kd_mesin'];?>
  52. </option>
  53. <?php
  54. }
  55. ?>
  56. </select>
  57. echo "<tr>
  58. <td>Keluhan</td>
  59. <td> <input type=text name=keluhan class='form-control' placeholder='Keluhan' maxlength=10 required></td>
  60. </tr>
  61. <tr>
  62.  
  63. <tr>
  64. <td>Tindakan</td>
  65. <td> <input type=text name=tindakan class='form-control' placeholder='Tindakan' maxlength=10 required></td>
  66. </tr>
  67.  
  68. <tr>
  69. <td>Kode Sparepart</td>
  70. <td> <input type=text name=kd_sparepart class='form-control' placeholder='Kode Sparepart' maxlength=10 required></td>
  71. </tr>
  72. <td align=center colspan=2><input class=b type=submit value=Simpan>
  73. <a href='lihat_kerusakan.php'><input class=c type=button value=Batal></a>
  74. </td>
  75. </tr>
  76. </table>
  77. </fieldset>
  78. </form"; "
  79.  
  80. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement