 {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.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>
{if $smarty.request.preform==1}
<form name="fill" method="post" action="articles.php?area={$smarty.request.area}&action=new&type={$smarty.request.w}">
  <table width="100%"  border="0" cellpadding="4" cellspacing="1" class="tableborder">
    <tr>
      <td colspan="2" class="header">{$langadmin.article_new}</td>
    </tr>
    <tr>
      <td width="50%" class="firstrow">{$langadmin.article_new_pretext}</td>
      <td class="secondrow"><select name="fill_id" id="fill_id">
          
        
  {foreach from=$items item=ff}
    
        
          <option value="{$ff->id}">{$ff->title}</option>
          
        
	{/foreach}
  
      
        </select>
        <input name="fillform" type="hidden" id="fillform" value="1">
        <input type="submit" class="button" value="{$langadmin.nextstep}"></td>
    </tr>
    <tr>
      <td class="firstrow">{$langadmin.article_new_pretext_noproduct}</td>
      <td class="secondrow"><input onclick="location.href='articles.php?area={$smarty.request.area}&action=new&type={$smarty.request.w}';" type="button" class="button" value="{$langadmin.button_article_new_noproduct}"></td>
    </tr>
  </table>
</form>
{else}
<form action="articles.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.article_new}{else}{$langadmin.artcile_edit}{/if}</td>
    </tr>
    <tr>
      <td width="25%" 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 width="25%" class="firstrow">{$langadmin.subtitle}</td>
      <td class="secondrow"><input name="subtitle" type="text" id="subtitle" value="{$row->subtitle|escape:"htmlall"}" size="50"></td>
    </tr>
    <tr>
      <td class="firstrow">{$langadmin.kat}</td>
      <td class="secondrow"><select name="sel" id="sel">
          <option value=""> {$langadmin.choosecateg} </option>
          
{foreach from=$cat_sel item=item} 
{if $item->parent_id == 0}

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

          <option value="{$item->catid}" {if $row->articlecat==$item->catid} selected="selectd" {/if}>{$item->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>
	  <tr>
      <td class="firstrow">{$langadmin.product}<br>
      {$langadmin.ortext} {$langadmin.matchword}</td>
      <td class="secondrow">
	  <select style="width:50%" 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>
	  <br>
	  <input name="matchword" type="text" id="matchword" value="{$row->matchword}" size="50" maxlength="200"></td>
    </tr>
    {if ($smarty.request.type!="special") && ($smarty.request.type!="column") && ($smarty.request.type!="interview")}
    <tr>
      <td width="25%" class="firstrow">{$langadmin.genre}</td>
      <td class="secondrow"><select name="genre" id="genre">
          <option value="">- - -</option>
          
	  {foreach from=$gdd item=gd}
	  
          <option value="{$gd->id}" {if $gd->id==$row->genre}selected="selected"{/if}>{$gd->genre}</option>
          
	  {/foreach}
    
        </select></td>
    </tr>
  
    <tr>
      <td width="25%" class="firstrow">{$langadmin.manufacturer}</td>
      <td class="secondrow"><select name="manufacturer" id="manufacturer">
          <option value="">- - -</option>
          
      
	  {foreach from=$mdd item=md}
	  
      
          <option value="{$md->id}" {if $md->id==$row->manufacturer}selected="selected"{/if}>{$md->name}</option>
          
      
	  {/foreach}
    
    
        </select></td>
    </tr>
    <tr>
      <td width="25%" class="firstrow">{$langadmin.publisher}</td>
      <td class="secondrow"><select name="publisher" id="publisher">
          <option value="">- - -</option>
          
      
      
	  {foreach from=$mdd item=md}
	  
      
      
          <option value="{$md->id}" {if $md->id==$row->publisher}selected="selected"{/if}>{$md->name}</option>
          
      
      
	  {/foreach}
    
    
    
        </select></td>
    </tr>
    {if $smarty.request.type=="preview"}
    <tr>
      <td width="25%" class="firstrow">{$langadmin.product_voting}</td>
      <td class="secondrow">
<select name="voting" id="voting">
<option value="">- - -</option>        
{foreach from=$pvote item=pvote key=schluessel}
<option value="{$pvote.key}" {if $pvote.key == $row->voting}selected="selected"{/if}>{$pvote.val}</option>
{/foreach}
</select>
      </td>
    </tr>
    {/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}
 
    <tr>
      <td width="25%" class="firstrow">{$langadmin.release}</td>
      <td class="secondrow"><input name="release" type="text" id="release" value="{$row->release|escape:"htmlall"}" size="50"></td>
    </tr>
    {/if}
    <tr>
      <td width="25%" class="firstrow">{$langadmin.article_picture}</td>
      <td class="secondrow">{if $dyn!=""}{$dyn}{else}<img src="img/pixel.gif" id="pic" border="0">{/if}<br />
        <input name="images" type="text" id="images" size="40" value="{if $smarty.request.fillform==1}{$std}{else}{$row->boxshot}{/if}">
        <input type="button" class="button" onClick="MediaPool('bild','images');" value="{$langadmin.mediapool}"></td>
    </tr>
    <tr>
      <td class="firstrow">{$langadmin.mark_as_toparticle}</td>
      <td class="secondrow"><input name="isontop" type="checkbox" id="isontop" value="yes" {if $row->isontop=="yes"}checked="checked"{/if}></td>
    </tr>
    <tr>
      <td class="firstrow">{$langadmin.toparticle_picture}</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")}
    <tr>
      <td width="25%" class="firstrow">{$langadmin.asin}</td>
      <td class="secondrow"><input name="asin" type="text" id="asin" value="{$row->asin|escape:"htmlall"}" size="50"></td>
    </tr>
    <tr>
      <td width="25%" class="firstrow">{$langadmin.shopurl}</td>
      <td class="secondrow"><input name="shopurl" type="text" id="shopurl" value="{$row->shopurl|escape:"htmlall"}" size="50"></td>
    </tr>
    <tr>
      <td width="25%" class="firstrow">{$langadmin.shopname}</td>
      <td class="secondrow"><input name="shop" type="text" id="shop" value="{$row->shop|escape:"htmlall"}" size="50"></td>
    </tr>
    <tr>
      <td width="25%" class="firstrow">{$langadmin.price}</td>
      <td class="secondrow"><input name="price" type="text" id="price" value="{$row->price|escape:"htmlall"}" size="50"></td>
    </tr>
    {/if}
    <tr>
      <td width="25%" 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>
    {if $smarty.request.type=="review"}
    <tr>
      <td class="firstrow">{$langadmin.article_voting_text}<br />
        <small>{$langadmin.article_voting_example}</small> </td>
      <td class="secondrow"><textarea name="artvotes" cols="55" rows="6" id="artvotes">{$artvotes}</textarea></td>
    </tr>
    {/if} {if $smarty.request.type=="review"}
    <tr>
      <td class="firstrow">{$langadmin.article_top}</td>
      <td class="secondrow"><textarea name="top" cols="55" rows="6" id="top">{$row->top|escape:"htmlall"}</textarea></td>
    </tr>
    <tr>
      <td class="firstrow">{$langadmin.article_flop} </td>
      <td class="secondrow"><textarea name="flop" cols="55" rows="6" id="flop">{$row->flop|escape:"htmlall"}</textarea></td>
    </tr>
    <tr>
      <td class="firstrow">{$langadmin.system_specs_minimum}</td>
      <td class="secondrow"><textarea name="minimum" cols="55" rows="6" id="minimum">{$row->minimum|escape:"htmlall"}</textarea></td>
    </tr>
    <tr>
      <td class="firstrow">{$langadmin.system_specs_optimum}</td>
      <td class="secondrow"><textarea name="optimum" cols="55" rows="6" id="optimum">{$row->optimum|escape:"htmlall"}</textarea></td>
    </tr>
    {/if}
    <tr>
      <td colspan="2" class="theader"><table width="100%"  border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td class="theader" style="padding:0px">{$langadmin.article_content_text}</td>
            <td><div align="right">
                <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>
              </div></td>
          </tr>
        </table></td>
    </tr>
    <tr>
      <td colspan="2" class="secondrow">{$langadmin.article_content_newsite}</td>
    </tr>
    <tr>
      <td colspan="2" class="firstrow" style="padding:0px"><input type="hidden" name="inline_screens" id="inline_screens" value="" />
        <!-- SWITCHED IFRAME // -->
        <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>
        <!-- // SWITCHED IFRAME -->
        {$ed2} </td>
    </tr>
    <tr>
      <td colspan="2" class="theader">{$langadmin.more_options}</td>
    </tr>
	{if (permission("changetypeofdoc")) && ($smarty.request.action=="edit")}
    <tr>
      <td class="firstrow">{$langadmin.type_of_doc}</td>
      <td class="secondrow">
	  <select name="type_ofdoc" id="type_ofdoc">
          <option value="review" {if $row->type=="review"}selected="selected"{/if}>{$langadmin.reviews_once}</option>
          <option value="preview" {if $row->type=="preview"}selected="selected"{/if}>{$langadmin.previews_once}</option>
          <option value="special" {if $row->type=="special"}selected="selected"{/if}>{$langadmin.specials_once}</option>
          <option value="column" {if $row->type=="column"}selected="selected"{/if}>{$langadmin.column_once}</option>
          <option value="interview" {if $row->type=="interview"}selected="selected"{/if}> {$langadmin.interviews_once}</option>
        </select>
      </td>
    </tr>
	{/if}
	
    <tr>
      <td class="firstrow">{$langadmin.date_document_open}</td>
      <td class="secondrow">
<SCRIPT LANGUAGE="JavaScript" ID="js13">
var cal13 = new CalendarPopup();
cal13.showYearNavigation();
</SCRIPT>
<SCRIPT LANGUAGE="JavaScript">writeSource("js13");</SCRIPT>
<INPUT TYPE="text" NAME="date13" VALUE="{if $smarty.request.action=="edit"}{$s_date}{else}{$smarty.now|date_format:"%d.%m.%Y"}{/if}" SIZE=25 readonly="readonly">
, <select name="s_hour" id="s_hour">
{section name=s_hour loop=24 start=0}
<option value="{$smarty.section.s_hour.index}" {if ($s_hour == $smarty.section.s_hour.index) && ($smarty.request.action=="edit")}selected{/if}>{if $smarty.section.s_hour.index < 10}0{/if}{$smarty.section.s_hour.index}</option>
{/section}
 </select>
 .
 <select name="s_minute" id="s_minute">
{section name=s_minute loop=60 start=0}
<option value="{$smarty.section.s_minute.index}" {if $s_minute == $smarty.section.s_minute.index}selected{/if}>{if $smarty.section.s_minute.index < 10}0{/if}{$smarty.section.s_minute.index}</option>
{/section}
 </select>
        <A HREF="#" onClick="cal13.select(document.forms[0].date13,'anchor13','dd.MM.yyyy'); return false;" TITLE="cal13.select(document.forms[0].date13,'anchor13','dd.MM.yyyy'); return false;" NAME="anchor13" ID="anchor13">{$langadmin.select_date}</A> </td>
    </tr>
    <tr>
      <td class="firstrow">{$langadmin.date_document_close}</td>
      <td class="secondrow"><input type="text" name="date14" value="{if $smarty.request.action=="edit"}{$e_date}{else}{$smarty.now|date_format:"%d.%m.$dateexpire"}{/if}" size=25 readonly="readonly">
, <select name="e_hour" id="e_hour">
{section name=e_hour loop=24}
<option value="{$smarty.section.e_hour.index}" {if ($e_hour == $smarty.section.e_hour.index) && ($smarty.request.action=="edit")}selected{/if}>{if $smarty.section.e_hour.index < 10}0{/if}{$smarty.section.e_hour.index}</option>
{/section}
 </select>
 .
 <select name="e_minute" id="e_minute">
{section name=e_minute loop=60 start=0}
<option value="{$smarty.section.e_minute.index}" {if $e_minute == $smarty.section.e_minute.index}selected{/if}>{if $smarty.section.e_minute.index < 10}0{/if}{$smarty.section.e_minute.index}</option>
{/section}
 </select>
	  
	  <a href="#" onClick="cal13.select(document.forms[0].date14,'anchor14','dd.MM.yyyy',(document.forms[0].date14.value=='')?document.forms[0].date13.value:null); return false;" title="cal13.select(document.forms[0].date14,'anchor14','dd.MM.yyyy',(document.forms[0].date14.value=='')?document.forms[0].date13.value:null); return false;" name="anchor14" id="anchor14">{$langadmin.select_date}</a> </td>
    </tr>
    <tr>
      <td class="firstrow">{$langadmin.date_document_top_close}</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:"%d.$dateexpire_top.%Y"}{/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.showonpage}</td>
      <td class="secondrow"><input name="showonpage" type="checkbox" id="showonpage" value="1" {if $row->showonpage=="1" or $smarty.request.action=="new"}checked="checked"{/if}></td>
    </tr>
    <tr>
      <td class="firstrow">{$langadmin.active_by_docopen}</td>
      <td class="secondrow"><input name="active" type="checkbox" id="active" value="1" {if $row->active=="1" or $smarty.request.action=="new"}checked="checked"{/if}> </td>
    </tr>
    <tr>
      <td class="firstrow">{$langadmin.article_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.article_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.article_index_search}</td>
      <td class="secondrow"><input name="cansearch" type="checkbox" id="cansearch" value="yes" {if $row->cansearch=="yes" or $smarty.request.action=="new"}checked="checked"{/if}></td>
    </tr>
    <tr>
      <td colspan="2" class="secondrow"><input name="area" type="hidden" id="area" value="{$smarty.request.area}">
        <input name="action" type="hidden" id="action" value="{$smarty.request.action}">
        <input name="charakter" type="hidden" id="charakter" value="{$smarty.request.charakter}">
        <input name="page" type="hidden" id="page" value="{$smarty.request.page}">
        <input name="pp" type="hidden" id="pp" value="{$smarty.request.pp}">
        <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}
		{if !permission("changetypeofdoc")}
		<input type="hidden" name="type_ofdoc" value="{$row->type}">
		{/if}
        <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>
{/if} {include file="../foot.tpl"} 