Sistem Basis Data Aplikasi Laundry

BAB I
PENDAHULUAN
1.1 Latar Belakang
     Karena banyaknya orang yang menggunakan jasa laundry-an membuat usaha yang satu ini kesulitan dalam mengelola data-data laundry-an. Dalam mengelola data-data laundry, kebanyakan jasa Laundry masih melakukan pendataan dengan cara manual, seperti pencatatan data barang laundry-an, data pelanggan, data logistik yang dipergunakan atau yang dibeli, dan pencatatan proses transaksi dari kwitansi ke dalam buku besar. Data-data yang dicatat didalam buku besar, nantinya akan dipindahkan ke excel untuk mempermudah pemilik untuk melihat laporan secara rinci dan sebagai media penyimpanan data-data dalam bentuk softcopy.
         Oleh karena itu, akan dibangun sebuah aplikasi yang akan membantu Aplikasi Laundry dalam hal mengelola data-data laundry-an. Karena itulah penulis mengangkat Proyek Akhir dengan judul “Aplikasi Pengelolaan Data Laundry”. Aplikasi yang dibangun dengan menggunakan PHP dan MYSQL.
        Dengan adanya aplikasi ini, diharapkan dapat membantu Aplikasi Laundry dalam pemrosesan pengelolaan data-data laundry-an.

1.2    Perumusan Masalah     
1. Bagaimana cara mengelola data barang laundry-an yang masuk dan data barang laundry-an
        yang  keluar?
2. Bagaimana cara mengelola data pelanggan member dan non-member yang memakai jasa
        Aplikasi Laundry?
3. Bagaimana cara mengelola proses transaksi  yang akan dilakukan oleh admin?

1.3   Batasan Masalah     
1. Sistem yang di buat hanya berbasis desktop dan tidak bisa di pakai dalam jaringan.
2. Aplikasi menggunakan bahasa pemrograman PHP yang hanya dijalankan pada sistem operasi              windows.
3. Aplikasi ini tidak menangani perhitungan laba dan rugi.
4. Aplikasi ini tidak menangani proses pembayaran gaji para pegawai.
5. Aplikasi ini tidak menangani laporan pendapatan bersih.
6. Aplikasi ini tidak menangani proses pendataan banyaknya pekerjaan yang dilakukan pegawai.

1.4 Tujuan
        Tujuan dari pengerjaan proyek akhir ini adalah membuat sistem pemrosesan transaksi.


BAB II
PEMBAHASAN

2.1 PHP Myadmin
    PHP adalah bahasa pemrograman script server-side yang didesain untuk pengembangan web.Selain itu, PHP juga bisa digunakan sebagai bahasa pemrograman umum.PHP disebut bahasa pemrograman server side karena PHP diproses pada komputer server.Hal ini berbeda dibandingkan dengan bahasa pemrograman client-side seperti JavaScript yang diproses pada web browser (client).
          Saat ini PHP adalah singkatan dari PHP: Hypertext Preprocessor, sebuah kepanjangan rekursif, yakni permainan kata dimana kepanjangannya terdiri dari singkatan itu sendiri: PHP: Hypertext Preprocessor. PHP dapat digunakan dengan gratis (free) dan bersifat Open Source.PHP dirilis dalam lisensi PHP License, sedikit berbeda dengan lisensi GNU General Public License (GPL) yang biasa digunakan untuk proyek Open Source.

2.2  Fungsi PHP Dalam Pemrograman Web
     Untuk membuat halaman web, sebenarnya PHP bukanlah bahasa pemrograman yang wajib digunakan.Kita bisa saja membuat website hanya menggunakan HTML saja. Web yang dihasilkan dengan HTML (dan CSS) ini dikenal dengan website statis, dimana konten dan halaman web bersifat tetap.
      Sebagai perbandingan, website dinamis yang bisa dibuat menggunakan PHP adalah situs web yang bisa menyesuaikan tampilan konten tergantung situasi.Website dinamis juga bisa menyimpan data ke dalam database, membuat halaman yang berubah-ubah sesuai input dari user, memproses form, dll.

2.3  MYSQL
     MySQL adalah sebuah perangkat lunak system manajemen basis data SQL (DBMS) yang multithread, dan multi-user. MySQL adalah implementasi dari system manajemen basisdata relasional (RDBMS). 

2.4    Bootstrap
         Bootstrap adalah sebuah framework css yang dapat digunakan untuk mempermudah membangun tampilan web. Bootstrap pertama kali di kembangkan pada pertangahan 2010 di Twitter oleh Mark Otto dan Jacob Thornton. Saat ini Bootstrap dikembangkan secara open source dengan lisensi MIT.

2.5    Tampilan Aplikasi WEB Laundry
1.      Antarmuka Halaman Login
          

2.     Antarmuka Halaman Utama


3.     Antarmuka Halaman Cucian



4.     Antaramuka Halaman Pelanggan


5.    Antarmuka Halaman Transaksi


6.    Antarmuka Halaman User


7.    Antarmuka Halaman Tambah Data Cucian
8.    Antarmuka Halaman Tambah Data Pelanggan 
9.      Antarmuka Halaman Tambah Data  Transaksi

10.    Antarmuka Halaman Tambah Data User



2.6     Source Code PHP         

<!--==============memulai session=====================-->
<html>
<?php
session_start();
if(empty($_SESSION)){
header("Location: index.php");
}
if($_SESSION['level'] == 'admin' || $_SESSION['level'] == 'superadmin') { ?>
<!--==============memulai session=====================-->
   
<p>SELAMAT DATANG DI HALAMAN ADMIN</p>
<p>Username: <?php echo $_SESSION['username']; ?><br>
Level: <?php echo $_SESSION['level']; ?></p>
    
<table cellspacing="3" cellpadding="3">
<tr>
<td><a href="superadmin.php">Halaman SuperAdmin</a></td>
<td><a href="admin.php">Halaman Admin</a></td>
<td><a href="kasir.php">Halaman Kasir</a></td>
</tr>
</table>
    
<table cellspacing="3" cellpadding="3">
   </tr>
    <tr>
    <td><a href="cucian/index.php">Cucian</a></td>
    <td><a href="pelanggan/index.php">Pelanggan</a></td>
    <td><a href="transaksi/index.php">Transaksi</a></td>
    <td><a href="user/index.php">User</a></td>
    </tr>
</table>

<p><a href="logout.php" class="btn btn-primary" onclick="return confirm('Yakin ingin Logout?')">Log out</a></p>  
<!--=================menutup session========================   --> 
<?php
}
    else {
        session_start();
        session_destroy();
        header("Location: index.php");
    }
?>   
</html>
<!--=================menutup session========================   --> 

<!--==============memulai session=====================-->

<!DOCTYPE html>
<html>
<head>
<title>Edit Jenis Cucian</title>
<link href="../bootstrap/css/bootstrap.min.css" rel="stylesheet">

    <!-- Custom CSS -->
    
    
    <!-- Custom Fonts -->
    <link href="../font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">

</head>
<body>
<div class="container">
<h2>Edit Jenis Cucian</h2>
<p><a href="index.php">Beranda</a> / <a href="tambah.php">Tambah Data</a></p>
<h3>Edit Jenis Cucian</h3>
<?php
include('../koneksi.php');
$id = $_GET['id'];
$show = mysql_query("SELECT * FROM tb_jenis_cucian WHERE id='$id'");
if(mysql_num_rows($show) == 0){
echo '<script>window.history.back()</script>';
}else{
$data = mysql_fetch_assoc($show);
}
?>
<form action="edit-proses.php" method="post">
<input type="hidden" name="id" value="<?php echo $id; ?>">
<table cellpadding="3" cellspacing="0">
<tr>
<td>Jenis Cucian</td>
<td>:</td>
<td><input type="text" name="jCucian" class="form-control" size="30" value="<?php echo $data['jenis_cucian']; ?>" required></td>
</tr>
            <tr>
<td>Harga Member</td>
<td>:</td>
<td><input type="text" name="hMember" class="form-control" size="30" value="<?php echo $data['harga_1']; ?>" required></td>
</tr>
            <tr>
