
				<link rel="stylesheet" href="<?php echo base_url() ?>css/jquery.fileupload-ui.css">
				<script type="text/javascript">
					$(document).ready(function(){
						$('#tabs').tabs();
					});
					$(document).ready(function(){
						$(".usun_adres").click(function(){
							var answer = confirm ("Czy na pewno usunąć?")
							if(answer) return true; else return false;
						});
						
					});
					$(document).ready(function(){
						$(".usun_newsletter").click(function(){
							var answer = confirm ("Czy na pewno usunąć?")
							if(answer) return true; else return false;
						});

						$('.add_newsletter').click(function(){
							$('.box_newsletter_message').slideToggle();
							/*'slow', function(){
									if($('.box_newsletter_message').is(":hidden")){
										$('.add_newsletter').css('width', '310');
									} else {
										$('.add_newsletter').css('width', '100%');
									}
								}*/
							$('.add_newsletter').toggleClass('an_310');
							$('.add_newsletter').toggleClass('an_100');
						});
						
					});
				</script>
				
				<br/>
                <div class="breadcrumb ui-corner-tl ui-corner-tr" style="">
                <div  class="contenerNodeBreadcrumb"><img class="breadcrumbIcon" align="absmiddle"  src='<?php echo base_url();?>images/homePage.png' /> <a href="<?php echo base_url(); ?>">Administracja</a>
                </div>
                <img src="<?php echo base_url(); ?>images/breadcrumbSeparator.png" align="absmiddle" class="separatorBreadcrumb"  />
                <div class="contenerNodeBreadcrumb"><img class="breadcrumbIcon" align="absmiddle"  src='<?php echo base_url();?>images/asterisk_orange.png' /> <a href="<?php echo base_url(); ?>admin/newsletter">Newsletter</a>
                <img class="pointerBreadcrumb" src='<?php echo base_url();?>images/pointer_breadcrumb.png' /> 
                </div>
                
                
     
                </div>
                
				<div class="ui-tabs ui-widget ui-widget-content ui-corner-all" id="tabs" >
						<ul class="ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all">
	
							<li class="ui-state-default ui-corner-top"><a href="#adresy">Adresy</a></li>
							<li class="ui-state-default ui-corner-top"><a href="#ustawienia">Wiadomości</a></li>
						</ul>
						
						
						
						<div class="ui-tabs-panel ui-widget-content ui-corner-bottom" id="adresy">
							<div>
								<form action="<?=base_url()?>admin/addadres" method="post">
									<p><strong>Dodaj  adres e-mail do listy newslettera:</strong></p><br><br>
									<p><input class="inp-form" type="text" name="email" /></p>
									<br>
									<a  class="submit button buttonBlack "><img src="<?php echo base_url(); ?>images/buttons/disc.png" />Zapisz</a>
								</form>
							</div>
							<br><br><br>
                            
                            <?php $count = 0; if($adresy && $adresy->num_rows() > 0) { ?>
                            <div id="table_box">
                            	<div class="th">
                                	<div class="title_th">Adres e-mail</div>
                                    <div class="option_th">Opcje&nbsp;</div>
                                    <div class="clr"></div>
                                </div>
                                <?php foreach($adresy->result() as $adres) { ?>
                                <div class="td  <?php if((++$count % 2) != 0) { ?>alternate-row2<?php } ?>"><?=$adres->newsletter_email?><span><a class="usun_adres" href="<?=base_url()?>admin/removeadres/<?=$adres->id_newsletter?>" title="Usuń">
                                        	<img src="<?=base_url()?>images/page_white_delete.png" alt="Usuń"/> usuń
                                        </a></span></div>
                                <?php } ?>
                            </div>
                            <?php } ?>
                            
                            
							
							
						</div>
						
						<div class="ui-tabs-panel ui-widget-content ui-corner-bottom" id="ustawienia">
                        <div class="add_newsletter an_310"><p><img src="<?php echo base_url(); ?>images/add.png" border="0">Dodaj wiadomość do newslettera &raquo;</p></div>
							<div class="box_newsletter_message">
								<form id="newsletter_config" action="<?=base_url()?>admin/addwiadomosc" method="post"> 
                                    <br>
									<p>Tytuł wiadomości</p><br>
									<p><input style="float: left;" class="inp-form" type="text" name="title" /><span style="float: left;"></span></p>
									<div class="clear"></div>
									<br><br>
									<p>Treść newslettera</p><br>
									<?php echo $this->ckeditor->editor("text", "", 'class="textarea ckeditorContener"'); ?>
									<br><br>
									<p>Nazwa nadawcy</p><br>
									<p><input class="inp-form" type="text" name="nadawca"/></p><br>
									<p>Adres e-mail nadawcy</p><br>
									<p><input class="inp-form" type="text" name="nadawca_email"/></p><br>
									<a  class="submit button buttonBlack "><img src="<?php echo base_url(); ?>images/buttons/disc.png" />Zapisz</a>
								</form>
							</div>
							<br><br><br>
                            
                            
                           <?php $count = 0; if($adresy && $adresy->num_rows() > 0) { ?>
                            <div id="table_box">
                            	<div class="th">
                                	<div class="title_th">Tytuł newslettera</div>
                                    <div class="option_th">Opcje&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div>
                                    <div class="clr"></div>
                                </div>
                                <?php foreach($wiadomosci->result() as $wiadomosc) { ?>
                                <div class="td <?php if((++$count % 2) != 0) { ?>alternate-row2<?php } ?>">
											<a title="Edytuj" href="<?=base_url()?>admin/newsletter_wiadomosc/<?=$wiadomosc->id_newsletter_config ?>"><?=$wiadomosc->newsletter_config_title?></a>
                                            <span>
                                            <a href="<?=base_url()?>admin/newsletter_wiadomosc/<?=$wiadomosc->id_newsletter_config ?>" title="Edytuj">
                                            	<img src="<?=base_url()?>images/page_white_edit.png" alt="Edytuj"/>
                                            </a>&nbsp;&nbsp;
                                            <a href="<?=base_url()?>admin/wyslijnewsletter/<?=$wiadomosc->id_newsletter_config?>" title="Wyślij newsletter">
                                            	<img src="<?=base_url()?>images/email_go.png" alt="Wyślij newsletter"/>
                                            </a>&nbsp;&nbsp;
                                            <a class="usun_newsletter" href="<?=base_url()?>admin/removewiadomosc/<?=$wiadomosc->id_newsletter_config?>" title="Usuń">
                                            	<img src="<?=base_url()?>images/page_white_delete.png" alt="Usuń"/>
                                            </a>&nbsp;&nbsp;
                                            </span>
                                 </div>
                                <?php } ?>
                            </div>
                            <?php } ?>
                            
						</div>
				</div>
				

				
				
				
				