<?php
////////////////////////////////////////////////////////////////////////
// Breeze Website Builder
// Copyright EB Dynamics, Inc., 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', "3.5.0");
	define('VER_DATE',  "13 oct 2012 01:00:00");	// Release date of this version.
	define('LAST_VER_DATE',  "19 jul 2012 01:00:00");	// Release date of last version.
	
	include ("../connect/db_connection.php");
	include ("../connect/config.php");
	
	$query = "SELECT * FROM `" . BWB_TABLE_PREFIX . "version`";
	$result = mysql_query($query, $bwb_link);
	$row = mysql_fetch_array($result);
	$version = $row["version"];
	
	if (VERSION == $version)
		echo "Version $version";
	else
	{
		echo "<script language='JavaScript'  type='text/javascript'>\n";
		echo "document.getElementById('version').style.top='5px'\n";
		echo "document.getElementById('version').style.left='350px'\n";
		echo "</script>\n";
		echo "<span style='color:#F00;'>\n";
		echo "Your database-revision-patch level does not match your program-files-revision level.  Please contact your system administrator.<br>\n";
		echo "Program Files Revision Level: " . VERSION . "<br>\n";
		echo "Database Patch Level: $version<br>\n";
		echo "</span>\n";
	}
?>