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

function check(){
if( document.kform.sel.value == "")
	{
	alert("{/literal}{$langadmin.selectcat}{literal}");
	document.kform.sel.focus();
	 return false;
	}
	
if( document.kform.title.value == "")
	{
	alert("{/literal}{$langadmin.errornonewstitle}{literal}");
	document.kform.title.focus();
	return false;
	}

}
//-->
</script>
{/literal}
<form action="news.php?{$actform}" method="post" enctype="multipart/form-data" name="kform" onsubmit="return check();" >
  <table width="100%"  border="0" cellpadding="4" cellspacing="1" class="tableborder">
    <tr>
      <th colspan="2" class="header"> {if $action == 'new'} {$langadmin.composenews} {else} {$langadmin.editnews} {/if} </th>
    </tr>
    <tr>
      <td width="10%" class="firstrow">{$langadmin.kat}</td>
      <td class="secondrow">
<select name="sel" id="sel">
<option value=""> {$langadmin.choosecateg} </option>
{foreach from=$news item=item} 
{if $item->parent_id == 0}
<option style="font-weight:bold;font-style:italic" value="{$item->catid}" {if $parent_id == $item->catid} selected="selectd" {/if}>{$item->visible_title}</option>
{else}
<option value="{$item->catid}" {if $parent_id == $item->catid} selected="selectd" {/if}>{$item->visible_title}</option>
{/if}{/foreach}
</select>
      </td>
    </tr>
    <tr>
      <td nowrap class="firstrow">{$langadmin.opent}</td>
      <td class="secondrow"> {php} include("forms/timestart.php"); {/php} </td>
    </tr>
    <tr>
      <td class="firstrow">{$langadmin.closet}</td>
      <td class="secondrow"> {php} include("forms/timeend.php"); {/php} </td>
    </tr>
    <tr>
      <td class="firstrow">{$langadmin.newsicon}</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}">
        <select name="image_align" id="image_align">
          <option value="left" {if $action==edit && $row->image_align==left} selected="selected"{/if}> {$langadmin.left}{$langadmin.alignment} </option>
          <option value="right" {if $action==edit && $row->image_align==right} selected="selected"{/if}> {$langadmin.right}{$langadmin.alignment} </option>
        </select>
      </td>
    </tr>
    <tr>
      <td class="firstrow">{$langadmin.newsistopnews}</td>
      <td class="secondrow"><span class="secondrow">
        <input name="isontop" type="checkbox" id="isontop" value="yes" {if $action=='edit'}{if $row->isontop=='yes'}checked="checked"{/if}{/if} /> </span></td>
    </tr>
    <tr>
      <td class="firstrow">{$langadmin.topnews_endtime}</td>
      <td class="secondrow">{php} include("forms/timeend_top.php"); {/php} </td>
    </tr>
    <tr>
      <td class="firstrow">{$langadmin.topnews_icon}</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>
    <tr>
      <td class="firstrow">{$langadmin.gallerylinked}</td>
      <td class="secondrow"><select name="galids[]" multiple size="5">
          
{foreach from=$gallery item=item} 
{if $item->parent_id == 0}

          <option style="font-weight:bold;font-style:italic" value="{$item->id}" {if $linkedgals->gal_id}{if in_array($item->id, $linkedgals->gal_id)}selected{/if}{/if}>{$item->visible_title}</option>
              
{else}

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

        </select>
      </td>
    </tr>
    <tr>
      <td class="firstrow">{$langadmin.product}</td>
      <td class="secondrow"><select style="width:70%" name="product" id="product">
          <option value="">- - -</option>
          
	  {foreach from=$products item=pro} 
        
          <option value="{$pro->id}" {if $row->product==$pro->id}selected="selected"{/if}>{$pro->title}</option>
          
		{/foreach}
      
        </select>
      </td>
    </tr>
    <tr>
      <td class="firstrow"> {$langadmin.manufacturer_order}</td>
      <td class="secondrow"><select style="width:70%"  class="selectfield"  name="manufacturer" id="manufacturer">
          <option value="">- - -</option>
          
        {foreach from=$items item=mf}
    	
          <option value="{$mf->id}" {if $row->manufacturer==$mf->id}selected="selected"{/if}>{$mf->name}</option>
          
        {/foreach}
  		
        </select>
      </td>
    </tr>
    <tr>
      <td class="firstrow">{$langadmin.matchword}</td>
      <td class="secondrow"><input name="matchword" type="text" id="matchword" value="{$row->matchword}" size="75" maxlength="200"></td>
    </tr>
    <tr>
      <td class="firstrow">{$langadmin.newstitle}</td>
      <td class="secondrow"><input name="title" type="text" id="title" value="{$row->title}" size="75" maxlength="200"></td>
    </tr>
    <tr>
      <td class="firstrow">{$langadmin.shortintro}</td>
      <td class="secondrow"><input name="shortintro" type="text" id="shortintro" value="{$row->shortintro}" size="75" maxlength="200"></td>
    </tr>
	<tr>
	<td class="firstrow">
	{$langadmin.links}<br>
        <small>{$langadmin.linksdesc}</small>
	</td>
	 
	<td class="secondrow"><textarea name="links" cols="55" rows="6" id="links">{$links}</textarea></td>
	</tr>
    <tr>
