<?php
if (!defined("IN_FUSION")) { die("Access Denied"); }

define("THEME_WIDTH", "1110");
define("THEME_BULLET", "<img src='".THEME."images/bullet.gif' alt='' border='0'/>");

require_once INCLUDES."theme_functions_include.php";

function render_page($license=false) {

	global $settings, $main_style, $aidlink, $data, $userdata, $db_prefix;
	
//Header
echo "<table align='center' class='gtinasr1_1' cellspacing='0' cellpadding='0' width='100%'><tr><td class='gtinasr1' height='62' width='1000' >";

echo "<center><table cellspacing='0' cellpadding='0' height='62' width='1000'><tr><td><a href='/index.php' ><img height='58' src='".THEME."images/logo.png' border='0'></a></td><td>";

echo "</td><td width='515' height='62' align='right'>
<a href='".BASEDIR."index.php' class='nav'>Forumas</a>
<a href='".BASEDIR."index.php' class='nav'>Serveriai</a> 
<a href='".BASEDIR."index.php' class='nav'>Paslaugos</a>
<a href='".BASEDIR."index.php' class='nav'>Kontaktai</a>
<a href='".BASEDIR."index.php' class='nav'>Pagrindinis</a> 
</td></tr></table></center>";

echo "</td></tr></table>";

	//Content
	echo "<table align='center' cellspacing='0' cellpadding='0' ><tr><td>";
	echo "<table cellpadding='0' cellspacing='0' align='center' width='1000'>\n<tr>\n";
	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></td></tr></table>";
	
	
//Footer
echo "<table align='center' class='gtinasr2_1' cellspacing='0' cellpadding='0' width='100%'><tr><td class='gtinasr2' height='180' width='1000' >";

echo "<center><table cellspacing='0' cellpadding='0' height='180' width='1000'><td><table cellspacing='0' cellpadding='0' width='700' height='100'><tr><td width='700' height='100'>";
echo '<script type="text/javascript"><!--
google_ad_client = "ca-pub-4067386990375179";
/* Testas */
google_ad_slot = "5638171506";
google_ad_width = 700;
google_ad_height = 90;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>';
echo "</td></tr><tr><td width='700' height='80' >";
//BacLinkai
echo "<a target='_blank' href='http://www.filmas.in' class='white'>Filmas.in - Kinas internetu.</a>";
echo"</td></tr></table></td><td><table cellspacing='0' cellpadding='0' width='300' height='180'><tr><td width='300' height='40' align='center'>";


echo "</td></tr><tr><td width='300' height='60' align='center' class='gtinasr3'>Visos teis&#279;s saugomos &copy; <a href='/index.php' class='gtinasr3_1'>MYGAME.LT</a><br><br>Design & Code: <a href='skype:gtinasr?chat' class='gtinasr3_1'>GtinasR</a></td></tr><tr><td width='300' height='60' align='center'></td></tr></table></td></table></center>";
echo "</td></tr></table>";
	
}

function render_news($subject, $news, $info) {

	echo "<table cellpadding='0' cellspacing='0' width='700'>\n<tr>\n";
	echo "<td class='capmain'>".$subject."</td>\n";
	echo "</tr><tr><td height='2'></td></tr>\n<tr>\n";
	echo "<td class='main-body'>".$news."</td>\n";
	echo "</tr>\n\n";
	echo "</table>\n";
	echo "<table width='700' cellpadding='0' cellspacing='0'><tr>";
	echo "<td align='left' class='main-body' width='700' height='30'>Autorius: <a href='".BASEDIR."profile.php?lookup=".$info['user_id']."'>
	<b>".$info['user_name']."</b></a> &nbsp;
	&#302;d&#279;ta: ".showdate("%Y-%m-%d %H:%M", $info['news_date'])." &nbsp; Kategorija: <a href='news_cats.php?cat_id=".$info['cat_id']."'><b>".$info['cat_name']."</b></a> &nbsp;
	Per&#382;i&#363;ros: ".$info['news_reads']." &nbsp; Komentarai: ".$info['news_comments']." &nbsp; <a href='".BASEDIR."news.php?readmore=".$info['news_id']."'>
	<b> Skaityti daugiau... </b></a></td>";
	echo "</td></tr></table>";
	echo "<table height='5'><tr><td></td></tr></table>";
	
}

function render_article($subject, $article, $info) {
	
	echo "<table cellpadding='0' cellspacing='0' width='700'>\n<tr>\n";
	echo "<td class='capmain'>".$subject."</td>\n";
	echo "</tr><tr><td height='2'></td></tr>\n<tr>\n";
	echo "<td class='main-body'>".($info['article_breaks'] == "y" ? nl2br($article) : $article)."</td>\n";
	echo "</tr>\n\n";
	echo "</table>\n";
	echo "<table height='5'><tr><td></td></tr></table>";

}

function opentable($title) {

	echo "<table cellpadding='0' cellspacing='0' width='700'>\n<tr>\n";
	echo "<td class='capmain'>".$title."</td>\n";
	echo "</tr><tr><td height='2'></td></tr>\n<tr>\n";
	echo "<td class='main-body'>\n";

}

function closetable() {

	echo "</td>\n</tr>\n</table>\n";
	echo "<table height='5'><tr><td></td></tr></table>";

}

function openside($title) {
	
	echo "<table cellpadding='0' cellspacing='0' width='297'>\n<tr>\n";
	echo "<td class='capmain'>".$title."</td>\n";
	echo "</tr><tr><td height='2'></td></tr>\n<tr>\n";
	echo "<td class='main-body'>\n";	

}

function closeside() {	
	echo "</td>\n</tr>\n</table>\n";
	echo "<table height='5'><tr><td></td></tr></table>";
	
}

function openside2($title) {
	
	echo "<table cellpadding='0' cellspacing='0' width='100'>\n<tr>\n";
	echo "<td class='scapmain2'>".$title."</td>\n";
	echo "</tr><tr><td height='2'></td></tr><tr>\n";
	echo "<td class='side-body2'>\n";	

}

function closeside2() {	
	echo "</td>\n</tr>\n</table>\n";
	echo "<table height='5'><tr><td></td></tr></table>";
	
}
?>