1
0
mirror of https://github.com/Chouchen/contact.git synced 2018-06-07 06:54:38 +02:00

Initial commit

This commit is contained in:
Shikiryu 2015-03-04 21:47:08 +01:00
commit 725f42609c
9 changed files with 578 additions and 0 deletions

BIN
ShikiTimbre100.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.9 KiB

BIN
contactbg.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 95 KiB

94
index.php Normal file
View File

@ -0,0 +1,94 @@
<!doctype html>
<html lang="en" class="no-js">
<head>
<meta charset="utf-8">
<!-- www.phpied.com/conditional-comments-block-downloads/ -->
<!--[if IE]><![endif]-->
<title>Shikiryu.com - Contact</title>
<meta name="description" content="Contact page for Clément Desmidt - Shikiryu" />
<meta name="author" content="Clément Desmidt - Shikiryu" />
<!-- Mobile viewport optimized: j.mp/bplateviewport -->
<meta name="viewport" content="width=device-width; initial-scale=1.0" />
<!-- Replace favicon.ico & apple-touch-icon.png in the root of your domain and delete these references -->
<link rel="shortcut icon" href="/favicon.ico" />
<link rel="apple-touch-icon" href="/apple-touch-icon.png" />
<!-- For the less-enabled mobile browsers like Opera Mini -->
<link rel="stylesheet" media="handheld" href="http://bookmarklet.shikiryu.com/css/handheld.css?v=1" />
<!-- CSS : blueprint Framework -->
<!-- <link rel="stylesheet" href="css/screen.css" type="text/css" media="screen, projection">
<link rel="stylesheet" href="css/print.css" type="text/css" media="print"> -->
<!--[if lt IE 8]><link rel="stylesheet" href="css/blueprint/ie.css" type="text/css" media="screen, projection"><![endif]-->
<!-- Import buttons plugin // add nice button instead of input button -->
<link rel="stylesheet" href="http://bookmarklet.shikiryu.com/css/plugins/buttons/screen.css" />
<link rel="stylesheet" href="tipsy.css" />
<link href='http://fonts.googleapis.com/css?family=Dancing+Script' rel='stylesheet' type='text/css' />
<!-- CSS : implied media="all" -->
<!-- <link rel="stylesheet" href="http://bookmarklet.shikiryu.com/css/style.css?v=1"> -->
<link rel="stylesheet" href="override.css?v=1" />
<!-- All JavaScript at the bottom, except for Modernizr which enables HTML5 elements & feature detects -->
<script src="http://bookmarklet.shikiryu.com/js/modernizr-1.5.min.js"></script>
</head>
<!-- paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/ -->
<!--[if lt IE 7 ]> <body class="ie6"> <![endif]-->
<!--[if IE 7 ]> <body class="ie7"> <![endif]-->
<!--[if IE 8 ]> <body class="ie8"> <![endif]-->
<!--[if IE 9 ]> <body class="ie9"> <![endif]-->
<!--[if (gt IE 9)|!(IE)]><!--> <body> <!--<![endif]-->
<div id="msgOK"><span class="english">Your message has been sent!</span><br/><span class="french">Votre message a été envoyé !</span><br/><br/><span class="english"><a href="javascript:location.reload();" title="Post a new message">Post a new message</a></span><br/><span class="french"><a href="javascript:location.reload();" title="Envoyer un nouveau message">Envoyer un nouveau mail</a></span><?if($_SERVER['HTTP_REFERER'] != ''){?><br/><span class="english"><a href="javascript:history.go(-1);" title="Go back">Return to the previous page</a></span><br/><span class="french"><a href="javascript:history.go(-1);" title="Revenir en arrière">Retour à la page précédente</a></span><?}?></div>
<div id="container" class="container drop-shadow round">
<header>
<h1><img src="ShikiTimbre100.png" alt="Timbre Clément" width="75" height="75"/>Contact<br/>Clément Desmidt - Shikiryu</h1>
</header>
<div id="main">
<div id="returnMsg"></div>
<form action="/" method="POST">
<section id="message">
<textarea name="msg" placeholder="Your message / Votre message"></textarea>
</section>
<section id="infos">
<input type="text" name="name" placeholder="Your name / Votre nom" />
<input type="email" name="email" placeholder="Your email / Votre email" />
<input type="hidden" name="from" value="<?=$_SERVER['HTTP_REFERER']?>" />
</section>
<input type="submit" value="Send / Envoyer" id="send" />
</form>
<br/>
</div>
<footer>
<a href="http://shikiryu.com/" class="myLink" title="Site de Clément Desmidt">Clément Desmidt</a>
</footer>
</div> <!--! end of #container -->
<!-- Javascript at the bottom for fast page loading -->
<!-- Grab Google CDN jQuery. fall back to local if necessary -->
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script>!window.jQuery && document.write('<script src="http://bookmarklet.shikiryu.com/js/jquery-1.4.2.min.js"><\/script>')</script>
<script src="jquery.tipsy.js"></script>
<script src="plugins.js?v=1"></script>
<!-- <script src="http://bookmarklet.shikiryu.com/js/script.js?v=1"></script> -->
<!--[if lt IE 7 ]>
<script src="js/dd_belatedpng.js?v=1"></script>
<![endif]-->
</body>
</html>

