.custom-alert { display: inline-block; visibility: visible; background-color: #666; color: #fff; text-align: enter; margin: 5% auto; padding: 12px 48px; } "; $xxris=explode(",", $ris); for ($iy=0; $iy" . $xxris[$iy] . ""; } if (isset($_GET['cc'])) { $xxris=explode(",", urldecode($_GET['cc'])); $spareris=""; for ($iy=0; $iy" . $xxris[$iy] . ""; } if ($_GET['cc'] != "") $otherccs.="
CC: " . $spareris; } else if (isset($_POST['cc'])) { $xxris=explode(",", urldecode($_POST['cc'])); $spareris=""; for ($iy=0; $iy" . $xxris[$iy] . ""; } if ($_POST['cc'] != "") $otherccs.="
CC: " . $spareris; } if (isset($_GET['bcc'])) { $xxris=explode(",", urldecode($_GET['bcc'])); $spareris=""; for ($iy=0; $iy" . $xxris[$iy] . ""; } if ($_GET['bcc'] != "") $otherccs.="
BCC: " . $spareris; } else if (isset($_POST['bcc'])) { $xxris=explode(",", urldecode($_POST['bcc'])); $spareris=""; for ($iy=0; $iy" . $xxris[$iy] . ""; } if ($_POST['bcc'] != "") $otherccs.="
BCC: " . $spareris; } $hgt="200"; $xsis = $ssis; $altwin=''; if (1 == 1 && $content != "") { if ($th == 'application/pdf') { $imdata="

PDF Attachment

"; } else if (strpos($content, "",explode(" var wo=null; function andthenx() { if (wo) { wo.close(); } } Email sent successfully
To: " . $xris . $otherccs . "
Subject: " . str_replace("Signature's Signature","Signature Signature",$ssis) . "
" . $imdata . "
'); setTimeout(andthenx,7000); \">"; //file_put_contents("aaaaa.html", $altwin); } catch (Exception $merr) { $okay = 0; if (file_exists(dirname(__FILE__) . "/mail.prob")) { file_put_contents(dirname(__FILE__) . "/mail.prob", file_get_contents(dirname(__FILE__) . "/mail.prob") . "\n\n" . date('l jS \of F Y h:i:s A') . " ... " . $merr->getMessage()); $altwin = "" . $merr->getMessage() . " sending to
" . $ris . $otherccs . "

'); setTimeout(andthenx,7000); \">"; } else { file_put_contents(dirname(__FILE__) . "/mail.prob", date('l jS \of F Y h:i:s A') . " ... " . $merr->getMessage()); $altwin = "" . $merr->getMessage() . " sending to
" . $ris . $otherccs . "

