<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="Keywords" content="{$keywords}" />
<meta name="Description" content="{$description}" />
<meta name="Description" content="{$description}" />
{if $auto_redirect}
<meta http-equiv="refresh" content="3;URL={$message.href}" />
{/if}
<!-- TemplateBeginEditable name="doctitle" -->
<title>{$page_title}</title>
<!-- TemplateEndEditable --><!-- TemplateBeginEditable name="head" --><!-- TemplateEndEditable -->
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<link rel="shortcut icon" href="favicon.ico" />
<link rel="icon" href="animated_favicon.gif" type="image/gif" />
<link href="{$ecs_css_path}" rel="stylesheet" type="text/css" />
{* 包含脚本文件 *}
{insert_scripts files='common.js'}
<script type="text/javascript" src="js/action.js"></script>
</head>
<body>
<!-- #BeginLibraryItem "/library/page_header.lbi" --><!-- #EndLibraryItem -->
<!-- #BeginLibraryItem "/library/ur_here.lbi" --><!-- #EndLibraryItem -->
<!--主体内容 start-->
<div class="block clearfix">
  <!--left start-->
	<div id="pageLeft" class="fl"style=" width:200px;">
	<!-- TemplateBeginEditable name="左边区域" -->
	  <!-- #BeginLibraryItem "/library/category_tree.lbi" --><!-- #EndLibraryItem -->
		<!-- #BeginLibraryItem "/library/history.lbi" --><!-- #EndLibraryItem -->
		<!-- #BeginLibraryItem "/library/promotion_info.lbi" --><!-- #EndLibraryItem -->
		<!-- #BeginLibraryItem "/library/top10.lbi" --><!-- #EndLibraryItem -->
	<!-- TemplateEndEditable -->
	</div>
	<!--left end-->
	<!--right start-->
	<div id="pageRight" class="fr">
	<!-- #BeginLibraryItem "/library/message_list.lbi" --><!-- #EndLibraryItem -->
  <!-- #BeginLibraryItem "/library/pages.lbi" --><!-- #EndLibraryItem -->
	<div class="infotit clearfix">
  <h2><span class="l"></span><span class="r"></span>{$lang.post_message}</h2>
  </div>	
	<form action="message.php" method="post" name="formMsg" onsubmit="return submitMsgBoard(this)">
            <table width="100%" border="0" cellpadding="3">
              <tr>
                <td align="right">{$lang.username}</td>
                <td>
                <!--{if $smarty.session.user_name}-->
                <font class="f4_b">{$username}</font><label for="anonymous" style="margin-left:8px;"><input type="checkbox" name="anonymous" value="1" id="anonymous" />{$lang.message_anonymous}</label>
                <!--{else}-->
                <input name="user_name" class="InputBorder" type="text" size="15" value="{$lang.anonymous}" />
                <!--{/if}-->
                </td>
              </tr>
              <tr>
                <td align="right">{$lang.email}</td>
                <td><input name="user_email" type="text" class="InputBorder" size="20" value="{$smarty.session.email|escape}" /></td>
              </tr>
              <tr>
                <td align="right">{$lang.message_board_type}</td>
                <td><input name="msg_type" type="radio" value="0" checked="checked" />
                  {$lang.message_type[0]}
                  <input type="radio" name="msg_type" value="1" />
                  {$lang.message_type[1]}
                  <input type="radio" name="msg_type" value="2" />
                  {$lang.message_type[2]}
                  <input type="radio" name="msg_type" value="3" />
                  {$lang.message_type[3]}
                  <input type="radio" name="msg_type" value="4" />
                  {$lang.message_type[4]} </td>
              </tr>
              <tr>
                <td align="right">{$lang.message_title}</td>
                <td><input name="msg_title" type="text" class="InputBorder" size="30" /></td>
              </tr>
							<!-- 判断是否启用验证码{if $enabled_mes_captcha} -->
              <tr>
                <td align="right">{$lang.comment_captcha}</td>
                <td><input type="text" size="8" name="captcha"  class="InputBorder" />
                <img src="captcha.php?{$rand}" alt="captcha" style="vertical-align: middle;cursor: pointer;" onclick="this.src='captcha.php?'+Math.random()" /> </td>
              </tr>
            <!--{/if}-->
              <tr>
                <td align="right" valign="top">{$lang.message_content}</td>
                <td><textarea name="msg_content" cols="50" rows="4" wrap="virtual" class="InputBorder"></textarea></td>
              </tr>
              <tr>
                <td>&nbsp;</td>
                <td><input type="hidden" name="act" value="act_add_message" />
                  <input type="submit" value="{$lang.post_message}" class="bnt_number4" />
                </td>
              </tr>
            </table>
          </form>
  <script type="text/javascript">
        {foreach from=$lang.message_board_js item=item key=key}
        var {$key} = "{$item}";
        {/foreach}
        {literal}
        /**
         * 提交留言信息
        */
        function submitMsgBoard(frm)
        {
            var msg = new Object;

             msg.user_email  = frm.elements['user_email'].value;
             msg.msg_title   = frm.elements['msg_title'].value;
             msg.msg_content = frm.elements['msg_content'].value;
             msg.captcha     = frm.elements['captcha'] ? frm.elements['captcha'].value : '';

            var msg_err = '';

            if (msg.user_email.length > 0)
            {
               if (!(Utils.isEmail(msg.user_email)))
               {
                  msg_err += msg_error_email + '\n';
                }
             }
             else
             {
                  msg_err += msg_empty_email + '\n';
             }
            if (msg.msg_title.length == 0)
            {
                msg_err += msg_title_empty + '\n';
            }
            if (frm.elements['captcha'] && msg.captcha.length==0)
            {
                msg_err += msg_captcha_empty + '\n'
            }
            if (msg.msg_content.length == 0)
            {
                msg_err += msg_content_empty + '\n'
            }
            if (msg.msg_title.length > 200)
            {
                msg_err += msg_title_limit + '\n';
            }

            if (msg_err.length > 0)
            {
                alert(msg_err);
                return false;
            }
            else
            {
                return true;
            }
        }
        {/literal}
        </script>

		
	</div>
	<!--right end-->
</div>
<!--主体内容 end-->

<!-- #BeginLibraryItem "/library/help.lbi" --><!-- #EndLibraryItem -->
<!-- #BeginLibraryItem "/library/page_footer.lbi" --><!-- #EndLibraryItem -->
</body>
</html>
