-
Notifications
You must be signed in to change notification settings - Fork 0
/
dashboard.html
86 lines (79 loc) · 2.9 KB
/
dashboard.html
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
<html>
<head>
<!--Import materialize.css-->
<link type="text/css" rel="stylesheet" href="materialize/css/materialize.min.css" media="screen,projection"/>
<link type="text/css" rel="stylesheet" href="css/style.css" media="screen,projection"/>
<script type="text/javascript" src="script/jquery.js"></script>
<script type="text/javascript" src="script/script.js"></script>
</head>
<body>
<!-- menu -->
<div id="menu"></div>
<!-- The login Card -->
<!-- Display all the events through AJAX -->
<div class="row">
<div class="col s12">
<div class="card small">
<div class="card-image">
<img src="images/sample-1.jpg">
<span class="card-title white-text">Dashboard!</span>
</div>
<div class="card-content">
<p>Here is the list of all the events you have been invited to :) Do attend and make your friends/relatives happy! :)</p>
</div>
</div>
</div>
</div>
<div class="content"></div>
<script type="text/javascript">
$(document).ready(function(){
var url = domain+"eventViterServer/getEvent.php";
$.getJSON(url,function(data){
if(data.events.length != 0)
{
$.each(data.events, function(i,event){
//console.log(user.type);
var type = event.type;
var sender = event.sender;
var str = "<div class='row'>\
<div class='col s12'>\
<div class='card small'>\
<div class='card-image'>\
<img src='images/"+event.banner+"'>\
</div> \
<div class='card-content'>\
<span class='card-title'>"+event.subtype+" Invitation from "+sender+"</span>\
<p> "+event.sampletext+"</p>\
</div>\
<div class='card-action'>\
<a href='eventDetails.html?id="+event.eventid+"'>Click for more info</a>\
</div>\
</div>\
</div>";
$(".content").append(str);
});
}
else
{
str = "<div class='row'>\
<div class='col s12'>\
<div class='card small'>\
<div class='card-content'>\
<span class='card-title'>Oops :(</span>\
<p> Hey! There are no invites for you in this category. We will let you know if there are any events requiring your notice! </p>\
</div>\
<div class='card-action'>\
<a href='dashboard.html'>Click to go to dashboard</a>\
</div>\
</div>\
</div></div>";
$(".content").append(str);
}
});
});
</script>
<!--Import jQuery before materialize.js-->
<script type="text/javascript" src="materialize/js/materialize.min.js"></script>
<script type="text/javascript" src="script/pace.min.js"></script>
</body>
</html>