/
contact-us.php
159 lines (132 loc) · 6.07 KB
/
contact-us.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
<!--
<?php
define("EMAIL", "tim@twcrecruitment.com");
if(isset($_POST['submit'])) {
include('validate.class.php');
//assign post data to variables
$name = trim($_POST['name']);
$email = trim($_POST['email']);
$message = trim($_POST['message']);
//start validating our form
$v = new validate();
$v->validateStr($name, "your name", 3, 75);
$v->validateEmail($email, "email");
$v->validateStr($message, "your message", 5, 1000);
if(!$v->hasErrors()) {
$header = "From: $email\n" . "Reply-To: $email\n";
$subject = "Event Management Direct Website Contact Message from $name";
$email_to = EMAIL;
$emailMessage = "From: " . $name . "\n";
$emailMessage .= "Email Address: " . $email . "\n\n";
$emailMessage .= $message;
//use php's mail function to send the email
@mail($email_to, $subject ,$emailMessage ,$header );
//grab the current url, append ?sent=yes to it and then redirect to that url
$url = "http". ((!empty($_SERVER['HTTPS'])) ? "s" : "") . "://".$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'];
header('Location: '.$url."?sent=yes");
} else {
//set the number of errors message
$message_text = $v->errorNumMessage();
//store the errors list in a variable
$errors = $v->displayErrors();
//get the individual error messages
$nameErr = $v->getError("your name");
$emailErr = $v->getError("email");
$messageErr = $v->getError("your message");
}//end error check
}// end isset
?>
-->
<!DOCTYPE html>
<html>
<head>
<title>TWC Recruitment - Recruiting the markets best talent</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- Bootstrap -->
<link href="css/bootstrap.min.css" rel="stylesheet">
<link href='http://fonts.googleapis.com/css?family=Lato:300,400,700' rel='stylesheet' type='text/css'>
<link href="style.css" rel="stylesheet">
<link href="https://netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" rel="stylesheet">
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
<![endif]-->
</head>
<body>
<nav class="navbar navbar-default" role="navigation">
<div class="container-fluid">
<div class="navbar-header">
<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>
</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">
<li><a href="/index.html">Home</a></li>
<li><a href="/about-us.html">About us</a></li>
<li><a href="/client-services.html">Client services</a></li>
<li><a href="/our-sectors.html">Sectors</a></li>
<li class="active"><a href="/contact-us.php">Contact us</a></li>
</ul>
</div>
</div>
</nav>
<div class="heading">
<img src="images/mini-logo.png" width="8%" />
<h1><em>Contact</em> us</h1>
</div>
<div class="row page-intro">
<div class="col-md-8 col-md-offset-2">
<p>If you would like to find out how <em>TWC</em> Recruitment can help you, you can get in touch with a member of the team in the following ways.</p>
</div>
</div>
<div class="row section">
<div class="col-md-4 col-md-offset-2 column">
<h3><em>Call</em> us</h3>
<p class="intro">You can give us a ring 5 days a week</p>
<p>Monday - Friday 08:30 - 18:00</p>
<p><em>Office:</em> 01246 812 735</p>
<p><em>Mobile:</em> 07540 103 654</p>
<br />
<h3><em>Email</em>us</h3>
<p>enquires@twcrecruitment.com</p>
</div>
<div class="col-md-4 column">
<h3><em>Send</em> a message</h3>
<br />
<div id="contact-form">
<span class="message"><?php echo $message_text; ?></span>
<?php if(isset($_GET['sent'])): ?><h4><i class="fa fa-check-circle-o"></i> Thank you. We've received your <br />message & we'll be in touch shortly.</h4><?php endif; ?>
<form id="contact_form" class="clear" method="post" action="#">
<p><label>Your name:<br />
<input type="text" name="name" class="textfield" size="40" value="<?php echo htmlentities($name); ?>" />
</label><br /><span class="errors"><?php echo $nameErr; ?></span></p>
<p><label>Your email address: <br />
<input type="text" name="email" class="textfield" size="40" value="<?php echo htmlentities($email); ?>" />
</label><br /><span class="errors"><?php echo $emailErr ?></span></p>
<p><label>Your message: <br />
<textarea name="message" class="textarea" cols="40" rows="5"><?php echo htmlentities($message); ?></textarea>
</label><br /><span class="errors"><?php echo $messageErr ?></span></p>
<p><input type="submit" size="400" name="submit" class="button" value="Send message" /></p>
</form>
</div>
</div>
</div>
</div>
<div class="row footer">
<div class="col-md-12">
<p><em>TWC</em> Recruitment is a Limited company incorporated in England and Wales (No. 08409156)</p>
</div>
</div>
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
<script src="https://code.jquery.com/jquery.js"></script>
<!-- Include all compiled plugins (below), or include individual files as needed -->
<script src="js/bootstrap.min.js"></script>
</body>
</html>