<td colspan="2" class="theader"> {literal}
 <script language="javascript">
function insertHTML() {
 document.f.text1.insertHTML(html);
}
</script>
        {/literal} <b>{$langadmin.teaser}</b> </td>
    </tr>
    <tr>
      <td colspan="2" valign="top" class="secondrow" style="padding: 0px; margin: 0px"> {$ed1} </td>
    </tr>
    <tr>
      <td colspan="2" class="theader"><table width="100%"  border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td class="theader">{$langadmin.newswhole}</td>
            <td><div align="right">
                <input onclick="javascript:document.getElementById('ishot').style.display='';document.getElementById('ishotbutt').style.display='';" type="button" class="button" value="{$langadmin.insertinlineshots}">
                <span id="ishotbutt" style="display: none;">
                <input onclick="javascript:document.getElementById('ishot').style.display='none';document.getElementById('ishotbutt').style.display='none';" type="button" class="button" value="{$langadmin.close}">
                </span> </div></td>
          </tr>
        </table></td>
    </tr>
    <tr>
      <td colspan="2" class="secondrow" style="padding: 0px; margin: 0px"><input type="hidden" name="inline_screens" id="inline_screens" value="" />
        <div id="ishot" style="display: none;">
          <iframe style="border:0px;width:100%;height:200px;" src="inlineshot.php?action=inline_screens&frameaction={$frameaction}&amp;id={$id}&amp;is={$inlineshots}" name="inline"></iframe>
        </div>
        {$ed2} </td>
    </tr>
    <tr>
      <td colspan="2" class="theader">{$langadmin.options}</td>
    </tr>
    <tr>
      <td nowrap class="firstrow">{$langadmin.newscansearch}</td>
      <td class="secondrow"><input name="cansearch" type="checkbox" id="cansearch" value="yes" {if $action=='edit'}{if $row->cansearch=='yes'}checked="checked"{/if}{else} checked="checked"{/if} /> </td>
    </tr>
    <tr>
      <td nowrap class="firstrow"> {$langadmin.newscanvote} </td>
      <td class="secondrow"><input name="canvote" type="checkbox" id="canvote" value="yes" {if $action == 'edit'}{if $row->canvote == 'yes'}checked="checked"{/if}{else}checked="checked"{/if}> </td>
    </tr>
    <tr>
      <td nowrap class="firstrow">{$langadmin.newscancomment} </td>
      <td  class="secondrow"><input name="cancomment" type="checkbox" id="cancomment" value="yes" {if $action == 'edit'}{if $row->cancomment == 'yes'}checked="checked"{/if}{else}checked="checked"{/if}> </td>
    </tr>
    <tr>
      <td nowrap class="firstrow">{$langadmin.newsallareas}</td>
      <td class="secondrow"><input name="allareas" type="checkbox" id="allareas" value="yes" {if $action == 'edit'}{if $row->allareas == 'yes'} hecked="checked"{/if}{/if}> </td>
    </tr>
    <tr>
      <td nowrap class="firstrow">{$langadmin.newsnotpublic}</td>
      <td class="secondrow"><input name="isnotpublic" type="checkbox" id="isnotpublic" value="1" {if $action == 'edit'}{if $row->ispublic!=1}checked="checked"{/if}{/if}> </td>
    </tr>
    <tr>
      <td nowrap class="firstrow">&nbsp;</td>
      <td class="secondrow"> {if $smarty.request.wmm==1}
        <input name="close" type="hidden" id="close" value="1">
        <input name="redir" type="hidden" id="redir" value="{$smarty.request.redir}">
        {/if}
        <input name="uid" type="hidden" id="uid" value="{$uid}">
        <input name="cat" type="hidden" id="cat" value="{$cat}">
        <input name="subaction" type="hidden" id="subaction" value="{$subaction}">
        <input name="area" type="hidden" id="area" value="{$area}">
        <input name="save" type="hidden" id="save" value="1">
        <input accesskey="s" type="submit" class="button" value="{$langadmin.edit}">
      </td>
    </tr>
  </table>
</form>
