-
Notifications
You must be signed in to change notification settings - Fork 23
/
index.php
388 lines (357 loc) · 13.9 KB
/
index.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
<!-- //comment -->
<!DOCTYPE html>
<html lang="en">
<head>
<?php
include("head.php");
?>
<title>GGSIP University USS ACM Student Chapter</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/Swiper/4.0.7/css/swiper.min.css" />
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/sweetalert2@11">
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-F3w7mX95PdgyTmZZMECAngseQB83DfGTowi0iMjiWaeVhAn4FJkqJByhZMI3AhiU" crossorigin="anonymous" />
<link rel="stylesheet" href="./assets/CSS/newStyle.css" />
<link rel="stylesheet" href="./assets/CSS/header.css">
<link rel="stylesheet" href="./assets/CSS/footer.css">
<link rel="stylesheet" href="./assets/CSS/homeTeam.css">
<link rel="stylesheet" href="./assets/CSS/newsletter.css" />
</head>
<body>
<!-- nav bar -->
<?php
include("header.php");
?>
<!-- nav-bar end -->
<!-- hero Section -->
<section class="hero-slider hero-style">
<div class="swiper-container" id="myCarousel">
<div class="swiper-wrapper">
<div class="swiper-slide">
<div class="slide-inner slide-bg-image" data-swiper-parallax="0" data-background-small="./upload/hmpg-img/carousel-img-1-mobile.jpg" data-background="./upload/hmpg-img/carousel-img-1.png"></div>
</div>
<div class="swiper-slide">
<div class="slide-inner slide-bg-image" data-swiper-parallax="0" data-background-small="./upload/hmpg-img/carousel-img-2-mobile.png" data-background="./upload/hmpg-img/carousel-img-2.jpeg"></div>
</div>
<div class="swiper-slide">
<div class="slide-inner slide-bg-image" data-swiper-parallax="0" data-background-small="./upload/hmpg-img/carousel-img-3-mobile.jpg" data-background="./upload/hmpg-img/carousel-img-3.png"></div>
</div>
<div class="swiper-slide">
<div class="slide-inner slide-bg-image" data-swiper-parallax="0" data-background-small="./upload/hmpg-img/carousel-img-4-mobile.png" data-background="./upload/hmpg-img/carousel-img-4.png"></div>
</div>
<div class="swiper-slide">
<div class="slide-inner slide-bg-image" data-swiper-parallax="0" data-background-small="./upload/hmpg-img/carousel-img-5-mobile.png" data-background="./upload/hmpg-img/carousel-img-5.png"></div>
</div>
<div class="swiper-slide">
<div class="slide-inner slide-bg-image" data-swiper-parallax="0" data-background-small="./upload/hmpg-img/carousel-img-6-mobile.png" data-background="./upload/hmpg-img/carousel-img-6.png"></div>
</div>
<div class="swiper-button-next"></div>
<div class="swiper-button-prev"></div>
</div>
<div id="typewriter">
<span class="typewriter-box" data-wait="200" data-content='["GGSIP University USS ACM Student Chapter"]'> </span>
<!-- end swiper-slide -->
</div>
<!-- end swiper-wrapper -->
<!-- swipper controls -->
<div class="swiper-button-next"></div>
<div class="swiper-button-prev"></div>
</div>
</section>
<!-- end of hero slider -->
<!-- begin of about section -->
<div class="tag d-sm-flex about-us">
<div class="col-sm-6 align-self-center p-md-5 p-sm-3">
<div class="image text-center w-75 mx-auto">
<img src="./assets/images/aboutUs-icon.png" alt="" class="w-100" />
</div>
</div>
<div class="col-sm-6 col-9 mx-auto px-0 mt-3 pe-sm-5 align-self-center">
<div class="text">
<h2 class="mb-4 display-4 fw-bolder text-center text-md-start">
About <span class="text-head">Our Chapter</span>
</h2>
<p class="text-secondary about-text">
GGSIP University USS ACM Student Chapter is an official student body incepted in 2019 under the University
School USICT, GGSIPU. The chapter will conduct events including programming contests, talks by
renowned speakers, workshops etc.which give the students an exposure to the competitive
computing world as well as allow them to understand the advancements going on in the computing
sphere worldwide.
</p>
<div class="py-3 mt-2 d-lg-flex justify-content-sm-center">
<div class="col mb-2">
<a href="./about.php" class="about-button">Know More</a>
</div>
<div class="col">
<div class="drop-down about-button">
<p>ACM Newsletter</p>
<i class="fas fa-chevron-down arrow"></i>
</div>
<div class="dropdown">
<a href="./assets/newsletter3.pdf" target="_blank" id="adobeXd">2022
<span></span>
</a>
<a href="./assets/newsletter2.pdf" target="_blank" id="adobeXd">2021
<span></span>
</a>
<a href="./assets/newsletter.pdf" target="_blank" id="sketch">2020
<span></span>
</a>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- end of about section -->
<!-- announcement section begins-->
<?php
require_once "./announcement.php";
?>
<!-- announcement section ends-->
<!--***********************blog section***************************************** -->
<section class="blogs">
<div class="blogs-sticker-holder">
<span class="fas fa-book sticker"></span>
<span class="fas fa-pencil-alt sticker"></span>
<span class="fas fa-file-alt sticker"></span>
<span class="far fa-bookmark sticker"></span>
</div>
<div class="tag">
<div class="bloghead">
<h2 class="my-4 display-4 fw-bolder text-center">Recent<span class="text-head"> Blogs</span></h2>
</div>
<div class="b-container" id="threeBlogsRow"></div>
<div class="py-3 mt-2 d-sm-flex justify-content-sm-center">
<div class="col-lg-3 col-md-6 col-9 mb-2 mx-auto">
<a href="./blogs.php" class="about-button blog-mobile-btn">Read More Blogs</a>
</div>
</div>
</div>
</section>
<script>
function readMoreRedirection(id) {
console.log(id);
window.document.location = './singleBlog.php?Id=' + id; //Connecting Second page
}
var rwBlogs = document.getElementById('threeBlogsRow');
rwBlogs.innerHTML = '';
let url1 = './admin/blogAdmin/api.php/?q=readHome';
$(document).ready(function() {
$.ajax({
url: url1,
method: 'GET',
dataType: 'JSON',
success: function(data) {
var i;
for (i = 1; i < 4; i++) {
myFunc(data[i - 1], i);
}
function myFunc(row, index) {
var desc = row.Content;
var descSub = desc.substring(0, 70) + '...';
rwBlogs.innerHTML +=
'<div class="b-card-container">\
<div class="b-card">\
<div class="b-infos">\
<p class="b-text text-center">' +
row.Title +
'</p>\
<p class="b-text text-center">By ' +
row.Author +
'</p>\
<span class="b-text" style="display:flex; align-items:center; justify-content:center;"><a href="javascript:readMoreRedirection(' +
row.Sno +
')" class="b-button" style="text-decoration:none; cursor:pointer; font-size: 14px;padding: 12px; margin-top:5px">Read Blog <i class="fas fa-long-arrow-alt-right"></i></a></span>\
</div>\
<img src="' +
row.Image +
'" class="blog-img" />\
</div>\
<div>';
}
},
});
});
function displayFaculty(facultyMembers) {
let div = document.getElementById("officeList");
let html = '';
for(let i = 0 ; i < facultyMembers.length; i++) {
html += `
<div class="profile-card col-md-4 col-sm-6">
<div class="img">
<img
src="/${facultyMembers[i].image}"
/>
</div>
<div class="caption">
<h3>${facultyMembers[i].name}</h3>
<p>${facultyMembers[i].designation}</p>
</div>
</div>`;
}
// div.innerHTML = html;
}
function displayTeam(teamMembers) {
let div = document.getElementById("teamList");
let html = ''
for(let i = 0 ; i < teamMembers.length; i++) {
html +=`
<div class="profile-card col-md-4 col-sm-6">
<div class="img">
<img
src="./${teamMembers[i].image}"
/>
</div>
<div class="caption">
<h3>${teamMembers[i].name}</h3>
<p>${teamMembers[i].designation}</p>
<div class="social-links"> `
if(teamMembers[i].linkendin) {
html += `<a href="${teamMembers[i].linkedin}" target="_blank"><i class="fab fa-linkedin"></i></a>`;
}
if(teamMembers[i].github) {
html += `<a href="${teamMembers[i].github}" target="_blank"><i class="fab fa-github"></i></a>`;
}
if(teamMembers[i].instagram) {
html += `<a href="${teamMembers[i].instagram}" target="_blank"><i class="fab fa-instagram"></i></a>`;
}
html += "</div> </div> </div>";
}
// div.innerHTML = html;
}
async function getTeamData(year) {
let url = `./admin/adminPanel/faqadmin/teams/api.php/?q=readMember&year=${year}`
const response = await fetch(url);
let array = await response.json();
let teamMember = [];
let facultyMember = [];
for(let i = 0 ; i < array.length; i++) {
if(array[i].category === 'Office-Bearers') {
teamMember.push(array[i]);
}
if(array[i].category === 'Faculty') {
facultyMember.push(array[i]);
}
}
return [facultyMember, teamMember];
}
getTeamData(2023).then(([facultyMembers, teamMembers]) => {
displayFaculty(facultyMembers);
displayTeam(teamMembers);
});
</script>
<!-- ******************************blog section end***************************************** -->
<!-- *******************************************our team************* -->
<?php
include_once 'officebearer.php';
?>
<!-- *****************************our team end************************************************** -->
<!-- socail bar******************************* -->
<div class="social-btns tag">
<div class="try1">
<a class="btn facebook" href="https://usict.acm.org/facebook" target="_blank"><i class="fa fa-facebook"></i></a>
<div class="write" id="wrete">
<h1 class="sob-heading">700+</h1>
<p class="gratext">Facebook Followers</p>
</div>
</div>
<div class="try1">
<a class="btn linkedin" href="https://usict.acm.org/linkedin" target="_blank"><i class="fab fa fa-linkedin"></i></a>
<div class="write" id="wrete">
<h1 class="sob-heading">6000+</h1>
<p class="gratext">LinkedIn Reach</p>
</div>
</div>
<div class="try1">
<a class="btn instagram" href="https://usict.acm.org/instagram" target="_blank"><i class=" fa fa fa-instagram"></i></a>
<div class="write" id="wrete">
<h1 class="sob-heading">550+</h1>
<p class="gratext">Instagram Followers</p>
</div>
</div>
<div class="try1">
<a class="btn discord" href="https://usict.acm.org/discord" target="_blank"><i class=" fab fa-discord"></i></a>
<div class="write" id="wrete">
<h1 class="sob-heading">600+</h1>
<p class="gratext">Discord Members</p>
</div>
</div>
<div class="try1">
<a class="btn skype"><i class="fa fa fa-child"></i></a>
<div class="write" id="wrete">
<?php include './visitorCounter.php'?>
<h1 class="sob-heading"><?php echo $visitor_count?>+</h1>
<p class="gratext">Monthly Visitors</p>
</div>
</div>
</div>
<?php
if($_SERVER["REQUEST_METHOD"] == "POST"){
require_once('./admin/blogAdmin/database.php');
$database = new Database();
$db = $database->connect();
$conn = $db;
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
$email = $_POST["email"];
$sql = "SELECT email FROM newsletter_email WHERE email = '$email'";
$result = $conn->query($sql);
if ($result->num_rows > 0) {
// echo "Email address already exists in our database. Please try again with a different email address.";
echo '<script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>';
echo '<script>';
echo 'Swal.fire({icon: "error", title: "Email already exist", text: "Please try again with a different email", confirmButtonColor: "#005daa"});';
echo '</script>';
} else {
// Insert form data into database
$sql = "INSERT INTO newsletter_email (email) VALUES ('$email')";
if ($conn->query($sql) === TRUE) {
// echo "Thank you for subscribing to our newsletter!";
echo '<script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>';
echo '<script>';
echo 'Swal.fire({icon: "success", title: "Thank you for subscribing to our newsletter!", confirmButtonColor: "#005daa"});';
echo '</script>';
} else {
echo "Error: " . $sql . "<br>" . $conn->error;
}
}
$conn->close();
}
?>
<form class="subscriber-strip" method="post" >
<section class="wrapper wrapper--newsletter">
<div class="content">
<header>
<h1>ACM Newsletter</h1>
</header>
<footer>
<input type="email" class="email" id="email" name="email" placeholder="Enter your email" required>
<button>SUBSCRIBE</button>
</footer>
</div>
</section>
</form>
<!-- back to top and contact us-->
<?php
include("contact.php")
?>
<!-- footer -->
<?php
include("footer.php")
?>
<!-- footer ends -->
<!-- Swiper JS -->
<script src="https://unpkg.com/swiper/swiper-bundle.min.js"></script>
<script src="assets\JS\home_new.js"></script>
<script src="https://unpkg.com/[email protected]/dist/typed.umd.js"></script>
<script>
const type = new Typed ('.newsletter',{
strings:['ACM Newsletter'],
typeSpeed:100,
backSpeed: 100 ,
backDelay:100,
loop:true
});
</script>
</body>
</html>