<td>Harga Non Member</td>
<td>:</td>
<td><input type="text" name="hNonMember" class="form-control" size="30" value="<?php echo $data['harga_2']; ?>" required></td>
</tr>
<tr>
<td>&nbsp;</td>
<td></td>
<td><input type="submit" class="btn btn-primary" name="simpan" value="Simpan"></td>
</tr>
</table>
</form>
</body>
</html>
<!--==============menutup session=====================-->

<!--==============memulai session=====================-->
<!DOCTYPE html>
<html>
<head>
<title>Edit Pelanggan</title>
<link href="../bootstrap/css/bootstrap.min.css" rel="stylesheet">

    <!-- Custom CSS -->
    
    
    <!-- Custom Fonts -->
    <link href="../font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">
</head>
<div class="container">
<body>
<h2>Edit Pelanggan</h2>
<p><a href="index.php" class="btn btn-default btn-sm">Beranda</a> / <a href="tambah.php" class="btn btn-success btn-sm">Tambah Data</a></p>
<h3>Edit Data Pelanggan</h3>
<?php
include('../koneksi.php');
$id = $_GET['id'];
$show = mysql_query("SELECT * FROM tb_pelanggan WHERE id='$id'");
if(mysql_num_rows($show) == 0){
echo '<script>window.history.back()</script>';
}else{
$data = mysql_fetch_assoc($show);
}
?>
<form action="edit-proses.php" method="post">
<input type="hidden" name="id" value="<?php echo $id; ?>">
<table cellpadding="3" cellspacing="0">
<tr>
<td>Nama</td>
<td>:</td>
<td><input type="text" class="form-control" name="nama" size="30" value="<?php echo $data['nama']; ?>" required></td>
</tr>
            <tr>
<td>alamat</td>
<td>:</td>
<td><input type="text" class="form-control" name="alamat" size="30" value="<?php echo $data['alamat']; ?>" required></td>
</tr>
            <tr>
<td>No Hp</td>
<td>:</td>
<td><input type="text" name="no_hp" class="form-control" size="30" value="<?php echo $data['no_hp']; ?>" required></td>
</tr>
<tr>
<td>Status</td>
<td>:</td>
<td>
<select class="form-control" name="status" required>
<option value="member" <?php if($data['status'] == 'member'){ echo 'selected'; } ?>>Member</option>
<option value="nonmember" <?php if($data['status'] == 'nonmember'){ echo 'selected'; } ?>>Non Member</option>
</select>
</td>
</tr>
<tr>
<td>&nbsp;</td>
<td></td>
<td><input type="submit" class="btn btn-primary" name="simpan" value="Simpan"></td>
</tr>
</table>
</form>
</body>
</html>
<!--==============menutup session=====================-->

<!--==============memulai session=====================-->
<!DOCTYPE html>
<html>
<head>
<title>Edit Transaksi</title>
<link href="../bootstrap/css/bootstrap.min.css" rel="stylesheet">

    <!-- Custom CSS -->
    
    
    <!-- Custom Fonts -->
    <link href="../font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">

</head>
<body>
<div class="container">
<h2>Edit Transaksi</h2>
<p><a href="index.php">Beranda</a> / <a href="tambah.php">Tambah Data</a></p>
<h3>Edit Jenis Cucian</h3>
<?php
include('../koneksi.php');
$id = $_GET['id'];
$show = mysql_query("SELECT * FROM tb_transaksi WHERE id='$id'");
if(mysql_num_rows($show) == 0){
echo '<script>window.history.back()</script>';
}else{
$data = mysql_fetch_assoc($show);
}
?>
<form action="edit-proses.php" method="post">
<input type="hidden" name="id" value="<?php echo $id; ?>">
<table cellpadding="3" cellspacing="0">
<tr>
<td>ID Cucian</td>
<td>:</td>
<td><input type="text" name="id_cucian" size="30" class="form-control" value="<?php echo $data['id_cucian']; ?>" required></td>
</tr>
            <tr>
<td>ID Pelanggan</td>
<td>:</td>
<td><input type="text" name="id_pelanggan" class="form-control" size="30" value="<?php echo $data['id_pelanggan']; ?>" required></td>
</tr>
            <tr>
<td>Berat</td>
<td>:</td>
<td><input type="text" name="berat" size="30" class="form-control" value="<?php echo $data['berat']; ?>" required></td>
</tr>
<tr>
<td>Bayar</td>
<td>:</td>
<td><input type="text" name="bayar" size="30" class="form-control" value="<?php echo $data['bayar']; ?>" required></td>
</tr>
<tr>
<td>&nbsp;</td>
<td></td>
<td><input type="submit" class="btn btn-primary" name="simpan" value="Simpan"></td>
</tr>
</table>
</form>
</body>
</html>
<!--==============menutup session=====================-->

<!--==============memulai session=====================-->
<!DOCTYPE html>
<html>
<head>
<title>Edit User</title>
<link href="../bootstrap/css/bootstrap.min.css" rel="stylesheet">

    <!-- Custom CSS -->
    
    
    <!-- Custom Fonts -->
    <link href="../font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">
</head>
<div class="container">
<body>
<h2>Edit User</h2>
<p><a href="index.php">Beranda</a> / <a href="tambah.php">Tambah Data</a></p>
<h3>Edit Data User</h3>
<?php
include('../koneksi.php');
$id = $_GET['id'];
$show = mysql_query("SELECT * FROM tb_user WHERE id='$id'");
if(mysql_num_rows($show) == 0){
echo '<script>window.history.back()</script>';
}else{
$data = mysql_fetch_assoc($show);
}
?>
<form action="edit-proses.php" method="post">
<input type="hidden" name="id" value="<?php echo $id; ?>">
<table cellpadding="3" cellspacing="0">
<tr>
<td>Nama</td>
<td>:</td>
<td><input type="text" name="nama" class="form-control" size="30" value="<?php echo $data['nama']; ?>" required></td>
</tr>
            <tr>
<td>Username</td>
<td>:</td>
<td><input type="text" name="username" size="30" class="form-control" value="<?php echo $data['username']; ?>" required></td>
</tr>
            
<tr>
<td>Level</td>
<td>:</td>
<td>
<select class="form-control" name="level" required>
<option value="superadmin" <?php if($data['level'] == 'superadmin'){ echo 'selected'; } ?>>superadmin</option>
<option value="admin" <?php if($data['level'] == 'admin'){ echo 'selected'; } ?>>Admin</option>
<option value="kasir" <?php if($data['level'] == 'kasir'){ echo 'selected'; } ?>>Kasir</option>
</select>
</td>
</tr>
<tr>
<td>&nbsp;</td>
<td></td>
<td><input type="submit" class="btn btn-primary" name="simpan" value="Simpan"></td>
</tr>
</table>
</form>
</body>
</html>
<!--==============menutup session=====================-->

<!--==============memulai session=====================-->
<?php

if(isset($_POST['simpan'])){

include('../koneksi.php');
$id = $_POST['id'];
$jCucian = $_POST['jCucian'];
$member = $_POST['hMember'];
$nonmember = $_POST['hNonMember'];
$update = mysql_query("UPDATE tb_jenis_cucian SET jenis_cucian='$jCucian', harga_1='$member', harga_2='$nonmember' WHERE id='$id'") or die(mysql_error());

if($update){
echo 'Data berhasil di simpan! ';
echo '<a href="index.php?id='.$id.'">Kembali</a>';
}else{
echo 'Gagal menyimpan data! ';
echo '<a href="edit.php?id='.$id.'">Kembali</a>';
}
}else{

echo '<script>window.history.back()</script>';

}
?>
<!--==============menutup session=====================-->

<!--==============memulai session=====================-->
<?php

if(isset($_POST['simpan'])){

include('../koneksi.php');
$id = $_POST['id'];
$nama = $_POST['nama'];
$alamat = $_POST['alamat'];
$nohp = $_POST['no_hp'];
$status = $_POST['status'];
$update = mysql_query("UPDATE tb_pelanggan SET nama='$nama', alamat='$alamat', no_hp='$nohp',status='$status' WHERE id='$id'") or die(mysql_error());

if($update){
echo 'Data berhasil di simpan! ';
echo '<a href="index.php?id='.$id.'">Kembali</a>';
}else{
echo 'Gagal menyimpan data! ';
echo '<a href="edit.php?id='.$id.'">Kembali</a>';
}
}else{

echo '<script>window.history.back()</script>';

}
?>
<!--==============menutup session=====================-->

