Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
pa2d4ti06
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
Juliper
pa2d4ti06
Commits
5e7ac728
Commit
5e7ac728
authored
May 13, 2017
by
Palti Sinaga
Browse files
Options
Browse Files
Download
Plain Diff
a
parents
318ab22a
70875f94
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
179 additions
and
23 deletions
+179
-23
CustomerController.php
app/Http/Controllers/CustomerController.php
+21
-18
ListBook.php
app/ListBook.php
+17
-0
Homestay.blade.php
...es/views/vendor/adminlte/layouts/pages/Homestay.blade.php
+124
-5
mainheader.blade.php
...s/vendor/adminlte/layouts/partialweb/mainheader.blade.php
+17
-0
No files found.
app/Http/Controllers/CustomerController.php
View file @
5e7ac728
...
@@ -3,6 +3,7 @@
...
@@ -3,6 +3,7 @@
namespace
App\Http\Controllers
;
namespace
App\Http\Controllers
;
use
App\Homestay
;
use
App\Homestay
;
use
App\ListBook
;
use
App\Room
;
use
App\Room
;
use
App\Transaksi
;
use
App\Transaksi
;
use
Illuminate\Http\Request
;
use
Illuminate\Http\Request
;
...
@@ -113,8 +114,8 @@ class CustomerController extends Controller
...
@@ -113,8 +114,8 @@ class CustomerController extends Controller
}
}
public
function
booking
(
Request
$request
){
public
function
booking
(
Request
$request
){
$lb
=
new
ListBook
();
//dd($data,$room);
$data
=
DB
::
table
(
'homestay'
)
$data
=
DB
::
table
(
'homestay'
)
->
join
(
'kamar'
,
'homestay.id'
,
'='
,
'kamar.idHomestay'
)
->
join
(
'kamar'
,
'homestay.id'
,
'='
,
'kamar.idHomestay'
)
->
select
(
'kamar.*'
,
'homestay.harga'
)
->
select
(
'kamar.*'
,
'homestay.harga'
)
...
@@ -123,12 +124,12 @@ class CustomerController extends Controller
...
@@ -123,12 +124,12 @@ class CustomerController extends Controller
$data2
=
DB
::
table
(
'users'
)
$data2
=
DB
::
table
(
'users'
)
->
join
(
'pelanggan'
,
'users.id'
,
'='
,
'pelanggan.id_Akun'
)
->
join
(
'pelanggan'
,
'users.id'
,
'='
,
'pelanggan.id_Akun'
)
->
select
(
'pelanggan.id'
)
->
select
(
'pelanggan.id'
,
'pelanggan.nama'
)
->
where
(
'users.id'
,
'='
,
Auth
::
user
()
->
id
)
->
where
(
'users.id'
,
'='
,
Auth
::
user
()
->
id
)
->
get
();
->
get
();
$time
=
explode
(
'-'
,
$request
[
'tanggal'
]);
$time
=
explode
(
'-'
,
$request
[
'tanggal'
]);
$time
[
1
]
+=
$request
[
'jumlah_hari'
];
$time
[
2
]
+=
$request
[
'jumlah_hari'
];
$baru
=
join
(
'-'
,
$time
);
$baru
=
join
(
'-'
,
$time
);
...
@@ -142,21 +143,23 @@ class CustomerController extends Controller
...
@@ -142,21 +143,23 @@ class CustomerController extends Controller
$trans
->
save
();
$trans
->
save
();
$dataTrans
=
DB
::
table
(
'transaksi'
)
->
select
(
'transaksi.*'
)
->
where
(
'transaksi.id_pelanggan'
,
'='
,
$data2
[
0
]
->
id
)
// $dataTrans = DB::table('transaksi')
->
get
();
// ->select('transaksi.*')
// ->where('transaksi.id_pelanggan','=',$data2[0]->id)
$room
=
Room
::
all
()
->
where
(
'idHomestay'
,
$data
[
0
]
->
idHomestay
);
// ->get();
//
for
(
$i
=
0
;
$i
<=
$request
[
'jumlah_kamar'
];
$i
++
){
// $room = Room::all()->where('idHomestay',$data[0]->idHomestay);
if
(
$room
[
$i
]
->
id_transaksi
==
null
){
//
$upRoom
=
Room
::
find
(
$room
[
$i
]
->
id
);
// for ($i=0;$i<=$request['jumlah_kamar'];$i++){
$upRoom
->
id_transaksi
=
$dataTrans
[
0
]
->
id
;
// if($room[$i]->id_transaksi==null){
$upRoom
->
update
();
// $upRoom = Room::find($room[$i]->id);
}
// $upRoom->id_transaksi = $dataTrans[0]->id;
}
// $upRoom->update();
// }
// }
dd
(
"masuk gan"
,
$request
[
'tanggal'
],
$time
,
$baru
,
$request
[
'id'
],
$data2
,
$data
);
dd
(
"masuk gan"
,
$request
[
'tanggal'
],
$time
,
$baru
,
$request
[
'id'
],
$data2
,
$data
);
}
}
...
...
app/ListBook.php
0 → 100644
View file @
5e7ac728
<?php
namespace
App
;
use
Illuminate\Database\Eloquent\Model
;
class
ListBook
extends
Model
{
protected
$table
=
"daftar_book"
;
protected
$fillable
=
[
'nama_pemesan'
,
'tanggal_mulai'
,
'tanggal_berakhir'
];
public
$timestamps
=
false
;
}
resources/views/vendor/adminlte/layouts/pages/Homestay.blade.php
View file @
5e7ac728
...
@@ -13,6 +13,7 @@
...
@@ -13,6 +13,7 @@
<br><br>
<br><br>
<div class="
col
-
md
-
12
col
-
sm
-
12
agileits
w3layouts
contact
-
grid
contact
-
grid
-
2
wow
slideInLeft
">
<div class="
col
-
md
-
12
col
-
sm
-
12
agileits
w3layouts
contact
-
grid
contact
-
grid
-
2
wow
slideInLeft
">
<form action="
{{
url
(
'book'
)}}
" method="
post
">
<form action="
{{
url
(
'book'
)}}
" method="
post
">
<<<<<<< HEAD
<input type="
hidden
" name="
_token
" value="
{{
csrf_token
()
}}
">
<input type="
hidden
" name="
_token
" value="
{{
csrf_token
()
}}
">
<input type="
hidden
" name="
id
" value="
{{
$data
->
id
}}
">
<input type="
hidden
" name="
id
" value="
{{
$data
->
id
}}
">
...
@@ -37,11 +38,62 @@
...
@@ -37,11 +38,62 @@
</a>
</a>
</div>
</div>
</form>
</form>
=======
<input type="
hidden
" name="
_token
" value="
{{
csrf_token
()
}}
">
<input type="
hidden
" name="
id
" value="
{{
$data
->
id
}}
">
<div class="
col
-
md
-
3
col
-
sm
-
3
agileits
w3layouts
contact
-
grid
contact
-
grid
-
2
wow
slideInLeft
">
<input class="
date
agileits
w3layouts
" id="
datepicker1
" name="
tanggal
" type="
text
" value="
Tanggal
Check
in
" onfocus="
this
.
value
=
''
;
" onblur="
if
(
this
.
value
==
''
)
{
this
.
value
=
''
;}
" required="">
</div>
<div class="
col
-
md
-
3
col
-
sm
-
3
agileits
w3layouts
contact
-
grid
contact
-
grid
-
2
wow
slideInLeft
">
<input type="
text
" class="
text
wow
agileits
w3layouts
slideInLeft
" name="
jumlah_hari
" placeholder="
Lama
Menginap
" required="" style="
background
-
color
:
white
;
color
:
black
">
</div>
<div class="
col
-
md
-
3
col
-
sm
-
3
agileits
w3layouts
contact
-
grid
contact
-
grid
-
2
wow
slideInLeft
">
<input type="
text
" class="
text
wow
agileits
w3layouts
slideInLeft
" name="
jumlah_kamar
" placeholder="
Jumlah
Kamar
" required="" style="
background
-
color
:
white
;
color
:
black
">
</div>
<div class="
col
-
md
-
3
col
-
sm
-
3
agileits
w3layouts
contact
-
grid
contact
-
grid
-
2
wow
slideInLeft
">
<input type="
submit
" class="
more_btn
wow
agileits
w3layouts
slideInLeft
" value="
Book
Now
">
</div>
</form>
>>>>>>> 70875f94bbc7d19947e16e1b35c430c4bceddcca
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Booking -->
<!-- Booking -->
<div class="
details
agilets
w3layouts
" >
<div class="
container
">
<div class="
cuisines
agileits
w3layouts
">
<div class="
container
">
<table class="
table
table
-
striped
">
<thead>
<tr>
<th> No. </th>
<th> No. Rekening </th>
<th> Atas Nama </th>
<th> Total Pembayaran </th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>456141923</td>
<td>Palti Sinaga</td>
<td>2.400.000</td>
</tr>
<tr class="
success
">
<td>2</td>
<td>09179287213</td>
<td>Lestari Siregar</td>
<td>2.123.091</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
<!-- Informations -->
<!-- Informations -->
<div class="
cuisines
agileits
w3layouts
">
<div class="
cuisines
agileits
w3layouts
">
<div class="
container
">
<div class="
container
">
...
@@ -75,10 +127,6 @@
...
@@ -75,10 +127,6 @@
<div class="
details
-
grid
-
image
agileits
w3layouts
">
<div class="
details
-
grid
-
image
agileits
w3layouts
">
<img src="
{{
asset
(
'img/project-1.jpg'
)}}
" alt="
Agileits
W3layouts
" data-toggle="
modal
" data-target="
#myModal" style="cursor: pointer;">
<img src="
{{
asset
(
'img/project-1.jpg'
)}}
" alt="
Agileits
W3layouts
" data-toggle="
modal
" data-target="
#myModal" style="cursor: pointer;">
</
div
>
</
div
>
<!--
<
div
class
="
details
-
grid
-
info
agileits
w3layouts
">
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua ut enim ad minim veniam.</p>
</div> -->
<!-- <button class="
btn
btn
-
primary
wow
agileits
w3layouts
fadeInLeft
" data-toggle="
modal
" data-target="
#myModal">EXPLORE<span class="glyphicon agileits w3layouts glyphicon-arrow-right" aria-hidden="true"></span></button> -->
<
div
class
="
clearfix
"></div>
<
div
class
="
clearfix
"></div>
</div>
</div>
</div>
</div>
...
@@ -113,8 +161,9 @@
...
@@ -113,8 +161,9 @@
<h2 style="
margin
-
bottom
:
10
px
;
"> Kritik dan Saran</h2>
<h2 style="
margin
-
bottom
:
10
px
;
"> Kritik dan Saran</h2>
<form action="
#" method="post" style="margin-bottom: 25px;">
<form action="
#" method="post" style="margin-bottom: 25px;">
</form>
<<<<<<<
HEAD
<
input
type
=
"text"
class
="
text
wow
agileits
w3layouts
slideInLeft
" name="
Name
" placeholder="
Name
" required="">
<
input
type
=
"text"
class
="
text
wow
agileits
w3layouts
slideInLeft
" name="
Name
" placeholder="
Name
" required="">
<input type="
text
" class="
text
wow
agileits
w3layouts
slideInLeft
" name="
Email
" placeholder="
Email
" required="">
<input type="
text
" class="
text
wow
agileits
w3layouts
slideInLeft
" name="
Email
" placeholder="
Email
" required="">
...
@@ -124,6 +173,25 @@
...
@@ -124,6 +173,25 @@
</form>
</form>
</div>
</div>
</div>
</div>
=======
<h2 style="
margin
-
bottom
:
10
px
;
"> Kritik dan Saran </h2>
<form action ="
#" method="post" style="margin-bottom: 25px;"></form>
<
h2
style
=
"margin-bottom: 10px;"
>
Kritik
dan
Saran
</
h2
>
<
form
action
=
"#"
method
=
"post"
style
=
"margin-bottom: 25px;"
>
<
h2
style
=
"margin-bottom: 10px;"
>
Kritik
dan
Saran
</
h2
>
</
form
>
<
form
action
=
"#"
method
=
"post"
style
=
"margin-bottom: 25px;"
>
<
input
type
=
"text"
class
="
text
wow
agileits
w3layouts
slideInLeft
" name="
Name
" placeholder="
Name
" required="">
<input type="
text
" class="
text
wow
agileits
w3layouts
slideInLeft
" name="
Email
" placeholder="
Email
" required="">
<textarea name="
Message
" class="
wow
agileits
w3layouts
slideInLeft
" placeholder="
Message
" required=""></textarea>
<input type="
submit
" class="
more_btn
wow
agileits
w3layouts
slideInLeft
" value="
Send
Message
">
</button>
</form>
<div>
</div>
>>>>>>> 70875f94bbc7d19947e16e1b35c430c4bceddcca
</div>
</div>
...
@@ -132,7 +200,58 @@
...
@@ -132,7 +200,58 @@
<script>
<script>
$('#myModal').modal('');
$('#myModal').modal('');
</script>
</script>
<<<<<<< HEAD
<!-- Date-Picker-JavaScript -->
<!-- Date-Picker-JavaScript -->
<script src="
{{
asset
(
'js/jquery-ui.js'
)}}
"></script>
<script src="
{{
asset
(
'js/jquery-ui.js'
)}}
"></script>
@endsection
@endsection
=======
<script>
document.getElementById('book').onclick = function(){
swal("
Good
job
!
", "
You
clicked
the
button
!
", "
success
");};
</script>
<script>
document.querySelector(' ').onclick = function(){
swal("
Good
job
!
", "
You
clicked
the
button
!
", "
success
");};
</script>
<script>
document.querySelector('').onclick = function(){
swal({
title:"
Are
you
sure
?
",
text: "
You
will
not
be
able
to
recover
this
imaginary
file
!
",
type: "
warning
",
showCancelButton: true,
confirmButtonColor: '#DD6B55',
confirmButtonText: 'Yes, delete it!',
cancelButtonText: "
No
,
cancel
plx
!
",
closeOnConfirm: false,
closeOnCancel: false
},
function(isConfirm){
if (isConfirm){
swal("
Deleted
!
", "
Your
imaginary
file
has
been
deleted
!
", "
success
");
} else {
swal("
Cancelled
", "
Your
imaginary
file
is
safe
:
)
", "
error
");
}
});
};
</script>
</div>
</div>
@endsection
>>>>>>> 70875f94bbc7d19947e16e1b35c430c4bceddcca
resources/views/vendor/adminlte/layouts/partialweb/mainheader.blade.php
View file @
5e7ac728
...
@@ -35,7 +35,20 @@
...
@@ -35,7 +35,20 @@
<li><a
href=
"{{url('home')}}"
>
{{Auth::user()->name}}
</a></li>
<li><a
href=
"{{url('home')}}"
>
{{Auth::user()->name}}
</a></li>
@endif
@endif
</a>
</a>
<
<<<<<<
HEAD
=
======
<
ul
class=
"dropdown-menu"
>
<!-- The user image in the menu -->
<li
class=
"user-header"
>
{{--
<img
src=
"{{ Gravatar::get($user->email) }}"
class=
"img-circle"
alt=
"User Image"
/>
--}}
<p>
<img
src=
"img/{{ Auth::user()->foto }}"
class=
"img-circle"
alt=
"User Image"
/>
<!-- {{ Auth::user()->name }} -->
<!-- <small>{{ trans('adminlte_lang::message.login') }} </small> -->
</p>
</li>
>>>>>>> 70875f94bbc7d19947e16e1b35c430c4bceddcca
@if(Auth::user()->role=="Customer")
@if(Auth::user()->role=="Customer")
<ul
class=
"dropdown-menu"
>
<ul
class=
"dropdown-menu"
>
<!-- The user image in the menu -->
<!-- The user image in the menu -->
...
@@ -47,7 +60,10 @@
...
@@ -47,7 +60,10 @@
</p>
</p>
</li>
</li>
<!-- Menu Body -->
<!-- Menu Body -->
<
<<<<<<
HEAD
=
======
>
>>>>>> 70875f94bbc7d19947e16e1b35c430c4bceddcca
<!-- Menu Footer-->
<!-- Menu Footer-->
<li
class=
"user-footer"
>
<li
class=
"user-footer"
>
...
@@ -76,6 +92,7 @@
...
@@ -76,6 +92,7 @@
<!-- <li><a href="codes.html">CODES</a></li> -->
<!-- <li><a href="codes.html">CODES</a></li> -->
<!-- <li><a href="booking.html">BOOKING</a></li> -->
<!-- <li><a href="booking.html">BOOKING</a></li> -->
</ul>
</ul>
</ul>
</div>
</div>
</div>
</div>
</nav>
</nav>
...
...
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