perbakan server live

parents 41334c06 15d7b3f9
......@@ -19,7 +19,7 @@
$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) {
echo "<script>alert('Data buku $judul berhasil disimpan'); window.location = 'processbook.php'</script>";
......
......@@ -27,8 +27,13 @@
<div class="container">
<div class="agile_top_brands_grids">
<?php
<<<<<<< HEAD
$sql = mysqli_query($koneksi, "SELECT * FROM t_buku ORDER BY isbn ASC LIMIT 24");
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="hover14 column">
......@@ -45,10 +50,17 @@
<div class="snipcart-item block" >
<div class="snipcart-thumb">
<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['pengarang']; ?></h4></center>
<center><h4><?php echo $data['tahun']; ?></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>
</div>
<div class="snipcart-details top_brand_home_details">
......
<?php
require_once("koneksi.php");
$id=$_GET['id'];
<<<<<<< HEAD
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>";
?>
\ No newline at end of file
<?php
require_once("koneksi.php");
$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>";
?>
\ No newline at end of file
<?php
require_once("koneksi.php");
$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>";
?>
\ No newline at end of file
......@@ -20,9 +20,9 @@
<div class="login-form-grids">
<h5>Data Buku</h5>
<?php
$id_buku = mysqli_real_escape_string($koneksi, $_GET['id']);
$cari = mysqli_query($koneksi, "SELECT * FROM t_buku WHERE isbn='$id_buku'")or die(mysqli_error());
while($data = mysqli_fetch_array($cari)) {
$id_buku = mysql_real_escape_string($_GET['id']);
$cari = mysql_query("SELECT * FROM t_buku WHERE isbn='$id_buku'")or die(mysql_error());
while($data = mysql_fetch_array($cari)) {
?>
<form action="editbook_process.php" method="POST" enctype="multipart/form-data">
<input type="hidden" name="id" placeholder="ISBN" value="<?php echo $data['isbn'] ?>" >
......@@ -43,7 +43,7 @@
<b><br>Keterangan Buku :</b>
<input type="text" name="keterangan" placeholder="Keterangan Buku" value="<?php echo $data['keterangan'] ?>" >
<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">
</form>
<?php
......
......@@ -18,7 +18,7 @@
$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) {
echo "<script>alert('Data buku $judul berhasil disimpan');window.location = 'processbook.php'</script>";
}
......
......@@ -20,9 +20,9 @@
<div class="login-form-grids">
<h5>Informasi Data Diri</h5>
<?php
$id_nama = mysqli_real_escape_string($koneksi, $_GET['id']);
$cari = mysqli_query($koneksi, "SELECT * FROM t_user WHERE id_user='$id_nama'")or die(mysqli_error());
while($data = mysqli_fetch_array($cari)) {
$id_nama = mysql_real_escape_string($_GET['id']);
$cari = mysql_query("SELECT * FROM t_user WHERE id_user='$id_nama'")or die(mysql_error());
while($data = mysql_fetch_array($cari)) {
?>
<form action="editprofile_process.php" method="POST">
<input type="hidden" name="id" placeholder="ID User" value="<?php echo $data['id_user'] ?>" >
......
......@@ -9,7 +9,7 @@ include 'koneksi.php';
$nomor_ponsel = $_POST['nomor_ponsel'];
$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) {
echo "sukses";
}
......
......@@ -104,10 +104,16 @@
<?php
if(isset($_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 = mysql_query("SELECT * FROM t_buku, t_artikel WHERE nama LIKE '$cari'");
}
?>
>>>>>>> 15d7b3f97b8965f794ae3976192fb53968efb9c6
<div class="w3l_search">
<form action="#" method="post">
<input type="search" name="Search" placeholder="Cari Buku" required="">
......@@ -117,7 +123,10 @@
<div class="clearfix"></div>
</form>
</div>
<<<<<<< HEAD
-->
=======
>>>>>>> 15d7b3f97b8965f794ae3976192fb53968efb9c6
<div class="clearfix"> </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 @@
</div>
<div class="agile_top_brands_grids">
<?php
<<<<<<< HEAD
$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)){
=======
$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="hover14 column">
......@@ -86,8 +91,13 @@
</div>
<div class="agile_top_brands_grids">
<?php
<<<<<<< HEAD
$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)){
=======
$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="hover14 column">
......@@ -134,8 +144,13 @@
<h3>Rilis Terbaru</h3>
<div class="agile_top_brands_grids">
<?php
<<<<<<< HEAD
$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)){
=======
$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="hover14 column">
......
......@@ -6,5 +6,9 @@
die("Database connection 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 !!");
>>>>>>> 15d7b3f97b8965f794ae3976192fb53968efb9c6
?>
\ No newline at end of file
......@@ -16,7 +16,11 @@
<!-- Page -->
<?php
$per_hal = 5;
<<<<<<< HEAD
$jumlah_record = mysqli_query($koneksi, "SELECT * FROM t_artikel");
=======
$jumlah_record = mysql_query("SELECT COUNT(*) FROM t_artikel");
>>>>>>> 15d7b3f97b8965f794ae3976192fb53968efb9c6
$no = 1;
$jum = mysqli_num_rows($jumlah_record);
$halaman = ceil($jum / $per_hal);
......@@ -50,8 +54,13 @@
</tr>
</thead>
<?php
<<<<<<< HEAD
$tampil = mysqli_query($koneksi, "SELECT * FROM t_artikel LIMIT $start, $per_hal");
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">
<td class="invert"><?php echo $no++; ?></td>
......
......@@ -16,7 +16,11 @@
<!-- Page -->
<?php
$per_hal = 5;
<<<<<<< HEAD
$jumlah_record = mysqli_query($koneksi, "SELECT * FROM t_buku");
=======
$jumlah_record = mysql_query("SELECT COUNT(*) FROM t_buku");
>>>>>>> 15d7b3f97b8965f794ae3976192fb53968efb9c6
$no = 1;
$jum = mysqli_num_rows($jumlah_record);
$halaman = ceil($jum / $per_hal);
......@@ -34,8 +38,13 @@
<td>Total Dana</td>
<td>:<b>
<?php
<<<<<<< HEAD
$modal = mysqli_query($koneksi, "SELECT SUM(harga) AS total FROM t_buku");
$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']).",-";
?>
</b></td>
......@@ -64,8 +73,13 @@
</tr>
</thead>
<?php
<<<<<<< HEAD
$tampil = mysqli_query($koneksi, "SELECT * FROM t_buku LIMIT $start, $per_hal");
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">
<td class="invert"><?php echo $no++; ?></td>
......
......@@ -17,8 +17,8 @@
<div class="container">
<div class="agileinfo_single">
<?php
$query = mysqli_query($koneksi, "SELECT * FROM t_buku, t_kategori, t_penerbit WHERE isbn = '$_GET[kd]'");
$data = mysqli_fetch_array($query);
$query = mysql_query("SELECT * FROM t_buku, t_kategori, t_penerbit WHERE isbn = '$_GET[kd]'");
$data = mysql_fetch_array($query);
?>
<div class="col-md-2 agileinfo_single_left">
<img src="<?php echo $data['gambar']; ?>" class="img-responsive" />
......
......@@ -18,8 +18,8 @@
<div class="agileinfo_single">
<?php
$username = $_SESSION['username'];
$query = mysqli_query($koneksi, "SELECT * FROM t_user, t_penerbit WHERE username = '$username'");
$data = mysqli_fetch_array($query);
$query = mysql_query("SELECT * FROM t_user, t_penerbit WHERE username = '$username'");
$data = mysql_fetch_array($query);
?>
<div class="col-md-5 agileinfo_single_right">
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