Lanjutan Project Pemesanan Room Karaoke Part 14

<AbsoluteLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:paddingBottom="@dimen/activity_vertical_margin"
    android:paddingLeft="@dimen/activity_horizontal_margin"
    android:paddingRight="@dimen/activity_horizontal_margin"
    android:paddingTop="@dimen/activity_vertical_margin"
    android:background="@drawable/back3"
    tools:context=".Menu_utama" >

    <Button
        android:id="@+id/Button02"
        android:layout_width="105dp"
        android:layout_height="112dp"
        android:layout_marginTop="68dp"
        android:layout_x="32dp"
        android:layout_y="60dp"
        android:background="@drawable/rm" />

    <Button
        android:id="@+id/about"
        android:layout_width="105dp"
        android:layout_height="112dp"
        android:layout_marginTop="68dp"
        android:layout_x="161dp"
        android:layout_y="63dp"
        android:background="@drawable/gh" />

    <Button
        android:id="@+id/Button03"
        android:layout_width="105dp"
        android:layout_height="112dp"
        android:layout_marginTop="68dp"
        android:layout_x="27dp"
        android:layout_y="203dp"
        android:background="@drawable/rt" />

    <Button
        android:id="@+id/Button01"
        android:layout_width="102dp"
        android:layout_height="111dp"
        android:layout_marginTop="68dp"
        android:layout_x="166dp"
        android:layout_y="196dp"
        android:background="@drawable/er" />

    <TextView
        android:id="@+id/textView1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_x="67dp"
        android:layout_y="23dp"
        android:text="SELAMAT DATANG"
        android:textAppearance="?android:attr/textAppearanceMedium" />

</AbsoluteLayout>



<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:paddingBottom="@dimen/activity_vertical_margin"
    android:paddingLeft="@dimen/activity_horizontal_margin"
    android:paddingRight="@dimen/activity_horizontal_margin"
    android:paddingTop="@dimen/activity_vertical_margin"
    android:background="@drawable/back3"
    tools:context=".Small" >

    <TextView
        android:id="@+id/textView2"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentLeft="true"
        android:layout_below="@+id/textView1"
        android:layout_marginTop="36dp"
        android:text="Nama room" />

    <EditText
        android:id="@+id/editTextUkuran_Room"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignTop="@+id/textView3"
        android:layout_toRightOf="@+id/textView3"
        android:ems="10"
        android:inputType="textPersonName" >

        <requestFocus />
    </EditText>

    <TextView
        android:id="@+id/textView4"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignLeft="@+id/textView3"
        android:layout_centerVertical="true"
        android:text="Hari_Tanggal" />

    <TextView
        android:id="@+id/textView1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentLeft="true"
        android:layout_alignParentTop="true"
        android:layout_marginTop="24dp"
        android:text="No room" />

    <EditText
        android:id="@+id/editTextNama_room"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignRight="@+id/editTextUkuran_Room"
        android:layout_alignTop="@+id/textView2"
        android:ems="10"
        android:inputType="textPersonName" />

    <EditText
        android:id="@+id/editTextNo_Room"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignTop="@+id/textView1"
        android:layout_toRightOf="@+id/textView3"
        android:ems="10"
        android:inputType="textPersonName" />

    <TextView
        android:id="@+id/textView3"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_below="@+id/editTextNama_room"
        android:layout_marginTop="24dp"
        android:text="Ukuran Room" />

    <EditText
        android:id="@+id/editTextBatas_Waktu"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignLeft="@+id/editTextHari_Tanggal"
        android:layout_alignTop="@+id/textView5"
        android:layout_marginTop="16dp"
        android:ems="10"
        android:inputType="time" />

    <EditText
        android:id="@+id/editTextHari_Tanggal"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignLeft="@+id/editTextUkuran_Room"
        android:layout_alignTop="@+id/textView4"
        android:ems="10"
        android:inputType="date" />

    <TextView
        android:id="@+id/textView5"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignRight="@+id/textView2"
        android:layout_below="@+id/editTextHari_Tanggal"
        android:layout_marginTop="26dp"
        android:text="Batas Waktu" />

    <Button
        android:id="@+id/buttonPESAN"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_alignRight="@+id/editTextBatas_Waktu"
        android:layout_below="@+id/editTextBatas_Waktu"
        android:layout_marginTop="38dp"
        android:text="Pesan" />


</RelativeLayout>


