-if (defined('frameset_active')) {
- // Initialize variables
- $header = ""; $FOOTER = "";
- if (empty($GLOBALS['what'])) $GLOBALS['what'] = "";
- if (($header != "1") && ($header != "2")) {
- // If not in CSS mode generate the header
- if (($CSS != "1")) {
- // Generate header
- $TITLE = "";
-
- // Add title decorations? (left)
- if ((!empty($CONFIG)) && (isset($link)) && (isset($db))) {
- if (($CONFIG['title_decoration'] == 'Y') && (trim(!empty($CONFIG['title_left'])))) $TITLE .= trim($CONFIG['title_left'])." ";
- $TITLE .= MAIN_TITLE;
+// Is the header already sent?
+if (($GLOBALS['header_sent'] != '1') && ($GLOBALS['header_sent'] != '2')) {
+ // If not in CSS mode generate the header
+ if ((getOutputMode() != '1')) {
+ // Generate header
+ $TITLE = '';
+
+ // Add title decorations? (left)
+ if (!defined('__PAGE_TITLE')) {
+ // Config and database connection valid?
+ if ((isConfigLocalLoaded()) && (isConfigLoaded()) && (SQL_IS_LINK_UP())) {
+ // Title decoration enabled?
+ if ((getConfig('enable_title_deco') == 'Y') && (getConfig('title_left') != '')) $TITLE .= trim(getConfig('title_left'))." ";
+
+ // Do we have some extra title?
+ if (isExtraTitleSet()) {
+ // Then prepent it
+ $TITLE .= getExtraTitle() . ' by ';
+ } // END - if
+
+ // Add main title
+ $TITLE .= constant('MAIN_TITLE');