-
Notifications
You must be signed in to change notification settings - Fork 0
/
my-calendar.php
executable file
·535 lines (411 loc) · 13.7 KB
/
my-calendar.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
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
<!DOCTYPE html>
<html lang="en">
<?php
require_once('includes/initialize.php');
?>
<?php
//Load Session details...
if (! $session->is_logged_in() )
session_start();
if( ! isset($_SESSION['user_id']) )
redirect_to('login.php?msg=Please Log-in first.');
$user=User::find_by_id($_SESSION['user_id']);
?>
<?php
$path = 'assets/images/profile_pic/' . $user->profile_pic;
echo(
envapi_get_html_for_reg_user(
'176644-3EaSQ9JhWGaxqDH2EJ91XS3smNIPajiD',
$user->first_name,
$user->last_name,
$path,
false,
"HI")
);
?>
<?php
//Get user details...
$user = User::find_by_id( $_SESSION['user_id'] );
//Get user's inbox...
$sql = "select * from receivers where user_id=".$_SESSION['user_id']." order by message_id desc" ;
$inbox_message_ids = Receiver::find_by_sql( $sql );
?>
<?php
//Count the no. of unread messages...
$count = User::count_unread_messages( $user->id );
?>
<?php
//Place existing calendar schedules/events...
$schedules = UserSchedule::find_by_sql( "select * from user_schedules where user_id=" . $user->id );
?>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="description" content="Neon Admin Panel" />
<meta name="author" content="" />
<title>LLSCT | My Calendar</title>
<link rel="stylesheet" href="assets/js/jquery-ui/css/no-theme/jquery-ui-1.10.3.custom.min.css">
<link rel="stylesheet" href="assets/css/font-icons/entypo/css/entypo.css">
<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Noto+Sans:400,700,400italic">
<link rel="stylesheet" href="assets/css/bootstrap.css">
<link rel="stylesheet" href="assets/css/neon-core.css">
<link rel="stylesheet" href="assets/css/neon-theme.css">
<link rel="stylesheet" href="assets/css/neon-forms.css">
<link rel="stylesheet" href="assets/css/custom.css">
<script src="assets/js/jquery-1.11.0.min.js"></script>
<script>
$(window).load(function()
{
<?php
foreach( $schedules as $schedule )
{
?>
var id = "<?php echo $schedule->id ?>";
var allDay = "<?php echo $schedule->allDay ?>";
var title = " <?php echo $schedule->data ?>";
var start = "<?php echo substr($schedule->start_time , 0 , 10) . " " . substr($schedule->start_time , 11) . "+05:30" ?>";
var end = "<?php echo substr($schedule->start_time , 0 , 10) . " " . substr($schedule->end_time , 11) . "+05:30" ?>";
var color = "<?php echo $schedule->background ?>";
if( allDay == "true" )
allDay = true;
else
allDay = false;
var v = [{"allDay":allDay,"title":title,"start":start,"end":end,"id":id,"className":"event","color":color,"textColor":"white"}];
$("#calendar").fullCalendar("addEventSource",v);
<?php
}
?>
});
</script>
<!--[if lt IE 9]><script src="assets/js/ie8-responsive-file-warning.js"></script><![endif]-->
<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body class="page-body" data-url="http://neon.dev">
<div class="page-container"> <!-- add class "sidebar-collapsed" to close sidebar by default, "chat-visible" to make chat appear always -->
<div class="sidebar-menu">
<header class="logo-env">
<!-- logo -->
<div class="logo">
<a href="index">
<img src="assets/images/logo@2x.png" width="120" alt="" />
</a>
</div>
<!-- logo collapse icon -->
<div class="sidebar-collapse">
<a href="#" class="sidebar-collapse-icon with-animation"><!-- add class "with-animation" if you want sidebar to have animation during expanding/collapsing transition -->
<i class="entypo-menu"></i>
</a>
</div>
<!-- open/close menu icon (do not remove if you want to enable menu on mobile devices) -->
<div class="sidebar-mobile-menu visible-xs">
<a href="#" class="with-animation"><!-- add class "with-animation" to support animation -->
<i class="entypo-menu"></i>
</a>
</div>
</header>
<ul id="main-menu" class="">
<!-- add class "multiple-expanded" to allow multiple submenus to open -->
<!-- class "auto-inherit-active-class" will automatically add "active" class for parent elements who are marked already with class "active" -->
<!-- Search Bar -->
<li class="active opened active">
<li class="active">
<a href="mailbox/inbox">
<i class="entypo-mail"></i>
<span>Mailbox</span>
<span class="badge badge-secondary"></span>
</a>
</li>
<li>
<a href="extra-calendar">
<i class="entypo-calendar"></i>
<span>Calendar</span>
</a>
<ul>
<li>
<a href="my-calendar">
<span>My Calendar</span>
<span class="badge badge-secondary badge-roundless"></span>
</a>
</li>
<li>
<a href="public-calendar">
<span>Public Calendar</span>
<span class="badge badge-secondary badge-roundless"></span>
</a>
</li>
</ul>
</li>
<li>
<a href="add-user">
<i class="entypo-user-add"></i>
<span>Add new User</span>
</a>
</li>
<li>
<a href="team-lls">
<i class="entypo-users"></i>
<span>Team LLS</span>
</a>
</li>
<li>
<a href="">
<i class="entypo-chart-bar"></i>
<span>Survey</span>
</a>
<ul>
<li>
<a href="create-survey">
<span>Create Survey</span>
<span class="badge badge-secondary badge-roundless"></span>
</a>
</li>
<li>
<a href="list-survey">
<span>List Survey</span>
<span class="badge badge-secondary badge-roundless"></span>
</a>
</li>
</ul>
<ul>
<li>
<a href="edit-survey">
<span>Edit Survey</span>
<span class="badge badge-secondary badge-roundless"></span>
</a>
</li>
<li>
<a href="view-response">
<span>View Responses</span>
<span class="badge badge-secondary badge-roundless"></span>
</a>
</li>
</ul>
</li>
<!-- May not need this...
<li>
<a href="extra-blank-page">
<i class="entypo-chart-bar"></i>
<span>About LLS</span>
</a>
</li>
-->
<li>
<a href="about-lls">
<i class="entypo-feather"></i>
<span>About LLS Collaboration Tool</span>
</a>
</li>
<li>
<a href="#">
<i class="entypo-drive"></i>
<span>Document Sharing</span>
</a>
<ul>
<li>
<a href="drive-upload">
<i class="entypo-flow-line"></i>
<span>Upload</span>
</a>
</li>
<li>
<a href="view-private-drive">
<i class="entypo-flow-line"></i>
<span>My Documents</span>
</a>
</li>
<li>
<a href="view-public-drive">
<i class="entypo-flow-line"></i>
<span>Public Documents</span>
</a>
</li>
</ul>
</li>
</div>
<!-- Sidebar ends... -->
<div class="main-content">
<div class="row">
<!-- Profile Info and Notifications -->
<div class="col-md-6 col-sm-8 clearfix">
<ul class="user-info pull-left pull-none-xsm">
<!-- Profile Info -->
<li class="profile-info dropdown"><!-- add class "pull-right" if you want to place this from right -->
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
<img src="assets/images/profile_pic/<?php echo $user->profile_pic;?>" width="44" height="44" class="img-circle" />
<?php
echo $user->get_full_name();
?>
</a>
<ul class="dropdown-menu">
<!-- Reverse Caret -->
<li class="caret"></li>
<!-- Profile sub-links -->
<li>
<a href="edit-profile">
<i class="entypo-user"></i>
Edit Profile
</a>
</li>
<li>
<a href="edit-password">
<i class="entypo-lock"></i>
Edit Password
</a>
</li>
<li>
<a href="upload-pic">
<i class="entypo-user"></i>
Edit Picture
</a>
</li>
</ul>
</li>
</ul>
<ul class="user-info pull-left pull-right-xs pull-none-xsm">
<!-- Raw Notifications -->
</div>
<!-- Raw Links -->
<div class="col-md-6 col-sm-4 clearfix hidden-xs">
<ul class="list-inline links-list pull-right">
<li class="sep"></li>
<li>
<a href="login?action=logout">
Log Out <i class="entypo-logout right"></i>
</a>
</li>
</ul>
</div>
</div>
<hr />
<div class="calendar-env">
<!-- Calendar Body -->
<div class="calendar-body">
<div id="calendar"></div>
</div>
<!-- Sidebar -->
<div class="calendar-sidebar">
<!-- new task form -->
<div class="calendar-sidebar-row">
<form role="form" id="add_event_form">
<div class="input-group minimal">
<input type="text" class="form-control" placeholder="Add event..." />
<div class="input-group-addon">
<i class="entypo-pencil"></i>
</div>
</div>
</form>
</div>
<!-- Events List -->
<ul class="events-list" id="draggable_events">
<li>
<p>Drag Events to Calendar Dates</p>
</li>
</ul>
</div>
</div>
<hr />
<?php
echo FOOTER;
?><!-- Footer -->
</div>
<div id="chat" class="fixed" data-current-user="Vivek Joshi" data-order-by-status="1" data-max-chat-history="25">
<div class="chat-inner">
<h2 class="chat-header">
<a href="#" class="chat-close" data-animate="1"><i class="entypo-cancel"></i></a>
<i class="entypo-users"></i>
Chat
<span class="badge badge-success is-hidden">0</span>
</h2>
<div class="chat-group" id="group-1">
<strong>Favorites</strong>
<a href="#" id="sample-user-123" data-conversation-history="#sample_history"><span class="user-status is-online"></span> <em>Catherine J. Watkins</em></a>
<a href="#"><span class="user-status is-online"></span> <em>Nicholas R. Walker</em></a>
<a href="#"><span class="user-status is-busy"></span> <em>Susan J. Best</em></a>
<a href="#"><span class="user-status is-offline"></span> <em>Brandon S. Young</em></a>
<a href="#"><span class="user-status is-idle"></span> <em>Fernando G. Olson</em></a>
</div>
<div class="chat-group" id="group-2">
<strong>Work</strong>
<a href="#"><span class="user-status is-offline"></span> <em>Robert J. Garcia</em></a>
<a href="#" data-conversation-history="#sample_history_2"><span class="user-status is-offline"></span> <em>Daniel A. Pena</em></a>
<a href="#"><span class="user-status is-busy"></span> <em>Rodrigo E. Lozano</em></a>
</div>
<div class="chat-group" id="group-3">
<strong>Social</strong>
<a href="#"><span class="user-status is-busy"></span> <em>Velma G. Pearson</em></a>
<a href="#"><span class="user-status is-offline"></span> <em>Margaret R. Dedmon</em></a>
<a href="#"><span class="user-status is-online"></span> <em>Kathleen M. Canales</em></a>
<a href="#"><span class="user-status is-offline"></span> <em>Tracy J. Rodriguez</em></a>
</div>
</div>
<!-- conversation template -->
<div class="chat-conversation">
<div class="conversation-header">
<a href="#" class="conversation-close"><i class="entypo-cancel"></i></a>
<span class="user-status"></span>
<span class="display-name"></span>
<small></small>
</div>
<ul class="conversation-body">
</ul>
<div class="chat-textarea">
<textarea class="form-control autogrow" placeholder="Type your message"></textarea>
</div>
</div>
</div>
<!-- Chat Histories -->
<ul class="chat-history" id="sample_history">
<li>
<span class="user">Vivek Joshi</span>
<p>Are you here?</p>
<span class="time">09:00</span>
</li>
<li class="opponent">
<span class="user">Catherine J. Watkins</span>
<p>This message is pre-queued.</p>
<span class="time">09:25</span>
</li>
<li class="opponent">
<span class="user">Catherine J. Watkins</span>
<p>Whohoo!</p>
<span class="time">09:26</span>
</li>
<li class="opponent unread">
<span class="user">Catherine J. Watkins</span>
<p>Do you like it?</p>
<span class="time">09:27</span>
</li>
</ul>
<!-- Chat Histories -->
<ul class="chat-history" id="sample_history_2">
<li class="opponent unread">
<span class="user">Daniel A. Pena</span>
<p>I am going out.</p>
<span class="time">08:21</span>
</li>
<li class="opponent unread">
<span class="user">Daniel A. Pena</span>
<p>Call me when you see this message.</p>
<span class="time">08:27</span>
</li>
</ul>
</div>
<!-- Bottom Scripts -->
<script src="assets/js/gsap/main-gsap.js"></script>
<script src="assets/js/jquery-ui/js/jquery-ui-1.10.3.minimal.min.js"></script>
<script src="assets/js/bootstrap.js"></script>
<script src="assets/js/joinable.js"></script>
<script src="assets/js/resizeable.js"></script>
<script src="assets/js/neon-api.js"></script>
<script src="assets/js/fullcalendar/fullcalendar.min.js"></script>
<script src="assets/js/neon-calendar.js"></script>
<script src="assets/js/neon-chat.js"></script>
<script src="assets/js/neon-custom.js"></script>
<script src="assets/js/neon-demo.js"></script>
</body>
</html>