Gambar 1.0 Ketike Button "Click Here" Diclik Maka Tampil Seperti Gambar 2.0 |
Gambar 2.0 Ketika Click "Back To Home" Maka Tampil Seperti Gambar 1.0 |
Coding/Listing Gambar 1.0 (Simpan Dengan Nama service.html) :
<!doctype html public "-//W3C//DTD HTML 4.0 //EN">
<html>
<head>
<title>Service Motor</title>
</head>
<body style="background-image:url(http://localhost/Adam/Background%20Blogger/bgmotor.jpg)">
<form action="motor.php" method="post">
<center><h1><font face="Algerian" color="black">Service Motor Suka-Suka</h1></font></center>
<hr width=100% size=4 color=black />
<br>
<table border="1" width="400" align="center" cellspacing="1">
<tr>
<td colspan="2" align=center>Isi Data Service</td>
</tr>
<tr>
<td width="150">Kode Petugas</td>
<td><select name=kope>
<option>--Click Here--</option>
<option value="001">001</option>
<option value="002">002</option>
<option value="003">003</option></select></td>
</tr>
<tr>
<td>Kode Service</td>
<td><input type="text" size=10 name=kose></td>
</tr>
<tr>
<td>Merk Motor</td>
<td><select name=memo>
<option>--Click Here--</option>
<option value="Yamaha">Yamaha</option>
<option value="Honda">Honda</option>
<option value="Suzuki">Suzuki</option></select></td>
</tr>
<tr>
<td>Jenis Service</td>
<td><input type="radio" name=jese value="Service Ringan">Service Ringan<br>
<input type="radio" name=jese value="Service Berat">Service Berat</td
</tr>
<tr>
<td valign="top">Pilih Spare Part</td>
<td><input type="checkbox" name=oli value=jenis>Oli<br>
<input type="checkbox" name=piring value=jenis>Piringan Cakram<br>
<input type="checkbox" name=remb value=jenis>Kampas Rem Belakang<br>
<input type="checkbox" name=remd value=jenis>Kampas Rem Depan<br>
<input type="checkbox" name=gir value=jenis>Gir Depan Belakang<br>
<input type="checkbox" name=baut value=jenis>Baut Body 100pc</td>
</tr>
<td border="0" align="center" colspan="2">
<input type="submit" value="Click Here"><input type="reset" value="Cancel">
</tr></td>
</table>
<br><br><br><br><br><br><br><br><br><br><br>
<hr width=100% size=4 color="black" />
<center><h5><font face="algerian">Copyright © 2012 | Powered By Adam Khamarullah</center></font><h5>
</form>
</body>
</html>
Coding/Listing Gambar 2.0 (Simpan Dengan Nama motor.php) :
<!doctype html public "-//W3C//DTD HTML 4.0 //EN">
<html>
<head>
<title>Service Motor</title>
</head>
<body style="background-image:url(http://localhost/Adam/Background%20Blogger/bgmotor.jpg)">
<?
if($kope=='001')
{
$nape="Indra Kurniawan";
}
elseif($kope=='002')
{
$nape="Bagus Saputra";
}
else
{
$nape="Irawan";
}
$kose=$_POST['kose'];
$memo=$_POST['memo'];
if($jese=='Service Ringan')
{
$harga=20000;
}
else
{
$harga=40000;
}
if($oli=='jenis')
{
$ket1="Oli";
$holi=150000;
}
else
{
$ket1="Oli";
$holi=0;
}
if($piring=='jenis')
{
$ket2="Piring Cakram";
$hpir=200000;
}
else
{
$ket2="Piring Cakram";
$hpir=0;
}
if($remb=='jenis')
{
$ket3="Kampas Rem Belakang";
$hremb=200000;
}
else
{
$ket3="Kampas Rem Belakang";
$hremb=0;
}
if($remd=='jenis')
{
$ket4="Kampas Rem Depan";
$hremd=150000;
}
else
{
$ket4="Kampas Rem Depan";
$hremd=0;
}
if($gir=='jenis')
{
$ket5="Gir Depan Belakang";
$hgir=350000;
}
else
{
$ket5="Gir Depan Belakang";
$hgir=0;
}
if($baut=='jenis')
{
$ket6="Baut Body 100pc";
$hbau=100000;
}
else
{
$ket6="Baut Body 100pc";
$hbau=0;
}
$total=$harga+$holi+$hpir+$hremb+$hremd+$hgir+$hbau;
$tanggal=(Date("d F Y"));
?>
<h1><center><font face="Algerian" color="black">Service Motor Suka-Suka</center></h1></font>
<hr width=100% size=4 color=black />
<br>
<table border="1" align="center">
<tr><td colspan="2" align="center">Jenis Spare Part</tr></td>
<tr><td><?=$ket1?></td><td>Rp.<?=$holi?></td></tr>
<tr><td><?=$ket2?></td><td>Rp.<?=$hpir?></td></tr>
<tr><td><?=$ket3?></td><td>Rp.<?=$hremb?></td></tr>
<tr><td><?=$ket4?></td><td>Rp.<?=$hremd?></td></tr>
<tr><td><?=$ket5?></td><td>Rp.<?=$hgir?></td></tr>
<tr><td><?=$ket6?></td><td>Rp.<?=$hbau?></td></tr>
</table>
<pre>
<font face="Algerian">Tanggal <?=$tanggal?><br></font>
Kode Petugas : <?=$kope?><br>
Nama Petugas : <?=$nape?><br>
Kode Service : <?=$kose?><br>
Merk Motor : <?=$memo?><br>
Jenis Service : Rp.<?=$harga?><br>
-------------------------------------<br>
Total : Rp.<?=$total?><br>
<h4><center><font face="Algerian"><a href="service.html">Back To Home</center></h4></font></a>
<hr width=100% size=4 color=black />
<marquee><img src="http://localhost/Adam/Background%20Blogger/motor2.JPG"></center></marquee>
</body>
</html>
0 komentar:
Posting Komentar