<?
$public_setup_version = "0.2";
$public_setup_build_date = "12.12.2002";
	
// DB Setup Pull
$setup_result = mysql_query("SELECT * FROM setup WHERE setup_id = 1", $db);
$setup = mysql_fetch_object($setup_result);

// Check Website Status
if($setup->website_status == "0"){
	header("location: _warning.php");
	exit;
}

// BG Color
$bgcolor = $setup->public_bgcolor;

// Title
$site_title = "\t<title>" . $setup->title . " | " . $setup->tagline . "</title>\n\n";

// Metatags
$metatags = "\t<meta name=\"keywords\" content=\"" . $setup->meta_keywords . "\">\n";
$metatags .= "\t<meta name=\"description\" content=\"" . $setup->meta_description . "\">\n";
$metatags .= "\t<meta name=\"author\" content=\"" . $setup->meta_author . "\">\n\n";

if($homepage == "true" and $count != "false"){
	$metatags .= "\t<meta name=\"robots\" content=\"index, follow\">" . "\n\n";
	
	$new_hits = $setup->website_hits + 1;
	$sql = "UPDATE setup SET website_hits='$new_hits' WHERE setup_id = '1'";
	$result = mysql_query($sql);
	
}

// Style Sheet
$style = "\t<link rel=\"stylesheet\" href=\"_public.style.css\"> \n\n";

// Head [Title, Metatags, Style]
$head = "<head> \n\n";
$head .= $site_title . $metatags . $style;
$head .= "</head> \n\n";

// Body Details
$body = "<body bgcolor=\"#" . $bgcolor . "\" topmargin=\"0\" leftmargin=\"0\" rightmargin=\"0\" bottommargin=\"0\" marginheight=\"0\" marginwidth=\"0\"> \n";

// Open
$open = "<html> \n\n";
$open .= $head . $body;

// close
$close = "</body>\n\n</html>";

print($open);
?>