/formprocessor.php
PHP | 13406 lines | 9591 code | 698 blank | 3117 comment | 673 complexity | 617c934ab1b7e9aacfa1aee055a0dfbb MD5 | raw file
Large files files are truncated, but you can click here to view the full file
- <?php
- $FM_VERS = "8.36"; // script version
-
- /* ex:set ts=4 sw=4 et:
- * FormMail PHP script from Tectite.com. This script requires PHP 4 or later.
- * Copyright (c) 2001-2012 Root Software and Open Concepts (Vic) Pty Ltd
- * (ABN 12 130 429 248), Melbourne, Australia.
- * This script is free for all use as described in the "Copying and Use" and
- * "Warranty and Disclaimer" sections below.
- *
- * Visit us at http://www.tectite.com/ for updates and more information.
- *
- *** If you use Tectite FormMail, please support its development and other
- *** freeware products by putting the following link on your website:
- *** Visit www.tectite.com for free <a href="http://www.tectite.com/">FormMail</a>.
- *
- * Author: Russell Robinson, 2nd October 2001
- *
- * Read This First
- * ~~~~~~~~~~~~~~~
- * This script is very well documented and quite large! It looks daunting,
- * but really isn't.
- * If you have experience with PHP or other scripting languages,
- * here's what you *need* to read:
- * - Configuration (TARGET_EMAIL & DEF_ALERT)
- * - Creating Forms
- * That's it! (Alternatively, just read the Quick Start and/or
- * Quicker Start section below).
- * Full configuration documentation is here:
- * http://www.tectite.com/fmdoc/index.php
- *
- * NOTE: do not read or modify this script or any PHP script
- * with DreamWeaver or FrontPage!
- * Many versions of those programs silently corrupt PHP scripts.
- *
- * Purpose:
- * ~~~~~~~~
- * To accept information from an HTML form via HTTP and mail it to recipients.
- *
- * What does this PHP script do?
- * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- * On your web site, you may have one or more HTML forms that accept
- * information from people visiting your website. Your aim is for your
- * website to email that information to you and/or add it to a database.
- * FormMail performs those functions.
- *
- * Quick Start
- * ~~~~~~~~~~~
- * 1. Edit this file and set TARGET_EMAIL for your requirements (near
- * line 256 in this file - replace "yourhost\.com" with your mail server's
- * name). We also strongly recommend you set DEF_ALERT (the next
- * configuration below TARGET_EMAIL).
- * 2. Install this file as formmail.php (or other name ending in .php)
- * on your web server.
- * Test alerts by using your browser to open a URL to the script:
- * http://www.yourhost.com/formmail.php?testalert=1
- * Alerts are the only way FormMail can tell you the details of
- * errors or faults.
- * 3. Create an HTML form and:
- * - specify a hidden field called "recipients" with the email address
- * of the person to receive the form's results.
- * - in the your form tag set the action attribute to
- * the formmail.php you uploaded to your web server
- *
- * Once you have FormMail working, you may be interested in some advanced
- * usage and features. We have HOW-TO guides at www.tectite.com which
- * describe many of the advanced processing you can do with FormMail.
- * http://www.tectite.com/fmhowto/guides.php
- *
- * Quicker Start
- * ~~~~~~~~~~~~~
- * Use the FormMail Configuration Wizard here:
- * http://www.tectite.com/wizards/fmconf.php
- * By answering a few questions you'll get a configured FormMail and
- * a sample HTML form ready to upload and use on your server.
- *
- * Features
- * ~~~~~~~~
- * For a list of features go to: http://www.tectite.com/formmailpage.php
- *
- * Security
- * ~~~~~~~~
- * Security is the primary concern in accepting data from your website
- * visitors.
- * Tectite FormMail has several security features designed into it. Note,
- * however, it requires configuration for your particular web site.
- *
- * Configuration
- * ~~~~~~~~~~~~~
- * To configure this script, go to the section titled "CONFIGURATION"
- * (after reading the legal stuff below).
- *
- * There is only one mandatory setting: TARGET_EMAIL
- * and one strongly recommended setting: DEF_ALERT
- *
- * Full configuration information is available here:
- * http://www.tectite.com/fmdoc/index.php
- *
- * Creating Forms
- * ~~~~~~~~~~~~~~
- * Go to this URL to learn how to write HTML forms for use with
- * Tectite FormMail: http://www.tectite.com/fmdoc/creating_forms.php
- *
- * Copying and Use (Software License)
- * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- * Tectite FormMail is provided free of charge and may be freely distributed
- * and used provided that you:
- * 1. keep this header, including copyright and comments,
- * in place and unmodified; and,
- * 2. do not charge a fee for distributing it, without an agreement
- * in writing with Root Software allowing you to do so; and,
- * 3. if you modify FormMail before distributing it, you clearly
- * identify:
- * a) who you are
- * b) how to contact you
- * c) what changes you have made
- * d) why you have made those changes.
- *
- * By using any of our products, including this script, you are
- * agreeing to our standard Terms and Conditions, available here:
- * http://www.tectite.com/TermsAndConditions.pdf
- *
- * This is free software and the Software License shown above
- * is to be read in conjunction with our standard Terms and Conditions.
- *
- * Warranty and Disclaimer
- * ~~~~~~~~~~~~~~~~~~~~~~~
- * Tectite FormMail is provided free-of-charge and with ABSOLUTELY NO WARRANTY.
- * It has not been verified for use in critical applications, including,
- * but not limited to, medicine, defense, aircraft, space exploration,
- * or any other potentially dangerous activity.
- *
- * By using Tectite FormMail you agree to indemnify Root Software and
- * Open Concepts (Vic) Pty Ltd, their agents, employees, directors and
- * associated companies and businesses from any liability whatsoever.
- *
- * We still care
- * ~~~~~~~~~~~~~
- * If you find a bug or fault in FormMail, please report it to us.
- * We will respond to your report and make endeavours to rectify any
- * faults you've detected as soon as possible.
- *
- * To contact us please register on our forums at:
- * http://www.tectite.com/vbforums/
- * or view our contact information:
- * http://www.tectite.com/contacts.php
- *
- * Version History
- * ~~~~~~~~~~~~~~~
- * Near the top of this file, you'll find its version. The version
- * line looks like this:
- * $FM_VERS = "N.MM"; /* script version ...
- *
- * The version history used to be located within this file. However,
- * starting with Version 8.00 we've moved it...
- *
- * You can read the complete version history of FormMail on our
- * main website here:
- * http://www.tectite.com/fmdoc/version_history.php
- */
-
- FMDebug('Submission to: '.(isset($_SERVER['PHP_SELF']) ? $_SERVER['PHP_SELF'] : '').' from: '.(isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : ''));
-
- if (isset($_SERVER['REQUEST_METHOD']) && strtoupper($_SERVER['REQUEST_METHOD']) === 'OPTIONS')
- {
- FMDebug('CORS OPTIONS request');
- CORS_Response();
- exit;
- }
-
- //
- // Capture the current date and time, for various purposes.
- //
- $lNow = time();
-
- ini_set('track_errors',1); // enable $php_errormsg
-
- $aAlertInfo = array();
- $aPHPVERSION = array();
-
- $sLangID = ""; // the language ID
- $aMessages = array(); // all FormMail messages in the appropriate
- // language
-
- $bUseOldVars = IsOldVersion($aPHPVERSION);
-
- if (!IsPHPAtLeast("5.3.0"))
- //
- // disable this silly setting (usually not enabled)
- // it's also deprecated from PHP version 5.3.0
- //
- set_magic_quotes_runtime(0);
-
- //
- // seed the random number generate if not version 4.2.0 or later
- //
- if (!IsPHPAtLeast("4.2.0"))
- mt_srand(time());
-
- //
- // we set references to the appropriate arrays to handle PHP version differences
- // Session vars are selected after we start the session.
- //
- if ($bUseOldVars)
- {
- $aServerVars = &$HTTP_SERVER_VARS;
- $aGetVars = &$HTTP_GET_VARS;
-
- $aFormVars = &$HTTP_POST_VARS;
- $aFileVars = &$HTTP_POST_FILES;
- $aEnvVars = &$HTTP_ENV_VARS;
- }
- else
- {
- $aServerVars = &$_SERVER;
- $aGetVars = &$_GET;
- $aFormVars = &$_POST;
- $aFileVars = &$_FILES;
- $aEnvVars = &$_ENV;
- }
- $bIsGetMethod = false;
- $bHasGetData = false;
-
- if (!isset($REAL_DOCUMENT_ROOT))
- SetRealDocumentRoot();
-
- if (isset($aServerVars['SERVER_PORT']))
- $SCHEME = ($aServerVars['SERVER_PORT'] == 80) ? "http://" : "https://";
- else
- $SCHEME = "";
- if (isset($aServerVars['SERVER_NAME']) && $aServerVars['SERVER_NAME'] !== "")
- $SERVER = $aServerVars['SERVER_NAME'];
- elseif (isset($aServerVars['SERVER_ADDR']) && $aServerVars['SERVER_ADDR'] !== "")
- $SERVER = $aServerVars['SERVER_ADDR'];
- else
- $SERVER = "";
-
- /*
- * Load an optional include file before the configuration.
- * You can use this to set variables that can be used in the
- * configuration section.
- */
- @include("formmail-preconfig.inc.php");
-
- /*****************************************************************************/
- /* CONFIGURATION (do not alter this line in any way!!!) */
- /*****************************************************************************
- * This is the *only* place where you need to modify things to use formmail.php
- * on your particular system. This section finishes at "END OF CONFIGURATION".
- * Help for all settings can be found on our website:
- * http://www.tectite.com/fmdoc/index.php
- *
- * Also, above each setting is a direct URL to the help information for the
- * setting.
- *****************************************************************************/
-
- /* Help: http://www.tectite.com/fmdoc/email_name.php */
- define("EMAIL_NAME","^[-a-z0-9.]+"); // the '^' is an important security feature!
-
- /* Help: http://www.tectite.com/fmdoc/target_email.php */
- $TARGET_EMAIL = array("^uc3@ucop\.edu$");
- // $TARGET_EMAIL = array("^joel\.hagedorn@ucop\.edu$");
-
- /* Help: http://www.tectite.com/fmdoc/def_alert.php */
-
- define("DEF_ALERT","joel.hagedorn@ucop.edu");
-
- /* Help: http://www.tectite.com/fmdoc/site_domain.php */
- $SITE_DOMAIN = ""; // your website domain name
-
- /* Help: http://www.tectite.com/fmdoc/set_real_document_root.php */
- $SET_REAL_DOCUMENT_ROOT = ""; // overrides the value set by SetRealDocumentRoot function
-
- //
- // override $REAL_DOCUMENT_ROOT from the $SET_REAL_DOCUMENT_ROOT value (if any)
- // Do not alter the following code (next 3 lines)!
- //
- if (isset($SET_REAL_DOCUMENT_ROOT) && $SET_REAL_DOCUMENT_ROOT !== "")
- $REAL_DOCUMENT_ROOT = $SET_REAL_DOCUMENT_ROOT;
-
- /* Help: http://www.tectite.com/fmdoc/config_check.php */
- $CONFIG_CHECK = array("TARGET_EMAIL");
-
- /* Help: http://www.tectite.com/fmdoc/at_mangle.php */
- define("AT_MANGLE","ATT");
-
- /* Help: http://www.tectite.com/fmdoc/target_urls.php */
- $TARGET_URLS = array(); // default; no URLs allowed
-
- /* Help: http://www.tectite.com/fmdoc/head_crlf.php */
- define("HEAD_CRLF","\r\n");
-
- /* Help: http://www.tectite.com/fmdoc/body_lf.php */
- define("BODY_LF","\r\n"); // the new default: use this for CR+LF
- //define("BODY_LF","\n"); // the old default: just LF
-
- /* Help: http://www.tectite.com/fmdoc/from_user.php */
- $FROM_USER = ""; // the default - setting not used
-
- /* Help: http://www.tectite.com/fmdoc/sendmail_f_option.php */
- define("SENDMAIL_F_OPTION",false);
- define("SENDMAIL_F_OPTION_LINE",__LINE__-1); // don't modify this line!
-
- /* Help: http://www.tectite.com/fmdoc/fixed_sender.php */
- $FIXED_SENDER = "";
-
- /* Help: http://www.tectite.com/fmdoc/set_sender_from_email.php */
- define("SET_SENDER_FROM_EMAIL",false);
-
- /* Help: http://www.tectite.com/fmdoc/ini_set_from.php */
- define("INI_SET_FROM",false);
-
-
- /* Help: http://www.tectite.com/fmdoc/logdir.php */
- $LOGDIR = ""; // directory for log files; empty string to
- // disallow log files
- /* Help: http://www.tectite.com/fmdoc/autorespondlog.php */
- $AUTORESPONDLOG = ""; // file name in $LOGDIR for the auto responder
- // log; empty string for no auto responder log
-
- /* Help: http://www.tectite.com/fmdoc/csv_file_settings.php */
- $CSVDIR = ""; // directory for csv files; empty string to
- // disallow csv files
- $CSVSEP = ","; // comma separator between fields (columns)
- $CSVINTSEP = ";"; // semicolon is the separator for fields (columns)
- // with multiple values (checkboxes, etc.)
- $CSVQUOTE = '"'; // all fields in the CSV are quoted with this character;
- // default is double quote. You can change it to
- // single quote or leave it empty for no quotes.
- //$CSVQUOTE = "'"; // use this if you want single quotes
- $CSVOPEN = ""; // set to "b" to force line terminations to be
- // kept as $CSVLINE setting below, regardless of
- // operating system. Keep as empty string and
- // leave $CSVLINE unchanged, to get text file
- // terminations for your server's operating system.
- // (Line feed on UNIX, carriage-return line feed on Windows).
- $CSVLINE = "\n"; // line termination for CSV files. The default is
- // a single line feed, which may be modified for your
- // server's operating system. If you want to change
- // this value, you *must* set $CSVOPEN = "b".
-
- /* Help: http://www.tectite.com/fmdoc/templatedir.php */
- $TEMPLATEDIR = ""; // directory for template files; empty string
- // if you don't have any templates
-
- /* Help: http://www.tectite.com/fmdoc/templateurl.php */
- $TEMPLATEURL = ""; // default; no template URL
-
- /* Help: http://www.tectite.com/fmdoc/multiformdir.php */
- $MULTIFORMDIR = ""; // directory for multi-form template files; empty string
- // if you're not using multi-forms
-
- /* Help: http://www.tectite.com/fmdoc/multiformurl.php */
- $MULTIFORMURL = ""; // default; no multi-forms templates URL
-
- /* Help: http://www.tectite.com/fmdoc/text_subs.php */
- $TEXT_SUBS = array(
- array("srch"=>"/\\\\r\\\\n/","repl"=>"\r\n",),
- array("srch"=>"/\\\\n/","repl"=>"\n",),
- array("srch"=>"/\\\\t/","repl"=>"\t",),
- array("srch"=>"/\\[NL\\]/","repl"=>"\n",),
- array("srch"=>"/\\[TAB\\]/","repl"=>"\t",),
- array("srch"=>"/\\[NBSP\\]/","repl"=>" ",),
- array("srch"=>"/\\[DQUOT\\]/","repl"=>'"',),
- array("srch"=>"/\\[SQUOT\\]/","repl"=>"'",),
- array("srch"=>"/\\[COLON\\]/","repl"=>":",),
- array("srch"=>"/\\[SLOSH\\]/","repl"=>"\\",),
- array("srch"=>"/\\[OPCURL\\]/","repl"=>"{",),
- array("srch"=>"/\\[CLCURL\\]/","repl"=>"}",),
- array("srch"=>"/(on[a-z]*|href|src)\\s*=\\s*/i","repl"=>""),/* strip html attributes that could be unsafe */
- array("srch"=>"/<\\s*(table|tr|td|th|p|ul|ol|li|b|i|u|strong|pre|h[1-6]|em|dl|dd|dt|hr|span|br)(\\b[^>]*?)>/i","repl"=>"<\$1\$2>",),
- array("srch"=>"#<\\s*/\\s*(table|tr|td|th|p|ul|ol|li|b|i|u|strong|pre|h[1-6]|em|dl|dd|dt|hr|span|br)\\s*>#i","repl"=>"</\$1>",),
- );
-
- /* Help: http://www.tectite.com/fmdoc/authentication_settings.php */
- $AUTHENTICATE = "";
- //$AUTHENTICATE = "Basic cnVzc2VsbHI6dGVzdA=="; // example
- $AUTH_USER = "";
- $AUTH_PW = "";
-
- /* Help: http://www.tectite.com/fmdoc/form_ini_file.php */
- $FORM_INI_FILE = "";
-
- /* Help: http://www.tectite.com/fmdoc/moduledir.php */
- $MODULEDIR = ".";
-
- /* Help: http://www.tectite.com/fmdoc/fmcompute.php */
- $FMCOMPUTE = "fmcompute.php";
-
- /* Help: http://www.tectite.com/fmdoc/fmgeoip.php */
- $FMGEOIP = "fmgeoip.php";
-
- /* Help: http://www.tectite.com/fmdoc/advanced_templates.php */
- define("ADVANCED_TEMPLATES",false); // set to true for advanced templates
-
- /* Help: http://www.tectite.com/fmdoc/limited_import.php */
- define("LIMITED_IMPORT",true); // set to true if your database cannot
- // handle escaped quotes or newlines within
- // imported data. Microsoft Access is one
- // example.
-
- /* Help: http://www.tectite.com/fmdoc/valid_env.php */
- $VALID_ENV = array('HTTP_REFERER','REMOTE_HOST','REMOTE_ADDR','REMOTE_USER',
- 'HTTP_USER_AGENT');
-
- /* Help: http://www.tectite.com/fmdoc/fileuploads.php */
- define("FILEUPLOADS",false); // set to true to allow file attachments
-
- /* Help: http://www.tectite.com/fmdoc/max_file_upload_size.php */
- define("MAX_FILE_UPLOAD_SIZE",0); // default of 0 means that other software
- // controls the maximum file upload size
- // (FormMail doesn't test the file size)
-
- /* Help: http://www.tectite.com/fmdoc/file_repository.php */
- $FILE_REPOSITORY = "";
-
- /* Help: http://www.tectite.com/fmdoc/file_mode.php */
- define("FILE_MODE",0664); // always precede with 0 to specify octal!
-
- /* Help: http://www.tectite.com/fmdoc/file_overwrite.php */
- define("FILE_OVERWRITE",true);
-
- /* Help: http://www.tectite.com/fmdoc/next_num_file.php */
- $NEXT_NUM_FILE = "";
-
- /* Help: http://www.tectite.com/fmdoc/put_data_in_url.php */
- define("PUT_DATA_IN_URL",true); // set to true to place data in the URL
- // for bad_url redirects
-
- /* Help: http://www.tectite.com/fmdoc/allow_get_method.php */
- $ALLOW_GET_METHOD = false;
-
- /* Help: http://www.tectite.com/fmdoc/db_see_input.php */
- define("DB_SEE_INPUT",false); // set to true to just see the input values
-
- /* Help: http://www.tectite.com/fmdoc/db_see_ini.php */
- define("DB_SEE_INI",false); // set to true to just see the ini file
-
- /* Help: http://www.tectite.com/fmdoc/maxstring.php */
- define("MAXSTRING",1024); // maximum string length for a value
-
- /* Help: http://www.tectite.com/fmdoc/require_captcha.php */
- $REQUIRE_CAPTCHA = ""; // set to a message string if your forms
- // must provide a CAPTCHA string
-
- /* Help: http://www.tectite.com/fmdoc/recaptcha_private_key.php */
- $RECAPTCHA_PRIVATE_KEY = "";
-
- /* Help: http://www.tectite.com/fmdoc/bshowmesgnumbers.php */
- $bShowMesgNumbers = false;
-
- /* Help: http://www.tectite.com/fmdoc/filters.php */
- /* Note for Tectite personnel: the upgrade Wizard will merge new values
- * but be careful of $var usage and quoting in new entries.
- */
- $FILTERS = array("encode"=>"$REAL_DOCUMENT_ROOT/cgi-bin/fmencoder -kpubkey.txt",
- "null"=>"null",
- "csv"=>"csv");
-
- /* Help: http://www.tectite.com/fmdoc/socket_filters.php */
- $SOCKET_FILTERS = array(
- "httpencode"=>array("site"=>"YourSiteHere",
- "port"=>80,
- "path"=>"/cgi-bin/fmencoder",
- "params"=>array(array("name"=>"key",
- "file"=>"$REAL_DOCUMENT_ROOT/cgi-bin/pubkey.txt"))),
- "sslencode"=>array("site"=>"ssl://YourSecureSiteHere",
- "port"=>443,
- "path"=>"/cgi-bin/fmencoder",
- "params"=>array(array("name"=>"key",
- "file"=>"$REAL_DOCUMENT_ROOT/cgi-bin/pubkey.txt"))),
- );
-
- /* Help: http://www.tectite.com/fmdoc/filter_attribs.php */
- $FILTER_ATTRIBS = array("encode"=>"Strips,MIME=application/vnd.fmencoded,Encrypts",
- "httpencode"=>"Strips,MIME=application/vnd.fmencoded,Encrypts",
- "sslencode"=>"Strips,MIME=application/vnd.fmencoded,Encrypts",
- "csv"=>"Strips,MIME=text/csv",);
-
- /* Help: http://www.tectite.com/fmdoc/check_for_new_version.php */
- define("CHECK_FOR_NEW_VERSION",true);
- define("CHECK_DAYS",30);
-
- /* Help: http://www.tectite.com/fmdoc/scratch_pad.php */
- $SCRATCH_PAD = "";
-
- /* Help: http://www.tectite.com/fmdoc/cleanup_time.php */
- $CLEANUP_TIME = 60; // cleanup time in minutes
-
- /* Help: http://www.tectite.com/fmdoc/cleanup_chance.php */
- $CLEANUP_CHANCE = 20; // percentage probability that cleanup will be performed
-
- /* Help: http://www.tectite.com/fmdoc/pear_settings.php */
- $PEAR_SMTP_HOST = "";
- $PEAR_SMTP_PORT = 25;
- $PEAR_SMTP_USER = "";
- $PEAR_SMTP_PWD = "";
-
- /* Help: http://www.tectite.com/fmdoc/alert_on_user_error.php */
- define("ALERT_ON_USER_ERROR",true);
-
- /* Help: http://www.tectite.com/fmdoc/enable_attack_detection.php */
- define("ENABLE_ATTACK_DETECTION",true);
-
- /* Help: http://www.tectite.com/fmdoc/attack_detection_url.php */
- define("ATTACK_DETECTION_URL","");
-
- /* Help: http://www.tectite.com/fmdoc/alert_on_attack_detection.php */
- define("ALERT_ON_ATTACK_DETECTION",false);
-
- /* Help: http://www.tectite.com/fmdoc/attack_detection_mime.php */
- define("ATTACK_DETECTION_MIME",true);
-
- /* Help: http://www.tectite.com/fmdoc/attack_detection_junk.php */
- define("ATTACK_DETECTION_JUNK",false);
- define("ATTACK_DETECTION_JUNK_CONSONANTS","bcdfghjklmnpqrstvwxz");
- define("ATTACK_DETECTION_JUNK_VOWELS","aeiouy");
- define("ATTACK_DETECTION_JUNK_CONSEC_CONSONANTS",5);
- define("ATTACK_DETECTION_JUNK_CONSEC_VOWELS",4);
- define("ATTACK_DETECTION_JUNK_TRIGGER",2);
- $ATTACK_DETECTION_JUNK_LANG_STRIP = array(
- "aiia", /* Hawaiian */
- "aeoa", /* palaeoanthropic */
- "aeoe", /* palaeoethnic */
- "ooee", /* cooee */
- "oeia", /* pharmacopoeia */
- "ioau", /* radioautograph */
- "uaia", /* guaiac */
- "ueou", /* aqueous */
- "uiou", /* obsequious */
- "queue", /* queue, queueing */
- "earth", /* earthquake, earthslide */
- "cks", /* jockstrap, backscratcher */
- "ngth", /* strengths, length */
- "ndths", /* thousandths */
- "ght", /* nightclub, knightsbridge */
- "phth", /* ophthalmology */
- "sch", /* rothschild */
- "shch", /* borshch */
- "scr", /* corkscrew */
- "spr", /* wingspread, offspring */
- "str", /* armstrong, songstress */
- "sts", /* bursts, postscript */
- "tch", /* catchphrase, scratchproof */
- "thst", /* northstar, birthstone */
- "http", /* https, http */
- "html", /* HTML, XHTML */
- );
- $ATTACK_DETECTION_JUNK_IGNORE_FIELDS = array();
-
-
- /* Help: http://www.tectite.com/fmdoc/attack_detection_dups.php */
- $ATTACK_DETECTION_DUPS = array("realname","address1","address2","country","zip",
- "phone","postcode","state","email");
-
- /* Help: http://www.tectite.com/fmdoc/attack_detection_specials.php */
- define("ATTACK_DETECTION_SPECIALS",true);
-
- /* Help: http://www.tectite.com/fmdoc/attack_detection_specials.php */
- $ATTACK_DETECTION_SPECIALS_ONLY_EMAIL = array("derive_fields","required",
- "mail_options","good_url","bad_url","good_template",
- "bad_template");
-
- /* Help: http://www.tectite.com/fmdoc/attack_detection_specials.php */
- $ATTACK_DETECTION_SPECIALS_ANY_EMAIL = array("subject");
-
- /* Help: http://www.tectite.com/fmdoc/attack_detection_many_urls.php */
- define("ATTACK_DETECTION_MANY_URLS",0);
-
- /* Help: http://www.tectite.com/fmdoc/attack_detection_many_url_fields.php */
- define("ATTACK_DETECTION_MANY_URL_FIELDS",0);
-
- /* Help: http://www.tectite.com/fmdoc/attack_detection_url_patterns.php */
- $ATTACK_DETECTION_URL_PATTERNS = array(
- '(^|[^-a-z_.0-9]+)(?<!@)([-a-z0-9]+\.)+(com|org|net|biz|info|name|pro|tel|asia|cat)\b',
- '(^|[^-a-z_.0-9]+)(?<!@)([-a-z0-9]+\.)+(com{0,1}|org|net)\.[a-z][a-z]\b');
-
- /* Help: http://www.tectite.com/fmdoc/attack_detection_ignore_errors.php */
- define("ATTACK_DETECTION_IGNORE_ERRORS",false);
-
- /* Help: http://www.tectite.com/fmdoc/attack_detection_reverse_captcha.php */
- $ATTACK_DETECTION_REVERSE_CAPTCHA = array();
-
- /* Help: http://www.tectite.com/fmdoc/geoip_lic.php */
- $GEOIP_LIC = ""; // default - no GeoIP
-
- /* Help: http://www.tectite.com/fmdoc/zero_is_empty.php */
- define("ZERO_IS_EMPTY",false);
-
- /* Help: http://www.tectite.com/fmdoc/session_name.php */
- $SESSION_NAME = "";
-
- /* Help: http://www.tectite.com/fmdoc/session_access.php */
- $SESSION_ACCESS = array();
-
- /* Help: http://www.tectite.com/fmdoc/destroy_session.php */
- define("DESTROY_SESSION",true);
-
- /* Help: http://www.tectite.com/fmdoc/hook_dir.php */
- $HOOK_DIR = "";
-
- /* UPGRADE CONTROL
- **
- ** FILTERS:lt:8.04:merge:The FILTERS configuration has
- ** been modified to include some new standard filters.:
- **
- ** FILTER_ATTRIBS:lt:8.04:no_keep:The FILTER_ATTRIBS configuration has
- ** been modified to include new information about the standard filters.:
- **
- ** ATTACK_DETECTION_URL_PATTERNS:eq:8.02:no_keep:The ATTACK_DETECTION_URL_PATTERNS
- ** configuration has been modified to fix a bug.:
- **
- ** FILTER_ATTRIBS:lt:4.00:no_keep:The FILTER_ATTRIBS configuration has
- ** been modified to include new information about the standard filters.:
- **
- ** SET_REAL_DOCUMENT_ROOT:gt:4.07:copy_from=REAL_DOCUMENT_ROOT:The
- ** REAL_DOCUMENT_ROOT configuration has been renamed to SET_REAL_DOCUMENT_ROOT.:
- **
- ** EMAIL_NAME:lt:6.01:no_keep:The EMAIL_NAME configuration has
- ** been modified to match hyphens ('-') in email addresses.:
- **
- ** ZERO_IS_EMPTY:le:6.01:set_to=true:ZERO_IS_EMPTY has been
- ** set to a value that duplicates previous behaviour.:
- **
- ** TEXT_SUBS:lt:8.30:no_keep:The TEXT_SUBS configuration has
- ** been modified to be secure with new features released in this version.:
- **
- ** END OF CONTROL
- */
-
- /*****************************************************************************/
- /* END OF CONFIGURATION (do not alter this line in any way!!!) */
- /*****************************************************************************/
-
- //
- // for Ajax allow GET method for cross site JSONP
- //
- if (IsAjax())
- $ALLOW_GET_METHOD = true;
-
- /*
- * Load an optional include file after the configuration.
- * You can use this to set variables or make adjustments
- * based on the results of the configuration section.
- */
- @include("formmail-postconfig.inc.php");
-
- //
- // the following constants define all FormMail messages
- //
- define('MSG_SCRIPT_VERSION',0); // This script requires at least PHP version...
- define('MSG_END_VERS_CHK',1); // If you're happy...
- define('MSG_VERS_CHK',2); // A later version of FormMail is available...
- define('MSG_CHK_FILE_ERROR',3); // Unable to create check file...
- define('MSG_UNK_VALUE_SPEC',4); // derive_fields: unknown value specification...
- define('MSG_INV_VALUE_SPEC',5); // derive_fields: invalid value specification...
- define('MSG_DERIVED_INVALID',6); // Some derive_fields specifications...
- define('MSG_INT_FORM_ERROR',7); // Internal form error...
- define('MSG_OPTIONS_INVALID',8); // Some mail_options settings...
- define('MSG_PLSWAIT_REDIR',9); // Please wait while you are redirected...
- define('MSG_IFNOT_REDIR',10); // If you are not redirected...
- define('MSG_PEAR_OBJ',11); // Failed to create PEAR Mail object...
- define('MSG_PEAR_ERROR',12); // PEAR Mail error...
- define('MSG_NO_FOPT_ADDR',13); // You have specified "SendMailFOption"...
- define('MSG_MORE_INFO',14); // More information...
- define('MSG_INFO_STOPPED',15); // Extra alert information suppressed...
- define('MSG_FM_ALERT',16); // FormMail alert
- define('MSG_FM_ERROR',17); // FormMail script error
- define('MSG_FM_ERROR_LINE',18); // The following error occurred...
- define('MSG_USERDATA_STOPPED',19); // User data suppressed...
- define('MSG_FILTERED',20); // This alert has been filtered...
- define('MSG_TEMPLATES',21); // You must set either TEMPLATEDIR or TEMPLATEURL...
- define('MSG_OPEN_TEMPLATE',22); // Failed to open template...
- define('MSG_ERROR_PROC',23); // An error occurred while processing...
- define('MSG_ALERT_DONE',24); // Our staff have been alerted...
- define('MSG_PLS_CONTACT',25); // Please contact us directly...
- define('MSG_APOLOGY',26); // We apologize for any inconvenience...
- define('MSG_ABOUT_FORMMAIL',27); // Your form submission was processed by...
- define('MSG_PREG_FAILED',28); // preg_match_all failed in FindCRMFields...
- define('MSG_URL_INVALID',29); // CRM URL "$URL" is not valid...
- define('MSG_URL_OPEN',30); // Failed to open Customer Relationship...
- define('MSG_CRM_FAILED',31); // Failure report from CRM...
- define('MSG_CRM_FORM_ERROR',32); // Your form submission was not...
- define('MSG_OR',33); // "$ITEM1" or "$ITEM2"
- define('MSG_NOT_BOTH',34); // not both "$ITEM1" and "$ITEM2"
- define('MSG_XOR',35); // "$ITEM1" or "$ITEM2" (but not both)
- define('MSG_IS_SAME_AS',36); // "$ITEM1" is the same as "$ITEM2"
- define('MSG_IS_NOT_SAME_AS',37); // "$ITEM1" is not the same as "$ITEM2"
- define('MSG_REQD_OPER',38); // Operator "$OPER" is not valid for "required"
- define('MSG_PAT_FAILED',39); // Pattern operator "$OPER" failed: pattern...
- define('MSG_COND_OPER',40); // Operator "$OPER" is not valid...
- define('MSG_INV_COND',41); // Invalid "conditions" field...
- define('MSG_COND_CHARS',42); // The conditions field "$FLD" is not valid...
- define('MSG_COND_INVALID',43); // The conditions field "$FLD" is not valid...
- define('MSG_COND_TEST_LONG',44); // Field "$FLD" has too many components...
- define('MSG_COND_IF_SHORT',45); // Field "$FLD" has too few components for...
- define('MSG_COND_IF_LONG',46); // Field "$FLD" has too many components for...
- define('MSG_COND_UNK',47); // Field "$FLD" has an unknown command word...
- define('MSG_MISSING',48); // Missing "$ITEM"...
- define('MSG_NEED_ARRAY',49); // "$ITEM" must be an array...
- define('MSG_SUBM_FAILED',50); // Your form submission has failed...
- define('MSG_FILTER_WRONG',51); // Filter "$FILTER" is not properly...
- define('MSG_FILTER_CONNECT',52); // Could not connect to site "$SITE"...
- define('MSG_FILTER_PARAM',53); // Filter "$FILTER" has invalid parameter...
- define('MSG_FILTER_OPEN_FILE',54); // Filter "$FILTER" cannot open file...
- define('MSG_FILTER_FILE_ERROR',55); // Filter "$FILTER": read error on file...
- define('MSG_FILTER_READ_ERROR',56); // Filter '$filter' failed: read error...
- define('MSG_FILTER_NOT_OK',57); // Filter 'FILTER' failed...
- define('MSG_FILTER_UNK',58); // Unknown filter...
- define('MSG_FILTER_CHDIR',59); // Cannot chdir...
- define('MSG_FILTER_NOTFOUND',60); // Cannot execute...
- define('MSG_FILTER_ERROR',61); // Filter "$FILTER" failed...
- define('MSG_SPARE',62); // this value is now spare
- define('MSG_TEMPLATE_ERRORS',63); // Template "$NAME" caused the...
- define('MSG_TEMPLATE_FAILED',64); // Failed to process template "$NAME"...
- define('MSG_MIME_PREAMBLE',65); // (Your mail reader should not show this...
- define('MSG_MIME_HTML',66); // This message has been generated by FormMail...
- define('MSG_FILE_OPEN_ERROR',67); // Failed to open file "$NAME"...
- define('MSG_ATTACH_DATA',68); // Internal error: AttachFile requires...
- define('MSG_PHP_HTML_TEMPLATES',69); // HTMLTemplate option is only ...
- define('MSG_PHP_FILE_UPLOADS',70); // For security reasons, file upload...
- define('MSG_FILE_UPLOAD',71); // File upload attempt ignored...
- define('MSG_FILE_UPLOAD_ATTACK',72);// Possible file upload attack...
- define('MSG_PHP_PLAIN_TEMPLATES',73);// PlainTemplate option is only...
- define('MSG_ATTACH_NAME',74); // filter_options: Attach must contain a name...
- define('MSG_PHP_BCC',75); // Warning: BCC is probably not supported...
- define('MSG_CSVCOLUMNS',76); // The "csvcolumns" setting is not...
- define('MSG_CSVFILE',77); // The "csvfile" setting is not...
- define('MSG_TARG_EMAIL_PAT_START',78); // Warning: Your TARGET_EMAIL pattern...
- define('MSG_TARG_EMAIL_PAT_END',79); // Warning: Your TARGET_EMAIL pattern...
- define('MSG_CONFIG_WARN',80); // The following potential problems...
- define('MSG_PHP_AUTORESP',81); // Autorespond is only supported...
- define('MSG_ALERT',82); // This is a test alert message...
- define('MSG_NO_DEF_ALERT',83); // No DEF_ALERT value has been set....
- define('MSG_TEST_SENT',84); // Test message sent. Check your email.....
- define('MSG_TEST_FAILED',85); // FAILED to send alert message...
- define('MSG_NO_DATA_PAGE',86); // This URL is a Form submission program...
- define('MSG_REQD_ERROR',87); // The form required some values that you...
- define('MSG_COND_ERROR',88); // Some of the values you provided...
- define('MSG_CRM_FAILURE',89); // The form submission did not succeed...
- define('MSG_FOPTION_WARN',90); // Warning: You've used SendMailFOption in...
- define('MSG_NO_ACTIONS',91); // The form has an internal error...
- define('MSG_NO_RECIP',92); // The form has an internal error...
- define('MSG_INV_EMAIL',93); // Invalid email addresses...
- define('MSG_FAILED_SEND',94); // Failed to send email...
- define('MSG_ARESP_EMAIL',96); // No "email" field was found. Autorespond...
- define('MSG_ARESP_SUBJ',97); // Your form submission...
- define('MSG_LOG_NO_VERIMG',98); // No VerifyImgString in session...
- define('MSG_ARESP_NO_AUTH',99); // Failed to obtain authorization...
- define('MSG_LOG_NO_MATCH',100); // User did not match image...
- define('MSG_ARESP_NO_MATCH',101); // Your entry did not match...
- define('MSG_LOG_FAILED',102); // Failed
- define('MSG_ARESP_FAILED',103); // Autoresponder failed
- define('MSG_LOG_OK',104); // OK
- define('MSG_THANKS_PAGE',105); // Thanks! We've received your....
- define('MSG_LOAD_MODULE',106); // Cannot load module....
- define('MSG_LOAD_FMCOMPUTE',107); // Cannot load FMCompute....
- define('MSG_REGISTER_MODULE',108); // Cannot register module....
- define('MSG_COMP_PARSE',109); // These parse errors occurred....
- define('MSG_COMP_REG_DATA',110); // Failed to register data field....
- define('MSG_COMP_ALERT',111); // The following alert messages....
- define('MSG_COMP_DEBUG',112); // The following debug messages...
- define('MSG_COMP_EXEC',113); // The following errors occurred....
- define('MSG_REG_FMCOMPUTE',114); // Cannot register function...
- define('MSG_USER_ERRORS',115); // A number of errors occurred...
- define('MSG_CALL_PARAM_COUNT',116); // Invalid parameter count...
- define('MSG_CALL_UNK_FUNC',117); // Unknown function...
- define('MSG_SAVE_FILE',118); // Failed to save file....
- define('MSG_CHMOD',119); // Failed to chmod file....
- define('MSG_VERIFY_MISSING',120); // Image verification string missing...
- define('MSG_VERIFY_MATCH',121); // Your entry did not match...
- define('MSG_FILE_NAMES_INVALID',122);// Some file_names specifications...
- define('MSG_FILE_NAMES_NOT_FILE',123);// Your file_names specification...
- define('MSG_TEMPL_ALERT',124); // The following alert messages....
- define('MSG_TEMPL_DEBUG',125); // The following debug messages...
- define('MSG_TEMPL_PROC',126); // The following errors occurred....
- define('MSG_SAVE_FILE_EXISTS',127); // Cannot save file....
- define('MSG_EMPTY_ADDRESSES',128); // $COUNT empty addresses
- define('MSG_CALL_INVALID_PARAM',129); // Invalid parameter....
- define('MSG_INI_PARSE_WARN',130); // Warning: your INI
- define('MSG_INI_PARSE_ERROR',131); // The FormMail INI...
- define('MSG_RECAPTCHA_MATCH',132); // reCaptcha verification failed...
-
- define('MSG_AND',133); // "$ITEM1" and "$ITEM2"
- define('MSG_NEXT_PLUS_GOOD',134); // The form specifies both next_form and....
- define('MSG_MULTIFORM',135); // You must set either MULTIFORMDIR or MULTIFORMURL...
- define('MSG_MULTIFORM_FAILED',136); // Failed to process multi-page form template "$NAME"...
- define('MSG_NEED_THIS_FORM',137); // Multi-page forms require "this_form" field...
- define('MSG_NO_PHP_SELF',138); // PHP on the server is not providing "PHP_SELF"
- define('MSG_RETURN_URL_INVALID',139); // Return "$URL" is not valid...
- define('MSG_GO_BACK',140); // Cannot 'go back' if not a multi-page form...
- define('MSG_OPEN_URL',141); // Cannot open URL...
- define('MSG_CANNOT_RETURN',142); // Cannot return to page....
- define('MSG_ATTACK_DETECTED',143); // Server attack detected....
- define('MSG_ATTACK_PAGE',144); // Your form submission....
- define('MSG_ATTACK_MIME_INFO',145); // The field "$FLD" contained...
- define('MSG_ATTACK_DUP_INFO',146); // The fields "$FLD1" and...
- define('MSG_ATTACK_SPEC_INFO',147); // Special field "$FLD"...
- define('MSG_NEED_SCRATCH_PAD',148); // You need to set SCRATCH_PAD...
- define('MSG_MULTI_UPLOAD',149); // File upload processing failed during multi-page form processing.
- define('MSG_OPEN_SCRATCH_PAD',150); // Cannot open directory...
- define('MSG_NO_NEXT_NUM_FILE',151); // You cannot use the %nextnum% feature...
- define('MSG_NEXT_NUM_FILE',152); // Cannot process next number...
- define('MSG_ATTACK_MANYURL_INFO',153); // Field "$FLD"...
- define('MSG_ATTACK_MANYFIELDS_INFO',154); // $NUM fields have URLs....
- define('MSG_REV_CAP',155); // ATTACK_DETECTION_REVERSE_CAPTCHA setting....
- define('MSG_ATTACK_REV_CAP_INFO',156); // The field "$FLD" contained...
- define('MSG_ATTACK_JUNK_INFO',157); // The field "$FLD" contained...
- define('MSG_ARESP_EMPTY',158); // The autoresponse...
- define('MSG_LOG_RECAPTCHA',159); // reCaptcha process failed...
-
- define('MSG_URL_PARSE',160); // URL parse failed
- define('MSG_URL_SCHEME',161); // Unsupported URL scheme...
- define('MSG_SOCKET',162); // Socket error ...
- define('MSG_GETURL_OPEN',163); // Open URL failed: ...
- define('MSG_RESOLVE',164); // Cannot resolve...
-
- define('MSG_FORM_OK',170); // Form Submission Succeeded
- define('MSG_FORM_ERROR',171); // Form Submission Error
- define('MSG_GET_DISALLOWED',172); // GET method has...
- //
- // The following are PHP's file upload error messages
- //
- define('MSG_FILE_UPLOAD_ERR_UNK',180); // Unknown error code.
- define('MSG_FILE_UPLOAD_ERR1',181); // The uploaded file exceeds the upload_max_filesize directive in php.ini.
- define('MSG_FILE_UPLOAD_ERR2',182); // The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the html form.
- define('MSG_FILE_UPLOAD_ERR3',183); // The uploaded file was only partially uploaded.
- define('MSG_FILE_UPLOAD_ERR4',184); // No file was uploaded.
- define('MSG_FILE_UPLOAD_ERR6',186); // Missing a temporary folder.
- define('MSG_FILE_UPLOAD_ERR7',187); // Failed to write file to disk.
- define('MSG_FILE_UPLOAD_ERR8',188); // File upload stopped by extension.
- define('MSG_FILE_UPLOAD_SIZE',189); // Uploaded file "$NAME" is too big...
- // (not a PHP error code - internal maximum file size error)
-
- //
- // following are for derive_fields functions
- //
- define('MSG_DER_FUNC_ERROR',200); // derive_fields: invalid function....
- define('MSG_DER_FUNC_SIZE_FMT',201); // function 'size' requires....
- define('MSG_DER_FUNC_IF_FMT',202); // function 'if' requires....
- define('MSG_DER_FUNC_NEXTNUM_FMT',203); // function 'nextnum' requires....
- define('MSG_DER_FUNC_EXT_FMT',204); // function 'ext' requires....
- define('MSG_DER_FUNC1_FMT',205); // function 'FUNC' requires....
-
- define('MSG_USER_ATTACK_JUNK',220); // The following input ...
- define('MSG_USER_ATTACK_REV_CAP',221); // Your input ...
- define('MSG_USER_ATTACK_DUP',222); // You have ...
- define('MSG_USER_ATTACK_MANY_URLS',223);// Your input ...
- define('MSG_USER_ATTACK_MANY_URL_FIELDS',224);// Your input ...
-
- // <A NAME="MessageNumbers"> Jump to: <A HREF="#BuiltinMessages">
-
- //
- // Return true if using the built-in language
- //
- function IsBuiltInLanguage()
- {
- global $sLangID;
-
- return (strpos($sLangID,"builtin") !== false);
- }
-
- $sSavePath = "";
- $bPathSaved = false;
- //
- // Set include path to include the given directory.
- //
- function AddIncludePath($s_dir = ".")
- {
- global $sSavePath,$bPathSaved;
-
- $s_path = ini_get('include_path');
- $i_path_len = strlen($s_path);
- $s_sep = IsServerWindows() ? ";" : ":"; // get path separator
- //
- // look for it in the include_path
- //
- $b_found = false;
- $i_pos = 0;
- $i_len = strlen($s_dir);
- while (!$b_found && ($i_pos = strpos($s_path,$s_dir,$i_pos)) !== false)
- {
- if ($i_pos == 0)
- {
- if ($i_len == $i_path_len)
- $b_found = true; // the path only has $s_dir
- elseif ($s_path[$i_len] == $s_sep)
- $b_found = true;
- }
- elseif ($s_path[$i_pos-1] == $s_sep &&
- ($i_pos + $i_len == $i_path_len ||
- $s_path[$i_pos + $i_len] == $s_sep))
- $b_found = true;
- if (!$b_found)
- $i_pos++;
- }
- if (!$b_found)
- {
- //
- // allow multiple calls, but only store the original path once
- //
- if (!$bPathSaved)
- $sSavePath = $s_path;
- if (empty($s_path))
- $s_path = $s_dir;
- else
- //
- // prepend the directory
- //
- $s_path = $s_dir.$s_sep.$s_path;
- ini_set('include_path',$s_path);
- $bPathSaved = true;
- }
- }
-
- //
- // Reset the include path after a call to AddIncludePath.
- //
- function ResetIncludePath()
- {
- global $sSavePath,$bPathSaved;
-
- if ($bPathSaved)
- {
- ini_set('include_path',$sSavePath);
- $bPathSaved = false;
- }
- }
-
- //
- // Load a language file
- //
- function LoadLanguageFile()
- {
- global $aMessages,$sLangID,$sHTMLCharSet;
-
- AddIncludePath();
- if (!@include("language.inc.php"))
- @include("language.inc");
- ResetIncludePath();
- if (isset($sHTMLCharSet) && $sHTMLCharSet !== "")
- header("Content-Type: text/html; charset=$sHTMLCharSet");
- }
-
- //
- // Load the messages array from the default language, and then
- // override with an optional language file.
- // Note: all messages get the MNUM parameter sent which they can use.
- // If they don't use it, the message number is appended.
- //
- function LoadBuiltinLanguage()
- {
- global $aMessages,$sLangID;
-
- $sLangID = "English (builtin)";
- // MSG_SCRIPT_VERSION is shown if the PHP version is too old to run
- // FormMail
- // Parameters:
- // $PHPREQ is the minimum required PHP version
- // $PHPVERS is the version the server currently has installed.
- $aMessages[MSG_SCRIPT_VERSION] = 'This script requires at least PHP version '.
- '$PHPREQ. You have PHP version $PHPVERS.';
-
- // MSG_END_VERS_CHK is sent at the end of an Alert message when
- // FormMail detects that there's a newer version available
- // Parameters: none
- $aMessages[MSG_END_VERS_CHK] = '***************************************************\n'.
- 'If you are happy with your current version and want\n'.
- 'to stop these reminders, edit formmail.php and\n'.
- 'set CHECK_FOR_NEW_VERSION to false.\n'.
- '***************************************************\n';
-
- // MSG_VERS_CHK is sent in an Alert message when
- // FormMail detects that there's a newer version available
- // Parameters:
- // $TECTITE the website to go to
- // $FM_VERS the current FormMail version
- // $NEWVERS the new FormMail version that's available
- $aMessages[MSG_VERS_CHK] = 'A later version of FormMail is available from $TECTITE.\n'.
- 'You are currently using version $FM_VERS.\n'.
- 'The new version available is $NEWVERS.\n';
-
- // MSG_CHK_FILE_ERROR is sent in an Alert message when
- // FormMail cannot create a file to record the time of version check.
- // Parameters:
- // $FILE the file name that could not be created
- // $ERROR the actual error message
- $aMessages[MSG_CHK_FILE_ERROR] = 'Unable to create check file "$FILE": $ERROR';
-
- // MSG_UNK_VALUE_SPEC is sent in an Alert message when
- // a form uses an unknown value specification in derive_fields.
- // Parameters:
- // $SPEC the unknown value specification
- // $MSG additional message
- $aMessages[MSG_UNK_VALUE_SPEC] = 'derive_fields: unknown value specification '.
- '"$SPEC"$MSG';
-
- // MSG_INV_VALUE_SPEC is sent in an Alert message when
- // a form uses a value specification in derive_fields that's
- // formatted incorrectly (missing terminating '%')
- // Parameters:
- // $SPEC the invalid value specification
- $aMessages[MSG_INV_VALUE_SPEC] = 'derive_fields: invalid value specification '.
- '"$SPEC" (possibly missing a "%")';
-
- // MSG_DERIVED_INVALID is sent in an Alert message when
- // a form's derive_fields setting has errors
- // Parameters: none
- // A list of errors is appended on separate lines
- $aMessages[MSG_DERIVED_INVALID] = 'Some derive_fields specifications are invalid $MNUM:\n';
-
- // MSG_INT_FORM_ERROR is sent in an Alert message and displayed
- // to the form user
- // Parameters: none
- $aMessages[MSG_INT_FORM_ERROR] = 'Internal form error';
-
- // MSG_OPTIONS_INVALID is sent in an Alert message when
- // a form's options settings are invalid. This applies to
- // mail_options, filter_options, crm_options, and autorespond
- // Parameters:
- // $OPT the name of the options field
- // A list of errors is appended on separate lines
- $aMessages[MSG_OPTIONS_INVALID] = 'Some $OPT settings are undefined $MNUM:\n';
-
- // MSG_PLSWAIT_REDIR is shown to the user for a redirect
- // with JavaScript
- // Parameters: none
- $aMessages[MSG_PLSWAIT_REDIR] = 'Please wait while you are redirected...';
-
- // MSG_IFNOT_REDIR is shown to the user for a redirect
- // with JavaScript
- // Parameters:
- // $URL the URL to redirect to
- $aMessages[MSG_IFNOT_REDIR] = 'If you are not automatically redirected, '.
- 'please <a href="$URL">click here</a>.';
-
- // MSG_PEAR_OBJ is shown to the user if the PEAR Mail object
- // cannot be created
- // Parameters: none
- $aMessages[MSG_PEAR_OBJ] = 'Failed to create PEAR Mail object';
-
- // MSG_PEAR_ERROR is sent in an Alert message if the PEAR Mail processing
- // reports an error
- // Parameters:
- // $MSG the error message from PEAR
- $aMessages[MSG_PEAR_ERROR] = 'PEAR Mail error: $MSG';
-
- // MSG_NO_FOPT_ADDR is sent in an Alert message SendMailFOption is
- // specified in the form and no email address has been provided
- // Parameters: none
- $aMessages[MSG_NO_FOPT_ADDR] = 'You have specified "SendMailFOption" in your '.
- 'form, but there is no email address to use';
-
- // MSG_MORE_INFO is sent in an Alert message on a line by itself, just
- // before extra information about the FormMail processing that may have
- // led to the alert message
- // Parameters: none
- $aMessages[MSG_MORE_INFO] = 'More information:';
-
- // MSG_INFO_STOPPED is sent in an Alert message to say that extra
- // alert information has been suppressed because of potential security
- // problems with showing it.
- // Parameters: none
- $aMessages[MSG_INFO_STOPPED] = '(Extra alert information suppressed for '.
- 'security purposes. $MNUM)';
-
- // MSG_FM_ALERT is sent as the subject li…
Large files files are truncated, but you can click here to view the full file