-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathmanager.php
More file actions
732 lines (686 loc) · 36.8 KB
/
manager.php
File metadata and controls
732 lines (686 loc) · 36.8 KB
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
<?php
session_start();
if(!isset($_SESSION["ID"]) || $_SESSION["ID"]==""){
header('location:index.php');
}
else if(isset($_SESSION["STUS"]) && ($_SESSION["STUS"]=="memeber"||$_SESSION["STUS"]=="none")){
$_SESSION["ID"]="";
header('location:memeber.php');
}
$userID=$_SESSION["MG"];
$memID=$_SESSION["ID"];
include 'dbconnect.php';
$AllMemberID=array();
$AllMemberName=array();
$AllMemberMeal=array();
$tm="member".$userID;
$sql="SELECT account.ID as ID, account.Name as Name,".$tm.".Meal as Meal from account INNER JOIN ".$tm." ON account.ID=".$tm.".ID AND ".$tm.".Type='member'";
$result = $conn->query($sql);
while($row = $result->fetch_assoc()) {
$AllMemberName[]=$row["Name"];
$AllMemberID[]=$row["ID"];
$AllMemberMeal[]=$row["Meal"];
}
?>
<!DOCTYPE html>
<html>
<head>
<title>Online Meal Management</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<link href="http://fonts.googleapis.com/css?family=Lato" rel="stylesheet" type="text/css">
<link href="http://fonts.googleapis.com/css?family=Montserrat" rel="stylesheet" type="text/css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<link rel="stylesheet" type="text/css" href="mycss/manager.css"/>
<script src="myjs/manager.js"></script>
</head>
<body id="myPage" data-spy="scroll" data-target=".navbar" data-offset="50">
<nav class="navbar navbar-default navbar-fixed-top">
<div class="container-fluid">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#myNavbar">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="#myPage">HOME</a>
</div>
<div class="collapse navbar-collapse" id="myNavbar">
<ul class="nav navbar-nav navbar-right">
<li><a href="#profile">PROFILE</a></li>
<li><a href="#notice">NOTICE</a></li>
<li><a href="#status">STATUS</a></li>
<li class="dropdown">
<a class="dropdown-toggle" data-toggle="dropdown" href="#">UPDATE
<span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="#" data-toggle="modal" data-target="#AddNotice">Add Notice</a></li>
<li><a href="#" data-toggle="modal" data-target="#Common_Meal">Common Meal</a></li>
<li><a href="#" data-toggle="modal" data-target="#Balance_Update">Balance Update</a></li>
<li><a href="#" data-toggle="modal" data-target="#Meal_Update">Meal Update</a></li>
<li><a href="#" data-toggle="modal" data-target="#Extra_Cost_Update">Extra Cost</a></li>
</ul>
</li>
<li class="dropdown">
<a class="dropdown-toggle" data-toggle="dropdown" href="#">MORE
<span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="#" data-toggle="modal" data-target="#mem_req">Join Request</a></li>
<li><a href="#" data-toggle="modal" data-target="#MealStatus">My Meal</a></li>
<li><a href="#" data-toggle="modal" data-target="#ClogGroup">Close Your Group.</a></li>
<li><a href="#" data-toggle="modal" data-target="#UpdateProfile">Update Profile</a></li>
</ul>
</li>
<li><a href="loout.php" data-toggle="tooltip" data-placement="bottom" title="Log Out"><span class="glyphicon glyphicon-log-out"> </span></a></li>
</ul>
</div>
</div>
</nav>
<!-- This Is Back Ground Crousal for Profile-->
<header id="myCarousel" class="carousel slide">
<div class="carousel-inner">
<div class="item active">
<div class="fill" style="background-image:url('pic/1.jpg');"></div>
</div>
<div class="item">
<div class="fill" style="background-image:url('pic/2.jpg');"></div>
</div>
<div class="item">
<div class="fill" style="background-image:url('pic/3.jpg');"></div>
</div>
<div class="item">
<div class="fill" style="background-image:url('pic/4.jpg');"></div>
</div>
</div>
</header>
<div class="cls1"> <!-- This div Containing Whole thing-->
<div id="profile" class="container-fluid text-center cls2"><!-- This Is Profile Div-->
</br>
</br>
<?php
$sql="SELECT Email,Name,Birth,Mobile,Gender,Pro FROM account WHERE ID=".$memID;
$result = $conn->query($sql);
if($result->num_rows > 0)
{
$result=$result->fetch_array();
$ProPic=$result["Pro"];
if($userID!=""){
$sql="SELECT Name,Fix FROM manager WHERE ID=".$userID;
$result2=$conn->query($sql);
$result2=$result2->fetch_array();
$grp=$result2['Name'];
}
else{
$grp="Not Available";
}
}
else{
header('location:index.php');
}
?>
<div class="col-sm-12">
<img id="propic"src="<?php echo $result["Pro"];?>" class="img-circle" alt="User" width="220" height="220">
</div>
<h1><?php echo $result["Name"];?></h1>
<h2><?php echo $result["Email"];?></h2>
<h2><?php echo $result["Birth"];?></h2>
<p><strong>Gender: </strong><?php echo $result["Gender"];?></p>
<p><strong>Mobile: </strong><?php echo $result["Mobile"];?></p>
<p><strong>Group: </strong><?php echo $grp."(".$_SESSION["STUS"].")";?></p>
</div> <!-- here End Of Profile -->
<div id="notice" class="cls3"><!-- This Is Notice Div-->
<div class="container text-center">
<h1>NOTICE</h1>
<p><em>All Available Notice Are Below.</em></p>
<?php
if($userID!=""){
$tm="ntc".$userID;
$sql="SELECT * FROM ".$tm." ORDER BY NtcID DESC";
$result = $conn->query($sql);
if($result->num_rows > 0){
while($row = $result->fetch_assoc()) {
echo '
<div class="container-fluid text-center cls_ntc slideanim">
<button type="button" class="btn btn-default btn-sm pull-right ntc_btn" data-toggle="tooltip" data-placement="bottom" title="Remove" value="'.$row["NtcID"].'">
<span class="glyphicon glyphicon-remove"></span>
</button><br>
<p>'.$row["Msg"].'</p>
</br>
<div class="col-sm-6 text-left" style="color:#FB667A;">
</br>
</br>
<h4>Till:</h4>
<h4>Date: '.$row["Till"].'</h4>
</div>
<div class="col-sm-6" style="color:#FB667A;">
<p align="right">Given By</p>
<img id="mpro"src="'.$ProPic.'" class="img-circle" alt="User" width="60" height="60" align="right">
</br>
</br>
</br>
<p align="right" style="font-size:10px;">'.$row["Gdate"].'</p>
</div>
</div>';
}
}
else{
echo "</br>";
echo "</br>";
echo "</br>";
echo "</br>";
echo "</br>";
echo "<h3> NO CONTENT</h3>";
echo "</br>";
echo "</br>";
echo "</br>";
echo "</br>";
echo "</br>";
}
}
else{
echo "</br>";
echo "</br>";
echo "</br>";
echo "</br>";
echo "</br>";
echo "<p>You are not a part of any group</p>";
echo "<h3> Now you may select or create a Group</h3>";
echo "</br>";
echo "</br>";
echo "</br>";
echo "</br>";
echo "</br>";
}
?>
</div>
</div>
<div id="status" class="cls4"> <!--this belongs to status -->
<div class="container text-center">
<h1>STATUS</h1>
<p><em>All Related Info are Given Below.</em></p>
<h2>#Last Meal Update.</h2>
<div class="cls5 slideanim">
<table class="container-fluid clstbl">
<thead>
<?php
$LastMealDate="";
$LastMealAmount="";
$tm="mealdate".$userID;
$sql="SELECT COUNT(*) as lastID from ".$tm;
$result = $conn->query($sql);
$row = $result->fetch_assoc();
$lastID=$row["lastID"];
if($lastID==0){
echo'<tr>
<th><h1>Name</h1></th>
<th><h1>Y/m/d</h1></th>
</tr>
</thead>
<tbody>
<tr>
<td>No Content</td>
<td>No Content</td>
</tr>';
}
else{
$sql="SELECT Mdate,Amount from ".$tm." WHERE ID=".$lastID;
$result = $conn->query($sql);
$row = $result->fetch_assoc();
$LastMealDate=$row["Mdate"];
$LastMealAmount=$row["Amount"];
echo'<tr>
<th><h1>Name</h1></th>
<th><h1>'.$row["Mdate"].'</h1></th>
</tr>
</thead>
<tbody>';
$tm="meal".$userID;
$sql="SELECT * from ".$tm." WHERE ID=".$lastID;
$result = $conn->query($sql);
$row = $result->fetch_assoc();
$arrlength = count($AllMemberID);
for($x = 0; $x < $arrlength; $x++) {
$tm="A".$AllMemberID[$x];
echo '<tr><td>'.$AllMemberName[$x].'</td><td>'.$row[$tm].'</td></tr>';
}
}
?>
</tbody>
</table>
</div>
</br>
</br>
<h2>#Balance Information.</h2>
<div class="cls5 slideanim">
<table class="container-fluid clstbl">
<thead>
<tr>
<th><h1>Name</h1></th>
<th><h1>Amount(.tk)</h1></th>
</tr>
</thead>
<tbody>
<?php
$arrlength = count($AllMemberID);
for($x = 0; $x < $arrlength; $x++) {
echo '<tr>';
echo '<td>'.$AllMemberName[$x].'</td>';
$tm='bal'.$AllMemberID[$x];
$sql="SELECT SUM(Amount) as total from ".$tm;
$result = $conn->query($sql);
$row = $result->fetch_assoc();
$sm=(0+$row["total"]);
echo '<td>'.$sm.'</td>';
echo '</tr>';
}
?>
</tbody>
</table>
</div>
</br>
</br>
<h2>#Extra Cost Information.</h2>
<div class="cls5 slideanim">
<table class="container-fluid clstbl">
<thead>
<tr>
<th><h1>Date: </h1></th>
<th><h1>Amount(.tk)</h1></th>
</tr>
</thead>
<tbody>
<?php
$tm="ext".$userID;
$sql="SELECT * from ".$tm." ORDER BY Dat ASC";
$result = $conn->query($sql);
if($result->num_rows > 0){
while($row = $result->fetch_assoc()) {
echo '<tr><td>'.$row["Dat"].'</td><td>'.$row["Amount"].'</td></tr>';
}
}
else{
echo '<tr><td>No Content</td><td>No Content</td></tr>';
}
?>
</tbody>
</table>
</div>
</div>
</div> <!-- Here end the status-->
<footer class="text-center">
<a class="up-arrow" href="#myPage" data-toggle="tooltip" title="TO TOP">
<span class="glyphicon glyphicon-chevron-up"></span>
</a><br><br>
<p><strong>Project: </strong> Online Meal Management.</p>
<p>Developed By Team: "Zero By Zero", Dept of CSE RU.</p>
</footer>
</div><!-- Main Contenet must be inside this div-->
<!-- Script to Activate the Carousel -->
<script>
$('.carousel').carousel({
interval: 5000 //changes the speed
})
</script>
<!-- This Model For Closing Group -->
<div class="modal fade modal-fullscreen " id="ClogGroup" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" style="font-size: 50px;font-weight: lighter;" data-dismiss="modal" aria-hidden="true">X</button>
</div>
<div class="modal-body container-fluid">
<div class="up_head">
<p>Close Your Group.</p>
</div>
<div class="container" style="color:#FB667A;">
<div class="mdl_form text-center">
<h1 style="color:#FB667A;" >PLEASE READ.</h1>
<br>
<strong>Are You Sure About This.</strong>
<p>This operation means that you are wanting to closing your current meal management group. If You Perform This Operation all information will be lost. Please cheak all the information and let your member awar about this action. If you already conncern about this then continue.</p>
</div>
<br>
<br>
<br>
<div class="col-sm-12">
<div class="col-sm-12 text-center">
<button id="CloseGroup" type="button" class="btn btn-danger">Close Your Group. <span class="glyphicon glyphicon-ok-sign"></span></button>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- This Model For Adding Notice -->
<div class="modal fade modal-fullscreen " id="AddNotice" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" style="font-size: 50px;font-weight: lighter;" data-dismiss="modal" aria-hidden="true">X</button>
</div>
<div class="modal-body container-fluid">
<div class="up_head">
<p>Add Notice</p>
</div>
<div class="container">
<div class="col-sm-6">
<div class="form-group">
<label for="ANtdate" style="color:#FB667A;">Till:</label>
<input type="date" class="form-control" id="ANtdate" maxlength=20>
</div>
</div>
<div class="col-sm-12">
<div class="form-group">
<label for="ANtmsg" style="color:#FB667A;">Notice:</label>
<textarea class="form-control" style="resize:none;" rows="10" id="ANtmsg" maxlength="1490" placeholder="Type:"></textarea>
</div>
</div>
<div class="col-sm-12">
<button id="ANTbtn" type="button" class="btn btn-primary">OK <span class="glyphicon glyphicon-ok"></span></button>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- This Model For Common Meal Update-->
<div class="modal fade modal-fullscreen " id="Common_Meal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" style="font-size: 50px;font-weight: lighter;" data-dismiss="modal" aria-hidden="true">X</button>
</div>
<div class="modal-body container-fluid">
<div class="up_head">
<p>Common Meal.</p>
</div>
<div class="container">
<h2 style="color:#FB667A;">#Members Recommended Meal.</h2>
<table class="container-fluid clstbl">
<thead>
<tr>
<th><h1>Name</h1></th>
<th><h1>Meal Req</h1></th>
</tr>
</thead>
<tbody>
<?php
$arrlength = count($AllMemberID);
for($x = 0; $x < $arrlength; $x++) {
echo "<tr><td>".$AllMemberName[$x]."</td><td>".$AllMemberMeal[$x]."</td></tr>";
}
?>
</tbody>
</table>
<div class="row mdl_edit text-center">
<h3 style="color:#FB667A;">Fill Information.</h3>
<div class="col-sm-6 form-group" style="text-align: left; color:#FB667A;">
<div class="form-group">
<label for="lastcmdate">Last Date:</label>
<input type="text" class="form-control" id="lastcmdate" readonly value="<?php echo $LastMealDate; ?>">
</div>
</div>
<div class="col-sm-6 form-group" style="text-align: left; color:#FB667A;">
<div class="form-group">
<label for="Lastcmcost">Last Meal Rate:</label>
<input type="text" class="form-control" id="Lastcmcost" readonly value="<?php echo $LastMealAmount; ?>">
</div>
</div>
<div class="col-sm-6 form-group" style="text-align: left; color:#FB667A;">
<div class="form-group">
<label for="cmdate">Choose Date:</label>
<input type="date" class="form-control" id="cmdate">
</div>
</div>
<div class="col-sm-6 form-group" style="text-align: left; color:#FB667A;">
<div class="form-group">
<label for="cmcost">Meal Rate:</label>
<input type="text" class="form-control" id="cmcost" onkeypress='return event.charCode >= 48 && event.charCode <= 57' maxlength="3">
</div>
</div>
<div class="col-sm-12 form-group">
<button id="cmConfirm" type="button" class="btn btn-primary">Confirm <span class="glyphicon glyphicon-ok-sign"></span></button>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- This Model For Meal Update-->
<div class="modal fade modal-fullscreen " id="Meal_Update" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" style="font-size: 50px;font-weight: lighter;" data-dismiss="modal" aria-hidden="true">X</button>
</div>
<div class="modal-body container-fluid">
<div class="up_head">
<p>Update Meal</p>
</div>
<div class="container">
<div class="form-group">
<label for="MMeID" style="color:#FB667A;">Choose A Member:</label>
<select id="MMeID" class="form-control clsinpt">
<option value="" disabled selected hidden>Select A Member.</option>
<?php
$arrlength = count($AllMemberID);
for($x = 0; $x < $arrlength; $x++) {
echo '<option style="color: black" value="'.$AllMemberID[$x].'">'.$AllMemberName[$x].'</option>';
}
?>
</select>
</div>
<div id="MuContent"></div>
</div>
</div>
</div>
</div>
</div>
<!-- This Model For Balance Update-->
<div class="modal fade modal-fullscreen " id="Balance_Update" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" style="font-size: 50px;font-weight: lighter; color: #3fb0ac" data-dismiss="modal" aria-hidden="true">X</button>
</div>
<div class="modal-body container-fluid ">
<div class="up_head">
<p>Update Balance</p>
</div>
<div class="container">
<div class="form-group">
<label for="BMeID" style="color:#FB667A;">Choose A Member:</label>
<select id="BMeID" class="form-control clsinpt">
<option value="" disabled selected hidden>Select A Member.</option>
<?php
$arrlength = count($AllMemberID);
for($x = 0; $x < $arrlength; $x++) {
echo '<option style="color: black" value="'.$AllMemberID[$x].'">'.$AllMemberName[$x].'</option>';
}
?>
</select>
</div>
<div id="BuContent"></div>
</div>
</div>
</div>
</div>
</div>
<!-- This Model For Extra cost Update-->
<div class="modal fade modal-fullscreen " id="Extra_Cost_Update" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" style="font-size: 50px;font-weight: lighter;" data-dismiss="modal" aria-hidden="true">X</button>
</div>
<div class="modal-body container-fluid">
<div class="up_head">
<p>Update ExtraCost</p>
</div>
<div class="container" id="ExContent">
</div>
</div>
</div>
</div>
</div>
<!-- This Model For Member Request-->
<div class="modal fade modal-fullscreen " id="mem_req" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" style="font-size: 50px;font-weight: lighter;" data-dismiss="modal" aria-hidden="true">X</button>
</div>
<div class="modal-body container-fluid">
<div class="up_head">
<p>All Member Request.</p>
</div>
<div class="container">
<div id="JoinContent"></div>
</div>
</div>
</div>
</div>
</div>
<!-- This Model For ProPic Update-->
<div class="modal fade modal-fullscreen " id="UpdateProfile" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" style="font-size: 50px;font-weight: lighter;" data-dismiss="modal" aria-hidden="true">X</button>
</div>
<div class="modal-body container-fluid">
<div class="up_head">
<p>Update Pfrofile</p>
</div>
<div class="container" >
<form action="changeProPic.php" method="post" class="mdl_form" enctype="multipart/form-data">
<div class="form-group">
<h3 style="color:#FB667A;">Update Your Profile Picture</h3>
<input type="file" name="fileToUpload" id="fileToUpload" class="file" accept="image/jpg, image/jpeg, image/png">
<div class="input-group col-xs-12">
<span class="input-group-addon"><i class="glyphicon glyphicon-picture"></i></span>
<input type="text" class="form-control input-lg" disabled placeholder="Upload Image">
<span class="input-group-btn">
<button class="browse btn btn-primary input-lg" type="button"><i class="glyphicon glyphicon-search"></i> Browse</button>
</span>
</div>
</div>
<button class="btn btn-primary btn-sm" type="submit"><i class="glyphicon glyphicon-ok-sign"></i> Confirm</button>
</form>
</div>
<div class="container">
</div>
<div class="container">
</div>
</div>
</div>
</div>
</div>
<div class="modal fade modal-fullscreen " id="MealStatus" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" style="font-size: 50px;font-weight: lighter;" data-dismiss="modal" aria-hidden="true">X</button>
</div>
<div class="modal-body container-fluid">
<div class="up_head">
<p>My Meal</p>
</div>
<div class="container">
<table class="container-fluid clstbl">
<thead>
<tr>
<th><h1>Date</h1></th>
<th><h1>Meal Rate</h1></th>
</tr>
</thead>
<tbody>
<?php
$tm="mealdate".$userID;
$sql="SELECT Mdate , Amount FROM ".$tm;
$result = $conn->query($sql);
if($result->num_rows > 0){
while($row = $result->fetch_assoc()) {
echo '
<tr>
<td>'.$row["Mdate"].'</td>
<td>'.$row["Amount"].'</td>
</tr>';
}
}
else{
echo '
<tr>
<td>No Content</td>
<td>No Content</td>
</tr>';
}
if($userID!=""){
$tm="member".$userID;
$sql="SELECT Meal FROM ".$tm." WHERE ID=".$userID;
$result = $conn->query($sql);
$row=$result->fetch_array();
$curMeal=$row['Meal'];
}
?>
</tbody>
</table>
<div class="row mdl_edit text-center">
<h3 style="color:#FB667A;">EDIT INFO.</h3>
<p style="color:#FB667A;"><strong>Notice: </strong> Dear member Your changes
are applicable for the dates which is not in table.</p>
<div class="col-sm-12 form-group">
<label for="MLamount" style="color:#FB667A;">Your Running Meal:</label>
<input class="form-control" type="text" id="MLamount" maxlength="4" readonly value="<?php echo $curMeal;?>">
</div>
<div class="col-sm-12 form-group">
<div class="col-sm-12 form-group">
<button id="Half" type="button" class="btn btn-info pull-left">Add Half <span class="glyphicon glyphicon-ok-sign"></span></button>
<button id="Zero" type="button" class="btn btn-info">Set Zero <span class="glyphicon glyphicon-ok-sign"></span></button>
<button id="Full" type="button" class="btn btn-info pull-right">Add Full <span class="glyphicon glyphicon-ok-sign"></span></button>
</div>
</div>
<div class="col-sm-12 form-group">
<button id="CHbtn" type="button" class="btn btn-primary">Save <span class="glyphicon glyphicon-ok"></span></button>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Animate Page slide -->
<script>
$(document).ready(function(){
$('[data-toggle="tooltip"]').tooltip();
$(".navbar a, footer a[href='#myPage']").on('click', function(event) {
if (this.hash !== "") {
event.preventDefault();
var hash = this.hash;
$('html, body').animate({
scrollTop: $(hash).offset().top
}, 900, function(){
window.location.hash = hash;
});
}
});
$(window).scroll(function() {
$(".slideanim").each(function(){
var pos = $(this).offset().top;
var winTop = $(window).scrollTop();
if (pos < winTop + 600) {
$(this).addClass("slide");
}
});
});
})
</script>
</body>
</html>
<?php
$conn->close();
?>