<?php

define('LEGEND_INDEX', 1);
define('LEGEND_FORUM', 2);

class TabLegend extends TabPage
{
	function TabLegend($type)
	{
		$this->title = _MD_TAB_LEGEND;
		switch($type)
		{
			case LEGEND_INDEX:
			{
				$this->init_index();
				break;
			}
			case LEGEND_FORUM:
			{
				$this->init_forum();
				break;
			}
		}
	}

	function init_index()
	{
		global $bbImage;

		$this->content  = '<table width="100%"><tr><td>';
		$this->content .= '<img src="'.$bbImage['newposts'].'" alt="" align=middle> = '._MD_NEWPOSTS.'.<br />';
		$this->content .= '<img src="'.$bbImage['folder'].'" alt="" align=middle> = '._MD_NONEWPOSTS;
		$this->content .= '</td></tr></table>';
	}

	function init_forum()
	{
		global $bbImage;

		$this->content  = '<table width="100%">';
		$this->content .= '<tr>';
		$this->content .= '<td><img src="'.$bbImage['newposts'].'" alt="" align=middle> = '._MD_NEWPOSTS.'.</td>';
		$this->content .= '<td><img src="'.$bbImage['hot_newposts'].'" alt="" align=middle> = '.sprintf(_MD_MORETHAN,$forum_data['hot_threshold']).'.</td>';
		$this->content .= '</tr>';
		$this->content .= '<tr>';
		$this->content .= '<td><img src="'.$bbImage['folder'].'" alt="" align=middle> = '._MD_NONEWPOSTS.'.</td>';
		$this->content .= '<td><img src="'.$bbImage['hot_folder'].'" alt="" align=middle> = '._MD_NEWPOSTS.'.</td>';
		$this->content .= '</tr>';
		$this->content .= '<tr>';
		$this->content .= '<td><img src="'.$bbImage['locked'].'" alt="" align=middle> = '._MD_TOPICLOCKED.'.</td>';
		$this->content .= '<td><img src="'.$bbImage['sticky'].'" alt="" align=middle> = '._MD_TOPICSTICKY.'.</td>';
		$this->content .= '</tr>';
		$this->content .= '</table>';
	}
}

?>