getTotalFatalErrors() is now the right name
[mailer.git] / inc / functions.php
index de39d07278994a3e38fc4bd79703fa06b081af24..f1af163a8fc4899f4833b7ca4dc85fce765f3224 100644 (file)
@@ -59,43 +59,6 @@ function IS_INC_WRITEABLE($inc) {
        }
 }
 
-// Open a table (you may want to add some header stuff here)
-// @DEPRECATED
-function OPEN_TABLE ($PERCENT = "", $CLASS = "", $ALIGN="left", $VALIGN="", $td_only=false) {
-       global $table_cnt;
-
-       // Count tables so we can generate CSS classes for every table... :-)
-       if (empty($CLASS)) {
-               // Class is empty so count one up and create a class
-               $table_cnt++; $CLASS = "class".$table_cnt;
-       }
-       $OUT = "<TABLE border=\"0\" cellspacing=\"0\" cellpadding=\"0\"";
-
-       // Shall I add the classes to TABLE and TD or only to TD?
-       if (!$td_only) $OUT .= " class=\"".$CLASS."\"";
-
-       // Width is given
-       if (!empty($PERCENT)) $OUT .= " width=\"".$PERCENT."\"";
-
-       // Horizonal align
-       if (!empty($ALIGN)) $OUT .=" align=\"".$ALIGN."\"";
-
-       // Vertical align is given
-       if (!empty($VALIGN))  $OUT .= " valign=\"".$VALIGN."\"";
-       $OUT .= ">\n<TR>\n<TD";
-       if (!empty($ALIGN)) $OUT .=" align=\"".$ALIGN."\"";
-       $OUT .= " class=\"".$CLASS."\">";
-       OUTPUT_HTML($OUT);
-}
-
-// Close a table (you may want to add some footer stuff here)
-// @DEPRECATED
-function CLOSE_TABLE( $ADD="") {
-       OUTPUT_HTML("  </TD>\n</TR>");
-       if (!empty($ADD)) OUTPUT_HTML($ADD);
-       OUTPUT_HTML("</TABLE>");
-}
-
 // Output HTML code directly or "render" it. You addionally switch the new-line character off
 function OUTPUT_HTML ($HTML, $NEW_LINE = true) {
        // Some global variables
@@ -135,7 +98,7 @@ function OUTPUT_HTML ($HTML, $NEW_LINE = true) {
                default:
                        // Huh, something goes wrong or maybe you have edited config.php ???
                        DEBUG_LOG(__FUNCTION__, __LINE__, sprintf("Invalid renderer %s detected.", OUTPUT_MODE));
-                       MXCHANGE_DIE("<strong>".FATAL_ERROR.":</strong> ".LANG_NO_RENDER_DIRECT);
+                       mxchange_die("<strong>{!FATAL_ERROR!}:</strong> {!LANG_NO_RENDER_DIRECT!}");
                        break;
                }
        } elseif ((_OB_CACHING == "on") && ($footer == 1)) {
@@ -236,7 +199,7 @@ function addFatalMessage ($message, $extra="") {
 }
 
 // Getter for total fatal message count
-function getTotalFatalMessages () {
+function getTotalFatalErrors () {
        global $FATAL;
 
        // Init coun
@@ -987,9 +950,9 @@ function LOAD_URL($URL, $addUrlData=true) {
                header ("Location: ".str_replace("&amp;", "&", $URL));
        } else {
                // Output error message
-               include(PATH."inc/header.php");
+               require(PATH."inc/header.php");
                LOAD_TEMPLATE("redirect_url", false, str_replace("&amp;", "&", $URL));
-               include(PATH."inc/footer.php");
+               require(PATH."inc/footer.php");
        }
        exit();
 }
@@ -1002,7 +965,7 @@ function LOAD_CONFIGURED_URL ($configEntry) {
        // Is this URL set?
        if (is_null($URL)) {
                // Then abort here
-               trigger_error(sprintf("Configuration entry %s is not set!", $configEntry);
+               trigger_error(sprintf("Configuration entry %s is not set!", $configEntry));
        } // END - if
 
        // Load the URL
@@ -2276,13 +2239,14 @@ function FIX_DELETED_COOKIES ($cookies) {
 
 // Output error messages in a fasioned way and die...
 function mxchange_die ($msg) {
-       global $footer;
+       // Load header
+       require_once(PATH."inc/header.php");
 
        // Load the message template
        LOAD_TEMPLATE("admin_settings_saved", false, $msg);
 
        // Load footer
-       include(PATH."inc/footer.php");
+       require(PATH."inc/footer.php");
 
        // Exit explicitly
        exit;
@@ -2901,7 +2865,7 @@ function getConfig ($entry) {
        return $value;
 }
 
-// @TODO Rewrite all language constants to the function getLanguage().
+// @TODO Rewrite all language constants to this function.
 // "Getter" for language strings
 function getMessage ($messageId) {
        // Default is not found!