<?php
/*--------------------------------------------+
| PHP-Fusion v7 - Content Management System   |
|---------------------------------------------|
| author: Nick Jones (Digitanium) © 2002-2009 |
| web: http://www.php-fusion.co.uk            |
| email: nick@php-fusion.co.uk                |
|---------------------------------------------|
| Released under the terms and conditions of  |
| the GNU General Public License (Version 3)  |
+--------------------------------------------*/
/*--------------------------------------------+
| PHP-Fusion v7 -Theme: DJ2 SchwarzBlue       |
|---------------------------------------------|
| author: RadioStyles © 2011                  |
| web: http://www.RadioStyles.de              |
| email: info@radiostyles.de                  |
| Original: lernvid.com                       |
|---------------------------------------------|
| This program is released as free software   |
| under the Affero GPL license.               | 
| You can redistribute it and/or              |
| modify it under the terms                   | 
| of this license which you                   | 
| can read by viewing the included agpl.      | 
| txt or online at www.gnu.org/licen...       | 
| Removal of this copyright header is         | 
| strictly prohibited without written         | 
| permission from the original author(s).     | 
+--------------------------------------------*/


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

define("THEME_BULLET", "<span class='bullet'>&nbsp;&nbsp;&middot;&nbsp;&nbsp;</span>");

require_once INCLUDES."theme_functions_include.php";
    

function render_page($license=false) {
	
	global $settings, $main_style, $locale;
	
	//BG Anfang
          echo "
				 <table cellpadding='0' cellspacing='0' width='100%' border='0' align='center'>
		         <tr>
				  <td width='100%' class='bg' align='left'>";


//Header

          echo "
          <table cellpadding='0' cellspacing='0' width='990' border='0' align='center'>
		  <tr>
		  <td width='100%' height='10'  align='center'  class='header'>
		  </td>
          </tr>
		  </table>		  
		  <table cellpadding='0' cellspacing='0' width='990' border='0' align='center'>
		  <tr>
		  <td width='100%' height='40'  align='center'  class='nav-oben'>
		  <table cellpadding='0' cellspacing='0' width='990' border='0' align='center'>
		  <tr>
		  <td width='100%' height='40' class='top-nav' align='center'>
		  ".showsublinks(" ".THEME_BULLET."", "white")."
		  </td>
          </tr>
		  </table>
		  </td>
          </tr>
		  </table>";
		   echo "<table cellpadding='0' cellspacing='0' width='990' border='0' align='center'>
		  <tr>
		  <td width='100%' height='300'  align='center'  class='login'><img src='".THEME."images/header.jpg' alt='' width='990' height='300' /></td>
          </tr>
		  </table>";

//Header Ende
		
//Content
	echo "<table cellpadding='0' cellspacing='0' width='990' class='$main_style' align='center'>\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";	
//Content Ende	

//Footer

          echo "<table cellpadding='0' cellspacing='0' width='990' border='0' align='center'>
		  <tr>
		  <td width='990' height='30'  align='right'  class='copy'>
                 <table cellpadding='0' cellspacing='0' width='990' border='0' align='center'>
		                <tr>		  
						<td width='50%' align='left'><img src='".THEME."images/box.gif' alt='' width='120' height='100' align='left'/></td>
						<td width='50%' align='right'><img src='".THEME."images/gotop.jpg' onclick='javascript:scroll(0,0)' alt='top' style='border: 0pt none;' /></td>
		                </tr>
						</table>
		  </td>
		  </tr>
		  </table>";
		  
          echo "<table cellpadding='0' cellspacing='0' width='990' border='0' align='center'>
		  <tr>
		  <td width='990' height='30'  align='right'  class='bottom'></td>
          </tr>
		  </table>";

	echo "<table  width='990' cellspacing='0' cellpadding='0' border='0' align='center'>
	       <tr>
	          <td align='left' width='60%' height='40' class='main-bg' >";
			  if ($license == false) {
	            echo "".showcopyright()."";
	         }
	echo "</td><td align='right' valign='middle' width='40%' height='40' class='main-bg' >Template-Original von <a href='http://www.lernvid.com'  target='_blank'><img title='LernVideos, Tutorials, Templates, Downloads and more...' src='http://lernvid.com/images/stories/88x31_2.gif'  border='0' alt='LernVideos, Tutorials, Templates, Downloads and more...' width='88' height='31' /></a> ported by <a target='_blank' href='http://www.radiostyles.de'><img src='".THEME."images/radiostyles.jpg' style='vertical-align:middle;' alt='Radio Styles Themes' /></a>
</td>
	      </tr>
	    </table></td></tr></table>";
		//Footer Ende
}

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

