47 && ord(substr($dd,$zcount,1))<53) { $xchar=chr(ord(substr($dd,$zcount,1))+5); } if (ord(substr($dd,$zcount,1))>52 && ord(substr($dd,$zcount,1))<58) { $xchar=chr(ord(substr($dd,$zcount,1))-5); } if (ord(substr($dd,$zcount,1))>64 && ord(substr($dd,$zcount,1))<78) { $xchar=chr(ord(substr($dd,$zcount,1))+13); } if (ord(substr($dd,$zcount,1))>77 && ord(substr($dd,$zcount,1))<91) { $xchar=chr(ord(substr($dd,$zcount,1))-13); } if (ord(substr($dd,$zcount,1))>96 && ord(substr($dd,$zcount,1))<110) { $xchar=chr(ord(substr($dd,$zcount,1))+13); } if (ord(substr($dd,$zcount,1))>109 && ord(substr($dd,$zcount,1))<123) { $xchar=chr(ord(substr($dd,$zcount,1))-13); } $da.=$xchar; $zcount++; } return $da; } function gsetvars($varname,$xxline) { $temp2=$xxline; if ($varname=="compname" || $varname=="compfull") { if (stripos($temp2,chr(13))>-1) { $temp2=substr($temp2,0,stripos($temp2,chr(13))); } if ($varname=="compfull") { return $temp2; } if (stripos($temp2,";")>-1) { $temp2=substr($temp2,0,stripos($temp2,";")); } return $temp2; } else { if (stripos($temp2,$varname)>-1) { $xlen=strlen($varname); $temp2=substr($temp2,stripos($temp2,$varname)+$xlen,strlen($temp2)-stripos($temp2,$varname)-$xlen); if (stripos($temp2,chr(13))>-1) { $temp2=substr($temp2,0,stripos($temp2,chr(13))); } return $temp2; } else { $temp2=""; return $temp2; } } } $file = "outgoing/mailform.co"; if (file_exists($file)) { $fp = fopen("$file", "r+"); // $xline = fgets($fp,4096); $xline = fread($fp,filesize($file)); fclose($fp); //echo '>'.$xline.'<'; } else { //echo 'file:'.$file.'< not found'; $xline=""; } $compname=gsetvars("compname:",$xline); $compfull=gsetvars("compfull:",$xline); $compweb = gsetvars("web:",$xline); $compoth = gsetvars("otherweb:",$xline); $compph = gsetvars("phone:",$xline); $compfax = gsetvars("fax:",$xline); $deftoemail = gsetvars("deftoemail:",$xline); $defccemail = gsetvars("defccemail:",$xline); $defbccemail = gsetvars("defbccemail:",$xline); $imgpicture = gsetvars("imgpicture:",$xline); $replyemail = gsetvars("replyemail:",$xline); $returndet = strtoupper(gsetvars("returndetail:",$xline)); $finishwin = gsetvars("urlthankyou:",$xline); $savwin = $finishwin; $contwin='contnext.htm'; $em_from = $_REQUEST['email']; //echo '

'; //echo '

'; echo $compfull; echo '

'; echo '
'; echo ''; if($_POST['email_to']) { $email_to=trim($_POST['email_to']); $email_na=trim($_POST['name_to']); $fn='outgoing/NewEmailList.snd.txt'; // if (! file_exists($fn)) // { // echo 'File:'.$fn.'<- not located.'; // } // else // { $append='Y'; $file = fopen($fn, "a+") or exit("Unable to open file: ".$fn); while(!feof($file)) { $xlin=trim(fgets($file)); if (stripos($xlin,';')>-1) { $xlin=substr($xlin,0,stripos($xlin,';')); } if (stripos($xlin,',')>-1) { $xlin=substr($xlin,0,stripos($xlin,',')); } if($email_to==$xlin) { $append='N'; } } fclose($file); if($append=='Y') // not found { // encode $nemail_to=mvchr($email_to); $nemail_na=mvchr($email_na); $efrom = $compfull.' <'.$replyemail.'>'; $bcc_to=""; $cc_to=""; $subject='Confirmation from '.$compfull; $message='A confirmation request has be sent to this email address from '.$compfull.'

If you have made a request to add your email address to '.$compfull.' please click the confirmation link below.

'; //191 $message.='I confirm the addition of my email address to '.$compfull.'
'.chr(13).chr(10); $message.='


You may unsubscribe by clicking the unscuscribe/remove me link at the bottom portion of any email you receive from '.$compfull; $message.='

If you have not submitted your email address to '.$compfull.', please disregard this email.'; //$message.='


'.$compfull; //text //$aheader = 'MIME-Version: 1.0' . "\r\n"; //html $aheader = 'MIME-Version: 1.0' . "\r\n"; $aheader .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; $eheader=$aheader."From: ".$efrom.chr(13).chr(10)."Cc: ".$cc_to.chr(13).chr(10)."Bcc: ".$bcc_to ; if ($email_to!=="" && stripos($email_to,'@')>1) { mail($email_to, "$subject", $message, $eheader ); } //fwrite($file, $_POST['email'].chr(13).chr(10)); } //fclose($file); echo '
'; if($append=='Y') { echo 'An email was sent to the email address your provided and should arrive to you within a few minutes.

Please check your email for a confirmation notice from '.$compfull.'.

After clicking the confirmation link within this email, your address should then be added. - Thank You!'; } else { echo 'Email Address was already added. Thank you!'; } echo ' '; echo '


'; echo 'You may close this window now.'; echo '
'; echo '
(OR)'; echo '

'; echo 'Add Another'; echo '
'; // echo '
'; // echo ''; echo '
'; // } } else { echo '

'; // echo 'Please add my email address from your email lists.

'; echo '
'; echo 'To add your email address, please enter your Email address + Name and click ADD ME.

'; echo '
'; echo '

'; echo '

'; echo '

'; echo '

'; echo ''; echo '
'; echo 'E-mail'; echo ''; echo ''; echo 'Name'; echo ''; echo '
'; echo '
'; echo ''; echo ' '; // echo ''; echo ' '; echo '(or) Close this window if you do not wish to be added.'; // echo ''; echo '
'; echo '
'; echo '
'; echo ' 
'; } ?>




Copyright 2010