]> git.mxchange.org Git - mailer.git/blobdiff - inc/libs/html_mail_functions.php
fooRequestElementBar() functions renamed, adding of request parameters added:
[mailer.git] / inc / libs / html_mail_functions.php
index f72b7d595579a5248d9aef1ca2e9daedb2226bf8..6d0870a748a6efe03726e445d3163b76599307da 100644 (file)
@@ -1,7 +1,7 @@
 <?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                          *
@@ -60,7 +60,7 @@ function checkHtmlTags ($html) {
                $check = str_replace('/', '', $check);
                if (!in_array($check, $GLOBALS['html_tags'])) {
                        // Invalid tag found!
-                       return "";
+                       return '';
                }
                $test = substr($test, strpos($test, '>') + 1);
        }
@@ -82,7 +82,7 @@ function insertUrlsIntoHtml ($text) {
                } // 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));
@@ -118,7 +118,7 @@ function insertUrlsIntoHtml ($text) {
                } // 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 != '@')) {
@@ -134,7 +134,7 @@ function insertUrlsIntoHtml ($text) {
                } // 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));
@@ -144,7 +144,7 @@ function insertUrlsIntoHtml ($text) {
        $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));
@@ -156,7 +156,7 @@ function sendHtmlEmail($to, $subject, $message, $FROM) {
                // Send mail away as HTML
                $FROM = "Content-Type: text/html; charset=UTF-8\n" . $FROM;
                sendEmail($to, $subject, $message, 'N', $FROM);
-       }
+       } // END - if
 }
 
 //