-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathindex.php
More file actions
661 lines (588 loc) · 26 KB
/
index.php
File metadata and controls
661 lines (588 loc) · 26 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
<?php
include("includes/config.php");
// include("includes/addChannel.php");
//session_destroy(); LOGOUT
if(isset($_SESSION['userLoggedIn'])) {
$userLoggedIn = $_SESSION['userLoggedIn'];
}
else {
header("Location: register.php");
}
?>
<html>
<head>
<title>Welcome to Slack!</title>
<link href="https://fonts.googleapis.com/css?family=Lato:400,700,900" rel="stylesheet" type="text/css"/>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script src="assets/js/script.js"></script>
<!-- Remember to include jQuery :) -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.0.0/jquery.min.js"></script>
<!-- jQuery Modal -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-modal/0.9.1/jquery.modal.min.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/jquery-modal/0.9.1/jquery.modal.min.css" />
<link rel="stylesheet" type="text/css" href="./index.css">
</head>
<!-- <meta http-equiv="refresh" content="60"> -->
<!-- <script src="assets/js/index.js"></script> -->
<body>
<div class="header">
<div class="team-menu">
<a href="#addWorkspace" rel="modal:open" style="text-decoration: none;">
<img class = "add" src='assets/images/icons/add.png' data-toggle="modal" data-target="#myModal" >
</a>
Workspace:
<select class='selectWorkspace' onchange="self.location.href=options[selectedIndex].value">
<option value ="index.php">Choose one</option>
<?php
$workspaceQuery = mysqli_query($con, "select wid, wname from User NATURAL JOIN Workspace NATURAL JOIN UseWorkspace where username = '$userLoggedIn'");
while($row = mysqli_fetch_array($workspaceQuery)) {
if (isset($_GET['wid']) && $_GET['wid']==$row['wid']) {
echo"
<option selected='selected' value='index.php?wid=".$row['wid']."'>".$row['wname']."
</option>
";
}else{
echo"
<option value='index.php?wid=".$row['wid']."'>".$row['wname']."
</option>
";
}
}
?>
</select>
</div>
<div class="channel-menu">
<span class="channel-menu_name">
<span class="channel-menu_prefix">
<?php
if (isset($_GET['cid'])) {
$cid = $_GET['cid'];
$ctQuery = mysqli_query($con, "select ctype from Channel where cid='$cid'");
$row = mysqli_fetch_array($ctQuery);
if ($row['ctype']=="private"){
echo "<img src='assets/images/icons/lock-black.png' style='width:23px;'>";
}else if($row['ctype']=="public"){
echo "#";
}
}else{
echo "";
}
?>
</span>
<?php
if (isset($_GET['cid'])) {
$cid = $_GET['cid'];
$cnQuery = mysqli_query($con, "select channelName,ctype from Channel where cid='$cid'");
$row = mysqli_fetch_array($cnQuery);
if($row['ctype'] == 'direct'){
$query = mysqli_query($con, "SELECT username FROM User NATURAL JOIN UseChannel WHERE username !='$userLoggedIn' AND cid ='$cid'");
echo mysqli_fetch_array($query)['username'];
}else{
echo $row['channelName'];
}
}else{
echo "<span>Choose A Channel Or DirectMessage</span>";
}
?>
</span>
<!-- search -->
<span class="search">
<form action="#" method="GET" name="search_form">
<input type="text" onkeyup="getLiveSearchUsers(this.value, '<?php echo $userLoggedIn; ?>')" name="q" placeholder="Search..." autocomplete="off" id="search_text_input">
<div class="button_holder">
<img src="assets/images/icons/magnifying_glass.png">
</div>
</form>
<div class="search_results">
</div>
<div class="search_results_footer_empty">
</div>
</span>
<span>
<a href="#inviteWAC" rel="modal:open" style="text-decoration: none;">
<img src="assets/images/icons/invite.png" style="width: 35px; float: right; margin-top: 10px;margin-right: 20px;
<?php if(!isset($_GET['wid']) || isset($_GET['c'])){
echo"visibility: hidden;";
}
?>">
</a>
</span>
</div>
</div>
<div class="main">
<div class="listings">
<div class="listings_channels">
<h2 class="listings_header">Channels
<a href="#addChannel" rel="modal:open">
<?php
if(isset($_GET['wid'])){
echo "<img class = 'addin' src='assets/images/icons/add.png' data-toggle='modal' data-target='#myModal' >";
} else{
echo "";
}
?>
</a>
</h2>
<ul class="channel_list">
<?php
if (isset($_GET['wid'])) {
$wid = $_GET['wid'];
$active = "";
$channelQuery = mysqli_query($con, "select cid, ctype, channelName from Channel NATURAL JOIN User NATURAL JOIN UseChannel where username = '$userLoggedIn' and wid ='$wid'");
while($row = mysqli_fetch_array($channelQuery)) {
if(isset($_GET['cid']) && $_GET['cid'] == $row['cid']){
$active = "active";
}else{
$active = "";
}
if($row['ctype']=='public'){
echo "
<li class='channel ".$active."'>
<a class='channel_name' href='index.php?wid=".$wid."&cid=".$row['cid']."'style='color:#fff; text-decoration: none;'>
<span class='prefix'>
#
</span>
".$row['channelName']."
</a>
</li>
";
} else if ($row['ctype']=='private'){
echo "
<li class='channel ".$active."'>
<a class='channel_name' href='index.php?wid=".$wid."&cid=".$row['cid']."'style='color:#fff; text-decoration: none;'>
<span class='prefix'>
<img src='assets/images/icons/lock.png' style='height: 15px;margin-left: -4px;width: 15px;'>
</span>
".$row['channelName']."
</a></li>";
}
}
}
?>
</ul>
</div>
<div class="listings_direct-messages">
<h2 class="listings_header">Direct Messages
<a href="#addDirectMessage" rel="modal:open">
<?php
if(isset($_GET['wid'])){
echo "<img class= 'addin' src='assets/images/icons/add.png' data-toggle='modal' data-target='#myModal' >
</a>";
} else{
echo "";
}
?>
</a>
</h2>
<ul class="channel_list">
<?php
if(isset($_GET['wid'])) {
$wid = $_GET['wid'];
$sql="SELECT username, uid, cid, wid
FROM UseChannel NATURAL JOIN Channel NATURAL JOIN User WHERE ctype = 'direct' AND username !='$userLoggedIn' AND wid='$wid' AND cid in (SELECT cid FROM User NATURAL JOIN Channel NATURAL JOIN UseChannel WHERE username = '$userLoggedIn')";
$res = mysqli_query($con, $sql);
while($row = mysqli_fetch_array($res)) {
if(isset($_GET['cid']) && $_GET['cid'] == $row['cid']){
$active=" active";
$dot="-white";
}else{
$active="";
$dot="";
}
echo
"<li class='channel".$active."'>
<a href='index.php?wid=".$row['wid']."&cid=".$row['cid']."&c=0' class='channel_name' style='text-decoration: none;color: #fff;'>
<span class='prefix'>
<img src='assets/images/icons/dot".$dot.".png' style='height: 10px;margin-left: -4px;width: 10px;'>
</span>
"
.$row['username'].
"
</a>
</li>";
}
}
?>
</ul>
</div>
</div>
<div class="message-history">
<?php
if (isset($_GET['cid'])) {
$cid = $_GET['cid'];
// echo $cid;
$messageQuery = mysqli_query($con, "SELECT username, uid, content, messageTime from Message NATURAL JOIN User natural join Channel WHERE cid ='$cid' and fromId = uId order by messageTime asc");
while($row = mysqli_fetch_array($messageQuery)) {
if($row['username'] != $userLoggedIn) {
echo "
<div class='message'>
<a class='message_profile-pic' href=''>
<img src='assets/images/profile-pics/avatar.png' style='height: 32px;width: 32px;'>
<a class='message_username' href=''>
".$row['username']."
</a>
<span class='message_timestamp'>
".$row['messageTime']."
</span>
<span class='message_content'>
".$row['content']."
</span>
</div>
";
}else{
echo "
<div class='message' >
<a class='message_profile-pic' href=''>
<img src='assets/images/profile-pics/me.png' style='height: 32px;width: 32px;'>
<a class='message_username' href=''>
YOU
</a>
<span class='message_timestamp'>
".$row['messageTime']."
</span>
<span class='message_content'>
".$row['content']."
</span>
</div>
";
}
}
}
?>
</div>
<div class="footer">
<div class="user-menu">
<a href="#LOGOUT" rel="modal:open" class="user-menu_profile-pic">
<img src="assets/images/profile-pics/me.png" style="width: 50px;">
</a>
<span class="user-menu_username">
<?php echo $userLoggedIn ?>
</span>
<span class="connection_status">
online
</span>
<!-- notification -->
<?php
$query = mysqli_query($con, "SELECT * FROM Invitation NATURAL JOIN User WHERE viewed = 'NO' AND toId = uid AND username = '$userLoggedIn'");
$num_invitations = mysqli_num_rows($query);
?>
<span class="notification_icon">
<a href="#invitation" rel="modal:open">
<img src="assets/images/icons/notification.png" style="height:26px;">
<?php
if($num_invitations > 0)
echo '<span class="unread unread_notification" id="num_invitations">' . $num_invitations . '</span>';
?>
</a>
</span>
</div>
<div class="input-box"
<?php
if(isset($_GET['cid'])) {
echo"";
}else{
echo "style='visibility: hidden;'";
}
?>
>
<form action="./includes/sendMessage.php" method="POST">
<input class="input-box_text" type="text" name="messageContent"/>
<input class="sendButton" type="image" src="assets/images/icons/send.png" style="width: 40px; height: 40px;margin-left: 5px;position: fixed;">
<input type="hidden" name="wid" value="
<?php if(isset($_GET['wid'])){
echo$wid;
}else{
echo '-1';
} ?> ">
<input type="hidden" name="cid" value="
<?php
if(isset($_GET['cid'])){
echo $cid;
} else{
echo "-1";
}
?>
">
</form>
</div>
</div>
<!-- modal htmls -->
<!-- for addChannel -->
<div id="addChannel" class="modal">
<div class="model-title">
<h1>
Create A Channel
</h1>
</div>
<form action="./includes/addChannel.php" id ="addChannel" method="POST">
<div> Channel Name:
<input required type="text" name="channelName">
</div>
<!-- <div> Channel Descriptions:
<input required type="text" name="channelDescription">
</div> -->
<div>Channel Type:
<select name='ctype' from="addChannel" style='max-width: 150px; margin-top: 4px;height: 20px;background-color: #4c9689;color:#fff;border: transparent;border-radius: 0.05em;font:inherit;'>
<option value="public">public</option>
<option value="private">private</option>
</select>
</div>
<div>
<input type="submit" name="submit" style='margin: 20px 192px 10px; background-color: #4c9689; font-size: 15px;border-radius: 5px;border: transparent;color: #fff;'>
</div>
<input type="hidden" name="username" value="<?php echo $userLoggedIn; ?>">
<input type="hidden" name="wid" value="<?php echo $wid; ?>">
</form>
</div>
<!-- for addDirectMessage -->
<div id="addDirectMessage" class="modal">
<div class="model-title">
<h1>
Send Direct Messages
</h1>
</div>
<form action="./includes/addDirect.php" id ="addDirect" method="POST">
<div>Find A Person:
<select name='otherId' from="addDirect" style='max-width: 150px; margin-top: 4px;height: 20px;background-color: #4c9689;color:#fff;border: transparent;border-radius: 0.05em;font:inherit;' >
<?php
$sql = "SELECT uid, username FROM User NATURAL JOIN UseWorkspace NATURAL JOIN Workspace WHERE wid='$wid' AND username != '$userLoggedIn'
AND uid not in (SELECT DISTINCT(uid) FROM UseChannel WHERE cid in (SELECT cid from UseChannel NATURAL JOIN Channel NATURAL JOIN User WHERE ctype ='direct' AND username='$userLoggedIn' AND wid='$wid'))";
$res = mysqli_query($con, $sql);
while($row = mysqli_fetch_array($res)) {
echo "<option value='".$row['uid']."'>
".$row['username']."
</option>";
}
?>
<!-- <option value="public">public</option> -->
</select>
</div>
<div>
<input type="submit" name="submit" style='margin: 20px 192px 10px; background-color: #4c9689; font-size: 15px;border-radius: 5px;border: transparent;color: #fff;'>
</div>
<input type="hidden" name="username" value="<?php echo $userLoggedIn; ?>">
<input type="hidden" name="wid" value="<?php echo $wid; ?>">
</form>
</div>
<!-- for invitation -->
<div id="invitation" class="modal" style="max-width: 860px">
<div class="model-title">
<h1>
Invitations
</h1>
</div>
<div>
<?php
$sql = "SELECT fromId, toId, type, id FROM Invitation NATURAL JOIN User WHERE viewed = 'NO' AND toId = uid AND username = '$userLoggedIn' ORDER BY inviteTime DESC";
$res = mysqli_query($con, $sql);
while($row = mysqli_fetch_array($res)) {
$fromId = $row['fromId'];
$xid = $row['id'];
$type = $row['type'];
$nameQuery = mysqli_query($con, "SELECT username FROM User WHERE uid ='$fromId'");
$username = mysqli_fetch_array($nameQuery)['username'];
if($type = "workspace") {
$query = mysqli_query($con, "SELECT wname FROM Workspace WHERE wid = '$xid'");
$xname = mysqli_fetch_array($query)['wname'];
}else if($type = "channel") {
$query = mysqli_query($con, "SELECT wname FROM Workspace WHERE cid = '$xid'");
$xname = mysqli_fetch_array($query)['wname'];
}else{
$query = mysqli_query($con, "SELECT wname FROM Workspace WHERE wid = '$xid'");
$xname = mysqli_fetch_array($query)['wname'];
}
echo "<div class = invitation>
<span class=invitation_line>".
$username. " send you a Invitation to " . $row['type'] .": ". $xname .
"</span>
<form action='./includes/invitation.php' id ='invitation' method='POST' class='notification_button'>
<select name='acceptance' from='invitation'>
<option value='Accept'>Accept</option>
<option value='Ignore'>Ignore</option>
</select>
<input type='submit' name='submit' value='OK' style='margin: 20px; background-color: #4c9689; font-size: 15px;border-radius: 5px;border: transparent;color: #fff;'>
<input type='hidden' name='toId' value=" . $row['toId'] .">
<input type='hidden' name='fromId' value=" . $row['fromId'] .">
<input type='hidden' name='type' value=" . $row['type'] .">
<input type='hidden' name='id' value=" . $row['id'] .">
</form>
</div>";
}
?>
</div>
</div>
<!-- for add a workspace -->
<div id="addWorkspace" class="modal">
<div class="model-title">
<h1 style=" text-align: center;font-weight: 800;padding: 10px 10px 20px 20px;">
Create You Own Workspace
</h1>
</div>
<form action="./includes/addWorkspace.php" id ="addDirect" method="POST">
<div>
Workspace Name:
<input type="text" name="wname" required>
</div>
<div>
Workspace Descriptions:
<input type="text" name="wDes" required>
</div>
<div>
<input type="submit" name="submit" style='margin: 20px 192px 10px; background-color: #4c9689; font-size: 15px;border-radius: 5px;border: transparent;color: #fff;'>
</div>
<input type="hidden" name="username" value="<?php echo $userLoggedIn; ?>">
</form>
</div>
<!-- for inviting people into workspace, administration or channel -->
<div id="inviteWAC" class="modal">
<div class="model-title">
<h1 style=" text-align: center;font-weight: 800;padding: 10px 10px 20px 20px;">
Invite Others Into Your Zone
</h1>
<select class="form-control" id="WAC" style="max-width: 350px; margin-top: 4px;height: 20px;background-color: #4c9689;color:#fff;border: transparent;border-radius: 0.05em;font:inherit;">
<option selected='selected' value="">Please Select</option>
<option value="W">Workspace Invitation</option>
<option value="A">Workspace Administration Invitation</option>
<?php
if(isset($_GET['cid'])) {
echo "<option value='C'> Channel Invitation</option>";
}
?>
</select>
</div>
</div>
<div id="inviteW" class="modal">
<div class="model-title">
<h1 style=" text-align: center;font-weight: 800;padding: 10px 10px 20px 20px;">
Invite Others Into A Workspace
</h1>
</div>
<form action="./includes/WInvite.php" id ="WInvite" method="POST">
<div> Select A User to Send the Invitation:
<select from="WInvite" name='toId' style="max-width: 150px; margin-top: 4px;height: 20px;background-color: #4c9689;color:#fff;border: transparent;border-radius: 0.05em;font:inherit;">
<?php
$wid = $_GET['wid'];
$sql = "SELECT uid, username
FROM User
WHERE username !='$userLoggedIn' AND uid not in
(SELECT toId FROM Invitation WHERE type='workspace' AND id='$wid') AND uid not in (SELECT uid FROM UseWorkspace WHERE wid='$wid')";
$res = mysqli_query($con, $sql);
while($row = mysqli_fetch_array($res)) {
$uid = $row['uid'];
echo"
<option value='$uid'>".$row['username']."</option>
";
}
?>
</select>
</div>
<div>
<input type="submit" name="submit" style='margin: 20px 192px 10px; background-color: #4c9689; font-size: 15px;border-radius: 5px;border: transparent;color: #fff;'>
</div>
<input type="hidden" name="username" value="<?php echo $userLoggedIn; ?>">
<input type="hidden" name="wid" value="<?php echo $wid; ?>">
</form>
</div>
<div id="inviteA" class="modal">
<div class="model-title">
<h1 style=" text-align: center;font-weight: 800;padding: 10px 10px 20px 20px;">
Give A User the permission of Administration
</h1>
</div>
<form action="./includes/AInvite.php" id ="AInvite" method="POST">
<div> Select A User to Send the Invitation:
<select from="AInvite" name='toId' style="max-width: 150px; margin-top: 4px;height: 20px;background-color: #4c9689;color:#fff;border: transparent;border-radius: 0.05em;font:inherit;">
<?php
$wid = $_GET['wid'];
$sql = "SELECT uid, username
FROM User
WHERE username!='$userLoggedIn' AND uid not in
(SELECT toId FROM Invitation WHERE type='administration' AND id='$wid') AND uid in
(SELECT uid FROM UseWorkspace WHERE wid = '$wid')
AND uid not in (SELECT uid FROM Administration WHERE wid='$wid')";
$res = mysqli_query($con, $sql);
while($row = mysqli_fetch_array($res)) {
$uid = $row['uid'];
echo"
<option value='$uid'>".$row['username']."</option>
";
}
?>
</select>
<input type="hidden" name="username" value="<?php echo $userLoggedIn; ?>">
<input type="hidden" name="wid" value="<?php echo $wid; ?>">
</div>
<input type="submit" name="submit" style='margin: 20px 192px 10px; background-color: #4c9689; font-size: 15px;border-radius: 5px;border: transparent;color: #fff;'>
</div>
</form>
</div>
</div>
<div id="inviteC" class="modal">
<div class="model-title">
<h1 style=" text-align: center;font-weight: 800;padding: 10px 10px 20px 20px;">
Invite Other Users Into A Channel
</h1>
</div>
<form action="./includes/CInvite.php" id ="CInvite" method="POST">
<div> Select A User to Send the Invitation:
<select from="CInvite" name='toId' style="max-width: 150px; margin-top: 4px;height: 20px;background-color: #4c9689;color:#fff;border: transparent;border-radius: 0.05em;font:inherit;">
<?php
$wid = $_GET['wid'];
$cid = $_GET['cid'];
$sql = "SELECT uid, username
FROM User
WHERE username!='$userLoggedIn' AND uid not in
(SELECT toId FROM Invitation WHERE type='channel' AND id='$cid') AND uid in
(SELECT uid FROM UseWorkspace WHERE wid = '$wid') AND uid not in
(SELECT uid FROM UseChannel WHERE cid = '$cid')";
$res = mysqli_query($con, $sql);
while($row = mysqli_fetch_array($res)) {
$uid = $row['uid'];
echo"
<option value='$uid'>".$row['username']."</option>
";
}
?>
</select>
</div>
<input type="submit" name="submit" style='margin: 20px 192px 10px; background-color: #4c9689; font-size: 15px;border-radius: 5px;border: transparent;color: #fff;'>
<input type="hidden" name="username" value="<?php echo $userLoggedIn; ?>">
<input type="hidden" name="cid" value="<?php echo $cid; ?>">
<input type="hidden" name="wid" value="<?php echo $wid; ?>">
</form>
</div>
<div id="LOGOUT" class="modal">
<div class="model-title">
<h1 style=" text-align: center;font-weight: 800;padding: 10px 10px 20px 20px;">
Are you Sure to Log out?
</h1>
<a href="./includes/logout.php">
<button style='margin: 20px 192px 10px; background-color: #4c9689; font-size: 15px;border-radius: 5px;border: transparent;color: #fff;'>Logout</button>
</a>
</div>
</div>
<script type="text/javascript">
$(function(){
var totalHeight = 0;
$('.message-history>div').each(function(index,ele){
totalHeight += $(ele).outerHeight(true);
});
$('.message-history').scrollTop(totalHeight);
});
$(document).ready(function(){ //Make script DOM ready
$('#WAC').change(function() { //jQuery Change Function
var opval = $(this).val(); //Get value from select element
if(opval=="W"){ //Compare it and if true
$('#inviteW').modal("show"); //Open Modal
}
else if(opval=="A"){
$('#inviteA').modal("show");
}
else if(opval=='C'){
$('#inviteC').modal("show");
}
});
});
</script>
</body>
</html>