
{include file="../head.tpl"}
{if $smarty.request.delview=="1"}
<script language="JavaScript" type="text/javascript">
function delcheck(){ldelim}
	if(!confirm('{$langadmin.confirm_dellang}')){ldelim}
	return false;
	{rdelim}
{rdelim}
</script>

<table width="100%"  border="0" cellpadding="4" cellspacing="1" class="tableborder">
  <tr>
    <td class="header">{$langadmin.language_del} ({$langadmin.navi_adminarea})</td>
  </tr>
  <tr>
    <td class="firstrow">{$langadmin.language_del_sel}</td>
  </tr>
  <tr>
    <td class="secondrow">
<form method="post" action="languages_admin.php?subaction=del&amp;action=view&amp;list=1" onsubmit="return delcheck();">
   
	 
	 <select name="del_language">
          
          
	{foreach from=$languages item=lg}
	
    {if $lg->code != $aktlang}
          <option value="{$lg->code}" {if $smarty.request.language==$lg->code}selected="selected"{/if}>{$lg->thelang}</option>
          {/if}
          
	{/foreach}
	
        
        </select>
        <input name="Senden" type="submit" class="button" value="{$langadmin.language_del}" />
		
    </form></td>
  </tr>
</table>
{else} {if $smarty.request.subaction!="adnew"}
<form name="" id="" method="post" action="languages_admin.php?action=view&list=1">
  <table width="100%"  border="0" cellpadding="4" cellspacing="1" class="tableborder">
    <tr>
      <td class="header">{$langadmin.language_title} ({$langadmin.navi_adminarea})</td>
    </tr>
    <tr>
      <td class="firstrow">{$langadmin.language_edit_sel} </td>
    </tr>
    <tr>
      <td class="secondrow"><select name="language">
          
	{foreach from=$languages item=lg}
	
          <option value="{$lg->code}" {if $smarty.request.language==$lg->code}selected="selected"{/if}>{$lg->thelang}</option>
          
	{/foreach}
	
        </select>
      </td>
    </tr>
    <tr>
      <td class="firstrow"><input name="showown" type="checkbox" id="showown" value="1" {if $smarty.request.showown==1}checked="checked"{/if} />
      {$langadmin.language_show_own}
      <input type="submit" class="button" value="{$langadmin.go}" /></td>
    </tr>
  </table>
</form>
{/if}{if $smarty.request.subaction=="adnew"}
<form action="languages_admin.php?action=new" method="post" enctype="multipart/form-data" name="" id="">
  <table width="100%"  border="0" cellpadding="4" cellspacing="1" class="tableborder">
    <tr>
      <td class="header">{$langadmin.language_new} ({$langadmin.navi_adminarea})</td>
    </tr>
    <tr>
      <td class="firstrow">{$langadmin.language_sel_new} </td>
    </tr>
    <tr>
      <td class="secondrow"><select name="newlang">
        <option value=""></option>
            
	{foreach from=$lang_keys item=key}
	{if !in_array($newlang.$key,$lang_exist)}
            
        <option value="{$newlang.$key}">{$key}</option>
        
            {/if}
	{/foreach}
	
        
      </select>
        <br>
        <input name="Submit" type="submit" class="button" value="{$langadmin.do_action}" /></td>
    </tr>
    <tr>
      <td class="firstrow">{$langadmin.language_upload_file}</td>
    </tr>
    <tr>
      <td class="secondrow"><input name="updatemethod" type="radio" value="new" />
        {$langadmin.language_new_byfile}<br />        <input name="updatemethod" type="radio" value="update" checked />
        {$langadmin.language_refresh_byfile}<br>
        <input name="extraoption" type="checkbox" id="extraoption" value="1" checked>
<small>{$langadmin.update_option_update} </small></td>
    </tr>
    <tr>
      <td class="secondrow"><input name="files" type="file" id="files" size="40" /></td>
    </tr>
    <tr>
      <td class="firstrow"><input name="Submit" type="submit" class="button" value="{$langadmin.do_action}" />
        <input name="aktlang" type="hidden" id="aktlang" value="{$aktlang}" />
      <input name="upload" type="hidden" id="upload" value="1" /></td>
    </tr>
  </table>
</form>
{/if}
{if $smarty.request.list==1}
<br />
<form name="" id="" method="post" action="languages_admin.php">
  <table width="100%"  border="0" cellpadding="6" cellspacing="1" class="tableborder">
    <tr>
      <td class="c1">{$langadmin.search_insert}
          <input onclick="document.ls.q2.value='';" name="q" type="text" id="q" value="{$q}" size="30" />
  {$langadmin.search_variable}
  <input onclick="document.ls.q.value='';" name="q2" type="text" id="q2" value="{$q2}" size="30" />
  <input name="sm" type="radio" value="appro" {if ($smarty.request.sm=="appro")||($smarty.request.sm=="")}checked="checked"{/if} />
            {$langadmin.search_approximately} 
		   
          <input type="radio" name="sm" value="exact" {if $smarty.request.sm=="exact"} checked="checked"{/if}/>
  {$langadmin.search_exact}
            <input name="Senden" type="submit" class="button" value="{$langadmin.search}" />
            <input name="aktlang" type="hidden" id="aktlang" value="{$aktlang}" />
            <input name="action" type="hidden" id="action" value="view" />
            <input name="list" type="hidden" id="list" value="1" />
            <input name="language" type="hidden" id="language" value="{$smarty.request.language}" />
            <input name="ascdesc" type="hidden" id="ascdesc" value="{$smarty.request.ascdesc}" />
            <input name="order" type="hidden" id="order" value="{$smarty.request.order}" />
            <input name="show" type="hidden" id="show" value="{$smarty.request.show}" />
            <input name="code" type="hidden" id="code" value="{$litem->code}" />
        <input name="search" type="hidden" id="search" value="1" /></td></tr>
  </table>

