Revision 153
Added by ryan about 20 years ago
| add.php | ||
|---|---|---|
| 30 | 30 |
|
| 31 | 31 |
// Insert an extra rows into the database |
| 32 | 32 |
$header = '<table cellpadding=\"2\" cellspacing=\"0\" border=\"0\" width=\"100%\">'; |
| 33 |
$field_loop = '<tr><td class=\"field_title\">{TITLE}{REQUIRED}:</td><td>{FIELD}</td></tr>';
|
|
| 34 |
$footer = '<tr><td> </td> |
|
| 35 |
<td> |
|
| 36 |
<input type=\"submit\" name=\"submit\" value=\"Submit Form\" /> |
|
| 37 |
</td> |
|
| 38 |
</tr> |
|
| 33 |
$field_loop = '<tr><td class=\"field_title\">{TITLE}{REQUIRED}:</td><td>{FIELD}</td></tr>';
|
|
| 34 |
$footer = ''; |
|
| 35 |
if(extension_loaded('gd') AND function_exists('imageCreateFromJpeg')) { /* Make's sure GD library is installed */
|
|
| 36 |
$footer .= '<tr><td class=\"field_title\">Verification:</td><td> |
|
| 37 |
<table cellpadding=\"2\" cellspacing=\"0\" border=\"0\"> |
|
| 38 |
<tr><td><img src=\"{WB_URL}/include/captcha.php\" alt=\"Captcha\" /></td>
|
|
| 39 |
<td><input type=\"text\" name=\"captcha\" maxlength=\"5\" /></td> |
|
| 40 |
</tr></table> |
|
| 41 |
</td></tr> |
|
| 42 |
'; |
|
| 43 |
} |
|
| 44 |
$footer .= '<tr><td> </td> |
|
| 45 |
<td> |
|
| 46 |
<input type=\"submit\" name=\"submit\" value=\"Submit Form\" /> |
|
| 47 |
</td> |
|
| 48 |
</tr> |
|
| 39 | 49 |
</table>'; |
| 40 | 50 |
$email_to = $admin->get_email(); |
| 41 | 51 |
$email_from = ''; |
| ... | ... | |
| 43 | 53 |
$success_message = 'Thank-you.'; |
| 44 | 54 |
$max_submissions = 50; |
| 45 | 55 |
$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 | 56 |
$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')");
|
| 52 | 57 |
|
| 53 | 58 |
?> |
Also available in: Unified diff
Updated Captcha code