Changeset 1321 in ExiteCMS for trunk/contact.php
- Timestamp:
- 02/28/08 00:25:43 (4 years ago)
- File:
-
- 1 edited
-
trunk/contact.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/contact.php
r1315 r1321 36 36 locale_load("main.contact"); 37 37 38 // captcha check 39 $cic = ""; 40 $securimage = new Securimage(); 41 if ($securimage->check($_POST['captcha_code']) == false) { 42 $cic = "&cic=1"; 43 } 44 $variables['cic'] = $cic; 45 46 // get variables from the post, or initialize them 38 // captcha check ok and message posted? 47 39 if (isset($_POST['sendmessage'])) { 48 40 $mailname = substr(stripinput(trim($_POST['mailname'])),0,50); … … 50 42 $subject = substr(str_replace(array("\r","\n","@"), "", descript(stripslash(trim($_POST['subject'])))),0,50); 51 43 $message = descript(stripslash(trim($_POST['message']))); 52 } else { 53 $mailname = ""; 54 $email = ""; 55 $subject = ""; 56 $message = ""; 57 } 58 59 // captcha check ok and message posted? 60 if ($cic == "" && isset($_POST['sendmessage'])) { 44 // error initialisation 61 45 $errors = array(); 46 // captcha check 47 $securimage = new Securimage(); 48 if ($securimage->check($_POST['captcha_code']) == false) { 49 $errors[] = $locale['414']; 50 } 62 51 if ($mailname == "") { 63 52 $errors[] = $locale['420']; … … 84 73 $template_variables['main.contact.message'] = $variables; 85 74 } else { 86 // form variables 87 $variables['mailname'] = $mailname; 88 $variables['email'] = $email; 89 $variables['subject'] = $subject; 90 $variables['message'] = $message; 75 // generate captcha text if needed 76 if ($settings['display_validation'] == "1" && $settings['validation_method'] == "text") { 77 require_once PATH_INCLUDES."secureimage-1.0.3/securimage.php"; 78 $securimage = new Securimage(); 79 $securimage->createCode(); 80 $variables['validation_code'] = $_SESSION['securimage_code_value']; 81 } 91 82 // define the body panel variables 92 83 $variables['target'] = $target;
Note: See TracChangeset
for help on using the changeset viewer.
