-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
146 lines (134 loc) · 5.78 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
<?php
include_once 'includes/db_connect.php';
include_once 'includes/functions.php';
sec_session_start();
if (login_check($mysqli) == true) {
$logged = 'in';
} else {
$logged = 'out';
}
?>
<!DOCTYPE html>
<html>
<head>
<title>Chico State Web Development Club - Home</title>
<meta charset="UTF-8">
<script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<script src="scripts/jquery.fittext.js"></script>
<script src="scripts/scripts.js"></script>
<script src="js/sha512.js"></script>
<script src="js/forms.js"></script>
<link rel="shortcut icon" href="favicon.ico" />
<link href='http://fonts.googleapis.com/css?family=Fenix' rel='stylesheet' type='text/css'>
<link rel="stylesheet" type="text/css" href="styles/main.css">
</head>
<body>
<div id="wrap">
<header id="topNav">
<h1 id="topHeader" class="Header">CSUCWDC</h1>
<a href="index.php" class="topLink">
<div id="navOne" class="TopNavButton">
<h3 id="activeHeader" class="NavHeader">Home</h3>
</div>
</a>
<a href="about/about.php" class="topLink">
<div id="navTwo" class="TopNavButton">
<h3 class="NavHeader">About</h3>
</div>
</a>
<a href="about/contact.php" class="topLink">
<div id="navThree" class="TopNavButton">
<h3 class="NavHeader">Contact</h3>
</div>
</a>
<a href="about/tutorials.php" class="topLink">
<div id="navFour" class="TopNavButton">
<h3 class="NavHeader">Tutorials</h3>
</div>
</a>
<a href="about/members.php" class="topLink">
<div id="navSeven" class="TopNavButton">
<h3 class="NavHeader">Members</h3>
</div>
</a>
<a href="about/news.php" class="topLink">
<div id="navFive" class="TopNavButton">
<h3 class="NavHeader">News</h3>
</div>
</a>
<a href="about/schedule.php" class="topLink">
<div id="navSix" class="TopNavButton">
<h3 class="NavHeader">Schedule</h3>
</div>
</a>
</header>
<section id="body">
<h1 class = "BodyHeader">Build your own website Spring 2014</h1>
<h1 class = "BodyHeader">Mondays at 2pm in OCNL 251</h1>
<div id="contentContainer">
<a href="about/tutorials.php" class="BodyLink">
<div id="postOne" class="BodyContent">
<h3 class="PostHeader">Tutorials</h3>
<p>Get started with our tutorial section</p>
</div>
</a>
<a href="about/news.php" class="BodyLink">
<div id="postTwo" class="BodyContent">
<h3 class="PostHeader">News</h3>
<p>Create an account on the bottom right!</p>
</div>
</a>
<a href="about/contact.php" class="BodyLink">
<div id="postThree" class="BodyContent">
<h3 class="PostHeader">Contact</h3>
<p>Ask and let us know what you think</p>
</div>
</a>
<a href="about/about.php" class="BodyLink">
<div id="postFour" class="BodyContent">
<h3 class="PostHeader">About</h3>
<p>Learn about how our club works</p>
</div>
</a>
</div>
</section>
<footer style="min-width: 800px;">
<h1 class="Header">[email protected]</h1>
<span id="updated">Last Updated 03/29/14</span>
<?php if (login_check($mysqli) == true) : ?>
<span class="Login">
<form id="loginForm" method="_POST" action="includes/logout.php" name="logout_form">
<input type="submit" value="Logout" id="logoutButton">
<?php echo '<input type="hidden" value="'.$_SERVER["REQUEST_URI"].'"name="url">'?>
</form>
<a href="includes/editaccount.php"><button class="Login">Edit Account</button>
<a href="includes/viewaccount.php"><button class="Login">View Account</button></a>
<span class="Login" style="margin-right: 10px;">Logged in as <?php echo htmlentities($_SESSION['username']); ?>!</span>
</span>
<?php else : ?>
<span class="Login">
<button class="Login" id="loginButton">Login</button>
<a href="register.php"><button class="Login" id="registerButton">Register</button></a>
<?php
if (isset($_GET['logout'])) {
echo '<span id="logoutmessage">Successfully logged out!</span>';
}
?>
</span>
<form id="loginForm" class="hidden" action="includes/process_login.php" method="post" name="login_form">
Email: <input type="text" name="email" />
Password: <input type="password" name="password" id="password"/>
<?php echo '<input type="hidden" value="'.$_SERVER["REQUEST_URI"].'"name="url">'?>
<input type="button" value="Login" onclick="formhash(this.form, this.form.password);" />
</form>
<?php endif; ?>
<?php
if (isset($_GET['error']) && login_check($mysqli) == false) {
echo '<span id="logoutmessage" class="Login">Error Logging In!</span>';
}
?>
</footer>
</div>
</body>
</html>