
<br />
{if $iserror == 1}
<br />
{$title_error}
<ul>
  {foreach from=$errors item=err}
  <li><span class="errorfont">
    {$err}
    </span></li>
  {/foreach}
</ul>
{/if}
<form action="index.php?p=changedetails" method="post" enctype="multipart/form-data" name="kform" id="kform">
  <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="200">{$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 $rf->fieldval=='male' || $smarty.request.gender==male}selected="selected"{/if}>
          {$lang.userfields_gender_m}
          </option>
          <option value="female" {if $rf->fieldval=='female' || $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 $rf->fieldval==1 || $smarty.request.title=='1'}selected="selected"{/if}>
          {$lang.userfields_title_m}
          </option>
          <option value="2" {if $rf->fieldval==2 || $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 $rf->fieldval=='private' || $smarty.request.person=='private'}selected="selected"{/if}>
          {$lang.userfields_person_p}
          </option>
          <option value="company" {if $rf->fieldval=='company' || $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|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="200">{$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 $of->fieldval=='male' || $smarty.request.gender==male}selected="selected"{/if}>
          {$lang.userfields_gender_m}
          </option>
          <option value="female" {if $of->fieldval=='female' || $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 $of->fieldval==1 || $smarty.request.title=='1'}selected="selected"{/if}>
          {$lang.userfields_title_m}
          </option>
          <option value="2" {if $of->fieldval==2 || $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 $of->fieldval=='private' || $smarty.request.person=='private'}selected="selected"{/if}>
          {$lang.userfields_person_p}
          </option>
          <option value="company" {if $of->fieldval=='company' || $smarty.request.person=='company'}selected="selected"{/if}>
          {$lang.userfields_person_c}
          </option>
        </select>
        {else}
        <input id="{$of->fieldname}" 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}
    {if permission('own_avatar')}
    <tr>
      <td width="200">{$lang.max_avatar_size}
        {$maxkb}
        kb <br />
        {$lang.max_avatar_width}
        {$avatar_height}
        <br />
        {$lang.max_avatar_height}
        {$avatar_width}
      </td>
      <td><span class="row_second">
        {if $row->user_avatar}
        <img src="uploads/avatars/{$row->user_avatar}" alt="" border="0" /> <br />
        {/if}
        <input name="file" type="file" size="40" />
        </span></td>
    </tr>
    <tr class="row_second">
      <td width="200">{$lang.avatar_delete}
      </td>
      <td><input name="delav" type="checkbox" id="delav" value="1" />
      </td>
    </tr>
    <tr class="row_second">
      <td width="200">{$lang.use_default_groupavatar}
      </td>
      <td><input name="usedefault_avatar" type="checkbox" id="usedefault_avatar" value="1" {if $row->usedefault_avatar==1}checked="checked"{/if} /></td>
    </tr>
    {/if}
    <tr class="row_first">
      <td width="200" nowrap="nowrap">{$lang.recieve_newsletter}</td>
      <td nowrap="nowrap"><input name="recieve_newsletter" type="checkbox" id="recieve_newsletter" value="1" {if $smarty.request.recieve_newsletter=='1' || $row->recieve_newsletter==1}checked="chekced"{/if} /></td>
    </tr>
   <tr class="row_second">
      <td width="200" nowrap="nowrap">{$lang.t_invisible}</td>
      <td nowrap="nowrap"><input name="invisible" type="checkbox" id="invisible" value="yes" {if $smarty.request.invisible=='yes' || $row->invisible=='yes'}checked="checked"{/if} /></td>
    </tr>
   <tr class="row_second">
      <td width="200" nowrap="nowrap">{$lang.t_viewemail}</td>
      <td nowrap="nowrap"><input name="user_viewemail" type="checkbox" id="user_viewemail" value="yes" {if $smarty.request.user_viewemail=='yes' || $row->user_viewemail=='yes'}checked="checked"{/if} /></td>
    </tr>
    <tr>
      <td colspan="2" nowrap="nowrap" class="box_innerhead"><strong>{$lang.personalmessage}</strong></td>
    </tr>
    <tr class="row_second">
      <td width="200" nowrap="nowrap">{$lang.t_canpn}</td>
      <td nowrap="nowrap"><input name="user_canpn" type="checkbox" id="user_canpn" value="yes" {if $smarty.request.user_canpn=='yes' || $row->user_canpn=='yes'}checked="checked"{/if} /></td>
    </tr>
  <tr class="row_first">
      <td width="200" nowrap="nowrap">{$lang.t_pntomail}</td>
      <td nowrap="nowrap"><input name="pntomail" type="checkbox" id="pntomail" value="yes" {if $smarty.request.pntomail=='yes' || $row->pntomail=='yes'}checked="checked"{/if} /></td>
    </tr>
    <tr class="row_second">
      <td width="200" nowrap="nowrap">&nbsp;</td>
      <td nowrap="nowrap"><input name="send" type="hidden" id="send" value="1" />
        <input class="button" type="submit" value="{$lang.send}" accesskey="s" /></td>
    </tr>
  </table>
</form>
