-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
259 lines (218 loc) · 6.57 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
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
<!DOCTYPE html>
<html>
<!------Head----------->
<head>
<title>Codether</title>
<link href="icon2.png" rel="icon">
<link href="css/style.css" rel="stylesheet" type="text/css">
<meta charset="UTF-8" content="width=device-width, initial-scale=1.0" name="viewport">
</head>
<!------Body----------->
<body>
<!------Home Section----------->
<section id="homesect">
<div class="row">
<div class="bg"></div>
<div class="bg bg2"></div>
<div class="bg bg3"></div>
<!------Header----------->
<header>
<!------NavBar----------->
<div class="row">
<div class="navbar">
<div class="webname col-m-12 col-8">
<h1>Codether</h1>
</div>
<ul class="col-m-12 col-4">
<li><a class="active" href="#home">Home</a></li>
<li><a href="#aboutsect">About</a></li>
<?php
include("config.php");
// Initialize the session
session_start();
if(isset($_SESSION["logged"])) {
$cookie_name = "username";
$cookie_value = $_SESSION["username"];
setcookie($cookie_name, $cookie_value, time() + (86400 * 30), "/");
}
// Check if the user is logged in, if not then redirect him to login page
if(!isset($_SESSION["logged"]) || $_SESSION["logged"] !== true)
{
echo " <li><a href='register.php'>Register</a></li>";
}
else{
$user=$_COOKIE[$cookie_name];
if($user=='admin'){echo "<li><a href='admin.php?'>Admin</a></li>";}
else{
echo "<li><a href='profile.php?id=$user'>Profile</a></li>";
}
}
?>
<?php
include("config.php");
// Initialize the session
// Check if the user is logged in, if not then redirect him to login page
if(!isset($_SESSION["logged"]) || $_SESSION["logged"] !== true)
{
echo " <li><a href='signin.php'>Log In</a></li>";
}
else{
echo "<li><a href='signout.php'>Log Out</a></li>";
}
?>
<li><a href="#contactsect">Contact</a></li>
</ul>
</div>
</div>
</header>
<!------Main----------->
<div class="row">
<div class="col-m-12 col-12 main">
<h1>Codether</h1>
</div>
</div>
<center>
<div class="row">
<div class=" col-m-12 col-12 typewrite">
<h2 id="cursor">An Interactive Website For Collaborative Coding</h2>
</div>
</div><br>
<br>
<br>
<!------Changing Text----------->
<div class=" flowtext row col-m-12 col-12">
<div class="item-a">
<h4>Code</h4>
</div>
<div class="item-b">
<h4>Edit</h4>
</div>
<div class="item-c">
<h4>Create</h4>
</div>
</div>
<div class="row">
<h1 style="font-size: 2em;">Together</h1>
<!------Button----------->
<input style="padding: 1em 9em 1em 2em;" type="submit" value="Create a Project" onclick="document.location = 'signin.php'"></input>
</div>
</center>
</div>
</section>
<!------About Section----------->
<section id="aboutsect">
<hr>
<header>
<div class="row">
<!------NavBar----------->
<div class="navbar">
<div class="webname col-m-12 col-8">
<h1>Codether</h1>
</div>
<ul class="col-m-12 col-4">
<li><a href="index.php">Home</a></li>
<li><a class="active" href="index.php#about">About</a></li>
<?php
include("config.php");
// Initialize the session
// Check if the user is logged in, if not then redirect him to login page
if(!isset($_SESSION["logged"]) || $_SESSION["logged"] !== true)
{
echo " <li><a href='register.php'>Register</a></li>";
}
else{ $user=$_COOKIE[$cookie_name];
if($user=='admin'){echo "<li><a href='admin.php?'>Admin</a></li>";}
else{
echo "<li><a href='profile.php?id=$user'>Profile</a></li>";
}
}
?>
<?php
// Check if the user is logged in, if not then redirect him to login page
if(!isset($_SESSION["logged"]) || $_SESSION["logged"] !== true)
{
echo " <li><a href='signin.php'>Log In</a></li>";
}
else{
echo "<li><a href='signout.php'>Log Out</a></li>";
}
?>
<li><a href="#contactsect">Contact</a></li>
</ul>
</div>
</div>
</header>
<!------AboutUS----------->
<div class="row" id="about">
<div class="col-12 col-m-12">
<h1>About Us</h1>
</div>
<div class=" row col-m-3 col-12">
<div class="item-1">
<h4>Real-Time Code Collaboration</h4><img class="itimg" src="img/coding_.png">
<p>Codether is an online real-time<br>
collaborative code editor. We<br>
allow the users to collaborate<br>
in real-time over the internet</p>
</div>
<div class="item-2">
<h4>Chat and Communicate</h4><img class="itimg" src="img/chat.png">
<p>Chat with your fellow team<br>
members and follow along<br>
as everyone navigates through<br>
the code.</p>
</div>
<div class="item-3">
<h4>Save and Track Your Progress</h4><img class="itimg" src="img/scrum_board.png">
<p>Start off from where you left.<br>
Import as well export project<br>
files. The platform supports<br>
multile programming<br>
languages.</p>
</div>
</div>
</div>
</section>
<!------Footer----------->
<footer class="col-12 col-m-12" id="contactsect">
<div class="row">
<h1>Contact Us</h1>
<!------Table1----------->
<div class="col-8 tab1">
<table>
<tr>
<td><img src="img/add.png"></td>
<td>Silicon Valley<br>
California, USA</td>
</tr>
<tr>
<td><img src="img/cont.png"></td>
<td>408-920-5006</td>
</tr>
<tr>
<td><img src="img/email.png"></td>
<td>fzulfiqar@codether.co.uk</td>
</tr>
</table>
</div>
<!------Table2----------->
<div class=" col-4 tab2">
<table>
<tr>
<td><img src="img/fb.png"></td>
<td>codether@facebook</td>
</tr>
<tr>
<td><img src="img/twi.png"></td>
<td>codether@twitter</td>
</tr>
<tr>
<td><img src="img/link.png"></td>
<td>codether@linkedin</td>
</tr>
</table>
</div>
</div>
</footer>
</body>
</html>