Professional Documents
Culture Documents
Di susun oleh :
$dbhost='localhost';
$dbuser='root';
$dbpassword='';
$dbname='sales';
mysql_connect($dbhost,$dbuser,$dbpassword);
mysql_select_db($dbname);
?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Untitled Document</title>
</head>
<body>
<tr>
</tr>
<tr>
<td width="33%">USERID</td>
<td width="4%">:</td>
<td width="63%"><label>
</label></td>
</tr>
<tr>
<td>USERNAME</td>
<td>:</td>
<td><label>
</label></td>
</tr>
<tr>
<td>PASSWORD</td>
<td>:</td>
<td><label>
</label></td>
</tr>
<tr>
<td>LEVEL</td>
<td>:</td>
<td><label>
<option value="admin">admin</option>
<option value="kasir">kasir</option>
</select>
</label></td>
</tr>
<tr>
</div>
</label></td>
</tr>
</table>
</form>
<label>
<div align="center">
</div>
</label>
</body>
</html>
$userid=$_POST['txtuserid'];
$username=$_POST['txtusername'];
$password=$_POST['txtpassword'];
$level=$_POST['cblevel'];
if($query=1){
echo"<script>alert('sukses')</script>";
echo"<script>window.location='userview.php'</script>";
}else{
echo"<script>alert('gagal')</script>";
echo"<script>window.location='userform.php'</script>";
?>
include"config/koneksi.php";
if ($update==1)
echo"<script>window.location='userview.php'</script>";
?>
FILE USER VIEW
<?php
include'config/koneksi.php';
$jml=mysql_num_rows($query);
?>
<center>
<tr bgcolor="#FF0000">
</tr>
<?php
while($row=mysql_fetch_array($query)) {
?>
<tr>
<td>
</div></td>
</tr>
<?php
?>
</table>
<label>
</label>
</form>
</center>
<head>
<title></title>
</head>
<body>
<?php
include "config/koneksi.php";
$kd=$_GET['userid'];
?>
<form action="userupdate.php" method="post" id="form1" name="form1">
<?php
while($row=mysql_fetch_array($ok)){
?>
<tr>
</tr>
<tr>
<td width="4%">:</td>
<td width="61%"><label>
</label></td>
</tr>
<tr>
<td>USERNAME </td>
<td>:</td>
<td><label>
</label></td>
</tr>
<tr>
<td>PASSWORD</td>
<td>:</td>
<td><label>
</label></td>
</tr>
<tr>
<td height="21">LEVEL</td>
<td height="21">:</td>
<td height="21"><label>
<input name="txtlevel" type="text" id="txtlevel" size="5" value="<?php echo $row['level']; ?>" />
</label></td>
</tr>
<tr>
<div align="center">
</div>
</label></td>
</tr>
<?php
?>
</table>
</form>
</body>
</html>
include 'config/koneksi.php';
if($query){
?>
<?php
else {
?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
</head>
<body>
<tr>
</tr>
<tr>
<td width="5%">:</td>
<td width="51%"><label>
</label></td>
</tr>
<tr>
<td>:</td>
<td><label>
</label></td>
</tr>
<tr>
<td>ALAMAT</td>
<td>:</td>
<td><label>
</label></td>
</tr>
<tr>
<td>TELEPON</td>
<td>:</td>
<td><label>
</label></td>
</tr>
<tr>
<div align="center">
</div>
</label></td>
</tr>
</table>
</form>
<label>
<div align="center">
</div>
</label>
</body>
</html>
include 'config/koneksi.php';
$kd=$_POST['txtkodepelanggan'];
$nama=$_POST['txtnamapelanggan'];
$alamat=$_POST['txtalamat'];
$tlp=$_POST['txttelepon'];
if($query=1){
echo"<script>alert('sukses')</script>";
echo"<script>window.location='pelangganview.php'</script>";
}else{
echo"<script>alert('gagal')</script>";
echo"<script>window.location='pelangganform.php'</script>";
?>
<?php
include"config/koneksi.php";
if ($update==1)
echo"<script>window.location='pelangganview.php'</script>";
}
?>
<?php
include'config/koneksi.php';
$jml=mysql_num_rows($query);
?>
<center>
<tr bgcolor="#FF0000">
</tr>
<?php
while($row=mysql_fetch_array($query)) {
?>
<tr>
<td>
<div align="center"><a href="pelangganedit.php?kodepelanggan=<?php echo
$row['kodepelanggan']; ?>" onclick="return confirm('Apakah Anda Yakin?')"><img
src="images/edit.png" width="20" height="20"></a>
</div></td>
</tr>
<?php
?>
</table>
<label>
</label>
</form>
</center>
<html>
<head>
<title></title>
</head>
<body>
<?php
include "config/koneksi.php";
$kd=$_GET['kodepelanggan'];
?>
<?php
while($row=mysql_fetch_array($ok)){
?>
<tr>
</tr>
<tr>
<td width="4%">:</td>
<td width="61%"><label>
</label></td>
</tr>
<tr>
<td>:</td>
<td><label>
</label></td>
</tr>
<tr>
<td>ALAMAT</td>
<td>:</td>
<td><label>
</label></td>
</tr>
<tr>
<td height="21">TELEPON</td>
<td height="21">:</td>
<td height="21"><label>
</label></td>
</tr>
<tr>
<div align="center">
</div>
</label></td>
</tr>
<?php
?>
</table>
</form>
</body>
</html>
<?php
include 'config/koneksi.php';
if($query){
?>
<?php
else {
?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Untitled Document</title>
</head>
<body>
<tr>
</tr>
<tr>
<td width="2%">:</td>
<td width="61%"><label>
</label></td>
</tr>
<tr>
<td>:</td>
<td><label>
</label></td>
</tr>
<tr>
<td>WARNA</td>
<td>:</td>
<td><label>
<option value="merah">merah</option>
<option value="biru">biru</option>
<option value="kuning">kuning</option>
<option value="ungu">ungu</option>
<option value="hijau">hijau</option>
<option value="putih">putih</option>
</select>
</label></td>
</tr>
<tr>
<td>BERAT</td>
<td>:</td>
<td><label>
</select>
</label></td>
</tr>
<tr>
<td>HARGA</td>
<td>:</td>
<td><label>
</label></td>
</tr>
<tr>
<div align="center">
</div>
</label></td>
</tr>
</table>
</form>
<label>
<div align="center">
</div>
</label>
</form>
</body>
</html>
<?php
include 'config/koneksi.php';
$kdbrg=$_POST['txtkodebarang'];
$nmbrg=$_POST['txtnamabarang'];
$wrn=$_POST['cbwarna'];
$brt=$_POST['cbberat'];
$hrg=$_POST['txtharga'];
if($query=1){
echo"<script>alert('sukses')</script>";
echo"<script>window.location='barangview.php'</script>";
}else{
echo"<script>alert('gagal')</script>";
echo"<script>window.location='barangform.php'</script>";
?>
<?php
include"config/koneksi.php";
if ($update==1)
echo"<script>window.location='barangview.php'</script>";
?>
include'config/koneksi.php';
$jml=mysql_num_rows($query);
?>
<center>
<tr bgcolor="#FF0000">
</tr>
<?php
while($row=mysql_fetch_array($query)) {
?>
<tr>
<td>
</tr>
<?php
?>
</table>
<label>
</label>
</form>
</center>
<html>
<head>
<title></title>
</head>
<body>
<?php
include "config/koneksi.php";
$kd=$_GET['kodebarang'];
?>
while($row=mysql_fetch_array($ok)){
?>
<tr>
</tr>
<tr>
<td width="2%">:</td>
<td width="61%"><label>
</label></td>
</tr>
<tr>
<td>:</td>
<td><label>
</label></td>
</tr>
<tr>
<td>WARNA</td>
<td>:</td>
<td><label>
</tr>
<tr>
<td>BERAT</td>
<td>:</td>
<td><label>
</label></td>
</tr>
<tr>
<td>HARGA</td>
<td>:</td>
<td><label>
</label></td>
</tr>
<tr>
<div align="center">
</div>
</label></td>
</tr>
<?php
}
?>
</table>
</form>
</body>
</html>
<?php
include 'config/koneksi.php';
if($query){
?>
<?php
else {
?>
FILE GUDANG FORM
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Untitled Document</title>
</head>
<body>
<tr>
</tr>
<tr>
<td width="58%"><label>
</label></td>
</tr>
<tr>
<td>KODE BARANG </td>
<td><label>
<?php
include "config/koneksi.php";
while ($tampilkan=mysql_fetch_array($tampil))
?>
</select>
</label></td>
</tr>
<tr>
<td>LOKASI</td>
<td><label>
</label></td>
</tr>
<tr>
<td>STOK</td>
<td><label>
</label></td>
</tr>
<tr>
<div align="center">
</div>
</label></td>
</tr>
</table>
</form>
<label>
<div align="center">
</div>
</label>
</body>
</html>
<?php
include 'config/koneksi.php';
$kodeg=$_POST['txtkodegudang'];
$kodeb=$_POST['cbkodebarang'];
$lokasi=$_POST['txtlokasi'];
$stok=$_POST['txtstok'];
$strsql="insert into gudang(kodegudang,kodebarang,lokasi,stok) values
('$kodeg','$kodeb','$lokasi','$stok')";
if($query=1){
echo"<script>alert('sukses')</script>";
echo"<script>window.location='gudangview.php'</script>";
}else{
echo"<script>alert('gagal')</script>";
echo"<script>window.location='gudangform.php'</script>";
?>
<?php
include'config/koneksi.php';
$jml=mysql_num_rows($query);
?>
<center>
<tr bgcolor="#FF0000">
</tr>
<?php
while($row=mysql_fetch_array($query)) {
?>
<tr>
</tr>
<?php
?>
</table>
<label>
</label>
</form>
</center>
FILE HITUNG
<?php
include 'config/koneksi.php';
$baris=mysql_fetch_array($data);
$total=$baris['total'];
if($total>=1500000){
$diskon=$total*15/100;
$grandtotal=$total-$diskon;
elseif($total>=1000000){
$diskon=$total*10/100;
$grandtotal=$total-$diskon;
elseif($total>=500000){
$diskon=$total*5/100;
$grandtotal=$total-$diskon;
else{
$diskon=$total*0/100;
$grandtotal=$total-$diskon;
}
?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Untitled Document</title>
</head>
<body>
<?php
include 'config/koneksi.php';
?>
<?php
$jml=mysql_num_rows($query);
?>
<form id="form1" name="form1" method="post" action="simpanlist.php">
<tr>
<?php } ?>
</select>
<label></label></td>
<td width="14%"><label></label>
<label>
</label></td>
<td width="14%"><label>
</label></td>
<td width="14%"><label>
</label></td>
<td width="14%"><label>
</label></td>
<td width="14%"><label>
</label></td>
<td><label>
</label></td>
</tr>
</table>
<tr>
</tr>
<?php
while($row=mysql_fetch_array($query)) {
?>
<tr>
</tr>
<?php
?>
</table>
</form>
<script type="text/javascript">
function changeValue(kodebarang) {
document.getElementById("namabarang").value = namabarang[kodebarang].namabarang;
document.getElementById("warna").value = warna[kodebarang].warna;
document.getElementById("berat").value = berat[kodebarang].berat;
document.getElementById("harga").value = harga[kodebarang].harga;
};
</script>
</body>
</html>
include 'config/koneksi.php';
$kdbrg=$_POST['kodebarang'];
$hrg=$_POST['harga'];
$jumlah=$_POST['jumlah'];
$subtotal=$hrg*$jumlah;
$query=mysql_query($strsql);
if($query=1){
echo"<script>alert('sukses')</script>";
echo"<script>window.location='listview.php'</script>";
}else{
echo"<script>alert('gagal')</script>";
echo"<script>window.location='listview.php'</script>";
?>
<?php
include 'config/koneksi.php';
?>
<!DOCTYPE html>
<html lang="en">
<head>
<body>
<div class="container">
<h1>Penjualan</h1>
<table>
<tr>
<td width="165">
<p>
<?php } ?>
</select>
</p>
<p>
<label></label>
</tr>
<tr>
<td>Warna</td>
<td><label>
</label></td>
</tr>
<tr>
<td>Berat</td>
<td><label>
</label></td>
</tr>
<tr>
<td><label>Nama</label></td>
</tr>
</table>
<p> </p>
</form>
</div>
<script type="text/javascript">
function changeValue(kodebarang) {
document.getElementById("namabarang").value = namabarang[kodebarang].namabarang;
document.getElementById("warna").value = warna[kodebarang].warna;
document.getElementById("berat").value = berat[kodebarang].berat;
};
</script> <!-- Tampilkan Harga berdasarkan kode barang -->
</body>
</html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Untitled Document</title>
</head>
<body>
<?php
include 'config/koneksi.php';
if($data===false){
die(mysql_error());
$i=mysql_fetch_array($data);
$kodeawal=substr($i['nonota'],3,4)+1;
if($kodeawal<10){
$kode='P00'.$kodeawal;
$kode='P0'.$kodeawal;
}
else{
$kode='P'.$kodeawal;
?>
<tr>
</tr>
<tr>
</label></td>
</tr>
<tr>
<td>PETUGAS </td>
<td colspan="6"><label>
</label></td>
</tr>
<tr>
<td>PELANGGAN</td>
<td colspan="6"><label>
<?php
include "config/koneksi.php";
?>
</select>
</label></td>
</tr>
<tr>
<td>TANGGAL</td>
<td colspan="6"><label>
</label></td>
</tr>
<tr>
</tr>
<tr>
<td colspan="7">
</tr>
<tr>
<td width="16%"><label>
<?php
include'hitung.php';
?>
<input name="txttotal" type="text" id="txttotal" value="<?php echo $baris['total']; ?>" />
</label></td>
</tr>
<tr>
<td><label>
</label></td>
</tr>
<tr>
<td><label>
</label></td>
</tr>
<tr>
<div align="center">
</div>
</label>
<label>
<div align="center"></div>
</label></td>
</tr>
</table>
</form>
</body>
</html>