<?php
-# This form requires wfpl. See: http://jasonwoof.org/wfpl
+# This form requires wfpl. See: http://sametwice.com/wfpl
# SETUP
$GLOBALS['contact_robot_answer'] = 1002;
-require_once('code/wfpl/format.php');
-require_once('code/wfpl/email.php');
+require_once(DOCROOT . 'inc/wfpl/format.php');
+require_once(DOCROOT . 'inc/wfpl/email.php');
function contact_get_fields() {
$data = array();
}
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']) {
$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 = '';