
				<!--  start table-content  -->
				<div id="table-content">
                <div class="breadcrumb ui-corner-tl ui-corner-tr">
                <div style="padding-top:0px;" class="contenerNodeBreadcrumb" ><img class="breadcrumbIcon" align="absmiddle"  src="<?php echo base_url();?>images/homePage.png" /><a href="<?php echo base_url(); ?>">Strona WWW</a><img src="<?php echo base_url(); ?>images/breadcrumbSeparator.png" align="absmiddle" style="" /></div>
                <?php
				$counter = count($parents);
				$count = 1;
				 foreach($parents as $node){
					 
					echo '<div class="contenerNodeBreadcrumb" ><img src='.base_url().'images/newspaper.png class="breadcrumbIcon" align="absmiddle" /> <a href="'.base_url().'admin/wyswietl/'.$node->id.'">'.truncate($node->nodeData['name']).'</a>';
					if($counter==$count) echo '<img class="pointerBreadcrumb" src='.base_url().'images/pointer_breadcrumb.png /> ';
					echo "</div>";
					if($counter!=$count) echo '<img class="separatorBreadcrumb"  src="'.base_url().'images/breadcrumbSeparator.png"  align="absmiddle" />'; 
					
					
				$count++; } 
				
				?>
				<a id="<?php echo $this->uri->segment(3);?>" class="dodaj_nowy_podwezel" href="#"><img src="<?=base_url(); ?>images/add_insite_cms_main.png" border="0" style="float:right;"></a>
                </div>
               <?php /*?> <div id="navigationContener ">
				<p ><img src="<?php echo base_url(); ?>images/navigation_head_icon.png" align="absmiddle" style="" /> <?php foreach($parents as $node){
					echo '<img src="'.base_url().'images/next_navigation.png" align="absmiddle" style="" /><a href="'.base_url().'admin/wyswietl/'.$node->id.'">'.$node->nodeData['name'].'</a>';
				 } 
				?> </p>
                
                </div><?php */?>
				
					
					<script type="text/javascript">
					$(document).ready(function(){
						$("select[name=template_type] option").hover(function(){
							$("#podglad span").hide();
							var id = $(this).attr("value");
							$("#podglad #"+id).show();
						}, function(){
							/*var id = $(this).attr("value");
							$("#podglad #"+id).hide();*/
							$("#podglad span").hide();
						});
					});
					
					$(document).ready(function(){
						
						$("#zmienNazwe").dialog({ 
							autoOpen: false,
							//modal: true,
							width: 600,
							//position: [500,100],
							close: function(event, ui) {
								$(".ui-overlay").attr("style", "display:none;");
							},
							buttons:{
								"Anuluj": function(){
									$(this).dialog("close");
									$(".ui-overlay").attr("style","display:none;");
								},
								"Zapisz": function(){
									$(this).find("form input[type=submit]").click();
								}
							}
						});
	
						$("a.zmienNazwe").live('click', function(){

							$("div#zmienNazwe form input[name=module_id]").attr("value", $(this).attr("id"));
							$("div#zmienNazwe form input[name=name]").attr("value", $(this).parents("li").find("span.moduleTitle").text());
							var title_show = $(this).parents("li").find(".moduleTitleShow").text();
							if(title_show == 1){
								$("div#zmienNazwe form input[name=name_show]").attr("checked", true);
							} else {
								$("div#zmienNazwe form input[name=name_show]").attr("checked", false);
							}
							
							$(".ui-overlay").attr("style", "display:block;");
							$("#zmienNazwe").dialog("open");
							return false;
						});
					});
					</script>
					
					<div id="zmienNazwe" title="Zmień nazwę modułu" >
						<h2><strong>Zmień nazwę modułu</strong></h2>
						<form action="<?php echo base_url(); ?>admin/editmodulename" method="post">
							<table border="0" cellpadding="0" cellspacing="0"  id="id-form">
								<tr>
									<th valign="top">Nazwa:</th>
									<td><table><tr id="input-name">
										<td><input type="text" class="inp-form" name="name" value=""/></td>
										<td class="error-td">
										
										</td>
									</tr></table></td>
									
								</tr>
								<tr>
									<td><input id="name_show" type="checkbox" name="name_show"/></td><td><label for="name_show">Wyświetl nazwę modułu na stronie</td>
								</tr>

							</table>

							<input type="hidden" name="module_id" value="" />
							<input type="hidden" name="tree_id" value="<?php echo $this->uri->segment(3);?>" />
							<input style="display: none;" type="submit" value="Edytuj" />
						</form>
					</div>
				
				
					<script type="text/javascript">
					$(document).ready(function(){
						$('#tabs').tabs();
						var src = $('div#edytujArtykulForm #tu_plik img').attr('src');
						
						//$(".showtooltip").tinyTips('<center><img src="'+src+'" /></center>');
					});
					</script>
					<script type="text/javascript" src="<?php echo base_url(); ?>js/submitDelete.js"></script>
					  
					
					
			<fieldset  title="Informacje o stronie" style="border:1px solid #AAAAAA; padding:8px; -moz-border-radius: 5px 5px 5px 5px;">
            <legend style="padding-left:4px; padding-right:4px; font-weight:bold; font-size:13px;">Informacje o stronie</legend>
						


						<span style="margin-right:25px;"><img src="<?php echo base_url(); ?>images/calendar.png" align="absmiddle" style="margin-right:7px;" /><strong>Data stworzenia</strong>: <?php echo $nodeData['added']; ?></span>
						<span style="margin-right:25px;"><img src="<?php echo base_url(); ?>images/world.png"  align="absmiddle" style="margin-right:7px;" /><strong>Czy opublikowany:</strong>
