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

<div class="subheaders">
<form onsubmit="return checkmform();" method="post" action="index.php?do=gaming&sub=articles" name="">
  <table width="100%" border="0" cellpadding="2" cellspacing="0">
    <tr>
      <td width="100"><label for="lq">{#Global_searchW#}</label></td>
      <td width="150"><input id="lq" style="width:130px" class="input"  type="text" name="q" value="{$smarty.request.q}" /></td>
      <td width="80" align="right"><label for="lcateg">{#Global_Categ#}</label></td>
      <td>
      <select style="width:124px"  class="input" name="categ" id="lcateg">
        <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->visible_title} </option>
         {/foreach}
        </select>       
        </td>
    </tr>
    <tr>
      <td><label for="ltyp">{#Gaming_ArtType#}</label></td>
      <td>
      <select style="width:134px"   class="input" name="typ" id="ltyp">
      <option value="">{#Global_CoE#}</option>
     <option value="special" {if $smarty.request.typ=='special'}selected="selected"{/if}>{#Gaming_ArtType_special#} </option>   
     <option value="review" {if $smarty.request.typ=='review'}selected="selected"{/if}>{#Gaming_ArtType_review#} </option>   
     <option value="preview" {if $smarty.request.typ=='preview'}selected="selected"{/if}>{#Gaming_ArtType_preview#} </option>   
     </select>
      </td>
      <td align="right"><label for="ltop">{#Gaming_articles_top#}</label></td>
      <td>
      <select  style="width:124px" class="input" name="top" id="ltop">
        <option value="">{#Global_CoE#}</option>
        <option value="1" {if $smarty.request.top=='1'}selected="selected"{/if}>{#Yes#}</option>
        <option value="0" {if $smarty.request.top=='0'}selected="selected"{/if}>{#No#}</option>
        </select>
      </td>
    </tr>
    <tr>
      <td><label for="lstatus">{#Global_Status#}</label></td>
      <td>
      <select id="lstatus" 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><label for="date_till">{#Global_DateTill#}</label></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"><label for="pp">{#DataRecords#}</label></td>
      <td><input type="text" class="input" name="pp" id="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.ArticlesSearch && perm('articles_multioptions') && $news}
<div id="del_innerhtml">
<fieldset>
<legend><label for="mf">{#Gaming_multiaction#}</label></legend>
{if $multi_done==1}
<h3>{#Gaming_multiaction_actiondone#}</h3>
<br />
{/if}

<select onchange="checkcategmove()" class="input" style="width:250px" name="multiaction">
<option value="open">{#Gaming_m_open#}</option>
<option value="close">{#Gaming_m_close#}</option>
<option id="movecateg" value="movecateg">{#News_multiaction_MoveNewCatg#}</option>
<option id="mdel" value="delete">{#Gaming_m_del#}</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}">{$dd->visible_title} </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="200" 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}{$start_s|default:'&sort=start_desc'}">{#Global_Published#}</a></td>
    <td width="50" align="center" class="headers"><a href="{$ordstr}{$end_s|default:'&sort=end_desc'}">{#Global_PubEnd#}</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" align="center" class="headers">{#Gaming_ArtType#}</td>
    <td width="10" class="headers">{#Global_Categ#}</td>
    <td width="50" class="headers">{#Gaming_articles_top#}</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=articles&amp;action=displayarticle&amp;id={$n->Id}" target="_blank"><strong>{$n->Titel1}</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','userEdit',980,680,1)">{$n->User}</a></td>
    <td align="center" nowrap class="row_spacer">{$n->Zeit|date_format:"%d.%m.%y"}</td>
    <td align="center" nowrap class="row_spacer">{$n->ZeitStart|date_format:"%d.%m.%y"}</td>
    <td align="center" nowrap class="row_spacer">{if $n->ZeitEnde>0}{$n->ZeitEnde|date_format:"%d.%m.%y"}{else}-{/if}</td>
    <td align="center" class="row_spacer">{$n->Hits}</td>
    <td align="center" nowrap="nowrap" class="row_spacer">
    <select style="width:80px"  class="input" name="Typ[{$n->Id}]">
     <option value="special" {if $n->Typ=='special'}selected="selected"{/if}>{#Gaming_ArtType_special#} </option>   
     <option value="review" {if $n->Typ=='review'}selected="selected"{/if}>{#Gaming_ArtType_review#} </option>   
     <option value="preview" {if $n->Typ=='preview'}selected="selected"{/if}>{#Gaming_ArtType_preview#} </option>   
     </select>
    </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->visible_title} </option>   
        {/foreach}
        </select>        </td>
    <td class="row_spacer">
    <select {popup sticky=$config_vars.POPSTICKY  width=400 text=$config_vars.Gaming_articles_topInf} style="width:50px"  class="input" name="Topartikel[{$n->Id}]">
     <option value="1" {if $n->Topartikel==1}selected="selected"{/if}>{#Yes#} </option>   
     <option value="0" {if $n->Topartikel==0}selected="selected"{/if}>{#No#} </option>   
     </select>    </td>
    <td class="row_spacer" nowrap="nowrap">
    {if perm('articles_edit')}
    {if $n->Autor!=$smarty.session.benutzer_id && (!perm('articles_edit_all'))}
    <img src="{$imgpath}/edit_no.png" alt="" border="0" />
    {else}
    <a {popup sticky=$config_vars.POPSTICKY  text=$config_vars.Edit} href="javascript:void(0);" onclick="popup('index.php?do=gaming&sub=editarticle&id={$n->Id}&noframes=1&langcode=1','NewsEdit',980,820,1);"><img class="absmiddle" src="{$imgpath}/edit.png" alt="" border="0" /></a>
    {/if}
    <a {popup sticky=$config_vars.POPSTICKY  text=$config_vars.Copy} href="javascript:void(0);" onclick="popup('index.php?do=gaming&sub=copyarticle&id={$n->Id}&noframes=1&langcode=1','NewsEdit',1,1,1);"><img class="absmiddle" src="{$imgpath}/copy.png" alt="" border="0" /></a>
    {/if}
    {if perm('articles_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=gaming&sub=openclose_article&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=articles&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('articles_delete')}
    {if $n->Autor!=$smarty.session.benutzer_id && (!perm('articles_delete_all'))}
    {else}
    <a {popup sticky=$config_vars.POPSTICKY  text=$config_vars.Global_Delete} href="javascript:void(0);" onclick="if(confirm('{#Gaming_articles_delC#}')) popup('index.php?do=gaming&sub=deletearticle&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=gaming&sub=delrating_article&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}
<h3>{#Gaming_articles_no#}</h3>
{/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('{#Gaming_m_delC#}')) return false;
	{rdelim}
{rdelim}

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