
<div id="content">

	<!--  start page-heading -->
	<div id="page-heading">
		      <h1>Edytuj użytkownika</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; 
				$admin='';$tekst='';$ustawienia_strony='';$galeria='';$wideo='';$polecane='';$aktualnosci='';$fz='';$fk='';$faq='';$pliki='';$mapa='';$baner='';$slider='';$multilang='';$baner_glowny='';$aktualnosci_glowne='';$dane_kontaktowe='';$logo='';$newsletter='';$slider_glowny='';
				if($user && $user->num_rows() > 0) {
					$row = $user->row();
					if($row->user_admin == 1) $admin='checked="checked"';
					if($row->user_podstrony == 1) $tekst='checked="checked"';
					//if($row->user_ustawienia_strony == 1) $ustawienia_strony='checked="checked"';
					if($row->user_galeria == 1) $galeria='checked="checked"';
					if($row->user_wideo == 1) $wideo='checked="checked"';
					if($row->user_polecane == 1) $polecane='checked="checked"';
					if($row->user_aktualnosci == 1) $aktualnosci='checked="checked"';
					if($row->user_formularz_zgloszeniowy == 1) $fz='checked="checked"';
					if($row->user_formularz_kontaktowy == 1) $fk='checked="checked"';
					if($row->user_faq == 1) $faq='checked="checked"';
					if($row->user_pliki == 1) $pliki='checked="checked"';
					if($row->user_mapa == 1) $mapa='checked="checked"';
					if($row->user_baner == 1) $baner='checked="checked"';
					if($row->user_slider == 1) $slider='checked="checked"';
					
					if($row->user_baner_glowny == 1) $baner_glowny='checked="checked"';
					if($row->user_aktualnosci_glowne == 1) $aktualnosci_glowne='checked="checked"';
					if($row->user_dane_kontaktowe == 1) $dane_kontaktowe='checked="checked"';
					if($row->user_logo == 1) $logo='checked="checked"';
					if($row->user_newsletter == 1) $newsletter='checked="checked"';
					if($row->user_slider_glowny == 1) $slider_glowny='checked="checked"';
					
					if($row->user_multilang == 1) $multilang='checked="checked"';
				?>
				<form action="<?php echo base_url(); ?>administrator/klient_edytuj/<?php echo $row->ID_users; ?>" method="post" enctype="multipart/form-data">
				<table border="0" cellpadding="0" cellspacing="0"  id="id-form">
				<tr>
					<th valign="top">Login:</th>
					<td><input type="text" class="inp-form" name="name" value="<?php echo $row->user_login; ?>"/></td>
					<td></td>
				</tr>
				<tr>
					<th valign="top">Adres e-mail:</th>
					<td><input type="text" class="inp-form" name="mail" value="<?php echo $row->user_mail; ?>"/></td>
					<td></td>
				</tr>
				<tr>
					<th valign="top">Adres strony internetowej:</th>
					<td><input type="text" class="inp-form" name="pagename" value="<?php echo $row->user_pagename; ?>"/></td>
					<td></td>
				</tr>
				<!--
				<tr>
					<th valign="top">Nazwa folderu na serwerze:</th>
					<td><input type="text" class="inp-form" name="folder" value="<?php echo $row->user_folder; ?>"/></td>
					<td></td>
				</tr>
				-->
				<!--<tr>
					<th valign="top">Adres e-mail dla kontaktu:</th>
					<td><input type="text" class="inp-form" name="contact_mail" value="<?php echo $row->user_contact_mail; ?>"/></td>
					<td></td>
				</tr>
				-->
				
				<tr><td></td></tr>
                <tr>
					<td  colspan="3"  bgcolor="#eaeaea" valign="middle" align="center" height="30" style="font-size:15px; font-weight:bold;">Dane teleadresowe</td>
				</tr>
				<tr>
					<th valign="top">Imię:</th>
					<td><input type="text" class="inp-form" name="imie" value="<?php echo $row->user_imie; ?>"/></td>
					<td></td>
				</tr>
				<tr>
					<th valign="top">Nazwisko:</th>
					<td><input type="text" class="inp-form" name="nazwisko" value="<?php echo $row->user_nazwisko; ?>"/></td>
					<td></td>
				</tr>
				<tr>
					<th valign="top">Nazwa firmy:</th>
					<td><input type="text" class="inp-form" name="nazwa_firmy" value="<?php echo $row->user_nazwa_firmy; ?>"/></td>
					<td></td>
				</tr>
				<tr>
					<th valign="top">Adres firmy:</th>
					<td><input type="text" class="inp-form" name="adres_firmy" value="<?php echo $row->user_adres_firmy; ?>"/></td>
					<td></td>
				</tr>
				<tr>
					<th valign="top">NIP:</th>
					<td><input type="text" class="inp-form" name="nip" value="<?php echo $row->user_nip; ?>"/></td>
					<td></td>
				</tr>
				<tr>
					<th valign="top">Regon:</th>
					<td><input type="text" class="inp-form" name="regon" value="<?php echo $row->user_regon; ?>"/></td>
					<td></td>
				</tr>
				<tr>
					<th valign="top">Telefon:</th>
					<td><input type="text" class="inp-form" name="telefon" value="<?php echo $row->user_telefon; ?>"/></td>
					<td></td>
				</tr>
				<tr>
					<th valign="top">E-mail:</th>
					<td><input type="text" class="inp-form" name="e-mail" value="<?php echo $row->user_email; ?>"/></td>
					<td></td>
				</tr>
                <tr>
					<td  colspan="3"  bgcolor="#eaeaea" valign="middle" align="center" height="30" style="font-size:15px; font-weight:bold;">Opłaty</td>
				</tr>
				<tr>
					<th valign="top">Cena serwera:</th>
					<td><input type="text" class="inp-form" name="cena_serwera" value="<?php echo $row->user_cena_serwera; ?>"/></td>
					<td></td>
				</tr>
				<tr>
					<th valign="top">Cena domeny:</th>
					<td><input type="text" class="inp-form" name="cena_domeny" value="<?php echo $row->user_cena_domeny; ?>"/></td>
					<td></td>
				</tr>
				<tr>
					<th valign="top">Ostatnia płatność:</th>
					<td><input type="text" class="inp-form date-pick" name="ostatnia_platnosc" value="<?php 
								$date = explode('-', $row->user_ostatnia_platnosc);
								echo $date[2].'/'.$date[1].'/'.$date[0];
								?>"/></td>
					<td></td>
				</tr>
				<tr>
					<th valign="top">Kolejna płatność:</th>
					<td><input type="text" class="inp-form date-pick" name="kolejna_platnosc" value="<?php 
								$date = explode('-', $row->user_kolejna_platnosc);
								echo $date[2].'/'.$date[1].'/'.$date[0];
								?>"/></td>
				</tr>
				
				<tr><td></td></tr>
                <tr>
					<td  colspan="3"  bgcolor="#eaeaea" valign="middle" align="center" height="30" style="font-size:15px; font-weight:bold;">Ustawienia modułów</td>
				</tr>
				<!--<tr>
					<th valign="top">Uprawnienia administratora:</th>
					<td><input type="checkbox" class="inp-form" name="admin" <?php echo $admin; ?>/></td>
					<td></td>
				</tr>-->
				<tr>
					<th valign="top">Tekst:</th>
					<td><input type="checkbox" class="inp-form" name="tekst" <?php echo $tekst; ?>/></td>
					<td></td>
				</tr>
				<tr>
					<th valign="top">Galeria:</th>
					<td><input type="checkbox" class="inp-form" name="galeria" <?php echo $galeria; ?>/></td>
					<td></td>
				</tr>
				<tr>
					<th valign="top">Galeria wideo:</th>
					<td><input type="checkbox" class="inp-form" name="wideo" <?php echo $wideo; ?>/></td>
					<td></td>
				</tr>
				<tr>
					<th valign="top">Polecane artykuły:</th>
					<td><input type="checkbox" class="inp-form" name="polecane" <?php echo $polecane; ?>/></td>
					<td></td>
				</tr>
				<tr>
					<th valign="top">Aktualności:</th>
					<td><input type="checkbox" class="inp-form" name="aktualnosci" <?php echo $aktualnosci; ?> /></td>
					<td></td>
				</tr>
				<tr>
					<th valign="top">Formularz zgłoszeniowy:</th>
					<td><input type="checkbox" class="inp-form" name="fz" <?php echo $fz; ?> /></td>
					<td></td>
				</tr>
				<tr>
					<th valign="top">Formularz kontaktowy:</th>
					<td><input type="checkbox" class="inp-form" name="fk" <?php echo $fk; ?> /></td>
					<td></td>
				</tr>
				<tr>
					<th valign="top">FAQ:</th>
					<td><input type="checkbox" class="inp-form" name="faq" <?php echo $faq; ?> /></td>
					<td></td>
				</tr>
				<tr>
					<th valign="top">Pliki:</th>
					<td><input type="checkbox" class="inp-form" name="pliki" <?php echo $pliki; ?> /></td>
					<td></td>
				</tr>
				<tr>
					<th valign="top">Mapa:</th>
					<td><input type="checkbox" class="inp-form" name="mapa" <?php echo $mapa; ?> /></td>
					<td></td>
				</tr>
				<tr>
					<th valign="top">Baner:</th>
					<td><input type="checkbox" class="inp-form" name="baner" <?php echo $baner; ?> /></td>
					<td></td>
				</tr>
				<tr>
					<th valign="top">Slider:</th>
					<td><input type="checkbox" class="inp-form" name="slider" <?php echo $slider; ?> /></td>
					<td></td>
				</tr>
                <tr>
					<td  colspan="3"  bgcolor="#eaeaea" valign="middle" align="center" height="30" style="font-size:15px; font-weight:bold;">Ustawienia strony</td>
				</tr>
				<tr>
					<th valign="top">Baner główny:</th>
					<td><input type="checkbox" class="inp-form" name="baner_glowny" <?php echo $baner_glowny; ?> /></td>
					<td></td>
				</tr>
				<tr>
					<th valign="top">Aktualności główne:</th>
					<td><input type="checkbox" class="inp-form" name="aktualnosci_glowne" <?php echo $aktualnosci_glowne; ?> /></td>
					<td></td>
				</tr>
				<tr>
					<th valign="top">Dane kontaktowe:</th>
					<td><input type="checkbox" class="inp-form" name="dane_kontaktowe" <?php echo $dane_kontaktowe; ?> /></td>
					<td></td>
				</tr>
				<tr>
					<th valign="top">Logo:</th>
					<td><input type="checkbox" class="inp-form" name="logo" <?php echo $logo; ?> /></td>
					<td></td>
				</tr>
				<tr>
					<th valign="top">Newsletter:</th>
					<td><input type="checkbox" class="inp-form" name="newsletter" <?php echo $newsletter; ?> /></td>
					<td></td>
				</tr>
				<tr>
					<th valign="top">Slider główny:</th>
					<td><input type="checkbox" class="inp-form" name="slider_glowny" <?php echo $slider_glowny; ?> /></td>
					<td></td>
				</tr>
				
				<tr>
					<th valign="top">Wiele wersji językowych</th>
					<td><input type="checkbox" class="inp-form" name="multilang" <?php echo $multilang; ?> /></td>
					<td></td>
				</tr>
				
				<!--<tr>
					<th valign="top">Product name:</th>
					<td><input type="text" class="inp-form-error" /></td>
					<td>
					<div class="error-left"></div>
					<div class="error-inner">This field is required.</div>
					</td>
				</tr>
				-->
				<tr>
					<th valign="top">Nazwa w Google Analytics:</th>
					<td><input type="text" class="inp-form" name="ga_name" value="<?php echo $row->user_ga_name; ?>"/></td>
					<td></td>
				</tr>
				<tr>
					<th valign="top">Kod Google Analytics</th>
					<td><textarea style="height: 100px;" class="inp-form" name="ga_code"><?php echo $row->user_ga_code; ?></textarea></td>
					<td></td>
				</tr>
		 		<tr>
					<th valign="top">Konta:</th>
					<td><a href="https://www.google.com/analytics/settings/?pli=1" target="_blank"><img src="<?php echo base_url(); ?>images/Analytics.jpg" border="0"></a></td>
					<td><a href="https://www.google.com/webmasters/tools/home?hl=pl" target="_blank"><img src="<?php echo base_url(); ?>images/NDW.jpg" border="0"></a></td>
				</tr>
				<tr>
					<th valign="top">Obraz dla szablonu indywidualnego:</th>
					<td><input type="file" name="szablon_foto" /></td>
					<td></td>
				</tr>
		
		
	
				<tr>
					<th>&nbsp;</th>
					<td valign="top">
						<input type="submit" value="" class="form-save" />
						<input type="reset" value="" class="form-reset"  />
					</td>
					<td></td>
				</tr>
				</table>
				</form>
				<?php } ?>
				
				</div>
				
				
				</div>
				<!--  end table-content  -->
				
			
			
			<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 -->