<?php
/*Dizaina kure: 42studio.eu*/
if (!defined("IN_FUSION")) { die("Access Denied"); }

define("THEME_WIDTH", "1082");
define("THEME_BULLET", "<img src='".THEME."images/bullet.gif' alt='' style='border:0' />");

require_once INCLUDES."theme_functions_include.php";

function render_page($license=false) {

	global $settings, $main_style;

	//Header
	echo "<table align='center' cellspacing='0' cellpadding='0' width='1200' class='full-header'><tr>
	<td ><a href='".BASEDIR."'><img src='".THEME."images/logo.png' alt='' style='border:0;' /></a></td>
	<td class='fb-bg'><center><a href='".BASEDIR."'><img src='".THEME."images/fb_icona.png' alt='' style='border:0;' /></a></center></td>
	</tr></table>";
	
	echo "<table align='center' cellspacing='0' cellpadding='0' width='".THEME_WIDTH."'><tr>
	<td class='sub-header'>".showsublinks(" <span class='bullet'>&middot;</span> ","white")."</td>
	</tr></table>";
	
	//Content
	echo "<table align='center' cellspacing='0' cellpadding='0' width='".THEME_WIDTH."' class='main-style'><tr>";
	if (LEFT) { echo "<td class='side-border-left' valign='top'>".LEFT."</td>"; }
	echo "<td class='main-bg' valign='top'>".U_CENTER.CONTENT.L_CENTER."</td>";
	if (RIGHT) { echo "<td class='side-border-right' valign='top'>".RIGHT."</td>"; }
	echo "</tr></table>";
	
	//Footer
	echo "<table align='center' cellspacing='0' cellpadding='0' width='".THEME_WIDTH."' class='footer'><tr>
	<td align='left'>
Dizainas: <a href='http://izyle.deviantart.com/' target='_blank'>Izyle</a>
<br />Kodas: <a href='http://42studio.eu' target='_blank'>42studio.eu</a>
	</td>
	<td align='center'>
	".showcopyright()."
	</td>
	<td align='right'>
";
		?>
 <script language="javascript" type="text/javascript">
<!--
var _hey_lt_w = "", _hey_lt_h = "", _hey_lt_c = "";
//-->
</script>
<script language="javascript1.2" type="text/javascript">
<!--
_hey_lt_w = screen.width; _hey_lt_h = screen.height; _hey_lt_c = navigator.appName.indexOf("Microsoft") >= 0 ? screen.colorDepth : screen.pixelDepth;
//-->
</script>
<script language="javascript" type="text/javascript">
<!--
document.write("<a target='_blank' href='http://www.hey.lt/details.php?id=rmadrid'><img width=88 height=31 border=0 src='//www.hey.lt/count.php?id=rmadrid&width=" + _hey_lt_w + "&height=" + _hey_lt_h + "&color=" + _hey_lt_c + "&referer=" + escape(document.referrer) + "' alt='Hey.lt - Nemokamas lankytoju skaitliukas'><\/a>");
//-->
</script>
<noscript>
<a target="_blank" href="http://www.hey.lt/details.php?id=rmadrid"><img width="88" height="31" border=0 src="//www.hey.lt/count.php?id=rmadrid" alt="Hey.lt - Nemokamas lankytoju skaitliukas"></a>
</noscript>
<?php
	echo "
	</td>
	</tr></table>";

}

function render_news($subject, $news, $info) {
	
	echo "<table cellspacing='0' cellpadding='0' width='100%'><tr>
	<td class='capmain'><img src='".THEME."images/news.png' alt='' style='border:0; vertical-align:middle; margin-right:5px;' />".$subject."</td>
	</tr>
	<tr>
	<td class='main-body'>".$info['cat_image'].$news."<br /><a href='news.php?readmore=".$info['news_id']."'><img src='".THEME."images/skaitom.png' alt='' style='border:0;' /></a</td>
	</tr>
	<tr>
	<td align='center' class='news-footer'>Autorius: <a href='profile.php?lookup=".$info['user_id']."'>".$info['user_name']."</a> Naujienos kategorija: <a>".$info['cat_name']."</a> &#302;d&#279;ta: <a>".showdate("shortdate", $info['news_date'])."</a>  Per&#382;i&#363;r&#371;: <a>".$info['news_reads']."</a>  Komentar&#371;: <a>".$info['news_comments']."</a></td>
	</tr>
	</table>";

}

function render_article($subject, $article, $info) {
	
	echo "<table cellspacing='0' cellpadding='0' width='100%'><tr>
	<td class='capmain'>".$subject."</td>
	</tr>
	<tr>
	<td class='main-body'>".($info['article_breaks'] == "y" ? nl2br($article) : $article)."</td>
	</tr>
	<tr>
	<td align='center' class='news-footer'>"; 
	echo articleposter($info," &middot;").articleopts($info,"&middot;").itemoptions("A",$info['article_id']); echo "</td>
	</tr>
	</table>";

}

function opentable($title) {
	
	echo "<table cellspacing='0' cellpadding='0' width='100%'><tr>
	<td class='capmain'>".$title."</td>
	</tr>
	<tr>
	<td class='main-body'>";

}

function closetable() {

	echo "</td>
	</tr>
	</table>";

}

function openside($title, $collapse = false, $state = "on") {
	
	global $panel_collapse; $panel_collapse = $collapse;
	
	echo "<table cellpadding='0' cellspacing='0' width='100%' class='border'><tr>";
	echo "<td class='scapmain'>".$title."</td>";
	if ($collapse == true) {
		$boxname = str_replace(" ", "", $title);
		echo "<td class='scapmain' align='right'>".panelbutton($state,$boxname)."</td>";
	}
	echo "</tr><tr>";
	echo "<td".($collapse == true ? " colspan='2'" : "")." class='side-body'>";	
	if ($collapse == true) { echo panelstate($state, $boxname); }

}

function closeside($collapse = false) {

	global $panel_collapse;

	if ($panel_collapse == true) { echo "</div>"; }	
	echo "</td></tr></table>";

}
?>