perbaikan yang gagal tampil di live server

parent 2886d965
...@@ -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,8 @@ ...@@ -27,8 +27,8 @@
<div class="container"> <div class="container">
<div class="agile_top_brands_grids"> <div class="agile_top_brands_grids">
<?php <?php
$sql = mysqli_query($koneksi, "SELECT * FROM t_artikel ORDER BY tanggal_dibuat DESC limit 8"); $sql = mysql_query("SELECT * FROM t_artikel ORDER BY tanggal_dibuat DESC limit 8");
while($data = mysqli_fetch_array($sql)){ while($data = mysql_fetch_array($sql)){
?> ?>
<div class="col-md-6 top_brand_left"> <div class="col-md-6 top_brand_left">
<div class="hover14 column"> <div class="hover14 column">
......
...@@ -27,8 +27,8 @@ ...@@ -27,8 +27,8 @@
<div class="container"> <div class="container">
<div class="agile_top_brands_grids"> <div class="agile_top_brands_grids">
<?php <?php
$sql = mysqli_query($koneksi, "SELECT * FROM t_buku ORDER BY isbn ASC LIMIT 24"); $sql = mysql_query("SELECT * FROM t_buku ORDER BY judul DESC LIMIT 21");
while($data = mysqli_fetch_array($sql)){ while($data = mysql_fetch_array($sql)){
?> ?>
<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 +45,10 @@ ...@@ -45,10 +45,10 @@
<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']; ?>" >
<center><h4><?php echo $data['judul']; ?></h4></center> <center><h5><?php echo $data['judul']; ?></h5></center>
<center><h4><?php echo $data['pengarang']; ?></h4></center> <center><h5><?php echo $data['pengarang']; ?></h5></center>
<center><h4><?php echo $data['tahun']; ?></h4></center> <center><h5><?php echo $data['tahun']; ?></h5></center>
<center><h4>Rp.<?php echo number_format($data['harga'],2,",",".");?></h4></center> <center><h5>Rp.<?php echo number_format($data['harga'],2,",",".");?></h5></center>
</a> </a>
</div> </div>
<div class="snipcart-details top_brand_home_details"> <div class="snipcart-details top_brand_home_details">
......
...@@ -32,7 +32,8 @@ ...@@ -32,7 +32,8 @@
<tr> <tr>
<th>No. Pesanan</th> <th>No. Pesanan</th>
<th>ISBN</th> <th>ISBN</th>
<th>Judul Buku</th> <th>Judul Buku</th>
<th>Gambar</th>
<th>Harga</th> <th>Harga</th>
<th>Jumlah</th> <th>Jumlah</th>
<th>Sub-Total</th> <th>Sub-Total</th>
...@@ -42,8 +43,8 @@ ...@@ -42,8 +43,8 @@
$total = 0; $total = 0;
if (isset($_SESSION['items'])) { if (isset($_SESSION['items'])) {
foreach ($_SESSION['items'] as $key => $val) { foreach ($_SESSION['items'] as $key => $val) {
$query = mysqli_query($koneksi, "SELECT * FROM t_buku WHERE isbn = '$key'"); $query = mysql_query("SELECT * FROM t_buku WHERE isbn = '$key'");
$data = mysqli_fetch_array($query); $data = mysql_fetch_array($query);
$jumlah_harga = $data['harga'] * $val; $jumlah_harga = $data['harga'] * $val;
$total += $jumlah_harga; $total += $jumlah_harga;
...@@ -54,6 +55,7 @@ ...@@ -54,6 +55,7 @@
<td class="invert"><?php echo $no++; ?></td> <td class="invert"><?php echo $no++; ?></td>
<td class="invert"><?php echo $data['isbn']; ?></td> <td class="invert"><?php echo $data['isbn']; ?></td>
<td class="invert"><?php echo $data['judul']; ?></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 $data['harga']; ?></td>
<td class="invert"><?php echo number_format($val); ?></td> <td class="invert"><?php echo number_format($val); ?></td>
<td class="invert">Rp.<?php echo number_format($jumlah_harga); ?>,00</td> <td class="invert">Rp.<?php echo number_format($jumlah_harga); ?>,00</td>
...@@ -80,7 +82,7 @@ ...@@ -80,7 +82,7 @@
<?php <?php
if($total != 0 && isset($_SESSION['pengunjung'])){ if($total != 0 && isset($_SESSION['pengunjung'])){
echo ' 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"> <p><div align="right">
<div class="checkout-right-basket"> <div class="checkout-right-basket">
<a href="allbook.php"><span class="glyphicon glyphicon-menu-left" aria-hidden="true"></span>Lanjut Berbelanja</a> <a href="allbook.php"><span class="glyphicon glyphicon-menu-left" aria-hidden="true"></span>Lanjut Berbelanja</a>
...@@ -104,7 +106,7 @@ ...@@ -104,7 +106,7 @@
} }
else { else {
echo ' 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> Ups, Keranjang belanja kosong ! </td></tr></table>
<div class="checkout-right-basket"> <div class="checkout-right-basket">
<a href="allbook.php"><span class="glyphicon glyphicon-menu-left" aria-hidden="true"></span>Lanjut Berbelanja</a> <a href="allbook.php"><span class="glyphicon glyphicon-menu-left" aria-hidden="true"></span>Lanjut Berbelanja</a>
......
...@@ -28,12 +28,12 @@ ...@@ -28,12 +28,12 @@
<div class="w3_agileits_contact_grids"> <div class="w3_agileits_contact_grids">
<div class="col-md-6 w3_agileits_contact_grid_right"> <div class="col-md-6 w3_agileits_contact_grid_right">
<?php <?php
$query = mysqli_query($koneksi, "SELECT * FROM t_komentar ORDER BY id_komentar DESC") or die(mysqli_error()); $query = mysql_query("SELECT * FROM t_komentar ORDER BY id_komentar DESC") or die(mysql_error());
$masukan = mysqli_num_rows($query); $masukan = mysql_num_rows($query);
echo "<h4>" . "Jumlah komentar saat ini $masukan buah." . "</h4>"; echo "<h4>" . "Jumlah komentar saat ini $masukan buah." . "</h4>";
echo "<b>" . "Berikan kritik & saran Anda agar kami <br> dapat meingkatkan pelayanan kami." . "</b>"; echo "<b>" . "Berikan kritik & saran Anda agar kami <br> dapat meingkatkan pelayanan kami." . "</b>";
echo "<hr>"; echo "<hr>";
while($row = mysqli_fetch_array($query)) while($row = mysql_fetch_array($query))
{ {
echo "<b>" . $row['nama_pengirim'] . "</b>" . " " . " | " . " " . "<i>" . echo "<b>" . $row['nama_pengirim'] . "</b>" . " " . " | " . " " . "<i>" .
$row['tanggal'] . "</i>" . "<br />" . $row['komentar'] . "<br />"; $row['tanggal'] . "</i>" . "<br />" . $row['komentar'] . "<br />";
......
...@@ -4,7 +4,7 @@ include 'koneksi.php'; ...@@ -4,7 +4,7 @@ include 'koneksi.php';
$nama_pengirim = $_POST['nama_pengirim']; $nama_pengirim = $_POST['nama_pengirim'];
$komentar = $_POST['komentar']; $komentar = $_POST['komentar'];
$query = mysqli_query($koneksi, "INSERT INTO t_komentar VALUES('', '$nama_pengirim', '$komentar', NOW())"); $query = mysql_query("INSERT INTO t_komentar VALUES('', '$nama_pengirim', '$komentar', NOW())");
if ($query) { if ($query) {
echo "<script>alert('Terimakasih $nama_pengirim telah memberikan masukannya !'); window.location = 'contact.php'</script>"; echo "<script>alert('Terimakasih $nama_pengirim telah memberikan masukannya !'); window.location = 'contact.php'</script>";
}else{ }else{
......
...@@ -11,7 +11,6 @@ p{ ...@@ -11,7 +11,6 @@ p{
} }
h1,h2,h3,h4,h5,h6,a{ h1,h2,h3,h4,h5,h6,a{
font-family: 'Raleway', sans-serif; font-family: 'Raleway', sans-serif;
background: #ffffff;
margin:0; margin:0;
font-weight:700; font-weight:700;
} }
......
<?php <?php
require_once("koneksi.php"); require_once("koneksi.php");
$id=$_GET['id']; $id=$_GET['id'];
mysqli_query($koneksi, "DELETE FROM t_artikel where id_artikel='$id'"); mysql_query("DELETE FROM t_artikel where id_artikel='$id'");
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,9 @@ ...@@ -104,10 +104,9 @@
<?php <?php
if(isset($_GET['cari'])){ if(isset($_GET['cari'])){
$cari = mysql_real_escape_string($_GET['cari']); $cari = mysql_real_escape_string($_GET['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'");
} }
?> ?>
<!--
<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 +116,6 @@ ...@@ -117,7 +116,6 @@
<div class="clearfix"></div> <div class="clearfix"></div>
</form> </form>
</div> </div>
-->
<div class="clearfix"> </div> <div class="clearfix"> </div>
</div> </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
...@@ -43,8 +43,8 @@ ...@@ -43,8 +43,8 @@
</div> </div>
<div class="agile_top_brands_grids"> <div class="agile_top_brands_grids">
<?php <?php
$sql = mysqli_query($koneksi, "SELECT * FROM t_buku WHERE keterangan = 2 AND jumlah != 0 ORDER BY jumlah ASC LIMIT 6"); $sql = mysql_query("SELECT * FROM t_buku WHERE keterangan = 2 AND jumlah != 0 ORDER BY jumlah ASC LIMIT 6");
while($data = mysqli_fetch_array($sql)){ while($data = mysql_fetch_array($sql)){
?> ?>
<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 +86,8 @@ ...@@ -86,8 +86,8 @@
</div> </div>
<div class="agile_top_brands_grids"> <div class="agile_top_brands_grids">
<?php <?php
$sql = mysqli_query($koneksi, "SELECT * FROM t_buku WHERE keterangan = 3 AND jumlah != 0 ORDER BY harga ASC LIMIT 6"); $sql = mysql_query("SELECT * FROM t_buku WHERE keterangan = 3 AND jumlah != 0 ORDER BY harga ASC LIMIT 6");
while($data = mysqli_fetch_array($sql)){ while($data = mysql_fetch_array($sql)){
?> ?>
<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 +134,8 @@ ...@@ -134,8 +134,8 @@
<h3>Rilis Terbaru</h3> <h3>Rilis Terbaru</h3>
<div class="agile_top_brands_grids"> <div class="agile_top_brands_grids">
<?php <?php
$sql = mysqli_query($koneksi, "SELECT * FROM t_buku WHERE keterangan = 4 AND jumlah != 0 ORDER BY harga ASC LIMIT 4"); $sql = mysql_query("SELECT * FROM t_buku WHERE keterangan = 4 AND jumlah != 0 ORDER BY harga ASC LIMIT 4");
while($data = mysqli_fetch_array($sql)){ while($data = mysql_fetch_array($sql)){
?> ?>
<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">
......
<?php <?php
global $koneksi; global $koneksi;
//$koneksi = mysqli_connect("localhost", "root", "");// $koneksi = mysqli_connect("localhost", "root", "");
$koneksi = mysqli_connect("localhost", "p1d3ti07", "p1d3ti07"); //$koneksi = mysqli_connect("localhost", "p1d3ti07", "p1d3ti07");
if (!$koneksi) { if (!$koneksi) {
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 !!");
$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 !!");
?> ?>
\ No newline at end of file
...@@ -6,8 +6,8 @@ ...@@ -6,8 +6,8 @@
$password = $_POST['password']; $password = $_POST['password'];
$_SESSION['username'] = $username; $_SESSION['username'] = $username;
$query = mysqli_query($koneksi, "SELECT * FROM t_user where username='$username' AND password='$password'"); $query = mysql_query("SELECT * FROM t_user where username='$username' AND password='$password'");
$masuk = mysqli_fetch_array($query); $masuk = mysql_fetch_array($query);
if ($masuk == FALSE) { if ($masuk == FALSE) {
$_SESSION['error'] == TRUE; $_SESSION['error'] == TRUE;
......
...@@ -31,8 +31,8 @@ ...@@ -31,8 +31,8 @@
</div> </div>
<div class="agile_top_brands_grids"> <div class="agile_top_brands_grids">
<?php <?php
$sql = mysqli_query($koneksi, "SELECT * FROM t_buku WHERE keterangan = 2 ORDER BY isbn DESC limit 12"); $sql = mysql_query("SELECT * FROM t_buku WHERE keterangan = 2 ORDER BY isbn DESC limit 12");
while($data = mysqli_fetch_array($sql)) { while($data = mysql_fetch_array($sql)){
?> ?>
<div class="col-md-3 top_brand_left"> <div class="col-md-3 top_brand_left">
<div class="hover14 column"> <div class="hover14 column">
...@@ -78,8 +78,8 @@ ...@@ -78,8 +78,8 @@
</div> </div>
<div class="agile_top_brands_grids"> <div class="agile_top_brands_grids">
<?php <?php
$sql = mysqli_query($koneksi, "SELECT * FROM t_buku WHERE keterangan = 3 ORDER BY isbn DESC limit 12"); $sql = mysql_query("SELECT * FROM t_buku WHERE keterangan = 3 ORDER BY isbn DESC limit 12");
while($data = mysqli_fetch_array($sql)){ while($data = mysql_fetch_array($sql)){
?> ?>
<div class="col-md-3 top_brand_left"> <div class="col-md-3 top_brand_left">
<div class="hover14 column"> <div class="hover14 column">
...@@ -123,8 +123,8 @@ ...@@ -123,8 +123,8 @@
<h3>Potongan Harga</h3> <h3>Potongan Harga</h3>
<div class="agile_top_brands_grids"> <div class="agile_top_brands_grids">
<?php <?php
$sql = mysqli_query($koneksi, "SELECT * FROM t_buku WHERE keterangan = 4 ORDER BY isbn DESC limit 4"); $sql = mysql_query("SELECT * FROM t_buku WHERE keterangan = 4 ORDER BY isbn DESC limit 4");
while($data = mysqli_fetch_array($sql)){ while($data = mysql_fetch_array($sql)){
?> ?>
<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">
......
...@@ -16,9 +16,9 @@ ...@@ -16,9 +16,9 @@
<!-- Page --> <!-- Page -->
<?php <?php
$per_hal = 5; $per_hal = 5;
$jumlah_record = mysqli_query($koneksi, "SELECT * FROM t_artikel"); $jumlah_record = mysql_query("SELECT COUNT(*) FROM t_artikel");
$no = 1; $no = 1;
$jum = mysqli_num_rows($jumlah_record); $jum = mysql_result($jumlah_record, 0);
$halaman = ceil($jum / $per_hal); $halaman = ceil($jum / $per_hal);
$page = (isset($_GET['page'])) ? (int)$_GET['page'] : 1; $page = (isset($_GET['page'])) ? (int)$_GET['page'] : 1;
$start = ($page - 1) * $per_hal; $start = ($page - 1) * $per_hal;
...@@ -50,8 +50,8 @@ ...@@ -50,8 +50,8 @@
</tr> </tr>
</thead> </thead>
<?php <?php
$tampil = mysqli_query($koneksi, "SELECT * FROM t_artikel LIMIT $start, $per_hal"); $tampil = mysql_query("SELECT * FROM t_artikel LIMIT $start, $per_hal");
while($data = mysqli_fetch_array($tampil)) { while($data = mysql_fetch_array($tampil)) {
?> ?>
<tr class="rem1"> <tr class="rem1">
<td class="invert"><?php echo $no++; ?></td> <td class="invert"><?php echo $no++; ?></td>
......
...@@ -16,9 +16,9 @@ ...@@ -16,9 +16,9 @@
<!-- Page --> <!-- Page -->
<?php <?php
$per_hal = 5; $per_hal = 5;
$jumlah_record = mysqli_query($koneksi, "SELECT * FROM t_buku"); $jumlah_record = mysql_query("SELECT COUNT(*) FROM t_buku");
$no = 1; $no = 1;
$jum = mysqli_num_rows($jumlah_record); $jum = mysql_result($jumlah_record, 0);
$halaman = ceil($jum / $per_hal); $halaman = ceil($jum / $per_hal);
$page = (isset($_GET['page'])) ? (int)$_GET['page'] : 1; $page = (isset($_GET['page'])) ? (int)$_GET['page'] : 1;
$start = ($page - 1) * $per_hal; $start = ($page - 1) * $per_hal;
...@@ -34,8 +34,8 @@ ...@@ -34,8 +34,8 @@
<td>Total Dana</td> <td>Total Dana</td>
<td>:<b> <td>:<b>
<?php <?php
$modal = mysqli_query($koneksi, "SELECT SUM(harga) AS total FROM t_buku"); $modal = mysql_query("SELECT SUM(harga) AS total FROM t_buku");
$data = mysqli_fetch_array($modal); $data = mysql_fetch_array($modal);
echo " Rp.". number_format($data['total']).",-"; echo " Rp.". number_format($data['total']).",-";
?> ?>
</b></td> </b></td>
...@@ -64,8 +64,8 @@ ...@@ -64,8 +64,8 @@
</tr> </tr>
</thead> </thead>
<?php <?php
$tampil = mysqli_query($koneksi, "SELECT * FROM t_buku LIMIT $start, $per_hal"); $tampil = mysql_query("SELECT * FROM t_buku LIMIT $start, $per_hal");
while($data = mysqli_fetch_array($tampil)) { while($data = mysql_fetch_array($tampil)) {
?> ?>
<tr class="rem1"> <tr class="rem1">
<td class="invert"><?php echo $no++; ?></td> <td class="invert"><?php echo $no++; ?></td>
......
...@@ -16,10 +16,10 @@ ...@@ -16,10 +16,10 @@
} }
else { else {
if($password == $re_password) { if($password == $re_password) {
$query = mysqli_query($koneksi, "SELECT * FROM t_user WHERE username='$username'"); $query = mysql_query("SELECT * FROM t_user WHERE username='$username'");
$daftar = mysqli_num_rows($query); $daftar = mysql_num_rows($query);
if($daftar == NULL){ if($daftar == NULL){
mysqli_query($koneksi, "INSERT INTO t_user VALUES('', '$role', '$username', '$password', '$nama_lengkap', '$email', '$alamat', '$nomor_ponsel')"); mysql_query("INSERT INTO t_user VALUES('', '$role', '$username', '$password', '$nama_lengkap', '$email', '$alamat', '$nomor_ponsel')");
echo "<script>alert('Daftar Berhasil $username, Silahkan masuk'); window.location = 'login.php';</script>"; echo "<script>alert('Daftar Berhasil $username, Silahkan masuk'); window.location = 'login.php';</script>";
} }
else{ else{
......
...@@ -15,8 +15,8 @@ ...@@ -15,8 +15,8 @@
$total = 0; $total = 0;
if (isset($_SESSION['items'])) { if (isset($_SESSION['items'])) {
foreach ($_SESSION['items'] as $key => $val) { foreach ($_SESSION['items'] as $key => $val) {
$query = mysqli_query($koneksi, "SELECT * FROM t_buku WHERE isbn = '$key'"); $query = mysql_query("SELECT * FROM t_buku WHERE isbn = '$key'");
$data = mysqli_fetch_array($query); $data = mysql_fetch_array($query);
$jumlah_harga = $data['harga'] * $val; $jumlah_harga = $data['harga'] * $val;
$total += $jumlah_harga; $total += $jumlah_harga;
......
...@@ -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_artikel WHERE id_artikel = '$_GET[kd]'"); $query = mysql_query("SELECT * FROM t_artikel WHERE id_artikel = '$_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_artikel']; ?>" class="img-responsive" /> <img src="<?php echo $data['gambar_artikel']; ?>" class="img-responsive" />
......
...@@ -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