
{include file="../head.tpl"}
<script language="javascript" type="text/javascript">
function check(){ldelim}
	if(document.kform.seloption.value == "massdel" ){ldelim}
		return confirm('{$langadmin.downloads_del_confirm}');
	{rdelim}
{rdelim}
</script>


<form action="downloads.php" method="post" name="uform" id="uform">
  <table width="100%"  border="0" cellpadding="4" cellspacing="1" class="tableborder">
    <tr>
      <td class="secondrow"><table width="100%"  border="0" cellspacing="2" cellpadding="1">
          <tr>
            <td><div align="right">
                <table  border="0" align="center" cellpadding="0" cellspacing="0">
                  <tr>
                    <td>
					<input name="optsort" type="hidden" id="optsort" value="1">
                    <input name="area" type="hidden" id="area" value="{$smarty.request.area}" />
                    </td>
                   
                    <td><div align="right">
                        <select name="cat" id="cat">
                          <option value=""> {$langadmin.all} </option>
                          
                         {foreach from=$cat_sel item=fitem}
						 {if $fitem->parent_id == 0}
						  <option style="font-weight:bold;font-style:italic" value="{$fitem->catid}" {if $smarty.request.cat == $fitem->catid} selected="selected" {/if}>{$fitem->visible_title}</option>
                       	{else}
						<option value="{$fitem->catid}" {if $smarty.request.cat == $fitem->catid} selected="selected" {/if}>{$fitem->visible_title}</option>
						{/if}
					    {/foreach}
        				</select>
                      </div></td>
                    <td><select name="selby" id="selby">
                        <option value="ntime" {if $smarty.request.selby == ntime} selected="selected" {/if}>{$langadmin.sortby} {$langadmin.date}</option>
						<option value="title" {if $smarty.request.selby == title} selected="selected" {/if}>{$langadmin.sortby} {$langadmin.title}</option>
                        <option value="hits" {if $smarty.request.selby == hits} selected="selected" {/if}>{$langadmin.sortby} {$langadmin.hits}</option>
                       <option value="autor" {if $smarty.request.selby == autor} selected="selected" {/if}>{$langadmin.sortby} {$langadmin.autor}</option>
                      </select>
                    </td>
                    <td><select name="ud" id="ud">
                         <option value="ASC" {if $smarty.request.ud == ASC} selected="selected" {/if}>{$langadmin.sortbyasc}</option>
						 <option value="DESC" {if $smarty.request.ud == DESC} selected="selected" {/if}>{$langadmin.sortbydesc}</option>
                       
                      </select>
                    </td>
                    <td>
<select name="pp" id="pp">
{section name=pp loop=95 step=5}
<option value="{$smarty.section.pp.index+10}" {if $smarty.request.pp == $smarty.section.pp.index+10}selected{/if}>{$smarty.section.pp.index+10} / {$langadmin.eachsite}</option>
{/section}
 </select>
                    </td>
                    <td><select name="offon" id="offon">
                        <option value="3" {if $smarty.request.offon == 3} selected="selected" {/if}> {$langadmin.snewsall} </option>
                        <option value="2" {if $smarty.request.offon == 2} selected="selected" {/if}> {$langadmin.snewsclose} </option>
                        <option value="1" {if $smarty.request.offon == 1} selected="selected" {/if}> {$langadmin.snewsopen} </option>
                      </select>
                    </td>
                    <td><input type="submit" class="button" value="{$langadmin.showthis}" />
                    </td>
                  </tr>
                 
                </table>
              </div></td>
          </tr>
        </table></td>
    </tr>
  </table>
