<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
 <head>
  <title> ECMall </title>
  <meta http-equiv="Content-Type" content="text/html; charset={$charset}" />
  <link href="admin/styles/general.css" rel="stylesheet" type="text/css" />
  <script type="text/javascript" src="?act=jslang"></script>
  {script src="ajax,ecmall,ui.utils,validator"}
  <script type="text/javascript">
  Event.observe(window, "load", function() {
   new ui.utils.tabForm("tab-form");
   Validator.run('theForm');
  });
  function change_show(obj)
  {
    var reply = document.forms['theForm']['reply'];
    if (obj.value == "1" && obj.checked){
        reply.disabled = false;
    }else{
        reply.disabled = true;
    }
  }
  </script>
 </head>
 <body align="center">
  <ul id="container">
    <li id="header">
      <h1>{$lang.edit_message}</h1>
      <div class="link">[<a href="admin.php?app=message&amp;act=view">{$lang.messages}</a>]</div>
      <div id="desc"></div>
    </li>
    <li>
      <form method="post" enctype="multipart/form-data" name="theForm">
      <div id="tab-form" class="tab-form">
        <ul class="tab-bar">
          <li>{$lang.general}</li>
        </ul>
        <div class="tab-page">
        <table class="form-table">
        <tr>
        <td class="label">{$lang.goods_name}:</td>
        <td>{$message.goods_name|escape|default:&nbsp;}</td>
      </tr>
        <tr>
        <td class="label">{$lang.buyer_name}:</td>
        <td>{$message.buyer_name|default:$lang.anonymous}</td>
      </tr>
        <tr>
        <td class="label">{$lang.message}:</td>
        <td>{$message.message|escape|nl2br}</td>
      </tr>
        <tr>
        <td class="label">{$lang.add_time}:</td>
        <td>{$message.formated_add_time}</td>
      </tr>
      <tr>
      <td class="label" >{$lang.if_show}:</td>
        <td><label>
          <input name="if_show" type="radio" value="1" {if $message.if_show}checked="checked"{/if}  onclick="change_show(this)"/>
          {$lang.yes}</label>
        <label>
          <input name="if_show" type="radio" value="0" {if !$message.if_show}checked="checked"{/if} onclick="change_show(this)" />
          {$lang.no}</label></td>
      </tr>
      <tr>
        <td class="label">{$lang.reply}:</td>
        <td><textarea rows="5" cols="80" name="reply" {if !$message.if_show}disabled="disabled"{/if}>{$message.reply|escape}</textarea><span class="note" style="vertical-align:top">{$lang.reply_note}</span></td>
      </tr>
      </table>
        </div>
        <div class="submitlist">
      <input type="hidden" name="message_id" value="{$message.message_id}" />
          <input type="submit" value="{$lang.submit}" />
          <input type="reset" value="{$lang.reset}" />
        </div>
      </div>
      </form>
    </li>
    {include file="admin/templates/footer.html"}
  </ul>
 </body>
</html>