<?php if ($nodeData['published']==1) { ?><img src=" <?php echo base_url(); ?>images/tick.png"  align="absmiddle"  /> <?php }  else { ?> <img src="<?php echo base_url(); ?>images/cross.png"  align="absmiddle"  /> <?php } ?></span>
						<span style="margin-right:25px;"><img src="<?php echo base_url(); ?>images/world_w.png"  align="absmiddle" style="margin-right:7px;" /><a href="<?php echo $nodeData['link'] == 1 ? prep_url($nodeData['link_val']) : reduce_double_slashes(prep_url($adres).'/'.$lang_code.$nodeData['name_url'])?>" style="text-decoration:underline;" target='blank'><strong>Podgląd on-line</strong></a></span>
                        </fieldset>
                 <br />
<br />


					
					
					<div class="ui-tabs ui-widget ui-widget-content ui-corner-all" id="tabs" >
						<ul class="ui-tabs-with-img ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all">
							<?php /*?><li class="ui-state-default ui-corner-top ui-tabs-selected ui-state-active"><img src="<?php echo base_url(); ?>images/document_check_compatibility.png" /><a href="#trescGlowna">Treść główna</a></li><?php */?> 
							<li class="ui-state-default ui-corner-top ui-tabs-selected ui-state-active"><img src="<?php echo base_url(); ?>images/brick.png" /><a href="#moduly">Moduły(<?php echo $modules->num_rows(); ?>)</a></li>
		
							<li class="ui-state-default ui-corner-top"><img src="<?php echo base_url(); ?>images/cog_edit.png" /><a href="#konfiguracja">Konfiguracja</a></li>
							<?php /*?><li class="ui-state-default ui-corner-top"><img src="<?php echo base_url(); ?>images/css_valid.png" /><a href="#css">Arkusz stylów css</a></li><?php */?>
						</ul>
						<?php /*?>
						<div class="ui-tabs-panel ui-widget-content ui-corner-bottom" id="trescGlowna">
							<?php if($nodeData['link'] == 0) { ?>
							<form action="<?php echo base_url(); ?>admin/editnodetext" method="post" enctype="multipart/form-data">
								<!--<textarea id="ckeditorContener" class="textarea ckeditorContener" name="text"><?php echo $nodeData['text']; ?></textarea>-->
			<?php echo $this->ckeditor->editor("text", $nodeData['text'], 'id="ckeditorContener" class="textarea ckeditorContener"'); ?>
			
								
								
								<input type="hidden" name="id" value="<?php echo $this->uri->segment(3); ?>" id="nodeIdEdit" />
								<input type="hidden" name="action" value="edit" />
								<input type="hidden" name="redi" value="<?php echo $this->uri->segment(2).'/'.$this->uri->segment(3); ?>" />
								
								<br />
								<a  class="submit button buttonBlack "><img src="<?php echo base_url(); ?>images/buttons/disc.png" />Zapisz</a>
							</form>
							<?php } else { ?>
								<h2>Ta zakładka jest linkiem do zasobów zewnętrznych:<br/> <a href="<?php echo prep_url($nodeData['link_val']); ?>"><?php echo $nodeData['link_val']?></a></h2>
							<?php } ?>
						</div><?php */?>
						<div class="ui-tabs-panel ui-widget-content ui-corner-bottom " id="moduly">
							
						
							<div id="modules">
                       
								<p align="center"><button id="button_module" class=" button buttonGreen addIcon"   ><img src="<?php echo base_url(); ?>images/brick_add.png" />Dodaj nowy moduł</button></p><br/>
								<?php if($modules && $modules->num_rows()>0) {
								echo '<ul id="sortable">';
									foreach($modules->result() as $row) {
								?>
									
									
								<li class="ui-state-default moduleRowContener ui-corner-all" style="position:relative;" id="module_<?php echo $row->ID_modules; ?>"><a><span class="moduleTitle"><?php echo $row->modules_name; ?></span></a><span class="moduleTypeMini">(Rodzaj: <strong><?php echo $row->modules_type; ?></strong>)</span>
                                <span class="moduleTitleShow" style="display: none;"><?php echo $row->modules_name_show; ?></span>
                                <span style="position:absolute; right:0px; margin-right:10px;">
                             <?php if($row->modules_type != 'Formularz zgłoszeniowy') { ?>   
							<a  class=" button buttonLightGrey" href="<?php echo base_url(); ?>admin/module/<?php echo $row->ID_modules; ?>"><img src="<?php echo base_url(); ?>images/pencil.png" />Edycja</a>
							<?php } ?>
                             <a id="<?php echo $row->ID_modules ?>" class=" button buttonLightGrey zmienNazwe" href="<?php echo base_url(); ?>admin/modul_ustawienia/<?php echo $row->ID_modules; ?>"><img src="<?php echo base_url(); ?>images/tools.png" />Zmień nazwę</a>
                                    <a  class="usunmodul button buttonLightGrey" href="<?php echo base_url(); ?>admin/removemodule/<?php echo $row->ID_modules; ?>/<?php echo $this->uri->segment(3); ?>/<?php echo url_title($row->modules_type); ?>"><img src="<?php echo base_url(); ?>images/bin.png" />Usuń</a>
							
                                    
							
                                     
                                    </span>
									
																
								</li>
										
		
		
									
								<?php } ?>
								</ul>
								<p style="display: none;"><button disabled="disabled" id="button_update_order" style="width: 200px;">Zatwierdź kolejność</button></p>
								<?php } ?>
									
							</div>
							
						</div>
						
						<div class="ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide" id="konfiguracja">
							<div id="edytujArtykulForm" >
								<div id="podglad" style="position: absolute; top: 60px; right: 10px; width: 270px; height: 300px; ">
									<?php if($local_templates && $local_templates->num_rows() > 0) foreach($local_templates->result() as $lt) { ?>
									<span style="display: none;" id="<?=$lt->ID_article_templates?>"><p>Podgląd układu szablonu:</p><br/><img src="<?=base_url().$lt->article_templates_folder.'thumb_'.$lt->article_templates_photo?>" /></span>
									<?php } ?>
								</div>
								
								<form action="<? echo base_url(); ?>admin/editnode" method="post"  enctype="multipart/form-data">
									<table border="0" cellpadding="0" cellspacing="0"  id="id-form">
									<tr>
										<th valign="top">Nazwa:</th>
										
											<td><input type="text" class="inp-form" name="name" value="<?php echo $nodeData['name']; ?>" /></td>
											<td class="error-td"></td>
										
									</tr>
									<tr>
										<th valign="top">Zmień na link:</th>
										<td align="left"><input id="checklink" type="checkbox" class="inp-form" name="link" <?php if ($nodeData['link']==1) echo 'checked="checked"' ?>/>
										<input style="<?php if($nodeData['link'] == "0" ) echo 'display: none;'; ?>" id="link_val" type="text" class="inp-form" name="link_val" value="<?php echo $nodeData['link_val']?>"/></td>
										<td></td>
									</tr>
					
									<?php /*<tr id="edit-tr-text">
										<th valign="top">Treść:</th>
										<td><span class="textarea"></span></td>
										<td></td>
									</tr> */ ?>
									<!--<input type="hidden" name="text" value="<?php echo $nodeData['text']; ?>" />-->
									<tr id="edit-tr-template_type" style="<?php if($nodeData['link'] == "1" ) echo 'display: none;'; ?>">
										<th valign="top">Szablon dla artykułu:</th>
										<td align="left">	
										<select  class=" ___styledselect_form_1" name="template_type" >
										
										<!--<option <?php if($nodeData['template'] == 1) echo 'selected="selected"'; ?> value="1">Szablon 1</option>
										<option <?php if($nodeData['template'] == 2) echo 'selected="selected"'; ?> value="2">Szablon 2</option>
										<option <?php if($nodeData['template'] == 3) echo 'selected="selected"'; ?> value="3">Szablon 3</option>-->
										
								
										<?php if($local_templates && $local_templates->num_rows() > 0) foreach ($local_templates->result() as $lt) { ?>
										<option <?php if($nodeData['template'] == $lt->ID_article_templates) echo 'selected="selected"'; ?> value="<?php echo $lt->ID_article_templates; ?>" ><?php echo $lt->article_templates_name; ?></option>
										<?php } ?>
								
										</select>
										</td>
										<td></td>
									</tr>	
									<tr id="edit-tr-photo" style="background-color:#f0f0f0;<?php if($nodeData['link'] == "1" ) echo 'display: none;'; ?>">
										<th valign="top">Zdjęcie dla artykułu:</th>
										<td align="left" id="tu_plik"><input id="checkphoto" type="checkbox" class="inp-form" name="photo" <?php if($nodeData['photo'] != '' ) echo 'checked="checked"'; ?>/><?php if($nodeData['photo'] != '' ) { ?> <img style='width: 30px; height: 30px;' class='showtooltip' src="<?php echo prep_url($adres).'/foto/nodes/thumb_'.$nodeData['photo']; ?>"  /><?php } ?></td>
										<td></td>
									</tr>
									
									<tr style="background-color:#f0f0f0; <?php if($nodeData['photo'] == "" ) echo 'display: none;'; ?><?php if($nodeData['link'] == "1" ) echo 'display: none;'; ?>" id="edit-tr-plik"   >
										<th style="font-weight:normal; font-size:11px; text-align:right;">Wybierz nowe zdjęcie:</th>
										<td><input type="FILE" class="file_1" name="plik" /></td>
										<td></td>
									</tr>
														
									<tr>
										<th valign="top">Opublikowany:</th>
										<td align="left"><input id="checkpublished" type="checkbox" name="published" <?php if ($nodeData['published']==1) echo 'checked="checked"' ?>/></td>
										<td></td>
									</tr>
									<!--<tr>
										<th valign="top">W mapie strony:</th>
										<td align="left"><input id="checksitemap" type="checkbox"  name="sitemap" <?php if ($nodeData['sitemap']==1) echo 'checked="checked"' ?>/></td>
										<td></td>
									</tr>
									
									--><tr>
										<th valign="top">Wyświetl w menu</th>
										<td align="left"><input id="checklink" type="checkbox" name="menu" <?php if ($nodeData['menu']==1) echo 'checked="checked"' ?>/></td>
										<td></td>
									</tr>
									<tr style="background-color:#f0f0f0;">
									  <th colspan="2" align="left" valign="top">Ustawienia Metadanych do pozycjonowania</th>
									  <td></td>
									  </tr>
                                    
                                    
                                    <tr id="edit-tr-title" style="background-color:#f0f0f0;<?php if($nodeData['link'] == "1" ) echo 'display: none;'; ?>">
										<th align="right" valign="top" style="font-weight:normal; text-align:right; font-size:11px;">Tytuł:</th>
										<td align="left"><input type="text" class="inp-form" name="title" value="<?php echo $nodeData['title']; ?>" /></td>
										<td></td>
									</tr>
									<tr id="edit-tr-description" style="background-color:#f0f0f0;<?php if($nodeData['link'] == "1" ) echo 'display: none;'; ?>">
										<th align="right" valign="top" style="font-weight:normal; text-align:right; font-size:11px;">Opis:</th>
										<td align="left"><input type="text" class="inp-form" name="description" value="<?php echo $nodeData['description']; ?>" /></td>
										<td></td>
									</tr>
                                    
									<!--<tr>
										<th valign="top">Pokaż miniatury zawartości</th>
										<td align="left"><input id="checkmini" type="checkbox"  name="mini" <?php if ($nodeData['mini']==1) echo 'checked="checked"' ?>/></td>
										<td></td>
									</tr> 
									<tr>
										<th valign="top">Ten artykuł jako menu dodatkowe</th>
										<td align="left"><input id="checkmenu2" type="checkbox"  name="menu2" <?php if ($nodeData['menu2']==1) echo 'checked="checked"' ?>/></td>
										<td></td>
									</tr>
									--></table>
				          <input type="hidden" name="id" value="<?php echo $this->uri->segment(3); ?>" id="nodeIdEdit" />
									<input type="submit" name="submit" value="Zapisz" class="save button buttonBlack" />
                                        
									<input type="hidden" name="action" value="edit" />
									<input type="hidden" name="redi" value="<?php echo $this->uri->segment(2).'/'.$this->uri->segment(3); ?>" />
								</form>
							</div>
						</div>
						<?php /*?>
						<div class="ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide" id="css">
						<div class="information-blue ui-corner-all">
                                            <table cellspacing="0" cellpadding="0" border="0">
                                            <tr>
                                            <td class="icon"><img src="<?php echo base_url(); ?>images/information.png" /></td>
                                            <td>Wszelkie modyfikacje wykonywane są na własną odpowiedzialność</td>
                                            <td align="right" valign="top"><img class="closeInformation" src="<?php echo base_url(); ?>images/cross_grey_small.png" /></td>
                                            </tr>
                                            </table>
			     
					</div>
						<p></p>
						<form method="post" action="<?=base_url()?>admin/zapiszcss">
							
							<input type="hidden" name="id" value="<?php echo $this->uri->segment(3); ?>" />
							<div><textarea class="css_box_edition" name="css"><?=$css?></textarea></div>
							<input type="submit" name="submit" value="Zapisz" class="save button buttonBlack" />
						</form>
						</div><?php */?>
					</div>
					<br/>
					
			
							
				</div>
				<div class="clear"></div>
				
				
				
					
				
				