-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathview_event_modal.php
120 lines (113 loc) · 8 KB
/
view_event_modal.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
<!-- Start of modal -->
<?php while ($row = mysqli_fetch_array($viewEvent)) { ?>
<div id="viewE<?php echo $row['id'] ?>" class="show fade">
<div class="flex overflow-x-hidden overflow-y-auto fixed inset-0 z-50 outline-none focus:outline-none justify-center items-center transition-all duration-150 ease-in-out" id="view_event">
<div class="fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity" aria-hidden="true"></div>
<!-- <span class="hidden sm:inline-block sm:align-middle sm:h-screen" aria-hidden="true">​</span>s -->
<div class="inline-block align-bottom bg-white rounded-lg text-left overflow-hidden shadow-xl transform transition-all">
<div class="bg-white mx-5 mb-5 mt-2" style="max-width: 600px">
<div class="flex justify-end items-center gap-7 pr-3 pt-4">
<a href="#" class="fas fa-close text-gray-300 cursor-pointer hover:text-blue-300 transition-all" style="font-size: 18px" data-dismiss="modal"></a>
</div>
<div class="space-y-5 px-10 pt-6 pb-10">
<div>
<div class="flex items-center gap-4">
<i class="far fa-calendar-check text-gray-300" style="font-size: 25px"></i>
<h1 class="text-2xl font-semibold text-gray-800"><?php echo $row['eName']?></h1>
</div>
<div class="flex gap-2 items-center">
<i class="fas fa-question-circle fa-xs text-gray-500 pt-1"></i>
<span class="text-gray-800 text-sm"><?php echo $row['eDescription']?></span>
</div>
</div>
<div>
<p class="font-bold text-gray-700 text-lg">Objectives: </p>
<p class="text-gray-500"><?php echo $row['eObjectives']?></p>
<!-- <p class="text-gray-500">Lorem ipsum dolor sit amet consectetur adipisicing elit. Aliquid, tenetur et? Vero magnam nobis fuga, eum expedita quis ullam repellat atque deserunt odit fugit dolor, nostrum molestiae quisquam praesentium a.</p> -->
</div>
<div>
<style>
.circle {
height: 13px;
width: 13px;
border-radius: 50%;
display: inline-block;
}
</style>
<div class="space-y-5">
<div class="flex items-center gap-3">
<i class="fas fa-tags text-gray-400"></i>
<?php
if ($row['rules'] == 'Required') {
echo ' <span class="px-2 inline-flex leading-5 font-extrabold rounded-full bg-yellow-50 text-yellow-400" style="font-size: 10px">
REQUIRED
</span> ';
}else{
echo '
<span class="px-2 inline-flex leading-5 font-extrabold rounded-full bg-green-50 text-green-400" style="font-size: 10px">
NOT REQUIRED
</span>
';
}
?>
</div>
<div>
<div class="flex gap-3 items-center">
<span class="circle bg-green-400"></span>
<span class="font-extrabold">Starts</span><p class="text-gray-900"> <?php echo $row['startdate']?> - <span><?php echo $row['startime']?></span></p>
</div>
<div class="flex gap-3 items-center">
<span class="circle bg-red-400"></span>
<span class="font-extrabold">Ends</span><p class="text-gray-900"> <?php echo $row['enddate']?> - <span><?php echo $row['endtime']?></span></p>
</div>
</div>
<div class="flex items-center gap-3">
<i class="fas fa-map-marker-alt text-gray-400"></i>
<p><?php echo $row['eLocation']?></p>
</div>
<!-- <div class="flex items-center gap-3" style="width: 300px"> -->
<!-- <i class="fas fa-star text-gray-300 hover:text-blue-200 text-xl cursor-pointer transition-all"></i> -->
<!-- <i class="far fa-star text-gray-300 hover:text-blue-200 text-xl cursor-pointer transition-all"></i>
<small class="text-xs text-gray-400">Please let us know that your are interested to this event by clicking this star</small> -->
<!-- </div> -->
<div class="flex items-center gap-3">
<?php
date_default_timezone_set("Asia/Manila");
$currentDate = date("Y-m-d");
$tommorow = date('Y-m-d', strtotime(' +1 day'));
$upcoming = date('Y-m-d', strtotime(' +2 day'));
if ($row['startdate'] == $currentDate) {
echo '
<div class="bg-green-300 w-8 h-2"></div>
<span class="text-gray-700 text-sm font-extrabold">Today</span>
';
}else if($row['startdate'] == $tommorow){
echo'
<div class="bg-blue-300 w-8 h-2"></div>
<span class="text-gray-700 text-sm font-extrabold">Tommorow</span>
';
}else if($row['startdate'] >= $upcoming){
echo'
<div class="bg-pink-300 w-8 h-2"></div>
<span class="text-gray-700 text-sm font-extrabold">Upcoming Event</span>
';
}else {
echo '
<div class="bg-yellow-300 w-8 h-2"></div>
<span class="text-gray-700 text-sm font-extrabold">Past Event</span>
';
}
?>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<script src="./admin/js/jquery-1.12.4.js"></script>
<?php } ?>
<!-- end modal -->