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


<form action="news.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="area" type="hidden" id="area" value="{$area}" />
                    </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 $cat == $fitem->catid} selected="selected" {/if}>{$fitem->catname} ({$fitem->num})</option>
                          
                           {/foreach}
        				
                        </select>
                      </div></td>
                    <td><select name="selby" id="selby">
                        <option value="title" {if $selby == title} selected="selected" {/if}>{$langadmin.sortby} {$langadmin.title}</option>
                        <option value="hits" {if $selby == hits} selected="selected" {/if}>{$langadmin.sortby} {$langadmin.hits}</option>
                        <option value="printed" {if $selby == printed} selected="selected" {/if}> {$langadmin.sortby} {$langadmin.printed} </option>
                        <option value="ntime" {if $selby == ntime} selected="selected" {/if}>{$langadmin.sortby} {$langadmin.date}</option>
                        <option value="autor" {if $selby == autor} selected="selected" {/if}>{$langadmin.sortby} {$langadmin.autor}</option>
                      </select>
                    </td>
                    <td><select name="ud" id="ud">
                        <option value="DESC" {if $ud == DESC} selected="selected" {/if}>{$langadmin.sortbydesc}</option>
                        <option value="ASC" {if $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 $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 $offon == 3} selected="selected" {/if}> {$langadmin.snewsall} </option>
                        <option value="2" {if $offon == 2} selected="selected" {/if}> {$langadmin.snewsclose} </option>
                        <option value="1" {if $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="5" cellspacing="1" class="tableborder">
  <tr>
    <td colspan="8" class="header"><strong>{$langadmin.news} ({$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.newstitle} | {$langadmin.date}</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.actions} </th>
  </tr>
  {foreach from=$news item=item}
  <tr  class="{cycle name="c0" values="c1,c2"}">
    <td nowrap="nowrap" class="selectrow"><div align="center">
        <input name="news_{$item->newsid}" type="checkbox" id="d" value="1" {if !permission("editnewsall") && $uid != $item->uid}disabled="disabled"{/if}  />
    </div></td>
   
    <td nowrap="nowrap" class="tdspacer" style="line-height:18px"> {if $item->ispublic == 1} <a target="_blank" href="../index.php?p=news&area={$area}&newsid={$item->newsid}" class="nav"> {/if} <strong>{$item->title}</strong> </a> <br />
    <small><a class="top" href="user.php?action=edit&id={$item->uid}">{$item->user}</a> | {$item->ntime}</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->newscat}</div></td>
    <td nowrap="nowrap" width="10%"><div align="center">
	{if !permission("editnewsall") && $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->newsid}">
          <option value="location.href = 'news.php?area={$area}&action=edit&id={$item->newsid}{$addtolink}{$special}{if $cat}&cat={$cat}{/if}'">{$langadmin.editnews}</option>
          <option value="location.href = 'news.php?area={$area}&seloption=moveto&id={$item->newsid}&page={$page}{$addtolink}{$special}&utd=news_{$item->newsid}&mode=7{if $cat}&cat={$cat}{/if}'">{$langadmin.buttonnewsmove}</option>
          {if $item->isp != 1}
		  <option value="location.href = 'news.php?area={$area}&action=fastopen&id={$item->newsid}&page={$page}{$addtolink}{$special}{if $cat}&cat={$cat}{/if}'">{$langadmin.switchonline}</option>
		  {/if}
		  {if $item->isp == 1}
          <option value="location.href = 'news.php?area={$area}&action=fastclose&id={$item->newsid}&page={$page}{$addtolink}{$special}{if $cat}&cat={$cat}{/if}'">{$langadmin.switchoffline}</option>
		  {/if}
		  {if $item->comments > 0}
          <option value="location.href = 'news.php?area={$area}&action=comments&id={$item->newsid}&page={$page}{$addtolink}{$special}'">{$langadmin.comments} ({$item->comments})</option>
		  {/if}
		  <option value="if(confirm('{$langadmin.confirmdelnews}')) location.href = 'news.php?area={$area}&action=del&id={$item->newsid}&page={$page}{$addtolink}{$special}{if $cat}&cat={$cat}{/if}'">{$langadmin.delete}</option>
        </select>
        <input onclick="eval(document.getElementById('mf{$item->newsid}').value);" type="button" class="button" value="{$langadmin.go}">
      {/if}</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="{$area}" />
        {$langadmin.marked}:
        <select name="seloption" id="seloption">
          <option value="massclose"> {$langadmin.close} </option>
          <option value="massopen"> {$langadmin.open} </option>
          <option value="massdel"> {$langadmin.delete} </option>
          <option value="moveto"> {$langadmin.movetosec} </option>
        </select>
        <input name="Submit" type="submit" class="button" value="{$langadmin.go}" />
    </div></td></tr>
</table>
<br>
{if $shownavi == 1}
<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"} 