
{include file="../head.tpl"}
<script language="JavaScript" type="text/javascript">
{literal}
function check(){
if( document.kform.faq.value == "")
	{
	alert("{/literal}{$langadmin.jserror_nofaq}{literal}");
	document.kform.faq.focus();
	 return false;
	}
}
{/literal}
</script>
<form action="faq.php" name="kform" onsubmit="return check();">
  <table width="100%"  border="0" cellpadding="4" cellspacing="1" class="tableborder">
    <tr>
      <td class="header">
	  {if $smarty.request.action=="new"}
	  {$langadmin.faqnew}
	  {else}
	  {$langadmin.faqedit}
	  {/if}
	  </td>
    </tr>
	{if $smarty.request.action=="new"}
    <tr>
      <td class="secondrow"><strong>{$langadmin.subfaqfrom}</strong></td>
    </tr>
    <tr>
      <td class="firstrow">
	<select name="cid" id="cid">
	<option value="0"> {$langadmin.nosubfaq} </option>
	{foreach from=$faq item=item} 
	{if $item->parent_id == 0}
	<option style="font-weight:bold;font-style:italic" value="{$item->id}" {if $smarty.request.id == $item->id} selected="selectd" {/if}>{$item->visible_title}</option>
	{else}
	<option value="{$item->id}" {if $smarty.request.id == $item->id} selected="selectd" {/if}>{$item->visible_title}</option>
	{/if}
	{/foreach}
	</select>
	  </td>
    </tr>
	{/if}
    <tr>
      <td class="secondrow"><strong>{if $smarty.request.cat==1}{$langadmin.categtitle}{else}{$langadmin.question}{/if}</strong></td>
    </tr>

    <tr>
      <td class="firstrow">
	  <input name="faq" type="text" id="faq" value="{if $smarty.request.action!="new"}{$faq}{/if}" size="40">      </td>
    </tr>
	{if $smarty.request.cat!=1}
    <tr>
      <td class="secondrow"><table width="100%"  border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td><strong>{$langadmin.answer}</strong></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 class="firstrow">
	  <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&amp;is={$inlineshots}" name="inline"></iframe>
	 </div>
	 {$ed2}
	  </td>
    </tr>
{/if}
	{if $smarty.request.action=="new"}
    <tr>
      <td class="secondrow"><input name="active" type="checkbox" id="active" value="1" checked>
        {$langadmin.active}</td>
    </tr>
	{/if}
    <tr>
      <td class="secondrow">
	  {if $smarty.request.action=="new"}
	  <input type="submit" class="button" value="{$langadmin.faqnew}">
	  <input name="action" type="hidden" id="action" value="new">
	  <input name="save" type="hidden" id="save" value="1">
	  <input name="area" type="hidden" id="area" value="{$smarty.request.area}">
	  {else}
	  <input type="submit" class="button" value="{$langadmin.edit}">
      <input name="action" type="hidden" id="action" value="save">
      <input name="id" type="hidden" id="id" value="{$smarty.request.id}">
	  <input name="area" type="hidden" id="area" value="{$smarty.request.area}">
	  {/if}
	  </td></tr>
  </table>
</form>
{include file="../foot.tpl"}