close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Field ID Name Changes

Thread began 3/22/2012 7:23 am by drdocb | Last modified 3/24/2012 9:25 am by drdocb | 1631 views | 5 replies

drdocb

Still Can't Seem To Make it Work

Jsaon:

Thank you for the code segment - I thought that might be the way to go but was looking at switching for action and resubmitting but this appears much cleaner.

I Added the segment both inside and outside the U(niversal) E(mail) UE block and still do not seem to have success though it seems to execute it does not send values.

I am posting the relevant page code (too many characters for the whole thing so attaching as a zip file). If you can show me where I should insert the curl code segment or give me an idea what is going wrong. If we need a private session, that is fine


<?php require_once("../../webassist/form_validations/wavt_scripts_php.php"); ?>
<?php require_once("../../webassist/form_validations/wavt_validatedform_php.php"); ?>
<?php
if (isset($_POST["input_1_submit_x"])) {
$WAFV_Redirect = "".(htmlentities($_SERVER["PHP_SELF"], ENT_QUOTES)) ."?invalid=true";
$_SESSION['WAVT_email4_Errors'] = "";
if ($WAFV_Redirect == "") {
$WAFV_Redirect = $_SERVER["PHP_SELF"];
}
$WAFV_Errors = "";
$WAFV_Errors .= WAValidateRQ((isset($_POST["first_name"])?$_POST["first_name"]:"") . "",true,1);
$WAFV_Errors .= WAValidateRQ((isset($_POST["last_name"])?$_POST["last_name"]:"") . "",true,2);
$WAFV_Errors .= WAValidateEM((isset($_POST["email"])?$_POST["email"]:"") . "",true,3);
$WAFV_Errors .= WAValidateRQ((isset($_POST["street"])?$_POST["street"]:"") . "",true,4);
$WAFV_Errors .= WAValidateRQ((isset($_POST["city"])?$_POST["city"]:"") . "",true,5);
$WAFV_Errors .= WAValidateRQ((isset($_POST["state"])?$_POST["state"]:"") . "",true,6);
$WAFV_Errors .= WAValidateZC((isset($_POST["zip"])?$_POST["zip"]:"") . "",true,false,false,false,true,7);
$WAFV_Errors .= WAValidateRQ((isset($_POST["country"])?$_POST["country"]:"") . "",true,8);
$WAFV_Errors .= WAValidateRQ((isset($_POST["_0NE0000000mXIq"])?$_POST["_0NE0000000mXIq"]:"") . "",true,9);
$WAFV_Errors .= WAValidateRQ((isset($_POST["_0NE0000000mXHj"])?$_POST["_0NE0000000mXHj"]:"") . "",true,10);
$WAFV_Errors .= WAValidateRQ((isset($_POST["_0NE0000000mXIw"])?$_POST["_0NE0000000mXIw"]:"") . "",true,11);
$WAFV_Errors .= WAValidateRQ((isset($_POST["_0NE0000000mXJ0"])?$_POST["_0NE0000000mXJ0"]:"") . "",true,12);
$WAFV_Errors .= WAValidateRQ((isset($_POST["_0NE0000000naon"])?$_POST["_0NE0000000naon"]:"") . "",true,13);
$WAFV_Errors .= WAValidateRQ((isset($_POST["_0NE0000000mXJ"])?$_POST["_0NE0000000mXJ"]:"") . "",true,14);
$WAFV_Errors .= WAValidateRQ((isset($_POST["_0NE0000000mXIl"])?$_POST["_0NE0000000mXIl"]:"") . "",true,15);
$WAFV_Errors .= WAValidateRQ((isset($_POST["_0NE0000000mXJe"])?$_POST["_0NE0000000mXJe"]:"") . "",true,16);
$WAFV_Errors .= WAValidateRX((isset($_POST["oid"])?$_POST["oid"]:"") . "","/.*/",false,17);
$WAFV_Errors .= WAValidateRX((isset($_POST["retURL"])?$_POST["retURL"]:"") . "","/.*/",false,18);

if ($WAFV_Errors != "") {
PostResult($WAFV_Redirect,$WAFV_Errors,"email4");
}
}
?>
<?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["input_1_submit_x"]))) {
//WA Universal Email object="mail"
set_time_limit(0);
$EmailRef = "waue_email-3_1";
$BurstSize = 200;
$BurstTime = 1;
$WaitTime = 1;
$GoToPage = "";
$RecipArray = array();
$StartBurst = time();
$LoopCount = 0;
$TotalEmails = 0;
$RecipIndex = 0;
// build up recipients array
$CurIndex = sizeof($RecipArray);
$RecipArray[$CurIndex] = array();
$RecipArray[$CurIndex ][] = "office@naturalholistic.com";
$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_email-3_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 (function_exists("rel2abs")) $GoToPage = $GoToPage?rel2abs($GoToPage,dirname(__FILE__)):"";
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>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<script src="../../webassist/progress_bar/jquery-blockui-formprocessing.js" type="text/javascript"></script>
<link href="../../SpryAssets/SpryValidationTextField.css" rel="stylesheet" type="text/css" />
<script src="../../SpryAssets/SpryValidationTextField.js" type="text/javascript"></script>
<script src="../../webassist/forms/wa_servervalidation.js" type="text/javascript"></script>
<link href="../../SpryAssets/SpryValidationTextarea.css" rel="stylesheet" type="text/css" />
<script src="../../SpryAssets/SpryValidationTextarea.js" type="text/javascript"></script>
<link href="../../SpryAssets/SpryValidationSelect.css" rel="stylesheet" type="text/css" />
<script src="../../SpryAssets/SpryValidationSelect.js" type="text/javascript"></script>
<link href="../../webassist/forms/fd_newfromblank_default.css" rel="stylesheet" type="text/css" />
<link href="../../webassist/forms/fd_compact_default.css" rel="stylesheet" type="text/css" />
<link href="../../webassist/forms/fd_brassy_default.css" rel="stylesheet" type="text/css" />
</head>
<body>
<form class="Brassy_Default" id="input_1_Brassy_Default" name="input_1_Brassy_Default" method="post" action="<?php echo(htmlentities($_SERVER["PHP_SELF"], ENT_QUOTES)); ?>">

Attached Files
email4.zip

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...