<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/widget124"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:background="@drawable/back3"
    android:orientation="vertical" >

    <TextView
        android:id="@+id/textView2"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_above="@+id/buttonSimpan"
        android:layout_alignParentLeft="true"
        android:layout_marginBottom="51dp"
        android:text="Password"
        android:textAppearance="?android:attr/textAppearanceMedium" />

    <Button
        android:id="@+id/buttonSimpan"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_above="@+id/Buttonexit"
        android:layout_alignParentLeft="true"
        android:layout_marginBottom="14dp"
        android:text="SIMPAN" />

    <Button
        android:id="@+id/Buttonexit"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_alignParentBottom="true"
        android:layout_alignParentLeft="true"
        android:layout_marginBottom="46dp"
        android:text="EXIT" />

    <TextView
        android:id="@+id/textView1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentLeft="true"
        android:layout_alignParentTop="true"
        android:layout_marginTop="42dp"
        android:text="No"
        android:textAppearance="?android:attr/textAppearanceLarge" />

    <TextView
        android:id="@+id/textViewUser"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentLeft="true"
        android:layout_below="@+id/textViewAlamat"
        android:layout_marginTop="15dp"
        android:text="Ussername"
        android:textAppearance="?android:attr/textAppearanceLarge" />

    <TextView
        android:id="@+id/TextViewNama"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentLeft="true"
        android:layout_below="@+id/textView1"
        android:layout_marginTop="22dp"
        android:text="Nama"
        android:textAppearance="?android:attr/textAppearanceLarge" />

    <TextView
        android:id="@+id/textViewAlamat"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignRight="@+id/textView1"
        android:layout_below="@+id/TextViewNama"
        android:layout_marginTop="29dp"
        android:text="Alamat"
        android:textAppearance="?android:attr/textAppearanceLarge" />

    <EditText
        android:id="@+id/editTextalamt"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignBaseline="@+id/textViewAlamat"
        android:layout_alignBottom="@+id/textViewAlamat"
        android:layout_toRightOf="@+id/textViewUser"
        android:ems="10"
        android:inputType="textPersonName" />

    <EditText
        android:id="@+id/editTextuser"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignLeft="@+id/editTextalamt"
        android:layout_alignTop="@+id/textViewUser"
        android:layout_marginLeft="16dp"
        android:ems="10"
        android:inputType="textPersonName" />

    <EditText
        android:id="@+id/editTextpasword"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentRight="true"
        android:layout_alignTop="@+id/textView2"
        android:ems="10"
        android:inputType="numberPassword" />

    <TextView
        android:id="@+id/textView3"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignLeft="@+id/editTextpasword"
        android:layout_alignParentTop="true"
        android:text="DAFTA DIRI"
        android:textAppearance="?android:attr/textAppearanceLarge" />

    <EditText
        android:id="@+id/editText1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignLeft="@+id/textView3"
        android:layout_alignTop="@+id/textView1"
        android:ems="10"
        android:inputType="phone" >

        <requestFocus />
    </EditText>

    <EditText
        android:id="@+id/editTextnama"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentRight="true"
        android:layout_alignTop="@+id/TextViewNama"
        android:ems="10"
        android:inputType="textPersonName" />


</RelativeLayout>

<!DOCTYPE html>
<?php 
include 'koneksi.php';
 ?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
    <meta name="description" content="" />
    <meta name="author" content="" />
    <!--[if IE]>
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
        <![endif]-->
    <title>Karaoke.com</title>
    <!-- BOOTSTRAP CORE STYLE  -->
    <link href="assets/css/bootstrap.css" rel="stylesheet" />
    <!-- FONT AWESOME ICONS  -->
    <link href="assets/css/font-awesome.css" rel="stylesheet" />
    <!-- CUSTOM STYLE  -->
    <link href="assets/css/style.css" rel="stylesheet" />
     <!-- HTML5 Shiv and Respond.js for 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>
    <header>
        <div class="container">
            <div class="row">
                <div class="col-md-12">
                <center>
                    <strong>SELAMAT DATANG DI ROOM  </strong>Damalante@yourdomain.com
                    &nbsp;&nbsp;
                    <strong>Teknik  </strong>Informatika
                </center>
                </div>

            </div>
        </div>
    </header>
    <!-- HEADER END-->
    <div class="navbar navbar-inverse set-radius-zero">
        <div class="container">
            <div class="navbar-header">
                <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </button>
                <a class="navbar-brand" href="index.html">

                    <img src="assets/img/logo.png" />
                </a>

            </div>

            <div class="left-div">
                <div class="user-settings-wrapper">
                    <ul class="nav">

                        <li class="dropdown">
                            <a class="dropdown-toggle" data-toggle="dropdown" href="#" aria-expanded="false">
                                <span class="glyphicon glyphicon-user" style="font-size: 25px;"></span>
                            </a>
                            <div class="dropdown-menu dropdown-settings">
                                <div class="media">
                                    <a class="media-left" href="#">
                                        <img src="assets/img/64-64.jpg" alt="" class="img-rounded" />
                                    </a>
                                    <div class="media-body">
                                        <h4 class="media-heading">Jhon Deo Alex </h4>
                                        <h5>Developer & Designer</h5>

                                    </div>
                                </div>
                                <hr />
                                <h5><strong>Personal Bio : </strong></h5>
                                Anim pariatur cliche reprehen derit.
                                <hr />
                                <a href="#" class="btn btn-info btn-sm">Full Profile</a>&nbsp; <a href="login.html" class="btn btn-danger btn-sm">Logout</a>

                            </div>
                        </li>


                    </ul>
                </div>
            </div>
        </div>
    </div>
    <!-- LOGO HEADER END-->
    <section class="menu-section">
        <div class="container">
            <div class="row">
                <div class="col-md-12">
                    <div class="navbar-collapse collapse ">
                        <ul id="menu-top" class="nav navbar-nav navbar-right">
                            <li><a class="menu-top-active" href="index.php">Home</a></li>
                            <li><a href="index.php?halaman=identitas">Data-Room</a></li>
                            <li><a href="index.php?halaman=user">Data-Usser</a></li>
                             <li><a href="index.php?halaman=user">About</a></li>
                              <li><a href="index.php?halaman=user">Logout</a></li>

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

            </div>
        </div>
    </section>
    <!-- MENU SECTION END-->
    <div class="content-wrapper">
        <div class="container">
            <div class="row">
                <div class="col-md-12">
                    <h4 class="page-head-line">Dashboard</h4>

                </div>

            </div>
          <?php 
                if (isset($_GET['halaman']))
                {
                if ($_GET['halaman']=="identitas") 
                    {
                        include 'identitas.php';  
                            }
                            elseif ($_GET['halaman']=="tambahi")
                            {
                            include 'tambahi.php';
                            }
                            elseif ($_GET['halaman']=="ubahi")
                            {
                            include 'ubahi.php';
                            }
                            elseif ($_GET['halaman']=="hapusi")
                            {
                            include 'hapusi.php';
                            }
                    elseif ($_GET['halaman']=="user") 
                    {
                        include 'user.php';  
                            }
                             elseif ($_GET['halaman']=="tambahu")
                            {
                            include 'tambahu.php';
                            }
                            elseif ($_GET['halaman']=="ubahu")
                            {
                            include 'ubahu.php';
                            }
                            elseif ($_GET['halaman']=="hapusu")
                            {
                            include 'hapusu.php';
                            }
                }
                 else
                {
                    include 'home.php';
                }
                 ?>
    <!-- CONTENT-WRAPPER SECTION END-->
    <footer>
        <div class="container">
            <div class="row">
                <div class="col-md-12">
                    &copy; 2015 YourCompany | By : <a href="http://www.designbootstrap.com/" target="_blank">DesignBootstrap</a>
                </div>

            </div>
        </div>
    </footer>
    <!-- FOOTER SECTION END-->
    <!-- JAVASCRIPT AT THE BOTTOM TO REDUCE THE LOADING TIME  -->
    <!-- CORE JQUERY SCRIPTS -->
    <script src="assets/js/jquery-1.11.1.js"></script>
    <!-- BOOTSTRAP SCRIPTS  -->
    <script src="assets/js/bootstrap.js"></script>
