
{include file="../head.tpl"}
<script src="inc/cal.js" type="text/javascript"></script>
<script language="JavaScript" type="text/javascript">
<!--

function check(){ldelim}
if( (document.kform.url.value == "") && (document.kform.url_man.value == "") && (document.kform.files.value == "") ){ldelim}
	alert("{$langadmin.jserror_nofileselected}");
	return false;
	{rdelim}

/* size_man size_man2 */
if( (document.kform.size_man.value == "") && (document.kform.size_man2.value == "")){ldelim}
	alert("{$langadmin.no_size_set}");
	return false;
{rdelim}

if( document.kform.title.value == ""){ldelim}
	alert("{$langadmin.jserror_notitle}");
	document.kform.title.focus();
	 return false;
{rdelim}

if( document.kform.sel.value == "")
	{ldelim}
	alert("{$langadmin.selectcat}");
	document.kform.sel.focus();
	 return false;
	{rdelim}
{rdelim}
//selectcat-->

</script>

<form action="downloads.php" method="post" enctype="multipart/form-data" name="kform" id="kform" onsubmit="return check();">
  <table width="100%"  border="0" cellpadding="5" cellspacing="1" class="tableborder">
    <tr>
      <td colspan="2" class="header">{if $smarty.request.action=="new"}{$langadmin.download_new}{else}{$langadmin.download_edit}{/if}</td>
    </tr>
    <tr>
      <td colspan="2" class="firstrow">{$langadmin.method_unsecure}</td>
    </tr>
    <tr>
      <td colspan="2">{$langadmin.method_unsecure_text}</td>
    </tr>
    <tr>
      <td class="firstrow">{$langadmin.download_url}<br />
	  <small>{$langadmin.download_url_text}</small></td>
      <td class="secondrow"><input name="url" type="text" id="url" value="{$row->dlurl}" size="50"><input type="button" class="button" onclick="MediaPool('bild','url');" value="{$langadmin.mediapool}" />      </td>
    </tr>
    <tr>
      <td class="firstrow">{$langadmin.download_size}</td>
      <td class="secondrow"><input name="size_man" type="text" id="size_man" value="{if $row->dlurl!=''}{$row->size}{/if}" size="10"> KB</td>
    </tr>
    <tr>
      <td colspan="2" class="firstrow">{$langadmin.method_secure}</td>
    </tr>
    <tr>
      <td colspan="2">{$langadmin.method_secure_text}</td>
    </tr>
    <tr>
      <td class="firstrow">{$langadmin.select_file} <br />
	  {$langadmin.maxupload_http}: {$mupload}</td>
      <td class="secondrow"><input name="files" type="file" id="files" size="30">
      </td>
    </tr>
    <tr>
      <td class="firstrow">{$langadmin.manual_set}<br />
	  <small>{$langadmin.manual_set_text}</small> </td>
      <td class="secondrow"><input name="url_man" type="text" id="url_man" value="{if $row->dlurl_local && $smarty.request.action=="edit"}uploads/files/{$row->dlurl_local}{/if}" size="50"></td>
    </tr>
    <tr>
      <td class="firstrow">{$langadmin.download_size}</td>
      <td class="secondrow"><input name="size_man2" type="text" id="size_man2" value="{if $row->dlurl_local!=''}{$row->size}{/if}" size="10"> KB</td>
    </tr>
    <tr>
      <td colspan="2" class="theader">&nbsp;</td>
    </tr>
    <tr>
      <td class="firstrow">{$langadmin.title}</td>
      <td class="secondrow"><input name="title" type="text" id="title" value="{$row->title|escape:"htmlall"}" size="50"></td>
    </tr>
    <tr>
      <td class="firstrow">{$langadmin.download_author}</td>
      <td class="secondrow"><textarea name="author_file" cols="50" rows="4" id="author_file">{$row->author_file|escape:"htmlall"}</textarea></td>
    </tr>
    <tr>
      <td class="firstrow">{$langadmin.kat}</td>
      <td class="secondrow"><select name="cat" id="cat">
          
