"; //die(); // allow the user to edit fields in the letter/email based on security level. $var_ReqSecLevelSensitive = 4; // for all $var_ReqSecLevelSimple = 3; // for basic // any lower -> post only. $var_page_type = $_REQUEST['var_selected_app']; $var_PostLetter = $_REQUEST['PostLetter']; $var_PostEmail = $_REQUEST['PostEmail']; $var_Type = $_REQUEST['var_Type']; $var_ID = $_REQUEST['var_ID']; $var_Centre = $_REQUEST['var_Centre']; $var_Phase = $_REQUEST['var_Phase']; $var_Lot = $_REQUEST['var_Lot']; $var_CentreHTML = str_replace(' ','%20',$var_Centre); $var_PhaseHTML = str_replace(' ','%20',$var_Phase); $var_LotHTML = str_replace(' ','%20',$var_Lot); $var_Today = date("F d, Y"); // get name and title for correspondence from tb_Users $sql = "SELECT col_NameForCorrespondence, col_TitleForCorrespondence FROM tb_Users WHERE col_UserID = '$var_User'"; //echo "
".$sql; $result = mysqli_query($dblink,$sql); $myrow = mysqli_fetch_array($result); $var_From_Name = $myrow['col_NameForCorrespondence']; $var_From_Title = $myrow['col_TitleForCorrespondence']; /********************************* END INCLUDES AND CONSTANTS **************************************/ /********************************* BEGIN REQUEST LOOP ***************************************/ // if we have a letter to generate (this is letter step 1) if ($var_PostLetter=="Finalize Letter") { // suppress drawing the editor page. $var_Suppress=1; // get the values from the REQUEST $var_CompanyName = $_REQUEST['var_CompanyName']; $var_CompanyAddr_1 = $_REQUEST['var_CompanyAddr_1']; $var_CompanyAddr_2 = $_REQUEST['var_CompanyAddr_2']; $var_CompanyAddr_3 = $_REQUEST['var_CompanyAddr_3']; $var_CompanyPhone = $_REQUEST['var_CompanyPhone']; $var_CompanyFax = $_REQUEST['var_CompanyFax']; $var_To_Names = $_REQUEST['var_To_Names']; $var_To_Addr_1 = $_REQUEST['var_To_Addr_1']; $var_To_Addr_2 = $_REQUEST['var_To_Addr_2']; $var_To_Addr_3 = $_REQUEST['var_To_Addr_3']; $var_Content = $_REQUEST['var_Content']; $var_Parting = $_REQUEST['var_Parting']; $var_Contact_Name = $_REQUEST['var_Contact_Name']; $var_Contact_Suffix = $_REQUEST['var_Contact_Suffix']; $var_CompletedDate = $_REQUEST['var_CompletedDate']; $var_Vendor = $_REQUEST['var_vendor']; $var_Per_Section = $_REQUEST['per_section']; $var_cc_String = $_REQUEST['cc_String']; $var_RegisteredMail = $_REQUEST['registeredmail']; $var_RegularMail = $_REQUEST['regularmail']; $var_RegisteredMail_Instructions = $_REQUEST['regmail_inst']; // for formatting the contents of the textarea. $arr_Content_by_Line = array(); $arr_Content_by_Line = explode("\n", $var_Content); // button for accept, spawns a print dialog. echo "
"; // need these variables to push a completion into the database. echo " "; // draw the letter for printing. if ($var_RegisteredMail_Instructions) { echo "
$var_RegisteredMail_Instructions
"; } echo "
"; if ($var_RegisteredMail_Instructions) { echo "
 
"; } for($i=0; $i<$var_LinesToSkipInCorrespondence; $i++) { echo "
 
"; } echo "
$var_CompanyName
$var_CompanyAddr_1
$var_CompanyAddr_2
$var_CompanyAddr_3
$var_CompanyPhone
$var_CompanyFax

$var_Today

$var_To_Names
$var_To_Addr_1
$var_To_Addr_2
$var_To_Addr_3
"; // echo "registered is $var_RegisteredMail regular is $var_RegularMail"; if ($var_RegisteredMail=='Yes') echo "** SENT VIA REGISTERED MAIL **"; elseif ($var_RegularMail=='Yes') echo "** SENT VIA REGULAR MAIL **"; echo "
$var_To_Names
"; // textareas use legacy newlines, php uses html. // to solve this quandry, we've broken the text into an array // split on newlines. So for each line, write it, then use
where there was // a \n. foreach($arr_Content_by_Line as $Line) { echo $Line; echo "
"; } echo "
$var_Parting



