Morpheusweb.it - Risorse per webmaster: script, ASP.NET, C#, Visual Basic .Net, tutorial, asp, javascript, css, php, html, java, ADO, VBScript, forms, frames, Active Server Pages, Dynamic HTML, database, gratis per webmaster e webdesigner

Mailite

Form per la spedizione di e-mail da web. Include la possibiltà di avere informazioni sul mittente come ad esempio IP e sistema operativo.




<?
//Impostazioni
$owner_url = "www.yourname.co.uk"; // Your website address (no http://)
$site_name = "Your Site Name"; // The name of your site
$owner_email = "you@yourname.co.uk"; // Where results are sent
$email_subject = "Form Results"; // The subject of the results email
$success_title = "Successful Submission"; // Success page title
$success_msg = "Thank you for completing our form"; // Message printed upon success
$receipt_subject = "Thank You!"; // Email receipt subject
$receipt_body = "Hi
Thank you for completing our form, we'll
get back to you as soon as we can"; // Receipt email body
$logging = "Y"; // "Y" Adds user details (ip, browser etc) set to "N" if you wish to turn this off

// Stili
$bgcolor = "#ffffff"; // Page background colour
$font = "verdana"; // Font face
$title_main_colour = "#000000"; // Main Title Colour
$main_colour = "#000000"; // Hex value of font main color
$size = "2"; // Main font size
$title_error_colour = "#ff0000"; // Colour of error title
$error_colour = "#ff0000"; // Colour of error message

// controllo errori
$error_title = "Error!"; // Error page title
$error_msg = "You missed a required field (click 'back')"; // Error message

// campi obbligatori
$check = array("owner_email"); // Consult 'README' before ammending

// blocco spam
$spam_lock = "Y"; // Turn off at your own risk by changing to $spam_lock = "";

// non modificare queste righe!!
if ($spam_lock) {
    if (!$PHPSESSID) {
        session_start();
    }
    else {
        echo "<html>
                    <head>
                    <title></title>
                    </head>
                    <body bgcolor=$bgcolor>
                    <center><h2><font face=$font color=$title_main_colour>Error!</h2>
                    <font face=$font size=$size color=$main_colour>To protect our network from spam you are only allowed to submit this form once during a visit.<br>
                    Return to <a href=\"http://$owner_url\">$site_name</a></font>
                    </center>
                    </body>
                    </html>";
        exit;
        }
    }
else {
}
?>

<html>
<head>
<title></title>
</head>
<body bgcolor=<?echo "$bgcolor"; ?>>
<?
$count_array = 0;
do {
    $r = $check[$count_array];
        if(!$$r) {
            echo "<center><h2><font face=$font color=$title_error_colour>$error_title</h2>";
            echo "<font face=$font size=$size color=$error_colour>$error_msg</font></center>";
    exit;
    }
    $count_array++;
} while ($count_array != count($check));
    $date = date("m/d/Y H:i:s");
    $traceroute = "<a href=\"http://www.above.net/cgi-bin/trace?$REMOTE_ADDR\">";
    if ($REMOTE_ADDR == "") $ip = "<i> no ip </i>";
    else $ip = getHostByAddr($REMOTE_ADDR);
        while(list($key, $val) = each($HTTP_POST_VARS)){
            $key = stripslashes($key);
            $val = stripslashes($val);
            $body .= "$key: $val\n";
    }
    mail($email,$receipt_subject,$receipt_body,"From:$owner_email");
    if ($logging == "N") {
        mail($owner_email,$email_subject,$body,"From:$owner_email");
    }
    else if ($logging == "Y") {
        $body .= "\n\nUsing: $HTTP_USER_AGENT";
        $body .= "\nHostname: $ip";
        $body .= "\nIP address: $REMOTE_ADDR";
        $body .= "\nDate/Time: $date";
        mail($owner_email,$email_subject,$body,"From:$owner_email");
}
?>
<center>
<h2><font face=<? echo "$font"; ?> color=<? echo "$title_main_colour"; ?>><? echo "$success_title"; ?></h2>
<font face=<? echo "$font"; ?> size=<? echo "$size"; ?> color=<? echo "$main_colour"; ?>><? echo "$success_msg"; ?></font><br>
<font face=<? echo "$font"; ?> size=<? echo "$size"; ?> color=<? echo "$main_colour"; ?>>Return to <a href="http://<? echo "$owner_url"; ?>"><? echo "$site_name"; ?></a></font>
</center>
</body>
</html>


Scarica il Codice...


Stampa la pagina


 








Inizio pagina

risorse per webmaster

php

php

php, mail, database, banner
php, banner,

Vai nel sito Morpheusweb.it - Risorse per Webmaster troverai quello che stai cercando
php, banner,
Nel nostro sito molte informazioni: "Morpheusweb.it - Risorse per Webmaster" tratta di php, script, forms, mail, database
click here se non sei reindirizzato automaticamente al nostro sito.

php, script, banner, mail, database, , ,