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
1d14fa65
Commit
1d14fa65
authored
May 26, 2017
by
Franciskus Partogu Hamonangan Napitupulu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
perbaikan
parent
416043ba
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
50 additions
and
22 deletions
+50
-22
addbook.php
addbook.php
+19
-4
checkout.php
checkout.php
+1
-1
editbook.php
editbook.php
+21
-6
editbook_process.php
editbook_process.php
+0
-1
processbook.php
processbook.php
+2
-8
singlebook.php
singlebook.php
+7
-2
No files found.
addbook.php
View file @
1d14fa65
...
@@ -23,8 +23,17 @@
...
@@ -23,8 +23,17 @@
<input
type=
"text"
name=
"isbn"
placeholder=
"ISBN"
required=
" "
><br>
<input
type=
"text"
name=
"isbn"
placeholder=
"ISBN"
required=
" "
><br>
<input
type=
"text"
name=
"judul"
placeholder=
"Judul Buku"
required=
" "
><br>
<input
type=
"text"
name=
"judul"
placeholder=
"Judul Buku"
required=
" "
><br>
<input
type=
"text"
name=
"pengarang"
placeholder=
"Nama Pengarang"
required=
" "
><br>
<input
type=
"text"
name=
"pengarang"
placeholder=
"Nama Pengarang"
required=
" "
><br>
<input
type=
"text"
name=
"penerbit"
placeholder=
"Nama Penerbit"
required=
" "
><br>
<select
class=
"form-control"
name=
"penerbit"
required=
"Pilih Penerbit"
>
<select
class=
"form-control"
name=
"kategori"
>
<?php
$penerbit
=
mysqli_query
(
$koneksi
,
"SELECT * FROM t_penerbit ORDER BY id_penerbit"
);
while
(
$pilih
=
mysqli_fetch_array
(
$penerbit
))
{
?>
<option
value=
"
<?=
$pilih
[
'id_penerbit'
];
?>
"
><i
class=
"fa fa-arrow-right"
aria-hidden=
"true"
></i>
<?php
echo
$pilih
[
'nama_penerbit'
];
?>
</option>
<?php
}
?>
</select><br>
<select
class=
"form-control"
name=
"kategori"
required=
"Pilih Kategori"
>
<?php
<?php
$kategori
=
mysqli_query
(
$koneksi
,
"SELECT * FROM t_kategori ORDER BY id_kategori"
);
$kategori
=
mysqli_query
(
$koneksi
,
"SELECT * FROM t_kategori ORDER BY id_kategori"
);
while
(
$pilih
=
mysqli_fetch_array
(
$kategori
))
{
while
(
$pilih
=
mysqli_fetch_array
(
$kategori
))
{
...
@@ -37,9 +46,15 @@
...
@@ -37,9 +46,15 @@
<input
type=
"text"
name=
"tahun"
placeholder=
"Tahun Terbit"
required=
" "
><br>
<input
type=
"text"
name=
"tahun"
placeholder=
"Tahun Terbit"
required=
" "
><br>
<input
type=
"text"
name=
"harga"
placeholder=
"Harga per Eksemplar"
required=
" "
><br>
<input
type=
"text"
name=
"harga"
placeholder=
"Harga per Eksemplar"
required=
" "
><br>
<input
type=
"text"
name=
"jumlah"
placeholder=
"Jumlah Tersedia"
required=
" "
><br>
<input
type=
"text"
name=
"jumlah"
placeholder=
"Jumlah Tersedia"
required=
" "
><br>
<input
type=
"text"
name=
"keterangan"
placeholder=
"Keterangan Buku"
required=
" "
><br>
<select
class=
"form-control"
name=
"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>
<option
value=
"4"
><i
class=
"fa fa-arrow-right"
aria-hidden=
"true"
></i>
Rilis Terbaru
</option>
</select><br>
Pilih File Gambar :
<br><br>
Pilih File Gambar :
<br><br>
<input
type=
"file"
name=
"gambar"
accept=
"img/*"
required=
"
"
>
<input
type=
"file"
name=
"gambar"
accept=
"img/*"
required=
"
Pilih file gambar
"
>
<input
type=
"submit"
name=
"tambah"
value=
"tambah"
>
<input
type=
"submit"
name=
"tambah"
value=
"tambah"
>
</form>
</form>
</div>
</div>
...
...
checkout.php
View file @
1d14fa65
...
@@ -80,7 +80,7 @@
...
@@ -80,7 +80,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="
4
" 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="
5
" 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>
...
...
editbook.php
View file @
1d14fa65
...
@@ -31,18 +31,27 @@
...
@@ -31,18 +31,27 @@
<b><br>
Nama Pengarang :
</b>
<b><br>
Nama Pengarang :
</b>
<input
type=
"text"
name=
"pengarang"
placeholder=
"Nama Pengarang"
value=
"
<?php
echo
$data
[
'pengarang'
]
?>
"
required
/>
<input
type=
"text"
name=
"pengarang"
placeholder=
"Nama Pengarang"
value=
"
<?php
echo
$data
[
'pengarang'
]
?>
"
required
/>
<b><br>
Nama Penerbit :
</b>
<b><br>
Nama Penerbit :
</b>
<input
type=
"text"
name=
"penerbit"
placeholder=
"Nama Penerbit"
value=
"
<?php
echo
$data
[
'nama_penerbit'
]
?>
"
required
/>
<select
class=
"form-control"
name=
"penerbit"
>
<?php
$penerbit
=
mysqli_query
(
$koneksi
,
"SELECT * FROM t_penerbit ORDER BY id_penerbit"
);
while
(
$pilih
=
mysqli_fetch_array
(
$penerbit
))
{
?>
<option
value=
"
<?=
$pilih
[
'id_penerbit'
];
?>
"
><i
class=
"fa fa-arrow-right"
aria-hidden=
"true"
></i>
<?php
echo
$pilih
[
'nama_penerbit'
];
?>
</option>
<?php
}
?>
</select><br>
<b><br>
Kategori Buku :
</b>
<b><br>
Kategori Buku :
</b>
<select
class=
"form-control"
name=
"kategori"
>
<select
class=
"form-control"
name=
"kategori"
>
<?php
<?php
$kategori
=
mysqli_query
(
$koneksi
,
"SELECT * FROM t_kategori ORDER BY id_kategori"
);
$kategori
=
mysqli_query
(
$koneksi
,
"SELECT * FROM t_kategori ORDER BY id_kategori"
);
while
(
$
data
=
mysqli_fetch_array
(
$kategori
))
{
while
(
$
pilih
=
mysqli_fetch_array
(
$kategori
))
{
?>
?>
<option
value=
"
<?=
$
data
[
'id_kategori'
];
?>
"
><a
href=
"categories.php?kd="
><i
class=
"fa fa-arrow-right"
aria-hidden=
"true"
></i>
<?php
echo
$data
[
'nama_kategori'
];
?>
</option>
<option
value=
"
<?=
$
pilih
[
'id_kategori'
];
?>
"
><i
class=
"fa fa-arrow-right"
aria-hidden=
"true"
></i>
<?php
echo
$pilih
[
'nama_kategori'
];
?>
</option>
<?php
<?php
}
}
?>
?>
</select>
</select>
<br>
<b><br>
Tahun Terbit :
</b>
<b><br>
Tahun Terbit :
</b>
<input
type=
"text"
name=
"tahun"
placeholder=
"Tahun Terbit"
value=
"
<?php
echo
$data
[
'tahun'
];
?>
"
required
/>
<input
type=
"text"
name=
"tahun"
placeholder=
"Tahun Terbit"
value=
"
<?php
echo
$data
[
'tahun'
];
?>
"
required
/>
<b><br>
Harga per Eksemplar :
</b>
<b><br>
Harga per Eksemplar :
</b>
...
@@ -50,14 +59,20 @@
...
@@ -50,14 +59,20 @@
<b><br>
Jumlah Tersedia :
</b>
<b><br>
Jumlah Tersedia :
</b>
<input
type=
"text"
name=
"jumlah"
placeholder=
"Jumlah Tersedia"
value=
"
<?php
echo
$data
[
'jumlah'
]
?>
"
required
/>
<input
type=
"text"
name=
"jumlah"
placeholder=
"Jumlah Tersedia"
value=
"
<?php
echo
$data
[
'jumlah'
]
?>
"
required
/>
<b><br>
Keterangan Buku :
</b>
<b><br>
Keterangan Buku :
</b>
<input
type=
"text"
name=
"keterangan"
placeholder=
"Keterangan Buku"
value=
"
<?php
echo
$data
[
'keterangan'
]
?>
"
required
/>
<select
class=
"form-control"
name=
"keterangan"
>
<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>
<option
value=
"4"
><i
class=
"fa fa-arrow-right"
aria-hidden=
"true"
></i>
Rilis Terbaru
</option>
</select><br>
<b><br>
File Gambar :
<br></b>
<b><br>
File Gambar :
<br></b>
<div
class=
"col-md-5 agileinfo_single"
>
<div
class=
"col-md-5 agileinfo_single"
>
<img
src=
"
<?php
echo
$data
[
'gambar'
];
?>
"
class=
"img-responsive"
required
/>
<img
src=
"
<?php
echo
$data
[
'gambar'
];
?>
"
class=
"img-responsive"
required
/>
</div><br>
</div><br>
<input
type=
"file"
name=
"gambar"
accept=
"img/*"
value=
"
<?php
echo
$data
[
'gambar'
];
?>
"
required
/>
<input
type=
"file"
name=
"gambar"
accept=
"img/*"
value=
"
<?php
echo
$data
[
'gambar'
];
?>
"
required
/>
<input
type=
"submit"
name=
"edit"
value=
"edit"
>
<input
type=
"submit"
name=
"edit"
value=
"edit"
>
</form>
</form>
</div>
</div>
<div
class=
"register-home"
>
<div
class=
"register-home"
>
<a
href=
"processbook.php"
>
BATAL
</a>
<a
href=
"processbook.php"
>
BATAL
</a>
...
...
editbook_process.php
View file @
1d14fa65
...
@@ -12,7 +12,6 @@
...
@@ -12,7 +12,6 @@
$harga
=
$_POST
[
'harga'
];
$harga
=
$_POST
[
'harga'
];
$jumlah
=
$_POST
[
'jumlah'
];
$jumlah
=
$_POST
[
'jumlah'
];
$keterangan
=
$_POST
[
'keterangan'
];
$keterangan
=
$_POST
[
'keterangan'
];
$gambar
=
$_POST
[
'gambar'
];
if
(
$_FILES
[
'gambar'
][
'name'
])
{
if
(
$_FILES
[
'gambar'
][
'name'
])
{
move_uploaded_file
(
$_FILES
[
'gambar'
][
'tmp_name'
],
'images/'
.
$judul
.
'.jpg'
);
move_uploaded_file
(
$_FILES
[
'gambar'
][
'tmp_name'
],
'images/'
.
$judul
.
'.jpg'
);
...
...
processbook.php
View file @
1d14fa65
...
@@ -58,12 +58,9 @@
...
@@ -58,12 +58,9 @@
<th>
ISBN
</th>
<th>
ISBN
</th>
<th>
Judul
</th>
<th>
Judul
</th>
<th>
Pengarang
</th>
<th>
Pengarang
</th>
<th>
Penerbit
</th>
<th>
Kategori
</th>
<th>
Tahun
</th>
<th>
Tahun
</th>
<th>
Harga
</th>
<th>
Harga
</th>
<th>
Jumlah
</th>
<th>
Jumlah
</th>
<th>
Keterangan
</th>
<th>
Pengelola
</th>
<th>
Pengelola
</th>
<th>
Opsi
</th>
<th>
Opsi
</th>
</tr>
</tr>
...
@@ -75,12 +72,9 @@
...
@@ -75,12 +72,9 @@
<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"
>
<?php
echo
$data
[
'pengarang'
];
?>
</td>
<td
class=
"invert"
>
<?php
echo
$data
[
'pengarang'
];
?>
</td>
<td
class=
"invert"
>
<?php
echo
$data
[
'penerbit'
];
?>
</td>
<td
class=
"invert"
>
<?php
echo
$data
[
'kategori'
];
?>
</td>
<td
class=
"invert"
>
<?php
echo
$data
[
'tahun'
];
?>
</td>
<td
class=
"invert"
>
<?php
echo
$data
[
'tahun'
];
?>
</td>
<td
class=
"invert"
>
Rp.
<?php
echo
number_format
(
$data
[
'harga'
],
2
,
","
,
"."
);
?>
</td>
<td
class=
"invert"
>
Rp.
<?php
echo
number_format
(
$data
[
'harga'
],
2
,
","
,
"."
);
?>
</td>
<td
class=
"invert"
>
<?php
echo
$data
[
'jumlah'
];
?>
</td>
<td
class=
"invert"
>
<?php
echo
$data
[
'jumlah'
];
?>
</td>
<td
class=
"invert"
>
<?php
echo
$data
[
'keterangan'
];
?>
</td>
<td
class=
"invert"
>
<?php
echo
$data
[
'username'
];
?>
</td>
<td
class=
"invert"
>
<?php
echo
$data
[
'username'
];
?>
</td>
<td
class=
"col-md-2"
>
<td
class=
"col-md-2"
>
<div
class=
"rem"
>
<div
class=
"rem"
>
...
@@ -104,13 +98,13 @@
...
@@ -104,13 +98,13 @@
<?php
<?php
if
(
isset
(
$_SESSION
[
'administrator'
])){
if
(
isset
(
$_SESSION
[
'administrator'
])){
echo
'
echo
'
<tr><td colspan="
10
" align="center" style="background-color:#ffffff"><b> Tambah Data Buku </b></td>
<tr><td colspan="
7
" align="center" style="background-color:#ffffff"><b> Tambah Data Buku </b></td>
<td><a href="addbook.php"><img src="images/tambah.png" /></td></tr></table>
<td><a href="addbook.php"><img src="images/tambah.png" /></td></tr></table>
'
;
'
;
}
}
else
{
else
{
echo
'
echo
'
<tr><td colspan="
11
" align="center" style="background-color:#ffffff"> Data buku kosong ! </td></tr></table>
<tr><td colspan="
8
" align="center" style="background-color:#ffffff"> Data buku kosong ! </td></tr></table>
'
;
'
;
}
}
?>
?>
...
...
singlebook.php
View file @
1d14fa65
...
@@ -59,9 +59,14 @@
...
@@ -59,9 +59,14 @@
</div>
</div>
<div
class=
"snipcart-details top_brand_home_details"
>
<div
class=
"snipcart-details top_brand_home_details"
>
<a
href=
"function.php?act=add&barang_id=
<?php
echo
$data
[
'isbn'
];
?>
&ref=checkout.php?kd=
<?php
echo
$data
[
'isbn'
];
?>
"
>
<a
href=
"function.php?act=add&barang_id=
<?php
echo
$data
[
'isbn'
];
?>
&ref=checkout.php?kd=
<?php
echo
$data
[
'isbn'
];
?>
"
>
<?php
if
(
$data
[
'jumlah'
]
>=
1
)
{
<?php
if
(
$data
[
'jumlah'
]
==
0
||
isset
(
$_SESSION
[
'administrator'
]))
{
echo
''
;
}
else
{
echo
'<input type="submit" name="simpan" value="Tambah" class="button" />'
;
echo
'<input type="submit" name="simpan" value="Tambah" class="button" />'
;
}
?>
}
?>
</a>
</a>
</div>
</div>
</div>
</div>
...
...
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