-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
executable file
·65 lines (63 loc) · 3.18 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
<!DOCTYPE html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link href="css/styles_home.css" rel="stylesheet" />
<link href="css/styles.css" rel="stylesheet" />
<script src="js/root_url.js"></script>
<script src="js/jQuery.js"></script>
<script src="js/cookies.js"></script>
<script src="js/main.js"></script>
<script src="js/index_validation.js"></script>
<title>UPresent - Revolutionizing Presentations in the Classroom</title>
</head>
<body>
<div id="header">
<div id="insideHeader"><A id="logoLink" HREF="index.php"><img id="logo" src="img/OfficialMiniLogo.png"/></A>
<div id="logInPane">
<?php
$logInForm = '<form id="login" action="user.php" method="post" onSubmit="return checkLogin(this)">
<input id="logInUsername" type="username" name="username" placeholder="Username" required/>
<input id="logInPassword" type="password" name="password" placeholder="Password" required/>
<input id="logInSubmit" type="submit" name="submit" value="Log In"/>
</form>';
if (!empty($_COOKIE['user'])) {
$logout = '<DIV ID="logout">Welcome, <a id="logoutUsername" href="user-profile.php">' . $_COOKIE["user"] . '</a>! <input id="logoutSubmit" type="submit" name="submit" value="Log Out" onClick="logout()" /></DIV>';
echo $logout;
}
else {
echo $logInForm;
}
//echo '<SCRIPT TYPE="text/javascript">alert("' . $_COOKIE["user"] . '");</SCRIPT>';
?>
<script>console.log(document.cookie);</script>
</div>
</div>
<script>$(document).ready(function(e) {
if($("#logout").length === 1) {
window.location = "user.php";
}
});</script>
</div>
<div id="content">
<div id="info">
<div id="infoHeader">Welcome to UPresent!</div>
<div id="infoContent"> UPresent is an in-browser software service that lets you upload your presentations online and share them with the entire class. Just upload your presentation, add a group, and watch as it displays across everyone in the session!</div>
<IMG SRC="img/OfficialLogo.png" /> </div>
<div id="signUpWindow">
<div id="signUpHeader">Sign Up!</div>
<div id="signUpContent">
<form id="signUp" action="user.php" method="post" onSubmit="return checkRegister(this)">
<input id="signUpFname" type="text" name="fname" placeholder="First Name" required/>
<input id="signUpLname" type="text" name="lname" placeholder="Last Name" required/>
<input id="signUpUsername" type="text" name="username" placeholder="Username" required/>
<input id="signUpEmail" type="email" name="email" placeholder="Email" required/>
<input id="signUpPassword" type="password" name="password" placeholder="Password" required/>
<input id="signUpPasswordC" type="password" name="passwordC" placeholder="Confirm Password" required/>
<input id="signUpSubmit" type="submit" name="submit" value="Sign Up" />
</form>
</div>
</div>
</div>
<div id="footer">UPresent 2014 | <a href="about.php">About</a> | <a href="terms.php">Terms</a> | <a href="privacy.php">Privacy</a> | <a href="contact.php">Contact</a></div>
</body>
</html>