198
jquery.tipsy.js Normal file
View File

@ -0,0 +1,198 @@
// tipsy, facebook style tooltips for jquery
// version 1.0.0a
// (c) 2008-2010 jason frame [jason@onehackoranother.com]
// releated under the MIT license
(function($) {
function fixTitle($ele) {
if ($ele.attr('title') || typeof($ele.attr('original-title')) != 'string') {
$ele.attr('original-title', $ele.attr('title') || '').removeAttr('title');
}
}
function Tipsy(element, options) {
this.$element = $(element);
this.options = options;
this.enabled = true;
fixTitle(this.$element);
}
Tipsy.prototype = {
show: function() {
var title = this.getTitle();
if (title && this.enabled) {
var $tip = this.tip();
$tip.find('.tipsy-inner')[this.options.html ? 'html' : 'text'](title);
$tip[0].className = 'tipsy'; // reset classname in case of dynamic gravity
$tip.remove().css({top: 0, left: 0, visibility: 'hidden', display: 'block'}).appendTo(document.body);
var pos = $.extend({}, this.$element.offset(), {
width: this.$element[0].offsetWidth,
height: this.$element[0].offsetHeight
});
var actualWidth = $tip[0].offsetWidth, actualHeight = $tip[0].offsetHeight;
var gravity = (typeof this.options.gravity == 'function')
? this.options.gravity.call(this.$element[0])
: this.options.gravity;
var tp;
switch (gravity.charAt(0)) {
case 'n':
tp = {top: pos.top + pos.height + this.options.offset, left: pos.left + pos.width / 2 - actualWidth / 2};
break;
case 's':
tp = {top: pos.top - actualHeight - this.options.offset, left: pos.left + pos.width / 2 - actualWidth / 2};
break;
case 'e':
tp = {top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth - this.options.offset};
break;
case 'w':
tp = {top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width + this.options.offset};
break;
}
if (gravity.length == 2) {
if (gravity.charAt(1) == 'w') {
tp.left = pos.left + pos.width / 2 - 15;
} else {
tp.left = pos.left + pos.width / 2 - actualWidth + 15;
}
}
$tip.css(tp).addClass('tipsy-' + gravity);
if (this.options.fade) {
$tip.stop().css({opacity: 0, display: 'block', visibility: 'visible'}).animate({opacity: this.options.opacity});
} else {
$tip.css({visibility: 'visible', opacity: this.options.opacity});
}
}
},
hide: function() {
if (this.options.fade) {
this.tip().stop().fadeOut(function() { $(this).remove(); });
} else {
this.tip().remove();
}
},
getTitle: function() {
var title, $e = this.$element, o = this.options;
fixTitle($e);
var title, o = this.options;
if (typeof o.title == 'string') {
title = $e.attr(o.title == 'title' ? 'original-title' : o.title);
} else if (typeof o.title == 'function') {
title = o.title.call($e[0]);
}
title = ('' + title).replace(/(^\s*|\s*$)/, "");
return title || o.fallback;
},
tip: function() {
if (!this.$tip) {
this.$tip = $('<div class="tipsy"></div>').html('<div class="tipsy-arrow"></div><div class="tipsy-inner"/></div>');
}
return this.$tip;
},
validate: function() {
if (!this.$element[0].parentNode) {
this.hide();
this.$element = null;
this.options = null;
}
},
enable: function() { this.enabled = true; },
disable: function() { this.enabled = false; },
toggleEnabled: function() { this.enabled = !this.enabled; }
};
$.fn.tipsy = function(options) {
if (options === true) {
return this.data('tipsy');
} else if (typeof options == 'string') {
return this.data('tipsy')[options]();
}
options = $.extend({}, $.fn.tipsy.defaults, options);
function get(ele) {
var tipsy = $.data(ele, 'tipsy');
if (!tipsy) {
tipsy = new Tipsy(ele, $.fn.tipsy.elementOptions(ele, options));
$.data(ele, 'tipsy', tipsy);
}
return tipsy;
}
function enter() {
var tipsy = get(this);
tipsy.hoverState = 'in';
if (options.delayIn == 0) {
tipsy.show();
} else {
setTimeout(function() { if (tipsy.hoverState == 'in') tipsy.show(); }, options.delayIn);
}
};
function leave() {
var tipsy = get(this);
tipsy.hoverState = 'out';
if (options.delayOut == 0) {
tipsy.hide();
} else {
setTimeout(function() { if (tipsy.hoverState == 'out') tipsy.hide(); }, options.delayOut);
}
};
if (!options.live) this.each(function() { get(this); });
if (options.trigger != 'manual') {
var binder = options.live ? 'live' : 'bind',
eventIn = options.trigger == 'hover' ? 'mouseenter' : 'focus',
eventOut = options.trigger == 'hover' ? 'mouseleave' : 'blur';
this[binder](eventIn, enter)[binder](eventOut, leave);
}
return this;
};
$.fn.tipsy.defaults = {
delayIn: 0,
delayOut: 0,
fade: false,
fallback: '',
gravity: 'n',
html: false,
live: false,
offset: 0,
opacity: 0.8,
title: 'title',
trigger: 'hover'
};
// Overwrite this method to provide options on a per-element basis.
// For example, you could store the gravity in a 'tipsy-gravity' attribute:
// return $.extend({}, options, {gravity: $(ele).attr('tipsy-gravity') || 'n' });
// (remember - do not modify 'options' in place!)
$.fn.tipsy.elementOptions = function(ele, options) {
return $.metadata ? $.extend({}, options, $(ele).metadata()) : options;
};
$.fn.tipsy.autoNS = function() {
return $(this).offset().top > ($(document).scrollTop() + $(window).height() / 2) ? 's' : 'n';
};
$.fn.tipsy.autoWE = function() {
return $(this).offset().left > ($(document).scrollLeft() + $(window).width() / 2) ? 'e' : 'w';
};
})(jQuery);