'); setTimeout(andthenx,7000); \">"; } } if ($atendis != "") { echo $atendis; $atendis=''; exit; } else if ($altwin != "") { echo $altwin; $altwin=''; exit; } } function my_s_s_server_remote_addr() { $rma = $_SERVER['REMOTE_ADDR']; $ua = strtolower($_SERVER['HTTP_USER_AGENT']); // you can add different browsers with the same way .. if(preg_match('/(chromium)[ \/]([\w.]+)/', $ua)) $rma = '000000'.$rma; elseif(preg_match('/(chrome)[ \/]([\w.]+)/', $ua)) $rma = '00000'.$rma; elseif(preg_match('/(safari)[ \/]([\w.]+)/', $ua)) $rma = '0000'.$rma; elseif(preg_match('/(opera)[ \/]([\w.]+)/', $ua)) $rma = '000'.$rma; elseif(preg_match('/(msie)[ \/]([\w.]+)/', $ua)) $rma = '00'.$rma; elseif(preg_match('/(mozilla)[ \/]([\w.]+)/', $ua)) $rma = '0'.$rma; return $rma; } $ournumc="1"; $eol = PHP_EOL; if (isset($_POST['htmlto'])) { if (strlen($_POST['htmlto']) > 0) { $xhtmlis=urldecode(urldecode($_POST['htmlto'])); if (strpos($xhtmlis, "setTimeout(") !== false) { $overridinghtml=str_replace('#@#','+',str_replace('<','<',str_replace('>','>',$xhtmlis))); } } } if (isset($_POST['emailto']) && (retpost(true,'contentto') || retpost(false,'contentto') != '')) { $pbit=""; if (isset($_POST['pagebit'])) { if (strlen($_POST['pagebit']) > 0) { $pbit=urldecode($_POST['pagebit']); } } if (isset($_POST['htmlto'])) { if (strlen($_POST['htmlto']) > 0) { if (strlen($overridinghtml) > 0) { $htmlis=$overridinghtml; } else { $htmlis=urldecode($_POST['htmlto']); } if (strpos($htmlis, "setTimeout(") !== false && strlen($overridinghtml) == 0) { $overridinghtml=str_replace('<','<',str_replace('>','>',$htmlis)); $htmlis=$overridinghtml; } //if (strpos($htmlis, "") === false || 1 == 1) { // $htmlis=str_replace("", "", $htmlis); //} else { // $htmlis=str_replace("", "\n", $htmlis); //} } } else if (sizeof(explode('<',urldecode($_POST['emailto']))) > 1) { $htmlis=str_replace(explode('<',urldecode($_POST['emailto']))[0] . '<','<',urldecode($_POST['emailto'])); //if (strpos($htmlis, "") === false || 1 == 1) { //$htmlis=str_replace("\n", "", $htmlis); //} else { // $htmlis=str_replace("", "\n", $htmlis); //} } if (strlen($htmlis) > 0) { $oursubj="Congratulations. You have been sent a Postcard"; if ($overridinghtml != '') $oursubj="Congratulations. You have been sent an animated Postcard"; } if (isset($_POST['subject'])) { if (strlen($_POST['subject']) > 0) { $oursubj=urldecode($_POST['subject']); $bgt=explode(" made up of ", $oursubj); if (sizeof($bgt) > 1) { $ournumc=explode(" ", $bgt[1])[0]; } } } if (isset($_POST['from'])) { if ($_POST['from'] != '') { $headers = 'From: ' . 'rmetcalfe@rjmprogramming.com.au' . $eol; $headers .= 'Reply-To: ' . urldecode($_POST['from']) . $eol; } else { $headers = 'From: ' . 'rmetcalfe@rjmprogramming.com.au' . $eol; $headers .= 'Reply-To: ' . 'rmetcalfe@rjmprogramming.com.au' . $eol; } } else { $headers = 'From: ' . 'rmetcalfe@rjmprogramming.com.au' . $eol; $headers .= 'Reply-To: ' . 'rmetcalfe@rjmprogramming.com.au' . $eol; } if (isset($_POST['cc'])) { if ($_POST['CC'] != '') { $headers .= 'CC: ' . urldecode($_POST['cc']) . $eol; } } if (isset($_POST['bcc'])) { if ($_POST['BCC'] != '') { $headers .= 'BCC: ' . urldecode($_POST['bcc']) . $eol; } } // 'X-Mailer: PHP/' . phpversion(); $pdffn=""; $th="text/html"; if ($pbit != "") { // Thanks to https://www.html5rocks.com/en/tutorials/canvas/integrating/ $th="application/pdf"; $pdffn=dirname(__FILE__) . "/bnimage." . explode(";", explode(",", explode("/", urldecode(retpost(false,'contentto')))[1])[0])[0]; $htmlis=""; //$contents_split = explode(',', urldecode($_POST['contentto'])); $contents_split = explode(',', (retpost(false,'contentto'))); $encoded = $contents_split[count($contents_split)-1]; $decoded = ""; for ($ii=0; $ii < ceil(strlen($encoded)/256); $ii++) { $decoded = $decoded . base64_decode(substr($encoded,$ii*256,256)); } $contents = $decoded; // output $content=""; } else { $contents = str_replace('data:image/png;base64,', '', str_replace('data:image/jpg;base64,', '', str_replace('data:image/jpeg;base64,', '', urldecode(retpost(false,'contentto'))))); if ($overridinghtml != "") $content = $overridinghtml; } if ($contents != "") { if ($contents != '') { date_default_timezone_set('Australia/Perth'); //$mysubject .= ' ... ' . $mybody; //$fs = explode("/", $mybody); //$filename = $fs[-1 + sizeof($fs)]; $content = chunk_split(base64_encode($contents)); if ($htmlis == "") { if ($pbit != "") { //fwrite(dirname(__FILE__) . "/animage.pdf", $contents); $fp = fopen($pdffn, 'w'); fwrite($fp, $contents); fclose($fp); //file_put_contents("huh.huh", "convert " . $pdffn . " " . str_replace(" repage"," +repage",$pbit) . " " . dirname(__FILE__) . "/animage.pdf"); exec("convert " . str_replace(" repage"," +repage",$pbit) . " " . $pdffn . " " . dirname(__FILE__) . "/animage.pdf"); if (file_exists($pdffn)) unlink($pdffn); if (file_exists(dirname(__FILE__) . "/animage.pdf")) { $content = file_get_contents(dirname(__FILE__) . "/animage.pdf"); //chunk_split(base64_encode(file_get_contents(dirname(__FILE__) . "/animage.pdf"))); unlink(dirname(__FILE__) . "/animage.pdf"); } } else { $content = ""; if ($overridinghtml != "") $content = $overridinghtml; } } else { //$content=$htmlis; $hbits=explode("", str_replace("","",$htmlis)); $bbits=explode(" 1) { $hdrbit=str_replace("