-
Notifications
You must be signed in to change notification settings - Fork 0
/
products.php
317 lines (240 loc) · 9.79 KB
/
products.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
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
<!DOCTYPE html>
<html lang="en">
<head>
<title>MTC Products</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" type="text/css" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="styler.css">
<meta name="theme-color" content="#0073e6">
<link rel="stylesheet" type="text/css" href="animate.css">
<script src="wow.min.js"></script>
<script>
new WOW().init();
</script>
</head>
<style type="text/css">
body{padding-top: 40px}
.error{color:red;}
</style>
<body data-spy="scroll" data-target="#my-navbar3">
<!--Navbar starts-->
<nav class="navbar navbar-inverse navbar-fixed-top" id="my-navbar3">
<div class="container">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<button type="button" class="navbar-toggle wow bounceInDown" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="index.php">MTC</a>
</div>
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav">
<li ><a href="index.php#feedback">Feedback</a></li>
<li ><a href="index.php#price-list">Price Details</a></li>
<li ><a href="index.php#faq">Faq</a></li>
<li ><a href="index.php#about">About Us</a></li>
<li ><a href="index.php#contact">Contact Us</a></li>
</ul>
</div>
</div>
</nav>
<script src="http://code.jquery.com/jquery-2.1.1.min.js"></script>
<!-- Latest compiled and minified JavaScript -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>
<!--Navbar ends-->
<div class="jumbotron text-center" style="background-color:#0073e6">
<h1 >MEHTA TRADING COMPANY </h1><span><img src="truck.png" style="height:30px ;width:30px" /></span><h6><strong>Automobile Spare Parts Distribution</strong></h6></span>
<p>We offer the best products at the lowest rates</p>
<div class="btn-group btn-lg" role="group" aria-label="">
<a href="index.php#price-list"><button type="button" class="btn btn-info" style="padding-left:30px; padding-right:30px;background-color:#66b3ff">View Products</button></a>
<a href="placeOrder.php"><button type="button" class="btn btn-danger" style="padding-left:30px; padding-right:30px; background-color:#ff4d4d">Place Order</button></a>
</div>
</div>
<div class="container">
<section>
<div class="page-header">
<h2>Some of our Products <span class="glyphicon glyphicon-shopping-cart"></span></h2>
</div><!-- End Page Header -->
</section>
</div>
<div class="container" style="max-width:700px; max-height:400px">
<section>
<div id="carousel-example-generic" class="carousel slide" data-ride="carousel">
<!-- Indicators -->
<ol class="carousel-indicators">
<li data-target="#carousel-example-generic" data-slide-to="0" class="active"></li>
<li data-target="#carousel-example-generic" data-slide-to="1"></li>
<li data-target="#carousel-example-generic" data-slide-to="2"></li>
<li data-target="#carousel-example-generic" data-slide-to="3"></li>
<li data-target="#carousel-example-generic" data-slide-to="4"></li>
<li data-target="#carousel-example-generic" data-slide-to="5"></li>
<li data-target="#carousel-example-generic" data-slide-to="6"></li>
</ol>
<!-- Wrapper for slides -->
<div class="carousel-inner" role="listbox">
<div class="item active">
<img src="mtc.jpg" style="height:400px; width:700px; " alt="Mehta Trading Company">
<div class="carousel-caption">
Mehta Trading Company Office
</div>
</div>
<div class="item">
<img src="part1.jpg" style="height:400px; width:700px; " alt="sparepart-1">
<div class="carousel-caption">
Bell Crank
</div>
</div>
<div class="item">
<img src="part3.jpg" style="height:400px; width:700px; " alt="sparepart-2">
<div class="carousel-caption">
King Pin Set
</div>
</div>
<div class="item">
<img src="part4.jpg" style="height:400px; width:700px; " alt="sparepart-3">
<div class="carousel-caption">
SRMT Product Range
</div>
</div>
<div class="item">
<img src="part5.jpg" style="height:400px; width:700px; " alt="sparepart-4">
<div class="carousel-caption">
Yoke Assembly
</div>
</div>
<div class="item">
<img src="part6.jpg" style="height:400px; width:700px; " alt="sparepart-5">
<div class="carousel-caption">
SBP Product Range
</div>
</div>
<div class="item">
<img src="part7.jpg" style="height:400px; width:700px; " alt="sparepart-6">
<div class="carousel-caption">
Brake Drum
</div>
</div>
</div>
<!-- Controls -->
<a class="left carousel-control" href="#carousel-example-generic" role="button" data-slide="prev">
<span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
<span class="sr-only">Previous</span>
</a>
<a class="right carousel-control" href="#carousel-example-generic" role="button" data-slide="next">
<span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
<span class="sr-only">Next</span>
</a>
</div>
</section>
</div>
<div class="container" style="min-height:30px"></div>
<div class="container-fluid">
<section>
<div class="well">
<div class="container text-center">
<h3>Please subscribe for great deals</h3>
<p>Enter your name and email address</p>
<?php
// define variables and set to empty values
$nameerror = $emailerror = $messageerror= $messagetotal= $mobileerror = $header = $mymail = $mymessage = "";
$name = $email = $message= $website= $mobile = "";
if(isset($_POST['name2'],$_POST['email2'])){
if(empty($_POST['name2']))
{
$nameerror="Please enter a name";
}else{
$name=htmlentities($_POST['name2']);
}
if(empty($_POST['email2']))
{
$emailerror="Please enter an email address";
}
else if (strlen($_POST['email2'])>25) {
$emailerror="Your email address is too long. Please enter a correct email address.";
}
else if(filter_var($_POST['email2'],FILTER_VALIDATE_EMAIL)==false)
{
$emailerror="Please provide a valid email address";
}
else{
$email="<".htmlentities($_POST['email2']).">";
}
if(empty($_POST['mobile2']))
{
$mobileerror="Please enter a Mobile no.";
}
else if (!preg_match("/^[0-9]*$/",$_POST['mobile2'])) {
$mobileerror = "Please enter only digits";
}
else if (strlen($_POST['mobile2'])>15)
{
$mobileerror="Please enter a valid Mobile no.";
}
else if(strlen($_POST['mobile2'])<10)
{
$mobileerror="Please enter a valid Mobile No.";
}
else{
$mobile=htmlentities($_POST['mobile2']);
}
$messagetotal="Name: $name"."\n"."Mobile No. : $mobile"."\n"."E-mail Address: $email";
$mymail="rajenmehta5@gmail.com";
$mymessage="Thank you for your subscribing. We have successfully stored your data and we will revert back to you soon.";
$headers="From: $email";
$header="From: $mymail";
$headers="From: $email";
if(empty($nameerror) && empty($emailerror) && empty($mobileerror))
{
mail($mymail, 'Website based (Subscribe) entry', $messagetotal, $headers);
mail($email, 'Mehta Trading Company', $mymessage, $header);
}
}
?>
<form name="subscribe1" method="POST" action="" class="form-inline">
<div class="form-group">
<label for="subscription" >Name<label style="color:red">*</label></label>
<input type="text" name="name2" class="form-control" id="name" placeholder="Enter your name">
<span class="error" style="color:red"><?php echo $nameerror;?></span>
</div>
<div class="form-group">
<label for="email">E-mail<label style="color:red">*</label></label>
<input type="text" name="email2" class="form-control" id="email" placeholder="Enter your email">
<span class="error" style="color:red"><?php echo $emailerror;?></span>
</div>
<div class="form-group">
<label for="mobile">Mobile No.<label style="color:red">*</label></label>
<input type="text" name="mobile2" class="form-control" id="mobile2" placeholder="Enter your Mobile no.">
<span class="error" style="color:red"><?php echo $mobileerror;?></span>
</div>
<div class="form">
<input name="subscribe" type="submit" value="submit" class="btn btn-primary"/>
</div>
</form>
</div>
</div>
</section>
</div>
<footer>
<div class="container-fluid" style="background-color:#808080">
<div class="row">
<div class="col-md-4">
</div>
<div class="col-md-4 text-center">
<h5 style="color:white">Copyright © <?php echo date("Y"); ?> Mehta Trading Company | All rights reserved</h5>
</div>
<div class="col-md-2">
</div>
<div class="col-md-2 col-md-offset-2 text-center">
<h6 style="padding-left:55px ;padding-top:-20px">By: Tirth Rajen Mehta</h6>
</div>
</div>
</div>
</footer>
<script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"></script>
<script src="jquery.min.js"></script>
<script src="js/bootstrap.js"></script>
</body>
</html>