196
override.css Normal file
View File

@ -0,0 +1,196 @@
html, body, div, span, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
abbr, address, cite, code,
del, dfn, em, img, ins, kbd, q, samp,
small, strong, sub, sup, var,
b, i,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, figcaption, figure,
footer, header, hgroup, menu, nav, section, summary,
time, mark, audio, video {
margin:0;
padding:0;
border:0;
outline:0;
font-size:100%;
vertical-align:baseline;
background:transparent;
}
article, aside, details, figcaption, figure,
footer, header, hgroup, menu, nav, section {
display:block;
}
nav ul { list-style:none; }
blockquote, q { quotes:none; }
blockquote:before, blockquote:after,
q:before, q:after { content:''; content:none; }
a { margin:0; padding:0; font-size:100%; vertical-align:baseline; background:transparent; }
ins { background-color:#ff9; color:#000; text-decoration:none; }
mark { background-color:#ff9; color:#000; font-style:italic; font-weight:bold; }
del { text-decoration: line-through; }
abbr[title], dfn[title] { border-bottom:1px dotted; cursor:help; }
/* tables still need cellspacing="0" in the markup */
table { border-collapse:collapse; border-spacing:0; }
hr { display:block; height:1px; border:0; border-top:1px solid #ccc; margin:1em 0; padding:0; }
input, select { vertical-align:middle; }
/* fonts.css from the YUI Library: developer.yahoo.com/yui/
Please refer to developer.yahoo.com/yui/fonts/ for font sizing percentages
There are two custom edits:
* remove arial, helvetica from explicit font stack
* we normalize monospace styles ourselves
*/
body { font:13px/1.231 sans-serif; *font-size:small; } /* hack retained to preserve specificity */
table { font-size:inherit; font: 100%; }
select, input, textarea, button { font:99% sans-serif; }
/* normalize monospace sizing
* en.wikipedia.org/wiki/MediaWiki_talk:Common.css/Archive_11#Teletype_style_fix_for_Chrome
*/
pre, code, kbd, samp { font-family: monospace, sans-serif; }
/* #444 looks better than black: twitter.com/H_FJ/statuses/11800719859 */
body, select, input, textarea { color: #444; background:none; border:0; }
/* Headers (h1,h2,etc) have no default font-size or margin,
you'll want to define those yourself. */
h1,h2,h3,h4,h5,h6 { font-weight: bold; }
/* hand cursor on clickable input elements */
label, input[type=button], input[type=submit], button { cursor: pointer; }
/* colors for form validity */
input:valid { }
input:invalid {
/*border-radius: 1px;*/
-moz-box-shadow: 0px 0px 5px red;
-webkit-box-shadow: 0px 0px 5px red;
box-shadow: 0px 0px 5px red;
}
.no-boxshadow input:invalid { background-color: #f0dddd; }
/* Primary Styles
Author:
*/
#container{width:500px; /*height:350px;*/ margin:200px auto; display:block; position:relative; border: 1px solid #888;-webkit-border-radius: 5px;
-moz-border-radius: 5px;/*-webkit-box-shadow: 0px 5px 5px rgba(0, 0, 0, 0.15);
-moz-box-shadow: 0px 5px 5px rgba(0, 0, 0, 0.15);box-shadow:0 5px 5px #888;*/border-radius:5px; padding:5px;font-family:Georgia, serif;font-size:12px;background:#fff; overflow:auto;}
#main{clear:both;}
footer{position:absolute; text-align:center; bottom:0; left:0; width:98%; display:block; padding:3px;}
h1{font-size:20px; color:#6DB9F2;}
h2{font-size:14px;}
strong{color:#6DB9F2;}
input[type=text], input[type=search], input[type=email]{/*background:#EEE;*/
float:left;
margin: 0.7em 0.5em 0.7em 0;
border-bottom:1px solid #CCC;
padding: 2px 7px;
font-family:'Droid Serif', Georgia, serif;
/*width:385px;*/
height:24px;
}
input[type=text]:hover, input[type=search]:hover, input[type=email]:hover{
border-bottom:1px solid #000;
}
/* Corner */
/*http://nicolasgallagher.com/css-drop-shadows-without-images/demo/*/
.drop-shadow {
/*position:relative;
width:45%;
padding:1em;
margin:2em auto 5em;
background:#fff;*/
-webkit-box-shadow:0 1px 4px rgba(0, 0, 0, 0.3), 0 0 60px rgba(0, 0, 0, 0.1) inset;
-moz-box-shadow:0 1px 4px rgba(0, 0, 0, 0.3), 0 0 40px rgba(0, 0, 0, 0.1) inset;
box-shadow:0 1px 4px rgba(0, 0, 0, 0.3), 0 0 40px rgba(0, 0, 0, 0.1) inset;
}
.drop-shadow:before,
.drop-shadow:after {
content:"";
position:absolute;
z-index:-2;
bottom:15px;
left:10px;
width:50%;
height:20%;
}
.drop-shadow:after{
right:10px;
left:auto;
}
.round {
-moz-border-radius:4px;
border-radius:4px;
}
.round:before,
.round:after {
max-width:300px;
-webkit-box-shadow:0 15px 10px rgba(0, 0, 0, 0.7);
-moz-box-shadow:0 15px 10px rgba(0, 0, 0, 0.7);
box-shadow:0 15px 10px rgba(0, 0, 0, 0.7);
-webkit-transform:rotate(-3deg);
-moz-transform:rotate(-3deg);
-o-transform:rotate(-3deg);
transform:rotate(-3deg);
}
.round:after {
-webkit-transform:rotate(3deg);
-moz-transform:rotate(3deg);
-o-transform:rotate(3deg);
transform:rotate(3deg);
}
/* ME */
header img{float:right;}
header{padding:10px;}
section{float:left; padding:3px;}
input[type=text], input[type=email]{width: 134px;float:none !important;font-family: 'Dancing Script', courrier, sans-serif; font-size:24px; color:#000;}
textarea{width:280px; height:150px; padding:5px; border:1px solid #ccc;-webkit-border-radius: 5px;-moz-border-radius: 5px; border-radius:5px; font-family: 'Dancing Script', courrier, sans-serif; font-size:24px;color:#000;}
input[type=submit]{clear:both; margin:10px 0 30px 185px;}
#infos{width:140px; }
#message{border-right: 1px solid #CCC;width:300px; }
.english{background:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAHzSURBVHjaYkxOP8IAB//+Mfz7w8Dwi4HhP5CcJb/n/7evb16/APL/gRFQDiAAw3JuAgAIBEDQ/iswEERjGzBQLEru97ll0g0+3HvqMn1SpqlqGsZMsZsIe0SICA5gt5a/AGIEarCPtFh+6N/ffwxA9OvP/7//QYwff/6fZahmePeB4dNHhi+fGb59Y4zyvHHmCEAAAW3YDzQYaJJ93a+vX79aVf58//69fvEPlpIfnz59+vDhw7t37968efP3b/SXL59OnjwIEEAsDP+YgY53b2b89++/awvLn98MDi2cVxl+/vl6mituCtBghi9f/v/48e/XL86krj9XzwEEEENy8g6gu22rfn78+NGs5Ofr16+ZC58+fvyYwX8rxOxXr169fPny+fPn1//93bJlBUAAsQADZMEBxj9/GBxb2P/9+S/R8u3vzxuyaX8ZHv3j8/YGms3w8ycQARmi2eE37t4ACCDGR4/uSkrKAS35B3TT////wADOgLOBIaXIyjBlwxKAAGKRXjCB0SOEaeu+/y9fMnz4AHQxCP348R/o+l+//sMZQBNLEvif3AcIIMZbty7Ly6t9ZmXl+fXj/38GoHH/UcGfP79//BBiYHjy9+8/oUkNAAHEwt1V/vI/KBY/QSISFqM/GBg+MzB8A6PfYC5EFiDAABqgW776MP0rAAAAAElFTkSuQmCC') center left no-repeat; padding-left:18px;}
.french{background:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGzSURBVHjaYiyeepkBBv79+Zfnx/f379+fP38CyT9//jAyMiq5GP77wvDnJ8MfoAIGBoAAYgGqC7STApL///3/9++/pCTv////Qdz/QO4/IMna0vf/z+9/v379//37bUUTQACBNDD8Z/j87fffvyAVX79+/Q8GQDbQeKA9fM+e/Pv18/+vnwzCIkBLAAKQOAY5AIAwCEv4/4PddNUm3ji0QJyxW3rgzE0iLfqDGr2oYuu0l54AYvnz5x9Q6d+/QPQfyAQqAin9B3EOyG1A1UDj//36zfjr1y8GBoAAFI9BDgAwCMIw+P8Ho3GDO6XQ0l4MN8b2kUwYaLszqgKM/KHcDXwBxAJUD3TJ779A8h9Q5D8SAHoARP36+Rfo41+/mcA2AAQQy49ff0Cu//MPpAeI/0FdA1QNYYNVA/3wmwEYVgwMAAHE8uPHH5BqoD1//gJJLADoJKDS378Z//wFhhJAALF8A3rizz8uTmYg788fJkj4QOKREQyYxSWBhjEC/fcXZANAALF8+/anbcHlHz9+ffvx58uPX9KckkCn/gby/wLd8uvHjx96k+cD1UGiGQgAAgwA7q17ZpsMdUQAAAAASUVORK5CYII=') center left no-repeat; padding-left:18px;}
.error, .alert, .notice, .success, .info {padding:0.8em;margin-bottom:1em;border:2px solid #ddd;}
.error, .alert {background:#fbe3e4;color:#8a1f11;border-color:#fbc2c4;}
.notice {background:#fff6bf;color:#514721;border-color:#ffd324;}
.success {background:#e6efc2;color:#264409;border-color:#c6d880;}
.info {background:#d5edf8;color:#205791;border-color:#92cae4;}
.error a, .alert a {color:#8a1f11;}
.notice a {color:#514721;}
.success a {color:#264409;}
.info a {color:#205791;}
.myLink{padding-left:14px; background:url(http://shikiryu.com/favicon12.png) left center no-repeat;}
body, html{background:#BB6029 url(contactbg.jpg) top left repeat; overflow:hidden; width:100%; height:100%;}
#msgOK{display:none;width:200px; height:100px; margin:200px auto;position:relative;border: 1px solid #888;-webkit-border-radius: 5px;
-moz-border-radius: 5px;-webkit-box-shadow: 0px 5px 5px rgba(0, 0, 0, 0.15);
-moz-box-shadow: 0px 5px 5px rgba(0, 0, 0, 0.15);border-radius:5px;box-shadow:0 5px 5px #888; padding:5px;font-family:Georgia, serif;font-size:12px;background:#fff; text-align:center;}

40
plugins.js Normal file
View File

@ -0,0 +1,40 @@
// remap jQuery to $
(function($){
$('input[type=text], input[type=email], textarea').tipsy({trigger: 'focus', gravity: 'w'});
$('#send').click(function(e){
e.preventDefault();
$.post('send.php', { msg: $('textarea[name=msg]').val(), name: $('input[name=name]').val(), email: $('input[name=email]').val(), from: $('input[name=from]').val()}, function(data){if(data == 'ok'){$('#container').animate({left: '+=5000'}, 1500, 'swing', function(){$('#msgOK').fadeTo(1500, 1)});}else{$('#returnMsg').html('').append('error : '+data);}});
});
})(window.jQuery);
// usage: log('inside coolFunc',this,arguments);
// paulirish.com/2009/log-a-lightweight-wrapper-for-consolelog/
window.log = function(){
log.history = log.history || []; // store logs to an array for reference
log.history.push(arguments);
if(this.console){
console.log( Array.prototype.slice.call(arguments) );
}
};
// catch all document.write() calls
(function(doc){
var write = doc.write;
doc.write = function(q){
log('document.write(): ',arguments);
if (/docwriteregexwhitelist/.test(q)) write.apply(doc,arguments);
};
})(document);

38
send.php Normal file
View File

@ -0,0 +1,38 @@
<?
ini_set("display_errors", "off");
ini_set("log_errors", "on");
ini_set('error_log', $_SERVER['DOCUMENT_ROOT'].'/contact/log.log');
set_include_path('/path/to/zend/');
if(isset($_POST['email'])){
$email = $_POST['email'];
$name = $_POST['name'];
$msg = $_POST['msg'];
$from = $_POST['from'];
include 'Zend/Validate/EmailAddress.php';
$emailValidator = new Zend_Validate_EmailAddress();
if(trim($email) == '' || trim($name) == '' || trim($msg) == ''){
echo '<div class="error"><span class="english">You must fill every fields</span><br/><span class="french">Vous devez remplir tous les champs</span></div>';
exit;
}
if($emailValidator->isValid($email) && trim($name) != '' && trim($msg) != ''){
include 'Zend/Mail.php';
$body = 'Message de '.$name.' ('.$email.")\n\n";
$body .= $msg;
$message = new Zend_Mail('utf-8');
$message->setFrom($email, 'Contact')
->setSubject('Un message du site (ref : '.$from.')')
->setBodyText($body)
->setReplyTo($email, $name)
->addTo('mail@example.net');
$message->send();
echo 'ok';
exit;
}else{
$errorType = $emailValidator->getErrors();
if(isset($errorType[0])){
$errormsg = $emailValidator->getMessageTemplates();
echo '<div class="error"><span class="english">Email : '.str_replace('%value%', $email, $errormsg[$errorType[0]]).'</span></div>';
exit;
}
}
}

12
tipsy.css Normal file
View File

@ -0,0 +1,12 @@
.tipsy { padding: 5px; font-size: 10px; position: absolute; z-index: 100000; }
.tipsy-inner { padding: 5px 8px 4px 8px; background-color: black; color: white; max-width: 200px; text-align: center; }
.tipsy-inner { border-radius: 3px; -moz-border-radius:3px; -webkit-border-radius:3px; }
.tipsy-arrow { position: absolute; background: url('tipsy.gif') no-repeat top left; width: 9px; height: 5px; }
.tipsy-n .tipsy-arrow { top: 0; left: 50%; margin-left: -4px; }
.tipsy-nw .tipsy-arrow { top: 0; left: 10px; }
.tipsy-ne .tipsy-arrow { top: 0; right: 10px; }
.tipsy-s .tipsy-arrow { bottom: 0; left: 50%; margin-left: -4px; background-position: bottom left; }
.tipsy-sw .tipsy-arrow { bottom: 0; left: 10px; background-position: bottom left; }
.tipsy-se .tipsy-arrow { bottom: 0; right: 10px; background-position: bottom left; }
.tipsy-e .tipsy-arrow { top: 50%; margin-top: -4px; right: 0; width: 5px; height: 9px; background-position: top right; }
.tipsy-w .tipsy-arrow { top: 50%; margin-top: -4px; left: 0; width: 5px; height: 9px; }

BIN
tipsy.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 867 B