<?php
$druh = "nastaveni";
$meta2 = '<script type="text/javascript" src="stuff/js/tabs.js"></script>';
include "head.php";
$menu2 = include_menu2($druh);
include_head($lang['set_general_title'], $druh);
?>

<div class="fr">
  <div class="htabs general_menu">
    <li><a href="#tab1" title="<?php echo $lang['set_general_h2_1']; ?>"><img src="stuff/img/icons/database.png" alt="" /><?php echo $lang['set_general_h2_1']; ?></a></li>
    <li><a href="#tab2" title="<?php echo $lang['set_general_h2_2']; ?>"><img src="stuff/img/icons/text.png" alt="" /><?php echo $lang['set_general_h2_2']; ?></a></li>
    <li><a href="#tab3" title="<?php echo $lang['set_general_h2_3']; ?>"><img src="stuff/img/icons/comment.png" alt="" /><?php echo $lang['set_general_h2_3']; ?></a></li>
  </div>
</div>

<h1><?php echo $lang['set_general_setting']; ?></h1>
<br />

<?php
if (!empty($_POST)) {
  $vzhled = $_POST['vzhled'];
  $tinymce = $_POST['tinymce'];
  $pocet_kom_adm = $_POST['pocet_kom_adm'];
  $pocet_clst_adm = $_POST['pocet_clst_adm'];
  $pocet_clanku = $_POST['pocet_clanku'];
  $strankovani = $_POST['strankovani'];
  $komentare = $_POST['komentare'];
  $komentare_raz = $_POST['komentare_raz'];
  $znakova_sada = $_POST['znakova_sada'];
  $jazyk = $_POST['jazyk'];
  $nazev_www = htmlspecialchars($_POST['nazev_www']);
  $popis_www = htmlspecialchars($_POST['popis_www']);
  $galerie_nahled1 = $_POST['galerie_nahled1'];
  $galerie_nahled2 = $_POST['galerie_nahled2'];
  $galerie_max_upload = $_POST['galerie_max_upload'];
  $soubory_max_upload = $_POST['soubory_max_upload'];
  
  if (!empty($vzhled) && !empty($tinymce) && !empty($pocet_kom_adm) && is_numeric($pocet_kom_adm) && !empty($pocet_clst_adm) && is_numeric($pocet_clst_adm) && !empty($pocet_clanku) && is_numeric($pocet_clanku) && !empty($strankovani) && !empty($komentare) && !empty($komentare_raz) && !empty($znakova_sada) && !empty($nazev_www) && !empty($popis_www) && !empty($galerie_nahled1) && !empty($galerie_nahled2) && is_numeric($galerie_nahled1) && is_numeric($galerie_nahled2) && !empty($galerie_max_upload) && is_numeric($galerie_max_upload) && !empty($soubory_max_upload) && is_numeric($soubory_max_upload)) {

    switch ($znakova_sada) {
      case "utf8_czech_ci" : $skript_znaky = "UTF-8"; break;
      case "latin2_czech_ci" : $skript_znaky = "ISO-8859-2"; break;
      case "cp1250_czech_ci" : $skript_znaky = "windows-cp1250"; break;
      default : $skript_znaky = "UTF-8";
    };
    
    $jazyk2 = $jazyk;
    $jazyk = preg_replace("/_(.*)$/", "", $jazyk);
  
    mysql_query("UPDATE jtcms_nastaveni SET hodnota='".mysql_real_escape_string($vzhled)."' WHERE typ='vzhled' LIMIT 1");
    mysql_query("UPDATE jtcms_nastaveni SET hodnota='".mysql_real_escape_string($tinymce)."' WHERE typ='tinymce' LIMIT 1");
    mysql_query("UPDATE jtcms_nastaveni SET hodnota='".mysql_real_escape_string($pocet_kom_adm)."' WHERE typ='pocet_kom_adm' LIMIT 1");
    mysql_query("UPDATE jtcms_nastaveni SET hodnota='".mysql_real_escape_string($pocet_clst_adm)."' WHERE typ='pocet_clst_adm' LIMIT 1");
    mysql_query("UPDATE jtcms_nastaveni SET hodnota='".mysql_real_escape_string($pocet_clanku)."' WHERE typ='pocet_clanku' LIMIT 1");
    mysql_query("UPDATE jtcms_nastaveni SET hodnota='".mysql_real_escape_string($strankovani)."' WHERE typ='strankovani' LIMIT 1");
    mysql_query("UPDATE jtcms_nastaveni SET hodnota='".mysql_real_escape_string($komentare)."' WHERE typ='komentare' LIMIT 1");
    mysql_query("UPDATE jtcms_nastaveni SET hodnota='".mysql_real_escape_string($komentare_raz)."' WHERE typ='komentare_raz' LIMIT 1");
    mysql_query("UPDATE jtcms_nastaveni SET hodnota='".mysql_real_escape_string($znakova_sada)."', hodnota2='".mysql_real_escape_string($skript_znaky)."' WHERE typ='znakova_sada' LIMIT 1");
    mysql_query("UPDATE jtcms_nastaveni SET hodnota='".mysql_real_escape_string($jazyk)."', hodnota2='".mysql_real_escape_string($jazyk2)."' WHERE typ='jazyk' LIMIT 1"); 
    mysql_query("UPDATE jtcms_nastaveni SET hodnota='".mysql_real_escape_string($nazev_www)."' WHERE typ='nazev_www' LIMIT 1");
    mysql_query("UPDATE jtcms_nastaveni SET hodnota='".mysql_real_escape_string($popis_www)."' WHERE typ='popis_www' LIMIT 1");
    mysql_query("UPDATE jtcms_nastaveni SET hodnota='".mysql_real_escape_string($galerie_nahled1)."', hodnota2='".mysql_real_escape_string($galerie_nahled2)."' WHERE typ='galerie_nahled' LIMIT 1");
    mysql_query("UPDATE jtcms_nastaveni SET hodnota='".mysql_real_escape_string($galerie_max_upload)."' WHERE typ='galerie_max_upload' LIMIT 1");
    mysql_query("UPDATE jtcms_nastaveni SET hodnota='".mysql_real_escape_string($soubory_max_upload)."' WHERE typ='soubory_max_upload' LIMIT 1");

    $soubor = fopen("config.php", "r");
    $config = fread($soubor, filesize("config.php"));
    fclose($soubor);
    
    $souborove = array('utf8_czech_ci', 'latin2_czech_ci', 'cp1250_czech_ci');
    $config = str_replace($souborove,$znakova_sada,$config);
     
    $soubor = fopen("config.php", "w");
    fwrite($soubor, $config);
    fclose($soubor);
  
    echo '<div class="oznameni_div">';
    echo '<p>'.$lang['set_general_setting_was_edited'].'</p>';
    echo '</div>';
        
  } else {
    echo '<div class="oznameni_div">';
    echo '<div class="chyba">'.$lang['set_general_error'].'</div>';
    if (empty($vzhled)) {echo '<li>'.$lang['set_general_er_1'].'</li>';};
    if (empty($tinymce)) {echo '<li>'.$lang['set_general_er_2'].'</li>';};
    if (empty($pocet_kom_adm)) {echo '<li>'.$lang['set_general_er_3'].'</li>';};
    if (!is_numeric($pocet_kom_adm)) {echo '<li>'.$lang['set_general_er_4'].'</li>';};
    if (empty($pocet_clst_adm)) {echo '<li>'.$lang['set_general_er_5'].'</li>';};
    if (!is_numeric($pocet_clst_adm)) {echo '<li>'.$lang['set_general_er_6'].'</li>';};
    if (empty($pocet_clanku)) {echo '<li>'.$lang['set_general_er_7'].'</li>';};
    if (!is_numeric($pocet_clanku)) {echo '<li>'.$lang['set_general_er_8'].'</li>';};
    if (empty($strankovani)) {echo '<li>'.$lang['set_general_er_9'].'</li>';};
    if (empty($komentare)) {echo '<li>'.$lang['set_general_er_10'].'</li>';};
    if (empty($komentare_raz)) {echo '<li>'.$lang['set_general_er_11'].'</li>';};
    if (empty($znakova_sada)) {echo '<li>'.$lang['set_general_er_12'].'</li>';};
    if (empty($nazev_www)) {echo '<li>'.$lang['set_general_er_13'].'</li>';};
    if (empty($popis_www)) {echo '<li>'.$lang['set_general_er_14'].'</li>';};
    if (empty($galerie_nahled1)) {echo '<li>'.$lang['set_general_er_15'].'</li>';};
    if (empty($galerie_nahled2)) {echo '<li>'.$lang['set_general_er_16'].'</li>';};
    if (!is_numeric($galerie_nahled1)) {echo '<li>'.$lang['set_general_er_17'].'</li>';};
    if (!is_numeric($galerie_nahled2)) {echo '<li>'.$lang['set_general_er_18'].'</li>';};
    if (empty($galerie_max_upload)) {echo '<li>'.$lang['set_general_er_19'].'</li>';};
    if (!is_numeric($galerie_max_upload)) {echo '<li>'.$lang['set_general_er_20'].'</li>';};
    if (empty($soubory_max_upload)) {echo '<li>'.$lang['set_general_er_21'].'</li>';};
    if (!is_numeric($soubory_max_upload)) {echo '<li>'.$lang['set_general_er_22'].'</li>';};
    echo '</div>';  
  };
};
?>