{foreach from=$cat_sel item=fitem}
{if $fitem->parent_id == 0}

          <option style="font-weight:bold;font-style:italic" value="{$fitem->catid}" {if $row->catid== $fitem->catid} selected="selected" {/if}>{$fitem->visible_title}</option>
          
{else}

          <option value="{$fitem->catid}" {if $row->catid==$fitem->catid} selected="selected" {/if}>{$fitem->visible_title}</option>
          
{/if}
{/foreach}

        </select>
      </td>
    </tr>
    <tr>
      <td width="25%" class="firstrow">{$langadmin.menue_gallery}</td>
      <td class="secondrow"><select style="width:350px" name="galids[]" multiple size="5">
          
          
{foreach from=$gallery item=item} 

          
          <option value="{$item->id}" {if $linkedgals->id}{if in_array($item->id, $linkedgals->id)}selected{/if}{/if}>{$item->title}</option>
          
             
{/foreach}

        
        </select>
      </td>
    </tr>
    {if ($smarty.request.type!="special") && ($smarty.request.type!="column") && ($smarty.request.type!="interview")} {if $smarty.request.type=="preview"} {/if} {if ($smarty.request.type!="special") && ($smarty.request.type!="column") && ($smarty.request.type!="interview")}
    <tr>
      <td width="25%" class="firstrow">{$langadmin.platform}</td>
      <td class="secondrow"><select style="width:350px" name="platforms[]" multiple size="5">
          
              
{foreach from=$platform item=pf} 

          
          <option value="{$pf->id}" {if $pforms->id}{if in_array($pf->id, $pforms->id)}selected{/if}{/if}>{$pf->platform}</option>
          
            
{/foreach}

        
        </select>
      </td>
    </tr>
    {/if} {/if}
    <tr>
      <td class="firstrow">{$langadmin.forms_languages}</td>
      <td class="secondrow"><input name="language" type="text" id="language" value="{$row->language|escape:"html"}" size="50"></td>
    </tr>
    <tr>
      <td class="firstrow">{$langadmin.downloads_max_eachday}<br />
	  <small>{$langadmin.download_limitation_text}</small>
	  </td>
      <td class="secondrow"><input name="hits_perday" type="text" id="hits_perday" value="{$row->hits_perday}" size="10"></td>
    </tr>
    <tr>
      <td class="firstrow">{$langadmin.downloads_today}</td>
      <td class="secondrow"><input name="hits_today" type="text" id="hits_today" value="{$row->hits_today}" size="10"></td>
    </tr>
    <tr>
      <td class="firstrow">{$langadmin.downloads_overall}</td>
      <td class="secondrow"><input name="hits" type="text" id="hits" value="{$row->hits}" size="10"></td>
    </tr>
    <tr>
      <td width="25%" class="firstrow">{$langadmin.download_image}</td>
      <td class="secondrow"> {$dyn}<br />
        <input name="images" type="text" id="images" size="40" value="{$row->image}">
        <input type="button" class="button" onClick="MediaPool('bild','images');" value="{$langadmin.mediapool}"></td>
    </tr>
{*
    <tr>
      <td class="firstrow">{$langadmin.download_marked_top}</td>
      <td class="secondrow"><input name="isontop" type="checkbox" id="isontop" value="1" {if $row->isontop=="1"}checked="checked"{/if}></td>
    </tr>
    <tr>
      <td class="firstrow">{$langadmin.download_top_image}</td>
      <td class="secondrow">{$dyn_top}<br />
        <input name="images_top" type="text" id="images_top" size="40" value="{$row->image_top}">
        <input type="button" class="button" onClick="MediaPool('bild','images_top');" value="{$langadmin.mediapool}"></td>
    </tr>
*}

    {if ($smarty.request.type!="special") && ($smarty.request.type!="column") && ($smarty.request.type!="interview")} {/if} {if $smarty.request.type=="review"} {/if} {if $smarty.request.type=="review"} {/if}
    <tr>
      <td colspan="2" class="theader">{$langadmin.descr}</td>
    </tr>
    <tr>
      <td colspan="2" class="firstrow" style="padding:0px"> {$ed2} </td>
    </tr>
    <tr>
      <td colspan="2" class="theader">{$langadmin.more_options}</td>
    </tr>
{*
    <tr>
      <td class="firstrow">{$langadmin.download_topend}</td>
      <td class="secondrow"><SCRIPT LANGUAGE="JavaScript" ID="js15">
var cal15 = new CalendarPopup();
cal15.showYearNavigation();
</SCRIPT>
        <SCRIPT LANGUAGE="JavaScript">writeSource("js15");</SCRIPT>
        <INPUT TYPE="text" NAME="date15" VALUE="{if $smarty.request.action=="edit"}{$e_date_top}{else}{$smarty.now|date_format:"%Y.$dateexpire_top.%d"}{/if}" SIZE=25 readonly="readonly">
        ,
        <select name="e_date_top_hour" id="e_date_top_hour">
          
{section name=e_date_top_hour loop=24 start=0}

          <option value="{$smarty.section.e_date_top_hour.index}" {if ($e_date_top_hour == $smarty.section.e_date_top_hour.index) && ($smarty.request.action=="edit")}selected{/if}>{if $smarty.section.e_date_top_hour.index < 10}0{/if}{$smarty.section.e_date_top_hour.index}</option>
          
{/section}

        </select>
        .
        <select name="e_date_top_minute" id="e_date_top_minute">
          
{section name=e_date_top_minute loop=60 start=0}

          <option value="{$smarty.section.e_date_top_minute.index}" {if $e_date_top_minute == $smarty.section.e_date_top_minute.index}selected{/if}>{if $smarty.section.e_date_top_minute.index < 10}0{/if}{$smarty.section.e_date_top_minute.index}</option>
          
{/section}
 
        </select>
        <a href="#" onClick="cal15.select(document.forms[0].date15,'anchor15','dd.MM.yyyy',(document.forms[0].date15.value=='')?document.forms[0].date15.value:null); return false;" title="cal15.select(document.forms[0].date15,'anchor15','dd.MM.yyyy',(document.forms[0].date15.value=='')?document.forms[0].date15.value:null); return false;" name="anchor15" id="anchor15">{$langadmin.select_date}</a> </td>
    </tr>
*}
    <tr>
      <td class="firstrow">{$langadmin.setpassword}</td>
      <td class="secondrow"><input name="password" type="text" id="password" value="{$row->password|escape:"htmlall"}" size="30"></td>
    </tr>
    <tr>
      <td class="firstrow">{$langadmin.can_vote}</td>
      <td class="secondrow"><input name="canvote" type="checkbox" id="canvote" value="1" {if $row->canvote=="1"}checked="checked"{/if}></td>
    </tr>
    <tr>
      <td class="firstrow">{$langadmin.can_comment}</td>
      <td class="secondrow"><input name="cancomment" type="checkbox" id="cancomment" value="1" {if $row->cancomment=="1"}checked="checked"{/if}></td>
    </tr>
	<tr>
	<td class="firstrow">{$langadmin.reset_vote}</td>
	<td class="secondrow"><input name="resetvote" type="checkbox" id="resetvote" value="1"></td>
	</tr>
    <tr>
      <td colspan="2" class="firstrow"><input name="area" type="hidden" id="area" value="{$smarty.request.area}">
        <input name="action" type="hidden" id="action" value="{$smarty.request.action}">
        <input name="area" type="hidden" id="area" value="{$smarty.request.area}">
        <input name="type" type="hidden" id="type" value="{$smarty.request.type}">
        {if $smarty.request.action=="new"}
        <input name="save" type="hidden" id="save" value="1">
        <input name="action" type="hidden" id="action" value="new">
        <input accesskey="s" type="submit" class="button" value="{$langadmin.save}">
        {else}
        <input name="action" type="hidden" id="action" value="edit">
        <input name="save" type="hidden" id="save" value="1">
        <input name="id" type="hidden" id="id" value="{$smarty.request.id}">
        <input accesskey="s" type="submit" class="button" value="{$langadmin.refresh}">
      {/if}</td>
    </tr>
  </table>
</form>
{include file="../foot.tpl"} 