</form>
<form action="languages_admin.php" method="post" name="lang" id="lang">
<table width="100%"  border="0" cellpadding="4" cellspacing="1" class="tableborder">
  <tr>
    <td colspan="2" class="header">{$langadmin.overview}({$langadmin.navi_adminarea})</td>
  </tr>
  <tr>
    <td colspan="2" class="firstrow"><table width="100%"  border="0" cellspacing="1" cellpadding="2">
      <tr>
        <td><input accesskey="s" name="Senden" type="submit" class="button" value="{$langadmin.refresh}" />
          <input onclick="location.href='languages_admin.php?action=export&amp;language={$smarty.request.language}';" type="button" class="button" value="{$langadmin.export_language}" /></td>
        <td><div align="right">          {$navi}
        </div></td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td class="firstrow">{$langadmin.content}</td>
    <td class="firstrow">{$langadmin.language_vaiable}</td>
    </tr>
 {foreach from=$langitems item=litem}
  <tr class="{cycle name=lf values="secondrow,firstrow"}">
    <td width="10%"><textarea style="height:100px;width:320px" id="{$litem->name}" name="value[{$litem->name}]" cols="50" rows="5">{$litem->value|escape:"htmlall"}</textarea></td>
    <td>      <table width="100%"  border="0" cellspacing="1" cellpadding="2">
        <tr>
          <td><input  type="text" value="{literal}{$langadmin.{/literal}{$litem->name}{literal}}{/literal}" size="40" readonly="readonly" /></td>
          </tr>
        <tr>
          <td>{if $litem->value!=$litem->value_original}
            <input onclick="location.href='languages_admin.php?id={$litem->name}&amp;page={$smarty.request.page}&amp;language={$smarty.request.language}&amp;action=view&amp;list=1&amp;show={$smarty.request.show}&amp;order={$smarty.request.order}&amp;show={$smarty.request.show}&amp;setoriginal=1'" type="button" value="{$langadmin.do_original}" />
            {else}
            <input type="button" value="{$langadmin.do_original}"  disabled="disabled" />
            {/if}
			{if $litem->original != 1}
			<input onclick="location.href='languages_admin.php?action=deleteitem&amp;id={$litem->name}&amp;language={$smarty.request.language}';" type="button" value="{$langadmin.language_item_delete}"  />
			{/if}
			</td>
          </tr>
        <tr>
          <td><input type="button" class="button" onclick="javascript:document.getElementById('{$litem->name}').style.height='200px';document.getElementById('{$litem->name}').style.width='450px';" value="{$langadmin.big}" />
            <input type="button" class="button" onclick="javascript:document.getElementById('{$litem->name}').style.height='100px';document.getElementById('{$litem->name}').style.width='320px';" value="{$langadmin.small}" /></td>
          </tr>
      </table>
	  <br /></td>
    </tr>
   {/foreach}  <tr>
     <td colspan="2" class="secondrow">{$navi}</td>
   </tr>
  <tr>
    <td colspan="2" class="firstrow">      <table width="100%"  border="0" cellspacing="1" cellpadding="1">
        <tr>
          <td>            <input name="action" type="hidden" id="action" value="view" />
            <input name="list" type="hidden" id="list" value="1" />
            <input name="language" type="hidden" id="language" value="{$smarty.request.language}" />
            <input name="page" type="hidden" id="page" value="{if $smarty.request.page==""}1{else}{$smarty.request.page}{/if}" />
            <input name="save" type="hidden" id="save" value="1" />
            <input name="ascdesc" type="hidden" id="ascdesc" value="{$smarty.request.ascdesc}" />
            <input name="order" type="hidden" id="order" value="{$smarty.request.order}" />
            <input name="show" type="hidden" id="show" value="{$smarty.request.show}" />
            <input name="code" type="hidden" id="code" value="{$litem->code}" />
<input accesskey="s" name="Senden" type="submit" class="button" value="{$langadmin.refresh}" /></td>
          <td><div align="right">
            </div></td>
        </tr>
      </table></td>
  </tr>

</table>
</form>
<br />
<form action="languages_admin.php?action=newitem" method="post" enctype="multipart/form-data" name="" id="">
  <table width="100%"  border="0" cellpadding="4" cellspacing="1" class="tableborder">
    <tr>
      <td colspan="2" class="header">{$langadmin.language_item_new} ({$langadmin.navi_adminarea})</td>
    </tr>
    <tr>
      <td width="20%" class="firstrow">{$langadmin.content}</td>
      <td class="secondrow"><textarea style="width:320px" id="{$litem->name}" name="newitem" cols="50" rows="4"></textarea></td>
    </tr>
    <tr>
      <td width="20%" class="firstrow">{$langadmin.language_vaiable}<br />
	  <small>{$langadmin.language_vaiable_text}</small>
	  </td>
      <td class="secondrow"><input name="newvariable" type="text" id="newvariable" size="40" /></td>
    </tr>
    <tr>
      <td width="20%" class="firstrow">&nbsp;</td>
      <td class="secondrow"><input type="submit" class="button" value="{$langadmin.do_action}" />
        <input name="language" type="hidden" id="language" value="{$smarty.request.language}" /></td>
    </tr>
  </table>
</form>
{/if}{/if}

{include file="../foot.tpl"}

