forked from donjayodeji/TimeKeeper
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
137 lines (69 loc) · 3.74 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
<?php
if($_GET['app'] == 'todo'){
$currentApp = "ToDoApp";
}elseif($_GET['app'] == 'alarm'){
$currentApp = "Alarm";
}elseif($_GET['app'] == 'signup'){
$currentApp = "Signup";
}elseif($_GET['app'] == 'login'){
$currentApp ="Login";
}
require_once('inc/head.php');
if($_GET['action'] == 'delete-all' || $_GET['action'] == 'logout'){
//require_once('inc/todo.php');
session_destroy();
header('location:index.php?app=todo');
session_start();
$_SESSION['loggedout'] = true;
$_SESSION['loggedin'] = false;
}
if($_GET['action'] == 'alarm'){
echo '<script>alert();</script>';
}/////////////////////////////////////////////ALARM ACTION HERE/////////========>>>>>>>>>>>>>
?>
<body>
<div class="wrapper">
<?php if($currentApp == "ToDoApp" ){
require_once('inc/todo.php');
} ?>
<div class="main-container">
<div class="container" id="first-container">
<header>
<div class="main-header">
<h1><i class="fas fa-tasks"></i><a href="index.php">TimeKeeper</a></h1>
<?php if(!($currentApp == "ToDoApp")){?>
<a href="index.php?app=signup"><p class="button"><i class="fas fa-user-plus"></i> Signup</p></a>
<a href="index.php?app=login"><p class="button"><i class="fas fa-sign-in-alt"></i> Login</p></a>
<?php }else{ ?>
<a href="index.php?action=logout"><p class="button"><i class="fas fa-power-off"></i> Logout</p></a>
<style> #first-container{ display: none; } </style>
<?php } ?>
</div>
</header>
</div><!--container-->
<div class="container" id="second-container">
<div class="app-container"> <!--top part of the second container- about 80%-->
<h3><?php echo $currentApp ?></h3>
<div class="app">
<?php if($currentApp == "ToDoApp" ){
echo "<style> #second-container{ display:none; } .social{margin-left:3%;}</style>";
}elseif($currentApp == "Alarm"){
require('inc/alarm.php');
}elseif($currentApp == "Signup" || $currentApp == "Login"){
require("inc/users.php");
}elseif($currentApp == ''){
echo "<div id='todosvgAnimation'></div>";
echo "<script src='todosvg.js'></script>";
}
?>
</div>
</div>
</div><!--container-->
</div><!--main-container-->
<div class="social">
<span><i class="fab fa-twitter-square"></i><i class="fab fa-linkedin"></i><i class="fab fa-facebook-square"></i></span>
</div>
</div><!--wrapper-->
<?php echo '<script src="js/todo.js"></script>' ?>
</body>
</html>