<form method="post" action="set_general.php" id="nastaveni_form">

<div class="tabs">

<div class="tab" id="tab1">
<h2><?php echo $lang['set_general_h2_1']; ?></h2>
<br />
<?php 
$query = mysql_query("SELECT hodnota2 FROM jtcms_nastaveni WHERE typ='jazyk' LIMIT 1");
$result = mysql_fetch_array($query);
?>
<div class="moznost">
  <div class="otazka">
    <img src="stuff/img/icons/billboard.png" alt="" />
    <span class="nadpis"><?php echo $lang['set_general_10_1']; ?></span><br />
    <span class="popis"><?php echo $lang['set_general_10_2']; ?></span>
  </div>
  <div class="volby">
  <select name="jazyk" size="1" class="input">
<?php
  $adresar = opendir("./stuff/lang");

    while ($soubor = readdir($adresar)){
      if ($soubor != "." && $soubor != ".." && is_file("./stuff/lang/".$soubor)) {
        $soubor = str_replace(".php", "", $soubor);
        echo '<option value="'.$soubor.'"';
        if ($soubor == $result['hodnota2']) {echo ' selected';};
        echo ' /> '.$soubor."\n";
      };
    };
?>
  </select>
  </div>  
<div class="nf"></div>
<br />
</div>

