
<div id="content">

	<!--  start page-heading -->
	<div id="page-heading">
		<!--       <h1>Add product</h1> -->
	</div>
	<!-- end page-heading -->
	<table>
	<tr>
	
	<td>
		<table border="0" width="100%" cellpadding="0" cellspacing="0" id="content-table">
		<tr>
			<th rowspan="3" class="sized"><img src="<?php echo base_url(); ?>images/shared/side_shadowleft.jpg" width="20" height="300" alt="" /></th>
			<th class="topleft"></th>
			<td id="tbl-border-top">&nbsp;</td>
			<th class="topright"></th>
			<th rowspan="3" class="sized"><img src="<?php echo base_url(); ?>images/shared/side_shadowright.jpg" width="20" height="300" alt="" /></th>
		</tr>
		<tr>
			<td id="tbl-border-left"></td>
			<td>
			<!--  start content-table-inner ...................................................................... START -->
			<div id="content-table-inner">
			
				<!--  start table-content  -->
				<div id="table-content">
				
				<?php if(  $this->messages->get_message('yellow', false)  /*get_cookie('yellow')/*$this->session->userdata('yellow')*/) { ?>
					<!--  start message-yellow -->
					<div id="message-yellow">
					<table border="0" width="100%" cellpadding="0" cellspacing="0">
					<tr>
						<td class="yellow-left"><!--You have a new message. <a href="">Go to Inbox.</a>--><?php echo $this->messages->get_message('yellow');
						//echo $this->session->userdata('yellow'); echo get_cookie('yellow');
						?></td>
						<td class="yellow-right"><a class="close-yellow"><img src="<?php echo base_url(); ?>images/table/icon_close_yellow.gif"   alt="" /></a></td>
					</tr>
					</table>
					</div>
					<!--  end message-yellow -->
				<?php } ?>	
					
				<?php if(  $this->messages->get_message('red', false)  /*get_cookie('red')/*$this->session->userdata('red')*/) { ?>
					<!--  start message-red -->
					<div id="message-red">
					<table border="0" width="100%" cellpadding="0" cellspacing="0">
					<tr>
						<td class="red-left"><!--Error. <a href="">Please try again.</a>--><?php echo $this->messages->get_message('red');
						//echo $this->session->userdata('red'); echo get_cookie('red')
						?></td>
						<td class="red-right"><a class="close-red"><img src="<?php echo base_url(); ?>images/table/icon_close_red.gif"   alt="" /></a></td>
					</tr>
					</table>
					</div>
					<!--  end message-red -->
				<?php } ?>	
				
				<?php if(  $this->messages->get_message('blue', false)  /*get_cookie('blue')/*$this->session->userdata('blue')*/) { ?>
					<!--  start message-blue -->
					<div id="message-blue">
					<table border="0" width="100%" cellpadding="0" cellspacing="0">
					<tr>
						<td class="blue-left"><!--Welcome back. <a href="">View my account.</a> --><?php echo $this->messages->get_message('blue');
						//echo $this->session->userdata('blue'); echo get_cookie('blue');
						?></td>
						<td class="blue-right"><a class="close-blue"><img src="<?php echo base_url(); ?>images/table/icon_close_blue.gif"   alt="" /></a></td>
					</tr>
					</table>
					</div>
					<!--  end message-blue -->
				<?php } ?>
				
				<?php if(  $this->messages->get_message('green', false)  /*get_cookie('green')/*$this->session->userdata('green')*/) { ?>
					<!--  start message-green -->
					<div id="message-green">
					<table border="0" width="100%" cellpadding="0" cellspacing="0">
					<tr>
						<td class="green-left"><!--Product added sucessfully. <a href="">Add new one.</a>--><?php echo $this->messages->get_message('green');
						//echo $this->session->userdata('green'); echo get_cookie('green');
						?></td>
						<td class="green-right"><a class="close-green"><img src="<?php echo base_url(); ?>images/table/icon_close_green.gif"   alt="" /></a></td>
					</tr>
					</table>
					</div>
					<!--  end message-green -->
				<?php } ?>
				<div >
				<?php //echo $mainTree; 
				?>
				
				
				<div>
				<form id="mainform" action="<?php echo base_url(); ?>administrator/setpluginsforuser" method="post">   <!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
				
				<ul id="pluginy">
				<?php $lp=0; if($plugins && $plugins->num_rows()>0) foreach($plugins->result() as $plugin) { 
					if((++$lp%2) == 0) $alt_row = ' class="alternate-row"'; else $alt_row = '';
				?>
				<li id="plugin_<?php echo $plugin->ID_plugins; ?>">
					<input 
					<?php if($user_plugins && $plugins->num_rows()>0) foreach($user_plugins->result() as $up) {
						if($up->plugins_user_plugin_id == $plugin->ID_plugins) {
							echo 'checked="checked"';
							break;
						}
					} ?> 
					name="plugins[]" value="<?php echo $plugin->ID_plugins; ?>" type="checkbox"/>
					<span><?php echo $plugin->plugins_nazwa; ?></span>
				</li>
				
				
				<?php } ?>
				</ul>
				</div>
				<!--  end product-table................................... --> 
				<input type="hidden" name="user_id" value="<?php echo $this->uri->segment(3); ?>" />
				<input type="submit" value="Wybierz zaznaczone pluginy" />
				</form>
				</div>
				
				
				</div>
				<!--  end table-content  -->
				
			
			
			
			<div class="clear"></div>
				<div class="clear"></div>
			
			</div>
			<!--  end content-table-inner ............................................END  -->
			</td>
			<td id="tbl-border-right"></td>
		</tr>
		<tr>
			<th class="sized bottomleft"></th>
			<td id="tbl-border-bottom">&nbsp;</td>
			<th class="sized bottomright"></th>
		</tr>
		</table>
	</td>
	</tr>
	</table>
	<div class="clear">&nbsp;</div>

</div>
<!--  end content -->