Jason:
Below is my page, show me my deletions required to rebuild, and I will keep it going forward.
My secondary concern is the require_once files that Universal Email puts in the primary page. Are these members that Webassist builds in the email folder reusable as-is, or are they rebuilt new on each UE add into the page ? ? What happens to these files if I delete the code in the page below, do I also have to delete them along with the code below ? Thanks a lot...
<?php require_once("../webassist/email/verify_email_address.php"); ?>
<?php require_once("../webassist/email/mail_php.php"); ?>
<?php require_once("../webassist/email/mailformatting_php.php"); ?>
<?php
if (!isset($_SESSION))session_start();
if ((isset($_POST["word_btn"]))) {
//WA Universal Email object="mail"
set_time_limit(0);
$EmailRef = "waue_word_format_1";
$BurstSize = 200;
$BurstTime = 1;
$WaitTime = 1;
$GoToPage = "thank_you.php";
$RecipArray = array();
$StartBurst = time();
$LoopCount = 0;
$TotalEmails = 0;
$RecipIndex = 0;
// build up recipients array
$CurIndex = sizeof($RecipArray);
$RecipArray[$CurIndex] = array();
$RecipArray[$CurIndex ][] = "".((isset($_POST["email"]))?$_POST["email"]:"") ."";
$TotalEmails += sizeof($RecipArray[$CurIndex]);
$RealWait = ($WaitTime<0.25)?0.25:($WaitTime+0.1);
$TimeTracker = Array();
$TotalBursts = floor($TotalEmails/$BurstSize);
$AfterBursts = $TotalEmails % $BurstSize;
$TimeRemaining = ($TotalBursts * $BurstTime) + ($AfterBursts*$RealWait);
if ($TimeRemaining < ($TotalEmails*$RealWait) ) {
$TimeRemaining = $TotalEmails*$RealWait;
}
$_SESSION[$EmailRef."_Total"] = $TotalEmails;
$_SESSION[$EmailRef."_Index"] = 0;
$_SESSION[$EmailRef."_Remaining"] = $TimeRemaining;
while ($RecipIndex < sizeof($RecipArray)) {
$EnteredValue = is_string($RecipArray[$RecipIndex][0]);
$CurIndex = 0;
while (($EnteredValue && $CurIndex < sizeof($RecipArray[$RecipIndex])) || (!$EnteredValue && $RecipArray[$RecipIndex][0])) {
$starttime = microtime_float();
if ($EnteredValue) {
$RecipientEmail = $RecipArray[$RecipIndex][$CurIndex];
} else {
$RecipientEmail = $RecipArray[$RecipIndex][0][$RecipArray[$RecipIndex][2]];
}
$EmailsRemaining = ($TotalEmails- $LoopCount);
$BurstsRemaining = ceil(($EmailsRemaining-$AfterBursts)/$BurstSize);
$IntoBurst = ($EmailsRemaining-$AfterBursts) % $BurstSize;
if ($AfterBursts<$EmailsRemaining) $IntoBurst = 0;
$TimeRemaining = ($BurstsRemaining * $BurstTime * 60) + ((($AfterBursts<$EmailsRemaining)?$AfterBursts:$EmailsRemaining)*$RealWait) - (($AfterBursts>$EmailsRemaining)?0:($IntoBurst*$RealWait));
if ($TimeRemaining < ($EmailsRemaining*$RealWait) ) {
$TimeRemaining = $EmailsRemaining*$RealWait;
}
$CurIndex ++;
$LoopCount ++;
session_commit();
session_start();
$_SESSION[$EmailRef."_Index"] = $LoopCount;
$_SESSION[$EmailRef."_Remaining"] = round($TimeRemaining);
session_commit();
wa_sleep($WaitTime);
include("../webassist/email/waue_word_format_1.php");
$endtime = microtime_float();
$TimeTracker[] =$endtime - $starttime;
$RealWait = array_sum($TimeTracker)/sizeof($TimeTracker);
if ($LoopCount % $BurstSize == 0 && $CurIndex < sizeof($RecipArray[$RecipIndex])) {
$TimePassed = (time() - $StartBurst);
if ($TimePassed < ($BurstTime*60)) {
$WaitBurst = ($BurstTime*60) -$TimePassed;
wa_sleep($WaitBurst);
}
else {
$TimeRemaining = ($TotalEmails- $LoopCount)*$RealWait;
}
$StartBurst = time();
}
if (!$EnteredValue) {
$RecipArray[$RecipIndex][0] = mysql_fetch_assoc($RecipArray[$RecipIndex][1]);
}
}
$RecipIndex ++;
}
$_SESSION[$EmailRef."_Total"] = 0;
$_SESSION[$EmailRef."_Index"] = 0;
$_SESSION[$EmailRef."_Remaining"] = 0;
session_commit();
session_start();
if ($GoToPage!="") {
header("Location: ".$GoToPage);
}
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head profile="http://gmpg.org/xfn/11">
<title>Mike's Work Profile - Send Word Resume Page</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" href="word_format.css" type="text/css" media="all" />
<style type="text/css">
body {
background-color: #192f7c;
font-weight: bold;
}
.TechieEmailResumeButton {
padding-top: 10px;
padding-right: 20px;
padding-bottom: 10px;
padding-left: 20px;
background-image: -moz-linear-gradient(top, #FF66CC, #bc312e);
background-image: -o-linear-gradient(top, #FF66CC, #bc312e);
background-image: -webkit-linear-gradient(#FF66CC, #bc312e);
background-image: -webkit-gradient(linear,left top, left bottom, color-stop(0, #FF66CC), color-stop(1, #bc312e));
background-image: linear-gradient(top, #FF66CC, #bc312e);
filter: progid:DXImageTransform.Microsoft.Gradient(StartColorStr='#FF66CC', EndColorStr='#bc312e', GradientType=0);
-ms-filter: progid:DXImageTransform.Microsoft.Gradient(StartColorStr='#FF66CC', EndColorStr='#bc312e', GradientType=0);
border-style: solid;
color: #000000;
background-color: #0099FF;
border-color: #7f7f80;
font-family: Arial, Verdana, sans-serif;
font-size: 0.9em;
border-width: 1px;
-moz-border-radius: 18px;
-webkit-border-radius: 18px;
-khtml-border-radius: 18px;
border-radius: 18px;
-moz-box-shadow: 2px 2px 6px #c7c7c7;
-webkit-box-shadow: 2px 2px 6px #c7c7c7;
box-shadow: 2px 2px 6px #c7c7c7;
behavior: url(../webassist/button_styles/ie-css3.htc);
border: 2px solid #000000;
outline-style: none;
text-decoration: underline;
width: 100px;
height: 40px;
}TechieEmailResumeButton:hover {
color: #ffffff;
-moz-box-shadow: 2px 2px 6px #c7c7c7;
-webkit-box-shadow: 2px 2px 6px #c7c7c7;
box-shadow: 2px 2px 6px #c7c7c7;
behavior: url(../webassist/button_styles/ie-css3.htc);
}
#H3_white_text {
color: #FCEF42;
}
</style>
</head>
<body>
<form class="form">
<h4 class="name" id="H3_white_text">Please send a Word format resume to the email address below;</h4>
<p class="name">
<input type="text" name="name" id="name" />
<label for="name">Recipient Name</label>
</p>
<p class="email">
<input type="text" name="email" id="email" />
<label for="email">E-mail Address</label>
</p>
<p class="comment">
<textarea name="text">Enter any comments for email here.</textarea>
<label for="text">Comments in E-mail</label>
<input name="comment" type="hidden" value="<?php echo $_POST["text"]; ?>">
</p>
<p class="comment">
<input type="submit" value="Submit" class="TechieEmailResumeButton" id="word_submit_btn" name="word_submit_btn" />
</p>
</form>
</body>
</html>