-
Notifications
You must be signed in to change notification settings - Fork 3
/
mainPage.php
234 lines (229 loc) · 9.02 KB
/
mainPage.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Bootstrap Real Estate Website Template</title>
<link rel="stylesheet" href="css/bootstrap.css">
</head>
<body>
<?php
include("topmenu.php");
?>
<div class="container">
<div class="row">
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12 hidden-xs">
<div id="carousel-299058" class="carousel slide">
<ol class="carousel-indicators">
<li data-target="#carousel-299058" data-slide-to="0" class=""> </li>
<li data-target="#carousel-299058" data-slide-to="1" class="active"> </li>
<li data-target="#carousel-299058" data-slide-to="2" class=""> </li>
</ol>
<div class="carousel-inner">
<div class="item"> <a href="mainPage.php"><img class="slideShow" src="images/logo.jpg" alt="thumb"> </a>
<div class="carousel-caption"> </div>
</div>
<div class="item"> <a href="posts.php"> <img class="slideShow" src="images/donatenow.jpg" alt="thumb"></a>
<div class="carousel-caption"> </div>
</div>
<div class="item"> <a href= "newpost.php"> <img class="slideShow" src="images/uploadcause.png" alt="thumb"> </a>
<div class="carousel-caption"> </div>
</div>
</div>
<script>
var myIndex = 0;
carousel();
function carousel() {
var i;
var x = document.getElementsByClassName("item");
for (i = 0; i < x.length; i++) {
x[i].style.display = "none";
}
myIndex++;
if (myIndex > x.length) {myIndex = 1}
x[myIndex-1].style.display = "block";
setTimeout(carousel, 3000); // Change image every 2 seconds
}
</script>
<a class="left carousel-control" href="#carousel-299058" data-slide="prev"><span class="icon-prev"></span></a> <a class="right carousel-control" href="#carousel-299058" data-slide="next"><span class="icon-next"></span></a></div>
</div>
</div>
<hr>
</div>
<section>
<div class="container">
<div class="row">
<div class="col-lg-2 col-md-2 col-sm-3 col-xs-3">
<div class="media-object-default">
<div class="media">
<div class="media-left"> <a href="Category.php?post_category=Emergency"> <img class="media-object img-circle" src="images/emergency.PNG" alt="placeholder image"> </a> </div>
<div class="media-body">
</div>
</div>
</div>
</div>
<div class="col-lg-2 col-md-2 col-sm-2 col-xs-2">
<div class="media">
<div class="media-left"> <a href="Category.php?post_category=Medical"> <img class="media-object img-circle" src="images/med.PNG" alt="placeholder image"></a></div>
<div class="media-body">
</div>
</div>
</div>
<div class="col-lg-2 col-md-2 col-sm-2 hidden-sm hidden-xs">
<div class="media">
<div class="media-left"> <a href="Category.php?post_category=Education"> <img class="media-object img-circle" src="images/edu.PNG" alt="placeholder image"></a></div>
<div class="media-body">
</div>
</div>
</div>
<div class="col-lg-2 col-md-2 col-sm-4 hidden-sm hidden-xs">
<div class="media">
<div class="media-left"> <a href="Category.php?post_category=Memorials"> <img class="media-object img-circle" src="images/memo.PNG" alt="placeholder image"></a></div>
<div class="media-body">
</div>
</div>
</div>
<div class="col-lg-2 col-md-2 col-sm-4 hidden-sm hidden-xs">
<div class="media">
<div class="media-left"> <a href="Category.php?post_category=Sports"> <img class="media-object img-circle" src="images/sport.PNG" alt="placeholder image"></a></div>
<div class="media-body">
</div>
</div>
</div>
<div class="col-lg-2 col-md-2 col-sm-4 hidden-sm hidden-xs">
<div class="media">
<div class="media-left"> <a href="Category.php?post_category=Voluteer"> <img class="media-object img-circle" src="images/voluteer.PNG" alt="placeholder image"></a></div>
<div class="media-body">
</div>
</div>
</div>
</div>
</section>
<hr>
<div class="container">
<div class="row">
<div class="col-lg-9 col-md-12">
<div class="row">
<?php
$conn=mysqli_connect("localhost","root","","sahara");
$sql="Select * from post";
$res=mysqli_query($conn,$sql);
$i=1;
while($row=mysqli_fetch_array($res)){
if($i==4){
echo "</div></div><div class='row'>";
}
?>
<?php if($i==4){$i=1;}
if($i==1){ echo "<div class='col-lg-4 col-md-4 col-sm-6 col-xs-6'>";
}
else if($i==2){ echo "<div class='col-lg-4 col-md-4 col-sm-6 col-xs-6'>";}
else if($i==3){ echo "<div class='col-lg-4 col-md-4 col-sm-6 hidden-sm hidden-xs";}?>
<div>
<div class="thumbnail"> <img src="<?php echo $row[9];?>" alt="Thumbnail Image 1" class="img-responsive">
<div class="caption">
<h3><?php echo $row[1];?></h3>
<hr>
<p class="text-center"><a href="postDisplay.php?<?php $row[0];?>" class="btn btn-success" role="button" value=1>Donate Now</a></p>
</div>
</div>
</div>
<?php
if($i==3){echo "</div></div>";
}
++$i;
}
if($row==null){echo "</div></div>"; }
?>
</div>
<div class="col-lg-3 col-md-6 col-md-offset-3 col-lg-offset-0">
<div class="well">
<h3 class="text-center">Find a Cause</h3>
<form class="form-horizontal" method="post" action="searchCause.php">
<div class="form-group">
<label for="location1" class="control-label">Location</label>
<select class="form-control" name="loc" id="location1">
<option >Pakistan</option>
<option>USA</option>
<option >China</option>
</select>
</div>
<div class="form-group">
<label for="type1" class="control-label">Category</label>
<select class="form-control" name="cat" id="type1">
<option >Emergency</option>
<option >Medical</option>
<option >Education</option>
<option >Memorial</option>
<option >Sports</option>
<option >Volunteer</option>
</select>
</div>
<input class="btn btn-danger" type="submit" value="Search" >
</form>
</div>
<hr>
</div>
</div>
</div>
<hr>
<hr>
<div class="container well">
<div class="row">
<div class="col-xs-6 col-sm-6 col-lg-4 col-md-4"> <span class="text-right">
</span>
<h3>About Us</h3>
<hr>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Atque, consequatur neque exercitationem distinctio esse! Cupiditate doloribus a consequatur iusto illum eos facere vel iste iure maxime. Velit, rem, sunt obcaecati eveniet id nemo molestiae. In.</p>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Atque, consequatur neque exercitationem distinctio esse! Cupiditate doloribus a consequatur iusto illum eos facere vel iste iure maxime. Velit, rem, sunt obcaecati eveniet id nemo molestiae. In.</p>
</div>
<div class="col-xs-6 col-sm-6 col-lg-4 col-md-4 hidden-sm hidden-xs"> <span class="text-right"> </span>
<h3>Latest News</h3>
<hr>
<div class="media-object-default">
<div class="media">
<div class="media-body">
<h4 class="media-heading">Heading 1</h4>
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Dolorum, quod temporibus veniam deserunt deleniti accusamus voluptatibus at illo sunt quisquam. </div>
<div class="media-right"> <a href="#"> <img class="media-object" src="images/64X64.gif" alt="placeholder image"></a></div>
</div>
<div class="media">
<div class="media-body">
<h4 class="media-heading">Heading 2</h4>
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Illo, iure nemo earum quae aliquid animi eligendi rerum rem porro facilis.</div>
<div class="media-right"> <a href="#"> <img class="media-object" src="images/64X64.gif" alt="placeholder image"></a></div>
</div>
</div>
</div>
<div class="col-xs-6 col-sm-6 col-lg-4 col-md-4"> <span class="text-right"> </span>
<h3>Contact Us</h3>
<hr>
<address>
<strong>MyStoreFront, Inc.</strong><br>
Indian Treasure Link<br>
Quitman, WA, 99110-0219<br>
<abbr title="Phone">P:</abbr> (123) 456-7890
</address>
<address>
<strong>Full Name</strong><br>
<a href="mailto:#">first.last@example.com</a>
</address>
</div>
</div>
</div>
<footer class="text-center">
<div class="container">
<div class="row">
<div class="col-xs-12">
<p>Copyright © MyWebsite. All rights reserved.</p>
</div>
</div>
</div>
</footer>
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
<script src="js/jquery-1.11.3.min.js"></script>
<!-- Include all compiled plugins (below), or include individual files as needed -->
<script src="js/bootstrap.js"></script>
</body>
</html>