GD FORM SCRIPT
======================
<?php
$request_method = $_SERVER["REQUEST_METHOD"];
if($request_method == "GET")
{
$query_vars = $_GET;
}
elseif ($request_method == "POST")
{
$query_vars = $_POST;
}
reset($query_vars);
$t = date("U");
$file = $_SERVER['DOCUMENT_ROOT'] . "\ssfm\gdform_" . $t;
$fp = fopen($file,"w");
while (list ($key, $val) = each ($query_vars))
{
fputs($fp,"<GDFORM_VARIABLE NAME=$key START>\r\n");
fputs($fp,"$val\r\n");
fputs($fp,"<GDFORM_VARIABLE NAME=$key END>\r\n");
if ($key == "redirect")
{
$landing_page = $val;
}
}
fclose($fp);
if ($landing_page != "")
{
header("Location: http://".$_SERVER["HTTP_HOST"]."/$landing_page");
}
else
{
header("Location: http://".$_SERVER["HTTP_HOST"]."/");
}
?>
=======================================================
TESTMAILER FORM SCRIPT
=======================================================
<?php require_once("webassist/email/mail_php.php"); ?>
<?php require_once("webassist/email/mailformatting_php.php"); ?>
<?php
if (!isset($_SESSION))session_start();
if (($_SERVER["REQUEST_METHOD"] == "POST")) {
//WA Universal Email object="mail"
set_time_limit(0);
$EmailRef = "waue_testmailer_2";
$BurstSize = 200;
$BurstTime = 1;
$WaitTime = 1;
$GoToPage = "index.php";
$RecipArray = array();
$StartBurst = time();
$LoopCount = 0;
$TotalEmails = 0;
$RecipIndex = 0;
// build up recipients array
$CurIndex = sizeof($RecipArray);
$RecipArray[$CurIndex] = array();
$RecipArray[$CurIndex ][] = "bdgasner9@yahoo.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_testmailer_2.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>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>I just want to send a quick email...</title>
</head>
<body>
<p><a href="index.php">Home</a></p>
<form id="form1" name="form1" method="post" action="/gdform.php">
<input type="hidden" name="redirect" value="index.php" />
<p>
<label for="title">Comments: </label>
<textarea name="title" cols="150" rows="6" id="title"></textarea>
</p>
<p>
<label for="email">Email:</label>
<input name="email" type="text" id="email" size="50" />
</p>
<p>
<input type="submit" name="button" id="button" value="Send Email..." />
</p>
</form>
<p><img src="images/125MHM.jpg" width="235" height="125" alt="MHM" /></p>
</body>
</html>
===========================================================
Connection Page information with username and password crossed out
===============================================================
<?php
# FileName="Connection_php_mysql.htm"
# Type="MYSQL"
# HTTP="true"
$hostname_First_Ever = "itsjustanemail.db.7592921.hostedresource.com";
$database_First_Ever = "itsjustanemail";
$username_First_Ever = "xxxxxxxxx";
$password_First_Ever = "xxxxxxxx";
$First_Ever = mysql_pconnect($hostname_First_Ever, $username_First_Ever, $password_First_Ever) or trigger_error(mysql_error(),E_USER_ERROR);
?>
===============================================================
I'm not sure what other information to get you.
I really have absolutely no clue where to begin here.
I'm able to manage my web site and use dynamic data, but when it comes to form mailing I"m lost.