diff --git a/controllers/d.contact.php b/controllers/d.contact.php
index 2fb16dc..fdaaae8 100755
--- a/controllers/d.contact.php
+++ b/controllers/d.contact.php
@@ -11,8 +11,8 @@ if(isset($_POST['submit'])) {
$message .= "
\r\n";
$message .= "".strip_tags(post('message'))."
\r\n";
- $headers = 'From: '. post('mail') . "\r\n" .
- 'Reply-To: '. post('mail') . "\r\n" .
+ $headers = 'From: '. post('email') . "\r\n" .
+ 'Reply-To: '. post('email') . "\r\n" .
'X-Mailer: PHP/' . phpversion() . "\r\n" .
'MIME-Version: 1.0' . "\r\n" .
'Content-type: text/html; charset=UTF-8' . "\r\n";
@@ -27,8 +27,8 @@ if(isset($_POST['submit'])) {
$error = "subject";
$send = false;
}
- if(post('mail') == '') {
- $error = "mail";
+ if(post('email') == '') {
+ $error = "email";
$send = false;
}
if(post('message') == '') {
@@ -50,17 +50,17 @@ if(isset($_POST['submit'])) {
if(post('name') != '')
$contact['name'] = post('name');
-else if($user->role > 0)
+else if($user->rankIsHigher("registered"))
$contact['name'] = $user->name;
else
$contact['name'] = '';
-if(post('mail') != '')
- $contact['mail'] = post('mail');
-else if($user->role > 0)
- $contact['mail'] = $user->mail;
+if(post('email') != '')
+ $contact['email'] = post('email');
+else if($user->rankIsHigher("registered"))
+ $contact['email'] = $user->email;
else
- $contact['mail'] = '';
+ $contact['email'] = '';
$contact['subject'] = post('subject');
$contact['message'] = post('message');
diff --git a/views/d.contact.html b/views/d.contact.html
index 3b46d78..a2b31cc 100755
--- a/views/d.contact.html
+++ b/views/d.contact.html
@@ -16,7 +16,7 @@
if($error=="subject") { ?>
Veuillez renseigner un sujet.
} ?>
- if($error=="mail") { ?>
+ if($error=="email") { ?>
Veuillez renseigner une adresse mail.
} ?>
if($error=="message") { ?>
@@ -33,10 +33,10 @@
Message bien envoyé.
} ?>
-
+
- if($user->role >= 200) { ?>
+ if($user->rankIsHigher("registered")) { ?>
}