Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
PA1-1617-D3TI107
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Franciskus Partogu Hamonangan Napitupulu
PA1-1617-D3TI107
Commits
fa34101f
Commit
fa34101f
authored
May 26, 2017
by
Franciskus Partogu Hamonangan Napitupulu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
perbaikan
parent
1d14fa65
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
21 deletions
+25
-21
editbook.php
editbook.php
+21
-18
singlebook.php
singlebook.php
+4
-3
No files found.
editbook.php
View file @
fa34101f
...
...
@@ -21,17 +21,17 @@
<h5>
Data Buku
</h5>
<?php
$id_buku
=
mysqli_real_escape_string
(
$koneksi
,
$_GET
[
'id'
]);
$cari
=
mysqli_query
(
$koneksi
,
"SELECT * FROM t_buku
, t_penerbit WHERE isbn='
$id_buku
'"
)
or
die
(
mysqli
_error
());
$data
=
mysqli_fetch_array
(
$cari
);
$cari
=
mysqli_query
(
$koneksi
,
"SELECT * FROM t_buku
WHERE isbn='
$id_buku
'"
)
or
die
(
mysql
_error
());
while
(
$data
=
mysqli_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'
]
?>
"
>
<b>
Judul Buku :
</b>
<b>
Judul Buku
:
</b>
<input
type=
"text"
name=
"judul"
placeholder=
"Judul Buku"
value=
"
<?php
echo
$data
[
'judul'
]
?>
"
>
<b><br>
Nama Pengarang :
</b>
<input
type=
"text"
name=
"pengarang"
placeholder=
"Nama Pengarang"
value=
"
<?php
echo
$data
[
'pengarang'
]
?>
"
required
/
>
<b><br>
Nama Penerbit :
</b>
<select
class=
"form-control"
name=
"penerbit"
>
<b><br>
Nama Pengarang
:
</b>
<input
type=
"text"
name=
"pengarang"
placeholder=
"Nama Pengarang"
value=
"
<?php
echo
$data
[
'pengarang'
]
?>
"
>
<b><br>
Nama Penerbit
:
</b>
<select
class=
"form-control"
name=
"penerbit"
required=
"Pilih Penerbit"
value=
"
<?php
echo
$data
[
'penerbit'
]
?>
"
>
<?php
$penerbit
=
mysqli_query
(
$koneksi
,
"SELECT * FROM t_penerbit ORDER BY id_penerbit"
);
while
(
$pilih
=
mysqli_fetch_array
(
$penerbit
))
{
...
...
@@ -41,8 +41,8 @@
}
?>
</select><br>
<b><br>
Kategori Buku
:
</b>
<select
class=
"form-control"
name=
"kategori"
>
<b><br>
Kategori Buku
:
</b>
<select
class=
"form-control"
name=
"kategori"
required=
"Pilih Kategori"
value=
"
<?php
echo
$data
[
'kategori'
]
?>
"
>
<?php
$kategori
=
mysqli_query
(
$koneksi
,
"SELECT * FROM t_kategori ORDER BY id_kategori"
);
while
(
$pilih
=
mysqli_fetch_array
(
$kategori
))
{
...
...
@@ -52,14 +52,14 @@
}
?>
</select><br>
<b><br>
Tahun Terbit
:
</b>
<input
type=
"text"
name=
"tahun"
placeholder=
"Tahun Terbit"
value=
"
<?php
echo
$data
[
'tahun'
]
;
?>
"
required
/
>
<b><br>
Harga per Eksemplar
:
</b>
<input
type=
"text"
name=
"harga"
placeholder=
"Harga per Eksemplar"
value=
"
<?php
echo
$data
[
'harga'
]
?>
"
required
/
>
<b><br>
Jumlah Tersedia
:
</b>
<input
type=
"text"
name=
"jumlah"
placeholder=
"Jumlah Tersedia"
value=
"
<?php
echo
$data
[
'jumlah'
]
?>
"
required
/
>
<b><br>
Keterangan Buku :
</b>
<select
class=
"form-control"
name=
"keterangan"
>
<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>
<input
type=
"text"
name=
"jumlah"
placeholder=
"Jumlah Tersedia"
value=
"
<?php
echo
$data
[
'jumlah'
]
?>
"
>
<b><br>
Keterangan Buku
:
</b>
<select
class=
"form-control"
name=
"keterangan"
value=
"
<?php
echo
$data
[
'keterangan'
]
?>
"
required
>
<option
value=
"1"
><i
class=
"fa fa-arrow-right"
aria-hidden=
"true"
></i>
Tidak ada penawaran khusus
</option>
<option
value=
"2"
><i
class=
"fa fa-arrow-right"
aria-hidden=
"true"
></i>
Penjualan Terbaik
</option>
<option
value=
"3"
><i
class=
"fa fa-arrow-right"
aria-hidden=
"true"
></i>
Potongan Harga
</option>
...
...
@@ -70,9 +70,12 @@
<div
class=
"col-md-5 agileinfo_single"
>
<img
src=
"
<?php
echo
$data
[
'gambar'
];
?>
"
class=
"img-responsive"
required
/>
</div><br>
<input
type=
"file"
name=
"gambar"
accept=
"img/*"
value=
"
<?php
echo
$data
[
'gambar'
];
?>
"
required
/
>
<input
type=
"file"
name=
"gambar"
accept=
"img/*"
required
>
<input
type=
"submit"
name=
"edit"
value=
"edit"
>
</form>
<?php
}
?>
</div>
<div
class=
"register-home"
>
<a
href=
"processbook.php"
>
BATAL
</a>
...
...
singlebook.php
View file @
fa34101f
<?php
require_once
(
"koneksi.php"
);
include
'header.php'
;
include
'header.php'
;
global
$query
;
$query
=
mysqli_query
(
$koneksi
,
"SELECT * FROM t_buku, t_kategori, t_penerbit WHERE isbn = '
$_GET[kd]
'"
);
?>
<!-- breadcrumbs -->
...
...
@@ -26,8 +28,7 @@
<div
class=
"products"
>
<div
class=
"container"
>
<div
class=
"agileinfo_single"
>
<?php
$query
=
mysqli_query
(
$koneksi
,
"SELECT * FROM t_buku, t_kategori, t_penerbit WHERE isbn = '
$_GET[kd]
'"
);
<?php
$data
=
mysqli_fetch_array
(
$query
);
?>
<div
class=
"col-md-2 agileinfo_single_left"
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment