Created
January 12, 2014 18:40
-
-
Save synackme/8388597 to your computer and use it in GitHub Desktop.
The bug report form at http://kdanmobile.com/en/letter.html failed to send Error Message:
Sorry send mail failure, please try again or contact with [email protected]
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
<script type="text/javascript" src="js/jquery-1.8.2.min.js"></script> | |
<!--套件會導致 select 不能綁定 onchange 先把js拿掉 script language="javascript" type="text/javascript" src="js/niceforms.js"></script> niceforms 表格套件--> | |
<link rel="stylesheet" type="text/css" media="all" href="css/niceforms-default.css" /><!--niceforms 表格套件--> | |
<title>KdanMobile - Mail Us</title> | |
</head> | |
<style type="text/css"> | |
body{ | |
background:url(images/contactbg.png); | |
} | |
</style> | |
<body> | |
<div id="container"> | |
<form class="niceform"> | |
<fieldset> | |
<legend>Contact Us</legend> | |
<dl> | |
<dt><label for="issue">Issue:</label></dt> | |
<dd> | |
<select size="1" name="issue" id="issue"> | |
<option value="">Please select...</option> | |
<option value="ia">Product Inquiry</option> | |
<option value="ib">Bug Report</option> | |
<option value="ic">Function Proposal</option> | |
<option value="id">General Question</option> | |
<option value="ie">Business or Media Inquiry</option> | |
<option value="if">Investment Partnership</option> | |
</select> | |
</dd> | |
</dl> | |
<div id="product_issue"> | |
<dl> | |
<dt><label for="appname">App:</label></dt> | |
<dd> | |
<select size="1" name="appname" id="appname"> | |
<option value="">Please select...</option> | |
<option value="connoisseur">PDF Connoisseur</option> | |
<option value="pdfreader">PDF Reader</option> | |
<option value="pdfreader_premium">PDF Reader Premium</option> | |
<option value="ad">Animation Desk™</option> | |
<option value="ps">Pocket Scanner</option> | |
<option value="noteledge">NoteLedge</option> | |
<option value="snapper">Pocket Snapper</option> | |
<option value="battery">Battery Life Pro</option> | |
<option value="pdf_smart_convert">PDF Smart Convert</option> | |
<option value="paintint101">Painting101</option> | |
<option value="eleeditor">EleEditor</option> | |
<option value="rolling-scroll">Rolling Scroll</option> | |
<option value="pazteup">PazteUp</option> | |
<option value="noteledge_for_kids">NoteLedge for Kids</option> | |
<option value="pdf_wordsmith">PDF WordSmith</option> | |
<option value="paper_spiral">Paper Spiral</option> | |
<option value="writeon_video">Write-on Video</option> | |
<option value="doc_plus">Doc Plus</option> | |
</select> | |
</dd> | |
</dl> | |
<dl> | |
<dt><label for="idevice">Device:</label></dt> | |
<dd> | |
<select size="1" name="idevice" id="idevice"> | |
<option value="">Please select...</option> | |
<option value="iphone5s">iPhone 5S</option> | |
<option value="iphone5c">iPhone 5c</option> | |
<option value="iphone5">iPhone 5</option> | |
<option value="iphone4s">iPhone 4S</option> | |
<option value="iphone4">iPhone 4</option> | |
<option value="iphone3gs">iPhone 3GS</option> | |
<option value="ipad_mini2">iPad mini2</option> | |
<option value="ipad_mini">iPad mini</option> | |
<option value="ipad_air">iPad Air</option> | |
<option value="ipad4">iPad 4</option> | |
<option value="the_new_ipad">The New iPad</option> | |
<option value="ipad2">iPad 2</option> | |
<option value="ipad">iPad</option> | |
<option value="ipod4g">iPod Touch 4G</option> | |
<option value="ipod3g">iPod Touch 3G</option> | |
<option value="mac">Mac</option> | |
<option value="android">Android</option> | |
<option value="windows8rt">Windows 8 RT</option> | |
<option value="windows_phone8">Windows Phone 8</option> | |
</select> | |
</dd> | |
</dl> | |
<dl> | |
<dt><label for="os">OS Version:</label></dt> | |
<dd><input type="text" name="os" id="os" size="32" maxlength="128" placeholder="Example: iOS 7.0, Android 4.2" /></dd> | |
</dl> | |
</div> | |
</fieldset> | |
<fieldset> | |
<legend>Content</legend> | |
<dl> | |
<dt><label for="name">Name:</label></dt> | |
<dd><input type="text" name="name" id="name" size="32" maxlength="128" /></dd> | |
</dl> | |
<dl> | |
<dt><label for="email">Email:</label></dt> | |
<dd><input type="text" name="email" id="email" size="32" maxlength="128" /></dd> | |
</dl> | |
<dl> | |
<dt><label for="subject">Subject:</label></dt> | |
<dd><input type="text" name="subject" id="subject" maxlength="128" style=" width:360px;" /></dd> | |
</dl> | |
<dl> | |
<dt><label for="message">Message:</label></dt> | |
<dd><textarea name="message" id="message" rows="6" cols="70" style=" width:360px;"></textarea></dd> | |
</dl> | |
</fieldset> | |
<fieldset class="action"> | |
<input type="button" name="submit" id="submit" value="Submit" style="width:70px;" /> | |
<span id="response_msg" style="margin-left:4px; color:#F00; font-weight:bold"></span> | |
</fieldset> | |
</form> | |
</div> | |
<script type="text/javascript" charset="utf-8"> | |
$(document).ready(function(){ | |
//點擊 Business or media inquirie 進入點 | |
if(getQueryStringRegExp('issue') == 'ie'){ | |
$("select#issue option[value='ie']").attr("selected", "selected"); | |
$('#product_issue').fadeOut("slow"); | |
} | |
if(getQueryStringRegExp('issue') == 'if'){ | |
$("select#issue option[value='if']").attr("selected", "selected"); | |
$('#product_issue').fadeOut("slow"); | |
} | |
//依不同產品選預先改變下拉內容 | |
if(getQueryStringRegExp('appname') == 'connoisseur') $("select#appname option[value='connoisseur']").attr("selected", "selected"); | |
if(getQueryStringRegExp('appname') == 'pdfreader') $("select#appname option[value='pdfreader']").attr("selected", "selected"); | |
if(getQueryStringRegExp('appname') == 'ad') $("select#appname option[value='ad']").attr("selected", "selected"); | |
if(getQueryStringRegExp('appname') == 'ps') $("select#appname option[value='ps']").attr("selected", "selected"); | |
if(getQueryStringRegExp('appname') == 'noteledge') $("select#appname option[value='noteledge']").attr("selected", "selected"); | |
if(getQueryStringRegExp('appname') == 'toolkit') $("select#appname option[value='toolkit']").attr("selected", "selected"); | |
}) | |
$('#submit').click(function() { | |
$('#response_msg').html(''); | |
var issue = $('#issue option:selected').val(); | |
var appname_val = $('#appname option:selected').val(); | |
var idevice_val = $('#idevice option:selected').val(); | |
if(issue != '') { | |
if((issue == 'ia' || issue == 'ib' || issue == 'ic') && appname_val == '' ) { | |
$('#response_msg').html('Please select an app !'); | |
} else if((issue == 'ia' || issue == 'ib' || issue == 'ic') && idevice_val == '' ) { | |
$('#response_msg').html('Please select your iDevice !'); | |
} else { | |
if($('#name').val() == '') { | |
$('#response_msg').html('Please enter your name !'); | |
} else if($('#email').val() == '') { | |
$('#response_msg').html('Please enter your email address !'); | |
} else if(!isValidEmailAddress($('#email').val())) { | |
$('#response_msg').html('Please enter a valid email address !'); | |
} else if($('#subject').val() == '') { | |
$('#response_msg').html('Please enter subject !'); | |
} else if($('#message').val() == '') { | |
$('#response_msg').html('Please enter message !'); | |
} else { | |
$('#submit').fadeOut('slow'); | |
var issue_text = $('#issue option:selected').text(); | |
var appname = $('#appname option:selected').text(); | |
var idevice = $('#idevice option:selected').text(); | |
$.post("http://www.kdanmobile.com/en/send.php", { sendbutton: 'y', name: $('#name').val(), email: $('#email').val(), subject: $('#subject').val(), message: $('#message').val(), issue: issue, issue_text: issue_text, appname: appname, idevice: idevice} , | |
function(data) { | |
if(data=='y') { | |
$('#response_msg').html('Thank you for contacting us, we will reply you as soon as possible!'); | |
} else { | |
$('#submit').fadeIn('fast'); | |
$('#response_msg').html('<br />Sorry send mail failure, please try again or contact with <b>[email protected]</b>'); | |
} | |
}); | |
} | |
} | |
} else $('#response_msg').html('Please select issue !'); | |
}); | |
$('#issue').change(function(){ | |
var selected = $('#issue option:selected'); | |
if(selected.val() == 'ia' || selected.val() == 'ib' || selected.val() == 'ic') $('#product_issue').fadeIn("slow"); | |
else $('#product_issue').fadeOut("slow"); | |
}); | |
//email 檢核 | |
function isValidEmailAddress(emailAddress) { | |
var pattern = new RegExp(/^(("[\w-\s]+")|([\w-]+(?:\.[\w-]+)*)|("[\w-\s]+")([\w-]+(?:\.[\w-]+)*))(@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$)|(@\[?((25[0-5]\.|2[0-4][0-9]\.|1[0-9]{2}\.|[0-9]{1,2}\.))((25[0-5]|2[0-4][0-9]|1[0-9]{2}|[0-9]{1,2})\.){2}(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[0-9]{1,2})\]?$)/i); | |
return pattern.test(emailAddress); | |
} | |
//.html 取連結參數 | |
function getQueryStringRegExp(name) | |
{ | |
var reg = new RegExp("(^|\\?|&)"+ name +"=([^&]*)(\\s|&|$)", "i"); | |
if (reg.test(location.href)) return unescape(RegExp.$2.replace(/\+/g, " ")); return ""; | |
}; | |
</script> | |
<!-- Start Alexa Certify Javascript --><script type="text/javascript">_atrk_opts = { atrk_acct:"xmTni1awA+00Wi", domain:"kdanmobile.com",dynamic: true};(function() { var as = document.createElement('script'); as.type = 'text/javascript'; as.async = true; as.src = "https://d31qbv1cthcecs.cloudfront.net/atrk.js"; var s = document.getElementsByTagName('script')[0];s.parentNode.insertBefore(as, s); })();</script><noscript><img src="https://d5nxst8fruw4z.cloudfront.net/atrk.gif?account=xmTni1awA+00Wi" style="display:none" height="1" width="1" alt="" /></noscript><!-- End Alexa Certify Javascript --></body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment