
{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}

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="links.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.link_new}{else}{$langadmin.link_edit}{/if}</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.url_http}</td>
      <td class="secondrow"><input name="url" type="text" id="url" value="{$row->url|escape:"htmlall"}" size="50"></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>
    {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")}    {/if} {/if}    <tr>
      <td class="firstrow">{$langadmin.hits_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.hits_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.picture}</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>
    {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.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="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="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"} 