<?php 
$query = mysql_query("SELECT hodnota FROM jtcms_nastaveni WHERE typ='vzhled' LIMIT 1");
$result = mysql_fetch_array($query);
?>
<div class="moznost">
  <div class="otazka">
    <img src="stuff/img/icons/notes.png" alt="" />
    <span class="nadpis"><?php echo $lang['set_general_1_1']; ?></span><br />
    <span class="popis"><?php echo $lang['set_general_1_2']; ?></span>
  </div>
  <div class="volby">
  <select name="vzhled" size="1" class="input">
<?php
  $adresar = opendir("./stuff/themes");

    while ($soubor = readdir($adresar)){
      if ($soubor != "." && $soubor != ".." && is_dir("./stuff/themes/".$soubor) && file_exists("./stuff/themes/".$soubor."/style.css")) {
        echo '<option value="'.$soubor.'"';
        if ($soubor == $result['hodnota']) {echo ' selected';};
        echo ' />'.$soubor."\n";
      };
    };
?>
  </select>
  </div>  
<div class="nf"></div>
<br />
</div>

<?php 
$query = mysql_query("SELECT hodnota FROM jtcms_nastaveni WHERE typ='tinymce' LIMIT 1");
$result = mysql_fetch_array($query);
?>
<div class="moznost">
  <div class="otazka">
    <img src="stuff/img/icons/notes.png" alt="" />
    <span class="nadpis"><?php echo $lang['set_general_2_1']; ?></span><br />
    <span class="popis"><?php echo $lang['set_general_2_2']; ?></span>
  </div>
  <div class="volby">
    <input type="radio" name="tinymce" id="set_tinymce_1" value="1"<?php if (empty($_POST['tinymce'])) {if ($result['hodnota'] == 1) {echo ' checked';};} else {if ($_POST['tinymce'] == 1) {echo ' checked';};}; ?> /> <label for="set_tinymce_1"><?php echo $lang['set_general_2_3']; ?></label>
    &nbsp;&nbsp;&nbsp;
    <input type="radio" name="tinymce" id="set_tinymce_2" value="2"<?php if (empty($_POST['tinymce'])) {if ($result['hodnota'] == 2) {echo ' checked';};} else {if ($_POST['tinymce'] == 2) {echo ' checked';};}; ?> /> <label for="set_tinymce_2"><?php echo $lang['set_general_2_4']; ?></label>
  </div>  
<div class="nf"></div>
<br />
</div>