"; if ($var_Contact_Name) { echo "
$var_Contact_Name
"; } if ($var_Contact_Suffix) { echo "
$var_Contact_Suffix
"; } if ($var_Vendor) { echo "
$var_Vendor
"; } elseif ($var_CompanyName) { echo "
$var_CompanyName
"; } echo "
"; if ($var_Per_Section=="show") { echo "
Per:
$LoggedInUser

$var_cc_String
"; } echo "
"; } // if we have a letter to print (this is letter step 2) if ($var_PostLetter=="Print Letter") { // pipe the data to the create pdf page. echo ""; } // if we have an email to send (NOT VALIDATING) if ($var_PostEmail=='Send Email' && $var_Type!='Validate Email') { // echo "in !Type

"; $var_From_Email = $_REQUEST['var_email_From']; $var_To_Email = $_REQUEST['var_email_To']; $var_Subject = $_REQUEST['var_Subject']; $var_Body = $_REQUEST['var_Content']; $GetCurrentUserEmail_sql = " SELECT tb_Users.col_EmailAddress, tb_Users.col_UsersName, tb_UsersSendMailCC.col_BSTSendMailEmailAddressCCYN FROM tb_Users LEFT JOIN tb_UsersSendMailCC ON tb_Users.col_UserID = tb_UsersSendMailCC.col_UserID WHERE tb_Users.col_UserID = '$var_User'"; //echo "
".$GetCurrentUserEmail_sql; $GetCurrentUserEmail_myrow = mysqli_fetch_array(mysqli_query($dblink,$GetCurrentUserEmail_sql)); $var_BSTSendMailEmailAddressCCYN = $GetCurrentUserEmail_myrow['col_BSTSendMailEmailAddressCCYN ']; $var_UserEmail = $GetCurrentUserEmail_myrow['col_EmailAddress']; $var_UserName = $GetCurrentUserEmail_myrow['col_UsersName']; if ($var_BSTSendMailEmailAddressCCYN=="Yes") { //send a copy to the user $var_CC = $var_UserEmail; $var_CCName = ""; } else { $var_CC = ""; $var_CCName = ""; } //echo "
Letter:$var_CC:$var_BSTSendMailEmailAddressCCYN:"; //echo "
Please contact Builder Software Tools at 1-877-788-9988 or support@BuildersIT.com"; //die(); $var_CompletedDate = date("Y-m-d"); // keep the smtp server happy $Body = str_replace("\n.","\n..",$Body); // mail returns a boolean so lets use it to decide success/failure. //$var_Push = SendMailVince($var_From_Email,'',$var_To_Email,'',$var_Subject,$var_Body,'',''); // $From,$FromName,$To,$ToName,$Cc,$CcName,$Subject,$Text,$Html,$AttmFiles $var_Push = SendMailBST($var_From_Email,'',$var_To_Email,'',$var_CC,$var_CCName,$var_Subject,'',$var_Body,NULL); // if our mail went out, update the database. if ($var_Push) { // get the ContactAutoID for the record we're about to modify. // we only want the last row of data. $sql = "SELECT col_ContactAutoID FROM tb_Contact WHERE col_Centre = '$var_Centre' AND col_Phase = '$var_Phase' AND col_Lot = '$var_Lot' AND col_Type = '$var_Type' AND col_Method = '$var_Method' ORDER BY col_ContactAutoID DESC LIMIT 1"; //echo "
".$sql; if ($result = mysqli_query($dblink,$sql)) { $myrow = mysqli_fetch_array($result); $var_ContactAutoID = $myrow['col_ContactAutoID']; } // push completion to database. $push_sql= " UPDATE tb_Contact SET col_Status = 'Completed On', col_CompletedOn = '$var_CompletedDate' WHERE col_ContactAutoID = '$var_ContactAutoID'"; //echo "
".$sql; $result = mysqli_query($dblink,$push_sql); if (!$result) { echo "Failed to update Contact Completed On"; } else { //if everything has gone smoothly, close the page. //$SitePath = $HttpsPath.$WwwPath.$SiteFolder.$AppsFolder; echo ""; } } // otherwise, tell the user about it and leave the db alone. else { echo "

