
<div class="header">{#Content#}</div>

<div class="subheaders">
<form onsubmit="return checkmform();" method="post" action="index.php?do=content&sub=overview" name="">
  <table width="100%" border="0" cellpadding="2" cellspacing="0">
    <tr>
      <td width="100">{#Global_searchW#}</td>
      <td width="150"><input style="width:130px" class="input"  type="text" name="q" value="{$smarty.request.q}" /></td>
      <td width="80" align="right">{#Global_Categ#} </td>
      <td>
      <select  style="width:124px"  class="input" name="categ">
        <option value="0">{#News_allC#}</option>
        {foreach from=$newscategs item=dd}
        <option value="{$dd->Id}" {if $smarty.request.categ==$dd->Id}selected="selected"{/if}>{$dd->Name|koobispecialchars} </option>
         {/foreach}
        </select>
        </td>
    </tr>
    <tr>
      <td>{#Global_Status#}</td>
      <td>
      <select  style="width:134px"  class="input" name="aktiv">
        <option value="">{#Global_CoE#}</option>
        <option value="1" {if $smarty.request.aktiv=='1'}selected="selected"{/if}>{#Global_Opened#}</option>
        <option value="0" {if $smarty.request.aktiv=='0'}selected="selected"{/if}>{#Global_Closed#}</option>
        </select>       </td>
      <td align="right">{#Global_Hits#}</td>
      <td>
      <input name="hits_from" type="text" class="input" style="width:45px" value="{$smarty.request.hits_from|default:'0'}" maxlength="8"> - 
      <input name="hits_to" type="text" class="input" style="width:45px" value="{$smarty.request.hits_to|default:'10000'}" maxlength="8">
      <input name="startsearch" type="hidden" id="startsearch" value="1"></td>
    </tr>
    <tr>
      <td>{#Global_DateTill#}</td>
      <td><input class="input" style="width:100px" type="text" name="date_till" id="date_till" readonly="readonly" value="{$smarty.request.date_till|koobispecialchars}"></td>
      <td align="right">{#DataRecords#}</td>
      <td><input type="text" class="input" name="pp" style="width:45px" value="{$limit}">
        <input class="button" type="submit" onClick="document.getElementById('multi').value='';document.getElementById('del_innerhtml').style.display='none'" value="{#Global_search_b#}" /></td>
    </tr>
  </table>
  

{if $smarty.session.ContentSearch && perm('content_multioptions') && $news}
<div id="del_innerhtml">
<fieldset>
<legend><label for="mf">{#Content_MultiAction#}</label></legend>
{if $multi_done==1}
<h3>{#News_multiaction_actiondone#}</h3>
<br />
{/if}

<select onchange="checkcategmove()" class="input" style="width:250px" name="multiaction">
<option value="open">{#Content_MultiAction_Open#}</option>
<option value="close">{#Content_MultiAction_Close#}</option>
<option id="movecateg" value="movecateg">{#Content_MultiAction_MoveNewCateg#}</option>
<option id="mdel" value="delete">{#Global_Delete#}</option>
</select>
<input type="hidden" name="multi" id="multi" value="1">
<span id="movecateg_select" style="display:none">
<select  style="width:124px"  class="input" name="newcateg">
{foreach from=$newscategs item=dd}
<option value="{$dd->Id}" {if $smarty.request.categ==$dd->Id}selected="selected"{/if}>{$dd->Name|koobispecialchars} </option>
{/foreach}
</select>
</span>
<input class="button" type="submit"  onclick="document.getElementById('startsearch').value='';" value="{#News_multiaction_button#}" />
</fieldset>
</div>
{/if}
  </form>
</div>

{if $news}
<form method="post" action="" name="kform">
<table width="100%" border="0" cellspacing="0" cellpadding="3">

  <tr class="{cycle name=$cna values='first,second'}">
    <td width="150" class="headers"><a href="{$ordstr}{$name_s|default:'&sort=name_asc'}">{#Global_Name#}</a></td>
    <td width="80" align="center" class="headers"><a href="{$ordstr}{$username_s|default:'&sort=username_desc'}">{#Global_Author#}</a></td>
    <td width="50" align="center" class="headers"><a href="{$ordstr}{$date_s|default:'&sort=date_desc'}">{#Global_Created#}</a></td>
    <td width="50" align="center" class="headers"><a href="{$ordstr}{$hits_s|default:'&sort=hits_desc'}">{#Global_Hits#}</a></td>
    <td width="10" class="headers">{#Global_Categ#}</td>
    <td width="50" class="headers">{#Content_tops#}</td>
    <td width="80" class="headers">Tag</td>
    <td class="headers">{#Global_Actions#}</td>
    </tr>
  {foreach from=$news item=n}
  <tr class="{cycle name=$cna values='second,first'}">
    <td class="row_spacer">
    {if $n->Aktiv==0}
    <span style="text-decoration:line-through; font-weight:bold">{$n->Titel1}</span>
        {else}
    <a href="../index.php?p=content&amp;id={$n->Id}&amp;name={$n->Titel1|seotitle}&amp;area={$area}" target="_blank"><strong>{$n->Titel1|koobispecialchars}</strong></a>
     {/if}
      {if $n->Kennwort!=''}<br /><small>{#WithPass#}</small>{/if}   
    <input type="hidden" name="nid[{$n->Id}]" value="{$n->Id}" />    </td>
    <td align="center" nowrap class="row_spacer"><a href="javascript:void(0);" onclick="popup('index.php?do=user&sub=edituser&user={$n->Autor}&noframes=1','User',980,680,1)">{$n->User}</a></td>
    <td align="center" nowrap class="row_spacer">{$n->Datum|date_format:"%d.%m.%y"}</td>
    <td align="center" class="row_spacer">{$n->Hits}</td>
    <td class="row_spacer" nowrap="nowrap">
    <select  style="width:80px"  class="input" name="Kategorie[{$n->Id}]">
        {foreach from=$newscategs item=dd}
        <option value="{$dd->Id}" {if $n->Kategorie==$dd->Id}selected="selected"{/if}>{$dd->Name|koobispecialchars} </option>   
        {/foreach}
        </select>        </td>
    <td class="row_spacer">
    <select  style="width:70px"  class="input" name="Topcontent[{$n->Id}]">
     <option value="1" {if $n->Topcontent==1}selected="selected"{/if}>{#Yes#} </option>   
     <option value="0" {if $n->Topcontent==0}selected="selected"{/if}>{#No#} </option>   
     </select>    </td>
    <td class="row_spacer" nowrap="nowrap"><strong>&#123;getContent id={$n->Id}&#125;</strong></td>
    <td class="row_spacer" nowrap="nowrap">
    {if perm('content_edit')}
    {if $n->Autor!=$smarty.session.benutzer_id && (!perm('content_edit_all'))}
    <img src="{$imgpath}/edit_no.png" alt="" border="0" />
    {else}
    <a {popup sticky=$config_vars.POPSTICKY  text=$config_vars.Content_edit} href="javascript:void(0);" onclick="popup('index.php?do=content&sub=editcontent&id={$n->Id}&noframes=1&langcode=1','contentEdit',980,820,1);"><img class="absmiddle" src="{$imgpath}/edit.png" alt="" border="0" /></a>
    {/if}
    {/if}
    {if perm('content_openclose')}<a {if $n->Aktiv!=1}{popup sticky=$config_vars.POPSTICKY  text=$config_vars.Content_MultiAction_Open}{else}{popup sticky=$config_vars.POPSTICKY  text=$config_vars.Content_MultiAction_Close}{/if} href="javascript:void(0);" onclick="popup('index.php?do=content&sub=openclose&openclose={if $n->Aktiv!=1}1{else}0{/if}&id={$n->Id}&noframes=1','it',1,1,1);"><img class="absmiddle" src="{$imgpath}/{if $n->Aktiv!=1}closed{else}opened{/if}.png" alt="" border="0" /></a>{/if}
    {if perm('comments')}{if $n->Comments>=1}<a {popup sticky=$config_vars.POPSTICKY  text=$config_vars.Global_Comments} href="javascript:void(0);" onclick="popup('index.php?do=comments&amp;where=content&amp;object={$n->Id}&amp;noframes=1','ed',980,750,1)"><img class="absmiddle" src="{$imgpath}/message.png" alt="" border="0" /></a>{else}<img {popup sticky=$config_vars.POPSTICKY  text=$config_vars.Global_Comments} class="absmiddle" src="{$imgpath}/message_no.png" alt="" border="0" />{/if}{/if}
    {if perm('content_delete')}
    {if $n->Autor!=$smarty.session.benutzer_id && (!perm('content_delete_all'))}
    {else}
    <a {popup sticky=$config_vars.POPSTICKY  text=$config_vars.Global_Delete} href="javascript:void(0);" onclick="if(confirm('{#Content_delC#}')) popup('index.php?do=content&sub=delete&id={$n->Id}&noframes=1','Newsdel',1,1,1);"><img class="absmiddle" src="{$imgpath}/delete.png" alt="" border="0" /></a>
     {/if}
    {/if}
    {if $n->Wertung>=1 && perm('del_rating')}
     <a {popup sticky=$config_vars.POPSTICKY  text=$config_vars.DelRating} href="javascript:void(0);" onclick="popup('index.php?do=content&sub=delrating&id={$n->Id}&noframes=1','Copy',1,1,0);"><img class="absmiddle" src="{$imgpath}/votes_del.png" alt="" border="0" /></a>
     {else}<img {popup sticky=$config_vars.POPSTICKY  text=$config_vars.DelRating} class="absmiddle" src="{$imgpath}/votes_del_no.png" alt="" border="0" />{/if}    </td>
    </tr>
  
{/foreach}
</table>
<input type="hidden" name="quicksave" value="1" />
<input class="button big" type="submit" value="{#Save#}" />
</form>
{else}

{/if}

{if $Navi}
<div class="navi_div">
{$Navi}
</div>
{/if}




<script language="javascript" src="{$jspath}/calendar.js" type="text/javascript"></script>
<style type="text/css" media="screen,projection">
@import url({$csspath}/calendar.css);
</style>
<script type="text/javascript">
function checkcategmove()
{ldelim}
		if(document.getElementById('movecateg').selected==true)
		{ldelim}
			document.getElementById('movecateg_select').style.display='';
		{rdelim} else {ldelim}
			document.getElementById('movecateg_select').style.display='none';
		{rdelim}
{rdelim}



function checkmform()
{ldelim}
	if(document.getElementById('mdel').selected==true)
	{ldelim}
		if(!confirm('{#Content_multiaction_deleteC#}')) return false;
	{rdelim}
{rdelim}

	jQuery(function($){ldelim}
	$.datepicker.setDefaults({ldelim}
	{include file="$incpath/other/calendar.conf.tpl"}
	{rdelim}); 
	$("#date_till").attachDatepicker();
	{rdelim});
</script>
