<?php
if (!defined("IN_FUSION")) { die("Access Denied"); }

define("THEME_BULLET", "<span class='bullet'>&middot;</span>");
define("THEME_WIDTH", "990");
define("THEME_HEADER", THEME."images/header3.png");

require_once INCLUDES."theme_functions_include.php";

function render_page($license=false) {
	
	global $settings, $main_style, $locale, $userdata, $aidlink;

	//Header
	echo "<table cellpadding='0' class='center' height='200' cellspacing='0' width='".THEME_WIDTH."'>\n<tr>\n";
	echo "<td align='left'><img src='http://pro-low.tym.sk/pics/header.png' style='background-repeat:no-repeat;'></td>\n";
	echo "<td align='right' width='319' height='152' style='padding-right:20px;'>";
require_once THEME."login.php";
	echo "</td>\n</tr>\n</table>\n";

	//Menu
	echo "<table cellpadding='0' class='center menu' cellspacing='0' width='".THEME_WIDTH."'>\n<tr>\n<td align='left'>\n";
?>
<center>
<a href='/index.php' class='link'>Domov</a>
<a href='/downloads.php' class='link'>Sťahuj</a>
<a href='http://mancraft.eu/vip_list/index.html' class='link' target='_blank'>VIP systém</a>
<a href='/viewpage.php?page_id=13' class='link'>Ako sa pripojiť?</a>
<a href='http://srv.mojecs.eu:37002/' class='link' target='_blank'>Online Mapa</a>

</center>

<?      
	echo "</td>\n</tr>\n</table>\n";

	//Content
	echo "<table cellpadding='0' cellspacing='0' class='center' width='".THEME_WIDTH."' class='$main_style'>\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>\n</table>\n";
	
	//Footer
	echo "<table cellpadding='0' cellspacing='0' class='center footer' width='".THEME_WIDTH."'><tr>\n";
	echo "<td align='left'>";
	if (!$license) { echo showcopyright().""; }
	echo "</td>\n";
	echo "<td align='right'>".stripslashes($settings['footer']); // váš footer ten meníťe v hl.nastaveniach
	echo "</td>\n";
	echo "</tr>\n</table>\n";

}

function render_news($subject, $news, $info) {

	echo "<table cellpadding='0' cellspacing='0' width='100%'>\n<tr>\n";
	echo "<td class='capmain'>".$subject."</td>\n";
	echo "</tr>\n</table>\n";
	echo "<table width='100%' cellpadding='0' cellspacing='0' class='spacer'>\n<tr>\n";
	echo "<td class='main-body middle-border'>".$news."</td>\n";
	echo "</tr>\n<tr>\n";
	echo "<td align='center' class='news-footer middle-border'>\n";
	echo newsposter($info," &middot;").newsopts($info,"&middot;").itemoptions("N",$info['news_id']);
	echo "</td>\n";
	echo "</tr>\n</table>\n";

}

function render_article($subject, $article, $info) {
	
	echo "<table width='100%' cellpadding='0' cellspacing='0'>\n<tr>\n";
	echo "<td class='capmain-left'></td>\n";
	echo "<td class='capmain'>".$subject."</td>\n";
	echo "<td class='capmain-right'></td>\n";
	echo "</tr>\n</table>\n";
	echo "<table width='100%' cellpadding='0' cellspacing='0' class='spacer'>\n<tr>\n";
	echo "<td class='main-body middle-border'>".($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," &middot;").articleopts($info,"&middot;").itemoptions("A",$info['article_id']);
	echo "</td>\n</tr>\n</table>\n";

}

function opentable($title) {

    if(iADMIN && isset($_GET["aid"])){
	echo "<table cellpadding='0' cellspacing='0' width='100%'>\n<tr>\n";
	echo "<td class='admin-cap'>".$title."</td>\n";
	echo "</tr>\n</table>\n";
	echo "<table cellpadding='0' cellspacing='0' width='100%' class='spacer'>\n<tr>\n";
	echo "<td class='admin-body'>\n";
    }else{
	echo "<table cellpadding='0' cellspacing='0' width='100%'>\n<tr>\n";
	echo "<td class='capmain'>".$title."</td>\n";
	echo "</tr>\n</table>\n";
	echo "<table cellpadding='0' cellspacing='0' width='100%' class='spacer'>\n<tr>\n";
	echo "<td class='main-body'>\n";
    }

}

function closetable() {

    if(iADMIN && isset($_GET["aid"])){
  echo "</td>\n";
  echo "</tr>\n";
  echo "</table>\n";
    }else{
  echo "</td>\n";
  echo "</tr>\n";
  echo "<tr>\n";
  echo "<td class='down-cap'></td>\n";
  echo "</tr>\n";
  echo "</table>\n";
    }

}

function openside($title, $collapse = false, $state = "on") {

	global $panel_collapse; $panel_collapse = $collapse;
	
	echo "<table cellpadding='0' cellspacing='0' width='100%'>\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</table>\n";
	echo "<table cellpadding='0' cellspacing='0' width='100%' class='spacer'>\n<tr>\n";
	echo "<td class='side-body'>\n";	
	if ($collapse == true) { echo panelstate($state, $boxname); }

}

function closeside() {
	
	global $panel_collapse;

	if ($panel_collapse == true) { echo "</div>\n"; }
	
  echo "</td>\n";
  echo "</tr>\n";
  echo "<tr>\n";
  echo "<td class='down-scap'></td>\n";
  echo "</tr>\n";
  echo "</table>\n";

}


?>
