Code:
function replace_email_template_variables($body_text) {
// This function will replace the variables in the Body text for the email... uses several global variables.
global $Today;
global $First_Name;
global $Last_Name;
global $Phone;
global $Email;
global $DriverLicenseFrom;
global $Age_Group;
global $Flight;
global $Cruise;
global $Credit_Card;
global $Best_Price_Net;
global $Best_Price_Full;
global $New_Pick_Date;
global $N_Pick_Time;
global $Pick_Location;
global $Pick_AP;
global $New_Drop_Date;
global $N_Drop_Time;
global $Drop_Location;
global $Drop_AP;
global $Car_Class;
global $Days_Num;
global $country;
global $agencyname;
global $employee;
$body_text = eregi_replace('%Today%', $Today, $body_text);
$body_text = eregi_replace('%First_Name%', $First_Name, $body_text);
$body_text = eregi_replace('%Last_Name%', $Last_Name, $body_text);
$body_text = eregi_replace('%Phone%', $Phone, $body_text);
$body_text = eregi_replace('%Email%', $Email, $body_text);
$body_text = eregi_replace('%DriverLicenseFrom%', $DriverLicenseFrom, $body_text);
$body_text = eregi_replace('%Age_Group%', $Age_Group, $body_text);
$body_text = eregi_replace('%Flight%', $Flight, $body_text);
$body_text = eregi_replace('%Cruise%', $Cruise, $body_text);
$body_text = eregi_replace('%Credit_Card%', $Credit_Card, $body_text);
$body_text = eregi_replace('%Best_Price_Net%', $Best_Price_Net, $body_text);
$body_text = eregi_replace('%Best_Price_Full%', $Best_Price_Full, $body_text);
$body_text = eregi_replace('%New_Pick_Date%', $New_Pick_Date, $body_text);
$body_text = eregi_replace('%N_Pick_Time%', $N_Pick_Time, $body_text);
$body_text = eregi_replace('%Pick_Location%', $Pick_Location, $body_text);
$body_text = eregi_replace('%Pick_AP%', $Pick_AP, $body_text);
$body_text = eregi_replace('%New_Drop_Date%', $New_Drop_Date, $body_text);
$body_text = eregi_replace('%N_Drop_Time%', $N_Drop_Time, $body_text);
$body_text = eregi_replace('%Drop_Location%', $Drop_Location, $body_text);
$body_text = eregi_replace('%Drop_AP%', $Drop_AP, $body_text);
$body_text = eregi_replace('%Car_Class%', $Car_Class, $body_text);
$body_text = eregi_replace('%Days_Num%', $Days_Num, $body_text);
$body_text = eregi_replace('%country%', $country, $body_text);
$body_text = eregi_replace('%Employee%', $employee, $body_text);
return ($body_text);
}
Further down there is this:
Bookmarks