perbaikan

parent f930030d
......@@ -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 = mysqli_query($koneksi,"INSERT INTO t_buku VALUES('$isbn', '$judul', '$pengarang', '$penerbit', '$kategori', '$tahun', '$harga', '$jumlah', '$profil', '$keterangan', '$username')") or die(mysqli_error());
if($tambah) {
echo "<script>alert('Data buku $judul berhasil disimpan'); window.location = 'processbook.php'</script>";
......
......@@ -63,12 +63,10 @@
<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']; ?>" /></a>
<center>
<h5><?php echo $data['judul']; ?></h5>
<h5><?php echo $data['pengarang']; ?></h5>
<h5><?php echo $data['tahun']; ?></h5>
<h5>Rp.<?php echo number_format($data['harga'],2,",",".");?></h5>
</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>
</div>
<div class="snipcart-details top_brand_home_details">
<a href="function.php?act=add&amp;barang_id=<?php echo $data['isbn']; ?>&amp;ref=checkout.php?kd=<?php echo $data['isbn'];?>">
......
......@@ -32,7 +32,8 @@
<tr>
<th>No. Pesanan</th>
<th>ISBN</th>
<th>Judul Buku</th>
<th>Judul Buku</th>
<th>Gambar</th>
<th>Harga</th>
<th>Jumlah</th>
<th>Sub-Total</th>
......@@ -54,6 +55,7 @@
<td class="invert"><?php echo $no++; ?></td>
<td class="invert"><?php echo $data['isbn']; ?></td>
<td class="invert"><?php echo $data['judul']; ?></td>
<td class="invert-image"><?php echo $data['gambar']; ?></td>
<td class="invert"><?php echo $data['harga']; ?></td>
<td class="invert"><?php echo number_format($val); ?></td>
<td class="invert">Rp.<?php echo number_format($jumlah_harga); ?>,00</td>
......@@ -80,7 +82,7 @@
<?php
if($total != 0 && isset($_SESSION['pengunjung'])){
echo '
<tr style="background-color:#dbase_delete_record(dbase_identifier, record_number);"><td colspan="3" align="right"><b>Total :</b></td><td align="right"><b>Rp. '.number_format($total,2,",",".").'</b></tr></table>
<tr style="background-color:#dbase_delete_record(dbase_identifier, record_number);"><td colspan="4" align="right"><b>Total :</b></td><td align="right"><b>Rp. '.number_format($total,2,",",".").'</b></tr></table>
<p><div align="right">
<div class="checkout-right-basket">
<a href="allbook.php"><span class="glyphicon glyphicon-menu-left" aria-hidden="true"></span>Lanjut Berbelanja</a>
......@@ -104,7 +106,7 @@
}
else {
echo '
<tr><td colspan="7" align="center" style="background-color:#ffffff">
<tr><td colspan="8" align="center" style="background-color:#ffffff">
Ups, Keranjang belanja kosong ! </td></tr></table>
<div class="checkout-right-basket">
<a href="allbook.php"><span class="glyphicon glyphicon-menu-left" aria-hidden="true"></span>Lanjut Berbelanja</a>
......
......@@ -11,7 +11,6 @@ p{
}
h1,h2,h3,h4,h5,h6,a{
font-family: 'Raleway', sans-serif;
background: #ffffff;
margin:0;
font-weight:700;
}
......
......@@ -20,18 +20,18 @@
<div class="login-form-grids">
<h5>Data Artikel</h5>
<?php
$id_article = mysqli_real_escape_string($koneksi, $_GET['id']);
$id_article = mysqli_real_escape_string($_GET['id']);
$cari = mysqli_query($koneksi, "SELECT * FROM t_artikel WHERE id_artikel='$id_article'")or die(mysqli_error());
while($data = mysqli_fetch_array($cari)){
?>
<form action="editarticle_process.php" method="POST" enctype="multipart/form-data">
<input type="hidden" name="id" placeholder="id_artikel" value="<?php echo $data['id_artikel'] ?>" >
<b>Judul Artikel : </b>
<b>Judul Artikel :</b>
<input type="text" name="judul_artikel" placeholder="Judul Artikel" value="<?php echo $data['judul_artikel'] ?>" >
<b><br>Isi Artikel : <br></b>
<b><br>Isi Artikel : <br></b>
<textarea name="isi_artikel" placeholder="<?php echo $data['isi_artikel'] ?>" value="<?php echo $data['isi_artikel'] ?>"></textarea>
<b><br>Gambar : <br></b>
<input type="file" name="gambar_artikel" accept="img/*" value="<?php echo $data['gambar_artikel'] ?>" >
<input type="file" name="gambar_artikel" value=" ">
<input type="submit" name="edit" value="edit">
</form>
<?php
......
......@@ -20,7 +20,7 @@
<div class="login-form-grids">
<h5>Data Buku</h5>
<?php
$id_buku = mysqli_real_escape_string($koneksi, $_GET['id']);
$id_buku = mysqli_real_escape_string($_GET['id']);
$cari = mysqli_query($koneksi, "SELECT * FROM t_buku WHERE isbn='$id_buku'")or die(mysqli_error());
while($data = mysqli_fetch_array($cari)) {
?>
......@@ -28,22 +28,22 @@
<input type="hidden" name="id" placeholder="ISBN" value="<?php echo $data['isbn'] ?>" >
<b>Judul Buku : </b>
<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'] ?>" >
<b><br>Nama Penerbit :</b>
<b><br>Nama Penerbit :</b>
<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'] ?>" >
<b><br>Tahun Terbit :</b>
<input type="text" name="tahun" placeholder="Tahun Terbit" value="<?php echo $data['tahun'] ?>" >
<b><br>Harga per Eksemplar :</b>
<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'] ?>" >
<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'] ?>" >
<b><br>Gambar : <br><br></b>
<input type="file" name="gambar" accept="img/*" required>
<input type="submit" name="edit" value="edit">
</form>
<?php
......
......@@ -20,7 +20,7 @@
<div class="login-form-grids">
<h5>Informasi Data Diri</h5>
<?php
$id_nama = mysqli_real_escape_string($koneksi, $_GET['id']);
$id_nama = mysqli_real_escape_string($_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)) {
?>
......
......@@ -103,11 +103,10 @@
</div>
<?php
if(isset($_GET['cari'])){
$cari = mysql_real_escape_string($_GET['cari']);
$cari = mysqli_real_escape_string($_GET['cari']);
$query = mysqli_query($koneksi, "SELECT * FROM t_buku, t_artikel WHERE nama LIKE '$cari'");
}
?>
<!--
<div class="w3l_search">
<form action="#" method="post">
<input type="search" name="Search" placeholder="Cari Buku" required="">
......@@ -117,7 +116,6 @@
<div class="clearfix"></div>
</form>
</div>
-->
<div class="clearfix"> </div>
</div>
</div>
......
images/Asal Usul Sejarah Biola.jpg

9.28 KB | W: | H:

images/Asal Usul Sejarah Biola.jpg

5.05 KB | W: | H:

images/Asal Usul Sejarah Biola.jpg
images/Asal Usul Sejarah Biola.jpg
images/Asal Usul Sejarah Biola.jpg
images/Asal Usul Sejarah Biola.jpg
  • 2-up
  • Swipe
  • Onion skin
images/Khasiat Bawang Bombay.jpg

16.7 KB | W: | H:

images/Khasiat Bawang Bombay.jpg

5.65 KB | W: | H:

images/Khasiat Bawang Bombay.jpg
images/Khasiat Bawang Bombay.jpg
images/Khasiat Bawang Bombay.jpg
images/Khasiat Bawang Bombay.jpg
  • 2-up
  • Swipe
  • Onion skin
<?php
global $koneksi;
//$koneksi = mysqli_connect("localhost", "root", "");
$koneksi = mysqli_connect("localhost", "p1d3ti07", "p1d3ti07");
$koneksi = mysqli_connect("localhost", "root", "");
//$koneksi = mysqli_connect("localhost", "p1d3ti07", "p1d3ti07");
if (!$koneksi) {
die("Database connection problem");
}
//$db_use = mysqli_select_db($koneksi, "toko_buku_cemerlang") or die("Select database problem !!");
$db_use = mysqli_select_db($koneksi, "p1d3ti07_d3ti07") or die("Select database problem !!");
$db_use = mysqli_select_db($koneksi, "toko_buku_cemerlang") or die("Select database problem !!");
//$db_use = mysqli_select_db($koneksi, "p1d3ti07_d3ti07") or die("Select database problem !!");
?>
\ No newline at end of file
copy.src.files=false
copy.src.on.open=false
copy.src.target=C:\\xampp\\htdocs\\PhpProject1
index.file=index.php
run.as=LOCAL
url=http://localhost/psw2/Proyek/Cemerlang/
<?xml version="1.0" encoding="UTF-8"?>
<project-private xmlns="http://www.netbeans.org/ns/project-private/1">
<editor-bookmarks xmlns="http://www.netbeans.org/ns/editor-bookmarks/2" lastBookmarkId="0"/>
<open-files xmlns="http://www.netbeans.org/ns/projectui-open-files/2">
<group>
<file>file:/C:/xampp/htdocs/psw2/Proyek/Cemerlang/registered.php</file>
</group>
</open-files>
</project-private>
include.path=${php.global.include.path}
php.version=PHP_5
source.encoding=UTF-8
src.dir=.
tags.asp=false
tags.short=false
web.root=.
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://www.netbeans.org/ns/project/1">
<type>org.netbeans.modules.php.project</type>
<configuration>
<data xmlns="http://www.netbeans.org/ns/php-project/1">
<name>Cemerlang</name>
</data>
</configuration>
</project>
......@@ -32,7 +32,7 @@
<div class="agile_top_brands_grids">
<?php
$sql = mysqli_query($koneksi, "SELECT * FROM t_buku WHERE keterangan = 2 ORDER BY isbn DESC limit 12");
while($data = mysqli_fetch_array($sql)) {
while($data = mysqli_fetch_array($sql)){
?>
<div class="col-md-3 top_brand_left">
<div class="hover14 column">
......
......@@ -34,7 +34,7 @@
<td>Total Dana</td>
<td>:<b>
<?php
$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);
echo " Rp.". number_format($data['total']).",-";
?>
......
......@@ -16,7 +16,7 @@
<!-- Page -->
<?php
$per_hal = 5;
$jumlah_record = mysqli_query($koneksi, "SELECT * FROM t_pemesanan");
$jumlah_record = mysqli_query("SELECT * FROM t_pemesanan");
$no = 1;
$jum = mysqli_num_rows($jumlah_record);
$halaman = ceil($jum / $per_hal);
......@@ -34,7 +34,7 @@
<td>Total Harga</td>
<td>:<b>
<?php
$modal = mysqli_query($koneksi, "SELECT SUM(total_harga) AS total FROM t_pemesanan");
$modal = mysqli_query("SELECT SUM (total_harga) AS total FROM t_pemesanan");
$data = mysqli_fetch_array($modal);
echo " Rp.". number_format($data['total']).",-";
?>
......@@ -60,7 +60,7 @@
</tr>
</thead>
<?php
$tampil = mysqli_query($koneksi, "SELECT * FROM t_pemesanan LIMIT $start, $per_hal");
$tampil = mysqli_query("SELECT * FROM t_pemesanan LIMIT $start, $per_hal");
while($data = mysqli_fetch_array($tampil)) {
?>
<tr class="rem1">
......
......@@ -64,12 +64,10 @@
<div class="snipcart-thumb">
<a href="singlebook.php?kd=<?php echo $data['isbn'];?>"><img class="col-md-12" src="<?php echo $data['gambar']; ?>" /></a>
<br>
<center>
<h5><?php echo $data['judul']; ?></h5>
<h5><?php echo $data['pengarang']; ?></h5>
<h5><?php echo $data['tahun']; ?></h5>
<h5>Rp.<?php echo number_format($data['harga'],2,",",".");?></h5>
</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>
</div>
<div class="snipcart-details top_brand_home_details">
<a href="function.php?act=add&amp;barang_id=<?php echo $data['isbn']; ?>&amp;ref=checkout.php?kd=<?php echo $data['isbn'];?>">
......
......@@ -33,15 +33,6 @@
<?php
}
?>
<?php
if (isset($_SESSION['items'])) {
foreach ($_SESSION['items'] as $key => $val) {
$query = mysqli_query($koneksi, "INSERT INTO t_pemesanan WHERE isbn = '$key'");
$data = mysqli_fetch_array($query);
?>
</div>
<div class="clearfix"> </div>
</div>
......
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