<?php include_once('header.php'); ?>

<?php if(empty($ok)){ ?>
<form method="post" action="/admin/detail/<?=$user_data['id']?>/" onsubmit="return confirm('<?=$words[96]?>?')">
<table class="reg">
<?php if(!empty($error) and count($error) > 0){ ?>
<tr>
	<td colspan="2" class="reg error"><?=$words[56]?></td>
</tr>
<?php } ?>
<tr class="second"><th class="reg"><?=$words[35]?></th>
	<td class="reg"><input type="text" maxlength="10" size="15" name="ico" <?php if(!empty($user_data['ico']))echo 'value="'.$user_data['ico'].'"'?>></td>
</tr>
<tr><th class="reg"><?=$words[36]?></th>
	<td class="reg"><input type="text" maxlength="15" size="15" name="dic" <?php if(!empty($user_data['dic']))echo 'value="'.$user_data['dic'].'"'?>></td>
</tr>
<tr class="second">
	<th class="reg <?php if(!empty($error['nazev'])) echo 'red'; ?>"><?=$words[37]?><span class="red">*</span></th>
	<td class="reg"><input type="text" maxlength="255" size="60" name="nazev" <?php if(!empty($user_data['nazev']))echo 'value="'.htmlspecialchars($user_data['nazev']).'"'?>></td>
</tr>
<tr><th class="reg <?php if(!empty($error['ulice'])) echo 'red'; ?>"><?=$words[39]?><span class="red">*</span></th>
	<td class="reg"><input type="text" maxlength="255" size="60" name="ulice" <?php if(!empty($user_data['ulice']))echo 'value="'.$user_data['ulice'].'"'?>></td>
</tr>
<tr class="second"><th class="reg <?php if(!empty($error['obec'])) echo 'red'; ?>"><?=$words[38]?><span class="red">*</span></th>
	<td class="reg"><input type="text" maxlength="255" size="60" name="obec" <?php if(!empty($user_data['obec']))echo 'value="'.$user_data['obec'].'"'?>></td>
</tr>
<tr><th class="reg <?php if(!empty($error['psc'])) echo 'red'; ?>"><?=$words[40]?><span class="red">*</span></th>
	<td class="reg"><input type="text" maxlength="5" size="6" name="psc" <?php if(!empty($user_data['psc']))echo 'value="'.$user_data['psc'].'"'?>></td>
</tr>
<tr class="second"><th class="reg"><?=$words[42]?></th>
	<td class="reg"><input type="text" maxlength="255" size="60" name="ulice_post" <?php if(!empty($user_data['ulice_post']))echo 'value="'.$user_data['ulice_post'].'"'?>></td>
</tr>
<tr><th class="reg"><?=$words[43]?></th>
	<td class="reg"><input type="text" maxlength="255" size="60" name="posta" <?php if(!empty($user_data['posta']))echo 'value="'.$user_data['posta'].'"'?>></td>
</tr>
<tr class="second"><th class="reg <?php if(!empty($error['tel'])) echo 'red'; ?>"><?=$words[11]?><span class="red">*</span></th>
	<td class="reg"><input type="text" maxlength="255" size="60" name="tel" <?php if(!empty($user_data['tel']))echo 'value="'.$user_data['tel'].'"'?>><br><small class="help">(<?=$words[47]?>)</small></td>
</tr>
<tr><th class="reg"><?=$words[41]?></th>
	<td class="reg"><input type="text" maxlength="255" size="60" name="fax" <?php if(!empty($user_data['fax']))echo 'value="'.$user_data['fax'].'"'?>><br><small class="help">(<?=$words[48]?>)</small></td>
</tr>
<tr class="second"><th class="reg <?php if(!empty($error['email'])) echo 'red'; ?>"><?=$words[12]?><span class="red">*</span></th>
	<td class="reg"><input type="text" maxlength="255" size="60" name="email" <?php if(!empty($user_data['email']))echo 'value="'.$user_data['email'].'"'?>><br><small class="help">(<?=$words[49]?>)</small></td>
</tr>
<tr><th class="reg"><?=$words[13]?></th>
	<td class="reg"><input type="text" maxlength="255" size="60" name="www" <?php if(!empty($user_data['www']))echo 'value="'.$user_data['www'].'"'?>><br><small class="help">(<?=$words[50]?>)</small></td>
</tr>
<tr class="second"><th class="reg <?php if(!empty($error['lokality'])) echo 'red'; ?>"><?=$words[3]?><span class="red">*</span></th>
	<td class="reg">
		1.<select name="lokality1"><option value=""><?=$words[55]?></option><?= $lokality1?></select><br>
		2.<select name="lokality2"><option value=""><?=$words[55]?></option><?= $lokality2?></select><br><small class="help">(<?=$words[57]?>)</small>
	</td>
</tr>
<tr><th class="reg <?php if(!empty($error['kategorie'])) echo 'red'; ?>"><?=$words[2]?><span class="red">*</span></th>
	<td class="reg">
		1.<select name="kategorie1"><option value=""><?=$words[55]?></option><?= $kategorie1?></select><br>
		2.<select name="kategorie2"><option value=""><?=$words[55]?></option><?= $kategorie2?></select><br>
		3.<select name="kategorie3"><option value=""><?=$words[55]?></option><?= $kategorie3?></select><br><small class="help">(<?=$words[57]?>)</small>
	</td>
</tr>
<tr class="second <?php if(!empty($error['title'])) echo 'red'; ?>"><th class="reg"><?=$words[45]?><span class="red">*</span></th>
	<td class="reg"><input type="text" maxlength="60" size="60" name="title" <?php if(!empty($user_data['title']))echo 'value="'.htmlspecialchars($user_data['title']).'"'?>><br><small class="help"><?=$words[52]?></small></td>
</tr>
<tr><th class="reg <?php if(!empty($error['popis'])) echo 'red'; ?>"><?=$words[44]?><span class="red">*</span></th>
	<td class="reg"><textarea cols="70" rows="15" name="popis"><?php if(!empty($user_data['popis']))echo $user_data['popis'];?></textarea></td>
</tr>
<tr class=""><th class="reg"><?=$words[100]?></th>
	<td class="reg"><input type="checkbox" name="status" <?php if(!empty($user_data['status']))echo 'checked="1"'?>></td>
</tr>
<tr class="second"><td class="reg" colspan="2"></td></tr>
<tr><td class="reg" colspan="2"><small class="red">* - <?=$words[51]?></small></td></tr>
<tr><td class="reg centered" colspan="2"><input type="submit" value="<?=$words[96]?>"></td></tr>
</table>
</form>
<?php }else echo '<p class="info">'.$words[58].'</p>'; ?>

<?php include_once('footer.php'); ?>