<div class="header">{#Shop_articles_articles#}</div>
<div class="subheaders">
{#Shop_order_searchtip#}
</div>
 
<div class="subheaders">
<form method="get" action="index.php">
<table border="0" cellspacing="0" cellpadding="2">
    <tr>
      <td width="100"><label for="lq">{#Search#}</label></td>
      <td>
      <input type="text" class="input" id="lq" name="query" value="{$smarty.request.query|escape:html|koobispecialchars}" style="width:130px" />
	  </td>
      <td width="100" align="right">
       <label for="lcateg">{#Shop_order_asearch_categ#}</label></td>
      <td>
      <select id="lcateg" name="kategorie" class="input" style="width:134px; padding:0px" >
      <option></option>
        
	{foreach from=$shop_search_small_categs item=scs}
	
        <option {if $scs->bold==1}class="shop_selector_back"{else}class="shop_selector_subs"{/if} value="{$scs->catid}" {if $smarty.request.kategorie==$scs->catid}selected="selected" {/if}>{$scs->visible_title|specialchars}</option>
        
	{/foreach}
    
      </select></td>
    </tr>
   
    <tr>
      <td width="100"> <label for="laktiv">{#Shop_order_ostatus_l#}</label></td>
      <td>
	 <select name="aktiv" id="laktiv" class="input" style="width:134px">
	<option></option>
	<option value="1" {if $smarty.request.aktiv=='1'}selected="selected" {/if}>{#Shop_order_astatus_on#}</option>
	<option value="0" {if $smarty.request.aktiv=='0'}selected="selected" {/if}>{#Shop_order_astatus_off#}</option>
	</select>	</td>
      <td width="100" align="right"> <label for="lhersteller">{#Shop_order_asearch_manufacturer#}</label></td>
      <td><select name="hersteller" id="lhersteller" class="input" style="width:134px; padding:0px" >
        <option></option>
        
	{foreach from=$shop_manufaturer item=man}
	
        <option value="{$man.Id}" {if $smarty.request.hersteller==$man.Id}selected="selected" {/if}>{$man.Name|koobispecialchars}</option>
        
	{/foreach}
    
      </select></td>
    </tr>
	 
    <tr>
      <td width="100"><label for="lpreis_von">{#Shop_order_asearch_price#}</label></td>
      <td>
	  <input class="input" style="width:59px" name="preis_von" id="lpreis_von" type="text" value="{$smarty.request.preis_von|default:'0.99'}" />-
      <input class="input" style="width:59px" name="preis_bis" type="text" id="preis_bis" value="{$smarty.request.preis_bis|default:'1999.99'}" />
      </td>
      <td width="100" align="right"><label for="lverkauft_von">{#Shop_order_asearch_selled#}</label></td>
      <td>
      <input class="input" style="width:59px" name="verkauft_von" id="lverkauft_von" type="text" value="{$smarty.request.verkauft_von|default:'0'}" />-
      <input class="input" style="width:59px" name="verkauft_bis" type="text" id="preis_bis" value="{$smarty.request.verkauft_bis|default:'999'}" />
      </td>
    </tr>
   
    <tr>
      <td width="100"><label for="llagerv">{#Shop_articles_avbl#}</label></td>
      <td>
      <input class="input" style="width:59px" name="lagerv" id="llagerv" type="text" value="{$smarty.request.lagerv|default:'0'}" /> - 
      <input class="input" style="width:59px" name="lagerb" type="text" value="{$smarty.request.lagerb|default:'999'}" />      </td>
      <td width="100" align="right"><label for="lb_search">{#Shop_order_asearch_extrab#}</label></td>
      <td>
     
      <select name="b_search" class="input" id="lb_search" style="width:134px; padding:0px" >
      <option value="0" {if $smarty.request.b_search=='0'}selected="selected" {/if}>{#No#}</option>
      <option value="1" {if $smarty.request.b_search=='1'}selected="selected" {/if}>{#Yes#}</option>
      </select>      </td>
    </tr>
    <tr>
      <td width="100"><label for="lb_offers">{#Shop_order_asearch_offers#}</label></td>
      <td>
      <select name="b_offers" id="lb_offers" class="input" style="width:134px; padding:0px" >
      <option value="0" {if $smarty.request.b_offers=='0'}selected="selected" {/if}>{#Global_CoE#}</option>
      <option value="1" {if $smarty.request.b_offers=='1'}selected="selected" {/if}>{#Shop_order_asearch_offersJust#}</option>
      </select>      </td>
      <td width="100" align="right"><label for="llimit">{#DataRecords#}</label></td>
      
      <td>
      <input type="text" class="input" name="limit" id="llimit" value="{$limit}" style="width:30px" />
      <span class="button_save_div">
      <input type="submit" class="button" value="{#Shop_order_asearch_button#}" />
      </span>
      </td>
    </tr>
  </table>

<input type="hidden" name="do" value="shop" />
<input type="hidden" name="sub" value="articles" />
<input type="hidden" name="SID" value="{$sess}" />
<input type="hidden" name="search" value="1" />
<input type="hidden" name="page" value="1" />
</form>

  
{if $smarty.request.search==1}

<fieldset>
<legend>{#Shop_articles_multidel_t#}</legend>

{*{$smarty.session.query_user}*}
<script language="javascript">
<!--
function checkmulti()
{ldelim}
	if(document.getElementById('deltrue').selected==true) 
	{ldelim}
		if(confirm('{#Shop_articles_multidel_c#}'))
			return true;
		else
			return false;
	{rdelim} 
	
	if(document.getElementById('settoall').selected==true) 
	{ldelim}
		if(confirm('{#Shop_articles_multi_setalllang#}'))
			return true;
		else
			return false;
	{rdelim} 
	
{rdelim} 

function getformelem()
{ldelim}
	if(document.getElementById('move').selected==true) 
	{ldelim}
		document.getElementById('mover').style.display='';
		document.getElementById('amountval').style.display='none';
	{rdelim}
	else if(document.getElementById('updateamount').selected==true) 
	{ldelim}
		document.getElementById('mover').style.display='none';
		document.getElementById('amountval').style.display='';
	{rdelim}
	else
	{ldelim}
		document.getElementById('mover').style.display='none';
		document.getElementById('amountval').style.display='none';
	{rdelim}
{rdelim}
-->
</script>

{if $smarty.post.Aktion}<strong>{if $emsg}{$emsg}{else}{#Shop_articles_multi_ok#}{/if}</strong><br />
{/if}

<form onsubmit="return checkmulti();" method="post" action="">
<select onchange="return getformelem();" class="input" name="Aktion" id="Aktion">
<option>{#Shop_articles_multi_sel#}</option>

<optgroup label="{#Shop_articles_multidel_setsta#}">
      <option value="setoffline" {if $smarty.request.Aktion=='setoffline'}selected="selected"{/if}>{#Shop_articles_multidel_deactivate#}</option>
      <option value="setonline" {if $smarty.request.Aktion=='setonline'}selected="selected"{/if}>{#Shop_articles_multidel_activate#}</option>
</optgroup>
<optgroup label="{#Shop_articles_multidel_setst#}">
     <option id="updateamount" value="updateamount">{#Shop_articles_multidel_setnewam#}</option>
      <option value="lagernull" {if $smarty.request.Aktion=='lagernull'}selected="selected"{/if}>{#Shop_articles_multidel_setnull#}</option>
</optgroup>
<optgroup label="{#Shop_articles_multidel_setav#}">
      {foreach from=$available item=av}
	  <option id="s_{$av.Id}" value="{$av.Id}" {if $smarty.request.Aktion==$av.Id}selected="selected"{/if} > {$av.Name|koobispecialchars}</option>
	  {/foreach}
</optgroup>
<optgroup label="{#Shop_articles_multidel_setoth#}">
<option id="deltrue" value="delete" {if $smarty.request.Aktion=='delete'}selected="selected"{/if}>{#Shop_articles_multidel_delthis#}</option>
<option id="move" value="move">{#Shop_articles_multidel_movethis#}</option>
<option id="settoall" value="settoall" {if $smarty.request.Aktion=='settoall'}selected="selected"{/if}>{#Shop_articles_multidel_settoalllang#}</option>
</optgroup>
</select>

<span id="mover" style="display:none">
<select name="Kategorie" class="input" style="width:200px; padding:0px" >
	{foreach from=$shop_search_small_categs item=scs}
	<option {if $scs->bold==1}class="shop_selector_back"{else}class="shop_selector_subs"{/if} value="{$scs->catid}" {if $smarty.request.kategorie==$scs->catid}selected="selected" {/if}>{$scs->visible_title|specialchars}</option>
	{/foreach}
</select>
</span>

<span id="amountval" style="display:none">
<select class="input" name="updatenewamount">
{section name=na loop=250 step=25}
<option value="{$smarty.section.na.index+25}">{$smarty.section.na.index+25}</option>
{/section}
{section name=na2 loop=1000 step=250 start=250}
<option value="{$smarty.section.na2.index+250}">{$smarty.section.na2.index+250}</option>
{/section}
</select>
</span>

<input type="submit" class="button" value="{#Shop_articles_multi_doaction#}" />
<input name="multiaction" type="hidden" id="multiaction" value="1" />
</form>
</fieldset>
{/if}



</div>
<form method="post" action="index.php?do=shop&sub=articles">
<input type="hidden" name="SID" value="{$sess}" />
<input type="hidden" name="action" value="save" />
<table width="100%" border="0" cellspacing="0" cellpadding="2" class="tableborder">

    <tr>
    
      <td class="headers" width="20">&nbsp;</td>
      
      <td width="185" class="headers"><a href="{$nav_string}&amp;order={$title_sort|default:'title_desc'}">{#Shop_articles_name#}</a></td>
      <td width="100" class="headers"><a href="{$nav_string}&amp;order={$artnr_sort|default:'artnr_asc'}">{#Shop_articles_number#}</a></td>
      <td width="20" class="headers">&nbsp;</td>
      <td class="headers" width="55"><a href="{$nav_string}&amp;order={$price_sort|default:'price_desc'}">{#Shop_articles_price#}</a></td>
      <td class="headers" width="30"><a href="{$nav_string}&amp;order={$store_sort|default:'store_desc'}">{#Shop_articles_avbl#}</a></td>
      <td class="headers" width="40"><a href="{$nav_string}&amp;order={$hits_sort|default:'hits_desc'}">{#Global_Hits#}</a></td>
      <td class="headers" width="40"><a href="{$nav_string}&amp;order={$ordered_sort|default:'ordered_desc'}">{#Shop_articles_selled#}</a></td>
      <td width="50" class="headers"><a href="{$nav_string}&amp;order={$categ_sort|default:'categ_asc'}">{#Shop_articles_categ#}</a></td>
      <td class="headers" >&nbsp;</td>
    </tr>

{foreach from=$articles item=a name=art}
  <tr class="{cycle name='orders' values='second,first'}">
  
    <td width="23"><a {popup sticky=false width=100 text=$a->Bild_Norm} href="javascript:void(0);" onclick="javascript:openArticle('?do=shop&amp;sub=edit_article&amp;id={$a->Id}&amp;noframes=1&amp;SID={$sess}&langcode=1');"><img src="../{$a->Bild_Klein}"  alt="" border="0" /></a></td>
     <td width="180">
	<input type="hidden" name="Id[{$a->Id}]" value="{$a->Id}" />
	<input class="input" style="width:180px; padding:2px; " type="text" name="Titel[{$a->Id}]" value="{$a->Titel|koobispecialchars}" />	</td>
    <td width="100"><a href="../index.php?p=shop&amp;action=showproduct&amp;id={$a->Id}&amp;cid={$a->Kategorie}" target="_blank" style="border:0px">{$a->Artikelnummer}</a></td>
    <td width="1"><img {if $a->IsOffer}{popup sticky=$config_vars.POPSTICKY  text=$config_vars.Shop_order_asearch_offersIs}{else}{popup sticky=$config_vars.POPSTICKY  text=$config_vars.Shop_order_asearch_offersIsNot}{/if} src="{$imgpath}/{if $a->IsOffer}offer{else}offer_no{/if}.png" alt="" /></td>
    <td width="55">{$a->Preis_Liste|numformat}</td>
    <td width="30"><input name="Lagerbestand[{$a->Id}]" type="text" class="input" style="width:30px" value="{$a->Lagerbestand}" /></td>
    <td width="40"><input name="Klicks[{$a->Id}]" type="text" class="input" style="width:30px" value="{$a->Klicks}" /></td>
    <td width="40"><input name="Verkauft[{$a->Id}]" type="text" class="input" style="width:40px" value="{$a->Verkauft}" /></td>
    <td width="50">
	<select name="Kategorie[{$a->Id}]" class="input" style="width:100px; padding:0px" >
	{foreach from=$shop_search_small_categs item=scs}
	<option {if $scs->bold==1}class="shop_selector_back"{else}class="shop_selector_subs"{/if} value="{$scs->catid}" {if $a->Kategorie==$scs->catid}selected="selected" {assign var=catname value=$scs->visible_title}{/if}>{$scs->visible_title|specialchars}</option>
	{/foreach}
    </select>    </td>
    <td  align="center" nowrap="nowrap">
    
   	{if perm('shop_articleedit')}<a style="border:0px" {popup sticky=$config_vars.POPSTICKY  width=200 text=$config_vars.Shop_order_aedit} href="javascript:void(0);" onclick="javascript:popup('?do=shop&amp;sub=edit_article&amp;id={$a->Id}&amp;noframes=1&amp;SID={$sess}&langcode=1','edit',980,750,1);"><img class="absmiddle" src="{$imgpath}/edit.png" alt="" border="" /></a>{/if}
	{if perm('shop_variants')}<a style="border:0px" {popup sticky=$config_vars.POPSTICKY  width=200 text=$config_vars.Shop_variants} href="javascript:void(0);" onclick="popup('?do=shop&amp;sub=article_variants&amp;id={$a->Id}&amp;cat={$a->Kategorie}&amp;noframes=1&amp;name={$a->CatName}','vars',980,750,1);"><img class="absmiddle" src="{$imgpath}/various.png" alt="" /></a>{/if}
	{if perm('shop_stprices')}<a style="border:0px" {popup sticky=$config_vars.POPSTICKY  width=200 text=$config_vars.Shop_articles_stprices} href="javascript:void(0);" onclick="popup('?do=shop&amp;sub=article_stprices&amp;id={$a->Id}&amp;noframes=1','stprices',980,750,1);"><img class="absmiddle" src="{$imgpath}/prices_multi.png" alt="" /></a>{/if}
	{if perm('shop_copyarticle')}<a style="border:0px" {popup sticky=$config_vars.POPSTICKY  width=200 text=$config_vars.Shop_articles_copy}  href="javascript:void(0)" onclick="popup('?do=shop&amp;sub=copy_article&amp;id={$a->Id}&amp;noframes=1','copy',400,300,1);"><img class="absmiddle" src="{$imgpath}/copy.png" alt="" border="" /></a>{/if}
    {if perm('shop_downloads')}<a style="border:0px" {popup sticky=$config_vars.POPSTICKY  width=200 text=$config_vars.Shop_downloads_name}  href="javascript:void(0)" onclick="popup('?do=shop&amp;sub=esd_downloads&amp;id={$a->Id}&amp;noframes=1','downloads',980,600,1);"><img class="absmiddle" src="{$imgpath}/download.png" alt="" border="" /></a>{/if}
    {if $a->Aktiv==1}
    <a {popup sticky=$config_vars.POPSTICKY  width=100 text=$config_vars.Shop_setinactive} href="javascript:void(0)" onclick="popup('?do=shop&amp;sub=openclose&amp;id={$a->Id}&amp;status=0&amp;noframes=1','',1,1,0);"><img class="absmiddle" src="{$imgpath}/opened.png" alt="" border="" /></a>
    {else}
    <a {popup sticky=$config_vars.POPSTICKY  width=100 text=$config_vars.Shop_setactive} href="javascript:void(0)" onclick="popup('?do=shop&amp;sub=openclose&amp;id={$a->Id}&amp;status=1&amp;noframes=1','',1,1,0);"><img class="absmiddle" src="{$imgpath}/closed.png" alt="" border="" /></a>
    {/if}
    {if $a->Votes>=1}
    <a style="border:0px" {popup sticky=$config_vars.POPSTICKY  width=200 text=$config_vars.Shop_prodvotes}  href="javascript:void(0)" onclick="popup('?do=shop&amp;sub=prodvotes&amp;id={$a->Id}&amp;name={$a->Titel|koobispecialchars}&amp;noframes=1','prodvotes',980,600,1);"><img class="absmiddle" src="{$imgpath}/prod_votes.png" alt="" border="" /></a>
	{else}
    <a {popup sticky=$config_vars.POPSTICKY  width=200 text=$config_vars.Shop_prodvotes_no} href="javascript:void(0);"><img class="absmiddle" src="{$imgpath}/no_prod_votes.png" alt="" border="" /></a>
    {/if}
    {if perm('shop_delete')}<a style="border:0px" {popup sticky=$config_vars.POPSTICKY  width=100 text=$config_vars.Shop_articles_del}  href="javascript:void(0)" onclick="{if $koobidemo==1}alert('{#notindemo#}');{else}if(confirm('{#Shop_articles_delC#}')){ldelim}window.open('?do=shop&amp;sub=delete_article&amp;id={$a->Id}&amp;noframes=1', 'CANCEL','height=1,width=1');{rdelim}{/if}"><img class="absmiddle" src="{$imgpath}/delete.png" alt="" border="" /></a>{/if}    </td>
  </tr>
 {/foreach}
</table>
<div class="button_save_div">
<input type="submit" class="button" value="{#Save#}" />
</div>
</form>

<div class="navi_div">{$pages}</div>

<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td>
<fieldset>
<legend>{#Shop_articles_export#}</legend>

<form method="post" action="{redir}&amp;export=1">
<label><input name="export_format" type="radio" value="csv" checked="checked" />CSV</label>
<label><input name="export_format" type="radio" value="text" />Text</label>&nbsp;
{if perm('export_articles')}
<input type="submit" class="button" value="{#Shop_order_oexport_button#}" />
{else}
<input type="button" onclick="alert('{#NoPerm#}');" class="button" value="{#Shop_order_oexport_button#}" />
{/if}
</form>
</fieldset>
</td>
</tr>
</table>
<div>
<br />



