-
Notifications
You must be signed in to change notification settings - Fork 5
/
contact.php
85 lines (84 loc) · 3.67 KB
/
contact.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
<?php
include_once './libs/const.php';
$_pageid = 1;
?>
<!DOCTYPE html>
<html lang="en">
<head>
<?php
$_TITLE = "Contact us";
include_once './tags/common/head.php';
?>
</head>
<body>
<?php include_once './tags/global_header/header.php'; ?>
<div class="heads" style="background: url(resources/img/bag-banner-2.jpg) center center;">
<div class="container">
<div class="row">
<div class="col-md-12">
<h2><span>//</span> contact us</h2>
</div>
</div>
</div>
</div>
<!-- begin:tagline -->
<div class="page-content contact">
<div class="container">
<div class="row">
<div class="col-md-12">
<ol class="breadcrumb">
<li><a href="#">Home</a></li>
<li class="active">Contact Us</li>
</ol>
</div>
</div>
<div class="row">
<div class="col-md-12 text-center">
<h3>Address</h3>
<p>
# 6, 3rd H Street, Markham Road, Ashoknagar, Bangalore -560025<br>
pH: 9538088668
</p>
</div>
</div>
<div class="row padd20-top-btm">
<?php
if (isset($_POST["message"])) {
//TODO : NGO need ot update the right address once the create it
$to = "admin@blinx.org.in";
$subject = $_POST["subject"];
$txt = $_POST["name"] . " -- " . $_POST["message"];
//TODO : need to set actual server
$headers = "From: " . $_POST["message"];
mail($to, $subject, $txt, $headers);
?>
<div class="alert alert-success">
<strong>Success!</strong> email successfully disapatched.
</div>
<?php
} else {
?>
<form method="post" action="<?php echo URL_CONTACT ?>">
<div class="col-md-12">
<h3>Send us message, we love to hear from you </h3>
</div>
<div class="col-md-5 col-sm-5">
<input type="text" name="name" class="form-control" placeholder="Enter your name" required="">
<input type="email" name="email" class="form-control" placeholder="Enter your mail" required="">
<input type="text" name="subject" class="form-control" placeholder="Enter your subject" required="">
</div>
<div class="col-md-7 col-sm-7">
<textarea name="message" class="form-control" rows="7" placeholder="Type your message" required=""></textarea>
<input type="submit" name="submit" value="Send Message" class="btn btn-warning btn-block btn-lg">
</div>
</form>
<?php } ?>
</div>
</div>
</div>
<!-- end:tagline -->
<?php include_once './tags/global_header/footer.php'; ?>
<!-- end:copyright -->
<?php include_once './tags/common/scripts.php'; ?>
</body>
</html>