<!--==============memulai session=====================-->
<?php

if(isset($_POST['simpan'])){

include('../koneksi.php');
$id = $_POST['id'];
$id_cucian = $_POST['id_cucian'];
$id_pelanggan = $_POST['id_pelanggan'];
$berat = $_POST['berat'];
$bayar= $_POST['bayar'];
$update = mysql_query("UPDATE tb_transaksi SET id_cucian='$id_cucian', id_pelanggan='$id_pelanggan', berat='$berat',bayar='$bayar' WHERE id='$id'") or die(mysql_error());

if($update){
echo 'Data berhasil di simpan! ';
echo '<a href="index.php?id='.$id.'">Kembali</a>';
}else{
echo 'Gagal menyimpan data! ';
echo '<a href="edit.php?id='.$id.'">Kembali</a>';
}
}else{

echo '<script>window.history.back()</script>';

}
?>
<!--==============menutup session=====================-->

<!--==============memulai session=====================-->
<?php

if(isset($_POST['simpan'])){

include('../koneksi.php');
$id = $_POST['id'];
$nama = $_POST['nama'];
$user = $_POST['username'];
$password = md5($_POST['password']);
$level = $_POST['level'];
$update = mysql_query("UPDATE tb_user SET nama='$nama', username='$user', password='$password', level='$level' WHERE id='$id'") or die(mysql_error());

if($update){
echo 'Data berhasil di simpan! ';
echo '<a href="index.php?id='.$id.'">Kembali</a>';
}else{
echo 'Gagal menyimpan data! ';
echo '<a href="edit.php?id='.$id.'">Kembali</a>';
}
}else{

echo '<script>window.history.back()</script>';

}
?>
<!--==============menutup session=====================-->

<!--==============memulai session=====================-->
<?php 
mysql_connect("localhost","root","");
mysql_select_db("laundry");
header("Content-Type: application/force-download");
 header("Cache-Control: no-cache, must-revalidate");
 header("Expires: Sat, 26 Jul 2010 05:00:00 GMT"); 
 header("content-disposition: attachment;filename=laporan_Transaksi".date('dmY').".xls");

 echo '<table align="center" border="1">
 <tbody>
<tr>
  <td style="background: #EEE; font-weight: bold;">No.</td>
  <td style="background: #EEE; font-weight: bold;">nama cucian</td>
  <td style="background: #EEE; font-weight: bold;">nama pelanggan</td>
  <td style="background: #EEE; font-weight: bold;">berat</td>
  <td style="background: #EEE; font-weight: bold;">bayar</td>
 </tr>
</tbody>
 ';

$query=mysql_query("SELECT * from tb_transaksi");
echo'';
$no = 1;
 while($data=mysql_fetch_array($query))
 {
  echo '
   ';
 echo '<table align="center" border="1">
 <tbody>
<tr>
    <td>' . $no.'.</td>
    <td>' . $data['id_cucian'] . '</td>
    <td>' . $data['id_pelanggan'] . '</td>
    <td>' . $data['berat'] . '</td>
     <td>' . $data['bayar'] . '</td>
   </tr>
   </tbody></table>
   ';
   $no++;
}
?>
<!--==============menutup session=====================-->

<!--==============memulai session=====================-->
<?php
if(isset($_GET['id'])){
include('../koneksi.php');
$id = $_GET['id'];
$cek = mysql_query("SELECT id FROM tb_jenis_cucian WHERE id='$id'") or die(mysql_error());
if(mysql_num_rows($cek) == 0){
echo '<script>window.history.back()</script>';
}else{
$del = mysql_query("DELETE FROM tb_jenis_cucian WHERE id='$id'");
if($del){
echo 'Data user berhasil di hapus! ';
echo '<a href="index.php">Kembali</a>';
}else{
echo 'Gagal menghapus data! ';
echo '<a href="index.php">Kembali</a>';
}
}
}else{
echo '<script>window.history.back()</script>';
}
?>
<!--==============menutup session=====================-->

<!--==============memulai session=====================-->
<?php
if(isset($_GET['id'])){
include('../koneksi.php');
$id = $_GET['id'];
$cek = mysql_query("SELECT id FROM tb_pelanggan WHERE id='$id'") or die(mysql_error());
if(mysql_num_rows($cek) == 0){
echo '<script>window.history.back()</script>';
}else{
$del = mysql_query("DELETE FROM tb_pelanggan WHERE id='$id'");
if($del){
echo 'Data Pelanggan berhasil di hapus! ';
echo '<a href="index.php">Kembali</a>';
}else{
echo 'Gagal menghapus data! ';
echo '<a href="index.php">Kembali</a>';
}
}
}else{
echo '<script>window.history.back()</script>';
}
?>
<!--==============menutup session=====================-->

<!--==============memulai session=====================-->
<?php
if(isset($_GET['id'])){
include('../koneksi.php');
$id = $_GET['id'];
$cek = mysql_query("SELECT id FROM tb_transaksi WHERE id='$id'") or die(mysql_error());
if(mysql_num_rows($cek) == 0){
echo '<script>window.history.back()</script>';
}else{
$del = mysql_query("DELETE FROM tb_transaksi WHERE id='$id'");
if($del){
echo 'Data user berhasil di hapus! ';
echo '<a href="index.php">Kembali</a>';
}else{
echo 'Gagal menghapus data! ';
echo '<a href="index.php">Kembali</a>';
}
}
}else{
echo '<script>window.history.back()</script>';
}
?>
<!--==============menutup session=====================-->

<!--==============memulai session=====================-->
<?php
if(isset($_GET['id'])){
include('../koneksi.php');
$id = $_GET['id'];
$cek = mysql_query("SELECT id FROM tb_user WHERE id='$id'") or die(mysql_error());
if(mysql_num_rows($cek) == 0){
echo '<script>window.history.back()</script>';
}else{
$del = mysql_query("DELETE FROM tb_user WHERE id='$id'");
if($del){
echo 'Data user berhasil di hapus! ';
echo '<a href="index.php">Kembali</a>';
}else{
echo 'Gagal menghapus data! ';
echo '<a href="index.php">Kembali</a>';
}
}
}else{
echo '<script>window.history.back()</script>';
}
?>
<!--==============menutup session=====================-->

<!--==============memulai session=====================-->
              <nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
            <!-- Brand and toggle get grouped for better mobile display -->
            <div class="navbar-header">
                <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-ex1-collapse">
                    <span class="sr-only">Toggle navigation</span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </button>
                <a class="navbar-brand" href="index.php">App Laundry</a>
            </div>
<ul class="nav navbar-right top-nav">              
                <li class="dropdown">
                    <a href="#" class="dropdown-toggle" data-toggle="dropdown"><i class="fa fa-user"></i>  <b class="caret"></b></a>
                    <ul class="dropdown-menu">
                        <li>
                            <a href="admin-profil.php"><i class="fa fa-fw fa-user"></i> Profile</a>
                        </li>
                        <li>
                            <a href="#"><i class="fa fa-fw fa-envelope"></i> Inbox</a>
                        </li>
                        <li>
                            <a href="#"><i class="fa fa-fw fa-gear"></i> Settings</a>
                        </li>
                        <li class="divider"></li>
                        <li>
                            <a href="../logout.php"><i class="fa fa-fw fa-power-off"></i> Log Out</a>
                        </li>
                    </ul>
                </li>
            </ul>
          <!--==============menutup session=====================-->

<!--==============memulai session=====================-->
<!DOCTYPE html>
<html lang="en">

<head>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="">
    <meta name="author" content="">

    <title>ADMIN</title>

    <!-- Bootstrap Core CSS -->
    <link href="../bootstrap/css/bootstrap.min.css" rel="stylesheet">

    <!-- Custom CSS -->
   
    
    <!-- Custom Fonts -->
    <link href="../font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">

    <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
        <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
        <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->

</head>