</form>
<br>
<form method="post" name="kform" id="kform" onsubmit="return check();">
<table width="100%"  border="0" cellpadding="4" cellspacing="1" class="tableborder">
  <tr>
    <td colspan="8" class="header"><strong>{$langadmin.navi_downloads} ({$num}) </strong></td>
  </tr>
  <tr> 
    <td width="1%" class="firstrow"><input name="allbox" type="checkbox" id="d" onclick="selall();" value="" /></td>
 
    <td class="firstrow"><div align="left">{$langadmin.article_overview_header}</div></td>
    <td width="5%" class="firstrow"><div align="center">{$langadmin.text_downloads} </div></td>
    <td width="5%" nowrap class="firstrow"><div align="center">{$langadmin.text_downloads_today}</div></td>
    <td class="firstrow"><div align="center">{$langadmin.catonce}</div></td>
    <td class="firstrow"><div align="center">{$langadmin.actions} </div></td>
  </tr>
  {foreach from=$downloads item=item}
  <tr  class="{cycle name="c0" values="c1,c2"}"> 
    <td nowrap="nowrap" class="selectrow"><div align="center">
	<input name="sel[{$item->id}]" type="checkbox" id="d" value="1" />
	 </div></td>
    
    <td nowrap="nowrap" class="tdspacer" style="line-height:18px"> {if $item->active == 1} 
	
	<a target="_blank" href="../index.php?showfile=1&fid={$item->id}&p=downloads&area={$item->area}&categ={$item->catid}" class="nav">
	{/if} <strong>{$item->title|truncate:35}</strong> </a><br />
    <small><a class="top" href="user.php?action=edit&id={$item->uid}">{$item->user}</a> | {$item->ctime}</small></td>
    <td nowrap="nowrap" class="tdspacer"><div align="center">{$item->hits}</div></td>
    <td nowrap="nowrap" class="tdspacer"><div align="center">{$item->hits_today}</div></td>
    <td nowrap="nowrap" width="5%"><div align="center">{$item->catname}</div></td>
    <td nowrap="nowrap" width="10%"><div align="center">
	<select onchange="eval(this.options[this.selectedIndex].value);selectedIndex=0;" name="mf{$item->newsid}" id="mf{$item->id}" {if !permission("editarticle") && $uid != $item->uid}disabled="disabled"{/if} >
          <option value="location.href = 'downloads.php?area={$smarty.request.area}&action=edit&id={$item->id}{if $item->type!=''}&type={$item->type}{/if}'">{$langadmin.download_edit}</option>
          <option value="location.href = 'downloads.php?area={$smarty.request.area}&seloption=moveto&mode=once&id={$item->id}{if $page!=''}&page={$page}{/if}'">{$langadmin.download_move}</option>
          {if $item->active != 1}
		  <option value="location.href = 'downloads.php?area={$smarty.request.area}&action=fastopen&id={$item->id}{if $page!=''}&page={$page}{/if}'">{$langadmin.switchonline}</option>
		  {/if}
		  {if $item->active == 1}
          <option value="location.href = 'downloads.php?area={$smarty.request.area}&action=fastclose&id={$item->id}{if $page!=''}&page={$page}{/if}'">{$langadmin.switchoffline}</option>
		  {/if}
		  {if $item->comments > 0}
          <option value="location.href = 'downloads.php?area={$smarty.request.area}&action=comments&id={$item->id}{if $page!=''}&page={$page}{/if}'">{$langadmin.comments} ({$item->comments})</option>
		  {/if}
		  <option value="if(confirm('{$langadmin.download_del_confirm}')) location.href = 'downloads.php?area={$smarty.request.area}&action=del&id={$item->id}'">{$langadmin.delete}</option>
        </select>
        <input onclick="eval(document.getElementById('mf{$item->id}').value);" type="button" class="button" value="{$langadmin.go}">
    </div></td>
  </tr>
  {/foreach}
  <tr>
    <td colspan="6" nowrap="nowrap" class="firstrow"><div align="center">
        <input name="cat" type="hidden" id="cat" value="{$category}" />
        <input name="action" type="hidden" id="action" value="sl" />
        <input name="specials" type="hidden" id="specials" value="{$special}" />
        <input name="subaction" type="hidden" id="subaction" value="{$subaction}" />
        <input name="area" type="hidden" id="area" value="{$smarty.request.area}" />
        {$langadmin.marked}:
        <select name="seloption" id="seloption">
		<option value="close"> {$langadmin.close} </option>
          <option value="open"> {$langadmin.open} </option>
          <option value="massdel"> {$langadmin.delete} </option>
          <option value="moveto"> {$langadmin.docmove} </option>
        </select>
        <input name="Submit" type="submit" class="button" value="{$langadmin.go}" />
    </div></td>
  </tr>
</table>
<br>
{if $navi}
<table width="100%"  border="0" cellpadding="4" cellspacing="1" class="tableborder">
  <tr>
    <td class="c1">{$navi}</td>
  </tr>
</table>
<br />
{/if} {include file="../foot.tpl"} 