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

<h1><?=$h1?></h1>

<p class="info">
	<?=$words[112]?>
</p>

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

<div class="left">
<?php if(empty($ok)){ ?>
<form id="registrace" name="registrace" method="post" action="/registrace/" onsubmit="return confirm('<?=$words[113]?>?')">
<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<?php if(!empty($error['ico'])) echo ' red'; ?>"><?=$words[35]?><span class="red">*</span><br><input type="text" maxlength="8" 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<?php if(!empty($error['nazev'])) echo ' red'; ?>"><?=$words[37]?><span class="red">*</span><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<?php if(!empty($error['ulice'])) echo ' red'; ?>"><?=$words[39]?><span class="red">*</span><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<?php if(!empty($error['obec'])) echo ' red'; ?>"><?=$words[38]?><span class="red">*</span><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<?php if(!empty($error['psc'])) echo ' red'; ?>"><?=$words[40]?><span class="red">*</span><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<?php if(!empty($error['title'])) echo ' red'; ?>"><?=$words[45]?><span class="red">*</span><br><input type="text" maxlength="60" size="60" name="title"<?php if(!empty($user_data['title']))echo ' value="'.$user_data['title'].'"'?> onkeyup="CheckLength(this,document.registrace.titlelabel,60)" onblur="CheckLength(this,document.registrace.titlelabel,60)" onchange="CheckLength(this,document.registrace.titlelabel,60)"><br><small class="help"><?=$words[52]?></small><?=$words[139]?>: <input type="text" size="2" name="titlelabel" value="60" readonly></td>
</tr>
<tr class="second">
	<td colspan="2" class="reg<?php if(!empty($error['popis'])) echo ' red'; ?>"><?=$words[44]?><span class="red">*</span><br><textarea cols="65" rows="12" name="popis" onkeyup="CheckLength(this,document.registrace.popislabel,2000)" onblur="CheckLength(this,document.registrace.popislabel,2000)" onchange="CheckLength(this,document.registrace.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<?php if(!empty($error['lokality'])) echo ' red'; ?>"><?=$words[3]?><span class="red">*</span><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('/registrace/addmodalkat/kategorie1','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('/registrace/addmodalkat/kategorie2','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('/registrace/addmodalkat/kategorie3','kat',500,600)" type="button" value="vybrat kategorii">
	</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]?><span class="red">*</span><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<?php if(!empty($error['email'])) echo ' red'; ?>"><?=$words[12]?><span class="red">*</span><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<?php if(!empty($error['kontaktemail'])) echo ' red'; ?>"><?=$words[101]?><span class="red">*</span> <span class="red">/<?=$words[110]?>/</span><br><input type="text" maxlength="50" size="60" name="kontaktemail" <?php if(!empty($user_data['kontaktemail']))echo 'value="'.$user_data['kontaktemail'].'"'?>><br><small class="help">(<?=$words[49]?>)</small></td>
</tr>
<tr class="second">
	<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>
	<td colspan="2" class="reg<?php if(!empty($error['captcha'])) echo ' red'; ?>"><?=$words[88]?><span class="red">*</span><br><?=$_SESSION['captcha']['image']?><br><input type="text" maxlength="60" size="15" name="word" class="captchaInput"></td>
</tr>
<tr><td class="reg" colspan="2"></td></tr>
<tr class="second"><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[29]?>"></td></tr>
</table>

</form>
<?php }else echo '<p class="info">'.$words[58].'<br><br>'.$words[99].'</p>'; ?>
</div>

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