
<form action="" method="post" enctype="multipart/form-data" name="kform">
  <table width="100%"  border="0" cellpadding="2" cellspacing="0" class="tableborder">
    <tr>
      <td colspan="6" class="header">Smilies (Emoticons)</td>
    </tr>
  
    <tr class="secondrow">
      <td colspan="6" class="firstrow">{$info}</td>
    </tr>
    <tr class="secondrow">
      <th width="20" class="headers">{#Forums_Smi_smilie#}</th>
      <th width="130" class="headers">{#Forums_Smi_active#}</th>
      <th width="100" class="headers"><strong>{#Forums_Smi_short#}</strong></th>
      <th width="100" class="headers">{#Forums_Smi_icon#}</th>
      <th width="100" class="headers">{#Global_Position#}</th>
      <td class="headers"><label><input name="allbox" type="checkbox" id="d" onclick="selall();" value="" />
      {#Global_SelAll#}</label></td>
    </tr>
	{foreach from=$smileys item="sm"}
 
	<tr  class="{cycle name='sm1' values='second,first'}">
      <td width="5%" align="center" nowrap>{$sm->Icon}
      <input type="hidden" name="smilie[{$sm->id}]" value="1" />
      </td>
      <td align="center" nowrap>
      <label><input type="radio" name="active[{$sm->id}]" value="1" {if $sm->active==1}checked{/if}> {#Yes#}</label>        
      <label><input type="radio" name="active[{$sm->id}]" value="2" {if $sm->active==2}checked{/if}> {#No#}</label>
      </td>
      <td align="center">        <input class="input" name="code[{$sm->id}]" type="text" id="code[{$sm->id}]" value="{$sm->code}" size="10">      </td>
      <td align="center">        <input class="input" name="path[{$sm->id}]" type="text" id="path[{$sm->id}]" value="{$sm->path}" size="15">      </td>
      <td align="center">        <input class="input" name="posi[{$sm->id}]" type="text" id="posi[{$sm->id}]" value="{$sm->posi}" size="5">      </td>
      <td>        
      <label><input name="del[{$sm->id}]" type="checkbox" id="d" value="1" /> {#Global_Delete#}</label>
       </td>
    </tr>
  {/foreach}
  </table>
  <input type="submit" class="button big" value="{#Save#}" />
  <input name="save" type="hidden" id="save" value="1" />
</form>
<form action="" method="post" enctype="multipart/form-data" name="adds" id="adds">
<fieldset>
<legend>{#Forums_Smi_new#}</legend>
{if !$smi}
{$config_vars.Forums_Smi_AllUsed|replace:"__PATH__":$smi_t_path}
{else}
  <table width="100%"  border="0" cellpadding="2" cellspacing="0" class="tableborder">
    
    <tr>
      <td colspan="2" class="firstrow">{$info}</td>
    </tr>
    <tr>
      <td>{#Forums_Smi_short#}</td>
      <td>{#Forums_Smi_icon#}</td>
    </tr>
 {section name="new" loop=5}
  {assign var="count" value=$count+1}
     <tr>
      <td width="10%"><div align="center">
        <input class="input" name="code[]" type="text" id="code_{$count}">
      </div></td>
      <td>  
      <select onchange="if(this.options[this.selectedIndex].value==''){ldelim}document.getElementById('smi_{$count}').innerHTML = '';document.getElementById('code_{$count}').value='';{rdelim}else{ldelim}document.getElementById('code_{$count}').value=document.getElementById(this.options[this.selectedIndex].value).value; document.getElementById('smi_{$count}').innerHTML = '<img class=\'absmiddle\' src={$smi_path}' + this.options[this.selectedIndex].value + '>'{rdelim}" class="input" name="path[]" type="text" id="path[]">
      <option value=""></option>
      {foreach from=$smi item=s}
      <option value="{$s->Name}">{$s->Name}</option>
      {/foreach}
      </select>      
      {foreach from=$smi item=s}
      <input type="hidden" name="" id="{$s->Name}" value="{$s->Short}" />
      {/foreach}
      <span id="smi_{$count}"></span>      </td>
    </tr>
 {/section}
    <tr>
      <td colspan="2" class="thirdrow">
      <input name="new" type="hidden" id="new" value="1" /></td></tr>
  </table>
  <input type="submit" class="button big" value="{#Save#}" />
  {/if}
  </fieldset>
</form>
