/
index.php
215 lines (185 loc) · 7.67 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
<!doctype html>
<html lang="en">
<?php
include 'core/init.php';
?>
<?php include'includes/head.php';?>
<body id="page-top" class="index">
<nav class="navbar navbar-default navbar-fixed-top">
<div class="container">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header page-scroll">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand page-scroll" href="index.php">Craigslist</a>
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav navbar-right">
<li class="hidden">
<a href="#page-top"></a>
</li>
<li>
<a href="#services" class="page-scroll" href="#services">Sales</a>
</li>
<li>
<a class="page-scroll" href="#portfolio">Jobs</a>
</li>
<li>
<a class="page-scroll" href="#about">Real Estate</a>
</li>
<li>
<a class="page-scroll" href="#contact">Events</a>
</li>
<li>
<a class="page-scroll" href="#team">Team</a>
</li>
<p>
<?php
if(empty($_POST)===false){
$username=$_POST['username'];
$password=$_POST['password'];
if(empty($username) ===true||empty($password)===true){
$errors[]='Please enter a username and password';
}
else if(users_exists($username)===false){
$errors[]='The username name entered is wrong.';
} else{
$login=login($username,$password);
if($login==false){
$errors[]='Either the username or the password entered is wrong.';
}
else{
$_SESSION['user_id']=$login;
header('Location:home.php');
exit();
}
}
}
else{
$errors[]='Please enter your username and password';
}
if(empty($errors)===false){
$arr=output_errors($errors);
echo "<br/>";
echo "<font color=#fed136>".$arr."</font>";
}
?>
</p>
<form action=" " method="post" enctype="multipart/form-data">
<input type="text" name="username" placeholder="Username" >
<input type="password" name="password" placeholder="Password" >
<input type="submit" class="btn btn-success" value="Login" >
</form>
</ul>
</div>
<!-- /.navbar-collapse -->
</div>
<!-- /.container-fluid -->
</nav>
<!-- Header -->
<header>
<div class="container">
<div class="intro-text">
<div class="intro-lead-in">Welcome To Our Improvised Version of Craigslist</div>
<div class="col-lg-12 text-center">
<h3 class="section-subheading text-muted">If you have not registered, register here for free!</h3>
</div>
<a href="register.php" class="page-scroll btn btn-xl">Register</a>
</div>
</div>
</header>
<!-- Services Section -->
<section id="services">
<div class="container">
<div class="row">
<div class="col-lg-12 text-center">
<a href="show_sales_latest.php"><h2 class="section-heading">SALES</h2></a>
<h3 class="section-subheading text-muted">Our sales includes.</h3>
<h4 class="service-heading"><a href="gadgets.php">Gadgets</a></h4>
<h4 class="service-heading"><a href="clothes.php">Clothing</a></h4>
<h4 class="service-heading"><a href="accessories.php">Accessories</a></h4>
<h4 class="service-heading"><a href="vehicles.php">Vehicles</a><br/></h4>
</div>
</div>
<div class="row text-center">
</div>
</section>
<!-- Portfolio Grid Section -->
<section id="portfolio" class="bg-light-gray">
<div class="container">
<div class="row">
<div class="col-lg-12 text-center">
<a href="show_jobs_latest.php"><h2 class="section-heading">JOBS</h2></a>
<h3 class="section-subheading text-muted">Our jobs includes.</h3>
<h4 class="service-heading"><a href="accounting.php">Accounting</a></h4>
<h4 class="service-heading"><a href="marketing.php">Marketing</a></h4>
<h4 class="service-heading"><a href="sales.php">Sales</a></h4>
<h4 class="service-heading"><a href="hr.php">HR</a><br/></h4>
<h4 class="service-heading"><a href="software.php">Software Engineering</a><br/></h4>
</div>
</div>
</div>
</section>
<!-- About Section -->
<section id="about">
<div class="container">
<div class="row">
<div class="col-lg-12 text-center">
<a href="show_realestate_latest.php"><h2 class="section-heading">REAL ESTATE</h2></a>
<h3 class="section-subheading text-muted">Our jobs includes.</h3>
<h4 class="service-heading"><a href="commercial.php">Commercial</a></h4>
<h4 class="service-heading"><a href="residential.php">Residential</a></h4>
</div>
</div>
</div>
</section>
<section id="contact" class="bg-light-gray">
<div class="container">
<div class="row">
<div class="col-lg-12 text-center">
<a href="show_realestate_latest.php"><h2 class="section-heading">EVENTS</h2></a>
<h3 class="section-subheading text-muted">Our events includes.</h3>
<h4 class="service-heading"><a href="arts.php">Arts</a></h4>
<h4 class="service-heading"><a href="cultural.php">Cultural</a></h4>
<h4 class="service-heading"><a href="literary.php">Literary</a></h4>
<h4 class="service-heading"><a href="sports.php">Sports</a></h4>
</div>
</div>
</div>
</section>
<!-- Contact Section -->
<section id="team">
<div class="container">
<div class="row">
<div class="col-lg-12 text-center">
<h2 class="section-heading">TEAM</h2>
<h3 class="section-subheading text-muted">Meet our amazing team.</h3>
<div class="row">
<div class="col-sm-3">
<div class="team-member">
<img src="img/team/1.jpg" class="img-responsive img-circle" alt="">
<h4>Lakshmi Naidu</h4>
</div>
</div>
<div class="col-sm-3">
<div class="team-member">
<img src="img/team/2.jpg" class="img-responsive img-circle" alt="">
<h4>Sanmathi Sathyanarayana Naga</h4>
</div>
</div>
<div class="col-sm-3">
<div class="team-member">
<img src="img/team/3.jpg" class="img-responsive img-circle" alt="">
<h4>Rahul Shantaram Rao</h4>
</div>
</div>
</div>
</div>
</div>
</section>
<?php include'includes/overall/footer.php';?>