<?php 
$query = mysql_query("SELECT hodnota FROM jtcms_nastaveni WHERE typ='galerie_max_upload' LIMIT 1");
$result = mysql_fetch_array($query);
?>
<div class="moznost">
  <div class="otazka">
    <img src="stuff/img/icons/upload.png" alt="" />
    <span class="nadpis"><?php echo $lang['set_general_14_1']; ?></span><br />
    <span class="popis"><?php echo $lang['set_general_14_2']; ?></span>
  </div>
  <div class="volby">
    <input type="text" name="galerie_max_upload" id="set_galerie_max_upload" class="input" value="<?php if (empty($_POST['galerie_max_upload'])) {echo $result['hodnota'];} else {echo $_POST['galerie_max_upload'];}; ?>" />
  </div>  
<div class="nf"></div>
<br />
</div>

<?php 
$query = mysql_query("SELECT hodnota FROM jtcms_nastaveni WHERE typ='soubory_max_upload' LIMIT 1");
$result = mysql_fetch_array($query);
?>
<div class="moznost">
  <div class="otazka">
    <img src="stuff/img/icons/upload.png" alt="" />
    <span class="nadpis"><?php echo $lang['set_general_15_1']; ?></span><br />
    <span class="popis"><?php echo $lang['set_general_15_2']; ?></span>
  </div>
  <div class="volby">
    <input type="text" name="soubory_max_upload" id="set_soubory_max_upload" class="input" value="<?php if (empty($_POST['soubory_max_upload'])) {echo $result['hodnota'];} else {echo $_POST['soubory_max_upload'];}; ?>" />
  </div>  
<div class="nf"></div>
<br />
</div>

<?php
$query = mysql_query("SELECT hodnota FROM jtcms_nastaveni WHERE typ='pocet_kom_adm' LIMIT 1");
$result = mysql_fetch_array($query);
?>
<div class="moznost">
  <div class="otazka">
    <img src="stuff/img/icons/comments.png" alt="" />
    <span class="nadpis"><?php echo $lang['set_general_3_1']; ?></span><br />
    <span class="popis"><?php echo $lang['set_general_3_2']; ?></span>
  </div>
  <div class="volby">
    <input type="text" name="pocet_kom_adm" id="set_pocet_kom_adm" class="input pocet_clanku" value="<?php if (empty($_POST['pocet_kom_adm'])) {echo $result['hodnota'];} else {echo $_POST['pocet_kom_adm'];}; ?>" />
  </div>  
<div class="nf"></div>
<br />
</div>

<?php
$query = mysql_query("SELECT hodnota FROM jtcms_nastaveni WHERE typ='pocet_clst_adm' LIMIT 1");
$result = mysql_fetch_array($query)
?>
<div class="moznost">
  <div class="otazka">
    <img src="stuff/img/icons/lists.png" alt="" />
    <span class="nadpis"><?php echo $lang['set_general_4_1']; ?></span><br />
    <span class="popis"><?php echo $lang['set_general_4_2']; ?></span>
  </div>
  <div class="volby">
    <input type="text" name="pocet_clst_adm" id="set_pocet_clst_adm" class="input pocet_clanku" value="<?php if (empty($_POST['pocet_clst_adm'])) {echo $result['hodnota'];} else {echo $_POST['pocet_clst_adm'];}; ?>" />
  </div>  
<div class="nf"></div>
<br />
</div>
</div>

<div class="tab" id="tab2">
<h2><?php echo $lang['set_general_h2_2']; ?></h2>
<br />

<?php    
$query = mysql_query("SELECT hodnota FROM jtcms_nastaveni WHERE typ='nazev_www' LIMIT 1");
$result = mysql_fetch_array($query);
?>
<div class="moznost">
  <div class="otazka">
    <img src="stuff/img/icons/address book.png" alt="" />
    <span class="nadpis"><?php echo $lang['set_general_11_1']; ?></span><br />
    <span class="popis"><?php echo $lang['set_general_11_2']; ?></span>
  </div>
  <div class="volby">
    <input type="text" name="nazev_www" id="set_nazev_www" class="input nazev_www" value="<?php if (empty($_POST['nazev_www'])) {echo $result['hodnota'];} else {echo $_POST['nazev_www'];}; ?>" />
  </div>  
<div class="nf"></div>
<br />
</div>

