 <?php
//COD_Techops by http://mangee.net
if (!defined("IN_FUSION")) { die("Access Denied"); }
define("THEME_BULLET", "<img class='bullet' src='".THEME."images/bullet.gif' alt='->' />");
require_once INCLUDES."theme_functions_include.php";

function render_page($license=false) {

global $locale, $main_style, $settings, $userdata;
echo " <div id='main-page'>
<table cellpadding='0' cellspacing='0' border='0' width='1006' class='center'><tr><td>
<table cellpadding='0' cellspacing='0' border='0' width='100%' class='banner'><tr><td>\n";
if ($settings['sitebanner1']) {	eval("?><div style='text-align:center;'>".stripslashes($settings['sitebanner1'])."</div>\n<?php ");}
echo"</td></tr></table>
<table cellpadding='0' cellspacing='0' border='0' width='1006' class='center' id='userbar'><tr><td class='floatL'>".showsubdate()."</td><td width='335'></td>\n";
if (iMEMBER){
echo "<td class='floatR'>Welkom ".$userdata['user_name']."</td>\n";
}else{
echo "<td class='floatR'>Welkom Gast</td>\n";
}
echo "</tr></table>
<table cellpadding='0' cellspacing='0' border='0' width='1006' class='center'><tr>
<td><img src='".THEME."images/logo.jpg' width='1006' height='244' alt='' /></td>
</tr></table>
<table cellpadding='0' cellspacing='0' border='0' width='1006' class='center'><tr><td id='navi'>".showsublinks(" ")."</td></tr></table>
<table cellpadding='0' cellspacing='0' width='1006' class='p-bkg $main_style'><tr>
<td style='width:15px;'></td>\n";
if (LEFT) { echo "<td class='side-border-left' valign='top'>".LEFT."</td>"; }
echo"<td class='main-body' valign='top'>".U_CENTER.CONTENT.L_CENTER."</td>\n";
if (RIGHT) { echo "<td class='side-border-right' valign='top'>".RIGHT."</td>"; }
echo"<td style='width:15px;'></td>
</tr></table>
<table cellpadding='0' cellspacing='0' border='0' width='1006' id='footer' class='center'><tr>
<td>".stripslashes($settings['footer']);
if (!$license) { echo "<br /><br /><div class='p-bkg'>\n".showcopyright(); }
echo"<br /> Theme conversion by <a href='http://mangee.net'>Mangee</a><br />Theme designed by <a href='http://psd-resources.de/'>Stafis</a>
</td></tr></table>
<table cellpadding='0' cellspacing='0' border='0' width='100%' class='spacer'><tr><td>\n";
if ($settings['sitebanner2']) {	eval("?><div style='text-align:center;'>".stripslashes($settings['sitebanner2'])."</div>\n<?php ");}
echo"</td></tr></table>
<table cellpadding='0' cellspacing='0' border='0' width='1006' id='subfooter'><tr>
<td><div class=''>".sprintf($locale['global_172'], substr((get_microtime() - START_TIME),0,4))."</div>
<div class=''>".showcounter()."</div>
</td></tr></table></div>
</td></tr></table></div>\n";
}

function render_news($subject, $news, $info) {
global $locale;
opentable($subject);
echo "<div class='floatfix'>".$news."</div>
<div class='news-footer'>
	".newsposter($info," ·").newsopts($info,"·").itemoptions("N",$info['news_id']).
"</div>\n";
closetable();
}
function render_article($subject, $article, $info) {
global $locale;
opentable($subject);
echo "<div class='floatfix'>".($info['article_breaks'] == "y" ? nl2br($article) : $article)."</div>
<div class='news-footer'>
	".articleposter($info," ·").articleopts($info,"·").itemoptions("A",$info['article_id']).
"</div>\n";
closetable();
}

function opentable($title) {
echo "<table cellpadding='0' cellspacing='0' width='100%'><tr>
<td class='T-L'></td>
<td class='T-C'>".$title."</td>
<td class='T-R'></td>
</tr></table>
<table cellpadding='0' cellspacing='0' width='100%'><tr>
<td class='T-body'>\n";
}

function closetable() {

echo "</td></tr></table>
<table cellpadding='0' cellspacing='0' width='100%' class='spacer'><tr>
<td class='T-LB'></td>
<td class='T-CB'>&nbsp;</td>
<td class='T-RB'></td>
</tr></table>\n";

}

function openside($title, $collapse = false, $state = "on") {

global $panel_collapse; $panel_collapse = $collapse;

echo "<table cellpadding='0' cellspacing='0' width='100%'><tr>
<td class='T-L'></td>
<td class='T-C'>$title</td>\n";
if ($collapse == true) {
$boxname = str_replace(" ", "", $title);
echo "<td class='T-R'>".panelbutton($state, $boxname)."</td>\n";
}else{echo "<td class='T-R'></td>\n";}
echo "</tr></table>
<table cellpadding='0' cellspacing='0' width='100%'><tr>
<td class='B-body'>\n";
if ($collapse == true) { echo panelstate($state, $boxname); }

}

function closeside() {

global $panel_collapse;

if ($panel_collapse == true) { echo "</div>\n"; }
echo "</td></tr></table>
<table cellpadding='0' cellspacing='0' width='100%' class='spacer'><tr>
<td class='B-CB'>&nbsp;</td>
</tr></table>\n";

}
?>
