<?php
/* Constants */
/* Version */ $version = '2.3';
/* Date */ $date = '09/28/05';
/* Error Level */ error_reporting(E_ALL & ~E_NOTICE);
/* Text File */ $saveFile = '[FILENAME]';
//...... Added UTF-8 support
//Config file must be in the same directory as this file
//and have the same first part of the name. i.e. myform.inc.php
list($formName,$ext) = split('\.',basename($_SERVER['PHP_SELF']),2);
if (file_exists($formName.".inc.php"))
{
include($formName.".inc.php");
}
//XML file must be in the same directory as this file
$debug = (isset($_REQUEST['debug'])) ? $_REQUEST['debug'] : $debug;
if ($debug) error_reporting(E_ALL);
//...... Display debugging information
if ($debug)
{
switch($debug)
{
case 'info' :
phpinfo();
exit();
break;
case 'version' :
err("Current MailForm version: <b>".$version."</b><br>Current PHP version: <b>".phpversion()."</b><br> Current Revision Date: <b>$date</b>");
break;
}
}
$date=date("l, F dS, Y \a\\t g:i a");
$server=$_SERVER['SERVER_NAME'];
$msg="Here is the information submitted to $formName from $_SERVER[REMOTE_ADDR] on $date\r\n\r\n------------------------\r\n";
//...... Make sure we keep the variables
$subject = $_REQUEST['subject'];
$thankyoupage = $_REQUEST['thankyoupage'];
$xmlFile = $_REQUEST['xmlfile'];
$unreg = $_REQUEST['uR'];
$email = $_REQUEST['eM'];
if (file_exists($xmlFile))
{
$fd = fopen(basename($xmlFile),'r');
while(!feof($fd))
{
$contents .= fgets($fd,1024);
}
fclose($fd);
}
else
Bookmarks