$dnum = date(Ymd)*4;
$from = $_GET['fr'];
if($from == ""){
$from = $_POST['fr'];
}
if($from != $dnum){
echo("<<<<Restricted Area>>>>" .
"
Sorry, you must Log In to view this Page
");
exit();
}
$usrn = $_GET['usrn'];
if($usrn == ""){
$usrn = $_POST['usrn'];
}
if($usrn == ""){
echo("<<<<Restricted Area>>>>" .
"
Problem with your username. Please Log In again.
");
exit();
}
$dtnum = date(Ymd);
$thisdate = date("F j, Y");
$MID = $_POST['MID'];
$listto = $_POST[listto];
$listleft = $_POST[listleft];
$leftit = implode(':', $listleft);
$dbcnx = @mysql_connect('mysql.plainhost.com', 'ecosmar_ecosmart', 'ecoman1');
mysql_select_db('ecosmar_friendly', $dbcnx);
$setit = mysql_query("SELECT subject,greeting,message,link_ex,link,closing,listit FROM ml_temp WHERE ID='$MID'");
if(!$setit){
echo("Email message not retrieved.
".mysql_error()."
");
}else{
$set = mysql_fetch_array($setit);
$subject = $set[0];
$greeting = $set[1];
$mess = $set[2];
$messo = html_entity_decode($mess);
$link_ex = $set[3];
$link = $set[4];
$lin = $link;
if(ereg("http://", $lin)){
$link = $lin;
}else{
$link = "http://" .$lin;
}
$closing = $set[5];
$listit = $set[6];
}
$fremail = "info@eco-smart.com";
?>
Eco-$mart Mail-room
Email to Eco-$mart Contacts
foreach($listto as $value){
$last = explode(" ",$value);
$name = $last[0]." ".$last[1];
$addy = $last[2];
$message = "ECO-\$MART, INC. == 1-888-329-2705 == www.eco-smart.com ==" .
"\n" .
"$thisdate" .
"\n" .
"\n" .
"$greeting $name," .
"\n" .
"\n" .
"$messo" .
"\n" .
"\n" .
"$link_ex" .
"\n" .
"$link" .
"\n" .
"\n" .
"$closing," .
"\n" .
"Matt Ross, President" .
"\n" .
"Eco-\$mart, Inc." .
"\n" .
"www.eco-smart.com" .
"\n" .
"info@eco-smart.com" .
"\n" .
"1-888-329-2705" .
"\n" .
"\n" .
"If you do not want to continue receiving email notices from Eco-\$mart, Inc.," .
"\n" .
"please click: http://www.ecosmartinc.com/ml_out.php?out=$addy" .
"\n" .
"or copy and paste the link into your browser address bar." .
"\n";
if(@mail($addy, $subject, $message, "From: Matt Ross <$fremail>")){
$tellit1[] = $name;
$mailedit[] = $name." ".$addy;
}else{
$tellit2[] = $name;
}
}//foreach
?>
From:
|
Eco-$mart, Inc. <>
|
Date:
|
|
Subject:
|
|
Greeting:
|
,
|
Message:
|
|
Link Comment:
|
|
Link URL:
|
|
Closing:
|
,
|
|
Matt Ross, President
Eco-$mart, Inc.
www.eco-smart.com
info@eco-smart.com
1-888-329-2705
|
|
SENDING TO:
foreach($tellit1 as $value){
echo("$value ");
}
if(!empty($tellit2)){
echo("Email Error");
foreach($tellit2 as $value){
echo("$value ");
}
}
?>
|
if(!empty($mailedit)){
$listadd = implode(':',$mailedit);
$listit = $listit.":".$listadd;
$setup = mysql_query("UPDATE ml_temp SET listit='$listit',leftit='$leftit',dtnum='$dtnum' WHERE ID='$MID' LIMIT 1");
if(!$setup){
echo("
Email message not updated.
".mysql_error()."
");
}
}
?>
©2007 - Data Base Interface - Custom Built at:
|