Project

General

Profile

« Previous | Next » 

Revision 149

Added by ryan about 19 years ago

Implemented backend captcha code

View differences:

add.php
42 42
$email_subject = 'Results from form on website...';
43 43
$success_message = 'Thank-you.';
44 44
$max_submissions = 50;
45
$stored_submissions = 100;
46
$database->query("INSERT INTO ".TABLE_PREFIX."mod_form_settings (page_id,section_id,header,field_loop,footer,email_to,email_from,email_subject,success_message,max_submissions,stored_submissions) VALUES ('$page_id','$section_id','$header','$field_loop','$footer','$email_to','$email_from','$email_subject','$success_message','$max_submissions','$stored_submissions')");
45
$stored_submissions = 100;
46
if(extension_loaded('gd') AND function_exists('imageCreateFromJpeg')) { /* Make's sure GD library is installed */
47
	$use_captcha = true;
48
} else {
49
	$use_captcha = false;
50
}
51
$database->query("INSERT INTO ".TABLE_PREFIX."mod_form_settings (page_id,section_id,header,field_loop,footer,email_to,email_from,email_subject,success_message,max_submissions,stored_submissions,use_captcha) VALUES ('$page_id','$section_id','$header','$field_loop','$footer','$email_to','$email_from','$email_subject','$success_message','$max_submissions','$stored_submissions','$use_captcha')");
47 52

  
48 53
?>

Also available in: Unified diff