-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcontact.php
152 lines (135 loc) · 6.29 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
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
<?php
// form processing
if(isset($_POST['submit'])){
// basic init
require_once "includes/functions.php";
// user input
$name = $_POST['frm_name'];
$mail = $_POST['frm_email'];
$subject = $_POST['frm_subject'];
$comments = $_POST['frm_comments'];
// validate input
$error = array();
if(empty($name)) $error[1] = true;
if(empty($mail)) $error[2] = true;
if(!check_email_address($mail)) $error[2] = true;
if(empty($subject)) $error[3] = true;
if(empty($comments)) $error[4] = true;
if(empty($error)){
mail("[email protected]", "iPhone: '" . $subject . "'",
"Name: \t\t\t" . $name . "\n\nEmail:\t\t\t". $mail ."\n\Message: \n" . stripslashes($comments) . "\n\n",
"From: [email protected]\r\nReply-To: $mail\r\n");
$show_succes_msg = true;
unset($_POST);
}
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta http-equiv="imagetoolbar" content="no" />
<title>iPhone app › Contact</title>
<link rel="stylesheet" type="text/css" media="screen" href="stylesheets/main.css" />
<link rel="stylesheet" type="text/css" media="screen" href="stylesheets/fancybox.css" />
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js" type="text/javascript"></script>
<script src="javascripts/jquery.embedquicktime.js" type="text/javascript" charset="utf-8"></script>
<script src="javascripts/jquery.fancybox.js" type="text/javascript" charset="utf-8"></script>
<script src="javascripts/jquery.easing.1.3.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript">
$(document).ready(function() {
jQuery.embedquicktime({
jquery: 'http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js',
plugin: 'javascripts/jquery.embedquicktime.js'
});
});
$(document).ready(function() {
$("a.link").fancybox({
'zoomOpacity' : true,
'zoomSpeedIn' : 300,
'zoomSpeedOut' : 300,
});
});
</script>
<!--[if IE 6]>
<link rel="stylesheet" type="text/css" media="screen" href="stylesheets/main-IE6.css" />
<script src="javascripts/DD_belatedPNG.js"></script>
<script>
/* EXAMPLE */
DD_belatedPNG.fix('#iphone, #iphone a, h1, .link .img');
/* string argument can be any CSS selector */
/* change it to what suits you! */
</script>
<![endif]-->
</head>
<body>
<div id="wrapper">
<div id="header">
<ul id="navigation">
<li><a href="index.html"><span>Tweetjobs</span></a></li>
<li class="current"><a href="contact.php"><span>Contact</span></a></li>
</ul>
<div id="title">
<h1>Tweetjobs IT</h1>
<a href="http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=381424542"><span>free</span></a>
</div>
</div>
<div id="main">
<div id="iphone">
<div class="img">
<div class="hvlog {width: '230', height: '346'}">
<img src="media/tweetjobsmap.jpeg" alt="" />
</div>
</div>
</div>
<form id="content" action="contact.php" method="post" accept-charset="utf-8" enctype="multipart/form-data">
<?php if($show_succes_msg){ ?>
<div class="row">
<div class="column six">
<h2>Thank you</h2>
<p>Thanks for your interest in Tweetjobs, we will get back to you as soon as possible.</p>
<p>Click on the above link to take you to iTunes and install the app now.</p>
</div>
</div>
<?php } else {?>
<div class="row">
<div class="column three">
<p<?php if($error[1]) echo ' class="error"><big>Can\'t be Empty</big' ?>>
<label for="frm_name">Name</label>
<input type="text" name="frm_name" value="<?php echo $_POST['frm_name'] ?>" id="frm_name" />
</p>
</div>
<div class="column three">
<p<?php if($error[2]) echo ' class="error"><big>Can\'t be Empty</big' ?>>
<label for="frm_email">Email</label>
<input type="text" name="frm_email" value="<?php echo $_POST['frm_email'] ?>" id="frm_email" />
</p>
</div>
</div>
<div class="row">
<div class="column three">
<p<?php if($error[3]) echo ' class="error"><big>Can\'t be Empty</big' ?>>
<label for="frm_subject">Subject</label>
<input type="text" name="frm_subject" value="<?php echo $_POST['frm_subject'] ?>" id="frm_subject" />
</p>
</div>
</div>
<div class="row">
<div class="column six">
<p<?php if($error[4]) echo ' class="error"><big>You don\'t wanna say anything?</big' ?>>
<label for="frm_comments">Message</label>
<textarea name="frm_comments" id="frm_message" rows="8" cols="40"><?php echo stripslashes($_POST['frm_comments']) ?></textarea>
<button type="submit" name="submit">Send</button>
</p>
</div>
</div>
</form>
<?php } ?>
</div>
<div id="footer">
<p><strong>Copyright © 2010</strong> by <a href="www.burnsoft.co.uk">Burnsoft Ltd</a>. Design by <a href="http://jonnotie.nl">Jonnotie</a></p>
</div>
</div>
</body>
</html>