-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathdashboard.php
975 lines (844 loc) · 33.7 KB
/
dashboard.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
<!doctype html>
<html>
<head>
<title>Dashboard</title>
<?php include 'lib/top.php';?>
</head>
<body>
<?php session_start();
include_once('connect.php');
if(isset($_SESSION['u_id']))
{ ?>
<div class="container-fluid"><!--container-fluid start-->
<div class="row">
<!--==============menu header=========================-->
<div class="menu-had2">
<?php include 'lib/header.php';?>
</div><!--menu-had close-->
<!--==============menu header close=========================-->
<?php include 'lib/dashboardmenu.php';?>
<?php if(isset($_GET['del']))
{
$id = $_GET['del'];
$sql = mysqli_query($connect,"SELECT * FROM booking WHERE bookid='".$id."'");
if(mysqli_num_rows($sql)>0)
{
$row = mysqli_fetch_array($sql);
echo "SELECT * FROM users u,place p WHERE u.uid='".$row['userid']."' and placeid='".$row['pid']."'";
$sql3 = mysqli_query($connect,"SELECT * FROM users u,place p WHERE u.uid='".$row['userid']."' and placeid='".$row['pid']."'");
$row3 = mysqli_fetch_array($sql3);
$sql2 = mysqli_query($connect,"DELETE FROM booking WHERE bookid='".$id."'");
if($sql>0)
{
$message ="Dear ".$row3['fname']." ".$row3['lname'].", You have Received this mail from Bookmyspace. \n\n Your Booking Request for".$row3['space_name']." has Been Rejected\n\n";
$headers = 'From: [email protected]' . "\r\n" .
'Reply-To: [email protected]' . "\r\n" .
'X-Mailer: PHP/' . phpversion();
$mail = mail($row3['email'], 'Bookmyspace [Booking Info]', $message, $headers);
echo"<script>swal('Success','Successfully Rejected','success');</script>";
}
else
{
echo"<script>swal('Error','Unable to Reject','error');</script>";
}
}
else
{
}
} ?>
<!--========================center part=================================-->
<div class="container">
<div class="row">
<div class="center-main">
<!--==============left panel=========-->
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 border1">
<div class="main-side-panel">
<div class="pd-bottom20 ">
<?php $q1 = mysqli_query($connect,"select * from users where uid='".$_SESSION['u_id']."'");
$res = mysqli_fetch_array($q1); ?>
<div class="col-md-2">
<figure class="snip1205">
<img class="img-responsive" src="img/<?php if(!empty($res['profile'])){echo $res['profile'];}else{echo "default-user.png";} ?>">
<i class="fa fa-edit fa-2x" data-toggle="modal" data-target="#myModal"></i>
</figure>
<!-- Modal -->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header" style="background-color: #1BBC9B;color: white;">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
<h4 class="modal-title" id="myModalLabel">UPDATE PROFILE PIC</h4>
</div>
<div class="modal-body">
<div id="messages">
</div>
<form id="upload_profile">
<label class="control-label">Select Image</label>
<input id="input-4" name="input4" type="file" class="file-loading">
</form>
</div>
<div class="modal-footer">
<button type="button" style="background: #1BBC9B;
color: white;"class="btn btn-default"id="forclose" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
</div>
<div class="col-md-3">
<h3 class="text-center"><?php echo $res['fname']." ".$res['lname']; ?></h3>
<p class="text-center">
<!--<a id="a7" class="color3" data-toggle="modal" data-target="#myModal4">Edit Profile</a>-->
<a id="a6" class="b6">Edit Profile</a>
</p>
<!--<p class="text-center">
<a id="a11" class="b11">Edit Payment Information</a>
</p>-->
</div>
<div class="col-md-7">
<div class="text-center">
<button class="btn-3" data-toggle="modal" data-target="#myModal3">Change Password</button>
</div>
</div>
</div>
<div class="clearfix"></div>
</div>
</div>
<?php /*if (isset($_REQUEST['msg'])) {
if ($_REQUEST['msg'] == 'addplace') { ?>
<div style="text-align: center;"><br><br><h3 style="color: blue;">Success! You have listed a place.</h3></div>
<?php } else { ?>
<div style="text-align: center;"><br><br><h3 style="color: blue;">Delete completed.</h3></div>
<?php } }*/ ?>
<!--==============left panel close=========-->
<!--==============right panel=========-->
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 pd-lr-0 mg-bottom20">
<div class="main-panel">
<!-- =========Enquiry Block=============== -->
<div id="b1" class="welcome col-md-12 pd-lr-0 mg-top20 border1 tab_in_dash">
<div class="col-md-12 backcolor3 pd-top10">
<p class="bold">My Places</p>
</div>
<div class="col-md-12 mg-top20">
<table id="example" class="table table-striped table-bordered" cellspacing="0" width="100%">
<thead>
<tr>
<th>Sr. No</th>
<th>Place Name</th>
<th>Location</th>
<th>Property Type</th>
<th>Capacity</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<?php
$se = 1 ;
$q21 = mysqli_query($connect,"select * from place where user_id=".$_SESSION['u_id']." order by place_id desc");
while($r21 = mysqli_fetch_array($q21))
{
?>
<tr>
<td> <?php echo $se++; ?> </td>
<td> <?php echo $r21['space_name']; ?> </td>
<td> <?php echo $r21['p_address']; ?> </td>
<td> <?php $q22 = mysqli_query($connect,"select * from property where pid =".$r21['property_typeid']); $r22 = mysqli_fetch_array($q22); echo $r22['ptype']; ?> </td>
<td> <?php echo $r21['capacity']; ?> </td>
<td> <a href="demo-venue.php?placeid=<?php echo $r21['place_id']; ?>" title="View"><button class="btn-success"><i class="fa fa-eye"></i> </button></a>
<a href="calendar.php?placeid=<?php echo $r21['place_id']; ?>&placename=<?php echo $r21['space_name']; ?>"><button class="btn-success" title="Calendar"><i class="fa fa-calendar"></i> </button></a>
<a href="edit-place.php?placeid=<?php echo $r21['place_id']; ?>"><button class="btn-primary" title="Edit"><i class="fa fa-pencil"></i> </button></a>
<a href="new-actions.php?delete_place=<?php echo $r21['place_id']; ?>" id="btndelpl"><button class="btn-danger" title="Delete"><i class="fa fa-trash"></i> </button></a>
</tr>
<?php
}
?>
</tbody>
</table>
</div>
</div>
<!-- Enquiry close -->
<!-- Booking Block -->
<div id="b2" class="welcome col-md-12 pd-lr-0 mg-top20 border1 tab_in_dash">
<div class="col-md-12 backcolor3 pd-top10">
<p class="bold">My Bookings</p>
</div>
<div class="col-md-12 mg-top20">
<table id="example1" class="table table-striped table-bordered" cellspacing="0" width="100%">
<thead>
<tr>
<th>Sr. No</th>
<th>Checkin</th>
<th>Checkout</th>
<th>Venue</th>
<th>Total</th>
<!-- <th>Action</th> -->
</tr>
</thead>
<tbody>
<?php
$serial = 1;
$q19 = mysqli_query($connect,"select * from booking where userid='".$_SESSION['u_id']."' order by bookid asc");
while($r19 = mysqli_fetch_array($q19)) {
$chkin = $r19['checkin'] . " " . date_format(date_create($r19['ftime']), 'g:i a');
$chkout = $r19['checkout'] . " " . date_format(date_create($r19['ltime']), 'g:i a'); ?>
<tr>
<td><?php echo $serial++; ?></td>
<td><?php echo $chkin; ?></td>
<td><?php echo $chkout; ?></td>
<td><?php $q20 = mysqli_query($connect,"select * from place where place_id=".$r19['placeid']);
$r20 = mysqli_fetch_array($q20); echo $r20['space_name']; ?></td>
<td><?php echo $r19['online']; ?></td>
<!-- <td><a href="#">View</a></td> -->
</tr>
<?php } ?>
</tbody>
</table>
</div>
</div>
<!-- Booking Block close -->
<!-- User Booking Block -->
<div id="b10" class="welcome col-md-12 pd-lr-0 mg-top20 border1 tab_in_dash">
<div class="col-md-12 backcolor3 pd-top10">
<p class="bold">User Bookings</p>
</div>
<div class="col-md-12 mg-top20">
<table id="example1" class="table table-striped table-bordered" cellspacing="0" width="100%">
<thead>
<tr>
<th>Sr. No</th>
<th>Checkin Date</th>
<th>Checkout Date</th>
<th>User</th>
<th>Venue</th>
<th>Total</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<?php
$serial = 1;
$q19 = mysqli_query($connect,"select * from booking b, place p, users u where p.user_id='".$_SESSION['u_id']."' and p.place_id=b.placeid and b.userid=u.uid order by bookid asc");
while($r19 = mysqli_fetch_array($q19)) { ?>
<tr>
<td><?php echo $serial++; ?></td>
<td><?php echo date('d/m/Y',strtotime($r19['checkin'])); ?></td>
<td><?php if($r19 == '0000-00-00') { echo $r19['hours']; } else { echo date('d/m/Y',strtotime($r19['checkout'])); } ?></td>
<td><?php echo $r19['fname']." ".$r19['lname']; ?></td>
<td><?php echo $r19['space_name']; ?></td>
<td><?php echo $r19['online']; ?></td>
<td><a href="dashboard.php?del=<?php echo $r19['bookid']; ?>">Reject</a></td>
</tr>
<?php } ?>
</tbody>
</table>
</div>
</div>
<!-- Booking Block close -->
<!-- Enquries Block -->
<div id="b9" class="welcome col-md-12 pd-lr-0 mg-top20 border1 tab_in_dash" style="display: none;">
<div class="col-md-12 backcolor3 pd-top10">
<p class="bold">My Enquiries</p>
</div>
<div class="col-md-12 mg-top20">
<table id="example1" class="table table-striped table-bordered" cellspacing="0" width="100%">
<thead>
<tr>
<th>Sr. No</th>
<th>Checkin Date</th>
<th>Enquiry Name</th>
<th>Service</th>
<th>Guests</th>
<!-- <th>Action</th> -->
</tr>
</thead>
<tbody>
<?php
$serial = 1;
$q19 = mysqli_query($connect,"select * from enquiry where uid='".$_SESSION['u_id']."' order by eid desc");
while($r19 = mysqli_fetch_array($q19)) { ?>
<tr>
<td><?php echo $serial++; ?></td>
<td><?php echo date('d/m/Y',strtotime($r19['date1'])); ?></td>
<td><?php echo(arg1) ?></td>
<td><?php $q20 = mysqli_query($connect,"select * from services where sid=".$r19['serviceid']);
$r20 = mysqli_fetch_array($q20); echo $r20['stitle']; ?></td>
<td><?php echo $r19['nguest']; ?></td>
<!-- <td><a href="viewenquiry.php?id=<?php echo $r19['eid']; ?>">View</a></td> -->
</tr>
<?php } ?>
</tbody>
</table>
</div>
</div>
<!-- Enquries Block close -->
<!-- Services Block -->
<div id="b7" class="welcome col-md-12 col-sm-12 col-xs-12 pd-lr-0 mg-top20 border1 tab_in_dash" style="display: none;">
<div class="col-md-12 col-sm-12 col-xs-12 backcolor3 pd-top10">
<p class="bold">My Services</p>
</div>
<div class="col-md-12 mg-top20">
<table id="example" class="table table-striped table-bordered" cellspacing="0" width="100%">
<thead>
<tr>
<th>Sr. No</th>
<th>Service Name</th>
<th>Image</th>
<th>Location</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<?php
$se = 1 ;
$q26 = mysqli_query($connect,"select * from services where rid=".$_SESSION['u_id']);
while($r26 = mysqli_fetch_array($q26))
{
$pics = explode(',',$r26['photo']);
?>
<tr>
<td> <?php echo $se++;
if($pics[0]=="")
{
$image = "img/no_img.jpg";
}
else
{
if(file_exists("images/services/$pics[0]"))
{
$image = "images/services/".$pics[0];
}
else
{
$image = "img/no_img.jpg";
}
}
?> </td>
<td> <img src="<?php echo $image; ?>" class="img-responsive" style="height: 100px; width: 100px"> </td>
<td> <?php echo $r26['stitle']; ?> </td>
<td> <?php echo $r26['city'].','.$r26['state'].','.$r26['country']; ?> </td>
<td> <a href="demo-service.php?serviceid=<?php echo $r26['sid'];?>"><button class="btn-success"><i class="fa fa-eye"></i> </button></a>
<a href="edit-service.php?sid=<?php echo $r26['sid']; ?>"><button class="btn-primary"><i class="fa fa-pencil"></i> </button></a>
<a href="new-actions.php?delete_service=<?php echo $r26['sid']; ?>"><button class="btn-danger"><i class="fa fa-trash"></i> </button></a>
</td>
</tr>
<?php
}
?>
</tbody>
</table>
</div>
</div>
<!-- =========Services Block close=============== -->
<!--=========Reviews Block===============-->
<div id="b3" class="welcome col-md-12 pd-lr-0 mg-top20 border1 tab_in_dash">
<div class="col-md-12 backcolor3 pd-top10">
<p class="bold">My Reviews</p>
</div>
<div class="col-md-12 mg-top20">
<table id="example" class="table table-striped table-bordered" cellspacing="0" width="100%">
<thead>
<tr>
<th>Sr. No</th>
<th>Venue or Service</th>
<th>Review</th>
<th>Comment</th>
</tr>
</thead>
<tbody>
<?php
$se = 1 ;
$q24 = mysqli_query($connect,"select * from ratings where userid=".$_SESSION['u_id']);
while($r24 = mysqli_fetch_array($q24))
{
$pics = explode(',',$r26['photo']);
?>
<tr>
<td> <?php echo $se++; ?> </td>
<td> <?php
if($r24['serviceid']=="0")
{
$sql = mysqli_query($connect,"SELECT * FROM place WHERE place_id='".$r24['placeid']."'");
$row = mysqli_fetch_array($sql);
echo $row['space_name']; }
elseif($r24['placeid'])
{
$sql = mysqli_query($connect,"SELECT * FROM services WHERE sid='".$r24['serviceid']."'");
$row = mysqli_fetch_array($sql);
echo $row['stitle'];
}
?> </td>
<td> <h4 class="color3"><a href="demo-venue.php?placeid=<?php echo $r25['place_id']; ?>"><?php echo $r25['space_name']; ?></a></h4>
<?php for($star = 0; $star < $r24['ratings']; $star++ )
{
?>
<i class="fa fa-star" style="color: #F9BC39"></i>
<?php
}
for($star1 = 5; $star1 > $r24['ratings']; $star1-- )
{
?>
<i class="fa fa-star-o"></i>
<?php
}
?>
</td>
<td><?php echo $r24['comments']; ?></td>
</tr>
<?php
}
?>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
<!-- =========Reviews Block close=============== -->
<!--=========Favourites Block===============-->
<div id="b4" class="welcome col-md-12 col-sm-12 col-xs-12 pd-lr-0 mg-top20 border1 tab_in_dash">
<div class="col-md-12 col-sm-12 col-xs-12 backcolor3 pd-top10">
<p class="bold">My Favourites</p>
</div>
<div class="col-md-12 col-sm-12 col-xs-12 mg-top20 border-bottom pd-bottom20">
<div class="col-md-12 col-sm-12 col-xs-12 pd-lr-0">
<div class="col-md-2 col-sm-3 col-xs-12">
<img src="img/wedding1.jpg" class="img-responsive">
</div>
<div class="col-md-9 col-sm-8 col-xs-10">
<h4 class="color3">Overseas villa</h4>
<p class="mg-bottom3">Bhugaon, Pune</p>
<p class="mg-bottom3">Capacity 60</p>
</div>
<div class="col-md-1 col-sm-1 col-xs-2">
<i class="fa fa-lg fa-times color3"></i>
</div>
</div>
</div>
<div class="col-md-12 col-sm-12 col-xs-12 mg-top20 border-bottom pd-bottom20">
<div class="col-md-12 col-sm-12 col-xs-12 pd-lr-0">
<div class="col-md-2 col-sm-3 col-xs-12">
<img src="img/wedding1.jpg" class="img-responsive">
</div>
<div class="col-md-9 col-sm-8 col-xs-10">
<h4 class="color3">lorem ipsum villa</h4>
<p class="mg-bottom3">Bhugaon, Pune</p>
<p class="mg-bottom3">Capacity 60</p>
</div>
<div class="col-md-1 col-sm-1 col-xs-2">
<i class="fa fa-lg fa-times color3"></i>
</div>
</div>
</div>
</div>
<!----=========Favourites Block close===============-->
<!----=========Inbox Block===============-->
<div id="b5" class="welcome col-md-12 pd-lr-0 mg-top20 border1 tab_in_dash">
<div class="col-md-12 backcolor3 pd-top10">
<p class="bold"> <span style="font-size: 15px">Inbox </span>
<!-- <span><button style="float: right; margin-bottom: 1%;" class="btn-3" data-toggle="modal" data-target="#compose">Compose</button></span> --></p>
<p><!-- <div class="col-md-7">
<div class="text-center">
</div>
</div> --></p>
</div>
<?php $q3 = mysqli_query($connect,"select * from messages m,users u where m.mto='".$_SESSION['u_id']."' and m.mto=u.uid");
while($res3 = mysqli_fetch_array($q3)){
if($res3['mstatus'] == 'N') {
?>
<div class="col-md-12 mg-top20 border-bottom pd-bottom20 unread pd-top20" data-msgid="<?php echo $res3['mid']; ?>" style="background: #f9f9f9; cursor: pointer;">
<?php } else { ?>
<div class="col-md-12 mg-top20 border-bottom pd-bottom20">
<?php } ?>
<div class="col-md-12 pd-lr-0">
<div class="col-md-2">
<img src="img/<?php echo $res3['profile']; ?>" class="img-responsive">
</div>
<div class="col-md-10">
<h4 class="color3"><?php echo $res3['fname']; ?></h4>
<p class="mg-bottom3"><?php echo $res3['msg']; ?></p>
<form method="post" id="rpl_form">
<input name="to_msg" value="<?php echo $res3['mfrom']; ?>" type="hidden">
<div class="hides">
<textarea required="" class="form-control height90" name="reply_msg" placeholder="Type Your Message Here.."></textarea>
</div>
<button class="btn-reply more-btn mg-top10" type="button"><i class="fa fa-reply"></i> Reply</button>
<button class="btn-reply send_btn mg-top10" type="submit" style="display: none;"><i class="fa fa-share-square-o"></i> Send</button>
<button class="btn-reply cancel_btn mg-top10" type="button" style="display: none;"><i class="fa fa-times"></i> Cancel</button>
</form>
</div>
</div>
</div>
<?php }//while ?>
<!-- <div class="col-md-12 mg-top20 border-bottom pd-bottom20">
<div class="col-md-12 pd-lr-0">
<div class="col-md-2">
<img src="img/wedding1.jpg" class="img-responsive">
</div>
<div class="col-md-10">
<h4 class="color3">Overseas villa</h4>
<p class="mg-bottom3">Your request is rejected</p>
<div class="hides1">
<textarea class="form-control height90" placeholder="Reply"></textarea>
</div>
<button class="btn-reply more-btn1 mg-top10"><i class="fa fa-reply"></i> Reply</button>
</div>
</div>
</div> -->
</div>
<!--=========Inbox Block close===============-->
<!--=========Transaction History Block===============-->
<div id="b8" class="welcome col-md-12 pd-lr-0 mg-top20 border1 tab_in_dash">
<div class="col-md-12 backcolor3 pd-top10">
<?php /*$qr = mysqli_query($connect,"select count(`nid`) as total from notes where userid=".$_SESSION['u_id']." and nstatus='N'");
$rw = mysqli_fetch_array($qr);
*/
?>
<p class="bold"><h3>Notifications <?php //if($rw['total'] != 0) { ?><span class="badge notes_count"> <?php //echo $rw['total']; ?></span><?php //} ?></h3></p>
</div>
<div class="col-md-12 mg-top20">
<ul style="list-style-type: none;padding: 0px;">
<?php /*$q31 = mysqli_query($connect,"Select * from notes where userid=".$_SESSION['u_id']);
while($r31 = mysqli_fetch_array($q31)) {
$q32 = mysqli_query($connect,"select * from booking book , place p where book.bookid='".$r31['bookid']."' and book.placeid=p.place_id");
$r32 = mysqli_fetch_array($q32);
if($r31['nstatus'] == 'N')
{
?>
<li class="note-click" id="note<?php echo $r31['nid']; ?>" data-note="<?php echo $r31['nid']; ?>" style="padding: 1%; background: rgba(238, 238, 238, 0.61); cursor: pointer; border: 1px solid #eeeeee">
<?php } else { ?> <li class="" style="padding: 1%;cursor: pointer; border: 1px solid #eeeeee"> <?php } ?>
<p><i class="fa fa-bell"></i> Your Booking For Place-<?php echo $r32['space_name']; ?> Has Been Cancelled Due To Some Circumstances.</p>
</li>
<?php }*/ ?>
</ul>
</div>
</div>
<!-- =========Transaction History Block close ===============-->
<!-- =========Edit Profile=============== -->
<div id="b6" class="welcome col-md-12 pd-lr-0 mg-top20 border1 tab_in_dash">
<div class="col-md-12 backcolor3 pd-top10">
<p class="bold">Edit Profile</p>
</div>
<div class="col-md-12 mg-top20">
<form class="form-group" id="updatedata">
<div class="col-md-6 mg-top15">
<label>First Name</label>
<input type="text" class="form-control" placeholder="First Name" name="fname"required value="<?php echo $res['fname']; ?>">
</div>
<div class="col-md-6 mg-top15">
<label>Last Name</label>
<input type="text" class="form-control" placeholder="Last Name" name="lname" required value="<?php echo $res['lname']; ?>">
</div>
<div class="col-md-6 mg-top15">
<label>Email</label>
<input type="email" class="form-control" placeholder="Email address" name="email" value="<?php echo $res['email']; ?>">
</div>
<div class="col-md-6 mg-top15">
<label>Contact</label>
<input type="text" class="form-control" placeholder="Mobile" name="contact" required value="<?php echo $res['contact']; ?>">
</div>
<div class="col-md-12 mg-top15 mg-bottom20">
<button class="btn-3" type="submit" name="update">Save</button><span id="msg"><h3 style="color: blue;"></h3></span>
</div>
</form>
</div>
</div>
<!----=========Edit Profile Block close===============-->
<!-- =========Edit Payment info=============== -->
<div id="b11" class="welcome col-md-12 pd-lr-0 mg-top20 border1 tab_in_dash" style="display: none;">
<div class="col-md-12 backcolor3 pd-top10">
<p class="bold">Edit Payment Information</p>
</div>
<?php
include_once('braintree-init.php');
$clientToken = Braintree_ClientToken::generate();
$qccard = mysqli_query($connect,"Select * from stripeaccts where user_id='".$_SESSION['u_id']."'");
$ccnum = "";
$ccmonth = "";
$ccyear = "";
$cczip = "";
while($rccard = mysqli_fetch_array($qccard)) {
try {
$bresult = Braintree_Customer::find($rccard['stripe_cusid']);
$ccnum = $bresult->creditCards[0]->last4;
$ccmonth = $bresult->creditCards[0]->expirationMonth;
$ccyear = $bresult->creditCards[0]->expirationYear;
$cczip = $bresult->creditCards[0]->billingAddress->postalCode;
}
catch (Braintree_Exception_NotFound $e) {
echo $e->getMessage();
}
?>
<div class="col-md-12 mg-top20">
<form id="ccsave-form" method="post" class="form-inline">
<div class="row">
<div class="form-group col-md-2">
<label class="control-label">Card Number</label>
<div class="form-control" id="card-number"></div>
<!--<input type="text" value="************<?php echo $ccnum ?>">-->
</div>
<div class="form-group col-md-2">
<label class="control-label">Expiration Month</label>
<div class="form-control" id="expiration-month"></div>
<!--<input type="text" value="<?php echo $ccmonth ?>">-->
</div>
<div class="form-group col-md-2">
<label class="control-label">Expiration Year</label>
<div class="form-control" id="expiration-year"></div>
<!--<input type="text" value="<?php echo $ccyear ?>">-->
</div>
<div class="form-group col-md-2">
<label class="control-label">Security Code</label>
<div class="form-control" id="cvv"></div>
<!--<input type="text" value="***">-->
</div>
<div class="form-group col-md-2">
<label class="control-label">Zipcode</label>
<div class="form-control" id="postal-code"></div>
<!--<input type="text" value="***">-->
</div>
<div class="form-group col-md-2" style="padding-top: 20px;">
<input id="cusid" type="hidden" value="<?php echo $rccard['stripe_cusid'] ?>">
<input id="ccsave" type="submit" value="Save">
<input id="ccdel" type="button" value="Delete">
</div>
</div>
<div class="row">
<!--<div class="form-group col-md-8">
<input type="submit" value="Save">
<input type="submit" value="Delete">
</div>-->
<span class="helper-text"></span>
</div>
<!--<button value="submit" id="submit" class="btn btn-success btn-lg center-block">Pay with <span id="card-type">Card</span></button>-->
<input type="hidden" name="payment-method-nonce">
<div style="height: 10px;"></div>
</form>
</div>
<script src="https://js.braintreegateway.com/web/3.7.0/js/client.min.js"></script>
<!-- Load the Hosted Fields component. -->
<script src="https://js.braintreegateway.com/web/3.7.0/js/hosted-fields.min.js"></script>
<script>
// We generated a client token for you so you can test out this code
// immediately. In a production-ready integration, you will need to
// generate a client token on your server (see section below).
var form = document.querySelector('#ccsave-form');
var submit = document.querySelector('input[type="submit"]');
var authorize = '<?php echo $clientToken ?>';
braintree.client.create({
// Replace this with your own authorization.
authorization: authorize
}, function (clientErr, clientInstance) {
if (clientErr) {
// Handle error in client creation
return;
}
braintree.hostedFields.create({
client: clientInstance,
styles: {
'input': {
'font-size': '12pt'
},
'font-family': 'helvetica, tahoma, calibri, sans-serif',
'input.invalid': {
'color': 'red'
},
'input.valid': {
'color': 'black'
}
},
fields: {
number: {
selector: '#card-number',
placeholder: "<?php if ($ccnum) { echo '************' . $ccnum; } ?>"
},
cvv: {
selector: '#cvv',
placeholder: '***'
},
expirationMonth: {
selector: '#expiration-month',
placeholder: '<?php if ($ccmonth) { echo $ccmonth; } ?>',
select: true
},
expirationYear: {
selector: '#expiration-year',
placeholder: '<?php if ($ccyear) { echo $ccyear; } ?>',
select: true
},
postalCode: {
selector: '#postal-code',
placeholder: '<?php if ($cczip) { echo $cczip; } ?>'
}
}
}, function (hostedFieldsErr, hostedFieldsInstance) {
if (hostedFieldsErr) {
// Handle error in Hosted Fields creation
return;
}
submit.removeAttribute('disabled');
form.addEventListener('submit', function (event) {
event.preventDefault();
hostedFieldsInstance.tokenize(function (tokenizeErr, payload) {
if (tokenizeErr) {
// Handle error in Hosted Fields tokenization
return;
}
// Put `payload.nonce` into the `payment-method-nonce` input, and then
// submit the form. Alternatively, you could send the nonce to your server
// with AJAX.
console.log(payload.nonce);
document.querySelector('input[name="payment-method-nonce"]').value = payload.nonce;
form.submit();
});
}, false);
});
});
</script>
<?php
} ?>
</div>
<!----=========Edit Payment Info Block close===============-->
</div>
</div>
<!--==============Right Panel close=========-->
</div><!--center-main close-->
</div><!--row close-->
</div><!--container close-->
<!-- change pwd Modal box start -->
<div id="myModal3" class="modal fade" role="dialog">
<div class="modal-dialog">
<!-- Modal content-->
<div class="modal-content">
<div class="modal-header password-header">
<button type="button" class="close" data-dismiss="modal">×</button>
<h4 class="modal-title">Change Password</h4>
</div>
<form id="change_pass">
<div class="modal-body">
<input type="password" class="form-control" placeholder="Current Password" name="curepassword" required>
<input type="password" class="form-control mg-top15" placeholder="New Password" name="newpassword" required>
<input type="password" class="form-control mg-top15" placeholder="Confirm Password" name="confpassword" required>
<div class="text-center">
<button class="btn-5 mg-top15" type="submit">Save</button>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal" name="change_pass">Close</button>
</div>
</form>
</div>
</div>
</div>
<!-- change pwd modal box close -->
<div id="myModal4" class="modal fade" role="dialog">
<div class="modal-dialog">
<!-- Modal content-->
<div class="modal-content">
<div class="showload" style="display:none;">
<img class="showimg" src="img/loading.gif" style="margin:0 auto;display:block;">
</div>
<div class="hidecontent">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">×</button>
<h4 class="modal-title">Update your profile</h4>
</div>
<div class="modal-body">
<div class="" id="third-block">
<form class="form-group" action="actions.php" id="updprof_form" method="POST">
<div class="input-group">
<span class="input-group-addon"><i class="fa fa-user"></i></span>
<input type="text" class="form-control form-height40 bord-0" name="fname" placeholder="First Name" required/>
</div>
<div class="input-group mg-top20">
<span class="input-group-addon"><i class="fa fa-user"></i></span>
<input type="text" class="form-control form-height40 bord-0" name="lname" placeholder="Last Name" required/>
</div>
<div class="input-group mg-top20">
<span class="input-group-addon"><i class="fa fa-phone"></i></span>
<input type="text" maxlength="15" class="form-control form-height40 bord-0 phone" name="contact" placeholder="Mobile" required/>
</div>
<div class="text-center mg-top10">
<button type="submit" name="signup" id="signup" class="btn-4">Save</button>
<button type="button" class="btn-back" data-dismiss="modal">Back</button>
</div>
</form>
</div>
</div>
<div class="modal-footer" style="text-align: center;">
<!-- <button type="button" class="btn btn-default" data-dismiss="modal">Close</button> -->
<span class="showmsg" style="display:none;"></span>
</div>
</div>
<br>
</div>
</div>
</div>
<!-- compose msg Modal box start -->
<div id="compose" class="modal fade" role="dialog">
<div class="modal-dialog">
<!-- Modal content-->
<div class="modal-content">
<div class="modal-header password-header">
<button type="button" class="close" data-dismiss="modal">×</button>
<h4 class="modal-title">Compose Message</h4>
</div>
<form id="compose_msg" method="post">
<div class="modal-body">
<select id="select1" class="form-control" multiple="multiple" name="tos[]" required >
<!-- <option value="" hidden>Select Uses</option> -->
<?php $query=mysqli_query($connect,'Select * from users where uid !='.$_SESSION['u_id']);
while($match=mysqli_fetch_array($query)){?>
<option value="<?php echo $match['uid'];?>"><?php echo $match['email'];?></option>
<?php }//while ?>
</select>
<!-- <input type="text" class="form-control" placeholder="To" name="to" required> -->
<!-- <input type="text" class="form-control mg-top15" placeholder="" name="" required> -->
<textarea class="form-control mg-top15" name="message" required="" placeholder="Type Your Message Here.."></textarea>
<div class="text-center">
<button class="btn-5 mg-top15" type="submit">Send</button>
</div>
</div>
<div class="modal-footer">
<!-- <button type="button" class="btn btn-default" data-dismiss="modal" name="change_pass">Close</button> -->
</div>
</form>
</div>
</div>
</div>
<!-- compose msg modal box close -->
<?php }
else
{
header('location:index.php');
}?>
<!--========================center part close=================================-->
<!--======footer======-->
<?php include 'lib/footer.php';?>
<script type="text/javascript">
$(document).ready(function(){
$('a#btndelpl').click(function(e){
var r = confirm("Confirm deletion.");
if (r == false) {
e.preventDefault();
return false;
} else {
return true;
}
});
});
</script>
<!--======footer close======-->
</div><!--row close-->
</div><!--container-fluid close-->
<style>
.multiselect-selected-text
{
max-width: 100%;
display: inline-block;
overflow: hidden;
text-overflow: ellipsis;
}
</style>
</body>
</html>