{if $iserror}
<br />
{$lang.title_error}
<ul>
  {foreach from=$errors item=err}
  <li><span class="errorfont">
    {$err}
  </span></li>
  {/foreach}
</ul>
{/if}
<br />
<form action="" method="post" name="f" id="f">
  <table width="100%" border="0" cellpadding="4" cellspacing="1" class="box_inner">
    <tr>
      <td colspan="2" class="box_innerhead"><strong>
        {$lang.requiredinformation}
        </strong>
          {$lang.requiredinformation_desc}</td>
    </tr>
    {foreach from=$ruf item=rf}
    <tr class="{cycle name='cs' values='row_second,row_first'}">
      <td width="150">{$rf->fieldtext}
      </td>
      <td>{if $rf->fieldname=='user_sig' || $rf->fieldname=='user_interests'}
          <textarea name="{$rf->fieldname}" cols="50" rows="5">{$rf->fieldval|default:$rf->default_val|sslash|escape:'html'}</textarea>
          {elseif $rf->fieldname=='gender'}
          <select name="gender">
            <option></option>
            <option value="male" {if $smarty.request.gender==male}selected="selected"{/if}>
            {$lang.userfields_gender_m}
            </option>
            <option value="female" {if $smarty.request.gender==female}selected="selected"{/if}>
            {$lang.userfields_gender_f}
            </option>
          </select>
          {elseif $rf->fieldname=='title'}
          <select name="title">
            <option></option>
            <option value="1" {if $smarty.request.title=='1'}selected="selected"{/if}>
            {$lang.userfields_title_m}
            </option>
            <option value="2" {if $smarty.request.title=='2'}selected="selected"{/if}>
            {$lang.userfields_title_f}
            </option>
          </select>
          {elseif $rf->fieldname=='person'}
          <select name="person">
            <option></option>
            <option value="private" {if $smarty.request.person=='private'}selected="selected"{/if}>
            {$lang.userfields_person_p}
            </option>
            <option value="company" {if $smarty.request.person=='company'}selected="selected"{/if}>
            {$lang.userfields_person_c}
            </option>
          </select>
          {else}
          <input id="{$rf->fieldname}" name="{$rf->fieldname}" type="{$rf->fieldtype}" value="{$rf->fieldval|default:$rf->default_val|sslash|escape:'html'}">
          {if $rf->fieldname=='user_birthday'}
          {$lang.birthday_sample}
          {/if}
          {/if}
      </td>
    </tr>
    {/foreach}
  </table>
  <br />
  <table width="100%" border="0" cellpadding="4" cellspacing="1" class="box_inner">
    <tr>
      <td colspan="2" class="box_innerhead"><strong>
        {$lang.optionalinformation}
        </strong>
          {$lang.optionalinformation_desc}
      </td>
    </tr>
    {foreach from=$ouf item=of}
   <tr class="{cycle name='cs' values='row_second,row_first'}">
      <td width="150">{$of->fieldtext}
      </td>
      <td>{if $of->fieldname=='user_sig' || $of->fieldname=='user_interests'}
          <textarea name="{$of->fieldname}" cols="50" rows="5">{$of->fieldval|default:$of->default_val|sslash|escape:'html'}</textarea>
          {elseif $of->fieldname=='gender'}
          <select name="gender">
            <option></option>
            <option value="male" {if $smarty.request.gender=='male'}selected="selected"{/if}>
            {$lang.userfields_gender_m}
            </option>
            <option value="female" {if $smarty.request.gender=='female'}selected="selected"{/if}>
            {$lang.userfields_gender_f}
            </option>
          </select>
          {elseif $of->fieldname=='title'}
          <select name="title">
            <option></option>
            <option value="1" {if $smarty.request.title=='1'}selected="selected"{/if}>
            {$lang.userfields_title_m}
            </option>
            <option value="2" {if $smarty.request.title=='2'}selected="selected"{/if}>
            {$lang.userfields_title_f}
            </option>
          </select>
          {elseif $of->fieldname=='person'}
          <select name="person">
            <option></option>
            <option value="private" {if $smarty.request.person=='private'}selected="selected"{/if}>
            {$lang.userfields_person_p}
            </option>
            <option value="company" {if $smarty.request.person=='company'}selected="selected"{/if}>
            {$lang.userfields_person_c}
            </option>
          </select>
          {else}
          <input name="{$of->fieldname}" type="{$of->fieldtype}" value="{$of->fieldval|default:$of->default_val|sslash|escape:'html'}">
          {if $of->fieldname=='user_birthday'}
        {$lang.birthday_sample}
          {/if}
          {/if}
      </td>
    </tr>
    {/foreach}
  </table>
  {if $disp_securepng==1}
  <br />
  <table width="100%"  border="0" cellpadding="5" cellspacing="1" class="box_inner">
    <tr>
      <td><table width="100%"  border="0" cellspacing="1" cellpadding="1">
          <tr>
            <td width="20%"><span class="row_first">
              {$lang.securecode_t}
              </span></td>
            <td><span class="row_second"><img src="system/securepng.php?pim={$pim}" alt="" border="0" /></span></td>
          </tr>
          <tr>
            <td width="20%"><span class="row_first">
              {$lang.securecode_enter}
              </span></td>
            <td><span class="row_second">
              <input name="scode" type="text" class="inputfield" id="scode" onkeypress="if(event.keyCode < 48 || event.keyCode > 57) {literal} { event.returnValue = false; } else {if(event.which < 48 || event.which > 57) return false;} {/literal}" value="{$postscode}" size="15" maxlength="7" />
              </span></td>
          </tr>
        </table></td>
    </tr>
  </table>
  {/if}
  <br />
  <table width="100%"  border="0" cellpadding="5" cellspacing="1" class="box_inner">
    <tr>
      <td><strong>
        {$lang.rulez_t}
        </strong> <br />
        <textarea name="textfield" rows="10" style="width:98%">{$regrules}</textarea>
        <br />
        <br />
        <div align="center">
          {$rulezcheckbox}
          {$lang.rulez_tok}
          <br />
          <br />
          <input name="pim" type="hidden" id="pim" value="{$secuid}" />
          <input name="send" type="hidden" id="send" value="1" />
          <input type="submit" class="button" value="{$lang.buttonregister_ok}" />
          <br />
          <br />
          (<a onclick="return confirm('{$register_notoksure}')" href="index.php">
          {$lang.buttonregister_notok}
          </a>) </div></td>
    </tr>
  </table>
</form>
