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

<h1><?=$h1?></h1>
<p><a href="/<?=$detailcontroller?>/<?=$detail[0]['uri']?>/"><?=$words[97]?></a></p>

<div id="ads"><?php include_once('ads_editace_right.php'); ?></div>

<div class="left">

<?php if(empty($ok)){ ?>
<form name="editace" id="editace" method="post" action="/<?=$editcontroller?>/<?=$detail[0]['uri']?>/" onsubmit="return confirm('<?=$words[96]?>?')">
<table class="reg">
<?php if(!empty($errortext) and count($errortext) > 0){ ?>
<tr>
	<td colspan="2" class="reg error"><?=$errortext?></td>
</tr>
<?php } ?>
<tr>
	<td colspan="2" class="reg"><h3 class="reg"><?=$words[104]?></h3></td>
</tr>
<tr class="second">
	<td class="reg"><?=$words[35]?><br><input type="text" maxlength="10" size="15" name="ico" <?php if(!empty($user_data['ico']))echo 'value="'.$user_data['ico'].'"'?>></td>
	<td class="reg"><?=$words[36]?><br><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">
	<td colspan="2" class="reg"><?=$words[37]?><br><input type="text" maxlength="255" size="60" name="nazev" <?php if(!empty($user_data['nazev']))echo 'value="'.$user_data['nazev'].'"'?>></td>
</tr>
<tr>
	<td colspan="2" class="reg"><?=$words[39]?><br><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">
	<td class="reg"><?=$words[38]?><br><input type="text" maxlength="255" size="25" name="obec" <?php if(!empty($user_data['obec']))echo 'value="'.$user_data['obec'].'"'?>></td>
	<td class="reg"><?=$words[40]?><br><input type="text" maxlength="5" size="6" name="psc" <?php if(!empty($user_data['psc']))echo 'value="'.$user_data['psc'].'"'?>></td>
</tr>
<tr>
	<td colspan="2" class="reg"><?=$words[13]?><br><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">
	<td colspan="2" class="reg"><?=$words[109]?><br>
		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 class="second">
	<td colspan="2" class="reg<?php if(!empty($error['kategorie'])) echo ' red'; ?>"><?=$words[2]?><span class="red">*</span><br>
		<input type="hidden" name="kategorie1" value="<?php if(!empty($user_data['kategorie1'])) echo $user_data['kategorie1']; ?>"><input size=30 type="text" name="kategorie1name" value="<?php if(!empty($user_data['kategorie1name'])) echo $user_data['kategorie1name']; ?>" readonly><input name="button6" onclick="OpenModalWin('/aktualizovat/addmodalkat/kategorie1/editace','kat',500,600)" type="button" value="vybrat kategorii"><br>
		<input type="hidden" name="kategorie2" value="<?php if(!empty($user_data['kategorie2'])) echo $user_data['kategorie2']; ?>"><input size=30 type="text" name="kategorie2name" value="<?php if(!empty($user_data['kategorie2name'])) echo $user_data['kategorie2name']; ?>" readonly><input name="button6" onclick="OpenModalWin('/aktualizovat/addmodalkat/kategorie2/editace','kat',500,600)" type="button" value="vybrat kategorii"><br>
		<input type="hidden" name="kategorie3" value="<?php if(!empty($user_data['kategorie3'])) echo $user_data['kategorie3']; ?>"><input size=30 type="text" name="kategorie3name" value="<?php if(!empty($user_data['kategorie3name'])) echo $user_data['kategorie3name']; ?>" readonly><input name="button6" onclick="OpenModalWin('/aktualizovat/addmodalkat/kategorie3/editace','kat',500,600)" type="button" value="vybrat kategorii">
	</td>
</tr>
<tr class="second">
	<td colspan="2" class="reg"><?=$words[45]?><br><input type="text" maxlength="60" size="60" name="title" onkeyup="CheckLength(this,document.editace.titlelabel,60)" onfocus="CheckLength(this,document.editace.titlelabel,60)" onchange="CheckLength(this,document.editace.titlelabel,60)" <?php if(!empty($user_data['title']))echo 'value="'.$user_data['title'].'"'?>><br><small class="help"><?=$words[52]?></small> <?=$words[139]?>: <input type="text" size="2" name="titlelabel" value="60" readonly></td>
</tr>
<tr>
	<td colspan="2" class="reg"><?=$words[44]?><br><textarea cols="65" rows="12" name="popis" onfocus="CheckLength(this,document.editace.popislabel,2000)" onkeyup="CheckLength(this,document.editace.popislabel,2000)" onselect="CheckLength(this,document.editace.popislabel,2000)" onchange="CheckLength(this,document.editace.popislabel,2000)"><?php if(!empty($user_data['popis']))echo $user_data['popis'];?></textarea><br><?=$words[139]?>: <input type="text" size=2 name="popislabel" value="2000" readonly> <small class="help">(<?=$words[148]?>)</small></td>
</tr>
<tr>
	<td colspan="2" class="reg"><h3 class="reg"><?=$words[105]?></h3></td>
</tr>
<tr class="second">
	<td colspan="2" class="reg"><?=$words[42]?><br><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>
	<td colspan="2" class="reg"><?=$words[43]?><br><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">
	<td colspan="2" class="reg <?php if(!empty($error['tel'])) echo 'red'; ?>"><?=$words[11]?><br><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>
	<td colspan="2" class="reg"><?=$words[41]?><br><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">
	<td colspan="2" class="reg"><?=$words[12]?><br><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>
	<td colspan="2" class="reg"><h3 class="reg"><?=$words[106]?> <span class="red">/<?=$words[110]?>/</span></h3></td>
</tr>
<tr class="second">
	<td colspan="2" class="reg"><?=$words[107]?><br><input type="text" maxlength="50" size="60" name="kontaktosoba" value="<?php if(!empty($user_data['kontaktosoba']))echo $user_data['kontaktosoba'];?>"></td>
</tr>
<tr class="second">
	<td colspan="2" class="reg"><?=$words[101]?><br><input type="text" maxlength="50" size="60" name="kontaktemail" value="<?php if(!empty($user_data['kontaktemail']))echo $user_data['kontaktemail'];?>"><br><small class="help">(<?=$words[49]?>)</small></td>
</tr>
<tr>
	<td colspan="2" class="reg"><?=$words[108]?><br><textarea cols="80" rows="5" name="kontaktpoznamka"><?php if(!empty($user_data['kontaktpoznamka']))echo $user_data['kontaktpoznamka'];?></textarea></td>
</tr>
<tr class="second <?php if(!empty($error['captcha'])) echo 'red'; ?>">
	<td colspan="2" class="reg"><?=$words[88]?><span class="red">*</span><div><?=$_SESSION['captcha']['image']?><br><input type="text" maxlength="60" size="15" name="word" class="captchaInput"></div></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>
<input type="hidden" name="id" value="<?php if(!empty($user_data['id']))echo $user_data['id'];?>">
</form>
<?php }else echo '<p class="info">'.$words[103].'<br><br>'.$words[99].'</p>'; ?>

</div>


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