scrif tuk laporan ini :
<?php
/* koneksi ke db */
mysql_connect("localhost", "root", "") or die(mysql_error());
mysql_select_db("project_ii") or die(mysql_error());
?>
<style type="text/css">
<!--
.style3 {font-family: "Times New Roman", Times, serif}
.style4 {font-size: 12px}
-->
</style>
<form name="form1" method="post" action=""><center>
<h1><center>
<h2 class="style4"><br />
</h2>
<table width="1060" border="0">
<tr>
<td colspan="2" rowspan="2"><div align="center"><img src="image/logostmikriau.png" width="185" height="109" /></div></td>
<td width="108"> </td>
<td colspan="6" rowspan="2"><div align="center">
<p class="style4"><span class="style3">Laboratorium komputer STMIK – AMIK Riau<br />
Laporan Keadaan barang<br />
jln.purwodadi indah KM 10 panam - Pekanbaru</span></p>
<p class="style4"><span class="style3"><br />
<?php
echo date('F j- Y- g:i a');
?>
</span></p>
</div></td>
<td width="207"> </td>
<td width="30"> </td>
<td width="38"> </td>
</tr>
<tr>
<td height="61"> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
</table>
</center>
</h1>
<?php
$k=$_GET['a'];
$data=mysql_query("select * from tb_barang,tb_keadaan,tb_ruang,tb_staf where kondisi='$k'");
?>
<table width="1089" border="1">
<tr>
<td width="116">id_barang</td>
<td width="123">nm_barang</td>
<td width="98">merek</td>
<td width="60">type</td>
<td width="103">jenis</td>
<td width="70">kondisi</td>
<td width="76">id_ruang</td>
<td width="80">id_asisten</td>
<td width="81">pengawas</td>
<td width="70">tanggal</td>
<td width="68">jumlah</td>
<td width="61">ket</td>
</tr>
<?php
while ($dat=mysql_fetch_array ($data)){
?>
<tr>
<td><span class="style4"><?php echo $dat['id_barang'];?></span></td>
<td><span class="style4"><?php echo $dat['nm_barang'];?></span></td>
<td><span class="style4"><?php echo $dat['merek'];?></span></td>
<td><span class="style4"><?php echo $dat['type'];?></span></td>
<td><span class="style4"><?php echo $dat['jenis'];?></span></td>
<td><span class="style4"><?php echo $dat['kondisi'];?></span></td>
<td><span class="style4"><?php echo $dat['id_ruang'];?></span></td>
<td><span class="style4"><?php echo $dat['id_asisten'];?></span></td>
<td><span class="style4"><?php echo $dat['pengawas'];?></span></td>
<td><span class="style4"><?php echo $dat['tanggal'];?></span></td>
<td><span class="style4"><?php echo $dat['jumlah'];?></span></td>
<td><span class="style4"><?php echo $dat['ket'];?></span></td>
</tr>
<tr>
<?php
}
?>
</tr>
</table>
<table width="1065" border="0">
<tr>
<td width="34"> </td>
<td width="34"> </td>
<td width="34"> </td>
<td width="34"> </td>
<td width="34"> </td>
<td width="436"> </td>
<td width="1"> </td>
<td width="358"> </td>
<td width="42"> </td>
</tr>
<tr>
<td> </td>
<td colspan="4"> </td>
<td> </td>
<td colspan="2"><p align="center">pekaanbaru <span class="style3">
<?php
echo date('F j- Y- g:i a');
?>
</span></p>
<p align="center"> Kepala laboraterium komputer</p>
<p align="center">STMIK AMIK Riau</p>
<p align="center"> </p>
<?php
$data=mysql_query("select * from tb_kepala");
while ($dat=mysql_fetch_array ($data)){
?>
<p align="center"><?php echo $dat['nm_kepalalabor'];?></p></td>
<?php
}
?>
<td> </td>
</tr>
</table>
<p align="center"> </p>
<p> </p>
<p> </p>
</center>
</form>
dan untuk database adalah:
Tabel 2.2 Tb_staf
Nama table : tb_staf
Primary key : id_staf
nama fild | type data | keterangan |
id_asisiten | varchar(10) | id staf |
nm_asisten | char(20) | nama staf |
ttl | varchar(20) | tampat tanggal lahir |
agama | varchar(10) | agama |
alamat | char(20) | alamat tempat tinggal |
no_tlpon | varchar(12) | nomor telpon |
jabatan | varchar(20) | jabatan staf |
Tabel 2.3 Tb_ruang
Nama table : tb_ruang
Primary key : id_ruangan
nama fild | type data | keterangan |
id_ruang | varchar(10) | id ruang |
nm_ruang | char(20) | nama ruang |
jenis | varchar(20) | jenis ruang |
pengawas | varchar(25) | pengawas |
id_asisten | char(10) | asisten ruangan |
alokasi | varchar(20) | alokasi ruangan |
Tabel 2.4 Tb_ barang
Nama table : tb_barang
Primary key : id_barang
nama fild | type data | keterangan |
id_barang | varchar (10) | id barang |
nm_barang | char(20) | nama barang |
merek | varchar(10) | merek barang |
type | varchar(20) | type barang |
jenis | varchar(10) | jenis barang |
tanggal | datetime | tanggal barang |
ket | varchar(30) | keterangan |
Tabel 2.5 Tb_Keadaan
Nama table : tb_Keadaan
Field | Type | ket |
id_barang | varchar(10) | id_pada barang |
kondisi | varchar(10) | kondisi barang |
id_ruang | varchar(10) | id_pada ruang |
id_asisten | varchar(10) | id_asisten |
jumlah | int(11) | jumlah barang |
ket | char(30) | keterangan barang |
0 Comments