]> git.mxchange.org Git - mailer.git/blobdiff - inc/libs/output_functions.php
More other options moved out (to config_order)
[mailer.git] / inc / libs / output_functions.php
index efa5bc730468b4d0a67e71cd855679ec00ebcc74..ab24e8fb3e4d0b3972af97ba10248ba35c93d52a 100644 (file)
@@ -57,7 +57,7 @@ function compile_html($code, $simple=false)
        global $SEC_CHARS;
 
        // Compile constants
-       $code = str_replace("{--", '".', str_replace("--}", '."', $code));
+       $code = str_replace('{--', '".', str_replace('--}', '."', $code));
 
        // Compile QUOT and other non-HTML codes
        foreach ($SEC_CHARS['to'] as $k=>$from)
@@ -67,7 +67,7 @@ function compile_html($code, $simple=false)
        }
 
        // But keep simple quotes for later use
-       if ($simple) $code = str_replace("'", "{QUOT}", $code);
+       if ($simple) $code = str_replace("'", '{QUOT}', $code);
 
        // Return compiled code
        return $code;
@@ -77,12 +77,12 @@ function get_template ($template, $return=false, $content="")
 {
        // Add more variables which you want to use in your template files
        global $DATA, $ACTION, $WHAT;
-       $REFID = bigintval($_COOKIE['refid']);
+       $REFID = bigintval(get_session('refid'));
 
        if ($template == "member_support_form")
        {
                // Support request of a member
-               $ID = bigintval($_COOKIE['userid']);
+               $ID = bigintval($GLOBALS['userid']);
                $result = SQL_QUERY_ESC("SELECT sex, surname, family FROM "._MYSQL_PREFIX."_user_data WHERE userid='%s' LIMIT 1", array($ID), __FILE__, __LINE__);
                list($sex, $surname, $family) = SQL_FETCHROW($result);
                SQL_FREERESULT($result);
@@ -146,7 +146,7 @@ function get_template ($template, $return=false, $content="")
        {
                // The local file does exists so we load it. :)
                $tmpl_file = implode("", file($file));
-               $tmpl_file = str_replace("'", "{QUOT}", $tmpl_file);
+               $tmpl_file = str_replace("'", '{QUOT}', $tmpl_file);
 
                // Compile and run code
                $ret = COMPILE_CODE(addslashes($tmpl_file), false, true);
@@ -155,9 +155,9 @@ function get_template ($template, $return=false, $content="")
         elseif (IS_ADMIN())
        {
                // Only admins shall see this warning
-               $ret = "<BR><SPAN class=\"guest_failed\">".TEMPLATE_404."</SPAN><BR>
+               $ret = "<br /><SPAN class=\"guest_failed\">".TEMPLATE_404."</SPAN><br />
 (".basename($file).")
-<BR><BR>";
+<br /><br />";
        }
        if ($return)
        {