-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcalendar.php
49 lines (29 loc) · 914 Bytes
/
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
<!--
* I Have Plans -- Calendar controller
* @author Steven Dufresne <[email protected]>
* @link http://github.com/StevenDufresne/web-app
* @copyright 2012 Steven Dufresne
* @license BSD-3-Clause <https://github.com/stevendufresne/web-app/BSD-3-CLAUSE-LICENSE.txt>
-->
<?php
require_once 'includes/db.inc.php';
require_once 'includes/users.inc.php';
require_once 'includes/requests.inc.php';
require_once 'includes/functions.inc.php';
if (!user_is_signed_in()) {
header('Location: index.php');
exit;
}
$user_id = $_SESSION['user-id'];
$user_info = get_username ($db, $user_id);
$event_array = check_schedule($db,$user_id);
$list_view_events = check_all_events ($db, $user_id) ;
//var_dump($list_view_events);
if(isset($_POST['list-post'])) {
$_SESSION['list-view'] = true;
}
if(isset($_POST['calendar-post'])) {
unset($_SESSION['list-view']);
}
include "views/calendar.html.php"
?>