diff --git a/README.md b/README.md index f0fff00..0921ab5 100755 --- a/README.md +++ b/README.md @@ -30,6 +30,7 @@ Added with a Shortcode in the content of the page or directly in the template. ### Versions ### +* 1.3 - 27/12/2017 : W3.css compatibility * 1.2.2 - 15/03/2017 : Fix issue when unknow lang * 1.2.1 - 07/03/2017 : Send with PHPMailer if the Newsletter plugin is installed * 1.2 - 14/10/2016 : Use PHP-Gettext in place of gettext diff --git a/contactCall.php b/contactCall.php index b061f2c..067eb26 100755 --- a/contactCall.php +++ b/contactCall.php @@ -17,7 +17,7 @@ session_start(); if($_POST['contactCaptcha']!=$_SESSION['captcha']['code']) { - echo T_('Captcha error'); + echo '

'.T_('Captcha error').'

'; Exit; } } @@ -47,14 +47,14 @@ // PHPMailer require '../newsletter/PHPMailer/PHPMailerAutoload.php'; $phm = new PHPMailer(); - $phm->CharSet = "UTF-8"; + $phm->charSet = "UTF-8"; $phm->setFrom($mail, 'No Reply'); - $phm->AddAddress($mail); + $phm->addAddress($mail); $phm->isHTML(true); - $phm->Subject = stripslashes($sujet); - $phm->Body = stripslashes($msgH); - $phm->AltBody = stripslashes($msgT); - if($l>10 && $phm->Send()) + $phm->subject = stripslashes($sujet); + $phm->body = stripslashes($msgH); + $phm->altBody = stripslashes($msgT); + if($l>10 && $phm->send()) { if(!$happy) echo T_('OK'); else echo ' '.$happy; diff --git a/contactMake.php b/contactMake.php index 88151a5..ba9e0c9 100755 --- a/contactMake.php +++ b/contactMake.php @@ -5,7 +5,7 @@ if(file_exists('data/_sdata-'.$sdata.'/'.$Ubusy.'/contact.json')) { // {"t":"te","l":"Pr\u00e9nom"} - $o1 = "\r\n".'
'."\r\n\t".'
'."\r\n"; + $o1 = "\r\n".'
'."\r\n\t".''."\r\n"; $q1 = file_get_contents('data/_sdata-'.$sdata.'/'.$Ubusy.'/contact.json'); $a1 = json_decode($q1,true); $s1 = ''; @@ -16,21 +16,25 @@ $v2 = strtr($v2, 'áàâäãåçéèêëíìîïñóòôöõúùûüýÿ -', 'aaaaaaceeeeiiiinooooouuuuyy__'); $v2 = preg_replace("/[^a-zA-Z0-9\d_]+/","",$v2); $s1 .= '&'.$v2.'="+document.getElementById(\''.$v2.'\').value+"'; - $o1 .= "\t\t".''; - if ($v1['t']=='te') $o1 .= ''."\r\n"; - else if ($v1['t']=='ta') $o1 .= ''."\r\n"; + $o1 .= "\t\t".'
'; + if ($v1['t']=='te') $o1 .= ''; + else if ($v1['t']=='ta') $o1 .= '';; + $o1 .= '
'."\r\n"; $s2 .= 'document.getElementById(\''.$v2.'\').value="";'; } if($a1['captcha']==1) { $s1 .= '&contactCaptcha="+document.getElementById(\'contactCaptcha\').value+"'; $s2 .= 'document.getElementById(\'contactCaptcha\').value="";'; - $o1 .= "\t\t".''."\r\n"; + $o1 .= "\t\t".'
'; + $o1 .= ''; + $o1 .= '
'."\r\n"; $Uonload .= 'var x=new XMLHttpRequest();x.open("POST","uno/plugins/contact/captcha.php",true);x.setRequestHeader("Content-type","application/x-www-form-urlencoded");x.setRequestHeader("X-Requested-With","XMLHttpRequest");x.onreadystatechange=function(){if(x.readyState==4 && x.status==200){document.getElementById("imageCaptcha").src=x.responseText;}};x.send();'."\r\n"; } - $o1 .= "\t\t".'
'."\r\n"; - $o1 .= "\t".''."\r\n".'
'."\r\n"; - $Ustyle .= ".contactBloc{max-width:480px;margin:10px;}.contactBloc label{text-transform:capitalize;}.contactBloc input,.contactBloc textarea{display:block;width:100%;margin:0 0 5px;padding:0}.contactBloc textarea{height:120px;}.contactBloc button{margin:7px 0 0;padding:4px 12px;}#contactCaptcha{display:inline-block;margin:10px 0 10px 10px;max-width:80px;}#imageCaptcha{margin:-10px 10px;}\r\n"; + $o1 .= "\t\t".'
'."\r\n"; + $o1 .= "\t".''."\r\n".'
'."\r\n"; + if(empty($Ua['w3'])) $Ustyle .= ".contactBloc{max-width:480px;margin:10px;}.contactBloc label{text-transform:capitalize;}.contactBloc input,.contactBloc textarea{display:block;width:100%;margin:0 0 5px;padding:0}.contactBloc textarea{height:120px;}.contactBloc button{margin:7px 0 0;padding:4px 12px;}"; + $Ustyle .= "input.contactCaptcha{display:inline-block;margin:10px;max-width:80px;}.imageCaptcha{margin:-10px 10px;}\r\n"; $Ucontent = str_replace('[[contact]]',$o1,$Ucontent); $Uhtml = str_replace('[[contact]]',$o1,$Uhtml); // diff --git a/version.json b/version.json index 1ec8dbe..f7496b4 100755 --- a/version.json +++ b/version.json @@ -1 +1 @@ -{"version":"1.2.2","host":"https://github.com/cmsunoPlugins/contact/"} +{"version":"1.3","host":"https://github.com/cmsunoPlugins/contact/"}