<body>

    <div id="wrapper">
  
            <!-- Top Menu Items -->
            <?php include "../header.php" ?>
            <!-- Sidebar Menu Items - These collapse to the responsive navigation menu on small screens -->
                    <!-- Navigation -->
                   <div class="collapse navbar-collapse navbar-ex1-collapse">
                <ul class="nav navbar-nav side-nav">
                    <li>
                        <a href="../index.php">&nbsp;Dashboard</a>
                    </li>
                    <li>
                        <a href="index.php">&nbsp;Cucian</a>
                    </li>
                    <li>
                        <a href="../pelanggan/index.php">&nbsp;Pelanggan</a>
                    </li>
                    <li>
                        <a href="../transaksi/index.php">&nbsp;transaksi</a>
                    </li>
                    <li>
                        <a href="../user/index.php">&nbsp;User</a>
                    </li>
                    <li class="right">
                    <a href="../logout.php">Logout</a>
                    </li>

                </ul>
            </div>
        </nav>

                    <!-- /.navbar-collapse -->
        <div id="page-wrapper">

            <div class="container-fluid">

                <!-- Page Heading -->
                <div class="row">
                    <div class="col-lg-12">
                        <h1 class="page-header">
                            Cucian
                        </h1>
                        <ol class="breadcrumb">
                            <li class="active">
                                <i class="fa fa-dashboard"></i> Dashboard
                            </li>
                        </ol>
                    </div>
                </div>
                <!--======== konten Cucian =======-->
<h2>HALAMAN DATA CUCIAN</h2>
<p><a href="index.php">Beranda</a> / <a class="btn btn-success btn-sm" href="tambah.php">Tambah Cucian</a></p>
<h3>Cucian</h3>
<table cellpadding="5" cellspacing="0" class="table table-striped table-hover table-bordered">
<tr bgcolor="#CCCCCC">
<th>No.</th>
<th>Jenis Cucian</th>
<th>Harga Member</th>
<th>Harga Non Member</th>
<th>Opsi</th>
</tr>
<?php
include('../koneksi.php');
$query = mysql_query("SELECT * FROM tb_jenis_cucian ORDER BY id DESC") or die(mysql_error());
if(mysql_num_rows($query) == 0){
echo '<tr><td colspan="6">Tidak ada data!</td></tr>';
}else{
$no = 1;
while($data = mysql_fetch_assoc($query)){
echo '<tr>';
echo '<td>'.$no.'</td>';
echo '<td>'.$data['jenis_cucian'].'</td>';
echo '<td>'.$data['harga_1'].'</td>';
echo '<td>'.$data['harga_2'].'</td>';
echo '<td><a class="btn btn-warning btn-sm" href="edit.php?id='.$data['id'].'">Edit</a>  <a class="btn btn-danger btn-sm" href="hapus.php?id='.$data['id'].'" onclick="return confirm(\'Yakin?\')">Hapus</a></td>';
echo '</tr>';
$no++;
}
}
?>
</table>
                <!--======== Akhir konten Cucian =======-->

                
                

            </div>
            <!-- /.container-fluid -->

        </div>
        <!-- /#page-wrapper -->

    </div>
    <!-- /#wrapper -->

    <!-- jQuery -->
    <script src="bootstrap/js/jquery.js"></script>

    <!-- Bootstrap Core JavaScript -->
    <script src="bootstrap/js/bootstrap.min.js"></script>

    <!-- Morris Charts JavaScript -->
    <script src="js/plugins/morris/raphael.min.js"></script>
    <script src="js/plugins/morris/morris.min.js"></script>
    <script src="js/plugins/morris/morris-data.js"></script>
</body>
</html>
 <!--==============menutup session=====================-->


<!--==============memulai session=====================-->
<html>
<?php
session_start();
if(empty($_SESSION)){
header("Location: login.php");
}
if($_SESSION['level'] == 'admin' || $_SESSION['level'] == 'superadmin') { ?>
<!--==============memulai session=====================-->
<!DOCTYPE html>
<html lang="en">

<head>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="">
    <meta name="author" content="">

    <title>ADMIN</title>

    <!-- Bootstrap Core CSS -->
    <link href="bootstrap/css/bootstrap.min.css" rel="stylesheet">

    <!-- Custom CSS -->
    <link href="bootstrap/css/sb-admin.css" rel="stylesheet">

    <!-- Morris Charts CSS -->
    <link href="bootstrap/css/plugins/morris.css" rel="stylesheet">
    
    <!-- Custom Fonts -->
    <link href="font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">

    <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
        <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
        <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->

</head>

<body>

    <div id="wrapper">
  
            <!-- Top Menu Items -->
            <?php include "header.php" ?>
            <!-- Sidebar Menu Items - These collapse to the responsive navigation menu on small screens -->
                    <!-- Navigation -->
        <?php include "nav-samping.php"; ?>
                    <!-- /.navbar-collapse -->
        <div id="page-wrapper">

            <div class="container-fluid">

                <!-- Page Heading -->
                <div class="row">
                    <div class="col-lg-12">
                        <h1 class="page-header">
                            Dashboard <small>Menu</small>
                        </h1>
                        <ol class="breadcrumb">
                            <li class="active">
                                <i class="fa fa-dashboard"></i> Dashboard
                            </li>
                        </ol>
                    </div>
                </div>
                <!--======== konten dashboard =======-->
                <?php include "konten-dashboard.php" ?>
                <!--======== Akhir konten dashboard =======-->

                
                

            </div>
            <!-- /.container-fluid -->

        </div>
        <!-- /#page-wrapper -->

    </div>
    <!-- /#wrapper -->

    <!-- jQuery -->
    <script src="bootstrap/js/jquery.js"></script>

    <!-- Bootstrap Core JavaScript -->
    <script src="bootstrap/js/bootstrap.min.js"></script>

    <!-- Morris Charts JavaScript -->
    <script src="js/plugins/morris/raphael.min.js"></script>
    <script src="js/plugins/morris/morris.min.js"></script>
    <script src="js/plugins/morris/morris-data.js"></script>

</body>

</html>
<?php
}
?>
<!--==============menutup session=====================-->

