SHOW:
|
|
- or go back to the newest paste.
1 | - | <?php |
1 | + | //tambah master barang |
2 | - | error_reporting(0); |
2 | + | $query=mysql_query("select from tipe"); |
3 | - | include '../config/koneksi.php'; |
3 | + | if ($_GET[page]=='tambah_m_barang') |
4 | - | session_start(); |
4 | + | { |
5 | - | if (empty($_SESSION[nama_user]) AND empty($_SESSION[pass_user])) |
5 | + | ?> |
6 | - | { |
6 | + | <center><h2>TAMBAH Master Barang</h2> |
7 | - | echo "<h2>Maaf, akses langsung ke alamat ini Tidak di Ijinkan !!! </h2>"; |
7 | + | <form action='aksi.php?page=tambah_m_barang' method=POST> |
8 | - | |
8 | + | <table> |
9 | - | echo "<a href='../tampil.php?page=beranda'>Silakan Kembali Ke Beranda</a>"; |
9 | + | <tr><td>Id Barang</td><td> <input type=text name="id_barang" value="<?php echo $d['id_barang'];?>"> </td></tr> |
10 | - | } |
10 | + | <tr><td>Nama Barang</td><td> <input type=text name=nama_barang></td></tr> |
11 | - | else |
11 | + | <tr><td>Merek</td><td> <input type=text name=merek></td></tr> |
12 | - | { |
12 | + | <tr><td>Tgl Pengadaan</td><td> <input type=text name=tgl_pengadaan> thn-bln-tgl </td></tr> |
13 | - | if ($_GET[page]=='home') |
13 | + | <tr><td>Spesifikasi</td><td> <input type=text name=spesifikasi></td></tr> |
14 | - | { |
14 | + | <tr><td>Id Status barang</td><td> <input type=text name=id_status_barang></td></tr> |
15 | - | echo"<center><h2>Selamat datang di Halaman Administrator</h2> |
15 | + | |
16 | - | Silahkan pilih menu di atas untuk aplikasi admin !</center>"; |
16 | + | |
17 | - | } |
17 | + | <tr><td>Id Tipe</td><td> |
18 | - | |
18 | + | <select name="id_tipe"> |
19 | - | //master barang |
19 | + | <option value="#">Type</option> |
20 | - | if ($_GET[page]=='m_barang') |
20 | + | <?php while($drop=mysql_fetch_array($query)){?> |
21 | - | { |
21 | + | |
22 | - | echo "<center><h2>Data Master Barang</h2>"; |
22 | + | |
23 | - | echo "<table> |
23 | + | |
24 | - | <!--<button onclick=window.location.href='?page=tambah_m_barang'>TAMBAH BARANG</button>//--> |
24 | + | |
25 | - | <tr><th>Id Barang</th><th>Nama Barang</th><th>Merek</th><th>Tgl_Pengadaan</th><th>Spesifikasi</th><th>Id Status barang</th><th>Id Tipe</th><th>Edit</th><th>Del</th></tr>"; |
25 | + | |
26 | - | $qry=mysql_query("select * FROM barang") or die("Ada kesalahan tabel"); |
26 | + | |
27 | - | while($d=mysql_fetch_array($qry)){ |
27 | + | </form> </center> |
28 | - | echo "<tr><td>$d[id_barang]</td><td>$d[nama_barang]</td><td>$d[merek]</td><td>$d[tgl_pengadaan]</td> |
28 | + | <?php } ?> |
29 | - | <td>$d[spesifikasi]</td><td>$d[id_status]</td><td>$d[id_tipe]</td> |
29 | + | //end tambah master barang |