// This code is copyrighted material owned by W. D. Bricker, doing business
// as US-Webmasters.com. Copyright 1998-2009 - All rights reserved.
//
// A single license for this code has been granted to
// US-Webmasters.com
//
// for use on site(s):
// US-Webmasters.com and related sites
//
// No other rights are implied nor shall be inferred. This code may
// not be altered, copied or distributed without express permission.
// Violation of these rights will necessitate legal remedial action.
// To get rid of "the Undefined variable: DOCUMENT_ROOT" error:
// The Root Directory:
// This worked in PHP4:
// $RootDir = $RootDir;
// This works in PHP5:
$RootDir = $_SERVER['DOCUMENT_ROOT'];
// $RootDir = $RootDir."/testing";
// Echo "DOCUMENT_ROOT: ".$RootDir."
\n";
// Echo "RootDir: ".$RootDir."
\n";
// We'll need access to the Global Variables:
// include_once("$DOCUMENT_ROOT/include/GlobalVars.php");
// To get rid of: Warning: include_once() [function.include-once]: Unable to access /include/GlobalVars.php in
include_once("$RootDir/include/GlobalVars.php");
// We will be accessing all sorts of functions:
//include_once("$DOCUMENT_ROOT/include/Functs.php");
include_once("$RootDir/include/Functs.php");
// Check to see if the visitor (USER_AGENT) is a spider. If not:
// then do a "session_start"...
// Creates a session or resumes the current one
// based on the current session id that's being passed via a
// request, such as GET, POST, or a COOKIE.
// It's necessary that this be the first PHP command in the file.
If (!ItsASpider())
{
session_start();
// Sets various session variables like ReferringURL and EntryURL
// if they haven't already been set
//include_once("$DOCUMENT_ROOT/include/SetSessionVars.php");
include_once("$RootDir/include/SetSessionVars.php");
}
// This turns on Output Buffering. This seems to be
// necessary because we may be redirecting to a "Thank You" page
// after they submit the form. Speeds things up because
// browser doesn't reload when hitting BACK button.
ob_start();
// PageNameStr - This is the dominant keyword phrase for the page.
// Goes in comments, header bars, IMAGE ALT tags, etc. Only about 10 words!
$PageNameStr="URL Decoder - Decodes Encoded URLs";
// This is the first line string. It goes at the very top of the page.
// If this is NOT a doorway page, then set the $PageFirstLineStr:
// Notice: Undefined variable: ThisIsDoorway
// IF (!($ThisIsDoorway))
// If not set, then set it to get rid of error message:
If (!IsSet($ThisIsDoorway))
{$ThisIsDoorway=0;}
If ($ThisIsDoorway<>1)
{$PageFirstLineStr="URL Decoder - Online Utility to Decode Encoded URLs - Unspoof Spoofed URLs - Link Maker - Online Tool";}
// This is the first text after the first line,
// that usually shows up in the upper left corner
$PageFirstTextStr="${CompanyStr}
FreeBSD make install dies";
// This is the second text after the first line,
// that usually shows up in the upper right corner
$PageSecondTextStr="${CompanyDomain}
'make install on FreeBSD fails";
$PageTitleStr=$PageFirstLineStr;
$PageKeywordStr=$PageNameStr;
$PageCommentStr="Decode Encoded URLs. Determine True Host URL. Tool to Unspoof spoofed URLS: Link Maker - Online Utility.";
// $PageDescriptionStr="";
// $PageRobotsStr="";
// If this is NOT a doorway page, then include header.php:
// Notice: Undefined variable: ThisIsDoorway
// IF (!($ThisIsDoorway))
// If not set, then set it to get rid of error message:
If (!IsSet($ThisIsDoorway))
{$ThisIsDoorway=0;}
If ($ThisIsDoorway<>1)
{include_once("$RootDir/include/header-brief.php"); }
// XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
// The variables that probably need to be changed are listed *BELOW*.
//
// This is the FormName. It will be part of the subject line of
// the resulting email.
$FormName = "TestEmailForm - Sales Lead";
// This should be the domain name that we are working with.
// $ThisDomainName = $CompanyDomainStr;
$ThisDomainName = "US-Webmasters.com";
// $SendEmailTo: the email address that you want to have
// the information sent to. It is of the form: Joe@JoesDomain.com
// $recipient = "Dinky@A7H.com";
$SendEmailTo = "Dinky@A7H.com";
// Bcc emails: If you want these addresses to also be
// sent this information. Separate items with commas ","
// $Bcc = "BCC@US-Webmasters.com, xyz2041@GMX.net, InfoSubmit@GMX.net, WebDesignResume@GMX.net, xyz@NetINS.net";
// Once we have sent the email, this is the place we
// want the browser to go to:
// $Redirect = "http://www.US-Webmasters.com/Thank-You";
$Redirect = "";
// Note well: It is advisable to include as many variations
// of the domain as possible in the input array:
// $RefAry = array("www.US-Webmasters.com", "US-Webmasters.com", "209.152.117.178");
// as opposed to:
// $RefAry = array("US-Webmasters.com");
$RefAry = array("www.US-Webmasters.com", "US-Webmasters.com", "209.152.117.178");
// NOTE! the above ^^^^^ may not be necessary since most of this
// code will not be exposed to the public!!!!!!!!!!!!
// $BannedEmailList: email addresses that are blocked from sending using this PHP
// form.
$BannedEmailList = array("*@somedomain.com", "user@banned.com", "etc@domains.com");
// The variables that probably need to be changed are listed *ABOVE* ^^^^^.
// XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
// Functions Necessary for this form:
///////////////////////////////////////////////////////
function FieldsErrorCheck(&$ErrMsgArray, &$FieldErrArray)
{
// Return 0 if no errors and 1 if there are errors
// Global variables:
global $FirstName, $LastName, $EncodedURL, $BannedEmailList;
// OLD!!!! global $FirstName, $LastName, $WeightKg, $HeightMt, $EncodedURL, $HeightError, $WeightError, $EmailErrStr;
// Define the Error Message Array: $ErrMsgArray
// This contains all of the error messages.
// Different fields *COULD* have more than one error.
// The format of a field is something like:
// $ErrMsgArray[] = "There is something wrong with the ZIP CODE.";
$ErrMsgArray = array();
// Define the Field Error Array: $FieldErrArray
// This array contains a boolean variable for
// each POST variable. The format of this field
// is something like:
// $FieldErrArray["ZipCode"] = 1;
$FieldErrArray = array();
// Initialize the flags
$ErrorsPresent = 1;
$NoErrors = 0;
If (!$EncodedURL)
{
$ErrMsgArray[] = "Please enter your URL to be decoded.";
$FieldErrArray["EncodedURL"] = 1;
}
// How many errors?
$ErrorCount = count($ErrMsgArray);
// If there are errors, then return true, otherwise false
return ($ErrorCount) ? $ErrorsPresent : $NoErrors;
} // End: function FieldsErrorCheck(&$ErrMsgArray)
///////////////////////////////////////////////////////
?>