<!--==============memulai session=====================-->
<html>
<?php
session_start();
if(empty($_SESSION)){
header("Location: ../index.php");
}
if($_SESSION['level'] == 'admin' || $_SESSION['level'] == 'superadmin') { ?>
<!--==============memulai session=====================-->
<!DOCTYPE html>
<html lang="en">

<head>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="">
    <meta name="author" content="">

    <title>ADMIN</title>

    <!-- Bootstrap Core CSS -->
    <link href="../bootstrap/css/bootstrap.min.css" rel="stylesheet">


    
    <!-- Custom Fonts -->
    <link href="../font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">

    <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
        <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
        <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->

</head>

<body>

    <div id="wrapper">
  
            <!-- Top Menu Items -->
            <?php include "../header.php" ?>
            <!-- Sidebar Menu Items - These collapse to the responsive navigation menu on small screens -->
                    <!-- Navigation -->
                  <div class="collapse navbar-collapse navbar-ex1-collapse">
                <ul class="nav navbar-nav side-nav">
                    <li>
                        <a href="index.php">&nbsp;Dashboard</a>
                    </li>
                    <li>
                        <a href="../cucian/index.php">&nbsp;Cucian</a>
                    </li>
                    <li>
                        <a href="../pelanggan/index.php">&nbsp;Pelanggan</a>
                    </li>
                    <li>
                        <a href="../transaksi/index.php">&nbsp;transaksi</a>
                    </li>
                    <li>
                        <a href="cucian/index.php">&nbsp;User</a>
                    </li>
                    <li class="right">
                    <a href="../logout.php">Logout</a>
                    </li>

                </ul>
            </div>
        </nav>

                    <!-- /.navbar-collapse -->
        <div id="page-wrapper">

            <div class="container-fluid">

                <!-- Page Heading -->
                <div class="row">
                    <div class="col-lg-12">
                        <h2 class="page-header">
                            Pelanggan
                        </h2>
                        <ol class="breadcrumb">
                            <li class="active">
                                <i class="fa fa-dashboard"></i> Dashboard
                            </li>
                        </ol>
                    </div>
                </div>
                <!--======== konten Cucian =======-->
<h2>PELANGGAN</h2>
<p><a href="index.php" class="btn btn-default btn-sm">Beranda</a><a class="btn btn-success btn-sm" href="tambah.php">Tambah Pelanggan</a></p>
<h3>Manage pelanggan</h3>
<table cellpadding="5" cellspacing="0" class="table table-striped table-hover">
<tr bgcolor="#CCCCCC">
<th>No.</th>
<th>Nama</th>
<th>Alamat</th>
<th>No.Hp</th>
<th>Status</th>
<th>Opsi</th>
</tr>
<?php
include('../koneksi.php');
$query = mysql_query("SELECT * FROM tb_pelanggan ORDER BY id DESC") or die(mysql_error());
if(mysql_num_rows($query) == 0){
echo '<tr><td colspan="6">Tidak ada data!</td></tr>';
}else{
$no = 1;
while($data = mysql_fetch_assoc($query)){
echo '<tr>';
echo '<td>'.$no.'</td>';
echo '<td>'.$data['nama'].'</td>';
echo '<td>'.$data['alamat'].'</td>';
echo '<td>'.$data['no_hp'].'</td>';
echo '<td>'.$data['status'].'</td>';
echo '<td><a class="btn btn-warning btn-sm" href="edit.php?id='.$data['id'].'">Edit</a><a class="btn btn-danger btn-sm" href="hapus.php?id='.$data['id'].'" onclick="return confirm(\'Yakin?\')">Hapus</a></td>';
echo '</tr>';
$no++;
}
}
?>
</table>

                <!--======== Akhir konten Cucian =======-->

                
                

            </div>
            <!-- /.container-fluid -->

        </div>
        <!-- /#page-wrapper -->

    </div>
    <!-- /#wrapper -->

    <!-- jQuery -->
    <script src="bootstrap/js/jquery.js"></script>

    <!-- Bootstrap Core JavaScript -->
    <script src="bootstrap/js/bootstrap.min.js"></script>

    <!-- Morris Charts JavaScript -->
    <script src="js/plugins/morris/raphael.min.js"></script>
    <script src="js/plugins/morris/morris.min.js"></script>
    <script src="js/plugins/morris/morris-data.js"></script>

</body>

</html>    
    
    <!--=================menutup session========================   --> 
<?php
}
    else {
        session_start();
        session_destroy();
        header("Location: ../index.php");
    }
?>   
</html>
<!--=================menutup session========================   --> 

<!--=================memulai session========================   --> 
<html>
<?php
session_start();
if(empty($_SESSION)){
header("Location: ../index.php");
}
if($_SESSION['level'] == 'admin' || $_SESSION['level'] == 'superadmin') { ?>
<!--==============memulai session=====================-->
<!DOCTYPE html>
<html lang="en">

<head>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="">
    <meta name="author" content="">

    <title>ADMIN</title>

    <!-- Bootstrap Core CSS -->
    <link href="../bootstrap/css/bootstrap.min.css" rel="stylesheet">



    
    <!-- Custom Fonts -->
    <link href="../font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">

    <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
        <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
        <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->

</head>

<body>

    <div id="wrapper">
  
            <!-- Top Menu Items -->
            <?php include "../header.php" ?>
            <!-- Sidebar Menu Items - These collapse to the responsive navigation menu on small screens -->
                    <!-- Navigation -->
                  <div class="collapse navbar-collapse navbar-ex1-collapse">
                <ul class="nav navbar-nav side-nav">
                    <li>
                        <a href="../index.php">&nbsp;Dashboard</a>
                    </li>
                    <li>
                        <a href="../cucian/index.php">&nbsp;Cucian</a>
                    </li>
                    <li>
                        <a href="../pelanggan/index.php">&nbsp;Pelanggan</a>
                    </li>
                    <li>
                        <a href="index.php">&nbsp;transaksi</a>
                    </li>
                    <li>
                        <a href="../user/index.php">&nbsp;User</a>
                    </li>
                       <li>
                        <a href="excel.php">&nbsp;Lapran Excel</a>
                    </li>
                    <li class="right">
                    <a href="../logout.php">Logout</a>
                    </li>

                </ul>
            </div>
        </nav>

                    <!-- /.navbar-collapse -->
        <div id="page-wrapper">

            <div class="container-fluid">

                <!-- Page Heading -->
                <div class="row">
                    <div class="col-lg-12">
                        <h1 class="page-header">
                            Pelanggan
                        </h1>
                        <ol class="breadcrumb">
                            <li class="active">
                                <i class="fa fa-dashboard"></i> Dashboard
                            </li>
                        </ol>
                    </div>
                </div>
                <!--======== konten Cucian =======-->
<h2>Transaksi</h2>
<p><a href="../index.php" class="btn btn-default btn-sm
    ">Beranda</a><a class="btn btn-success btn-sm" href="tambah.php">Transaksi</a></p>
<h3>Manage Transksi</h3>
<table cellpadding="5" cellspacing="0" class="table table-striped table-hover">
<tr bgcolor="#CCCCCC">
<th>No.</th>
<th>Id Cucian</th>
<th>Alamat</th>
<th>Berat</th>
<th>Harga</th>
<th>Opsi</th>
</tr>
<?php
include('../koneksi.php');
$query = mysql_query("SELECT * FROM tb_transaksi ORDER BY id DESC") or die(mysql_error());
if(mysql_num_rows($query) == 0){
echo '<tr><td colspan="6">Tidak ada data!</td></tr>';
}else{
$no = 1;
while($data = mysql_fetch_assoc($query)){
echo '<tr>';
echo '<td>'.$no.'</td>';
echo '<td>'.$data['id_cucian'].'</td>';
echo '<td>'.$data['id_pelanggan'].'</td>';
echo '<td>'.$data['berat'].'</td>';
echo '<td>'.$data['bayar'].'</td>';
echo '<td><a class="btn btn-warning btn-sm" href="edit.php?id='.$data['id'].'">Edit</a> <a class="btn btn-danger btn-sm" href="hapus.php?id='.$data['id'].'" onclick="return confirm(\'Yakin?\')">Hapus</a></td>';
echo '</tr>';
$no++;
}
}
?>
</table>

                <!--======== Akhir konten Cucian =======-->

                
                

            </div>
            <!-- /.container-fluid -->

        </div>
        <!-- /#page-wrapper -->

    </div>
    <!-- /#wrapper -->

    <!-- jQuery -->
    <script src="bootstrap/js/jquery.js"></script>

    <!-- Bootstrap Core JavaScript -->
    <script src="bootstrap/js/bootstrap.min.js"></script>

    <!-- Morris Charts JavaScript -->
    <script src="js/plugins/morris/raphael.min.js"></script>
    <script src="js/plugins/morris/morris.min.js"></script>
    <script src="js/plugins/morris/morris-data.js"></script>

</body>

</html>    
    
    <!--=================menutup session========================   --> 
<?php
}
    else {
        session_start();
        session_destroy();
        header("Location: ../index.php");
    }
?>   
<!--=================menutup session========================   --> 