<?php 
$query = mysql_query("SELECT hodnota FROM jtcms_nastaveni WHERE typ='popis_www' LIMIT 1");
$result = mysql_fetch_array($query);
?>
<div class="moznost">
  <div class="otazka">
    <img src="stuff/img/icons/address book.png" alt="" />
    <span class="nadpis"><?php echo $lang['set_general_12_1']; ?></span><br />
    <span class="popis"><?php echo $lang['set_general_12_2']; ?></span>
  </div>
  <div class="volby">
    <textarea wrap="hard" name="popis_www" id="set_popis_www" class="input popis_www"><?php if (empty($_POST['popis_www'])) {echo $result['hodnota'];} else {echo $_POST['popis_www'];}; ?></textarea>
  </div>  
<div class="nf"></div>
<br />
</div>

<?php 
$query = mysql_query("SELECT hodnota, hodnota2 FROM jtcms_nastaveni WHERE typ='galerie_nahled' LIMIT 1");
$result = mysql_fetch_array($query);
?>
<div class="moznost">
  <div class="otazka">
    <img src="stuff/img/icons/camera.png" alt="" />
    <span class="nadpis"><?php echo $lang['set_general_13_1']; ?></span><br />
    <span class="popis"><?php echo $lang['set_general_13_2']; ?></span>
  </div>
  <div class="volby">
    <label for="set_galerie_nahled1"><?php echo $lang['set_general_13_3']; ?></label> <input type="text" name="galerie_nahled1" id="set_galerie_nahled1" class="input pocet_clanku" value="<?php if (empty($_POST['galerie_nahled1'])) {echo $result['hodnota'];} else {echo $_POST['galerie_nahled1'];}; ?>" />
    <label for="set_galerie_nahled2"><?php echo $lang['set_general_13_4']; ?></label> <input type="text" name="galerie_nahled2" id="set_galerie_nahled2" class="input pocet_clanku" value="<?php if (empty($_POST['galerie_nahled2'])) {echo $result['hodnota2'];} else {echo $_POST['galerie_nahled2'];}; ?>" />
  </div>  
<div class="nf"></div>
<br />
</div>

<?php 
$query = mysql_query("SELECT hodnota FROM jtcms_nastaveni WHERE typ='pocet_clanku' LIMIT 1");
$result = mysql_fetch_array($query);
?>
<div class="moznost">
  <div class="otazka">
    <img src="stuff/img/icons/lists.png" alt="" />
    <span class="nadpis"><?php echo $lang['set_general_5_1']; ?></span><br />
    <span class="popis"><?php echo $lang['set_general_5_2']; ?></span>
  </div>
  <div class="volby">
    <input type="text" name="pocet_clanku" id="set_pocet_clanku" class="input pocet_clanku" value="<?php if (empty($_POST['pocet_clanku'])) {echo $result['hodnota'];} else {echo $_POST['pocet_clanku'];}; ?>" />
  </div>  
<div class="nf"></div>
<br />
</div>

<?php 
$query = mysql_query("SELECT hodnota FROM jtcms_nastaveni WHERE typ='strankovani' LIMIT 1");
$result = mysql_fetch_array($query);
?>
<div class="moznost">
  <div class="otazka">
    <img src="stuff/img/icons/text.png" alt="" />
    <span class="nadpis"><?php echo $lang['set_general_6_1']; ?></span><br />
    <span class="popis"><?php echo $lang['set_general_6_2']; ?></span>
  </div>
  <div class="volby">
    <input type="radio" name="strankovani" id="set_strankovani_1" value="1"<?php if (empty($_POST['strankovani'])) {if ($result['hodnota'] == 1) {echo ' checked';};} else {if ($_POST['strankovani'] == 1) {echo ' checked';};}; ?> /> <label for="set_strankovani_1"><?php echo $lang['set_general_6_3']; ?></label>
    &nbsp;&nbsp;&nbsp;
    <input type="radio" name="strankovani" id="set_strankovani_2" value="2"<?php if (empty($_POST['strankovani'])) {if ($result['hodnota'] == 2) {echo ' checked';};} else {if ($_POST['strankovani'] == 2) {echo ' checked';};}; ?> /> <label for="set_strankovani_2"><?php echo $lang['set_general_6_4']; ?></label>
  </div>  
<div class="nf"></div>
<br />
</div>