</body>

</html>


Gambar Tampilan Web

<h2><center>SELAMAT DATANG DI DATAUSER</center></h2>
<a href="index.php?halaman=tambahu" class="btn btn-primary">Tambah</a>
<table class="table table-bordered">
<thead>
<tr>
   
<th><center>No</center></th>
<th><center>Nama</center></th>
<th><center>Alamat</center></th>
<th><center>Ussername</center></th>
<th><center>Password</center></th>
<th><center>Aksi</center></th>
</tr>
</thead>
<tbody>
<?php $No=1; ?>
<?php $ambil=$koneksi->query("SELECT * FROM user"); ?>
<?php while ($pecah = $ambil->fetch_assoc()) { ?>
<tr>
<td><?php echo $No; ?></td>
<td ><?php echo $pecah['Nama']; ?></td>
<td ><?php echo $pecah['Alamat'];?></td>
<td ><?php echo $pecah['Ussername'];?></td>
<td ><?php echo $pecah['Password'];?></td>
<td>

<center>
<a href="index.php?halaman=ubahu&nama=<?php echo $pecah['No']; ?>" class="btn btn-success" >ubah</a>
<a  href="index.php?halaman=hapusu&nama=<?php echo $pecah['No']; ?>" class="btn btn-danger">hapus</a>
</center>

</td>
</tr>
<?php $No++; ?>
<?php } ?>
</tbody>
</table>

<?php
include 'koneksi.php';
?>
<h1>Tambah User</h1>
<form method="post" enctype="multipart/form-data">
<div class="form-group">
<label>Nama</label>
<input type="text" class="form-control" name="Nama">
</div>
<div class="form-group">
<label>Alamat</label>
<input type="text" class="form-control" name="Alamat">
</div>
<div class="form-group">
<label>Ussername</label>
<input type="text" class="form-control" name="Ussername">
</div>
<div class="form-group">
<label>Password</label>
<input type="password" class="form-control" name="Password">
</div>
<button class="btn btn-primary" name="save">Simpan</button>
</form>
<?php 
if (isset($_POST['save']))
{
$koneksi->query("INSERT INTO user (Nama,Alamat,Ussername,Password) VALUES('$_POST[Nama]','$_POST[Alamat]','$_POST[Ussername]','$_POST[Password]')");
echo "<div class='alert alert-info'>Data Tersimpan</div>";
    echo "<meta http-equiv='refresh' content='1; url=index.php?halaman=user'>";
    echo "<script>alert('Data Usser Berhasil Ditambahkan');</script>";
}
 ?>





Oke sampai di sini dulu turonya yah..
SELAMAT MENCOBA...!!!!!!
SEMOGA BERMANFAAT YAH...




Komentar