<?php 
	echo '<div id="top_baner">&nbsp;</div>';
	echo '<div id="red_panel">';
	if(isset($user))
	{
		if(($this->uri->segment('1')=='master') or (isset($this->session->userdata['master_id'])))
		{
			echo '<div id="red_panel_col_left">Zalogowany : <b>'.$user.'</b><a class="white_link" href="/master/logout"> [ wyloguj ]</a></div>';
			echo '<div id="red_panel_col_right">PANEL MASTERA</div>';
			//echo 'PANEL MASTERA';			
		}
		elseif(($this->uri->segment('1')=='superadmin') or (isset($this->session->userdata['di_sa']))) 
		{
			echo '<div id="red_panel_col_left">Zalogowany : <b>'.$user.'</b><a class="white_link" href="/superadmin/logout"> [ wyloguj ]</a></div>';
			echo '<div id="red_panel_col_right">PANEL SUPERADMINA</div>';
			//echo 'PANEL ADMINA';
		}
		elseif(($this->uri->segment('1')=='afiliant') or (isset($this->session->userdata['id']))) 
		{
			echo '<div id="red_panel_col_left">Zalogowany : <b>'.$user.'</b><a class="white_link" href="/afiliant/logout"> [ wyloguj ]</a></div>';
			echo '<div id="red_panel_col_right">PANEL AFILIANTA</div>';
			//echo 'PANEL AFILIANTA';
		}
		else
		{
			echo '<div id="red_panel_col_left">Zalogowany : <b>'.$user.'</b><a class="white_link" href="/admin/logout"> [ wyloguj ]</a></div>';
			echo '<div id="red_panel_col_right">PANEL USERA</div>';
			//echo 'PANEL USERA';
		}
	}
	else
	{
			echo '<div id="red_panel_col_left">Witaj</div>';
			echo '<div id="red_panel_col_right">PANEL UŻYTKOWNIKA</div>';		
	}
	echo '</div>';
		
?>