1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
|
<?php
defined( '_JEXEC' ) or die( 'Restricted access' ); ?>
<?php
$sentence = $params->get( 'numfeed' );
$custom = $params->get( 'custom' );
$amail = $params->get( 'amail' );
$ymail = $params->get( 'ymail' );
$symail = $params->get( 'symail' );
$fmail = $params->get( 'fmail' );
$sfmail = $params->get( 'sfmail' );
$submit = $params->get( 'submit' );
$mtext = $params->get( 'mtext' );
$ctext = $params->get( 'ctext' );
$invalid = $params->get( 'invalid' );
$us = $params->get( 'us' );
?>
<form action="mail2" method="POST" >
<input type="text" name="mail" value="<?php echo $sfmail; ?>" />
<input type="hidden" name="link" value="<?php echo 'http://'.$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI']; ?>" />
<input type="hidden" name="mtext" value="<?php echo $mtext; ?> " />
<input type="hidden" name="ctext" value="<?php echo $ctext; ?> " />
<input type="submit" name="submit" value="<?php echo $submit; ?>" />
</form>
<?php
$mtext = "Un ami vous recommande ce Site Internet :";
$link = "http://www.ffgfsdgsdf.net";
$mittente = "sdfgsdf@sdfgsdf.com";
$oggetto = 'Un ami vous recommande un site!';
$messaggio = "$mtext $link";
$mail = $_POST['mail'];
if (isset($_POST['submit'])) {
if (eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$", $mail) && eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$", $mittente) && $mail !== $sfmail && $mittente !== $symail && $mail !== 'info@global.com')
{
mail( $mail, $oggetto, $messaggio, "From:< $mittente>rn");
echo "<script type=\"text/javascript\">alert(\"$ctext\"); history.go(-1)</script>";
}
elseif ( $mail == $sfmail || $mittente == $symail) { echo "<script type=\"text/javascript\">alert(\"$custom\"); history.go(-1)</script>";}
elseif ( $mail == $amail ) { echo "<script type=\"text/javascript\">alert(\"$us\"); history.go(-1)</script>";}
else
{
echo "<script type=\"text/javascript\">alert(\"$invalid\"); history.go(-1)</script>";
}
}
?> |