send failed
"; } $var_Suppress = 1; } // if we have an email address to validate if ($var_PostEmail=='Send Email' && $var_Type=='Validate Email') { // get the variables $var_ICameFrom = $_REQUEST['var_ICameFrom']; $var_From_Email = $_REQUEST['var_email_From']; $var_To_Email = $_REQUEST['var_email_To']; $var_Subject = $_REQUEST['var_Subject']; $var_Body = $_REQUEST['var_Content']; $var_Centre = $_REQUEST['var_Centre']; $var_Phase = $_REQUEST['var_Phase']; $var_Lot = $_REQUEST['var_Lot']; $var_CentreHTML = str_replace(' ','%20',$var_Centre); $var_PhaseHTML = str_replace(' ','%20',$var_Phase); $var_LotHTML = str_replace(' ','%20',$var_Lot); $GetCurrentUserEmail_sql = " SELECT tb_Users.col_EmailAddress, tb_Users.col_UsersName, tb_UsersSendMailCC.col_BSTValidateEmailAddressCCYN FROM tb_Users LEFT JOIN tb_UsersSendMailCC ON tb_Users.col_UserID = tb_UsersSendMailCC.col_UserID WHERE tb_Users.col_UserID = '$var_User'"; //echo "
".$GetCurrentUserEmail_sql; $GetCurrentUserEmail_myrow = mysqli_fetch_array(mysqli_query($dblink,$GetCurrentUserEmail_sql)); $var_BSTValidateEmailAddressCCYN = $GetCurrentUserEmail_myrow['col_BSTValidateEmailAddressCCYN']; $var_UserEmail = $GetCurrentUserEmail_myrow['col_EmailAddress']; $var_UserName = $GetCurrentUserEmail_myrow['col_UsersName']; if ($var_BSTValidateEmailAddressCCYN=="Yes") { //send a copy to the user $var_CC = $var_UserEmail; $var_CCName = ""; } else { $var_CC = ""; $var_CCName = ""; } //echo "
:$var_CC:$var_BSTValidateEmailAddressCCYN:"; //die(); // echo $var_Body; // echo "

