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


<form action="articles.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><select name="type" id="type">
                      <option value="">{$langadmin.all}</option>
					  <option value="review" {if $smarty.request.type=="review"}selected="selected"{/if}>{$langadmin.reviews_once}</option>
					  <option value="preview" {if $smarty.request.type=="preview"}selected="selected"{/if}>{$langadmin.previews_once}</option>
					   <option value="special" {if $smarty.request.type=="special"}selected="selected"{/if}>{$langadmin.specials_once}</option>
					   <option value="column" {if $smarty.request.type=="column"}selected="selected"{/if}>{$langadmin.column_once}</option>
					  <option value="interview" {if $smarty.request.type=="interview"}selected="selected"{/if}> {$langadmin.interviews_once}</option>
                    </select></td>
                    <td><div align="right">
                        <select name="cat" id="cat">
                          <option value=""> {$langadmin.kat} </option>
                          
                         {foreach from=$cat_sel item=fitem}
						  <option value="{$fitem->catid}" {if $smarty.request.cat == $fitem->catid} selected="selected" {/if}>{$fitem->visible_title}</option>
                        {/foreach}
        				</select>
                      </div></td>
                    <td><select name="selby" id="selby">
                        <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="printed" {if $smarty.request.selby == printed} selected="selected" {/if}> {$langadmin.sortby} {$langadmin.printed} </option>
                        <option value="ntime" {if $smarty.request.selby == ntime} selected="selected" {/if}>{$langadmin.sortby} {$langadmin.date}</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="DESC" {if $smarty.request.ud == DESC} selected="selected" {/if}>{$langadmin.sortbydesc}</option>
                        <option value="ASC" {if $smarty.request.ud == ASC} selected="selected" {/if}>{$langadmin.sortbyasc}</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="9" class="header"><strong>{$langadmin.article_overview} ({$num}) </strong>{if $switchnorm == 1}<a href="news.php">{$langadmin.switchnormnewspage}</a>{/if}</td>
  </tr>
  <tr class="firstrow"> 
    <td width="1%"><input name="allbox" type="checkbox" id="d" onclick="selall();" value="" /></td>
 
    <th class="firstrow"><div align="left">{$langadmin.article_overview_header}</div></th>
    <th width="5%" class="firstrow">{$langadmin.hits} </th>
    <th width="5%" class="firstrow">{$langadmin.printed} </th>
    <th width="5%" class="firstrow">{$langadmin.catonce} </th>
    <th class="firstrow">{$langadmin.article_type}</th>
    <th class="firstrow">{$langadmin.actions} </th>
  </tr>
  {foreach from=$articles 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" {if !permission("editarticle") && $uid != $item->uid}disabled="disabled"{/if} />
	 </div></td>
    
    <td nowrap="nowrap" class="tdspacer" style="line-height:18px"> {if $item->active == 1} 
	
	<a target="_blank" href="../index.php?type={$item->type}&amp;area={$item->area}&amp;p=articles&amp;id={$item->id}" class="nav">
	{/if} <strong>{$item->title|truncate:35}</strong> </a><br />
    <small><a class="top" href="user.php?action=edit&amp;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->printed}</div></td>
    <td nowrap="nowrap" class="tdspacer"><div align="center">{$item->catname}</div></td>
    <td nowrap="nowrap" width="5%"><div align="center">
	{if $item->type=="special"}
	{$langadmin.specials_once}
	{elseif $item->type=="preview"}
	{$langadmin.previews_once}
	{elseif $item->type=="review"}
	{$langadmin.reviews_once}
	{elseif $item->type=="interview"}
	{$langadmin.interviews_once}
	{elseif $item->type=="column"}
	{$langadmin.column_once}
	{/if}
	
	
	</div></td>
    <td nowrap="nowrap" width="10%"><div align="center">
	{if !permission("editarticle") && $uid != $item->uid}<small>{$langadmin.noperms_document}</small>{else}
        <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 = 'articles.php?area={$smarty.request.area}&amp;action=edit&amp;id={$item->id}&amp;type={$item->type}'">{$langadmin.artcile_edit}</option>
          <option value="location.href = 'articles.php?area={$smarty.request.area}&amp;seloption=moveto&amp;mode=once&amp;id={$item->id}&amp;page={$page}'">{$langadmin.article_move}</option>
          {if $item->active != 1}
		  <option value="location.href = 'articles.php?area={$smarty.request.area}&amp;action=fastopen&amp;id={$item->id}&amp;page={$page}'">{$langadmin.switchonline}</option>
		  {/if}
		  {if $item->active == 1}
          <option value="location.href = 'articles.php?area={$smarty.request.area}&amp;action=fastclose&amp;id={$item->id}&amp;page={$page}'">{$langadmin.switchoffline}</option>
		  {/if}
		  {if $item->comments > 0}
          <option value="location.href = 'articles.php?area={$smarty.request.area}&amp;action=comments&amp;id={$item->id}&amp;page={$page}'">{$langadmin.comments} ({$item->comments})</option>
		  {/if}
		  <option value="if(confirm('{$langadmin.article_del_confirm}')) location.href = 'articles.php?area={$smarty.request.area}&amp;action=del&amp;id={$item->id}&amp;page={$page}'">{$langadmin.delete}</option>
        </select>
        <input onclick="eval(document.getElementById('mf{$item->id}').value);" type="button" class="button" value="{$langadmin.go}" {if !permission("editarticle") && $uid != $item->uid}disabled="disabled"{/if} >
      {/if}
	  </div></td>
  </tr>
  {/foreach}
  <tr>
    <td colspan="7" nowrap="nowrap" class="firstrow"><div align="center">
        <input name="cat" type="hidden" id="cat" value="{$category}" />
        <input name="action" type="hidden" id="action" value="" />
        <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"} 