-
Notifications
You must be signed in to change notification settings - Fork 0
/
contact.php
111 lines (92 loc) · 2.91 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
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
<?php
require_once 'app/init.php';
$auth = new TwitterAuth($db, $client);
?>
<!DOCTYPE html>
<html>
<head>
<title>Free Online Marketplace</title>
<meta charset="UTF-8">
<!-- CSS -->
<link rel="stylesheet" href="style.css">
<!-- JQuery -->
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/main.js"></script>
<!-- Google Fonts -->
<link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700|Oswald|Pacifico' rel='stylesheet' type='text/css'>
</head>
<body>
<div class='page'>
<?php include "header.php"; //Include header module ?>
<div class='fullContainer'>
<div class='contentContainer'>
<content>
<h2>Contact us</h2>
<?php
if(isset($_POST["contact"]))
{
$name = Escape($_POST["contact"]);
$subject = Escape($_POST["subject"]);
$message = nl2br(Escape($_POST["message"]));
$email = Escape($_POST["email"]);
$message = "Message from " . $SITE_NAME . " [Name: " . $name . " | Email: " . $email . "]<br>" . $message;
mail($CONTACT_MAIL, $subject, $message);
echo "<h3>Email sent! Thank you for your message. We will reply as soon as possible.</h3>";
}
else
{
?>
<form method="POST" action="contact.php">
<table style="width: 100%;">
<tr>
<td style="width: 50%;">
<h3>Your name</h3>
</td>
<td style="width: 50%;">
<input type="text" required name="name" style="height: 30px; width: 98%; border-radius: 5px;"/>
</td>
</tr>
<tr>
<td style="width: 50%;">
<h3>Email</h3>
</td>
<td style="width: 50%;">
<input type="email" required name="email" style="height: 30px; width: 98%; border-radius: 5px;"/>
</td>
</tr>
<tr>
<td style="width: 50%;">
<h3>Subject</h3>
</td>
<td style="width: 50%;">
<input type="text" required name="subject" style="height: 30px; width: 98%; border-radius: 5px;"/>
</td>
</tr>
<tr>
<td style="width: 50%;">
<h3>Message</h3>
</td>
<td style="width: 50%;">
<textarea name="message" required style="min-width: 470px; max-width: 470px; min-height: 100px; max-height: 300px;"></textarea>
</td>
</tr>
<tr>
<td style="width: 50%;">
<h3>Contact</h3>
</td>
<td style="width: 50%;">
<input type="submit" value="Contact" name="contact" style="width: 98%; border-radius: 5px; height: 100%;"/>
</td>
</tr>
</table>
</form>
<?php
}
?>
</content>
</div>
</div>
</div>
<?php include "clean.php"; ?>
</body>
</html>