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

<div class="subheaders">
<form method="post" action="index.php?do=products&sub=overview" name="">
  <table width="100%" border="0" cellpadding="2" cellspacing="0">
    <tr>
      <td width="100"><label for="gs">{#Global_searchW#}</label></td>
      <td width="150"><input style="width:130px" class="input"  type="text" name="q" id="gs" value="{$smarty.request.q}" /></td>
      <td width="80" align="right"><label for="laktiv">{#Global_Status#}</label></td>
      <td>
      <select style="width:134px"  class="input" name="aktiv" id="laktiv">
        <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>
    </tr>
    
    <tr>
      <td><label for="lgenre">{#Products_genre#}</label></td>
      <td>
      <select  style="width:133px"  class="input" name="genre" id="lgenre">
      <option value="0">{#Global_CoE#}</option>
     {foreach from=$genres item=g}
     <option value="{$n->Id}" {if $smarty.request.genre==$g->Id}selected="selected"{/if}>{$g->Name|koobispecialchars}</option>
     {/foreach}
     </select>
      </td>
      <td align="right"><label for="listop">{#Products_tops#}</label></td>
      <td>
      <select  style="width:133px"  class="input" name="istop" id="listop">
      <option value="">{#Global_CoE#}</option>
     <option value="1" {if $smarty.request.istop=='1'}selected="selected"{/if}>{#Yes#} </option>   
     <option value="0" {if $smarty.request.istop=='0'}selected="selected"{/if}>{#No#} </option>   
     </select>
     </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="dr">{#DataRecords#}</label></td>
      <td><input type="text" id="dr" class="input" name="pp" style="width:45px" value="{$limit}">
        
        <input class="button" type="submit" value="{#Global_search_b#}" />
        <input name="startsearch" type="hidden" id="startsearch" value="1" /></td>
    </tr>
  </table>
 </form>
</div>

{if $products}
<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="50" align="center" class="headers"><a href="{$ordstr}{$genre_s|default:'&sort=genre_desc'}">{#Products_genre#}</a></td>
    {if perm('products_openclose')}<td width="50" align="center" class="headers"><a href="{$ordstr}{$active_s|default:'&amp;sort=active_desc'}">{#Global_Active#}</a></td>
    {/if}
    <td width="50" align="center" class="headers"><a href="{$ordstr}{$top_s|default:'&sort=top_desc'}">{#Products_tops#}</a></td>
    {if perm('products_del')}<td width="10" align="center" class="headers"><img class="absmiddle" src="{$imgpath}/delete.png" alt="" border="0" /></td>{/if}
    <td class="headers">{#Global_Actions#}</td>
    </tr>
  {foreach from=$products 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->Name1}</span>
        {else}
    <a href="../index.php?p=products&amp;area={$area}&amp;action=showproduct&amp;id={$n->Id}&name={$n->Name1|seotitle}" target="_blank"><strong>{$n->Name1|koobispecialchars}</strong></a>   
    {/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->Benutzer}&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"><input class="input" style="width:25px"  type="text" name="Hits[{$n->Id}]" value="{$n->Hits}" /></td>
    <td align="center" class="row_spacer">
    <select  style="width:120px"  class="input" name="Genre[{$n->Id}]">
     {foreach from=$genres item=g}
     <option value="{$g->Id}" {if $n->Genre==$g->Id}selected="selected"{/if}>{$g->Name|koobispecialchars}</option>
     {/foreach}
     </select>    </td>
    {if perm('products_openclose')}
    <td align="center" class="row_spacer">
    <select  style="width:50px" class="input" name="Aktiv[{$n->Id}]">
      <option value="1" {if $n->Aktiv=='1'}selected="selected"{/if}>{#Yes#}</option>
      <option value="0" {if $n->Aktiv=='0'}selected="selected"{/if}>{#No#}</option>
    </select>
    </td>
    {/if}
    {if perm('products_openclose')}
    <td align="center" class="row_spacer">
    <select {popup sticky=$config_vars.POPSTICKY  text=$config_vars.Products_topsInf} style="width:50px"  class="input" name="TopProduct[{$n->Id}]">
     <option value="1" {if $n->TopProduct==1}selected="selected"{/if}>{#Yes#} </option>   
     <option value="0" {if $n->TopProduct==0}selected="selected"{/if}>{#No#} </option>   
     </select>    </td>
    <td align="center" class="row_spacer"><input {popup sticky=$config_vars.POPSTICKY  text=$config_vars.DelInfChekbox} name="del[{$n->Id}]" type="checkbox" value="1" /></td>
    {/if}
    <td class="row_spacer" nowrap="nowrap">
    {if perm('products_newedit')}
    <a {popup sticky=$config_vars.POPSTICKY  text=$config_vars.Edit} href="javascript:void(0);" onclick="popup('index.php?do=products&sub=edit&id={$n->Id}&noframes=1&langcode=1','contentEdit',980,820,1);"><img class="absmiddle" src="{$imgpath}/edit.png" alt="" border="0" /></a>
    <a {popup sticky=$config_vars.POPSTICKY  text=$config_vars.Copy} href="javascript:void(0);" onclick="popup('index.php?do=products&sub=copy&id={$n->Id}&noframes=1&langcode=1','contentEdit',1,1,1);"><img class="absmiddle" src="{$imgpath}/copy.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=products&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 $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=products&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}
<h3>{#Products_none#}</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('{#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>
