Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
PSW_II_PARIWISATA_TRANSPORTASI
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Proyek_PSW_II_PARIWISATA
PSW_II_PARIWISATA_TRANSPORTASI
Commits
be1c7aaf
Commit
be1c7aaf
authored
Jun 06, 2020
by
11319009_Pratiwi Sibarani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Upload New File
parent
f4d1fc38
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
82 additions
and
0 deletions
+82
-0
destinasi_user.php
transportasi/user/destinasi_user.php
+82
-0
No files found.
transportasi/user/destinasi_user.php
0 → 100644
View file @
be1c7aaf
<?php
session_start
();
include
(
'../config.php'
);
include
(
"template/header.php"
);
include
(
"../common/function.php"
);
include
(
"functions.php"
);
open_page
(
"Destinasi"
);
if
(
!
isset
(
$_SESSION
[
'is_login'
]))
{
header
(
'location:../index.php'
);
}
if
(
!
isset
(
$_SESSION
[
"username"
])){
// echo "<script>alert('Login terlebih dahulu');window.location='../index.php';</script>";
// exit;
echo
"Anda harus login dulu <br><a href='../index.php'>Klik disini</a>"
;
exit
;
}
$role
=
$_SESSION
[
"role"
];
if
(
$role
!=
"user"
){
echo
"<script>alert('Anda bukan user');window.location='../index.php';</script>"
;
exit
;
}
$id_akun
=
$_SESSION
[
"id_akun"
];
$nama
=
$_SESSION
[
"nama"
];
$username
=
$_SESSION
[
"username"
];
$data
=
query
(
"SELECT * FROM destinasi"
);
// function cari
if
(
isset
(
$_POST
[
"cari"
])){
$data
=
caridestinasi
(
$_POST
[
"keyword"
]);
}
?>
<!-- ======= Breadcrumbs ======= -->
<section
id=
"breadcrumbs"
class=
"breadcrumbs"
>
<div
class=
"container"
>
<div
class=
"d-flex justify-content-between align-items-center"
>
<h2>
Destinasi
</h2>
</div>
</div>
</section>
<!-- End Breadcrumbs -->
<!-- Start form search -->
<div
class=
"container mt-2 ml-2"
>
<form
method=
"post"
action=
""
>
<label
for=
""
>
Cari Destinasi
</label><br>
<input
type=
"text"
class=
"btn-outline-light"
name=
"keyword"
placeholder=
"Masukkan keyword"
autocomplete=
"off"
autofocus
>
<button
type=
"submit"
name=
"cari"
class=
"btn btn-sm btn-outline-primary"
>
<svg
class=
"bi bi-search"
width=
"1em"
height=
"1em"
viewBox=
"0 0 16 16"
fill=
"currentColor"
xmlns=
"http://www.w3.org/2000/svg"
>
<path
fill-rule=
"evenodd"
d=
"M10.442 10.442a1 1 0 0 1 1.415 0l3.85 3.85a1 1 0 0 1-1.414 1.415l-3.85-3.85a1 1 0 0 1 0-1.415z"
/>
<path
fill-rule=
"evenodd"
d=
"M6.5 12a5.5 5.5 0 1 0 0-11 5.5 5.5 0 0 0 0 11zM13 6.5a6.5 6.5 0 1 1-13 0 6.5 6.5 0 0 1 13 0z"
/>
</svg>
</button>
</form>
</div>
<!-- End form search -->
<div
class=
"card-group mt-2"
>
<?php
foreach
(
$data
as
$destinasi
)
{
?>
<div
class=
"card mt-2"
>
<div
class=
"card-body"
>
<h5
class=
"card-title"
>
<?=
$destinasi
[
'nama_destinasi'
]
?>
</h5>
<p
class=
"card-text"
>
<?=
$destinasi
[
'deskripsi_destinasi'
]
?>
</p>
<img
src=
"
<?=
BASEURL
;
?>
public/img/
<?=
$destinasi
[
'gambar_destinasi'
]
?>
"
class=
"align-self-center mr-5 mt-3"
alt=
"gambar_destinasi"
style=
"width:150px;length:150px"
>
</div>
</div>
</div>
<?php
}
?>
<?php
include
(
"template/footer.php"
)
?>
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