<!DOCTYPE HTML>
<html>
<head>
<title>PhotoArtWork</title>
<meta name="description" content="website description" />
<meta name="keywords" content="website keywords, website keywords" />
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<!-- stylesheets -->
<link href="css/style.css" rel="stylesheet" type="text/css" />
<link href="css/light.css" rel="stylesheet" type="text/css" />
<!-- modernizr enables HTML5 elements and feature detects -->
<script type="text/javascript" src="js/modernizr-1.5.min.js"></script>
</head>
<body>
<div id="main">
<!-- begin header -->
<header>
<div id="logo"><h1>PHOTO<a href="#">ART</a>WORK</h1></div>
<nav>
<ul class="sf-menu" id="nav">
<li><a href="index.html">home</a></li>
<li><a href="about.html">about me</a></li>
<li><a href="#">my portfolio</a>
<ul>
<li><a href="portfolio_one.html">portfolio_one</a></li>
<li><a href="portfolio_two.html">portfolio_two</a></li>
</ul>
</li>
<li><a href="blog.html">blog</a></li>
<li class="selected"><a href="contact.html">contact</a></li>
</ul>
</nav>
</header>
<!-- end header -->
<!-- begin content -->
<div id="site_content">
<div id="left_content">
<h1>Contact</h1>
<p>Say hello, using this contact form.</p>
<?php
// This PHP Contact Form is offered "as is" without warranty of any kind, either expressed or implied.
// David Carter at www.css3templates.co.uk shall not be liable for any loss or damage arising from, or in any way
// connected with, your use of, or inability to use, the website templates (even where David Carter has been advised
// of the possibility of such loss or damage). This includes, without limitation, any damage for loss of profits,
// loss of information, or any other monetary loss.
// Set-up these 3 parameters
// 1. Enter the email address you would like the enquiry sent to
// 2. Enter the subject of the email you will receive, when someone contacts you
// 3. Enter the text that you would like the user to see once they submit the contact form
$to = 'enter email address here';
$subject = 'Enquiry from the website';
$contact_submitted = 'Your message has been sent.';
// Do not amend anything below here, unless you know PHP
function email_is_valid($email) {
return preg_match('/^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}$/i',$email);
}
if (!email_is_valid($to)) {
echo '<p style="color: red;">You must set-up a valid (to) email address before this contact page will work.</p>';
}
if (isset($_POST['contact_submitted'])) {
$return = "\r";
$youremail = trim(htmlspecialchars($_POST['your_email']));
$yourname = stripslashes(strip_tags($_POST['your_name']));
$yourmessage = stripslashes(strip_tags($_POST['your_message']));
$contact_name = "Name: ".$yourname;
$message_text = "Message: ".$yourmessage;
$user_answer = trim(htmlspecialchars($_POST['user_answer']));
$answer = trim(htmlspecialchars($_POST['answer']));
$message = $contact_name . $return . $message_text;
$headers = "From: ".$youremail;
if (email_is_valid($youremail) && !eregi("\r",$youremail) && !eregi("\n",$youremail) && $yourname != "" && $yourmessage != "" && substr(md5($user_answer),5,10) === $answer) {
mail($to,$subject,$message,$headers);
$yourname = '';
$youremail = '';
$yourmessage = '';
echo '<p style="color: blue;">'.$contact_submitted.'</p>';
}
else echo '<p style="color: red;">Please enter your name, a valid email address, your message and the answer to the simple maths question before sending your message.</p>';
}
$number_1 = rand(1, 9);
$number_2 = rand(1, 9);
$answer = substr(md5($number_1+$number_2),5,10);
?>
<form id="contact" action="contact.php" method="post">
<div class="form_settings">
<p><span>Name</span><input class="contact" type="text" name="your_name" value="<?php echo $yourname; ?>" /></p>
<p><span>Email Address</span><input class="contact" type="text" name="your_email" value="<?php echo $youremail; ?>" /></p>
<p><span>Message</span><textarea class="contact textarea" rows="5" cols="50" name="your_message"><?php echo $yourmessage; ?></textarea></p>
<p style="line-height: 1.7em;">To help prevent spam, please enter the answer to this question:</p>
<p><span><?php echo $number_1; ?> + <?php echo $number_2; ?> = ?</span><input type="text" name="user_answer" /><input type="hidden" name="answer" value="<?php echo $answer; ?>" /></p>
<p style="padding-top: 15px"><span> </span><input class="submit" type="submit" name="contact_submitted" value="send" /></p>
</div>
</form>
</div>
<div id="right_content">
<img src="images/contact.jpg" width="450" height="450" title="contact" alt="contact" />
</div>
</div>
<!-- end content -->
<!-- begin footer -->
<footer>
<p>Copyright © 2012 PhotoArtWork. All Rights Reserved. <a href="http://www.moobnn.com">模板在线</a> <a href="http://guantaow.taobao.com" target="_blank">厚朴网络 淘宝店</a>.</p>
<p><img src="images/twitter.png" alt="twitter" /> <img src="images/facebook.png" alt="facebook" /> <img src="images/rss.png" alt="rss" /></p>
</footer>
<!-- end footer -->
</div>
<!-- javascript at the bottom for fast page loading -->
<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript" src="js/jquery.easing-sooper.js"></script>
<script type="text/javascript" src="js/jquery.sooperfish.js"></script>
<!-- initialise sooperfish menu -->
<script type="text/javascript">
$(document).ready(function() {
$('ul.sf-menu').sooperfish();
});
</script>
</body>
</html>
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
黑色大图个性相册网页模板(2色)_黑色大图图片相册个人整站幻灯.rar (66个子文件)
style.css 8KB
prev_arrow.gif 78B
dark.css 2KB
10_thumb.jpg 985B
contact.php 6KB
home_3.jpg 69KB
2.jpg 27KB
modernizr-1.5.min.js 11KB
10.jpg 43KB
dark.png 3KB
prev_arrow_white.gif 78B
9_thumb.jpg 2KB
jquery.sooperfish.js 4KB
about.jpg 35KB
6.jpg 27KB
YanoneKaffeesatz-Regular.ttf 85KB
1.jpg 45KB
7_thumb.jpg 1KB
8_thumb.jpg 2KB
NewsCycle-Regular.eot 14KB
blog_2510.html 4KB
NewsCycle-Regular.ttf 98KB
portfolio_one.html 12KB
light_blog.png 1003B
portfolio_two.css 3KB
5.jpg 49KB
light.css 2KB
twitter.png 865B
image_transparent.png 199B
calendar.png 1KB
6_thumb.jpg 2KB
home_1.jpg 31KB
2_thumb.jpg 1KB
facebook.png 753B
8.jpg 80KB
3_thumb.jpg 2KB
1_thumb.jpg 2KB
index.html 3KB
next_arrow.gif 79B
portfolio_two.html 13KB
about.html 3KB
next_arrow_white.gif 79B
rss.png 1KB
portfolio_one.css 3KB
dark_old.png 2KB
YanoneKaffeesatz-Regular.eot 28KB
light_bullet.png 959B
jquery.galleriffic.js 32KB
dark_blog.png 1003B
jquery.easing-sooper.js 5KB
image_fade.js 2KB
jquery.min.js 56KB
jquery.opacityrollover.js 962B
3.jpg 50KB
7.jpg 15KB
blog.html 4KB
5_thumb.jpg 2KB
loader_white.gif 9KB
9.jpg 80KB
home_2.jpg 26KB
light.png 5KB
dark_bullet.png 260B
4_thumb.jpg 1KB
loader.gif 10KB
4.jpg 23KB
contact.jpg 32KB
共 66 条
- 1
资源评论
Q_97095639
- 粉丝: 374
- 资源: 1万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功