called with from: $var_From_Email,'',$var_To_Email,'',$var_Subject,'',$var_Body,''"; // $From,$FromName,$To,$ToName,$Subject,$Text,$Html,$AttmFiles //$Success = SendMailVince($var_From_Email,'',$var_To_Email,'',$var_Subject, '',$var_Body,''); // $From,$FromName,$To,$ToName,$Cc,$CcName,$Subject,$Text,$Html,$AttmFiles $Success = SendMailBST($var_From_Email,'',$var_To_Email,'',$var_CC,$var_CCName,$var_Subject,'',$var_Body,NULL); // if email went off, push record to database if ($Success) { $var_Date = date("Y-m-d"); $var_Time = date("H:i:s"); // get the latest entry for this id $sql = "SELECT col_SentItemID FROM tb_SentItem WHERE col_ID = '$var_ID' AND col_Type = 'Email Confirm' AND col_SentTo = '$var_To_Email' ORDER BY col_SentItemID DESC LIMIT 1"; //echo "
".$sql; $result = mysqli_query($dblink,$sql); $myrow = mysqli_fetch_array($result); $var_SentItemID = $myrow['col_SentItemID']; $sql = "UPDATE tb_SentItem SET col_SentTo = '$var_To_Email', col_SentFrom = '$LoggedInUser', col_Type = 'Email Confirm', col_PostDate = '$var_Date', col_PostTime = '$var_Time' WHERE col_SentItemID = $var_SentItemID"; //echo "
".$sql; mysqli_query($dblink,$sql); } else { echo "send failed"; } // then send the user back to the referring page. Now that we're spanning directories // we need to reform the ICameFrom variable. if ($var_ICameFrom=="AEContact.php") { $var_ICameFrom = "../_gen/AEContact.php"; } elseif ($var_ICameFrom=="HSPurchaserInfo.php") { $var_ICameFrom = "../_gen/HSPurchaserInfo.php"; } echo ""; $var_Suppress = 1; } /********************************* END REQUEST LOOP *****************************************/ /********************************* BEGIN MAIN CODEBLOCK *************************************/ $var_Comms_Method = $_REQUEST['var_Method']; $var_Comms_Type = $_REQUEST['var_Type']; $var_Centre = $_REQUEST['var_Centre']; $var_Phase = $_REQUEST['var_Phase']; $var_Lot = $_REQUEST['var_Lot']; $var_CompletedDate = $_REQUEST['var_CompletedDate']; $var_ICameFrom = $_REQUEST['var_ICameFrom']; // echo "Comms type is $var_Comms_Type"; // echo "site path is $PathToFiles"; // get the security level and email address for this user. $sql = "SELECT col_AccessLevelCorrespondence, col_EmailAddress FROM tb_Users WHERE col_UserID = '$var_User'"; //echo "
sql ".$sql; $result = mysqli_query($dblink,$sql); $myrow = mysqli_fetch_array($result); $var_UserSecLevel = $myrow['col_AccessLevelCorrespondence']; $var_UserEmail = $myrow['col_EmailAddress']; // include the verbiage file. // get the filenames. // echo "path to files is: $PathToFiles
"; if ($var_Comms_Type=='validate_Email') $var_Comms_Type = "Validate Email"; //explode request to remove :1 :n if (!empty($var_Comms_Type)) { $arr_Parts = explode(':',$var_Comms_Type); $var_RequestPart1 = rtrim($arr_Parts[0]); $var_RequestPart2 = $arr_Parts[1]; } //now get filename from tb_AdminCorrespondence $sql = "SELECT col_FileName FROM tb_AdminCorrespondence WHERE col_Name = '$var_RequestPart1'"; //echo "
".$sql; $myrow = mysqli_fetch_array(mysqli_query($dblink,$sql)); $var_Filename = $myrow['col_FileName']; //echo "
request1 $var_RequestPart1"; //echo "
file $var_Filename"; //echo "
path $PathToFiles"; //echo "
prefix $var_BuilderPrefix"; //echo "
apps $PathToApps"; //echo "
"; //die(); //use builderforms if (file_exists($PathToFiles.'/data/builderforms/'.$var_BuilderPrefix.$var_Filename)) $var_UseThisFile = $PathToFiles.'/data/builderforms/'.$var_BuilderPrefix.$var_Filename; else $var_UseThisFile = $PathToFiles.'/apps/_forms/'.$var_Filename; // ensure file exists, tell user if not. if ($var_Filename && file_exists($var_UseThisFile)) { echo "usefile ".$var_UseThisFile; include $var_UseThisFile; } else { echo $var_UseThisFile; echo "
File does not exist. Please contact Builder Software Tools at 1-877-788-9988 or support@BuildersIT.com"; $var_Suppress=1; } // if we're not rendering the page on a $_REQUEST if (!$var_Suppress) { $var_quote = "'"; $var_PersonTypes = "'Contact','Assignee','Purchaser'"; //$last_Type = ""; //echo "
names: 0 $var_Names 1 $var_Name1 2 $var_Name2 x"; if (!$var_Names && !$var_Name1) { $var_BR = ""; $var_Names = ""; $var_Name1 = ""; $var_Name2 = ""; $sqlp1 = " SELECT tb_Person.col_PersonID, tb_Person.col_Type, tb_Person.col_Name FROM tb_Person LEFT JOIN tb_Lists ON tb_Lists.col_Value = tb_Person.col_Type AND tb_Lists.col_VariableName = 'PersonType' WHERE tb_Person.col_ID = '$var_ID' AND tb_Person.col_Type IN ($var_PersonTypes) ORDER BY tb_Lists.col_ValueOrder, tb_Person.col_PurchaserNumber, tb_Person.col_PersonID"; //echo "
".$sqlp1; $resultp1 = mysqli_query($dblink,$sqlp1); while ($myrowp1 = mysqli_fetch_array($resultp1)) { $var_Name = $myrowp1['col_Name']; $var_Type = $myrowp1['col_Type']; $var_Name = str_replace("’", $var_quote, $var_Name); $var_Name = str_replace("'", $var_quote, $var_Name); if ($last_Type && $last_Type!=$var_Type) break; if ($var_Name) { $var_Names .= $var_BR.$var_Name; $var_BR = ', '; } $last_Type = $var_Type; } } // closes $var_Names //if (!$var_Names) // $var_Names = Str_Generate_Names($var_Name1, $var_Name2); if (!$var_To_Address1) { $sqlp2 = " SELECT tb_Person.col_PersonID, tb_Person.col_Address, tb_Person.col_Apartment, tb_Person.col_City, tb_Person.col_Province, tb_Person.col_Postal FROM tb_Person LEFT JOIN tb_Lists ON tb_Lists.col_Value = tb_Person.col_Type AND tb_Lists.col_VariableName = 'PersonType' WHERE tb_Person.col_ID = '$var_ID' AND tb_Person.col_Type IN ($var_PersonTypes) ORDER BY tb_Lists.col_ValueOrder, col_PurchaserNumber, col_PersonID"; //echo "
".$sqlp2; $resultp2 = mysqli_query($dblink,$sqlp2); while ($myrowp2 = mysqli_fetch_array($resultp2)) { if (!$var_To_Address1) { //not used in email letter $var_To_Address1 = $myrowp2['col_Address']; $var_To_Apartment = $myrowp2['col_Apartment']; $var_To_City = $myrowp2['col_City']; $var_To_Province = $myrowp2['col_Province']; $var_To_PostalCode = $myrowp2['col_Postal']; $var_To_Address1 = str_replace("’", $var_quote, $var_To_Address1); $var_To_Address1 = str_replace("'", $var_quote, $var_To_Address1); $var_To_City = str_replace("’", $var_quote, $var_To_City); $var_To_City = str_replace("'", $var_quote, $var_To_City); $var_To_Province = str_replace("’", $var_quote, $var_To_Province); $var_To_Province = str_replace("'", $var_quote, $var_To_Province); } if ($var_To_Address1) break; } $var_To_Address1 = $var_To_Apartment ? $var_To_Address1." Apt: ".$var_To_Apartment : $var_To_Address1; $var_To_Address2 = $var_To_Province ? $var_To_City.", ".$var_To_Province : $var_To_City; $var_To_Address3 = strtoupper($var_To_PostalCode); } // closes $var_To_Address1 // check we have the vendor if (!$var_Vendor) { // get the vendor name $sql = "SELECT col_Project FROM tb_Phase WHERE col_Centre = '$var_Centre' AND col_Phase = '$var_Phase'"; //echo "
".$sql; $myrow = mysqli_fetch_array(mysqli_query($dblink,$sql)); $var_Vendor = $myrow['col_Project']; $var_Vendor = str_replace("’", $var_quote, $var_Vendor); $var_Vendor = str_replace("'", $var_quote, $var_Vendor); } // if we're being asked to render a letter if ($var_Comms_Method == "Letter") { echo "
"; // get date and time $var_TodayYMD = date("Y-m-d"); $var_TimeHHmm = date("H:i"); $sql = " INSERT INTO tb_SentItem (col_PostDate, col_PostTime, col_SentTo, col_SentFrom, col_UserName, col_ID, col_Centre, col_Phase, col_Lot, col_Type ) VALUES ('$var_TodayYMD', '$var_TimeHHmm', '$var_Names', '$var_From_Name', '$LoggedInUser', '$var_ID', '$var_Centre', '$var_Phase', '$var_Lot', 'Contact Letter')"; //echo "
".$sql; mysqli_query($dblink,$sql); $var_ValidateEmailSentItemID = mysqli_insert_id($dblink); //echo "

validate email inserted: $var_ValidateEmailSentItemID

"; // send the user to the pdf -- we no longer show the finalize screen. echo ""; } // closes if letter // if we're being asked to render an email if ($var_Comms_Method=="E-Mail" && $var_Comms_Type!="Validate Email") { if (!$var_To_Email) { $sqlpe = " SELECT tb_Person.col_Email FROM tb_Person LEFT JOIN tb_Lists ON tb_Lists.col_Value = tb_Person.col_Type AND tb_Lists.col_VariableName = 'PersonType' WHERE tb_Person.col_ID = '$var_ID' AND tb_Person.col_Type IN ($var_PersonTypes) ORDER BY tb_Lists.col_ValueOrder, col_PurchaserNumber, col_PersonID"; //echo "
".$sqlpe; if ($result = mysqli_query($dblink,$sqlpe)) { // returns a single row $myrow = mysqli_fetch_array($result); $var_To_Email = $myrow['col_Email']; } } // render the email screen. // at this point, we need to create a pdf and attach it to the email, this is the letter proper. // AND in both cases (letter or email) we need to hang on to a copy of the letter somewhere. // Talk to Vince to flesh this out. echo "
"; // get date and time $var_TodayYMD = date("Y-m-d"); $var_TimeHHmm = date("H:i"); $sql = " INSERT INTO tb_SentItem (col_PostDate, col_PostTime, col_Email, col_SentTo, col_SentFrom, col_UserName, col_ID, col_Centre, col_Phase, col_Lot, col_Type ) VALUES ('$var_TodayYMD', '$var_TimeHHmm', '$var_To_Email', '$var_Names', '$var_From_Name', '$LoggedInUser', '$var_ID', '$var_Centre', '$var_Phase', '$var_Lot', 'Contact Email')"; //echo "
".$sql; mysqli_query($dblink,$sql); $var_ValidateEmailSentItemID = mysqli_insert_id($dblink); //echo "

validate email inserted: $var_ValidateEmailSentItemID

"; // send the user to the pdf -- we no longer show the finalize screen. echo ""; } // if we're verifying an email address if ($var_Comms_Type == "Validate Email") { // for selecting between body strings. Logic is in the ValidateEmail.php file. $var_Supplemental_Type = $_REQUEST['var_supplemental_type']; $var_To_Email = $_REQUEST['var_email_Address']; // echo "


Supplemental_type is $var_Supplemental_Type

"; $var_From_Email = $ThisCompanyEmail; // push the attempt into the database. //query to see if record already sent $var_ValidateEmailSentItemID = 0; $sql_Querry = " SELECT col_SentItemID FROM tb_SentItem WHERE col_ID = '$var_ID' AND col_Type = 'Email Confirm' AND col_SentTo = '$var_To_Email' ORDER BY col_SentItemID DESC LIMIT 1"; //echo "
".$sql_Querry; $result = mysqli_query($dblink,$sql_Querry); $rows = mysqli_num_rows($result); if (!$rows) { $sql = " INSERT INTO tb_SentItem (col_ID, col_Type, col_SentFrom, col_SentTo) VALUES ('$var_ID', 'Email Confirm', '$LoggedInUser', '$var_To_Email')"; //echo "
".$sql; mysqli_query($dblink,$sql); $var_ValidateEmailSentItemID = mysqli_insert_id($dblink); //echo "

validate email inserted: $var_ValidateEmailSentItemID

"; } else { $myrow = mysqli_fetch_array($result); $var_ValidateEmailSentItemID = $myrow['col_SentItemID']; //echo "

validate email exists: $var_ValidateEmailSentItemID

"; } // including the file here rather than above to avoid a concurrency problem. include $var_UseThisFile; //echo "
Validate Email Use This File ".$var_UseThisFile; // generate the email for show. $var_Subject = "Email from $ThisCompanyName"; // default cases for editable fields (default is no access) // this prevents unintended privilege-escalation $var_Edit_Simple = "readonly"; $var_Edit_Sensitive = "readonly"; $var_Style_Sensitive = "style='border:none; text-align:left; float:left;'"; $var_Style_Simple = "style='border:none; text-align:left; float:left;'"; // super-user has security level 4< in tb_Users. // simple-user has security level 3 in tb_Users. // for super-user if ($var_UserSecLevel >= $var_ReqSecLevelSensitive) { $var_Edit_Simple = ""; $var_Edit_Sensitive = ""; $var_Style_Sensitive = "style='border:1px solid #ccc; text-align:left; float:left;'"; $var_Style_Simple = "style='border:1px solid #ccc; text-align:left; float:left;'"; } // for simple user elseif ($var_UserSecLevel >= $var_ReqSecLevelSimple) { $var_Edit_Simple = ""; $var_Style_Simple = "style='border:1px solid #ccc; text-align:left; float:left;'"; } //echo "
sec".$var_UserSecLevel; // render the email screen. echo "
From:
To:
"; // show the CC field to the super-user if ($var_UserSecLevel >= $var_ReqSecLevelSensitive) { echo "
CC:
"; } echo "
Subject:
"; echo ""; echo "
"; if ($var_UserSecLevel >= $var_ReqSecLevelSensitive) { // allow super-user to edit the raw html for the message. echo ""; } else { echo "
$var_Body
"; } echo "
"; echo "
 
"; } } // closes if !suppress. /********************************* END MAIN CODEBLOCK ***************************************/ ?>