<?php
// TO EMAIL
//
// Enter the email address you want to recieve the messages sent
// from your website contact form.
// ----------------------------------------------------------------
$YourEmailAddress = "yourname@yourwebsite.com";
// Do not edit beyond this point if you are not familiar with php
// ----------------------------------------------------------------
error_reporting (E_ALL ^ E_NOTICE);
$post = (!empty($_POST)) ? true : false;
if($post) {
function ValidateEmail($email){
$regex = "^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$^";
$eregi = preg_replace($regex,'', trim($email));
return empty($eregi) ? true : false;
}
$name = stripslashes($_POST['ContactName']);
$to = $YourEmailAddress; //trim($_POST['to']);
$email = trim($_POST['ContactEmail']);
$subject = stripslashes($_POST['subject']);
$message = stripslashes($_POST['ContactComment']);
$phone = stripslashes($_POST['ContactPhone']);
$error = '';
$Reply=$to;
$from=$to;
// Check Name Field
if(!$name) {
$error .= 'Please enter your name.<br />';
}
// Checks Email Field
if(!$email) {
$error .= 'Please enter an e-mail address.<br />';
}
if($email && !ValidateEmail($email)) {
$error .= 'Please enter a valid e-mail address.<br />';
}
if(is_numeric($phone) && strlen($phone) < 8) {
$error .= "Please enter your full phone number.<br />";
}
// Checks Subject Field
if(!$subject) {
$error .= 'Please enter your subject.<br />';
}
// Checks Message (length)
if(!$message || strlen($message) < 3) {
$error .= "Please enter your message. It should have at least 5 characters.<br />";
}
// Let's send the email.
if(!$error) {
$messages="From: $email <br>";
$messages.="Name: $name <br>";
$messages.="Email: $email <br>";
$messages.="Phone: $phone <br>";
$messages.="Message: $message <br>";
$emailto=$to;
$mail = mail($emailto,$subject,$messages,"from: $from <$Reply>\nReply-To: $Reply \nContent-type: text/html");
if($mail) {
echo 'success';
}
} else {
echo '<div class="error">'.$error.'</div>';
}
}
?>
没有合适的资源?快使用搜索试试~ 我知道了~
themeforest前台网站模板
共488个文件
png:260个
gif:81个
jpg:63个
4星 · 超过85%的资源 需积分: 10 129 下载量 98 浏览量
2011-08-18
11:23:14
上传
评论
收藏 5.73MB RAR 举报
温馨提示
themeforest ,前台网站页面模板,效果相当好
资源推荐
资源详情
资源评论
收起资源包目录
themeforest前台网站模板 (488个子文件)
default.css 28KB
skin-2.css 10KB
fancybox.css 10KB
skin-5.css 7KB
skin-4.css 7KB
skin-3.css 7KB
tooltip.css 7KB
tooltip.min.css 5KB
fancybox.css 4KB
menu.css 3KB
ie-only-all-versions.css 3KB
ie-only-all-versions.css 3KB
reset.css 2KB
menu.min.css 2KB
ie-only.css 2KB
demo.css 2KB
reset.min.css 2KB
ie-only.css 1KB
kwicks-slider.css 1KB
nivo-slider.css 1KB
nivo-slider.css 511B
kwicks-slider.css 305B
skin-1.css 285B
Thumbs.db 67KB
Thumbs.db 67KB
Thumbs.db 58KB
Thumbs.db 43KB
Thumbs.db 33KB
Thumbs.db 27KB
Thumbs.db 18KB
Thumbs.db 17KB
Thumbs.db 8KB
Thumbs.db 6KB
search-bg.gif 6KB
button-sprite.gif 6KB
search-bg.gif 6KB
button-sprite.gif 6KB
button-sprite.gif 6KB
button-sprite.gif 6KB
button-sprite.gif 6KB
search-bg.gif 6KB
search-bg.gif 6KB
button-sprite.gif 6KB
bl.gif 5KB
search-bg.gif 5KB
ajax-loader.gif 2KB
bodyBg-fullSize.gif 2KB
bodyBg-fullSize.gif 2KB
bodyBg-fullSizeSubPage.gif 2KB
bodyBg-fullSize.gif 2KB
bodyBg-fullSizeSubPage.gif 2KB
bodyBg-fullSize.gif 2KB
bodyBg-fullSizeSubPage.gif 2KB
br.gif 2KB
bodyBg-fullSize.gif 1KB
bodyBg-fullSizeSubPage.gif 1KB
bodyBg.gif 1KB
bodyBg.gif 1KB
bodyBg-fullSizeSubPage.gif 1KB
bodyBg.gif 1KB
bodyBg.gif 1KB
bodyBg.gif 1KB
tl.gif 1KB
arrowup.gif 853B
tr.gif 672B
wait.gif 432B
smallClose-ie6.gif 360B
check.gif 322B
rarrowup.gif 241B
rarrowdown.gif 241B
rarrowleft.gif 235B
rarrowright.gif 232B
ordered-background.gif 196B
slider-handle.gif 170B
arrows-ffffff.gif 128B
quote-small-repeat.gif 115B
quote-small-repeat.gif 115B
quote-small-repeat.gif 115B
quote-small-repeat.gif 115B
quote-small-repeat.gif 115B
pre-bg.gif 104B
smallClose-dark-ie6.gif 100B
skinned-arrowL.gif 94B
skinned-arrowD.gif 92B
skinned-arrowR.gif 92B
skinned-arrowU.gif 86B
arrowright.gif 77B
darrowright.gif 77B
darrowleft.gif 76B
arrowleft.gif 76B
inputBg.gif 75B
inputBg.gif 75B
inputBg.gif 75B
inputBg.gif 75B
inputBg.gif 75B
circle_gray_light.gif 73B
circle_green.gif 73B
circle_black.gif 73B
circle_orange.gif 73B
circle_red.gif 73B
共 488 条
- 1
- 2
- 3
- 4
- 5
钱宝宝
- 粉丝: 4
- 资源: 21
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
- 1
- 2
- 3
前往页