<script language="javascript" src="{$jspath}/jform.js" type="text/javascript"></script>
<script language="javascript" type="text/javascript">
<!--//
winfocus();

$(document).ready(function()
{ldelim}
	$('#autoform').submit(function() 
	{ldelim}
		var message = 'Bitte warten...';
		jQuery.blockUI({ldelim} message: message{rdelim}); 
		setTimeout(jQuery.unblockUI, 2000); 
		
		var options = {ldelim}target:'#autooutput',  timeout:   3000 {rdelim}; 
		$(this).ajaxSubmit(options); 
		return false;  
	{rdelim}); 
{rdelim}); 
-->
</script>


<div class="popbox">
  <div class="header">{#Gallery_AddImages#}</div>
  <div class="subheaders">
  <strong>{#Gallery_upAuto#}</strong>
  <br />
  {#Gallery_upAutoInf#}
  </div>
  <div id="autooutput"></div>
  <div id="upcontent"></div>
  
  <form method="post" id="autoform" action="" onSubmit="document.getElementById('upcontent').style.display='none';">
    <table width="100%"  border="0" cellpadding="3" cellspacing="0">
    <tr>
        <td width="160" class="row_left"><label for="srcf">{#Gallery_upSource#}</label></td>
        <td class="row_right">
        <select class="input" style="width:200px" id="srcf" name="source">{$galfolders} </select>
        </td>
      </tr>
      <tr>
        <td class="row_left">{#Gallery_upTarget#}</td>
        <td class="row_right">
        <select class="input" style="width:200px" name="thegal">
        {foreach from=$gallery item=item} 
    	{if $item->Parent_Id == 0}
        <option value="{$item->Id}" {if $smarty.request.id==$item->Id}selected="selected"{/if}>{$item->visible_title}</option>
        {else}
        <option value="{$item->Id}" {if $smarty.request.id==$item->Id}selected="selected"{/if}>{$item->visible_title}</option>
        {/if}
        {/foreach}
        </select>
        </td>
      </tr>
    </table>
    <input type="submit" class="button big" value="{#Gallery_upButton#}" />
    <input type="button" onClick="window.close();" class="button big" value="{#Close#}" />
    <input name="autosave" type="hidden" value="1" />
    
  </form>
  <br />
  
<script language="javascript" type="text/javascript">
<!--
$(document).ready(function()
{ldelim}
	$('#manuform').submit(function() 
	{ldelim}
		var options = {ldelim}
		target:'#manuoutput',
		dataType: 'script',
		success:    function() {ldelim}
			document.getElementById('msgout_0').innerHTML = '';
			document.getElementById('msgout_1').innerHTML = '';
			document.getElementById('msgout_2').innerHTML = '';
			
			document.getElementById('t_0').value = '';
			document.getElementById('t_2').value = '';
			document.getElementById('t_1').value = '';
			
			document.getElementById('n_0').value = '';
			document.getElementById('n_1').value = '';
			document.getElementById('n_2').value = '';
			
			document.getElementById('upe_0').value = '';
			document.getElementById('upe_1').value = '';
			document.getElementById('upe_2').value = '';
			document.getElementById('manuoutput').innerHTML = '<br />{#Gallery_upStatusReady#}<br /><br />';
		{rdelim}
		/*,  timeout:   120000 */
		{rdelim}; 
		$(this).ajaxSubmit(options); 
		
		document.getElementById('manuoutput').innerHTML = '';
		document.getElementById('msgout_0').innerHTML = '';
		document.getElementById('msgout_1').innerHTML = '';
		document.getElementById('msgout_2').innerHTML = '';
		
		if(document.getElementById('upe_0').value!='') document.getElementById('msgout_0').innerHTML = '<img src="{$imgpath}/loading.gif">';
		if(document.getElementById('upe_1').value!='') document.getElementById('msgout_1').innerHTML = '<img src="{$imgpath}/loading.gif">';
		if(document.getElementById('upe_2').value!='') document.getElementById('msgout_2').innerHTML = '<img src="{$imgpath}/loading.gif">';
		/*
		document.getElementById('msgout_1').innerHTML = '';
		document.getElementById('msgout_2').innerHTML = '';
		document.getElementById('msgout_3').innerHTML = '';
		document.getElementById('msgout_4').innerHTML = '';
		*/
		return false;  
	{rdelim}); 
{rdelim}); 
-->
</script>

<div class="subheaders"><strong>{#Gallery_manUpload#}</strong><br />
  {#Gallery_manUploadInf#}
  <br />
  {$config_vars.Gallery_warnBigSize|replace:'__MAXMB__':$post_maxMb}

  </div>
  <div style="font-size:12px; font-weight:bold" id="manuoutput"></div>
 
  
<form method="post" id="manuform" action="" enctype="multipart/form-data">
<input type="hidden" name="MAX_FILE_SIZE" value="{$post_max}">
  <table width="100%" border="0" cellspacing="0" cellpadding="2">
  
   
    {section name=upper loop=3}
    <tr>
      <td width="160" class="row_left">
      
      {#Gallery_selFile#} 
      </td>
      <td class="row_right">
      <div style="font-size:12px; font-weight:bold" id="msgout_{$smarty.section.upper.index}"></div>
      <input name="fileToUpload[]" type="file" class="input" id="upe_{$smarty.section.upper.index}" size="20" />
      &nbsp;
      <label>{#Gallery_nameT#} <input id="n_{$smarty.section.upper.index}" class="input" type="text" name="Name[]" /></label>
      <label>{#Gallery_filedescr#} <input id="t_{$smarty.section.upper.index}" class="input" style="width:250px" type="text" name="Beschreibung[]" /></label>
      </td>
    </tr>
   {/section}
  </table>
  <br />
  <table width="100%" border="0" cellspacing="0" cellpadding="1">
    <tr>
      <td width="160" class="row_left">{#Gallery_upTarget#}</td>
      <td class="row_right">
      <select class="input" style="width:200px" name="thegal">
        {foreach from=$gallery item=item} 
    	{if $item->Parent_Id == 0}
        <option value="{$item->Id}" {if $smarty.request.id==$item->Id}selected="selected"{/if}>{$item->visible_title}</option>
        {else}
        <option value="{$item->Id}" {if $smarty.request.id==$item->Id}selected="selected"{/if}>{$item->visible_title}</option>
        {/if}
        {/foreach}
       </select>      </td>
    </tr>
   
  </table>
  <br />
  <input type="submit" class="button big" value="{#Gallery_buttonMan#}" />
  <input type="button" onClick="window.close();" class="button big" value="{#Close#}" />
  <input name="manusave" type="hidden" value="1" />
</form>

  
  
  
  