<!--=================memulai session========================   --> 
<html>
<?php
session_start();
if(empty($_SESSION)){
header("Location: ../index.php");
}
if($_SESSION['level'] == 'admin' || $_SESSION['level'] == 'superadmin') { ?>
<!--==============memulai session=====================-->
<!DOCTYPE html>
<html lang="en">

<head>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="">
    <meta name="author" content="">

    <title>ADMIN</title>

    <!-- Bootstrap Core CSS -->
    <link href="../bootstrap/css/bootstrap.min.css" rel="stylesheet">

    <!-- Custom CSS -->
   
    
    <!-- Custom Fonts -->
    <link href="../font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">

    <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
        <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
        <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->

</head>

<body>

    <div id="wrapper">
  
            <!-- Top Menu Items -->
            <?php include "../header.php" ?>
            <!-- Sidebar Menu Items - These collapse to the responsive navigation menu on small screens -->
                    <!-- Navigation -->
                  <div class="collapse navbar-collapse navbar-ex1-collapse">
                <ul class="nav navbar-nav side-nav">
                    <li>
                        <a href="../index.php">&nbsp;Dashboard</a>
                    </li>
                    <li>
                        <a href="../cucian/index.php">&nbsp;Cucian</a>
                    </li>
                    <li>
                        <a href="../pelanggan/index.php">&nbsp;Pelanggan</a>
                    </li>
                    <li>
                        <a href="../transaksi/index.php">&nbsp;transaksi</a>
                    </li>
                    <li>
                        <a href="../user/index.php">&nbsp;User</a>
                    </li>

                </ul>
            </div>
        </nav>

                    <!-- /.navbar-collapse -->
        <div id="page-wrapper">

            <div class="container-fluid">

                <!-- Page Heading -->
                <div class="row">
                    <div class="col-lg-12">
                        <h1 class="page-header">
                            Pelanggan
                        </h1>
                        <ol class="breadcrumb">
                            <li class="active">
                                <i class="fa fa-dashboard"></i> Dashboard
                            </li>
                        </ol>
                    </div>
                </div>
                <!--======== konten Cucian =======-->
<h2>HALAMAN USER</h2>
<p><a href="../index.php">Beranda</a> / <a class="btn btn-success btn-sm" href="tambah.php">Tambah User</a></p>
<h3>Manage User</h3>
<table cellpadding="5" cellspacing="0" class="table table-hover table-striped ">
<tr bgcolor="#CCCCCC">
<th>No.</th>
<th>Nama</th>
<th>Username</th>
<th>Password</th>
<th>Opsi</th>
</tr>
<?php
include('../koneksi.php');
$query = mysql_query("SELECT * FROM tb_user ORDER BY id DESC") or die(mysql_error());
if(mysql_num_rows($query) == 0){
echo '<tr><td colspan="6">Tidak ada data!</td></tr>';
}else{
$no = 1;
while($data = mysql_fetch_assoc($query)){
echo '<tr>';
echo '<td>'.$no.'</td>';
echo '<td>'.$data['nama'].'</td>';
echo '<td>'.$data['username'].'</td>';
echo '<td>'.$data['password'].'</td>';
echo '<td><a class="btn btn-warning btn-sm" href="edit.php?id='.$data['id'].'">Edit</a>  <a class="btn btn-danger btn-sm" href="hapus.php?id='.$data['id'].'" onclick="return confirm(\'Yakin?\')">Hapus</a></td>';
echo '</tr>';
$no++;
}
}
?>
</table>



                <!--======== Akhir konten Cucian =======-->

                
                

            </div>
            <!-- /.container-fluid -->

        </div>
        <!-- /#page-wrapper -->

    </div>
    <!-- /#wrapper -->

    <!-- jQuery -->
    <script src="bootstrap/js/jquery.js"></script>

    <!-- Bootstrap Core JavaScript -->
    <script src="bootstrap/js/bootstrap.min.js"></script>

    <!-- Morris Charts JavaScript -->
    <script src="js/plugins/morris/raphael.min.js"></script>
    <script src="js/plugins/morris/morris.min.js"></script>
    <script src="js/plugins/morris/morris-data.js"></script>

</body>

</html>    
    
    <!--=================menutup session========================   --> 
<?php
}
    else {
        session_start();
        session_destroy();
        header("Location: ../index.php");
    }
?>   
<!--=================menutup session========================   --> 

<!--=================memulai session========================   --> 

<!--==============memulai session=====================-->
<html>
<?php
session_start();
if(empty($_SESSION)){
header("Location: index.php");
}
if($_SESSION['level'] == 'kasir' || $_SESSION['level'] == 'admin' || $_SESSION['level'] == 'superadmin') { ?>
<!--==============memulai session=====================-->
    
    
    
    
    
    
    
<p>SELAMAT DATANG DI HALAMAN KASIR</p>
<p>Username: <?php echo $_SESSION['username']; ?><br>
Level: <?php echo $_SESSION['level']; ?></p>
  
<table cellspacing="3" cellpadding="3">
<tr>
<td><a href="superadmin.php">Halaman SuperAdmin</a></td>
<td><a href="admin.php">Halaman Admin</a></td>
<td><a href="kasir.php">Halaman Kasir</a></td>
</tr>
</table>
    
<table cellspacing="3" cellpadding="3">
   </tr>
    <tr>
    <td><a href="cucian/index.php">Cucian</a></td>
    <td><a href="pelanggan/index.php">Pelanggan</a></td>
    <td><a href="transaksi/index.php">Transaksi</a></td>
    <td><a href="user/index.php">User</a></td>
    </tr>
</table>
    
<p><a href="logout.php" class="btn btn-primary" onclick="return confirm('Yakin ingin Logout?')">Log out</a></p>  

    
    
    
    
    
<!--=================menutup session========================   --> 
<?php
}
    else {
        session_start();
        session_destroy();
        header("Location: index.php");
    }
?>   
</html>
<!--=================menutup session========================   --> 
<!--=================menutup session========================   -->

<!--=================memulai session========================   -->
<?php
$host = "localhost"; //nama host
$user = "root"; //username phpMyAdmin
$pass = ""; //password phpMyAdmin
$name = "laundry"; //nama database

$koneksi = mysql_connect($host, $user, $pass) or die("Koneksi ke database gagal!");
mysql_select_db($name, $koneksi) or die("Tidak ada database yang dipilih!");
?>
<!--=================menutup session========================   -->

<!--=================memulai session========================   -->
<div class="row">
                    <div class="col-lg-3 col-md-6">
                        <div class="panel panel-primary">
                            <div class="panel-heading">
                                <div class="row">
                                    <div class="col-xs-3">
                                        <i class="fa fa-comments fa-5x"></i>
                                    </div>
                                    <div class="col-xs-9 text-right">
                                        <div class="huge">Cucian</div>
                                    </div>
                                </div>
                            </div>
                            <a href="cucian/index.php">
                                <div class="panel-footer">
                                    <span class="pull-left">View Details</span>
                                    <span class="pull-right"><i class="fa fa-arrow-circle-right"></i></span>
                                    <div class="clearfix"></div>
                                </div>
                            </a>
                        </div>
                    </div>
                    <div class="col-lg-4 col-md-4">
                        <div class="panel panel-green">
                            <div class="panel-heading">
                                <div class="row">
                                    <div class="col-xs-3">
                                        <i class="fa fa-tasks fa-5x"></i>
                                    </div>
                                    <div class="col-xs-9 text-right">
                                        <div class="huge">Pelanggan</div>
                                       
                                    </div>
                                </div>
                            </div>
                            <a href="pelanggan/index.php">
                                <div class="panel-footer">
                                    <span class="pull-left">View Details</span>
                                    <span class="pull-right"><i class="fa fa-arrow-circle-right"></i></span>
                                    <div class="clearfix"></div>
                                </div>
                            </a>
                        </div>
                    </div>
                    <div class="col-lg-3 col-md-6">
                        <div class="panel panel-yellow">
                            <div class="panel-heading">
                                <div class="row">
                                    <div class="col-xs-3">
                                        <i class="fa fa-shopping-cart fa-5x"></i>
                                    </div>
                                    <div class="col-xs-9 text-right">
                                        <div class="huge">Transaksi</div>
                                    </div>
                                </div>
                            </div>
                            <a href="transaksi/index.php">
                                <div class="panel-footer">
                                    <span class="pull-left">View Details</span>
                                    <span class="pull-right"><i class="fa fa-arrow-circle-right"></i></span>
                                    <div class="clearfix"></div>
                                </div>
                            </a>
                        </div>
                    </div>
                    <div class="col-lg-3 col-md-6">
                        <div class="panel panel-red">
                            <div class="panel-heading">
                                <div class="row">
                                    <div class="col-xs-3">
                                        <i class="fa fa-support fa-5x"></i>
                                    </div>
                                    <div class="col-xs-9 text-right">
                                        <div class="huge">User</div>
                                        <div></div>
                                    </div>
                                </div>
                            </div>
                            <a href="user/index.php">
                                <div class="panel-footer">
                                    <span class="pull-left">View Details</span>
                                    <span class="pull-right"><i class="fa fa-arrow-circle-right"></i></span>
                                    <div class="clearfix"></div>
                                </div>
                            </a>
                        </div>
                    </div>
                </div>
                <!-- /.row -->
  <!--=================menutup session========================   -->

