<?PHP
session_start();
$to = $_SESSION['to'] = $_REQUEST['to'];
$subject = $_SESSION['subject'] = $_REQUEST['subject'];
$bodytext = $_SESSION['bodytext'] = $_REQUEST['bodytext'];
$from = $_SESSION['from'] = $_REQUEST['from'];
$name = $_SESSION['name'] = $_REQUEST['name'];
print "$to $subject $bodytext $from";
function sendsite(){
// global $to, $subject, $bodytext, $from, $name;
$siteOwner = "britt@tips-og-tricks.com";
mail("$to","$subject","$bodytext\n\n-$from","From: \"$name\"<$from>");
mail("$siteOwner","Side sendt til ven","
From: $from $name
To : $to
Body: $bodytext");
}
// Please type in all needed values before run the script!
require_once("hn_captcha.class.php");
// ConfigArray
$CAPTCHA_INIT = array(
'tempfolder' => $_SERVER['DOCUMENT_ROOT'].'/tmp/', // string: absolute path (with trailing slash!) to a writeable tempfolder which is also accessible via HTTP!
'TTF_folder' => $_SERVER['DOCUMENT_ROOT'].'/blog/wp-content/plugins/captcha/fonts/', // string: absolute path (with trailing slash!) to folder which contains your TrueType-Fontfiles.
// mixed (array or string): basename(s) of TrueType-Fontfiles
'TTF_RANGE' => array('waltograph42.otf','.jb_hell.ttf','waltographUI.ttf', '28 Days Later.ttf'),
// 'TTF_RANGE' => 'COMIC.TTF',
'chars' => 5, // integer: number of chars to use for ID
'minsize' => 20, // integer: minimal size of chars
'maxsize' => 30, // integer: maximal size of chars
'maxrotation' => 25, // integer: define the maximal angle for char-rotation, good results are between 0 and 30
'noise' => FALSE, // boolean: TRUE = noisy chars | FALSE = grid
'websafecolors' => FALSE, // boolean
'refreshlink' => TRUE, // boolean
'lang' => 'en', // string: ['en'|'de']
'maxtry' => 3, // integer: [1-9]
'badguys_url' => '/', // string: URL
'secretstring' => 'A very, very secret string which is used to generate a md5-key!',
'secretposition' => 15, // integer: [1-32]
'debug' => FALSE
);
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Tak, fordi du har sendt dette tip til en ven</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
/*********************************
*
* CAPTCHA-Styles
*
*/
p.captcha_1,
p.captcha_2,
p.captcha_notvalid
{
margin-left: 30px;
margin-right: 20px;
font-size: 12px;
font-style: normal;
font-weight: normal;
font-family: Verdana, Geneva, Arial, Helvetica, sans-serif;
background: transparent;
color: #000000;
}
p.captcha_2
{
font-size: 10px%;
font-style: italic;
font-weight: normal;
}
p.captcha_notvalid
{
font-weight: bold;
color: #FFAAAA;
}
.captchapict
{
margin: 0px 0px 0px 0px;
padding: 0px 0px 0px 0px;
border-style: inset;
border-width: 4px;
border-color: #C0C0C0;
}
#captcha
{
margin-left: 30px;
margin-right: 30px;
border-style: dashed;
border-width: 2px;
border-color: #FFD940;
}
-->
</style>
</head>
<body bgcolor="#FFFFFF" text="#000000" link="#0066CC" vlink="#6C4884">
<?PHP
$captcha =& new hn_captcha($CAPTCHA_INIT);
switch($captcha->validate_submit())
{
// was submitted and has valid keys
case 1:
// PUT IN ALL YOUR STUFF HERE //
// PHP Script starts here. Customize email address below. -->
sendsite();
// PHP Script ends here. -->
print "
<table width=\"100%\" border=\"0\" cellspacing=\"5\" cellpadding=\"5\">
<tr>
<td bgcolor=\"#FFFFFF\">
<div align=\"center\">
<p align=\"center\"> </p>
<p align=\"center\"><b><font face=\"Arial, Helvetica, sans-serif\" size=\"2\"><u><font color=\"#CC0000\" size=\"3\">Tak</font></u></font></b></p>
<p><font face=\"Arial, Helvetica, sans-serif\" size=\"2\">Tak, fordi du har sendt
dette tip til en ven.</font></p>
<p><font face=\"Arial, Helvetica, sans-serif\" size=\"2\">Vi vil se frem til
din vens besøg.</font></p>
<p>$to $subject $bodytext $from</p>
<p><font face=\"Arial, Helvetica, sans-serif\" size=\"2\"><a href=\"
http://www.tips-og-tricks.com/\">Tilbage til
forsiden</a></font></p>
</div>
</td>
</tr>
</table>";
break;
// was submitted with no matching keys, but has not reached the maximum try's
case 2:
echo $captcha->display_form();
break;
// was submitted, has bad keys and also reached the maximum try's
case 3:
//if(!headers_sent() && isset($captcha->badguys_url)) header('location: '.$captcha->badguys_url);
echo "<p><br>Reached the maximum try's of ".$captcha->maxtry." without success!";
echo "<br><br><a href=\"".$_SERVER['PHP_SELF']."?download=yes&id=1234\">New DEMO</a></p>";
break;
// was not submitted, first entry
default:
echo $captcha->display_form();
break;
}
?>
</body>
</html>