<div id="rightBox">

	<table border="0" cellpadding="0" cellspacing="0">
		<tr>
			<td><img src="/files/contentBoxTop.jpg" alt="" width="690" height="16"/></td>
		</tr>
		<tr>
			<td valign="top" style="background-image: url(/files/contentBoxMiddle.jpg); width: 690px; height: 547px; background-position: center top; background-repeat: no-repeat;">
				<div id="rightBox_content">
                <div class="content_title">Mój profil</div>
				<?php if(!empty($info))
					//KOMUNIKAT
				 	echo '<p class="info_box">'.$info.'</p>';
				?>
				<form action="/admin/profile" method="post">
					<table width="100%">
						<tbody>
							<input type="hidden" name="id" value="<?php echo $user_data[0]['id']; ?>">
							<input type="hidden" name="user_id" value="<?php echo $user_data[0]['user_id']; ?>">
							<tr>
								<td>Nazwa firmy/Imię Nazwisko</td>
								<td><input type="text" value="<?php echo (isset($values['company_name']) ? $values['company_name'] : $user_data[0]['company_name']); ?>" name="company_name" readonly="readonly"/></td>
								<td><span class="error_info"><?php if(!empty($errors['company_name'])) echo $errors['company_name'];?></span></td>
							</tr>
							<tr>
								<td>Imię Nazwisko osoby kontaktowej</td>
								<td><input type="text" value="<?php echo (isset($values['contact_name']) ? $values['contact_name'] : $user_data[0]['contact_name']); ?>" name="contact_name" /></td>
								<td><span class="error_info"><?php if(!empty($errors['contact_name'])) echo $errors['contact_name'];?></span></td>
							</tr>
							<tr>
								<td>NIP*</td>
								<td><input type="text" value="<?php echo (isset($values['tax_id']) ? $values['tax_id'] : $user_data[0]['tax_id']); ?>" name="tax_id" <?php if(!empty($user_data[0]['tax_id'])) echo 'readonly="readonly"'; ?> size="10"/></td>
								<td><span class="error_info"><?php if(!empty($errors['tax_id'])) echo $errors['tax_id'];?></span></td>
							</tr>
							<tr>
								<td>Strona www</td>
								<td><input type="text" value="<?php echo (isset($values['website']) ? $values['website'] : $user_data[0]['website']); ?>" name="website" /></td>
								<td><span class="error_info"><?php if(!empty($errors['website'])) echo $errors['website'];?></span></td>
							</tr>
							<tr>
								<td>E-mail*</td>
								<td><input type="text" value="<?php echo (isset($values['email']) ? $values['email'] : $user_data[0]['email']); ?>" name="email" /></td>
								<td><span class="error_info"><?php if(!empty($errors['email'])) echo $errors['email'];?></span></td>
							</tr>
							<tr>
								<td>Miejscowość*</td>
								<td><input type="text" value="<?php echo (isset($values['city']) ? $values['city'] : $user_data[0]['city']); ?>" name="city" /></td>
								<td><span class="error_info"><?php if(!empty($errors['city'])) echo $errors['city'];?></span></td>
							</tr>
							<tr>
								<td>Kod pocztowy*</td>
								<td><input type="text" value="<?php echo (isset($values['post_code']) ? $values['post_code'] : $user_data[0]['post_code']); ?>" name="post_code" size="6"/></td>
								<td><span class="error_info"><?php if(!empty($errors['post_code'])) echo $errors['post_code'];?></span></td>
							</tr>
							<tr>
								<td>Ulica*</td>
								<td><input type="text" value="<?php echo (isset($values['street']) ? $values['street'] : $user_data[0]['street']); ?>" name="street" /></td>
								<td><span class="error_info"><?php if(!empty($errors['street'])) echo $errors['street'];?></span></td>
							</tr>
							<tr>
								<td>Nr budynku*</td>
								<td><input type="text" value="<?php echo (isset($values['b_no']) ? $values['b_no'] : $user_data[0]['b_no']); ?>" name="b_no" size="6"/></td>
								<td><span class="error_info"><?php if(!empty($errors['b_no'])) echo $errors['b_no'];?></span></td>
							</tr>
							<tr>
								<td>Nr lokalu</td>
								<td><input type="text" value="<?php echo (isset($values['a_no']) ? $values['a_no'] : $user_data[0]['a_no']); ?>" name="a_no" size="6"/></td>
								<td><span class="error_info"><?php if(!empty($errors['a_no'])) echo $errors['a_no'];?></span></td>
							</tr>
							<!-- DANE KORESPONDENCYJNE -->							
							<tr><td colspan="2"><br /><br /><b>Dane korespondencyjne</b></td></tr>
							<tr>
								<td>Miejscowość</td>
								<td><input type="text" value="<?php echo (isset($values['dk_miasto']) ? $values['dk_miasto'] : $user_data[0]['dk_miasto']); ?>" name="dk_miasto" /></td>
								<td><span class="error_info"><?php if(!empty($errors['dk_miasto'])) echo $errors['dk_miasto'];?></span></td>
							</tr>
							<tr>
								<td>Ulica</td>
								<td><input type="text" value="<?php echo (isset($values['dk_ulica']) ? $values['dk_ulica'] : $user_data[0]['dk_ulica']); ?>" name="dk_ulica" /></td>
								<td><span class="error_info"><?php if(!empty($errors['dk_ulica'])) echo $errors['dk_ulica'];?></span></td>
							</tr>
							<tr>
								<td>Kod pocztowy</td>
								<td><input type="text" value="<?php echo (isset($values['dk_kod_pocztowy']) ? $values['dk_kod_pocztowy'] : $user_data[0]['dk_kod_pocztowy']); ?>" name="dk_kod_pocztowy" /></td>
								<td><span class="error_info"><?php if(!empty($errors['dk_kod_pocztowy'])) echo $errors['dk_kod_pocztowy'];?></span></td>
							</tr>
							<tr>
								<td>Nr budynku</td>
								<td><input type="text" value="<?php echo (isset($values['dk_nr_domu']) ? $values['dk_nr_domu'] : $user_data[0]['dk_nr_domu']); ?>" name="dk_nr_domu" size="6"/></td>
								<td><span class="error_info"><?php if(!empty($errors['dk_nr_domu'])) echo $errors['dk_nr_domu'];?></span></td>
							</tr>
							<tr>
								<td>Nr lokalu</td>
								<td><input type="text" value="<?php echo (isset($values['dk_nr_mieszkania']) ? $values['dk_nr_mieszkania'] : $user_data[0]['dk_nr_mieszkania']); ?>" name="dk_nr_mieszkania" size="6"/></td>
								<td><span class="error_info"><?php if(!empty($errors['dk_nr_mieszkania'])) echo $errors['dk_nr_mieszkania'];?></span></td>
							</tr>
							<tr>
								<td>Telefon</td>
								<td><input type="text" value="<?php echo (isset($values['dk_telefon']) ? $values['dk_telefon'] : $user_data[0]['dk_telefon']); ?>" name="dk_telefon" /></td>
								<td><span class="error_info"><?php if(!empty($errors['dk_telefon'])) echo $errors['dk_telefon'];?></span></td>
							</tr>
				
							<tr>
                                <td colspan="2">
                                    <div class="formHr">&nbsp;</div>
                                    <input type="submit" value="Zatwierdź" class="formButton"/>
                                    <input type="button" name="anuluj" value="Anuluj" class="formButton" onClick="document.location.href='<?php echo base_url();?>admin';"/>
                                    <span class="field_required">* - pole wymagane</span>
                                </td>
                            </tr>
						</tbody>
					</table>	
				</form>									
			
			
				</div>
			</td>	
		</tr>
		<tr>
			<td><img src="/files/contentBoxBottom.jpg" alt="" width="690" height="17"/></td>
		</tr>
	</table>
</div>
						