<!--=================memulai session========================   -->


<?php
if(isset($_POST['login'])){
include("koneksi.php");
$username = $_POST['username'];
$password = md5($_POST['password']);
                    $query = mysql_query("SELECT * FROM tb_user WHERE username='$username' AND password='$password'") or die(mysql_error());
if(mysql_num_rows($query) == 0){
echo 'Login gagal';
}else{
$row = mysql_fetch_assoc($query);
 
if($row['level'] == admin){
                            session_start();
$_SESSION['username']=$username;
$_SESSION['level']='admin';
header("Location: index.php");
}else if($row['level'] == kasir){
                            session_start();
$_SESSION['username']=$username;
$_SESSION['level']='kasir';
header("Location: index.php");
}else if($row['level'] == superadmin){
session_start();
$_SESSION['username']=$username;
$_SESSION['level']='superadmin';
header("location: index.php");
}else{
                            session_unset();
echo 'Login Gagal';
}
}
}
?>



<!DOCTYPE html>
<html>
<head>
<title>Halaman LOGIN</title>
<link href="bootstrap/css/bootstrap.min.css" rel="stylesheet">

    <!-- Custom CSS -->
   
    
    <!-- Custom Fonts -->
    <link href="font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">
</head>
<body>
<h2>Halaman Login</h2>
<form action="login.php" method="post">
<table cellpadding="3" cellspacing="0">
            <tr>
<td>Username</td>
<td>:</td>
<td><input type="text" class="form-control" name="username" size="30" required></td>
</tr>
            <tr>
<td>Password</td>
<td>:</td>
<td><input type="password" class="form-control" name="password" size="30" required></td>
</tr>
<tr>
<td>&nbsp;</td>
<td></td>
<td><input type="submit" class="btn btn-info" name="login" value="Login"></td>
</tr>
</table>
</form>
<script src="bootstrap/js/jquery.js"></script>

    <!-- Bootstrap Core JavaScript -->
    <script src="bootstrap/js/bootstrap.min.js"></script>

    <!-- Morris Charts JavaScript -->
    <script src="js/plugins/morris/raphael.min.js"></script>
    </body>
    
</html>
<!--=================menutup session========================   -->

<!--=================memulai session========================   -->
<?php
session_start();
session_destroy();
session_unset(); 
header("Location: index.php");
?>
<!--=================menutup session========================   -->

<!--=================memulai session========================   -->
            <div class="collapse navbar-collapse navbar-ex1-collapse">
                <ul class="nav navbar-nav side-nav">
                    <li>
                        <a href="index.php">&nbsp;Dashboard</a>
                    </li>
                    <li>
                        <a href="cucian/index.php">&nbsp;Cucian</a>
                    </li>
                    <li>
                        <a href="pelanggan/index.php">&nbsp;Pelanggan</a>
                    </li>
                    <li>
                        <a href="transaksi/index.php">&nbsp;transaksi</a>
                    </li>
                    <li>
                        <a href="user/index.php">&nbsp;User</a>
                    </li>
                    <li>
                        <a href="logout.php">&nbsp;logout</a>
                    </li>


                </ul>
            </div>
        </nav>

              <!--=================menutup session========================   -->

<!--=================memulai session========================   -->

<!--==============memulai session=====================-->
<html>
<?php
session_start();
if(empty($_SESSION)){
header("Location: index.php");
}
if($_SESSION['level'] == 'superadmin') { ?>
<!--==============memulai session=====================-->
    
    
    
    
    
    
    
<p>SELAMAT DATANG DI HALAMAN SUPER ADMIN</p>
<p>Username: <?php echo $_SESSION['username']; ?><br>
Level: <?php echo $_SESSION['level']; ?></p>

<table cellspacing="3" cellpadding="3">
<tr>
<td><a href="admin.php">Halaman Admin</a></td>
<td><a href="kasir.php">Halaman Kasir</a></td>
</tr>
</table>
    
<table cellspacing="3" cellpadding="3">
   </tr>
    <tr>
    <td><a href="cucian/index.php">Cucian</a></td>
    <td><a href="pelanggan/index.php">Pelanggan</a></td>
    <td><a href="transaksi/index.php">Transaksi</a></td>
    <td><a href="user/index.php">User</a></td>
    </tr>
</table>
    
<p><a href="user/logout.php" class="btn btn-primary" onclick="return confirm('Yakin ingin Logout?')">Log out</a></p>  

    
    
    
    
    
<!--=================menutup session========================   --> 
<?php
}
    else {
        session_start();
        session_destroy();
        header("Location: index.php");
    }
?>   
</html>
<!--=================menutup session========================   --> 
<!--=================menutup session========================   -->

<!--=================memulai session========================   -->
<!DOCTYPE html>
<html>
<head>
<title>Tambah Cucian</title>

<link href="../bootstrap/css/bootstrap.min.css" rel="stylesheet">

    <!-- Custom CSS -->
    
    
    <!-- Custom Fonts -->
    <link href="../font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">

</head>
<body>
<h2>Tambah Cucian</h2>
<p><a href="index.php">Beranda</a> / <a href="tambah.php">Tambah Data</a></p>
<h3>Tambah Cucian</h3>
<form action="tambah-proses.php" method="post">
<table cellpadding="3" cellspacing="0">
<tr>
<td>Jenis Cucian</td>
<td>:</td>
<td><input type="text" class="form-control" name="jCucian" size="30" required></td>
</tr>
            <tr>
<td>Harga Member</td>
<td>:</td>
<td><input type="text" name="hMember" class="form-control" size="30" required></td>
</tr>
            <tr>
<td>Harga Non Member</td>
<td>:</td>
<td><input type="text" name="hNonMember" class="form-control" size="30" required></td>
</tr>
<tr>
<td>&nbsp;</td>
<td></td>
<td><input type="submit" class="btn btn-primary" name="tambah" value="Tambah"></td>
</tr>
</table>
</form>
</body>
  <script src="bootstrap/js/jquery.js"></script>

    <!-- Bootstrap Core JavaScript -->
    <script src="bootstrap/js/bootstrap.min.js"></script>

    <!-- Morris Charts JavaScript -->
   

</html>
<!--=================menutup session========================   -->

<!--=================memulai session========================   -->
<!DOCTYPE html>
<html>
<head>
<title>Pelanggan</title>
</head>
<body>
<h2>PELANGGAN</h2>
<p><a href="index.php">Beranda</a> / <a href="tambah.php">Tambah Data</a></p>
<h3>Tambah Pelanggan</h3>
<form action="tambah-proses.php" method="post">
<table cellpadding="3" cellspacing="0">
<tr>
<td>Nama</td>
<td>:</td>
<td><input type="text" name="nama" size="30" required></td>
</tr>
            <tr>
<td>Alamat</td>
<td>:</td>
<td><input type="text" name="alamat" size="30" required></td>
</tr>
            <tr>
<td>No Hp</td>
<td>:</td>
<td><input type="text" name="no_hp" size="30" required></td>
</tr>
<tr>
<td>Status</td>
<td>:</td>
<td>
<select name="status" required>
<option value="member">Member</option>
<option value="nonmember">Non Member</option>
</select>
</td>
</tr>
<tr>
<td>&nbsp;</td>
<td></td>
<td><input type="submit" name="tambah" value="Tambah"></td>
</tr>
</table>
</form>
</body>
</html>
<!--=================menutup session========================   -->

<!--=================memulai session========================   -->
<!DOCTYPE html>
<html>
<head>
<title>Transaksi</title>
<link href="../bootstrap/css/bootstrap.min.css" rel="stylesheet">

    <!-- Custom CSS -->
    
    
    <!-- Custom Fonts -->
    <link href="../font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">

</head>
<body>
<div class="container">
<h2>TRANSAKSI</h2>
<p><a href="index.php">Beranda</a> / <a href="tambah.php">TRANSAKSI</a></p>
<h3>TRANSAKSI</h3>
<form action="tambah-proses.php" method="post">
<table cellpadding="3" cellspacing="0">
<tr>
<td>Kategori Cucian</td>
<td>:</td>
<td><?php 
include '../koneksi.php';

