
{include file="../head.tpl"}
<script>
{literal}
parent.document.getElementById('inline_screens').value = '{/literal}{$thearray}{literal}';
{/literal}
</script>
<script language="JavaScript" type="text/javascript">
{literal}
function check(){
if( document.kform.titel.value == "")
	{
	alert("{/literal}{$langadmin.jserror_notitle}{literal}");
	document.kform.titel.focus();
	 return false;
	}
	
if( document.kform.text.value == "")
	{
	alert("{/literal}{$langadmin.jserror_nodescr}{literal}");
	document.kform.text.focus();
	return false;
	}
	
if( document.kform.shot.value == "")
	{
	alert("{/literal}{$langadmin.jserror_nojpg}{literal}");
	return false;
	}
}
{/literal}
</script>
<table width="100%" border="0" cellpadding="3" cellspacing="1" class="theader">
  <tr>
    <td colspan="4" class="secondrow"><span style="font-weight:normal">{$langadmin.inlinshottext}</span></td>
  </tr>
  <tr>
    <td class="header">{$langadmin.title}</td>
    <td class="header">{$langadmin.inlinedescr}</td>
    <td class="header">{$langadmin.picture}</td>
    <td class="header">&nbsp;</td>
  </tr>
  {section name=hw loop=$hiddenvalue}
  <form action="?action=rm_inline" method="post">
    <input type="hidden" name="code" value="{$hiddenvalue[hw].hiddencode}" />
    <input type="hidden" name="id" value="{$hiddenvalue[hw].hiddenid}" />
    <tr class="c1">
      <td align="center" class="c1"><input type="text" name="titel" size="32" style="width:120px;" value="{$hiddenvalue[hw].titel}" />
        <br>
        <span style="font-weight:normal">[SCREEN:{$hiddenvalue[hw].hiddenid}]</span> </td>
      <td class="c1"><textarea name="text" cols="40" rows="4" style="width:380px;">{$hiddenvalue[hw].text}</textarea>
      </td>
      <td class="c1"><img src="../system/thumb.php?type=inline&img_id={$hiddenvalue[hw].img_id}" width="80" height="80" border="0" />
        <input name="img_id" type="hidden" id="img_id" value="{$hiddenvalue[hw].img_id}"></td>
      <td><div align="center">
	  {if permission("inlineshotdelete")}
          <button style="width:100px" name="submit" value="delete" type="submit" class="button">{$langadmin.delete}</button>
           <button style="width:100px"  name="submit" value="edit" type="submit" class="button">Bearbeiten</button>
          {/if}
		  
		  {if $buttoninsert==1}
          <input style="width:100px" type="button" class="button" onclick="parent.frames['edtext2'].insertHtml('[SCREEN:{$hiddenvalue[hw].hiddenid}]');" value="{$langadmin.insertimage}" />
       {/if}
	
	    </div></td>
    </tr>
  </form>
  {/section} {if $canupload==1}
  <form name="kform" action="?action=add_inline" method="post" enctype="multipart/form-data" onsubmit="return check();">
    <input type="hidden" name="code" value="{$hiddens}" />
    <tr class="secondrow">
      <td valign="top"><input type="text" name="titel" size="32" style="width:120px;" /></td>
      <td colspan="3"><textarea name="text" cols="40" rows="4" style="width:380px;"></textarea>
        <br>
        <input type="file" name="shot" />
        <input type="submit" class="button" value="{$langadmin.upload}" />
        <div align="center"> </div></td>
    </tr>
  </form>
  {/if}
</table>
