<?php
if (!defined("IN_FUSION")) { die("Access Denied"); }

define("THEME_WIDTH", "100%");
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, $theme_width, $userdata, $aidlink, $settings, $db_prefix;

	//Header1
echo "<table cellpadding='0' cellspacing='0' width='900' align='center'>

<tr>

<td class='header'>
</form>
<div class='data'>".ucwords(showdate($settings['subheaderdate'], time()))."
</div>
</td>
</tr>

</table>\n";


	//Pagr.Header
echo "<table cellpadding='0' cellspacing='0' width='900' align='center'>

<tr>

<td class='full-header'>
<div id='popular'>\n"; include THEME."popular_albums_panel.php"; echo "</div>
<div id='latest'>\n"; include THEME."latest_albums_panel.php"; echo "</div>


</td>
</tr>

</table>\n";

	//Sub Navigacija
echo "<table cellpadding='0' cellspacing='0' width='802' align='center'>

<tr>

<td class='sub'>
<div class='navTxt'>

<a href='/index.php'>Namai</a>&nbsp; &nbsp; &nbsp; 
<a href='#'>Forumas</a>&nbsp; &nbsp; &nbsp; 
<a href='#'>Paslaugos</a>&nbsp; &nbsp; &nbsp; 
<a href='#'>Unban</a>&nbsp; &nbsp; &nbsp; 
<a href='#'>Banai</a>&nbsp; &nbsp; &nbsp;
<a href='#'>Taisykles</a>&nbsp; &nbsp; &nbsp; 
<a href='#'>Kontaktai</a>&nbsp; &nbsp; &nbsp; 
<a href='#'>Siuntiniai</a>&nbsp; &nbsp; &nbsp; 
</div>

</td>
</tr>

</table>\n";
	
	//Content
echo "<table align='center' cellpadding='0' cellspacing='0' width='825' align='center' class='$main_style'>\n<tr>\n";
	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>\n</table>\n";
echo "</tr>\n</table>\n";
	
	//Footer
	echo "</tr>\n</table>\n";
	echo "<table cellpadding='0' cellspacing='0' width='802' align='center' class='footer'>\n<tr>\n";
	echo "</tr>\n</table>\n";


}

function render_news($subject, $news, $info) {

	echo "<table align='center' cellpadding='0' cellspacing='0' width='574'>\n<tr>\n";
	echo "<td class='capmain'>".$subject."</td>\n";
	echo "</tr>\n<tr>\n";
	echo "<td class='main-body'>".$news."</td>\n";
	echo "</tr>\n<tr>\n";
	echo "<td align='center' class='news-footer'>\n";
echo "<a href='".BASEDIR."news.php?readmore=".$info['news_id']."'><b> Skaityti daugiau... </a>&nbsp; ".newsposter($info," ·").itemoptions("N",$info['news_id'])." </a></td>";
	echo "</td>\n</tr>\n</table>\n";

}

function render_article($subject, $article, $info) {
	
	echo "<table align='center' cellpadding='0' cellspacing='0' width='574'>\n<tr>\n";
	echo "<td class='capmain'>".$subject."</td>\n";
	echo "</tr>\n<tr>\n";
	echo "<td class='main-body'>".($info['article_breaks'] == "y" ? nl2br($article) : $article)."</td>\n";
	echo "</tr>\n<tr>\n";
	echo "<td align='center' class='news-footer'>\n";
	echo articleposter($info," ·").articleopts($info,"·").itemoptions("A",$info['article_id']);
	echo "</td>\n</tr>\n</table>\n";

}

function opentable($title) {

	echo "<table align='center' cellpadding='0' cellspacing='0' width='574'>\n<tr>\n";
	echo "<td class='capmain'>".$title."</td>\n";
	echo "</tr>\n<tr>\n";
	echo "<td class='main-body'>\n";

}

function closetable() {

echo "</td>
</tr>
<tr><td><img src='".THEME."images/naujA.png' alt='panele'></td></tr>
</table>\n";

}

function openside($title, $collapse = false, $state = "on") {
	
	global $panel_collapse; $panel_collapse = $collapse;
	
	echo "<table cellpadding='0' cellspacing='0' width='190' class='border'>\n<tr>\n";
	echo "<td class='scapmain'>".$title."</td>\n";
	if ($collapse == true) {
		$boxname = str_replace(" ", "", $title);
		echo "<td class='scapmain' align='right'>".panelbutton($state,$boxname)."</td>\n";
	}
	echo "</tr>\n<tr>\n";
	echo "<td".($collapse == true ? " colspan='2'" : "")." class='side-body'>\n";	
	if ($collapse == true) { echo panelstate($state, $boxname); }

}

function closeside() {

echo "</td>
</tr>
<tr><td><img src='".THEME."images/panelA.png' alt='panele'></td></tr>
</table>\n";
tablebreak();

}
?>