$result = mysql_query("select * from tb_jenis_cucian");  $jsArray = "var Hargamember = new Array();\n"; ?>
<select class="form-control" name="nama" onChange="changeValue(this.value)">
<?php  
echo "<option>--Pilih--</option>";
while ($row = mysql_fetch_array($result)) {
    //echo '<option value="' . $row['kode'] . '">' . $row['kode'] . '</option>';
echo "<option value='".$row['id']."'>".$row['jenis_cucian']."</option>";
    $jsArray .= "Hargamember['" . $row['id'] . "'] = {satu:'" . addslashes($row['tb_jenis_cucian']) . "'};\n";
}
?>
</select>
</td>
</tr>
            <tr>
<td>Alamat</td>
<td>:</td>
<td><input type="text" class="form-control" name="alamat" size="30" required></td>
</tr>
            <tr>
<td>No Hp</td>
<td>:</td>
<td><input type="text" class="form-control" name="no_hp" size="30" required></td>
</tr>
<tr>
<td>Status</td>
<td>:</td>
<td>
<select class="form-control" name="status" required>
<option value="member">Member</option>
<option value="nonmember">Non Member</option>
</select>
</td>
</tr>
<tr>
<td>&nbsp;</td>
<td></td>
<td><input type="submit" class="btn btn-primary" name="tambah" value="Tambah"></td>
</tr>
</table>
</div>
</form>
</body>
</html>
<!--=================menutup session========================   -->

<!--=================memulai session========================   -->
<!DOCTYPE html>
<html>
<head>
<title>Halaman User</title>
</head>
<body>
<h2>Halaman User</h2>
<p><a href="index.php">Beranda</a> / <a href="tambah.php">Tambah Data</a></p>
<h3>Tambah User</h3>
<form action="tambah-proses.php" method="post">
<table cellpadding="3" cellspacing="0">
<tr>
<td>Nama</td>
<td>:</td>
<td><input type="text" name="nama" size="30" required></td>
</tr>
            <tr>
<td>Username</td>
<td>:</td>
<td><input type="text" name="username" size="30" required></td>
</tr>
            <tr>
<td>Password</td>
<td>:</td>
<td><input type="password" name="password" size="30" required></td>
</tr>
<tr>
<td>Status</td>
<td>:</td>
<td>
<select name="status" required>
<option value="superadmin">Super Admin</option>
<option value="admin">Admin</option>
<option value="kasir">Kasir</option>
</select>
</td>
</tr>
<tr>
<td>&nbsp;</td>
<td></td>
<td><input type="submit" name="tambah" value="Tambah"></td>
</tr>
</table>
</form>
</body>
</html>
<!--=================menutup session========================   -->

<!--=================memulai session========================   -->
<?php
if(isset($_POST['tambah'])){
include('../koneksi.php');
$JCucian = $_POST['jCucian'];
$member = $_POST['hMember'];
$nonmember = $_POST['hNonMember'];
$input = mysql_query("INSERT INTO tb_jenis_cucian VALUES(NULL, '$JCucian', '$member', '$nonmember')") or die(mysql_error());
if($input){
echo 'Data berhasil di tambahkan! ';
echo '<a href="index.php">Kembali</a>';
}else{
echo 'Gagal menambahkan data! ';
echo '<a href="tambah.php">Kembali</a>';
}

}else{
echo '<script>window.history.back()</script>';
}
?>
<!--=================menutup session========================   -->


<!--=================memulai session========================   -->
<?php
if(isset($_POST['tambah'])){
include('../koneksi.php');
$nama = $_POST['nama'];
$alamat = $_POST['alamat'];
$nohp     = $_POST['no_hp'];
$status     = $_POST['status'];
$input = mysql_query("INSERT INTO tb_pelanggan VALUES(NULL, '$nama', '$alamat', '$nohp', '$status')") or die(mysql_error());
if($input){
echo 'Data berhasil di tambahkan! ';
echo '<a href="index.php">Kembali</a>';
}else{
echo 'Gagal menambahkan data! ';
echo '<a href="tambah.php">Kembali</a>';
}

}else{
echo '<script>window.history.back()</script>';
}
?>
<!--=================menutup session========================   -->

<!--=================memulai session========================   -->
<?php
if(isset($_POST['tambah'])){
include('../koneksi.php');
$nama = $_POST['nama'];
$alamat = $_POST['alamat'];
$nohp     = $_POST['no_hp'];
$status     = $_POST['status'];
$input = mysql_query("INSERT INTO tb_transaksi VALUES(NULL, '$nama', '$alamat', '$nohp', '$status')") or die(mysql_error());
if($input){
echo 'Data berhasil di tambahkan! ';
echo '<a href="index.php">Kembali</a>';
}else{
echo 'Gagal menambahkan data! ';
echo '<a href="tambah.php">Kembali</a>';
}

}else{
echo '<script>window.history.back()</script>';
}
?>
<!--=================menutup session========================   -->


<!--=================memulai session========================   -->
<?php
if(isset($_POST['tambah'])){
include('../koneksi.php');
$nama = $_POST['nama'];
$user = $_POST['username'];
$pass     = md5($_POST['password']);
$status     = $_POST['status'];
$input = mysql_query("INSERT INTO tb_user VALUES(NULL, '$nama', '$user', '$pass', '$status')") or die(mysql_error());
if($input){
echo 'Data berhasil di tambahkan! ';
echo '<a href="index.php">Kembali</a>';
}else{
echo 'Gagal menambahkan data! ';
echo '<a href="tambah.php">Kembali</a>';
}

}else{
echo '<script>window.history.back()</script>';
}
?>
<!--=================menutup session========================   -->

<!--=================memulai session========================   -->

<!--==============memulai session=====================-->
<html>
<?php
session_start();
if(empty($_SESSION)){
header("Location: index.php");
}
if($_SESSION['level'] == 'admin' || $_SESSION['level'] == 'superadmin') { ?>
<!--==============memulai session=====================-->
    
    
    
    
    
    
    
<p>SELAMAT DATANG DI HALAMAN ADMIN</p>
<p>Username: <?php echo $_SESSION['username']; ?><br>
Level: <?php echo $_SESSION['level']; ?></p>
    
<table cellspacing="3" cellpadding="3">
<tr>
<td><a href="superadmin.php">Halaman SuperAdmin</a></td>
<td><a href="admin.php">Halaman Admin</a></td>
<td><a href="kasir.php">Halaman Kasir</a></td>
</tr>
</table>
    
<table cellspacing="3" cellpadding="3">
   </tr>
    <tr>
    <td><a href="cucian/index.php">Cucian</a></td>
    <td><a href="pelanggan/index.php">Pelanggan</a></td>
    <td><a href="transaksi/index.php">Transaksi</a></td>
    <td><a href="user/index.php">User</a></td>
    </tr>
</table>

<p><a href="logout.php" class="btn btn-primary" onclick="return confirm('Yakin ingin Logout?')">Log out</a></p>  

    
    
    
    
    
<!--=================menutup session========================   --> 
<?php
}
    else {
        session_start();
        session_destroy();
        header("Location: index.php");
    }
?>   
</html>
<!--=================menutup session========================   --> 

<!--=================menutup session========================   -->




BAB III
PENUTUP

3.1  Kesimpulan
    Kesimpulannya adalah setelah membuat aplikasi ini diharapkan dapat mempermudah dan memperhemat waktu parakonsumen sehingga pemesanan lebih efektif. Ata transaksi lebih mudah dijalankan. Dan juga bisa memberi jalan untuk para pengusaha laundry agar usahanya lebih berkembang lagi.

3.2   Saran
      Aplikasi diharapkan tidak hanya mengatur pesanan dan transaksi, tetapi terdapat data pegawai dan penggajian.



Anggota Kelompok :

Verra Restu Nurdini    A2.1400116
Heri Fauzan Ismail      A2.1600078
Sugih Permana             A2.1600133


0 Komentar untuk "Sistem Basis Data Aplikasi Laundry"

Silakan tinggalkan komentar anda. DILARANG KERAS menyimpan link blog/web pada komentar dengan tujuan backlink, Spam.

 
Copyright © 2014 Tutorial Kampus - All Rights Reserved
Template By. Catatan Info