Auparavant vous devez placer les codes suivants :
SENDMAIL.PHP
<?php
/*************************
Cobbled together by Billy Bullock
Tested on Coppermine 1.4.4
Reference link for code = "http://www.ibdhost.com/contact/"
lil moded by PYAP
**************************/
$visitor = $_REQUEST['visitor'] ;
$visitormail = $_REQUEST['visitormail'] ;
$subject = $_REQUEST['subject'] ;
$notes = $_REQUEST['notes'] ;
// change address to your root CPG gallery below 4 times
if (!isset($_REQUEST['visitormail'])) {
header( "Location: http://www.pays-dignois.com/galerie/contact.php" );
}
elseif(!$visitormail == "" && (!strstr($visitormail,"@") || !strstr($visitormail,"."))) {
header( "Location: http://www.votre.com/galerie/contacterror.php" );
}
elseif (empty($visitor) || empty($visitormail) || empty($notes)) {
header( "Location: http://www.votre.com/galerie/contacterror.php" );
}
else {
$todayis = date("l, F j, Y, g:i a") ;
$notes = stripcslashes($notes);
$message = " $todayis [EST] \n
Poste par : $visitor ($visitormail)\n
Sujet : $subject \n
Message : $notes \n
Autre Info : IP = $ip \n
Navigateur Info : $httpagent \n
Depuis la Page : $httpref \n
";
$from = "Par : $visitormail\r\n";
// Indiquez votre adresse email / change to your email
mail("pyap@pays-dignois.com", $subject, $message, $from);
header( "Location: http://www.votre.com/galerie/thankyou.php" );
}
?>
THANKYOU.PHP
<?php
// lil moded by PYAP
define('IN_COPPERMINE', true);
require('include/init.inc.php');
pageheader('Contact');
// your actual page content starts here
starttable("800", 'Merci and Thanks', 1);
?>
<tr>
<td class="tableb" valign="top" align="center"><br />
Nous vous remercions pour votre email :-) <br />
<i>Thank you for your email.</i>
<br><br><center></center>
</td>
</tr>
<?php
endtable();
// your actual page content ends here
pagefooter();
ob_end_flush();
?>
CONTACTERROR.PHP
<?php
// lil moded by PYAP
define('IN_COPPERMINE', true);
require('include/init.inc.php');
pageheader('Contact');
// start page content
starttable("800", '<b><font color="red">E R R E U R</font>', 1);
?>
<tr>
<td class="tableb" valign="top" align="center"><b><font color="red">E R R E U R</b><br>
Vous oubliez certains champs obligatoires !<br />
Faites la correction en cliquant le bouton <b>BACK</b> de votre navigateur.<br />
Merci.<br /><br />
<i>Please fill in all required fields.<br /><br />
Press the <b>BACK</b> button in your browser and try again.<br /><br />
Thank you.</i></font><br />
<br><center></center>
</td>
</tr>
<?php
endtable();
// end page content
pagefooter();
ob_end_flush();
?>
That's All
PYAP