Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
Sistem-Informasi-Pariwisata-Tapanuli-Utara
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
Kyrie Cettyara
Sistem-Informasi-Pariwisata-Tapanuli-Utara
Commits
2fc3037a
Commit
2fc3037a
authored
Jul 31, 2021
by
KyrieCettyara
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
memperbaiki admin
parent
d915607a
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
97 additions
and
36 deletions
+97
-36
ArtikelController.php
app/Controllers/ArtikelController.php
+6
-4
add_artikel.php
app/Views/admin/add_artikel.php
+1
-1
detail.php
app/Views/admin/detail.php
+10
-11
edit_artikel.php
app/Views/admin/edit_artikel.php
+3
-1
list.php
app/Views/admin/list.php
+8
-2
side_menu.php
app/Views/admin/side_menu.php
+5
-5
byId.php
app/Views/byId.php
+1
-1
template.php
app/Views/layout/template.php
+1
-0
admin.css
public/css/admin.css
+54
-10
style.css
public/css/style.css
+8
-1
1627733148_ebec282195606150e6c7.jpg
public/upload/1627733148_ebec282195606150e6c7.jpg
+0
-0
1627733977_6372c5c8a381502660e7.jpg
public/upload/1627733977_6372c5c8a381502660e7.jpg
+0
-0
1627735564_be630116101507506eff.jpg
public/upload/1627735564_be630116101507506eff.jpg
+0
-0
1627736720_99272bd7b3d31f70fb39.jpg
public/upload/1627736720_99272bd7b3d31f70fb39.jpg
+0
-0
No files found.
app/Controllers/ArtikelController.php
View file @
2fc3037a
...
...
@@ -192,17 +192,19 @@ class ArtikelController extends BaseController
$data
=
$model
->
findAll
();
$modelId
=
$modelArtikel
->
where
(
"id_artikel"
,
$id
)
->
first
();
$imageName
=
$modelId
[
'gambar'
];
if
(
$this
->
request
->
getMethod
()
==
"post"
)
{
$file
=
$this
->
request
->
getFile
(
'gambar'
);
if
(
$file
->
isValid
()
&&
!
$file
->
hasMoved
())
{
$imageName
=
$file
->
getRandomName
();
$file
->
move
(
'upload/'
,
$imageName
);
if
(
$file
!=
null
)
{
if
(
$file
->
isValid
()
&&
!
$file
->
hasMoved
())
{
$imageName
=
$file
->
getRandomName
();
$file
->
move
(
'upload/'
,
$imageName
);
}
}
$newData
=
[
'id_jenis_artikel'
=>
$this
->
request
->
getVar
(
'id_jenis_artikel'
),
'gambar'
=>
$imageName
,
...
...
app/Views/admin/add_artikel.php
View file @
2fc3037a
...
...
@@ -26,7 +26,7 @@
<div
class=
"form-group row"
>
<label
for=
"gambar"
class=
"col-sm-2 col-form-label"
>
Gambar
</label>
<div
class=
"col-sm-10"
>
<input
type=
"file"
class=
"form-control"
style=
"height: fit-content;"
name=
"gambar"
id=
"gambar"
>
<input
type=
"file"
class=
"form-control"
style=
"height: fit-content;"
name=
"gambar"
>
</div>
</div>
<div
class=
"form-group row"
>
...
...
app/Views/admin/detail.php
View file @
2fc3037a
<?=
$this
->
extend
(
'admin/side_menu'
);
?>
<?=
$this
->
section
(
'content'
);
?>
<a
href=
"
<?=
base_url
(
'edit-artikel/'
.
$value
[
'id_artikel'
]);
?>
"
class=
"btn btn-primary"
>
Edit
</a>
<a
href=
"
<?=
base_url
(
'delete-artikel/'
.
$value
[
'id_artikel'
]);
?>
"
class=
"btn btn-primary"
>
Delete
</a>
<div
class=
"container"
>
<div
class=
"buttn"
>
<a
href=
"
<?=
base_url
(
'edit-artikel/'
.
$value
[
'id_artikel'
]);
?>
"
class=
"btn"
id=
"btn"
>
Edit
</a>
<a
href=
"
<?=
base_url
(
'delete-artikel/'
.
$value
[
'id_artikel'
]);
?>
"
class=
"btn"
id=
"btn"
>
Delete
</a>
</div>
</div>
<div
class=
"container"
>
<div
class=
"row"
>
<div
class=
"col"
>
<div
class=
"
card
"
>
<div
class=
"
detail
"
>
<?php
$image
=
$value
[
'gambar'
];
?>
<img
id=
"gambar"
src=
"
<?php
echo
base_url
(
"upload/
$image
"
);
?>
"
/>
<div
class=
" card-body"
>
<h5
class=
"card-title"
>
<?=
$value
[
'judul_artikel'
];
?>
</h5>
<p
class=
"card-text"
>
<?=
$value
[
'isi_artikel'
];
?>
</p>
</div>
<h3
class=
"title"
>
<?=
$value
[
'judul_artikel'
];
?>
</h3>
<p>
<?=
$value
[
'isi_artikel'
];
?>
</p>
</div>
</div>
</div>
...
...
app/Views/admin/edit_artikel.php
View file @
2fc3037a
...
...
@@ -6,6 +6,8 @@
<div
class=
"row"
>
<div
class=
"col"
>
<div
class=
"panel-body"
>
<h1>
Edit Artikel
</h1>
<hr>
<form
class=
""
enctype=
"multipart/form-data"
action=
"
<?=
base_url
(
'ArtikelController/editArtikel/'
.
$modelId
[
'id_artikel'
]);
?>
"
method=
"post"
>
<div
class=
"form-group"
>
...
...
@@ -22,7 +24,7 @@
</div>
<div
class=
"form-group"
>
<label
for=
"gambar"
>
Gambar
</label>
<input
type=
"file"
class=
"form-control"
name=
"gambar"
id=
"gambar"
value=
"
<?=
$modelId
[
'gambar'
]
?>
"
>
<input
type=
"file"
class=
"form-control"
name=
"gambar"
value=
"
<?=
base_url
(
"upload/"
.
$modelId
[
'gambar'
])
?>
"
>
</div>
<div
class=
"form-group"
>
<label
for=
"judul_artikel"
>
Id Artikel
</label>
...
...
app/Views/admin/list.php
View file @
2fc3037a
...
...
@@ -2,8 +2,14 @@
<?=
$this
->
section
(
'content'
);
?>
<a
href=
"
<?=
base_url
(
'add-artikel'
);
?>
"
class=
"btn btn-primary"
>
Tambah Artikel
</a>
<div
class=
"container"
>
<div
class=
"butn"
>
<a
href=
"
<?=
base_url
(
'add-artikel'
);
?>
"
class=
"btn"
id=
"btn"
>
Tambah Artikel
</a>
</div>
</div>
<?php
foreach
(
$data
as
$value
)
:
?>
<?php
$isi_artikel
=
$value
[
'isi_artikel'
];
...
...
@@ -18,7 +24,7 @@
<div
class=
" card-body"
>
<h5
class=
"card-title"
>
<?=
$value
[
'judul_artikel'
];
?>
</h5>
<p
class=
"card-text"
>
<?=
$isi_artikel
;
?>
</p>
<a
href=
"
<?=
base_url
(
'artikel/'
.
$value
[
'id_artikel'
]);
?>
"
class=
"btn
btn-primary
"
>
Baca Artikel...
</a>
<a
href=
"
<?=
base_url
(
'artikel/'
.
$value
[
'id_artikel'
]);
?>
"
class=
"btn"
>
Baca Artikel...
</a>
</div>
</div>
</div>
...
...
app/Views/admin/side_menu.php
View file @
2fc3037a
...
...
@@ -10,6 +10,9 @@
<script
src=
"https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js"
integrity=
"sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q"
crossorigin=
"anonymous"
></script>
<script
src=
"https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js"
integrity=
"sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl"
crossorigin=
"anonymous"
></script>
<link
href=
"
<?php
echo
base_url
(
'css/admin.css'
);
?>
"
rel=
"stylesheet"
>
<link
rel=
"preconnect"
href=
"https://fonts.googleapis.com"
>
<link
rel=
"preconnect"
href=
"https://fonts.gstatic.com"
crossorigin
>
<link
href=
"https://fonts.googleapis.com/css2?family=Poppins:wght@300&display=swap"
rel=
"stylesheet"
>
</head>
...
...
@@ -21,17 +24,14 @@
</div>
<div
class=
"menu"
>
<ul>
<li><a
href=
"
<?=
base_url
(
'admin'
)
?>
"
><i
class=
"fa fa-server"
aria-hidden=
"true"
></i><span
class=
"text"
>
Kelola Artikel
</span></a></li>
<li><a
href=
"#"
><i
class=
"fa fa-user-plus"
aria-hidden=
"true"
></i><span
class=
"text"
>
Kelola Akun Admin
</span></a></li>
<li><a
href=
"
<?=
base_url
(
'admin'
)
?>
"
><i
class=
"fa fa-server"
aria-hidden=
"true"
></i><span
class=
"text"
>
Artikel
</span></a></li>
<li><a
href=
"
<?=
base_url
(
'AuthController/logout'
)
?>
"
><i
class=
"fa fa-sign-out"
aria-hidden=
"true"
></i><span
class=
"text"
>
Keluar
</span></a></li>
</ul>
</div>
</div>
<div
class=
"main-content"
>
<div
class=
"topmenu"
>
<div
class=
"search"
><i
class=
"fa fa-search"
aria-hidden=
"true"
></i>
<input
type=
'text'
class=
'src'
placeholder=
'Search for cards...'
/></div>
</div>
<div
class=
"main-section"
>
<?=
$this
->
renderSection
(
'content'
);
?>
...
...
app/Views/byId.php
View file @
2fc3037a
...
...
@@ -8,7 +8,7 @@
<div
class=
"detail"
>
<?php
$image
=
$value
[
'gambar'
];
?>
<img
id=
"gambar"
src=
"
<?php
echo
base_url
(
"upload/
$image
"
);
?>
"
/>
<img
id=
"gambar
s
"
src=
"
<?php
echo
base_url
(
"upload/
$image
"
);
?>
"
/>
<?php
if
(
session
()
->
get
(
'isLoggedIn'
))
:
?>
<?php
if
(
session
()
->
get
(
'isExist'
))
:
?>
...
...
app/Views/layout/template.php
View file @
2fc3037a
...
...
@@ -88,6 +88,7 @@
</header>
<!-- End Header -->
<?=
$this
->
renderSection
(
'content'
);
?>
<!--=======Footer=======-->
<footer
id=
"footer"
>
<div
class=
"container"
>
...
...
public/css/admin.css
View file @
2fc3037a
...
...
@@ -40,7 +40,7 @@ body {
}
a
{
text-decoration
:
none
;
color
:
#
e1e2fa
;
color
:
#
fff
;
}
.menu
ul
{
list-style-type
:
none
;
...
...
@@ -68,7 +68,6 @@ a {
}
.main-section
{
background
:
#f6f9fc
;
height
:
100%
;
margin-bottom
:
-5000px
;
/* any large number will do */
padding-bottom
:
5000px
;
...
...
@@ -135,41 +134,86 @@ input.src {
}
#gambar
{
width
:
50%
;
width
:
100%
;
height
:
300px
;
object-fit
:
cover
;
object-position
:
center
;
}
.detail
>
#gambar
{
width
:
70%
;
display
:
block
;
margin-left
:
auto
;
margin-right
:
auto
;
}
.card
{
width
:
100%
;
}
.card
>
.card-body
{
text-align
:
justify
;
text-justify
:
inter-word
;
font-family
:
"Poppins"
,
sans-serif
;
}
.card
>
.card-body
>
.card-title
{
font-family
:
"Poppins"
,
sans-serif
;
}
.card
>
.card-body
>
.btn
{
float
:
right
;
border-radius
:
25px
;
background-color
:
#
009961
;
background-color
:
#
32325d
;
}
.row
>
.col
l
{
.row
>
.col
{
display
:
flex
;
justify-content
:
center
;
}
.row
>
.col
l
>
.detail
{
.row
>
.col
>
.detail
{
text-align
:
justify
;
text-justify
:
inter-word
;
font-family
:
"Poppins"
,
sans-serif
;
width
:
75%
;
}
.row
>
.coll
>
.detail
>
.title
{
.row
>
.col
>
.detail
>
.title
{
padding-top
:
15px
;
font-family
:
"Poppins"
,
sans-serif
;
}
.row
>
.coll
>
.btn
{
/* .row > .coll > .detail > a {
padding-top: 10px;
float: right;
border-radius
:
25px
;
background-color
:
#009961
;
} */
h4
,
h3
{
font-weight
:
bold
;
}
.container
>
.buttn
>
#btn
{
border-radius
:
20px
;
width
:
100px
;
margin
:
0px
5px
15px
;
background-color
:
#32325d
;
font-family
:
"Poppins"
,
sans-serif
;
}
.container
>
.butn
>
#btn
{
border-radius
:
20px
;
margin
:
0px
5px
15px
;
background-color
:
#32325d
;
font-family
:
"Poppins"
,
sans-serif
;
}
/* .row {
float: right;
} */
.container
>
.buttn
{
display
:
flex
;
}
.panel-body
{
width
:
100%
;
}
public/css/style.css
View file @
2fc3037a
...
...
@@ -1681,7 +1681,14 @@ section {
}
#gambar
{
width
:
50%
;
width
:
100%
;
height
:
400px
;
object-fit
:
cover
;
object-position
:
center
;
}
.row
>
.coll
>
.detail
>
#gambars
{
width
:
60%
;
display
:
block
;
margin-left
:
auto
;
margin-right
:
auto
;
...
...
public/upload/1627733148_ebec282195606150e6c7.jpg
0 → 100644
View file @
2fc3037a
77.1 KB
public/upload/1627733977_6372c5c8a381502660e7.jpg
0 → 100644
View file @
2fc3037a
14.4 KB
public/upload/1627735564_be630116101507506eff.jpg
0 → 100644
View file @
2fc3037a
23.6 KB
public/upload/1627736720_99272bd7b3d31f70fb39.jpg
0 → 100644
View file @
2fc3037a
49.8 KB
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