global $locale,$render_caps,$aidlink;
$subject = strip_tags($subject);



echo "	  		  <table width='90%' cellpadding='0' cellspacing='0' align='center'>
	       <tr>
		   	  <td width='30' height='31' class='content-icon' align='left' valign='middle'><img src='".THEME."images/blank.gif' alt='' width='30' height='31' /></td>
	          <td width='100%'  align='left' valign='middle' class='news-title'>&nbsp;&nbsp;&nbsp;$subject</td>
			  </tr> </table>
		 <table width='100%' cellpadding='0' cellspacing='0' align='center'><tr>
		<td width='100%'  align='right' valign='middle' class='infobar'>";
	echo newsposter($info," &middot;").newsopts($info,"&middot;").itemoptions("N",$info['news_id']);
	echo "</td>
	       </tr>
		  </table>

	  <table width='100%' cellpadding='0' cellspacing='0'><tr>
	       <td class='main-body'><div style='width:90%;vertical-align:top;'>$news</div>
	</td>
	    </tr>

	 </table>";
echo "	  		  <table width='100%' cellpadding='0' cellspacing='0'>
	       <tr>
	          <td width='100%'  align='center' valign='middle'><img src='".THEME."images/trenner.jpg' alt='' width='550' height='10' /></td>
			  </tr>
		  </table><br />";

}

function render_article($subject, $article, $info) {
	
global $locale;

	echo "
	  		  <table width='90%' cellpadding='0' cellspacing='0' align='center'>
	       <tr>
		   	  <td width='30' height='31' class='content-icon' align='left' valign='middle'><img src='".THEME."images/blank.gif' alt='' width='30' height='31' /></td>
	          <td width='100%'  align='left' valign='middle' class='news-title'>&nbsp;&nbsp;&nbsp;$subject</td>
			  </tr>
		  </table>
	     <table width='100%' cellpadding='0' cellspacing='0'><tr>
	          <td class='infobar' align='right'><img src='".THEME."images/bullet.gif'> ";
	               	echo articleposter($info," &middot;").articleopts($info,"&middot;").itemoptions("A",$info['article_id']);
	           echo "</td>
			</tr>
	     </table>
		  ";
	echo "<table width='100%' cellpadding='0' cellspacing='0'>
	        <tr>
	          <td class='main-body'><div style='width:100%;vertical-align:top;'>".($info['article_breaks'] == "y" ? nl2br($article) : $article)."</div>
	        <div style='margin-top:5px'>
		    </div>
			   </td>
			   </td>
	        </tr>
		</table>\n";
		echo "<table width='100%' cellpadding='0' cellspacing='0'>
	       <tr>
	          <td width='100%'  align='center' valign='middle'><img src='".THEME."images/trenner.jpg' alt='' width='550' height='10' /></td>
			  </tr>
		  </table><br />";
}

function opentable($title) {

	echo "<table width='100%' cellpadding='0' cellspacing='0' align='center'>
	       <tr>
	          <td width='100%' align='center' valign='middle' class='ot-title'>$title</td>
			  </tr>
		  </table>
	      <table width='100%' cellpadding='0' cellspacing='0'>
		   <tr>
	          <td class='ot-main-body'>\n";
}

function closetable() {

	echo "</td>
	   </tr>
	  </table>
	  <table width='100%' cellpadding='0' cellspacing='0'>
	       <tr>
	          <td width='100%'  align='center' valign='middle'><img src='".THEME."images/trenner.jpg' alt='' width='550' height='10' /></td>
			  </tr>
		  </table><br />";
}

function openside($title, $collapse = false, $state = "on") {
	global $panel_collapse; $panel_collapse = $collapse;
		
	echo "<table width='200' cellpadding='0' cellspacing='0' align='center'>
	       <tr>
	         ";
			 			 if ($collapse == true) {
		$boxname = str_replace(" ", "", $title);
		echo "<td width='200' height='50' class='panel-title' align='center' valign='middle'>$title</td></tr><tr><td class='side-body' align='center'>".panelbutton($state, $boxname)."</td>\n";
	} else {	         echo"<td width='200' class='panel-title' align='center' valign='middle'>$title</td>";
}

	      echo "</tr>
		</table>
	    <table width='200' cellpadding='0' cellspacing='0' border='0' align='center'>
		  <tr>
	        <td class='side-body'>";
									if ($collapse == true) { echo panelstate($state, $boxname); }

}

function closeside() {

global $panel_collapse;

	if ($panel_collapse == true) { echo "</div>\n"; }

	echo "  </td>
	</tr>
	<tr><td width='200' class='panel-unten' height='30' align='center'></td>
		</tr>
	</table><br />
	";
}

?>