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
4a8a71a2
Commit
4a8a71a2
authored
Jul 23, 2021
by
KyrieCettyara
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
memperbaiki fungsi dan tampilan user
parent
22a77470
Show whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
397 additions
and
125 deletions
+397
-125
Routes.php
app/Config/Routes.php
+4
-0
ArtikelController.php
app/Controllers/ArtikelController.php
+9
-6
AuthController.php
app/Controllers/AuthController.php
+1
-3
Home.php
app/Controllers/Home.php
+9
-2
UserController.php
app/Controllers/UserController.php
+54
-4
BookmarkModel.php
app/Models/BookmarkModel.php
+10
-1
list.php
app/Views/admin/list.php
+1
-1
bookmarkDetail.php
app/Views/bookmarkDetail.php
+26
-0
byId.php
app/Views/byId.php
+27
-3
template.php
app/Views/layout/template.php
+8
-3
list.php
app/Views/list.php
+23
-5
listBookmark.php
app/Views/listBookmark.php
+42
-0
list_search.php
app/Views/list_search.php
+129
-38
try.php
app/Views/try.php
+20
-0
admin.css
public/css/admin.css
+18
-1
style.css
public/css/style.css
+16
-58
1626978697_df7a4610f5e50e35e167.jpg
public/upload/1626978697_df7a4610f5e50e35e167.jpg
+0
-0
No files found.
app/Config/Routes.php
View file @
4a8a71a2
...
...
@@ -47,14 +47,18 @@ $routes->group("user", ["filter" => "auth"], function ($routes) {
$routes
->
get
(
'logout'
,
' UserController::logout'
);
$routes
->
get
(
'bookmark'
,
"UserController::listBookmark"
);
$routes
->
get
(
'tambah-bookmark'
,
"ArtikelController::bookmark"
);
$routes
->
get
(
'list-kuliner'
,
"ArtikelController::listKuliner"
);
$routes
->
get
(
'list-pariwisata'
,
"ArtikelController::listPariwisata"
);
$routes
->
get
(
'list-travel'
,
"ArtikelController::listTravel"
);
$routes
->
get
(
'list-oleh-oleh'
,
"ArtikelController::listOleh"
);
$routes
->
get
(
"artikel/(:num)"
,
"ArtikelController::artikelById/$1"
);
$routes
->
get
(
"bookmark/(:num)"
,
"UserController::bookmarkById/$1"
);
$routes
->
match
([
"get"
,
"post"
],
"add-artikel"
,
"ArtikelController::addArtikel"
);
$routes
->
match
([
"get"
,
"post"
],
"edit-artikel/(:num)"
,
"ArtikelController::editArtikel/$1"
);
$routes
->
get
(
"delete-artikel/(:num)"
,
"ArtikelController::deleteArtikel/$1"
);
$routes
->
get
(
"delete-bookmark/(:num)"
,
"UserController::deleteBookmark/$1"
);
/*
* --------------------------------------------------------------------
* Additional Routing
...
...
app/Controllers/ArtikelController.php
View file @
4a8a71a2
...
...
@@ -59,7 +59,7 @@ class ArtikelController extends BaseController
$data
[
'title'
]
=
'Sistem Informasi Tapanuli Utara'
;
$kulinerModel
=
new
ArtikelModel
();
$allValue
=
$kulinerModel
->
where
(
'id_jenis_artikel'
,
3
)
->
findAll
();
$allValue
=
$kulinerModel
->
where
(
'id_jenis_artikel'
,
4
)
->
findAll
();
return
view
(
'list'
,
[
"allValue"
=>
$allValue
,
...
...
@@ -69,6 +69,7 @@ class ArtikelController extends BaseController
public
function
artikelById
(
$key
=
null
)
{
$data
[
'title'
]
=
'Sistem Informasi Tapanuli Utara'
;
$artikelModel
=
new
ArtikelModel
();
$value
=
$artikelModel
->
where
(
'id_artikel'
,
$key
)
->
first
();
...
...
@@ -82,11 +83,12 @@ class ArtikelController extends BaseController
return
view
(
'byId'
,
[
"value"
=>
$value
,
"data"
=>
$data
,
]);
}
}
p
rivate
function
setArtikelSession
(
$value
)
p
ublic
function
setArtikelSession
(
$value
)
{
$data
=
[
'id_user'
=>
13
,
...
...
@@ -101,17 +103,18 @@ class ArtikelController extends BaseController
public
function
bookmark
()
{
$data
[
'title'
]
=
'Sistem Informasi Tapanuli Utara'
;
$bookmarkModel
=
new
BookmarkModel
();
$
data
=
[
$
allValue
=
[
'title'
=>
'Sistem Informasi Tapanuli Utara'
,
'id_user'
=>
session
()
->
get
(
'id_user'
),
'id_artikel'
=>
session
()
->
get
(
'id_artikel'
),
];
$bookmarkModel
->
save
(
$
data
);
session
()
->
destroy
();
return
view
(
'landing_page'
,
$data
);
$bookmarkModel
->
save
(
$
allValue
);
return
redirect
()
->
to
(
base_url
(
'bookmark'
)
);
}
public
function
addArtikel
()
...
...
app/Controllers/AuthController.php
View file @
4a8a71a2
...
...
@@ -78,9 +78,7 @@ class AuthController extends BaseController
$session
->
remove
(
'isLoggedIn'
);
$session
->
destroy
();
return
view
(
'landing_page'
,
[
"data"
=>
$data
,
]);
return
redirect
()
->
to
(
base_url
(
'/'
));
}
...
...
app/Controllers/Home.php
View file @
4a8a71a2
...
...
@@ -6,17 +6,22 @@ use App\Models\ArtikelModel;
class
Home
extends
BaseController
{
public
function
__construct
()
{
helper
(
'text'
);
}
public
function
index
()
{
$data
[
'title'
]
=
'Sistem Informasi Tapanuli Utara'
;
return
view
(
'landing_page'
,
[
"data"
=>
$data
,
"data"
=>
$data
]);
}
public
function
search
()
{
$data
[
'title'
]
=
'Sistem Informasi Tapanuli Utara'
;
$pager
=
\Config\Services
::
pager
();
$model
=
new
ArtikelModel
();
$keyword
=
$this
->
request
->
getVar
(
'cari'
);
...
...
@@ -30,6 +35,8 @@ class Home extends BaseController
$data
[
'artikel'
]
=
$query
->
paginate
(
10
);
$data
[
'pager'
]
=
$model
->
pager
;
$data
[
'page'
]
=
$this
->
request
->
getVar
(
'page'
)
?
$this
->
request
->
getVar
(
'page'
)
:
1
;
$data
[
'title'
]
=
'Sistem Informasi Tapanuli Utara'
;
return
view
(
'list_search'
,
$data
);
}
...
...
app/Controllers/UserController.php
View file @
4a8a71a2
...
...
@@ -4,32 +4,82 @@ namespace App\Controllers;
use
App\Controllers\BaseController
;
use
App\Models\BookmarkModel
;
use
App\Models\ArtikelModel
;
use
App\Controllers\ArtikelController
;
class
UserController
extends
BaseController
{
public
function
__construct
()
{
if
(
session
()
->
get
(
'role_id'
)
!=
2
)
{
echo
'Access denied'
;
$session
=
session
()
->
get
(
'role_id'
);
echo
$session
;
exit
;
}
helper
(
'text'
);
}
public
function
index
()
{
return
view
(
'Home/index'
);
}
public
function
listBookmark
(
$
)
public
function
bookmark
()
{
$bookmarkModel
=
new
BookmarkModel
();
$data
=
[
'title'
=>
'Sistem Informasi Tapanuli Utara'
,
'id_user'
=>
session
()
->
get
(
'id_user'
),
'id_artikel'
=>
session
()
->
get
(
'id_artikel'
),
];
$bookmarkModel
->
save
(
$data
);
return
view
(
'landing_page'
,
$data
);
}
public
function
listBookmark
()
{
$key
[
'key'
]
=
session
()
->
get
(
'id'
);
$data
[
'title'
]
=
'Sistem Informasi Tapanuli Utara'
;
$model
=
new
BookmarkModel
();
$allValue
=
$model
->
where
(
'id_user'
,
$key
)
->
findAll
();
return
view
(
'list'
,
[
$allValue
=
$model
->
getBookmark
(
$key
);
return
view
(
'listBookmark'
,
[
"allValue"
=>
$allValue
,
"data"
=>
$data
,
]);
}
public
function
bookmarkById
(
$key
=
null
)
{
$data
[
'title'
]
=
'Sistem Informasi Tapanuli Utara'
;
$model
=
new
BookmarkModel
();
$allValue
=
$model
->
getBookmarkDetail
(
$key
);
return
view
(
'bookmarkDetail'
,
[
"allValue"
=>
$allValue
,
"data"
=>
$data
,
]);
}
public
function
deleteBookmark
(
$id
)
{
$model
=
new
BookmarkModel
();;
$artikel
=
$model
->
delete
(
$id
);
$session
=
session
();
$session
->
setFlashdata
(
"success"
,
"Artikel Berhasil Dihapus"
);
return
redirect
()
->
to
(
base_url
(
'bookmark'
));
}
}
app/Models/BookmarkModel.php
View file @
4a8a71a2
...
...
@@ -42,10 +42,19 @@ class BookmarkModel extends Model
protected
$beforeDelete
=
[];
protected
$afterDelete
=
[];
public
function
getBookmark
()
public
function
getBookmark
(
$key
)
{
return
$this
->
db
->
table
(
'bookmark'
)
->
join
(
'artikel'
,
'artikel.id_artikel = bookmark.id_artikel'
)
->
where
(
'id_user'
,
$key
)
->
get
()
->
getResultArray
();
}
public
function
getBookmarkDetail
(
$key
)
{
return
$this
->
db
->
table
(
'bookmark'
)
->
join
(
'artikel'
,
'artikel.id_artikel = bookmark.id_artikel'
)
->
where
(
'id_bookmark'
,
$key
)
->
get
()
->
getResultArray
();
}
}
app/Views/admin/list.php
View file @
4a8a71a2
...
...
@@ -7,7 +7,7 @@
<?php
foreach
(
$data
as
$value
)
:
?>
<?php
$isi_artikel
=
$value
[
'isi_artikel'
];
$isi_artikel
=
character_limiter
(
$isi_artikel
,
1
00
);
$isi_artikel
=
character_limiter
(
$isi_artikel
,
5
00
);
?>
<div
class=
"container"
>
<div
class=
"row"
>
...
...
app/Views/bookmarkDetail.php
0 → 100644
View file @
4a8a71a2
<?=
$this
->
extend
(
'layout/template'
);
?>
<?=
$this
->
section
(
'content'
);
?>
<?php
foreach
(
$allValue
as
$value
)
:
?>
<div
class=
"container"
>
<div
class=
"row"
>
<div
class=
"col"
>
<div
class=
"card"
>
<?php
$image
=
$value
[
'gambar'
];
?>
<img
id=
"gambar"
src=
"
<?php
echo
base_url
(
"upload/
$image
"
);
?>
"
/>
<div
class=
" card-body"
>
<a
href=
"
<?=
base_url
(
'delete-bookmark/'
.
$value
[
'id_bookmark'
]);
?>
"
class=
" btn btn-primary"
>
Un-bookmark
</a></br></br>
<h5
class=
"card-title"
>
<?=
$value
[
'judul_artikel'
];
?>
</h5>
<p
class=
"card-text"
>
<?=
$value
[
'isi_artikel'
];
?>
</p>
</div>
</div>
</div>
</div>
</div>
<?php
endforeach
;
?>
<?=
$this
->
endSection
();
?>
\ No newline at end of file
app/Views/byId.php
View file @
4a8a71a2
<
h2
id=
"judul_artikel"
name=
"judul_artikel"
>
<?=
$value
[
'judul_artikel'
];
?>
</h1
>
<
?=
$this
->
extend
(
'layout/template'
);
?
>
<button>
<a
href=
"
<?=
base_url
(
'ArtikelController/bookmark'
)
?>
"
>
Submit
</a></button>
\ No newline at end of file
<?=
$this
->
section
(
'content'
);
?>
<div
class=
"container"
>
<div
class=
"row"
>
<div
class=
"col"
>
<div
class=
"card"
>
<?php
$image
=
$value
[
'gambar'
];
?>
<img
id=
"gambar"
src=
"
<?php
echo
base_url
(
"upload/
$image
"
);
?>
"
/>
<div
class=
" card-body"
>
<?php
if
(
session
()
->
get
(
'isLoggedIn'
))
:
?>
<a
href=
"
<?=
base_url
(
'tambah-bookmark'
)
?>
"
class=
" btn btn-primary"
>
Bookmark
</a></br></br>
<?php
endif
?>
<h5
class=
"card-title"
>
<?=
$value
[
'judul_artikel'
];
?>
</h5>
<p
class=
"card-text"
>
<?=
$value
[
'isi_artikel'
];
?>
</p>
</div>
</div>
</div>
</div>
</div>
<?=
$this
->
endSection
();
?>
\ No newline at end of file
app/Views/layout/template.php
View file @
4a8a71a2
...
...
@@ -5,7 +5,13 @@
<meta
content=
""
name=
"description"
>
<meta
content=
""
name=
"keywords"
>
<title>
<?=
$data
[
'title'
]
?>
</title>
<!-- Favicons -->
<link
href=
"
<?php
echo
base_url
(
'img/favicon.png'
);
?>
"
rel=
"icon"
>
<link
rel=
"stylesheet"
href=
"https://use.fontawesome.com/releases/v5.3.1/css/all.css"
integrity=
"sha384-mzrmE5qonljUremFsqc01SB46JvROS7bZs3IO2EmfFsd15uHvIt+Y8vEf7N7fWAU"
crossorigin=
"anonymous"
>
...
...
@@ -33,7 +39,7 @@
<body>
<!-- ======= Header ======= -->
<header
id=
"header"
class=
"
fixed-top
"
>
<header
id=
"header"
class=
"
position-relative
"
>
<div
class=
"container-fluid"
>
<div
class=
"row justify-content-center"
>
...
...
@@ -44,13 +50,12 @@
<nav
id=
"navbar"
class=
"navbar order-last order-lg-0"
>
<ul>
<li><a
class=
"scrollto"
href=
"hotel1.html"
>
Hotel
</a></li>
<li><a
class=
"scrollto "
href=
"
<?php
echo
base_url
(
'list-pariwisata'
);
?>
"
>
Pariwisata
</a></li>
<li><a
class=
"scrollto"
href=
"
<?php
echo
base_url
(
'list-kuliner'
);
?>
"
>
Kuliner
</a></li>
<li><a
class=
"scrollto"
href=
"
<?php
echo
base_url
(
'list-travel'
);
?>
"
>
Travel
</a></li>
<li><a
class=
"scrollto"
href=
"
<?php
echo
base_url
(
'list-oleh-oleh'
);
?>
"
>
Oleh Oleh
</a></li>
<li>
<?php
if
(
session
()
->
get
(
'role_id'
)
==
2
)
:
?>
<a
href=
"
<?=
base_url
(
'
AuthController/logout'
)
?>
"
class=
"get-started-btn
"
>
Bookmark
</a>
<a
href=
"
<?=
base_url
(
'
bookmark'
)
?>
"
class=
"scrollto
"
>
Bookmark
</a>
<?php
endif
?>
</li>
</ul>
...
...
app/Views/list.php
View file @
4a8a71a2
...
...
@@ -2,10 +2,11 @@
<?=
$this
->
section
(
'content'
);
?>
<?php
foreach
(
$allValue
as
$value
)
:
?>
<?php
if
(
$allValue
!=
null
)
:
?>
<?php
foreach
(
$allValue
as
$value
)
:
?>
<?php
$isi_artikel
=
$value
[
'isi_artikel'
];
$isi_artikel
=
character_limiter
(
$isi_artikel
,
1
00
);
$isi_artikel
=
character_limiter
(
$isi_artikel
,
5
00
);
?>
<div
class=
"container"
>
<div
class=
"row"
>
...
...
@@ -14,13 +15,29 @@
<img
id=
"gambar"
class=
"card-img-top"
src=
"
<?=
"upload/"
.
$value
[
'gambar'
];
?>
"
alt=
"image"
/>
<div
class=
" card-body"
>
<h5
class=
"card-title"
>
<?=
$value
[
'judul_artikel'
];
?>
</h5
>
<h4
class=
"card-title"
>
<?=
$value
[
'judul_artikel'
];
?>
</h4
>
<p
class=
"card-text"
>
<?=
$isi_artikel
;
?>
</p>
<a
href=
"
<?=
base_url
(
'artikel/'
.
$value
[
'id_artikel'
]);
?>
"
class=
"btn btn-primary"
>
Go somewhere
</a>
<a
href=
"
<?=
base_url
(
'artikel/'
.
$value
[
'id_artikel'
]);
?>
"
class=
"btn btn-primary"
>
Baca Artikel...
</a>
</div>
</div>
</div>
</div>
</div>
<?php
endforeach
;
?>
<?php
endforeach
;
?>
<?php
else
:
?>
<div
class=
"container"
>
<div
class=
"row"
>
<div
class=
"col"
>
<div
class=
"card"
>
<div
class=
" card-body"
style=
"height: 300px;"
>
<h5>
Maaf, belum terdapat artikel.
</h5>
</div>
</div>
</div>
</div>
</div>
<?php
endif
?>
<?=
$this
->
endSection
();
?>
\ No newline at end of file
app/Views/listBookmark.php
0 → 100644
View file @
4a8a71a2
<?=
$this
->
extend
(
'layout/template'
);
?>
<?=
$this
->
section
(
'content'
);
?>
<?php
if
(
$allValue
!=
null
)
:
?>
<?php
foreach
(
$allValue
as
$value
)
:
?>
<?php
$isi_artikel
=
$value
[
'isi_artikel'
];
$isi_artikel
=
character_limiter
(
$isi_artikel
,
500
);
?>
<div
class=
"container"
>
<div
class=
"row"
>
<div
class=
"col"
>
<div
class=
"card"
>
<img
id=
"gambar"
class=
"card-img-top"
src=
"
<?=
"upload/"
.
$value
[
'gambar'
];
?>
"
alt=
"image"
/>
<div
class=
" card-body"
>
<h5
class=
"card-title"
>
<?=
$value
[
'judul_artikel'
];
?>
</h5>
<p
class=
"card-text"
>
<?=
$isi_artikel
;
?>
</p>
<a
href=
"
<?=
base_url
(
'bookmark/'
.
$value
[
'id_bookmark'
]);
?>
"
class=
"btn btn-primary"
>
Baca Artikel...
</a>
</div>
</div>
</div>
</div>
</div>
<?php
endforeach
;
?>
<?php
else
:
?>
<div
class=
"container"
>
<div
class=
"row"
>
<div
class=
"col"
>
<div
class=
"card"
>
<div
class=
" card-body"
style=
"height: 300px;"
>
<h5>
Anda tidak memiliki bookmark.
</h5>
</div>
</div>
</div>
</div>
</div>
<?php
endif
?>
<?=
$this
->
endSection
();
?>
\ No newline at end of file
app/Views/list_search.php
View file @
4a8a71a2
<!DOCTYPE html>
<html
lang=
"en"
>
<head>
<meta
charset=
"UTF-8"
>
<title>
SEARCHING DATA DENGAN CODEIGNITER 4
</title>
<link
href=
"https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.0.0-alpha/css/bootstrap.css"
rel=
"stylesheet"
>
<link
href=
"https://getbootstrap.com/docs/4.0/dist/css/bootstrap.min.css"
rel=
"stylesheet"
>
<meta
charset=
"utf-8"
>
<meta
content=
"width=device-width, initial-scale=1.0"
name=
"viewport"
>
<meta
content=
""
name=
"description"
>
<meta
content=
""
name=
"keywords"
>
<title>
Sistem Informasi Tapanuli Utara
</title>
<!-- Favicons -->
<link
href=
"
<?php
echo
base_url
(
'img/favicon.png'
);
?>
"
rel=
"icon"
>
<link
rel=
"stylesheet"
href=
"https://use.fontawesome.com/releases/v5.3.1/css/all.css"
integrity=
"sha384-mzrmE5qonljUremFsqc01SB46JvROS7bZs3IO2EmfFsd15uHvIt+Y8vEf7N7fWAU"
crossorigin=
"anonymous"
>
<script
type=
"text/javascript"
src=
"http://jqueryjs.googlecode.com/files/jquery-1.3.2.js"
></script>
<!-- Google Fonts -->
<link
href=
"https://fonts.googleapis.com/css?family=Open+Sans:300,300i,400,400i,600,600i,700,700i|Raleway:300,300i,400,400i,500,500i,600,600i,700,700i|Poppins:300,300i,400,400i,500,500i,600,600i,700,700i"
rel=
"stylesheet"
>
<!-- Vendor CSS Files -->
<link
href=
"
<?php
echo
base_url
(
'assets/vendor/bootstrap/css/bootstrap.min.css'
);
?>
"
rel=
"stylesheet"
>
<link
href=
"
<?php
echo
base_url
(
'assets/vendor/bootstrap-icons/bootstrap-icons.css'
);
?>
"
rel=
"stylesheet"
>
<link
href=
"
<?php
echo
base_url
(
'assets/vendor/boxicons/css/boxicons.min.css'
);
?>
"
rel=
"stylesheet"
>
<link
href=
"
<?php
echo
base_url
(
'assets/vendor/glightbox/css/glightbox.min.css'
);
?>
"
rel=
"stylesheet"
>
<link
href=
"
<?php
echo
base_url
(
'assets/vendor/remixicon/remixicon.css'
);
?>
"
rel=
"stylesheet"
>
<link
href=
"
<?php
echo
base_url
(
'assets/vendor/swiper/swiper-bundle.min.css'
);
?>
"
rel=
"stylesheet"
>
<!-- Template Main CSS File -->
<link
href=
"
<?php
echo
base_url
(
'css/style.css'
);
?>
"
rel=
"stylesheet"
>
</head>
<body
style=
"width: 70%; margin: 0 auto; padding-top: 30px;"
>
<div
class=
"row"
>
<div
class=
"col-lg-12 margin-tb"
>
<div
class=
"pull-left"
>
<h2>
SEARCHING DATA DENGAN CODEIGNITER 4
</h2>
<body>
<!-- ======= Header ======= -->
<header
id=
"header"
class=
"fixed-top "
>
<div
class=
"container-fluid"
>
<div
class=
"row justify-content-center"
>
<div
class=
"col-xl-9 d-flex align-items-center justify-content-lg-between"
>
<h1
class=
"logo me-auto me-lg-0"
><a
href=
"
<?=
base_url
(
'/'
);
?>
"
>
Pariwisata Tapanuli Utara
</a></h1>
<!-- Uncomment below if you prefer to use an image logo -->
<!-- <a href="index.html" class="logo me-auto me-lg-0"><img src="assets/img/logo.png" alt="" class="img-fluid"></a>-->
<nav
id=
"navbar"
class=
"navbar order-last order-lg-0"
>
<ul>
<li><a
class=
"scrollto"
href=
"hotel1.html"
>
Hotel
</a></li>
<li><a
class=
"scrollto "
href=
"
<?php
echo
base_url
(
'list-pariwisata'
);
?>
"
>
Pariwisata
</a></li>
<li><a
class=
"scrollto"
href=
"
<?php
echo
base_url
(
'list-kuliner'
);
?>
"
>
Kuliner
</a></li>
<li><a
class=
"scrollto"
href=
"
<?php
echo
base_url
(
'list-travel'
);
?>
"
>
Travel
</a></li>
<li><a
class=
"scrollto"
href=
"
<?php
echo
base_url
(
'list-oleh-oleh'
);
?>
"
>
Oleh Oleh
</a></li>
<li>
<?php
if
(
session
()
->
get
(
'role_id'
)
==
2
)
:
?>
<a
href=
"
<?=
base_url
(
'bookmark'
)
?>
"
class=
"scrollto"
>
Bookmark
</a>
<?php
endif
?>
</li>
</ul>
</nav>
<!-- .navbar -->
<?php
if
(
session
()
->
get
(
'isLoggedIn'
)
!=
null
)
:
?>
<a
href=
"
<?=
base_url
(
'AuthController/logout'
)
?>
"
class=
"get-started-btn"
>
Logout
</a>
<?php
else
:
?>
<a
href=
"
<?=
base_url
(
'login'
)
?>
"
class=
"get-started-btn"
>
Login
</a>
<?php
endif
?>
</div>
<div
class=
"Hotbg"
>
<input
onchange=
"ganti()"
id=
"search"
type=
"text"
name=
"input"
class=
"Hotbg-txt"
placeholder=
"Search >>>"
>
<a
id=
"searchb"
href=
""
class=
"Hotbg-btn"
>
<i
class=
"fa fa-search"
></i>
</a>
</div>
<script>
function
ganti
()
{
let
searchin
=
document
.
getElementById
(
"search"
);
let
searchButton
=
document
.
getElementById
(
"searchb"
);
let
baseURL
=
"
<?php
echo
base_url
(
'Home/search'
);
?>
"
;
let
link
=
baseURL
+
"?cari="
+
searchin
.
value
;
searchButton
.
href
=
link
;
}
</script>
</div>
<hr>
<form
method=
"GET"
action=
"
<?php
echo
base_url
(
'Home/search'
);
?>
"
class=
"form-group"
>
</header>
<!-- End Header -->
<?php
$no
=
1
+
(
10
*
(
$page
-
1
));
foreach
(
$artikel
as
$row
)
:
?>
<?php
$isi_artikel
=
$row
[
'isi_artikel'
];
$isi_artikel
=
character_limiter
(
$isi_artikel
,
500
);
?>
<div
class=
"container"
>
<div
class=
"row"
>
<div
class=
"col-lg-12"
>
<div
class=
"input-group mb-3"
>
<input
type=
"text"
class=
"form-control"
name=
"cari"
placeholder=
"Mencari Data Berdasarkan Nama"
>
<div
class=
"input-group-append"
>
<button
class=
"btn btn-outline-secondary"
type=
"Submit"
>
CARI DATA
</button>
<div
class=
"col"
>
<div
class=
"card"
>
<?php
$image
=
$row
[
'gambar'
];
?>
<img
id=
"gambar"
class=
"card-img-top"
src=
"
<?php
echo
base_url
(
"upload/
$image
"
);
?>
"
/>
<div
class=
"card-body"
>
<h5
class=
"card-title"
>
<?=
$row
[
'judul_artikel'
];
?>
</h5>
<p
class=
"card-text"
>
<?=
$isi_artikel
;
?>
</p>
<a
href=
"
<?=
base_url
(
'artikel/'
.
$row
[
'id_artikel'
]);
?>
"
class=
"btn btn-primary"
>
Baca Artikel...
</a>
</div>
</div>
</div>
</div>
</div>
</form>
<div
class=
"row"
>
<div
class=
"col-lg-12 margin-tb"
>
<table
class=
"table table-bordered"
>
<tr>
<th>
No
</th>
<th>
Judul
</th>
</tr>
<?php
$no
=
1
+
(
10
*
(
$page
-
1
));
foreach
(
$artikel
as
$row
)
:
?>
<tr>
<td>
<?=
$no
;
?>
</td>
<td>
<?=
$row
[
'judul_artikel'
];
?>
</td>
</tr>
<?php
$no
++
;
endforeach
;
?>
</table>
<?=
$pager
->
Links
()
?>
<footer
id=
"footer"
>
<div
class=
"container"
>
<h3>
Diskominfo Tapanuli Utara
</h3>
<p>
Dinas Komunikasi dan Informatika Tapanuli Utara
</p>
<div
class=
"social-links"
>
<a
href=
"#"
class=
"twitter"
><i
class=
"bx bxl-twitter"
></i></a>
<a
href=
"#"
class=
"facebook"
><i
class=
"bx bxl-facebook-circle"
></i></a>
<a
href=
"#"
class=
"instagram"
><i
class=
"bx bxl-instagram-alt"
></i></a>
<a
href=
"#"
class=
"google-plus"
><i
class=
"bx bxl-whatsapp"
></i></a>
<a
href=
"#"
class=
"linkedin"
><i
class=
"bx bxl-linkedin-square"
></i></a>
</div>
<div
class=
"copyright"
>
©
Copyright
<strong><span>
Diskominfo Tapanuli Utara
<?=
date
(
'Y'
);
?>
</span></strong>
.
</div>
</body>
</div>
</footer>
<!-- End Footer -->
</html>
\ No newline at end of file
<!-- Vendor JS Files -->
<script
src=
"
<?php
echo
base_url
(
'assets/vendor/bootstrap/js/bootstrap.bundle.min.js'
);
?>
"
></script>
<script
src=
"
<?php
echo
base_url
(
'assets/vendor/glightbox/js/glightbox.min.js'
);
?>
"
></script>
<script
src=
"
<?php
echo
base_url
(
'assets/vendor/isotope-layout/isotope.pkgd.min.js'
);
?>
"
></script>
<script
src=
"
<?php
echo
base_url
(
'assets/vendor/php-email-form/validate.js'
);
?>
"
></script>
<script
src=
"
<?php
echo
base_url
(
'assets/vendor/purecounter/purecounter.js'
);
?>
"
></script>
<script
src=
"
<?php
echo
base_url
(
'assets/vendor/swiper/swiper-bundle.min.js'
);
?>
"
></script>
<script
src=
"
<?php
echo
base_url
(
'assets/vendor/typed.js/typed.min.js'
);
?>
"
></script>
<script
src=
"
<?php
echo
base_url
(
'assets/vendor/aos/aos.js'
);
?>
"
></script>
<script
src=
"
<?php
echo
base_url
(
'dir/vendor/aos/aos.js'
);
?>
"
></script>
<!-- Template Main JS File -->
<script
type=
"text/javascript"
src=
"
<?php
echo
base_url
(
'js/main.js'
);
?>
"
></script>
</body>
\ No newline at end of file
app/Views/try.php
0 → 100644
View file @
4a8a71a2
<?php
foreach
(
$allValue
as
$value
)
:
?>
<div
class=
"container"
>
<div
class=
"row"
>
<div
class=
"col"
>
<div
class=
"card"
>
<img
id=
"gambar"
class=
"card-img-top"
src=
"
<?=
"upload/"
.
$value
[
'gambar'
];
?>
"
alt=
"image"
/>
<div
class=
" card-body"
>
<h5
class=
"card-title"
>
<?=
$value
[
'judul_artikel'
];
?>
</h5>
<p
class=
"card-text"
>
<?=
$value
[
'isi_artikel'
]
?>
</p>
<a
href=
"
<?=
base_url
(
'artikel/'
.
$value
[
'id_artikel'
]);
?>
"
class=
"btn btn-primary"
>
Go somewhere
</a>
</div>
</div>
</div>
</div>
</div>
<?php
endforeach
;
?>
<?=
$key
[
'key'
];
?>
\ No newline at end of file
public/css/admin.css
View file @
4a8a71a2
...
...
@@ -129,11 +129,28 @@ input.src {
.container
{
margin
:
15px
0px
15px
0px
;
display
:
block
;
margin-left
:
auto
;
margin-right
:
auto
;
}
#gambar
{
width
:
400px
;
width
:
100%
;
height
:
400px
;
object-fit
:
cover
;
object-position
:
center
;
display
:
block
;
margin-left
:
auto
;
margin-right
:
auto
;
}
.card
>
.card-body
{
text-align
:
justify
;
text-justify
:
inter-word
;
}
.card
>
.card-body
>
.btn
{
float
:
right
;
border-radius
:
25px
;
background-color
:
#009961
;
}
public/css/style.css
View file @
4a8a71a2
...
...
@@ -119,6 +119,7 @@ h6 {
transition
:
all
0.5s
;
z-index
:
997
;
border-bottom
:
1px
solid
rgba
(
255
,
255
,
255
,
0.1
);
background-color
:
currentColor
;
}
#header
.header-scrolled
,
...
...
@@ -280,63 +281,6 @@ h6 {
color
:
#fff
;
}
.navbar
.dropdown
ul
{
display
:
block
;
position
:
absolute
;
left
:
0
;
top
:
calc
(
100%
+
30px
);
margin
:
0
;
padding
:
10px
0
;
z-index
:
99
;
opacity
:
0
;
visibility
:
hidden
;
background
:
#fff
;
box-shadow
:
0px
0px
30px
rgba
(
127
,
137
,
161
,
0.25
);
transition
:
0.3s
;
border-top
:
2px
solid
#009961
;
}
.navbar
.dropdown
ul
li
{
min-width
:
200px
;
}
.navbar
.dropdown
ul
a
{
padding
:
10px
20px
;
font-size
:
14px
;
text-transform
:
none
;
font-weight
:
500
;
color
:
#282828
;
}
.navbar
.dropdown
ul
a
i
{
font-size
:
12px
;
}
.navbar
.dropdown
ul
a
:hover
,
.navbar
.dropdown
ul
.active
:hover
,
.navbar
.dropdown
ul
li
:hover
>
a
{
color
:
#009961
;
}
.navbar
.dropdown
:hover
>
ul
{
opacity
:
1
;
top
:
100%
;
visibility
:
visible
;
}
.navbar
.dropdown
.dropdown
ul
{
top
:
0
;
left
:
calc
(
100%
-
30px
);
visibility
:
hidden
;
}
.navbar
.dropdown
.dropdown
:hover
>
ul
{
opacity
:
1
;
top
:
0
;
left
:
100%
;
visibility
:
visible
;
}
@media
(
max-width
:
1366px
)
{
.navbar
.dropdown
.dropdown
ul
{
left
:
-90%
;
...
...
@@ -1737,8 +1681,22 @@ section {
}
#gambar
{
width
:
400px
;
width
:
100%
;
height
:
400px
;
object-fit
:
cover
;
object-position
:
center
;
display
:
block
;
margin-left
:
auto
;
margin-right
:
auto
;
}
.card
>
.card-body
{
text-align
:
justify
;
text-justify
:
inter-word
;
}
.card
>
.card-body
>
.btn
{
float
:
right
;
border-radius
:
25px
;
background-color
:
#009961
;
}
public/upload/1626978697_df7a4610f5e50e35e167.jpg
0 → 100644
View file @
4a8a71a2
167 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