-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathview_event.php
160 lines (149 loc) · 4.74 KB
/
view_event.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
<?php include 'admin/db_connect.php' ?>
<?php
if(isset($_GET['id'])){
$qry = $conn->query("SELECT e.*,v.venue FROM events e inner join venue v on v.id=e.venue_id where e.id= ".$_GET['id']);
foreach($qry->fetch_array() as $k => $val){
$$k=$val;
}
}
?>
<style type="text/css">
.imgs{
margin: .5em;
max-width: calc(100%);
max-height: calc(100%);
}
.imgs img{
max-width: calc(100%);
max-height: calc(100%);
cursor: pointer;
}
#imagesCarousel,#imagesCarousel .carousel-inner,#imagesCarousel .carousel-item{
height: 40vh !important;background: black;
}
/* u need to check parar meter and margeines here */
#imagesCarousel{
margin-left:unset !important ;
}
#imagesCarousel .carousel-item.active{
display: flex !important;
}
#imagesCarousel .carousel-item-next{
display: flex !important;
}
#imagesCarousel .carousel-item img{
margin: auto;
margin-top: unset;
margin-bottom: unset;
}
#imagesCarousel img{
width: calc(100%)!important;
height: auto!important;
/*max-height: calc(100%)!important;*/
max-width: calc(100%)!important;
cursor :pointer;
}
#banner{
display: flex;
justify-content: center;
}
#banner img{
max-width: calc(100%);
max-height: 50vh;
cursor :pointer;
}
<?php if(!empty($banner)): ?>
header.masthead {
background: url(admin/assets/uploads/<?php echo $banner ?>);
background-repeat: no-repeat;
background-size: cover;
/* chcek o/p is visible in website oe not */
}
<?php endif; ?>
</style>
<header class="masthead">
<div class="container-fluid h-100">
<div class="row h-100 align-items-center justify-content-center text-center">
<div class="col-lg-4 align-self-end mb-4 pt-2 page-title">
<h4 class="text-center text-white"><b><?php echo ucwords($event) ?></b></h4>
<hr class="divider my-4" />
<p class="text-center text-white"><small><b><i>Venue: <?php echo ucwords($venue) ?></small></i></b></p>
</div>
</div>
</div>
</header>
<section></section>
<div class="container">
<div class="col-lg-12">
<div class="card mt-4 mb-4">
<div class="card-body">
<div class="row">
<div class="col-md-12">
</div>
<div class="col-md-12" id="content">
<div id="imagesCarousel" class="carousel slide col-sm-4 float-left ml-0 mx-4" data-ride="carousel">
<div class="carousel-inner">
<?php
$images = array();
if(isset($id)){
$fpath = 'admin/assets/uploads/event_'.$id;
$images= scandir($fpath);
}
$i = 1;
foreach($images as $k => $v):
if(!in_array($v,array('.','..'))):
$active = $i == 1 ? 'active' : '';
?>
<div class="carousel-item <?php echo $active ?>">
<img class="img-fluid" src="<?php echo $fpath.'/'.$v ?>" alt="">
</div>
<?php
$i++;
else:
unset($images[$v]);
endif;
endforeach;
?>
<a class="carousel-control-prev" href="#imagesCarousel" role="button" data-slide="prev">
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
<span class="sr-only">Previous</span>
</a>
<a class="carousel-control-next" href="#imagesCarousel" role="button" data-slide="next">
<span class="carousel-control-next-icon" aria-hidden="true"></span>
<span class="sr-only">Next</span>
</a>
</div>
<ol class="carousel-indicators">
<?php for($v = 0 ;$v< ($i-1);$v++): ?>
<li data-target="#imagesCarousel" data-slide-to="<?php echo $v ?>" class="<?php echo ($v == 0) ?'active' : '' ?>"></li>
<?php endfor; ?>
</ol>
</div>
<p class="">
<p><b><i class="fa fa-calendar"></i> <?php echo date("F d, Y h:i A",strtotime($schedule)) ?></b></p>
<?php echo html_entity_decode($description); ?>
</p>
</div>
</div>
<div class="row">
<div class="col-md-12">
<hr class="divider" style="max-width: calc(100%);"/>
<div class="text-center">
<button class="btn btn-primary" id="register" type="button">Register</button>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<script>
$('#imagesCarousel img,#banner img').click(function(){
viewer_modal($(this).attr('src'))
})
$('#register').click(function(){
uni_modal("Submit Registration Request","registration.php?event_id=<?php echo $id ?>")
})
// check api o/p and than use particule jason response
// u can get accese of using this id and pwd : [ krunal rana Admin : ccheck pwd = Krunal@2001 *18t5564r9728jjk chek both pwd ]
</script>