<?php
$query = mysql_query("SELECT hodnota FROM jtcms_nastaveni WHERE typ='znakova_sada' LIMIT 1");
$result = mysql_fetch_array($query);
?>
<div class="moznost">
  <div class="otazka">
    <img src="stuff/img/icons/database.png" alt="" />
    <span class="nadpis"><?php echo $lang['set_general_7_1']; ?></span><br />
    <span class="popis"><?php echo $lang['set_general_7_2']; ?></span>
  </div>
  <div class="volby">
    <select name="znakova_sada" id="set_znakova_sada" class="input">
    <option value="utf8_czech_ci"<?php if (empty($_POST['znakova_sada'])) {if ($result['hodnota'] == "utf8_czech_ci") {echo ' selected';};} else {if ($_POST['znakova_sada'] == "utf8_czech_ci") {echo ' selected';};}; ?> />UTF-8
    <option value="latin2_czech_ci"<?php if (empty($_POST['znakova_sada'])) {if ($result['hodnota'] == "latin2_czech_ci") {echo ' selected';};} else {if ($_POST['znakova_sada'] == "latin2_czech_ci") {echo ' selected';};}; ?> />ISO-8859-2 (latin2)
    <option value="cp1250_czech_ci"<?php if (empty($_POST['znakova_sada'])) {if ($result['hodnota'] == "cp1250_czech_ci") {echo ' selected';};} else {if ($_POST['znakova_sada'] == "cp1250_czech_ci") {echo ' selected';};}; ?> />CP1250
    </select>
  </div>  
<div class="nf"></div>
<br />
</div>
</div>

<div class="tab" id="tab3">
<h2><?php echo $lang['set_general_h2_3']; ?></h2>
<br />

<?php 
$query = mysql_query("SELECT hodnota FROM jtcms_nastaveni WHERE typ='komentare' LIMIT 1");
$result = mysql_fetch_array($query);
?>
<div class="moznost">
  <div class="otazka">
    <img src="stuff/img/icons/comment.png" alt="" />
    <span class="nadpis"><?php echo $lang['set_general_8_1']; ?></span><br />
    <span class="popis"><?php echo $lang['set_general_8_2']; ?></span>
  </div>
  <div class="volby">
    <select name="komentare" size="1" class="input"> 
      <option value="1"<?php if (empty($_POST['komentare'])) {if ($result['hodnota'] == 1) {echo ' selected';};} else {if ($_POST['komentare'] == 1) {echo ' selected';};}; ?> /><?php echo $lang['set_general_8_3']; ?>
      <option value="2"<?php if (empty($_POST['komentare'])) {if ($result['hodnota'] == 2) {echo ' selected';};} else {if ($_POST['komentare'] == 2) {echo ' selected';};}; ?> /><?php echo $lang['set_general_8_4']; ?>
      <option value="3"<?php if (empty($_POST['komentare'])) {if ($result['hodnota'] == 3) {echo ' selected';};} else {if ($_POST['komentare'] == 3) {echo ' selected';};}; ?> /><?php echo $lang['set_general_8_5']; ?>
      <option value="4"<?php if (empty($_POST['komentare'])) {if ($result['hodnota'] == 4) {echo ' selected';};} else {if ($_POST['komentare'] == 4) {echo ' selected';};}; ?> /><?php echo $lang['set_general_8_6']; ?>
    </select>
  </div>  
<div class="nf"></div>
<br />
</div>

<?php 
$query = mysql_query("SELECT hodnota FROM jtcms_nastaveni WHERE typ='komentare_raz' LIMIT 1");
$result = mysql_fetch_array($query);
?>
<div class="moznost">
  <div class="otazka">
    <img src="stuff/img/icons/comments.png" alt="" />
    <span class="nadpis"><?php echo $lang['set_general_9_1']; ?></span><br />
    <span class="popis"><?php echo $lang['set_general_9_2']; ?></span>
  </div>
  <div class="volby">
    <select name="komentare_raz" size="1" class="input"> 
      <option value="1"<?php if (empty($_POST['komentare_raz'])) {if ($result['hodnota'] == 1) {echo ' selected';};} else {if ($_POST['komentare_raz'] == 1) {echo ' selected';};}; ?> /><?php echo $lang['set_general_9_3']; ?>
      <option value="2"<?php if (empty($_POST['komentare_raz'])) {if ($result['hodnota'] == 2) {echo ' selected';};} else {if ($_POST['komentare_raz'] == 2) {echo ' selected';};}; ?> /><?php echo $lang['set_general_9_4']; ?>
    </select>
  </div>  
<div class="nf"></div>
<br />
</div>
</div>

</div>

<br /><br />
<div class="tac">
<input type="submit" class="submit" name="submit" value="<?php echo $lang['set_general_save_setting']; ?>" />
</div>
</form>


<?php
include_end();
?>