<div class="popbox">
<div class="header">{#Shop_edit_order#}</div>
<script language="javascript">
function update_message()
{ldelim}

	if(document.getElementById('s_ok').selected == true)
	{ldelim}
		var Inner = '{$config_vars.Shop_status_s_ok|replace:"%%ORDER_NUMBER%%":$order.TransaktionsNummer|replace:"%%DATE%%":$order.Datum}';
		var Subject = '{$config_vars.Shop_status_t_ok|unspecialchars}';
	{rdelim}
	else if(document.getElementById('s_wait').selected == true)
	{ldelim}
		var Inner = '{$config_vars.Shop_status_s_wait|replace:"%%ORDER_NUMBER%%":$order.TransaktionsNummer|replace:"%%DATE%%":$order.Datum}';
		var Subject = '{$config_vars.Shop_status_t_wait|unspecialchars}';
	{rdelim}
	else if(document.getElementById('s_ok_send').selected == true)
	{ldelim}
		var Inner = '{$config_vars.Shop_status_s_alldone|replace:"%%ORDER_NUMBER%%":$order.TransaktionsNummer|replace:"%%DATE%%":$order.Datum}';
		var Subject = '{$config_vars.Shop_status_t_alldone|unspecialchars}';	
		
	{rdelim}
	else if(document.getElementById('s_progress').selected == true)
	{ldelim}
		var Inner = '{$config_vars.Shop_status_s_progress|replace:"%%ORDER_NUMBER%%":$order.TransaktionsNummer|replace:"%%DATE%%":$order.Datum}';
		var Subject = '{$config_vars.Shop_status_t_progress|unspecialchars}';
	{rdelim}
	else if(document.getElementById('s_failed').selected == true)
	{ldelim}
		var Inner = '{$config_vars.Shop_status_s_failed|replace:"%%ORDER_NUMBER%%":$order.TransaktionsNummer|replace:"%%DATE%%":$order.Datum}';
		var Subject = '{$config_vars.Shop_status_t_failed|unspecialchars}';
	}
	
	else if(document.getElementById('s_n').selected == true)
	{ldelim}
		var Inner = '';
		var Subject = '';
	{rdelim}
	
	document.getElementById('MSubject').value = Subject;
	document.getElementById('Mwin').value = Inner;	
{rdelim}
</script>

<iframe src="index.php?do=shop&amp;sub=getHtmlOrder&amp;id={$smarty.request.id}"  class="iframe_order"></iframe>

<form method="post" action="?do=shop&sub=edit_order&id={$smarty.request.id}&save=1&pop=1">

<table width="100%" border="0" cellspacing="0" cellpadding="1">

 


  <tr>
    <td width="200" class="row_left">{#Shop_order_status#}</td>
    <td class="row_right">
	<select id="SSelect" name="Status" class="input" style="width:250px" onchange="update_message();">
	{*<option id="s_n" value="0"></option>*}
	<option id="s_wait" value="wait" {if $smarty.request.status==wait}selected="selected" {/if}>{#Shop_order_status_wait#}</option>
	<option id="s_ok" value="ok" {if $smarty.request.status==ok}selected="selected" {/if}>{#Shop_order_status_ok#}</option>
	<option id="s_ok_send" value="oksend" {if $smarty.request.status==oksend}selected="selected" {/if}>{#Shop_order_status_oksend#}</option>
	<option id="s_progress" value="progress" {if $smarty.request.status==progress}selected="selected" {/if}>{#Shop_order_status_progress#}</option>
	<option id="s_failed" value="failed" {if $smarty.request.status==failed}selected="selected" {/if}>{#Shop_order_status_failed#}</option>
	</select>	</td>
  </tr>
 <tr>

    <td width="200" class="row_left">{#Shop_order_email_subject#}</td>
    <td class="row_right"><input name="BetreffKunde" type="text" class="input" id="MSubject" style="width:99%;" value=""></td>
  </tr>
  <tr>
    <td width="200" class="row_left">{#Shop_order_email_text#}<br>
    <small>{#Shop_order_email_text_inf#}</small>	</td>
    <td class="row_right"><textarea class="input" style="width:99%; height:120px" name="MailKunde" id="Mwin"></textarea></td>
  </tr>
  <tr>

    <td width="200" class="row_left">{#Shop_order_customer_message#}</td>
    <td class="row_right"><textarea class="input" style="width:99%; height:60px" name="KundenNachricht" id="KundenNachricht">{$order.KundenNachricht|escape:html|stripslashes}</textarea></td>
  </tr>
  <tr>
    <td width="200" class="row_left">{#Shop_order_admin_message#}</td>
    <td class="row_right"><textarea class="input" style="width:99%; height:60px" name="Bemerkung" id="Bemerkung">{$order.Bemerkung|escape:html|stripslashes}</textarea></td>
  </tr>
  <tr>
    <td class="row_left">{#Shop_customer_ip#}</td>
    <td class="row_right"><a href="http://www.ripe.net/perl/whois?query={$order.Ip}&amp;.submit=Submit+Query" target="_blank">{$order.Ip}</a></td>
  </tr>
  <tr>
    <td width="200" class="row_left">{#Shop_send_emailorder#}</td>
    <td class="row_right">
	<input name="SendEmail" type="checkbox" id="SendEmail" value="1">
    
	<input type="hidden" name="OEmail" value="{$order.Email}" />
	<textarea style="display:none" id="OHTML" name="OHTML">{$order.Bestellung}</textarea>
	</td>
  </tr>
  <tr>
   <td width="200" class="row_left">&nbsp;</td>
   <td class="row_right">
   <input type="submit" class="button" value="{#Shop_order_editbutton#}">
   <input type="button" class="button" value="{#Shop_print_order#}" onclick="print_content('OHTML');" />
   <input type="button" class="button" value="{#Close#}" onclick="window.close();" />
   
   </td>
  </tr>
</table>
</form>




{if $smarty.request.status!=''}
<script language="javascript" type="text/javascript">
<!-- //
update_message();
// -->
</script>
{/if}
</div>