<?php
/************************************************************************
- * MXChange v0.2.1 Start: 04/25/2004 *
- * ================ Last change: 04/29/2004 *
+ * Mailer v0.2.1-FINAL Start: 04/25/2004 *
+ * =================== Last change: 04/29/2004 *
* *
* -------------------------------------------------------------------- *
* File : html_mail_functions.php *
$check = str_replace('/', '', $check);
if (!in_array($check, $GLOBALS['html_tags'])) {
// Invalid tag found!
- return "";
+ return '';
}
$test = substr($test, strpos($test, '>') + 1);
}
} // END - foreach
// Now replace the URL against anchor container and pray...
- $text = substr($text, 0, strpos($text, $check2))."<a href=\"".generateDerefererUrl($check)."\" target=\"_blank\">".$check."</a>".substr($text, strpos($text, $check2) + strlen($check));
+ $text = substr($text, 0, strpos($text, $check2)) . '<a href="' . generateDerefererUrl($check) . '" target="_blank">' . $check . '</a>' . substr($text, strpos($text, $check2) + strlen($check));
// Finally remove the url from testing string (or we have a loop and maybe server overload!)
$test = substr($test, strpos($test, $check) + strlen($check));
} // END - if
// And now go forward...
- $idx = 0;
+ $idx = '0';
while ($idx < strlen($test)) {
$check = substr($test, $idx, 1);
if ((!in_array($check, $GLOBALS['valid_email_chars'])) && ($check != '@')) {
} // END - if
// Now replace the email against anchor with mailto and pray...
- $PARTS[] = $check2 . "<a href=\"" . generateEmailLink($check, 'user_data') . "\">" . $check . "</a>";
+ $PARTS[] = $check2 . '<a href="' . generateEmailLink($check, 'user_data') . '">' . $check . '</a>';
// Remove email from testing string (see above why...)
$test = substr($test, strlen($check));
$text = ''; $PARTS[] = $test;
foreach ($PARTS as $part) {
$text .= $part;
- }
+ } // END - foreach
// Replace new-lines agains <br />-s and finally compile possible own HTML tags out...
return compileCode(str_replace("\n", "<br />\n", $text));
// Send mail away as HTML
$FROM = "Content-Type: text/html; charset=UTF-8\n" . $FROM;
sendEmail($to, $subject, $message, 'N', $FROM);
- }
+ } // END - if
}
//