| 
      
      
      From: <tu...@us...> - 2018-02-17 19:26:19
      
     | 
| Revision: 7973
          http://sourceforge.net/p/web-erp/reponame/7973
Author:   turbopt
Date:     2018-02-17 19:26:16 +0000 (Sat, 17 Feb 2018)
Log Message:
-----------
header.php: Set the DOCTYPE to html5 declaration format, update the meta tag with Content-Type info, and add localStorage with DateFormat and Theme for upcoming changes to table column sorting and calendar handling improvements.
Modified Paths:
--------------
    trunk/doc/Change.log
    trunk/includes/header.php
Property Changed:
----------------
    trunk/includes/header.php
Modified: trunk/doc/Change.log
===================================================================
--- trunk/doc/Change.log	2018-02-17 18:45:53 UTC (rev 7972)
+++ trunk/doc/Change.log	2018-02-17 19:26:16 UTC (rev 7973)
@@ -1,5 +1,6 @@
 webERP Change Log
 
+17/2/18  PaulT: header.php: Set the DOCTYPE to html5 declaration format, update the meta tag with Content-Type info, and add localStorage with DateFormat and Theme for upcoming changes to table column sorting and calendar handling improvements.
 17/2/18  PaulT: CustomerAllocations.php: Minor code shuffle to fix view page source message "Start tag 'div' seen in 'table'" reported in Firefox.
 17/2/18  PaulT: Customers.php, ShopParameters.php: Fix view page source message "No space between attributes" reported in Firefox. 
 17/2/18  PaulT: Labels.php: Remove extra closing </td></tr> tag pair.
Modified: trunk/includes/header.php
===================================================================
--- trunk/includes/header.php	2018-02-17 18:45:53 UTC (rev 7972)
+++ trunk/includes/header.php	2018-02-17 19:26:16 UTC (rev 7973)
@@ -1,5 +1,5 @@
 <?php
-/* $Id: header.php 7744 2017-03-29 15:43:41Z rchacon $ */
+/* $Id$ */
 
 	// Titles and screen header
 	// Needs the file config.php loaded where the variables are defined for
@@ -14,40 +14,34 @@
 
 	$ViewTopic = isset($ViewTopic) ? '?ViewTopic=' . $ViewTopic : '';
 	$BookMark = isset($BookMark) ? '#' . $BookMark : '';
-	$StrictXHTML=False;
 
-	if (!headers_sent()){
-		if ($StrictXHTML) {
-			header('Content-type: application/xhtml+xml; charset=utf-8');
-		} else {
-			header('Content-type: text/html; charset=utf-8');
-		}
-	}
-	if($Title == _('Copy a BOM to New Item Code')){//solve the cannot modify heaer information in CopyBOM.php scritps
+	if(isset($Title) && $Title == _('Copy a BOM to New Item Code')){//solve the cannot modify header information in CopyBOM.php scripts
 		ob_start();
 	}
-	echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">',
-		'<html xmlns="http://www.w3.org/1999/xhtml">',
-		'<head>',
-			'<link rel="icon" href="', $RootPath, '/favicon.ico" />',
-			'<link rel="shortcut icon" href="', $RootPath, '/favicon.ico" />';
 
-	if ($StrictXHTML) {
-		echo '<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8" />';
-	} else {
-		echo '<meta http-equiv="Content-Type" content="application/html; charset=utf-8" />';
-	}
+	echo '<!DOCTYPE html>';
 
-	echo '<link href="', $RootPath, '/css/menu.css" rel="stylesheet" type="text/css"  />',
-		'<link href="', $RootPath, '/css/print.css" rel="stylesheet" type="text/css" media="print" />',
-		'<link href="', $RootPath, '/css/', $_SESSION['Theme'], '/default.css" rel="stylesheet" type="text/css" media="screen"/>',
-		'<meta name="viewport" content="width=device-width, initial-scale=1">',//To tell the small device that the website is a responsive site (keep relationship between CSS pixels and device pixels).
-		'<script type="text/javascript" src="', $RootPath, '/javascripts/MiscFunctions.js"></script>',
-		'<title>', $Title, '</title>';
+	echo '<head>
+			<meta http-equiv="Content-Type" content="application/html; charset=utf-8; cache-control: no-cache, no-store, must-revalidate; Pragma: no-cache" />
+			<title>', $Title, '</title>
+			<link rel="icon" href="', $RootPath, '/favicon.ico" />
+			<link href="', $RootPath, '/css/menu.css" rel="stylesheet" type="text/css" />
+			<link href="', $RootPath, '/css/print.css" rel="stylesheet" type="text/css" media="print" />
+			<link href="', $RootPath, '/css/', $_SESSION['Theme'], '/default.css" rel="stylesheet" type="text/css" media="screen"/>
+			<meta name="viewport" content="width=device-width, initial-scale=1">
+			<script defer="defer" src="', $RootPath, '/javascripts/MiscFunctions.js"></script>
+			<script>
+				localStorage.setItem("DateFormat", "', $_SESSION['DefaultDateFormat'], '");
+				localStorage.setItem("Theme", "', $_SESSION['Theme'], '");
+			</script>';
 
 	// If it is set the $_SESSION['ShowPageHelp'] parameter AND it is FALSE, hides the page help text:
 	if(isset($_SESSION['ShowPageHelp']) AND !$_SESSION['ShowPageHelp']) {
-		echo '<style>.page_help_text, div.page_help_text {display:none;}</style>';
+		echo '<style>
+				.page_help_text, div.page_help_text {
+					display:none;
+				}
+			</style>';
 	}
 
 	echo '</head>',
@@ -81,9 +75,11 @@
 				$_SESSION['Favourites'][$_POST['ScriptName']] = $_POST['Title'];
 			}
 		}
+
 		if (isset($_POST['DelFromMenu'])) {
 			unset($_SESSION['Favourites'][$_POST['ScriptName']]);
 		}
+
 		if (isset($_SESSION['Favourites']) AND count($_SESSION['Favourites'])>0) {
 			echo '<ul>';
 			foreach ($_SESSION['Favourites'] as $url=>$ttl) {
@@ -91,6 +87,7 @@
 			}
 			echo '</ul>';
 		}
+
 		echo '</li>'; //take off inline formatting, use CSS instead ===HJ===
 
 		if (count($_SESSION['AllowedPageSecurityTokens'])>1){
Property changes on: trunk/includes/header.php
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
 |