<?php
session_start();

$title = 'Registrácia';

include('funkcie.php');
include('funkcie_select.php');
include('funkcie_insert.php');
include('funkcie_update.php');
include('funkcie_delete.php');

hlavicka($title);
?>

<body>

  <?php
    if (isset($_POST['odos']) && meno_ok($_POST["reg_meno"]) && heslo_ok($_POST['reg_heslo']) && 
        ($_POST['reg_heslo']==$_POST['reg_heslo1']) && nick_ok($_POST['reg_log']) && mail_ok($_POST['reg_mail'])){
        vloz_uzivatela(); header("Location: ./index.php"); exit();
    }
    else echo 'Chybne ste vyplnili formulár..<br/><br/>';
  ?>
  
  <div id="poz">
    <?php include('navigacia.php'); ?>
  <div id="main">
  <div id="prihl_main">
    <div id="prihl_left">
      <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post" name="form">
        <table id="registracia">
          <tr>
            <td><strong>Celé meno:  </strong></td>
            <td colspan="2">
              <input name="reg_meno" type="text" value="<?php if (isset($_POST["reg_meno"])) {echo $_POST["reg_meno"];} ?>" 
              class=""/>
            </td>
            <td class="">(6 až 30 znakov)</td>
          </tr>
          <tr>
            <td><strong>Prihlasovacie meno:  </strong></td>
            <td colspan="2">
              <input name="reg_log" type="text" value="<?php if (isset($_POST["reg_log"])) {echo $_POST["reg_log"];} ?>" 
              class="policko1"/>
            </td>
            <td class="">(5 až 20 znakov)</td>
          </tr>
          <tr>
            <td><strong>Heslo:  </strong></td>
            <td colspan="2"><input name="reg_heslo" type="password" class=""/></td>
            <td class="">(5 až 20 znakov)</td>
          </tr>
          <tr>
            <td><strong>Zopakujte heslo:  </strong></td>
            <td colspan="2"><input name="reg_heslo1" type="password" class=""/></td>
            <td class="">(5 až 20 znakov)</td>
          </tr>
          <tr>
            <td><strong>Email:  </strong></td>
            <td colspan="2"><input name="reg_mail" type="text" value="<?php if (isset($_POST["reg_mail"])) {echo $_POST["reg_mail"];}?>" class=""/></td>
          </tr>
          <tr>
            <td><strong>Zadajte pohlavie:  </strong></td>
            <td class="reg_radio">
              <input name="reg_sex" value="1" type="radio" id="reg_sex1"/><label for="reg_sex1"> Muž</label>
              <input name="reg_sex" value="0" type="radio" id="reg_sex0"/><label for="reg_sex0"> Žena</label>
            </td>
          </tr>
          <tr>
            <td class="" colspan="4"><input type="submit" name="odos" value="Registruj" class="" /></td>
          </tr>
        </table>
      </form>
    </div>
    <div id="prihl_right">
      hiiii iiiii iigyvgbi yh vvgvhbhsbfaee theth erheh errertrtrtr ert  ertert
      hiiii iiiii iigyvgbi yh vvgvhbhsbfaee theth erheh errertrtrtr ert  ertert<br/><br/>
      hiiii iiiii iigyvgbi yh vvgvhbhsbfaee theth erheh errertrtrtr ert  ertert
      hiiii iiiii iigyvgbi yh vvgvhbhsbfaee theth erheh errertrtrtr ert  ertert
      hiiii iiiii iigyvgbi yh vvgvhbhsbfaee theth erheh errertrtrtr ert  ertert
      hiiii iiiii iigyvgbi yh vvgvhbhsbfaee theth erheh errertrtrtr ert  ertert<br/><br/>
      hiiii iiiii iigyvgbi yh vvgvhbhsbfaee theth erheh errertrtrtr ert  ertert
    </div>
    
  </div>
  </div>
  <div id="paticka">©2008 - 2009 Forum for Everyone | Created by Ygnac</div>
  </div>
</body>
</html>
