{include file='../head.tpl'}
<link href="../style.css" rel="stylesheet" type="text/css">

<form method="post" action="user.php?subaction=userfiles&amp;action=save">
<table width="100%"  border="0" cellpadding="3" cellspacing="1" class="tableborder">

<tr>
  <td colspan="3" class="header">{$langadmin.new_restricted_downloadcat_header} {$smarty.request.uid} </td>
  </tr>
<tr>
  <th class="secondrow"><strong>{$langadmin.catonce}</strong></th>
  <th class="secondrow"><strong>{$langadmin.download_cat_restricted_till}</strong></th>
  <th class="secondrow"><strong>{$langadmin.delete}</strong></th>
  </tr>
{foreach from=$userfilecat item=uf} 

<tr class="{cycle name='ufi' values='firstrow,secondrow'}">
    <td>
      {$uf->dlcatname}</td>
    <td><div align="center">
      <select name="d[{$uf->id}]" id="d[{$uf->id}]">
	  {section name=day loop=31}
        <option value="{$smarty.section.day.index+1}" {if $uf->date_day==$smarty.section.day.index+1}selected="selected"{/if}>{$smarty.section.day.index+1}</option>
		{/section}
      </select>
	  
      <select name="m[{$uf->id}]" id="m[{$uf->id}]">
	  {section name=month loop=12}
        <option value="{$smarty.section.month.index+1}" {if $uf->date_month==$smarty.section.month.index+1}selected="selected"{/if}>{$smarty.section.month.index+1}</option>
		{/section}
      </select>
	  
      <select name="y[{$uf->id}]" id="y[{$uf->id}]">
	  {section name=year loop=2050 start=2003}
        <option value="{$smarty.section.year.index+1}" {if $uf->date_year==$smarty.section.year.index+1}selected="selected"{/if}>{$smarty.section.year.index+1}</option>
		{/section}
      </select>
	  
</div></td>
    <td>      <div align="center">
      <input name="del[{$uf->id}]" type="checkbox" id="del[{$uf->id}]" value="1" />
    </div></td>
    </tr>
    {/foreach}
<tr>
  <td colspan="3" class="secondrow"><input type="submit" class="button" value="{$langadmin.save}" />
    <input name="uid" type="hidden" id="uid" value="{$smarty.request.uid}" /></td>
  </tr>


</table>
</form>

<form method="post" action="user.php?subaction=userfiles&amp;action=new">
  <table width="100%"  border="0" cellpadding="3" cellspacing="1" class="tableborder">
    <tr>
      <td colspan="2" class="header">{$langadmin.new_restricted_downloadcat}</td>
    </tr>
    <tr>
      <td width="40%" class="firstrow">        {$langadmin.catonce}      </td>
      <td class="secondrow">
<select name="downloadcat[]" size="5" multiple id="downloadcat">
  {foreach from=$cat_sel item=item}
  {if $item->parent_id == 0}
  <option style="font-weight:bold;font-style:italic" value="{$item->catid}" {if $parent_id==$item->catid or $smarty.request.parent_id==$item->catid} selected="selected" {/if}>
  {$item->visible_title}
  </option>
  {else}
  <option value="{$item->catid}" {if $parent_id == $item->catid or $smarty.request.parent_id==$item->catid} selected="selected" {/if}>
  {$item->visible_title}
  </option>
  {/if}
  {/foreach}
</select></td>
    </tr>
    <tr>
      <td class="firstrow">{$langadmin.download_till}</td>
      <td class="secondrow"><select name="d_n" id="d_n">
        {section name=day loop=31}
        <option value="{$smarty.section.day.index+1}">
        {$smarty.section.day.index+1}
        </option>
        {/section}
      </select>
        <select name="m_n" id="m_n">
          {section name=month loop=12}
          <option value="{$smarty.section.month.index+1}">
          {$smarty.section.month.index+1}
          </option>
          {/section}
        </select>
        <select name="y_n" id="y_n">
          {section name=year loop=2050 start=2003}
          <option value="{$smarty.section.year.index+1}">
          {$smarty.section.year.index+1}
          </option>
          {/section}
        </select></td>
    </tr>
    <tr>
      <td colspan="2" class="firstrow"><input type="submit" class="button" value="{$langadmin.save}" />
        <span class="secondrow">
        <input name="uid" type="hidden" id="uid" value="{$smarty.request.uid}" />
      </span></td>
    </tr>
  </table>
</form>