<?php
/**
 * @package Flatnux_theme_mobile
 * @author Alessandro Vernassa <speleoalex@gmail.com>
 * @copyright Copyright (c) 2011
 * @license http://opensource.org/licenses/gpl-license.php GNU General Public License
 *
 *
 */
defined("_FNEXEC") or die("Restricted access");
$config=FN_LoadConfig("themes/{$_FN['theme']}/config.php");
$menuitem_color=$config['menuitem_color'];
$section_title_background=$config['section_title_background'];
$color_rightblocks=$config['color_rightblocks'];
;
$color_rightblocks_text=$config['color_rightblocks_text'];
$color_leftblocks=$config['color_leftblocks'];
;
$color_leftblocks_text=$config['color_leftblocks_text'];
;
$force_width=$config['force_width'];
;

global $_FN;
echo "<!DOCTYPE html PUBLIC \"-//WAPFORUM//DTD XHTML Mobile 1.2//EN\" \"http://www.openmobilealliance.org/tech/DTD/xhtml-mobile12.dtd\">";
echo "<head>";
echo "
<style type=\"text/css\">body {margin:0; padding:0; font-size:x-small;}
div {margin:0; padding:0; font-size:x-small;}
table {border:0; margin:0; padding:0; font-size:x-small;border-collapse:collapse }
td {margin:0; padding:0; font-size:x-small;}
form {margin:0; padding:0; font-size:x-small;}
img {border:0;}
.small {font-size:xx-small;}
body {color:#666666; background-color:#ffffff; font-family:Tahoma, Verdana; margin:0 auto; padding:0;}
img {border:0; margin:0;}
div {color:#666666;}
form {margin:0px; padding:0px;}
input {color:#000000; background-color:#ffffff;}
a {color:#3084c8; text-decoration:none; font-weight:bold;}
a:focus {background-color:#3084c8; color:#ffffff;}
a:hover {background-color:#3084c8; color:#ffffff;}
.menuitem{
	height:25px;
	border:1px solid ;
	padding: 2px;
	margin-left: 1px;
	margin-top: 1px;
	line-height: 25px;
	float:left;
	background-color: #$menuitem_color;
}
.menuitem a{
	text-decoration: none;
	color:#ffffff;
	white-space: nowrap;
	font-size: 20px;
}

.lang{
	text-decoration: none;
	color:#ffffff;
	white-space: nowrap;
	font-size: 20px;
	line-height: 25px;
	float:left;
	margin-left: 1px;
}
.menuitem a:focus {background-color:#ffffff; color:#$menuitem_color;}
.menuitem a:hover {background-color:#ffffff; color:#$menuitem_color;}
a.active{
	color:#ffff00;
	
}
.sectiontitle{
	background-color: #$section_title_background;
	color:#ffffff;
	font-size: 20px;
	text-align: center;
	margin-bottom: 1px;
}
.rightblocks{
	background-color: #$color_rightblocks;
	color:#$$color_rightblocks_text;

}
.leftblocks{
	background-color: #$color_leftblocks;
	color:#$color_leftblocks_text;

}
";

$agent=FN_GetParam("HTTP_USER_AGENT",$_SERVER,"flat");
$is_PC=false;
if (FN_ergi("Linux i686",$agent) || FN_ergi("Linux x86_64",$agent))
{
	$is_PC=true;
}
if (FN_ergi("Windows NT",$agent))
{
	$is_PC=true;
}

if ($is_PC)
{

	echo "html {background-color:#525051;}
body{width:{$force_width}px}
img,input,table,div,p,textarea,select {
max-width:{$force_width}px;
width:expression(document.body.clientWidth > {$force_width}? \"{$force_width}px\": \"auto\" );
}

";
}
echo "
</style>
";
echo FN_HtmlHeader();
echo "</head>";
echo "<body>";
echo "<table border=\"0\" width=\"\">";
echo "<tr><td colspan=\"2\">";
echo FN_HtmlMenu(" | ");
echo "</td></tr>";
echo "<tr><td colspan=\"2\">";
echo "<div id=\"page\">";
echo FN_HtmlSection();
echo "</div><hr />";
echo "</td></tr>";
echo "<tr><td colspan=\"2\" >".FN_HtmlBlocks("top")."</td></tr>";
echo "<tr><td class=\"leftblocks\" align=\"left\" valign=\"top\" width=\"50%\">";
echo FN_HtmlBlocks("left");
echo "</td><td  class=\"rightblocks\" align=\"right\"  valign=\"top\" width=\"50%\">";
echo FN_HtmlBlocks("right");
echo "</td></tr>";
echo "<tr><td colspan=\"2\" >".FN_HtmlBlocks("bottom")."</td></tr>";
echo "</table>";
if ($_FN['theme_default'] != $_FN['theme'])
	echo "<hr /><div style=\"text-align:center\"><a style=\"font-size:20px;\" href=\"index.php?theme={$_FN['theme_default']}\">" . FN_Translate("view the PC version of this site") . "</a></div>";
echo "</body>";
?>