X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=contact.php;h=743a953b0f31debe18cb64e09e59920e49287805;hb=00f6a232f1a6022f53f4e3c9d0236d81db966b62;hp=769b2c54189028fd874e068a9fe58cba48ad55da;hpb=608730c54e00a21b2d2615387e7980dd413eec39;p=wfpl-cms.git diff --git a/contact.php b/contact.php index 769b2c5..743a953 100644 --- a/contact.php +++ b/contact.php @@ -29,14 +29,14 @@ function contact_main() { } function contact_main_form($id = false) { + $robot_correct = "" . $GLOBALS['contact_robot_answer']; + $robot_minus_one = "" . ($GLOBALS['contact_robot_answer'] - 1); + $robot_plus_one = "" . ($GLOBALS['contact_robot_answer'] + 1); + tem_set('robot_minus_one', $robot_minus_one); + tem_set('robot_plus_one', $robot_plus_one); + if(isset($_POST['name'])) { $data = contact_get_fields(); - - $robot_correct = "" . $GLOBALS['contact_robot_answer']; - $robot_minus_one = "" . ($GLOBALS['contact_robot_answer'] - 1); - $robot_plus_one = "" . ($GLOBALS['contact_robot_answer'] + 1); - tem_set('robot_minus_one', $robot_minus_one); - tem_set('robot_plus_one', $robot_plus_one); $host = this_host(); if(!$data['name'] && !$data['email'] && !$data['comments']) { @@ -58,7 +58,7 @@ function contact_main_form($id = false) { $email_template = new tem(); $email_template->load('contact.email.txt'); $email_template->sets($data); - $email_template->set('$host', this_host()); + $email_template->set('$host', $host); $message = $email_template->run(); $cc = ''; $bcc = '';