<div class="box_innerhead">{#Shop_go_mydownloads#}</div>
{if $smarty.get.sub!='showfile'}<div class="infobox">{#Shop_go_mydownloadsInf#}</div>{/if}
{if $smarty.get.sub=='showfile'}<div class="infobox">{#Shop_go_mydownloadsInf2#}</div>{/if}

{if $error}
<div class="error_box">
<h3>{#Error#}</h3>
<ul>
{foreach from=$error item=e}
<li>{$e}</li>
{/foreach}
</ul>
<a style="text-decoration:none" href="javascript:history.go(-1);"><img class="absmiddle" src="{$imgpath_page}arrow_left_small.png" alt="" border="0" /> {#Shop_ErrorBack#}</a>
</div>
{/if}

{if $smarty.get.sub=='showfile'}
<form method="post" action="index.php">
<table width="100%" border="0" cellspacing="1" cellpadding="3">
  <tr>
    <td width="200" class="shop_mydownloads_rows">{#Shop_mydownloads_filename#}</td>
    <td class="shop_dl_second">{$file->Titel|koobispecialchars}</td>
  </tr>
  <tr>
    <td width="200" class="shop_mydownloads_rows">{#Shop_mydownloads_filename#}</td>
    <td class="shop_dl_second">{$file->Datei}</td>
  </tr>
  {if $file->Beschreibung}
  <tr>
    <td width="200" class="shop_mydownloads_rows">{#Shop_mydownloads_filedescr#}</td>
    <td class="shop_dl_second">{$file->Beschreibung}</td>
  </tr>
  {/if}
  {if $file->Gesperrt==1}
  <tr>
  <td width="200" class="shop_mydownloads_rows">{#Shop_mydownloads_filehint#}</td>
  <td class="shop_dl_second">{#Shop_mydownloads_loecked#}
  <p>
  <em>{$file->GesperrtGrund}</em>  </p>  </td>
  </tr>
  {else}
  {if $file->KommentarAdmin!=''}
  <tr>
    <td width="200" class="shop_mydownloads_rows">{#Shop_mydownloads_filecomment#}</td>
    <td class="shop_dl_second">{$file->KommentarAdmin|default:'-'}</td>
  </tr>
  {/if}
  <tr>
    <td width="200" class="shop_mydownloads_rows">{#Shop_mydownloads_filecommntuser#}</td>
    <td class="shop_dl_second"><textarea class="input" style="width:98%; height:100px" name="KommentarBenutzer" id="KommentarBenutzer">{$file->KommentarBenutzer|koobispecialchars}</textarea></td>
  </tr>
  {if $file->UrlLizenz_Pflicht==1}
  <tr>
    <td width="200" class="shop_mydownloads_rows">{#Shop_mydownloads_fileurl#}
    <br />
    <small>{#Shop_mydownloads_fileurl_hint#}</small>
    </td>
    <td class="shop_dl_second"><input class="input" style="width:98%" type="text" name="UrlLizenz" id="UrlLizenz" value="{$file->UrlLizenz|koobispecialchars}"></td>
  </tr>
  {/if}
  <tr>
    <td width="200" class="shop_mydownloads_rows">&nbsp;</td>
    <td class="shop_dl_second"><input id="agbok" name="agb_ok" type="checkbox" value="1">
     <a href="index.php?p=shop&amp;action=agb">{#Shop_mydownloads_fileagbok#}</a></td>
  </tr>
  <tr>
    <td width="200" class="shop_mydownloads_rows">&nbsp;</td>
    <td class="shop_dl_second"><input type="submit" class="button" value="{#Shop_mydownloads_filedownload#}"></td>
  </tr>
  
  {/if}
</table>
<input type="hidden" name="p" value="shop" />
<input type="hidden" name="action" value="mydownloads" />
<input type="hidden" name="sub" value="getfile" />
<input type="hidden" name="Id" value="{$smarty.get.Id}" />
<input type="hidden" name="FileId" value="{$smarty.get.FileId}" />
<input type="hidden" name="getId" value="{$smarty.get.getId}" />
<input type="hidden" name="FileName" value="{$file->Titel|koobispecialchars}" />
</form>
{else}

<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td valign="top">

  <script language="javascript" type="text/javascript">
function print_container(id,act)
{ldelim}
	var html = document.getElementById(id).innerHTML;
	html = html.replace(/&lt;/gi, '<' );
	html = html.replace(/&gt;/gi, '>' );
	var act = (act == 'preform') ? '<pre>' : '';
	var pFenster = window.open( '', null, 'height=600,width=780,toolbar=yes,location=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes' ) ;
	var HTML = '<html><head></head><body style="font-family:arial,verdana;font-size:12px" onload="window.print()">'+ act + html + '</body></html>' ;
	pFenster.document.write(HTML);
	pFenster.document.close();
{rdelim}

function request(id)
{ldelim}
	var text = '{#OrderRequestText#}';
	text = text.replace(/%%ORDER%%/gi, id);
	text = text.replace(/%%USER%%/gi, '{$smarty.session.cp_uname}');
	document.getElementById('request').style.display='';
	document.getElementById('request_subject').value = '{#OrdersRequestSubject#} ' + id;
	document.getElementById('request_text').value = text;
{rdelim}
  </script>
<br />

{foreach from=$downloads item=dl name=d}

<div class="shop_headers"><span style="" id="so_{$dl->Id}"><a href="javascript:void(0);" onClick="document.getElementById('{$dl->Id}').style.display=''; document.getElementById('sc_{$dl->Id}').style.display=''; document.getElementById('so_{$dl->Id}').style.display='none'">[+]&nbsp;{$dl->ArtName|stripslashes} </a></span> <span style="display:none" id="sc_{$dl->Id}"><a href="javascript:void(0);" onClick="document.getElementById('{$dl->Id}').style.display='none'; document.getElementById('so_{$dl->Id}').style.display=''; document.getElementById('sc_{$dl->Id}').style.display='none'">[-]&nbsp;{$dl->ArtName|stripslashes} </a></span></div>
<div id="{$dl->Id}" style="display:none">
{if $dl->Lizenz}
<div class="infobox">
<h2>{#Shop_yLicData#}: {$dl->Lizenz}</h2>
</div>

{/if}
  <table width="100%" border="0" cellspacing="1" cellpadding="3">
    <tr>
      <td valign="top">{#Shop_mydownloads_filename#}</td>
      <td valign="top">{#Shop_mydownloads_downloadable#}</td>
      <td valign="top">{#Shop_mydownloads_filesize#}</td>
      </tr>
    {if $dl->DataFiles}
    <tr>
      <td colspan="3" class="shop_mydownloads_categs">{#Shop_mydownloads_full#}</td>
    </tr>
    {/if}
    {foreach from=$dl->DataFiles item=df}
    <tr>
      <td valign="top" class="shop_mydownloads_rows"> 
	  {if $df->Abgelaufen==1}
	  {$df->Titel|stripslashes} 
	  {else}
	  
	  <a {if $df->Beschreibung}{popup sticky=false width=500 text=$df->Beschreibung|replace:"'":"""}{/if}  href="index.php?p=shop&action=mydownloads&sub=showfile&Id={$df->Id}&FileId={$dl->ArtikelId}&getId={$df->Id}">{$df->Titel|stripslashes}</a>	  
	  {/if}	  </td>
      <td class="shop_mydownloads_rows">
	  {$dl->DownloadBis|date_format:'%d.%m.%Y'}	  </td>
      <td class="shop_mydownloads_rows">{$df->size} kb</td>
      </tr>
    {/foreach}


    {if $dl->DataFilesUpdates}
    <tr>
      <td colspan="3" class="shop_mydownloads_categs">{#Shop_mydownloads_update#}</td>
    </tr>
    {/if}
    {foreach from=$dl->DataFilesUpdates item=df}
    <tr>
      <td valign="top" class="shop_mydownloads_rows">
     {if $df->Abgelaufen==1}
	  {$df->Titel|stripslashes} 
	  {else}
      <a {if $df->Beschreibung}{popup sticky=false width=500 text=$df->Beschreibung|replace:"'":"&quot;"}{/if}  href="index.php?p=shop&action=mydownloads&sub=showfile&Id={$df->Id}&FileId={$dl->ArtikelId}&getId={$df->Id}">{$df->Titel}</a>
      {/if}
      </td>
      <td class="shop_mydownloads_rows">
      {$dl->DownloadBis|date_format:'%d.%m.%Y'}
      </td>
      <td class="shop_mydownloads_rows">{$df->size} kb</td>
      </tr>
    {/foreach}
    
    {if $dl->DataFilesBugfixes}
    <tr>
      <td colspan="3" class="shop_mydownloads_categs">{#Shop_mydownloads_bugfix#}</td>
    </tr>
    {/if}
    {foreach from=$dl->DataFilesBugfixes item=df}
    <tr>
      <td valign="top" class="shop_mydownloads_rows">  <a {if $df->Beschreibung}{popup sticky=false width=500 text=$df->Beschreibung|replace:"'":"&quot;"}{/if}  href="index.php?p=shop&action=mydownloads&sub=showfile&Id={$df->Id}&FileId={$dl->ArtikelId}&getId={$df->Id}">{$df->Titel}</a></td>
      <td class="shop_mydownloads_rows">{$dl->DownloadBis|date_format:$config_vars.DateFormatEsdTill}</td>
      <td class="shop_mydownloads_rows">{$df->size} kb</td>
      </tr>
    {/foreach}
    
    {if $dl->DataFilesOther}
    <tr>
      <td colspan="3" class="shop_mydownloads_categs">{#Shop_mydownloads_other#}</td>
    </tr>
    {/if}
    {foreach from=$dl->DataFilesOther item=df}
    <tr>
      <td valign="top" class="shop_mydownloads_rows">  <a {if $df->Beschreibung}{popup sticky=false width=500 text=$df->Beschreibung|replace:"'":"&quot;"}{/if}  href="index.php?p=shop&action=mydownloads&sub=showfile&Id={$df->Id}&FileId={$dl->ArtikelId}&getId={$df->Id}">{$df->Titel}</a></td>
      <td class="shop_mydownloads_rows">{#Shop_mydownloads_infi#}</td>
      <td class="shop_mydownloads_rows">{$df->size} kb</td>
      </tr>
    {/foreach}
  </table>
</div>
<br />
{/foreach} </div></td>
{if $smarty.request.print!=1}    {/if}  </tr>
</table>
{/if} 
<br />

