<form method="post" action="SUBMISSIONS_confirm.php">
<?php
$ipi = getenv("REMOTE_ADDR");
$httprefi = getenv ("HTTP_REFERER");
$httpagenti = getenv ("HTTP_USER_AGENT");
?>
<input type="hidden" name="ip" value="<?php echo $ipi ?>" />
<input type="hidden" name="httpref" value="<?php echo $httprefi ?>" />
<input type="hidden" name="httpagent" value="<?php echo $httpagenti ?>" />
Your Name:<br>
<input name="name" type="text" id="name" size="35" />
<br>
<br>
Your Email:<br>
<input name="email" type="text" id="email" size="35" />
<br>
<br>
Site Title: <br>
<input name="title" type="text" id="title" size="35" maxlength="150" />
<br>
<br>
URL:<br>
<input type="text" name="url" size="35" />
<br>
<br>
Select a Category:<br>
<select name="category" size="1" id="category">
<option>3D</option>
<option>Animation</option>
<option>Art</option>
<option>Book</option>
<option>Character Design</option>
<option>Comics</option>
<option>Culture / LifeStyle</option>
<option>Digital Art</option>
<option>Events / Competitions</option>
<option>Film</option>
<option>Flash</option>
<option>Graphic Design</option>
<option>Illustration</option>
<option>Literature</option>
<option>Magazine</option>
<option>Music</option>
<option>Painting</option>
<option>Photography</option>
<option>Portfolio</option>
<option>Trailers / Videos</option>
<option>Web & Design Studio</option>
<option>Web News</option>
<option>Other</option>
</select>
<br>
<br>
A short description about website: <br>
<textarea name="notes" rows="4" cols="40"></textarea>
<br>
<br>
Get 360 Updates:
<select name="subscribe" size="1" id="subscribe">
<option value="Yes">Yes</option>
<option value="No">No </option>
</select>
<br>
<br>
<input type="submit" name="Submit" value="Submit to Scene360" class="submitemail360">
</form>
<?php
$ip = $_POST['ip'];
$httpref = $_POST['httpref'];
$httpagent = $_POST['httpagent'];
$name = $_POST['name'];
$email = $_POST['email'];
$title = $_POST['title'];
$url = $_POST['url'];
$category = $_POST['category'];
$notes = $_POST['notes'];
$subscribe = $_POST['subscribe'];
if (eregi('http:', $notes)) {
die ("Do NOT try that! ! ");
}
if(!$visitormail == "" && (!strstr($visitormail,"@") || !strstr($visitormail,".")))
{
echo "<h2>Enter a Valid E-mail Address<br/></h2>n";
$badinput = "<h2>Your submission was not sent. Retry.</h2>n";
echo $badinput;
die ("- Click on your Internet Browser's 'BACK' button to go to form");
}
if(empty($name) || empty($email) || empty($title) || empty($url) || empty($category) || empty($notes )) {
echo "<h2>Please fill in all fields</h2>n";
die ("- Click on your Internet Browser's 'BACK' button to go to form");
}
$todayis = date("l, F j, Y, g:i a") ;
$subject = ("Site Submission for 360 News");
$title = $title;
$url = $url;
$notes = stripcslashes($notes);
$subscribe = $subscribe;
$message = "$todayis [GMT/UTC] n
________________________________________________
Name: $name
Email: ($email)n
$title
$url n
Category: $category n
$notes
________________________________________________
Subscription: $subscribe n
Additional Info : IP = $ip n
Browser Info: $httpagent n
Referral : $httpref n
";
$from = "From: $emailrn";
/* Change email address here */
mail("360login@gmail.com", $subject, $message, $from);
?>
<img src='/human.php' />
<?php
/* ---------------------------------------------------------------------------------- */
// ---
/* ---------------------------------------------------------------------------------- */
session_start();
class CaptchaSecurityImages
{
var $font = "monofont.ttf";
function generateCode($characters)
{
/* list all possible characters, similar looking characters and vowels have been removed */
$possible = '23456789bcdfghjkmnpqrstvwxyz';
$code = '';
$i = 0;
while ($i < $characters)
{
$code .= substr($possible, mt_rand(0, strlen($possible)-1), 1);
$i++;
}
return $code;
}
function CaptchaSecurityImages($width = '180', $height = '60',$characters = '6')
{
$code = $this->generateCode($characters);
/* font size will be 75% of the image height */
$font_size = $height * 0.75;
$image = @imagecreate($width, $height) or die('Cannot initialize new GD image stream');
/* set the colours */
$background_color = imagecolorallocate($image, 255, 255, 255);
$text_color = imagecolorallocate($image, 127, 127, 127);
$shadow_color = imagecolorallocate($image, 255, 255, 255);
$noise_color = imagecolorallocate($image, mt_rand(0,255), mt_rand(0,255), mt_rand(0,255));
/* generate random dots in background */
for($i = 0; $i < ($width * $height)/3; $i++)
{
imagefilledellipse($image, mt_rand(0,$width), mt_rand(0,$height), 1, 1, $noise_color);
}
/* generate random lines in background */
for($i = 0; $i < ($width * $height) / 2; $i++ )
{
imageline($image, 0, 0, 0, 0, $noise_color);
}
/* create textbox and add text */
$textbox = imagettfbbox($font_size, 0, $this->font, $code) or die('Error in imagettfbbox function');
$x = ($width - $textbox[4])/2;
$y = ($height - $textbox[5])/2;
imagettftext($image, $font_size+30, 0, 0, $y, $shadow_color, $this->font, strrev($code));
imagettftext($image, $font_size, 0, $x, $y, $text_color, $this->font , $code) or die('Error in imagettftext function');
$border = imagecolorallocate($image, 0, 0, 0);
imageline($image, 0, 0, $width-$width, $height, $border);
imageline($image, 0, 0, $width, 0, $border);
imageline($image, $width-1, 0, $width-1, $height, $border);
imageline($image, $width, $height-1, 0, $height-1, $border);
$_SESSION['security_code'] = $code;
/* output captcha image to browser */
header('Content-Type: image/jpeg');
imagejpeg($image);
imagedestroy($image);
}
}
$captcha = new CaptchaSecurityImages();
?>
<input id='security_code' name='security_code' type='text' />
if (isset($_SESSION['security_code'])
&& isset($_POST['security_code'])
&& $_SESSION['security_code'] == $_POST['security_code'])
{
// --- processor code goes here
}
else
{
// --- redirect back to form because the security code doesn't match
header("Location: /some_form.php");
}

© 1999-2008 The Designers Network / Gavin Laking
