-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
227 lines (207 loc) · 9.59 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
<!DOCTYPE html>
<?php
ob_start();
require_once('includes/UserClass.php');
$auth = new Auth();
$check = $auth->checkSession();
if($check == 1) {
header("Location: dashboard.php");
exit;
}
ob_end_clean();
?>
<html lang="en">
<head>
<meta charset="utf-8">
<title>BlogIn : Next generation blogging site</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">
<!-- Le styles -->
<link href="../assets/css/bootstrap.css" rel="stylesheet">
<style type="text/css">
body {
padding-top: 60px;
padding-bottom: 40px;
}
</style>
<link href="../assets/css/bootstrap-responsive.css" rel="stylesheet">
<!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
<!--[if lt IE 9]>
<script src="../assets/js/html5shiv.js"></script>
<![endif]-->
<!-- Fav and touch icons -->
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="../assets/ico/apple-touch-icon-144-precomposed.png">
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="../assets/ico/apple-touch-icon-114-precomposed.png">
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="../assets/ico/apple-touch-icon-72-precomposed.png">
<link rel="apple-touch-icon-precomposed" href="../assets/ico/apple-touch-icon-57-precomposed.png">
<link rel="shortcut icon" href="../assets/ico/favicon.png">
</head>
<body>
<div class="navbar navbar-fixed-top">
<div class="navbar-inner">
<div class="container">
<button type="button" class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="brand" href="#">BlogIn</a>
<div class="nav-collapse collapse">
<ul class="nav">
<li class="active"><a href="#">Home</a></li>
<li><a href="#about" role="button" data-toggle="modal">About</a></li>
<li><a href="#contact" role="button" data-toggle="modal">Contact</a></li>
<li>
<form class="form-search navbar-form">
<input type="text" class="span2 search-query" placeholder="Find blogs">
<!--<button type="submit" class="btn btn-primary">Search</button> -->
</form>
</li>
</ul>
<form class="navbar-form pull-right" method="post" action="login.php">
<input class="span2" name="email" type="email" placeholder="Email" required>
<input class="span2" name="password" type="password" placeholder="Password" required>
<button type="submit" class="btn btn-primary">Sign in</button>
</form>
</div><!--/.nav-collapse -->
</div>
</div>
</div>
<div class="container">
<?php if(isset($_GET['login'])) {
echo '<div class="alert alert-success fade in"><button type="button" class="close" data-dismiss="alert">×</button><strong>Success!</strong> Please login to continue.</div> ';
}
?>
<?php if(isset($_GET['logfail'])) {
echo '<div class="alert alert-error fade in"><button type="button" class="close" data-dismiss="alert">×</button><strong>Error!</strong> It seems that you did some serious mistake.</div> ';
}
?>
<?php if(isset($_GET['signfail'])) {
echo '<div class="alert alert-error fade in"><button type="button" class="close" data-dismiss="alert">×</button><strong>Error!</strong> Please make sure every field is correct!</div> ';
}
?>
<!-- Main hero unit for a primary marketing message or call to action -->
<div class="hero-unit">
<h2>Hello, world!</h2>
<p>Welcome to next generation blogging site. Get your blog right now in 3 simple steps</p>
<ol>
<li>Create Account</li>
<li>Create new blog</li>
<li>Start posting</li>
</ol>
<p><a class="btn btn-primary" href="#signup" role="button" data-toggle="modal" ><i class="icon-user icon-white"> </i> Sign up now »</a></p>
</div>
<hr>
<footer>
<p>© MSU IT students 2013</p>
</footer>
</div> <!-- /container -->
<!-------------------------------------------------------------------------------->
<!-- Signup dialog box design. -->
<!-------------------------------------------------------------------------------->
<div id="signup" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h3 id="myModalLabel">Please Fill in details.</h3>
</div>
<div class="modal-body well">
<form class="form-horizontal well" method="post" action="signup.php" name="signup">
<fieldset>
<div class="control-group">
<label class="control-label" for="input01">Name</label>
<div class="controls">
<input type="text" class="input-xlarge" id="input01" name="name" required>
</div>
</div>
<div class="control-group">
<label class="control-label h3" for="input02">Email</label>
<div class="controls">
<input type="email" class="input-xlarge" id="input02" name="email" required>
</div>
</div>
<div class="control-group">
<label class="control-label h3" for="input03">Password</label>
<div class="controls">
<input type="password" class="input-xlarge" id="input03" name="password" required>
</div>
</div>
<div class="control-group">
<label class="control-label h3" for="input04">Retype Password</label>
<div class="controls">
<input type="password" class="input-xlarge" id="input04" name="retype_paswwd" required>
</div>
</div>
<div class="control-group">
<label class="control-label h3" for="captcha">Captcha</label>
<div id="captcha" class="controls">
<?php
require_once('includes/recaptchalib.php');
$publickey = "6Lce-t0SAAAAACVtYmr4YtkqiS_BMl1JqjJDisC3"; // you got this from the signup page
echo recaptcha_get_html($publickey);
?>
</div>
</div>
</fieldset>
</form>
</div>
<div class="modal-footer">
<button class="btn" data-dismiss="modal" aria-hidden="true">Cancel</button>
<button class="btn btn-primary" onclick="signup.submit();">Sign up</button>
</div>
</div>
<!-------------------------------------------------------------------------------->
<!-- About dialog box design. -->
<!-------------------------------------------------------------------------------->
<div id="about" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="aboutLabel" aria-hidden="true">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h3 id="aboutLabel">About</h3>
</div>
<div class="modal-body well">
<blockquote>
<p>A blog (a portmanteau of the term web log) is a discussion or informational site published on the World Wide Web and consisting of discrete entries typically displayed in reverse chronological order.</p>
<small>Wikipedia</small>
</blockquote>
<p>Here we introduce easier blogging site! As described in just 3 simple steps you can easily create your own blog with us</p>
<p>Our reference for this blogging site was Blogger, Wordpress and Tumblr.</p>
<p>Thanks to Twitter for bootstrap library, our project guide : Mr. Parth Gandhi, and Others..</p>
</div>
<div class="modal-footer">
<button class="btn btn-primary" data-dismiss="modal" aria-hidden="true">Close this dialog</button>
</div>
</div>
<!-------------------------------------------------------------------------------->
<!-- Contact dialog box design. -->
<!-------------------------------------------------------------------------------->
<div id="contact" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="contactLabel" aria-hidden="true">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h3 id="contactLabel">Contact us</h3>
</div>
<div class="modal-body well">
<p>Bhushan Shah : <a href="mailto:bhush94@gmail.com">bhush94@gmail.com</a>
<p>Aazam Khatri : <a href="mailto:aazam.khatri@gmail.com">aazam.khatri@gmail.com</a>
</div>
<div class="modal-footer">
<button class="btn btn-primary" data-dismiss="modal" aria-hidden="true">Okay</button>
</div>
</div>
<!-- Le javascript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script src="/assets/js/jquery.js"></script>
<script src="/assets/js/bootstrap-transition.js"></script>
<script src="/assets/js/bootstrap-alert.js"></script>
<script src="/assets/js/bootstrap-modal.js"></script>
<script src="/assets/js/bootstrap-dropdown.js"></script>
<script src="/assets/js/bootstrap-scrollspy.js"></script>
<script src="/assets/js/bootstrap-tab.js"></script>
<script src="/assets/js/bootstrap-tooltip.js"></script>
<script src="/assets/js/bootstrap-popover.js"></script>
<script src="/assets/js/bootstrap-button.js"></script>
<script src="/assets/js/bootstrap-collapse.js"></script>
<script src="/assets/js/bootstrap-carousel.js"></script>
<script src="/assets/js/bootstrap-typeahead.js"></script>
</body>
</html>