<?php
////////////////////////////////////////////////////////////////////////
// Breeze Website Builder
// Copyright Silver Dolphin Solutions, LLC, Edward Lemmers, P.E.
// For licensing, see license.txt.
// Created: 5/6/2010	ELL
//	Revised: 2/10/2012	ELL
//  Added table prefix handling.
	
	define('VERSION', "6.5.55");
	define('VER_DATE',  "20 nov 2018 01:00:00");	// Release date of this version.
	define('LAST_VER_DATE',  "31 oct 2018 01:00:00");	// Release date of last version.
	
	$query = "SELECT * FROM `" . BWB_TABLE_PREFIX . "version`";
	$result = $bwb_dbh->query($query);
	$row = $result->fetch(PDO::FETCH_ASSOC);
	$version = $row["version"];
	
	if (VERSION == $version)
		echo VERSION_WORD . " " . $version;
	else
	{
		echo "<script language='JavaScript'  type='text/javascript'>\n";
		
		echo "function MoveWorkspace() {\n";
		echo "document.getElementById('workspace').style.top='170px'\n";
		echo "}\n";
		
		echo "document.getElementById('bwb_version').style.top='5px'\n";
		echo "document.getElementById('bwb_version').style.left='350px'\n";
		echo "document.getElementById('header_divider').style.height='60px'\n";
		echo "document.getElementById('header_divider').style.backgroundColor='#FFFF00'\n";
		echo "document.getElementById('header_divider').style.color='#000000'\n";
		
		echo "var vTimer = setTimeout(function() {MoveWorkspace()}, 1000);\n";
		
		echo "</script>\n";
		echo "<span style='color:#F00;'>\n";
		echo "<br>" . VERSION_DB_PROGRAM_FILE_MISMATCH_MSG . "<br>\n";
		echo VERSION_PROGRAM_FILES_VERSION_MSG . ": " . VERSION . "<br>\n";
		echo VERSION_DB_VERSION_MSG . ": $version<br>\n";
		echo "</span>\n";
	}
?>