perbakan server live

parents 41334c06 15d7b3f9
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
$profil = 'images/'.$judul.'.jpg'; $profil = 'images/'.$judul.'.jpg';
} }
$tambah = mysqli_query($koneksi, "INSERT INTO t_buku VALUES('$isbn', '$judul', '$pengarang', '$penerbit', '$kategori', '$tahun', '$harga', '$jumlah', '$profil', '$keterangan', '$username')") or die(mysqli_error()); $tambah = mysql_query("INSERT INTO t_buku VALUES('$isbn', '$judul', '$pengarang', '$penerbit', '$kategori', '$tahun', '$harga', '$jumlah', '$profil', '$keterangan', '$username')") or die(mysql_error());
if($tambah) { if($tambah) {
echo "<script>alert('Data buku $judul berhasil disimpan'); window.location = 'processbook.php'</script>"; echo "<script>alert('Data buku $judul berhasil disimpan'); window.location = 'processbook.php'</script>";
......
...@@ -27,8 +27,13 @@ ...@@ -27,8 +27,13 @@
<div class="container"> <div class="container">
<div class="agile_top_brands_grids"> <div class="agile_top_brands_grids">
<?php <?php
<<<<<<< HEAD
$sql = mysqli_query($koneksi, "SELECT * FROM t_buku ORDER BY isbn ASC LIMIT 24"); $sql = mysqli_query($koneksi, "SELECT * FROM t_buku ORDER BY isbn ASC LIMIT 24");
while($data = mysqli_fetch_array($sql)){ while($data = mysqli_fetch_array($sql)){
=======
$sql = mysql_query("SELECT * FROM t_buku ORDER BY judul DESC LIMIT 21");
while($data = mysql_fetch_array($sql)){
>>>>>>> 15d7b3f97b8965f794ae3976192fb53968efb9c6
?> ?>
<div class="col-md-3 top_brand_left"> <div class="col-md-3 top_brand_left">
<div class="hover14 column"> <div class="hover14 column">
...@@ -45,10 +50,17 @@ ...@@ -45,10 +50,17 @@
<div class="snipcart-item block" > <div class="snipcart-item block" >
<div class="snipcart-thumb"> <div class="snipcart-thumb">
<a href="singlebook.php?kd=<?php echo $data['isbn'];?>"><img class="col-md-12" src="<?php echo $data['gambar']; ?>" > <a href="singlebook.php?kd=<?php echo $data['isbn'];?>"><img class="col-md-12" src="<?php echo $data['gambar']; ?>" >
<<<<<<< HEAD
<center><h4><?php echo $data['judul']; ?></h4></center> <center><h4><?php echo $data['judul']; ?></h4></center>
<center><h4><?php echo $data['pengarang']; ?></h4></center> <center><h4><?php echo $data['pengarang']; ?></h4></center>
<center><h4><?php echo $data['tahun']; ?></h4></center> <center><h4><?php echo $data['tahun']; ?></h4></center>
<center><h4>Rp.<?php echo number_format($data['harga'],2,",",".");?></h4></center> <center><h4>Rp.<?php echo number_format($data['harga'],2,",",".");?></h4></center>
=======
<center><h5><?php echo $data['judul']; ?></h5></center>
<center><h5><?php echo $data['pengarang']; ?></h5></center>
<center><h5><?php echo $data['tahun']; ?></h5></center>
<center><h5>Rp.<?php echo number_format($data['harga'],2,",",".");?></h5></center>
>>>>>>> 15d7b3f97b8965f794ae3976192fb53968efb9c6
</a> </a>
</div> </div>
<div class="snipcart-details top_brand_home_details"> <div class="snipcart-details top_brand_home_details">
......
<?php <?php
require_once("koneksi.php"); require_once("koneksi.php");
$id=$_GET['id']; $id=$_GET['id'];
<<<<<<< HEAD
mysqli_query($koneksi, "DELETE FROM t_artikel where id_artikel='$id'"); mysqli_query($koneksi, "DELETE FROM t_artikel where id_artikel='$id'");
=======
mysql_query("DELETE FROM t_artikel where id_artikel='$id'");
>>>>>>> 15d7b3f97b8965f794ae3976192fb53968efb9c6
echo "<script>alert('Data artikel berhasil dihapus');window.location = 'processarticle.php'</script>"; echo "<script>alert('Data artikel berhasil dihapus');window.location = 'processarticle.php'</script>";
?> ?>
\ No newline at end of file
<?php <?php
require_once("koneksi.php"); require_once("koneksi.php");
$id=$_GET['id']; $id=$_GET['id'];
mysqli_query($koneksi, "DELETE FROM t_buku where isbn='$id'"); mysql_query("DELETE FROM t_buku where isbn='$id'");
echo "<script>alert('Data buku berhasil dihapus');window.location = 'processbook.php'</script>"; echo "<script>alert('Data buku berhasil dihapus');window.location = 'processbook.php'</script>";
?> ?>
\ No newline at end of file
<?php <?php
require_once("koneksi.php"); require_once("koneksi.php");
$id=$_GET['id']; $id=$_GET['id'];
mysqli_query($koneksi, "DELETE FROM t_user where id_user='$id'"); mysql_query("DELETE FROM t_user where id_user='$id'");
echo "<script>alert('Akun berhasil dihapus');window.location = 'processmember.php'</script>"; echo "<script>alert('Akun berhasil dihapus');window.location = 'processmember.php'</script>";
?> ?>
\ No newline at end of file
...@@ -20,30 +20,30 @@ ...@@ -20,30 +20,30 @@
<div class="login-form-grids"> <div class="login-form-grids">
<h5>Data Buku</h5> <h5>Data Buku</h5>
<?php <?php
$id_buku = mysqli_real_escape_string($koneksi, $_GET['id']); $id_buku = mysql_real_escape_string($_GET['id']);
$cari = mysqli_query($koneksi, "SELECT * FROM t_buku WHERE isbn='$id_buku'")or die(mysqli_error()); $cari = mysql_query("SELECT * FROM t_buku WHERE isbn='$id_buku'")or die(mysql_error());
while($data = mysqli_fetch_array($cari)) { while($data = mysql_fetch_array($cari)) {
?> ?>
<form action="editbook_process.php" method="POST" enctype="multipart/form-data"> <form action="editbook_process.php" method="POST" enctype="multipart/form-data">
<input type="hidden" name="id" placeholder="ISBN" value="<?php echo $data['isbn'] ?>" > <input type="hidden" name="id" placeholder="ISBN" value="<?php echo $data['isbn'] ?>" >
<b>Judul Buku : </b> <b>Judul Buku : </b>
<input type="text" name="judul" placeholder="Judul Buku" value="<?php echo $data['judul'] ?>" > <input type="text" name="judul" placeholder="Judul Buku" value="<?php echo $data['judul'] ?>" >
<b><br>Nama Pengarang :</b> <b><br>Nama Pengarang :</b>
<input type="text" name="pengarang" placeholder="Nama Pengarang" value="<?php echo $data['pengarang'] ?>" > <input type="text" name="pengarang" placeholder="Nama Pengarang" value="<?php echo $data['pengarang'] ?>" >
<b><br>Nama Penerbit :</b> <b><br>Nama Penerbit :</b>
<input type="text" name="penerbit" placeholder="Nama Penerbit" value="<?php echo $data['penerbit'] ?>" > <input type="text" name="penerbit" placeholder="Nama Penerbit" value="<?php echo $data['penerbit'] ?>" >
<b><br>Kategori Buku :</b> <b><br>Kategori Buku :</b>
<input type="text" name="kategori" placeholder="Kategori Buku" value="<?php echo $data['kategori'] ?>" > <input type="text" name="kategori" placeholder="Kategori Buku" value="<?php echo $data['kategori'] ?>" >
<b><br>Tahun Terbit :</b> <b><br>Tahun Terbit :</b>
<input type="text" name="tahun" placeholder="Tahun Terbit" value="<?php echo $data['tahun'] ?>" > <input type="text" name="tahun" placeholder="Tahun Terbit" value="<?php echo $data['tahun'] ?>" >
<b><br>Harga per Eksemplar :</b> <b><br>Harga per Eksemplar :</b>
<input type="text" name="harga" placeholder="Harga per Eksemplar" value="<?php echo $data['harga'] ?>" > <input type="text" name="harga" placeholder="Harga per Eksemplar" value="<?php echo $data['harga'] ?>" >
<b><br>Jumlah Tersedia :</b> <b><br>Jumlah Tersedia :</b>
<input type="text" name="jumlah" placeholder="Jumlah Tersedia" value="<?php echo $data['jumlah'] ?>" > <input type="text" name="jumlah" placeholder="Jumlah Tersedia" value="<?php echo $data['jumlah'] ?>" >
<b><br>Keterangan Buku :</b> <b><br>Keterangan Buku :</b>
<input type="text" name="keterangan" placeholder="Keterangan Buku" value="<?php echo $data['keterangan'] ?>" > <input type="text" name="keterangan" placeholder="Keterangan Buku" value="<?php echo $data['keterangan'] ?>" >
<b><br>Gambar : <br><br></b> <b><br>Gambar : <br><br></b>
<input type="file" name="gambar" accept="img/*" value="<?php echo $data['gambar'] ?>" > <input type="file" name="gambar" accept="img/*" required>
<input type="submit" name="edit" value="edit"> <input type="submit" name="edit" value="edit">
</form> </form>
<?php <?php
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
$profil = 'images/'.$judul.'.jpg'; $profil = 'images/'.$judul.'.jpg';
} }
$edit = mysqli_query($koneksi, "UPDATE t_buku SET judul='$judul', pengarang='$pengarang', penerbit='$penerbit', kategori='$kategori', tahun='$tahun', harga='$harga', jumlah='$jumlah', gambar='$profil', keterangan='$keterangan', username='$username' WHERE isbn='$id'") or die(mysqli_error()); $edit = mysql_query("UPDATE t_buku SET judul='$judul', pengarang='$pengarang', penerbit='$penerbit', kategori='$kategori', tahun='$tahun', harga='$harga', jumlah='$jumlah', gambar='$profil', keterangan='$keterangan', username='$username' WHERE isbn='$id'") or die(mysql_error());
if($edit) { if($edit) {
echo "<script>alert('Data buku $judul berhasil disimpan');window.location = 'processbook.php'</script>"; echo "<script>alert('Data buku $judul berhasil disimpan');window.location = 'processbook.php'</script>";
} }
......
...@@ -20,9 +20,9 @@ ...@@ -20,9 +20,9 @@
<div class="login-form-grids"> <div class="login-form-grids">
<h5>Informasi Data Diri</h5> <h5>Informasi Data Diri</h5>
<?php <?php
$id_nama = mysqli_real_escape_string($koneksi, $_GET['id']); $id_nama = mysql_real_escape_string($_GET['id']);
$cari = mysqli_query($koneksi, "SELECT * FROM t_user WHERE id_user='$id_nama'")or die(mysqli_error()); $cari = mysql_query("SELECT * FROM t_user WHERE id_user='$id_nama'")or die(mysql_error());
while($data = mysqli_fetch_array($cari)) { while($data = mysql_fetch_array($cari)) {
?> ?>
<form action="editprofile_process.php" method="POST"> <form action="editprofile_process.php" method="POST">
<input type="hidden" name="id" placeholder="ID User" value="<?php echo $data['id_user'] ?>" > <input type="hidden" name="id" placeholder="ID User" value="<?php echo $data['id_user'] ?>" >
......
...@@ -9,7 +9,7 @@ include 'koneksi.php'; ...@@ -9,7 +9,7 @@ include 'koneksi.php';
$nomor_ponsel = $_POST['nomor_ponsel']; $nomor_ponsel = $_POST['nomor_ponsel'];
$email = $_POST['email']; $email = $_POST['email'];
$edit = mysqli_query($koneksi, "UPDATE t_user SET nama_lengkap='$nama_lengkap', email='$email', alamat='$alamat', nomor_ponsel='$nomor_ponsel' WHERE id_user='$id'") or die(mysqli_error()); $edit = mysql_query("UPDATE t_user SET nama_lengkap='$nama_lengkap', email='$email', alamat='$alamat', nomor_ponsel='$nomor_ponsel' WHERE id_user='$id'") or die(mysql_error());
if($edit) { if($edit) {
echo "sukses"; echo "sukses";
} }
......
...@@ -104,10 +104,16 @@ ...@@ -104,10 +104,16 @@
<?php <?php
if(isset($_GET['cari'])){ if(isset($_GET['cari'])){
$cari = mysql_real_escape_string($_GET['cari']); $cari = mysql_real_escape_string($_GET['cari']);
<<<<<<< HEAD
$query = mysqli_query($koneksi, "SELECT * FROM t_buku, t_artikel WHERE nama LIKE '$cari'"); $query = mysqli_query($koneksi, "SELECT * FROM t_buku, t_artikel WHERE nama LIKE '$cari'");
} }
?> ?>
<!-- <!--
=======
$query = mysql_query("SELECT * FROM t_buku, t_artikel WHERE nama LIKE '$cari'");
}
?>
>>>>>>> 15d7b3f97b8965f794ae3976192fb53968efb9c6
<div class="w3l_search"> <div class="w3l_search">
<form action="#" method="post"> <form action="#" method="post">
<input type="search" name="Search" placeholder="Cari Buku" required=""> <input type="search" name="Search" placeholder="Cari Buku" required="">
...@@ -117,7 +123,10 @@ ...@@ -117,7 +123,10 @@
<div class="clearfix"></div> <div class="clearfix"></div>
</form> </form>
</div> </div>
<<<<<<< HEAD
--> -->
=======
>>>>>>> 15d7b3f97b8965f794ae3976192fb53968efb9c6
<div class="clearfix"> </div> <div class="clearfix"> </div>
</div> </div>
</div> </div>
......
images/tambah.png

521 Bytes | W: | H:

images/search.png

1.08 KB | W: | H:

images/tambah.png
images/search.png
images/tambah.png
images/search.png
  • 2-up
  • Swipe
  • Onion skin
...@@ -43,8 +43,13 @@ ...@@ -43,8 +43,13 @@
</div> </div>
<div class="agile_top_brands_grids"> <div class="agile_top_brands_grids">
<?php <?php
<<<<<<< HEAD
$sql = mysqli_query($koneksi, "SELECT * FROM t_buku WHERE keterangan = 2 AND jumlah != 0 ORDER BY jumlah ASC LIMIT 6"); $sql = mysqli_query($koneksi, "SELECT * FROM t_buku WHERE keterangan = 2 AND jumlah != 0 ORDER BY jumlah ASC LIMIT 6");
while($data = mysqli_fetch_array($sql)){ while($data = mysqli_fetch_array($sql)){
=======
$sql = mysql_query("SELECT * FROM t_buku WHERE keterangan = 2 AND jumlah != 0 ORDER BY jumlah ASC LIMIT 6");
while($data = mysql_fetch_array($sql)){
>>>>>>> 15d7b3f97b8965f794ae3976192fb53968efb9c6
?> ?>
<div class="col-md-4 top_brand_left"> <div class="col-md-4 top_brand_left">
<div class="hover14 column"> <div class="hover14 column">
...@@ -86,8 +91,13 @@ ...@@ -86,8 +91,13 @@
</div> </div>
<div class="agile_top_brands_grids"> <div class="agile_top_brands_grids">
<?php <?php
<<<<<<< HEAD
$sql = mysqli_query($koneksi, "SELECT * FROM t_buku WHERE keterangan = 3 AND jumlah != 0 ORDER BY harga ASC LIMIT 6"); $sql = mysqli_query($koneksi, "SELECT * FROM t_buku WHERE keterangan = 3 AND jumlah != 0 ORDER BY harga ASC LIMIT 6");
while($data = mysqli_fetch_array($sql)){ while($data = mysqli_fetch_array($sql)){
=======
$sql = mysql_query("SELECT * FROM t_buku WHERE keterangan = 3 AND jumlah != 0 ORDER BY harga ASC LIMIT 6");
while($data = mysql_fetch_array($sql)){
>>>>>>> 15d7b3f97b8965f794ae3976192fb53968efb9c6
?> ?>
<div class="col-md-4 top_brand_left"> <div class="col-md-4 top_brand_left">
<div class="hover14 column"> <div class="hover14 column">
...@@ -134,8 +144,13 @@ ...@@ -134,8 +144,13 @@
<h3>Rilis Terbaru</h3> <h3>Rilis Terbaru</h3>
<div class="agile_top_brands_grids"> <div class="agile_top_brands_grids">
<?php <?php
<<<<<<< HEAD
$sql = mysqli_query($koneksi, "SELECT * FROM t_buku WHERE keterangan = 4 AND jumlah != 0 ORDER BY harga ASC LIMIT 4"); $sql = mysqli_query($koneksi, "SELECT * FROM t_buku WHERE keterangan = 4 AND jumlah != 0 ORDER BY harga ASC LIMIT 4");
while($data = mysqli_fetch_array($sql)){ while($data = mysqli_fetch_array($sql)){
=======
$sql = mysql_query("SELECT * FROM t_buku WHERE keterangan = 4 AND jumlah != 0 ORDER BY harga ASC LIMIT 4");
while($data = mysql_fetch_array($sql)){
>>>>>>> 15d7b3f97b8965f794ae3976192fb53968efb9c6
?> ?>
<div class="col-md-3 top_brand_left-1"> <div class="col-md-3 top_brand_left-1">
<div class="hover14 column"> <div class="hover14 column">
......
...@@ -6,5 +6,9 @@ ...@@ -6,5 +6,9 @@
die("Database connection problem"); die("Database connection problem");
} }
//$db_use = mysqli_select_db($koneksi, "toko_buku_cemerlang") or die("Select database problem !!"); //$db_use = mysqli_select_db($koneksi, "toko_buku_cemerlang") or die("Select database problem !!");
<<<<<<< HEAD
$db_use = mysqli_select_db($koneksi, "p1d3ti07_d3ti07") or die("Select database problem !!"); $db_use = mysqli_select_db($koneksi, "p1d3ti07_d3ti07") or die("Select database problem !!");
=======
$db_use = mysqli_select_db($koneksi, "p1d3ti07_d3ti07") or die("Select database problem !!");
>>>>>>> 15d7b3f97b8965f794ae3976192fb53968efb9c6
?> ?>
\ No newline at end of file
...@@ -16,7 +16,11 @@ ...@@ -16,7 +16,11 @@
<!-- Page --> <!-- Page -->
<?php <?php
$per_hal = 5; $per_hal = 5;
<<<<<<< HEAD
$jumlah_record = mysqli_query($koneksi, "SELECT * FROM t_artikel"); $jumlah_record = mysqli_query($koneksi, "SELECT * FROM t_artikel");
=======
$jumlah_record = mysql_query("SELECT COUNT(*) FROM t_artikel");
>>>>>>> 15d7b3f97b8965f794ae3976192fb53968efb9c6
$no = 1; $no = 1;
$jum = mysqli_num_rows($jumlah_record); $jum = mysqli_num_rows($jumlah_record);
$halaman = ceil($jum / $per_hal); $halaman = ceil($jum / $per_hal);
...@@ -50,8 +54,13 @@ ...@@ -50,8 +54,13 @@
</tr> </tr>
</thead> </thead>
<?php <?php
<<<<<<< HEAD
$tampil = mysqli_query($koneksi, "SELECT * FROM t_artikel LIMIT $start, $per_hal"); $tampil = mysqli_query($koneksi, "SELECT * FROM t_artikel LIMIT $start, $per_hal");
while($data = mysqli_fetch_array($tampil)) { while($data = mysqli_fetch_array($tampil)) {
=======
$tampil = mysql_query("SELECT * FROM t_artikel LIMIT $start, $per_hal");
while($data = mysql_fetch_array($tampil)) {
>>>>>>> 15d7b3f97b8965f794ae3976192fb53968efb9c6
?> ?>
<tr class="rem1"> <tr class="rem1">
<td class="invert"><?php echo $no++; ?></td> <td class="invert"><?php echo $no++; ?></td>
......
...@@ -16,7 +16,11 @@ ...@@ -16,7 +16,11 @@
<!-- Page --> <!-- Page -->
<?php <?php
$per_hal = 5; $per_hal = 5;
<<<<<<< HEAD
$jumlah_record = mysqli_query($koneksi, "SELECT * FROM t_buku"); $jumlah_record = mysqli_query($koneksi, "SELECT * FROM t_buku");
=======
$jumlah_record = mysql_query("SELECT COUNT(*) FROM t_buku");
>>>>>>> 15d7b3f97b8965f794ae3976192fb53968efb9c6
$no = 1; $no = 1;
$jum = mysqli_num_rows($jumlah_record); $jum = mysqli_num_rows($jumlah_record);
$halaman = ceil($jum / $per_hal); $halaman = ceil($jum / $per_hal);
...@@ -34,8 +38,13 @@ ...@@ -34,8 +38,13 @@
<td>Total Dana</td> <td>Total Dana</td>
<td>:<b> <td>:<b>
<?php <?php
<<<<<<< HEAD
$modal = mysqli_query($koneksi, "SELECT SUM(harga) AS total FROM t_buku"); $modal = mysqli_query($koneksi, "SELECT SUM(harga) AS total FROM t_buku");
$data = mysqli_fetch_array($modal); $data = mysqli_fetch_array($modal);
=======
$modal = mysql_query("SELECT SUM(harga) AS total FROM t_buku");
$data = mysql_fetch_array($modal);
>>>>>>> 15d7b3f97b8965f794ae3976192fb53968efb9c6
echo " Rp.". number_format($data['total']).",-"; echo " Rp.". number_format($data['total']).",-";
?> ?>
</b></td> </b></td>
...@@ -64,8 +73,13 @@ ...@@ -64,8 +73,13 @@
</tr> </tr>
</thead> </thead>
<?php <?php
<<<<<<< HEAD
$tampil = mysqli_query($koneksi, "SELECT * FROM t_buku LIMIT $start, $per_hal"); $tampil = mysqli_query($koneksi, "SELECT * FROM t_buku LIMIT $start, $per_hal");
while($data = mysqli_fetch_array($tampil)) { while($data = mysqli_fetch_array($tampil)) {
=======
$tampil = mysql_query("SELECT * FROM t_buku LIMIT $start, $per_hal");
while($data = mysql_fetch_array($tampil)) {
>>>>>>> 15d7b3f97b8965f794ae3976192fb53968efb9c6
?> ?>
<tr class="rem1"> <tr class="rem1">
<td class="invert"><?php echo $no++; ?></td> <td class="invert"><?php echo $no++; ?></td>
......
...@@ -17,8 +17,8 @@ ...@@ -17,8 +17,8 @@
<div class="container"> <div class="container">
<div class="agileinfo_single"> <div class="agileinfo_single">
<?php <?php
$query = mysqli_query($koneksi, "SELECT * FROM t_buku, t_kategori, t_penerbit WHERE isbn = '$_GET[kd]'"); $query = mysql_query("SELECT * FROM t_buku, t_kategori, t_penerbit WHERE isbn = '$_GET[kd]'");
$data = mysqli_fetch_array($query); $data = mysql_fetch_array($query);
?> ?>
<div class="col-md-2 agileinfo_single_left"> <div class="col-md-2 agileinfo_single_left">
<img src="<?php echo $data['gambar']; ?>" class="img-responsive" /> <img src="<?php echo $data['gambar']; ?>" class="img-responsive" />
......
...@@ -18,8 +18,8 @@ ...@@ -18,8 +18,8 @@
<div class="agileinfo_single"> <div class="agileinfo_single">
<?php <?php
$username = $_SESSION['username']; $username = $_SESSION['username'];
$query = mysqli_query($koneksi, "SELECT * FROM t_user, t_penerbit WHERE username = '$username'"); $query = mysql_query("SELECT * FROM t_user, t_penerbit WHERE username = '$username'");
$data = mysqli_fetch_array($query); $data = mysql_fetch_array($query);
?> ?>
<div class="col-md-5 agileinfo_single_right"> <div class="col-md-5 agileinfo_single_right">
Nama Lengkap : <h3><?php echo $data['nama_lengkap']; ?></h3><br> Nama Lengkap : <h3><?php echo $data['nama_lengkap']; ?></h3><br>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment