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
fd127b97
Commit
fd127b97
authored
May 23, 2017
by
Franciskus Partogu Hamonangan Napitupulu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pagination
parent
8c99ade3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
43 additions
and
3 deletions
+43
-3
allarticle.php
allarticle.php
+20
-0
allbook.php
allbook.php
+23
-3
No files found.
allarticle.php
View file @
fd127b97
...
...
@@ -2,6 +2,15 @@
require_once
(
"koneksi.php"
);
include
'header.php'
;
global
$sql
;
$per_hal
=
5
;
$jumlah_record
=
mysqli_query
(
$koneksi
,
"SELECT * FROM t_artikel"
);
$no
=
1
;
$jum
=
mysqli_num_rows
(
$jumlah_record
);
$halaman
=
ceil
(
$jum
/
$per_hal
);
$page
=
(
isset
(
$_GET
[
'page'
]))
?
(
int
)
$_GET
[
'page'
]
:
1
;
$start
=
(
$page
-
1
)
*
$per_hal
;
$sql
=
mysqli_query
(
$koneksi
,
"SELECT * FROM t_artikel ORDER BY tanggal_dibuat DESC limit 8"
);
?>
<!-- breadcrumbs -->
...
...
@@ -71,6 +80,17 @@
<?php
}
?>
<nav
class=
"numbering"
>
<div
class=
"pagination paging"
>
<?php
for
(
$page
=
1
;
$page
<=
$halaman
;
$page
++
){
?>
<li><a
href=
"?page=
<?php
echo
$page
?>
"
>
<?php
echo
$page
?>
</a></li>
<?php
}
?>
</div>
</nav>
<div
class=
"clearfix"
>
</div>
</div>
...
...
allbook.php
View file @
fd127b97
...
...
@@ -2,7 +2,16 @@
require_once
(
"koneksi.php"
);
include
'header.php'
;
global
$sql
;
$sql
=
mysqli_query
(
$koneksi
,
"SELECT * FROM t_buku ORDER BY isbn ASC LIMIT 24"
);
$per_hal
=
12
;
$jumlah_record
=
mysqli_query
(
$koneksi
,
"SELECT * FROM t_buku"
);
$no
=
1
;
$jum
=
mysqli_num_rows
(
$jumlah_record
);
$halaman
=
ceil
(
$jum
/
$per_hal
);
$page
=
(
isset
(
$_GET
[
'page'
]))
?
(
int
)
$_GET
[
'page'
]
:
1
;
$start
=
(
$page
-
1
)
*
$per_hal
;
$sql
=
mysqli_query
(
$koneksi
,
"SELECT * FROM t_buku ORDER BY isbn ASC LIMIT
$start
,
$per_hal
"
);
?>
<!-- breadcrumbs -->
<div
class=
"breadcrumbs"
>
...
...
@@ -68,7 +77,7 @@
</a>
</div>
<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'
];
?>
"
/
>
<input
type=
"submit"
name=
"simpan"
value=
"Tambah"
class=
"button"
/>
</div>
</div>
...
...
@@ -79,8 +88,19 @@
<br>
</div>
<?php
}
}
?>
<nav
class=
"numbering"
>
<div
class=
"pagination paging"
>
<?php
for
(
$page
=
1
;
$page
<=
$halaman
;
$page
++
){
?>
<li><a
href=
"?page=
<?php
echo
$page
?>
"
>
<?php
echo
$page
?>
</a></li>
<?php
}
?>
</div>
</nav>
<div
class=
"clearfix"
>
</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