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
cbd6b848
Commit
cbd6b848
authored
May 26, 2017
by
Franciskus Partogu Hamonangan Napitupulu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
penambahan search di beberapa halaman
parent
447a5841
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
141 additions
and
56 deletions
+141
-56
allarticle.php
allarticle.php
+1
-1
index.php
index.php
+28
-0
processarticle.php
processarticle.php
+27
-13
processbook.php
processbook.php
+29
-14
processcomment.php
processcomment.php
+28
-14
processmember.php
processmember.php
+28
-14
No files found.
allarticle.php
View file @
cbd6b848
...
...
@@ -11,7 +11,7 @@
$start
=
(
$page
-
1
)
*
$per_hal
;
global
$sql
;
$sql
=
mysqli_query
(
$koneksi
,
"SELECT * FROM t_artikel ORDER BY tanggal_dibuat
DESC limit 8
"
);
$sql
=
mysqli_query
(
$koneksi
,
"SELECT * FROM t_artikel ORDER BY tanggal_dibuat
ASC LIMIT
$start
,
$per_hal
"
);
?>
<!-- breadcrumbs -->
<div
class=
"breadcrumbs"
>
...
...
index.php
View file @
cbd6b848
<?php
require_once
(
"koneksi.php"
);
include
'header.php'
;
$sql
=
mysqli_query
(
$koneksi
,
"SELECT * FROM t_buku WHERE keterangan != 1 AND jumlah != 0 ORDER BY keterangan"
);
?>
<!-- main-slider -->
<ul
id=
"demo1"
>
...
...
@@ -25,6 +27,32 @@
</li>
</ul>
<!-- //main-slider -->
<!-- breadcrumbs -->
<div
class=
"breadcrumbs"
>
<div
class=
"container"
>
<?php
if
(
isset
(
$_POST
[
'cari'
])){
$cari
=
$_POST
[
'search'
];
$sql
=
mysqli_query
(
$koneksi
,
"SELECT * FROM t_buku WHERE judul LIKE '%
$cari
%' ORDER BY isbn"
);
}
?>
<div
class=
"w3l_search"
>
<form
action=
""
method=
"post"
>
<input
type=
"search"
name=
"search"
placeholder=
"Cari Judul Buku"
required=
""
>
<button
type=
"submit"
class=
"btn btn-default search"
aria-label=
"Left Align"
name=
"cari"
>
<i
class=
"fa fa-search"
aria-hidden=
"true"
>
</i>
</button>
<div
class=
"clearfix"
></div>
</form>
</div>
</div>
</div>
<!-- //breadcrumbs -->
<?php
if
(
$cari
){
}
?>
<!-- top-brands -->
<div
class=
"top-brands"
>
<div
class=
"container"
>
...
...
processarticle.php
View file @
cbd6b848
<?php
require_once
(
"koneksi.php"
);
include
'header.php'
;
$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
;
global
$sql
;
$sql
=
mysqli_query
(
$koneksi
,
"SELECT * FROM t_artikel LIMIT
$start
,
$per_hal
"
);
?>
<!-- breadcrumbs -->
...
...
@@ -9,21 +20,25 @@
<ol
class=
"breadcrumb breadcrumb1"
>
<li><span><i
class=
"fa fa-sign-in"
aria-hidden=
"true"
></i><a
href=
"login.php"
>
Masuk
</a></span></li>
<li
class=
"active"
>
Kelola Data Artikel
</li>
<?php
if
(
isset
(
$_POST
[
'cari'
]))
{
$cari
=
$_POST
[
'search'
];
$sql
=
mysqli_query
(
$koneksi
,
"SELECT * FROM t_artikel WHERE judul_artikel LIKE '%
$cari
%' ORDER BY tanggal_dibuat"
);
}
?>
<div
class=
"w3l_search"
>
<form
action=
""
method=
"post"
>
<input
type=
"search"
name=
"search"
placeholder=
"Cari Judul Artikel"
required=
""
>
<button
type=
"submit"
class=
"btn btn-default search"
aria-label=
"Left Align"
name=
"cari"
>
<i
class=
"fa fa-search"
aria-hidden=
"true"
>
</i>
</button>
<div
class=
"clearfix"
></div>
</form>
</div>
</ol>
</div>
</div>
<!-- //breadcrumbs -->
<!-- Page -->
<?php
$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
;
?>
<!-- //Page -->
<div
class=
"col-md-12"
>
<table
class=
"col-md-3"
>
<tr>
...
...
@@ -49,8 +64,7 @@
</tr>
</thead>
<?php
$tampil
=
mysqli_query
(
$koneksi
,
"SELECT * FROM t_artikel LIMIT
$start
,
$per_hal
"
);
while
(
$data
=
mysqli_fetch_array
(
$tampil
))
{
while
(
$data
=
mysqli_fetch_array
(
$sql
))
{
?>
<tr
class=
"rem1"
>
<td
class=
"invert"
>
<?php
echo
$data
[
'id_artikel'
];
?>
</td>
...
...
processbook.php
View file @
cbd6b848
<?php
require_once
(
"koneksi.php"
);
include
'header.php'
;
$per_hal
=
10
;
$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
;
global
$sql
;
$sql
=
mysqli_query
(
$koneksi
,
"SELECT * FROM t_buku LIMIT
$start
,
$per_hal
"
);
?>
<!-- breadcrumbs -->
...
...
@@ -9,24 +20,29 @@
<ol
class=
"breadcrumb breadcrumb1"
>
<li><span><i
class=
"fa fa-sign-in"
aria-hidden=
"true"
></i><a
href=
"login.php"
>
Masuk
</a></span></li>
<li
class=
"active"
>
Kelola Data Buku
</li>
<?php
if
(
isset
(
$_POST
[
'cari'
])){
$cari
=
$_POST
[
'search'
];
$sql
=
mysqli_query
(
$koneksi
,
"SELECT * FROM t_buku WHERE judul LIKE '%
$cari
%' ORDER BY isbn"
);
}
?>
<div
class=
"w3l_search"
>
<form
action=
""
method=
"post"
>
<input
type=
"search"
name=
"search"
placeholder=
"Cari Judul Buku"
required=
""
>
<button
type=
"submit"
class=
"btn btn-default search"
aria-label=
"Left Align"
name=
"cari"
>
<i
class=
"fa fa-search"
aria-hidden=
"true"
>
</i>
</button>
<div
class=
"clearfix"
></div>
</form>
</div>
</ol>
</div>
</div>
<!-- //breadcrumbs -->
<!-- Page -->
<?php
$per_hal
=
10
;
$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
;
?>
<!-- //Page -->
<div
class=
"col-md-12"
>
<table
class=
"col-md-3"
>
<tr>
<br>
<td>
Jumlah Data Buku
</td>
<td>
:
<b>
<?php
echo
$jum
;
?>
</b></td>
</tr>
...
...
@@ -52,9 +68,8 @@
<th>
Opsi
</th>
</tr>
</thead>
<?php
$tampil
=
mysqli_query
(
$koneksi
,
"SELECT * FROM t_buku LIMIT
$start
,
$per_hal
"
);
while
(
$data
=
mysqli_fetch_array
(
$tampil
))
{
<?php
while
(
$data
=
mysqli_fetch_array
(
$sql
))
{
?>
<tr
class=
"rem1"
>
<td
class=
"invert"
>
<?php
echo
$data
[
'isbn'
];
?>
</td>
...
...
processcomment.php
View file @
cbd6b848
<?php
require_once
(
"koneksi.php"
);
include
'header.php'
;
$per_hal
=
10
;
$jumlah_record
=
mysqli_query
(
$koneksi
,
"SELECT * FROM t_komentar"
);
$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
;
global
$sql
;
$sql
=
mysqli_query
(
$koneksi
,
"SELECT * FROM t_komentar ORDER BY tanggal DESC LIMIT
$start
,
$per_hal
"
);
?>
<!-- breadcrumbs -->
...
...
@@ -9,21 +20,25 @@
<ol
class=
"breadcrumb breadcrumb1"
>
<li><span><i
class=
"fa fa-sign-in"
aria-hidden=
"true"
></i><a
href=
"login.php"
>
Masuk
</a></span></li>
<li
class=
"active"
>
Kelola Data Saran
</li>
<?php
if
(
isset
(
$_POST
[
'cari'
])){
$cari
=
$_POST
[
'search'
];
$sql
=
mysqli_query
(
$koneksi
,
"SELECT * FROM t_komentar WHERE nama_pengirim LIKE '%
$cari
%' ORDER BY tanggal"
);
}
?>
<div
class=
"w3l_search"
>
<form
action=
""
method=
"post"
>
<input
type=
"search"
name=
"search"
placeholder=
"Cari Nama Pengirim"
required=
""
>
<button
type=
"submit"
class=
"btn btn-default search"
aria-label=
"Left Align"
name=
"cari"
>
<i
class=
"fa fa-search"
aria-hidden=
"true"
>
</i>
</button>
<div
class=
"clearfix"
></div>
</form>
</div>
</ol>
</div>
</div>
<!-- //breadcrumbs -->
<!-- Page -->
<?php
$per_hal
=
10
;
$jumlah_record
=
mysqli_query
(
$koneksi
,
"SELECT * FROM t_komentar"
);
$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
;
?>
<!-- //Page -->
<!-- //breadcrumbs -->
<div
class=
"col-md-12"
>
<table
class=
"col-md-3"
>
<tr>
...
...
@@ -48,8 +63,7 @@
</tr>
</thead>
<?php
$tampil
=
mysqli_query
(
$koneksi
,
"SELECT * FROM t_komentar LIMIT
$start
,
$per_hal
"
);
while
(
$data
=
mysqli_fetch_array
(
$tampil
))
{
while
(
$data
=
mysqli_fetch_array
(
$sql
))
{
?>
<tr
class=
"rem1"
>
<td
class=
"invert"
>
<?php
echo
$data
[
'id_komentar'
];
?>
</td>
...
...
processmember.php
View file @
cbd6b848
<?php
require_once
(
"koneksi.php"
);
include
'header.php'
;
$per_hal
=
10
;
$jumlah_record
=
mysqli_query
(
$koneksi
,
"SELECT * FROM t_user WHERE role=2"
);
$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
;
global
$sql
;
$sql
=
mysqli_query
(
$koneksi
,
"SELECT * FROM t_user WHERE role = 2 LIMIT
$start
,
$per_hal
"
);
?>
<!-- breadcrumbs -->
...
...
@@ -9,21 +20,25 @@
<ol
class=
"breadcrumb breadcrumb1"
>
<li><span><i
class=
"fa fa-sign-in"
aria-hidden=
"true"
></i><a
href=
"login.php"
>
Masuk
</a></span></li>
<li
class=
"active"
>
Kelola Data Pelanggan
</li>
<?php
if
(
isset
(
$_POST
[
'cari'
]))
{
$cari
=
$_POST
[
'search'
];
$sql
=
mysqli_query
(
$koneksi
,
"SELECT * FROM t_user WHERE username LIKE '%
$cari
%' ORDER BY id_user"
);
}
?>
<div
class=
"w3l_search"
>
<form
action=
""
method=
"post"
>
<input
type=
"search"
name=
"search"
placeholder=
"Cari Nama Pelanggan"
required=
""
>
<button
type=
"submit"
class=
"btn btn-default search"
aria-label=
"Left Align"
name=
"cari"
>
<i
class=
"fa fa-search"
aria-hidden=
"true"
>
</i>
</button>
<div
class=
"clearfix"
></div>
</form>
</div>
</ol>
</div>
</div>
<!-- //breadcrumbs -->
<!-- Page -->
<?php
$per_hal
=
10
;
$jumlah_record
=
mysqli_query
(
$koneksi
,
"SELECT * FROM t_user WHERE role=2"
);
$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
;
?>
<!-- //Page -->
<div
class=
"col-md-12"
>
<table
class=
"col-md-3"
>
<tr>
...
...
@@ -49,14 +64,13 @@
</tr>
</thead>
<?php
$tampil
=
mysqli_query
(
$koneksi
,
"SELECT * FROM t_user WHERE role = 2 LIMIT
$start
,
$per_hal
"
);
while
(
$data
=
mysqli_fetch_array
(
$tampil
))
{
while
(
$data
=
mysqli_fetch_array
(
$sql
))
{
?>
<tr
class=
"rem1"
>
<td
class=
"invert"
>
<?php
echo
$data
[
'id_user'
];
?>
</td>
<td
class=
"invert"
>
<?php
echo
$data
[
'nama_lengkap'
];
?>
</td>
<td
class=
"invert"
>
<?php
echo
$data
[
'alamat'
];
?>
</td>
<td
class=
"invert"
>
<?php
echo
$data
[
'nomor_ponsel'
];
?>
</td>
<td
class=
"invert"
>
0
<?php
echo
$data
[
'nomor_ponsel'
];
?>
</td>
<td
class=
"invert"
>
<?php
echo
$data
[
'email'
];
?>
</td>
<td
class=
"invert"
>
<div
class=
"rem"
>
...
...
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