<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="WstWeb.TemplateFile.Tel001.LeaveMsg.Default" %>

<%@ Register Src="../UserControl/LeftCommonClass.ascx" TagName="LeftCommonClass"
    TagPrefix="uc1" %>
<%@ Register Src="../UserControl/WeHead.ascx" TagName="WeHead" TagPrefix="uc2" %>
<%@ Register Src="../UserControl/WebFoot.ascx" TagName="WebFoot" TagPrefix="uc3" %>
<%@ Register Src="../UserControl/LeftLinkUs.ascx" TagName="LeftLinkUs" TagPrefix="uc4" %>
<%@ Register Src="../UserControl/Link.ascx" TagName="Link" TagPrefix="uc5" %>
<!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>
        <%=SeoTitle %></title>
    <meta name="keywords" content="<%=SeoKey %>">
    <meta name="description" content="<%=SeoDesc %>">
    <uc5:Link ID="Link1" runat="server" />
    <script type="text/javascript">
        //获取radiobutton 的选择项
        function GetRadioCheckedValue(groupName) {
            var obj = document.getElementsByName(groupName);
            var result = "";
            if (obj.length) {
                for (var i = 0; i < obj.length; i++) {
                    if (obj[i].checked) {
                        result = obj[i].value; break;
                    }
                }
            }
            return result;
        }


        function SaveData() {

            var person = $.trim($("#txtPerson").val());
            var content = $.trim($("#txtContent").val());
            var tel = $.trim($("#txtTel").val());
            var code = $.trim($("#txtCode").val());
            if (person == "") { alert("联系人不能为空"); return false; }
            if (tel == "") { alert("联系电话不能为空"); return false; }
            if (content == "") { alert("内容不能为空"); return false; }
            if (code == "") { alert("验证码不能为空"); return false; }
            $.ajax({
                type: "POST", //URL方式为POST
                url: "/UserControl/DoPostSaveData.aspx?action=savemsg",
                data: { Person: person, Content: "[" + GetRadioCheckedValue("radiobutton1") + "]" + content, Code: code, Tel: tel, title: GetRadioCheckedValue("radiobutton1") },
                success: function (v_data) {
                    if (v_data == "ok") {
                        alert("提交成功，感谢您的留言");
                        document.getElementById("vimg").src = "/UserControl/VCode.aspx?Rnd=" + Math.random();
                        $("#txtPerson").val("");
                        $("#txtContent").val("");
                        $("#txtTel").val("");
                    }
                    else alert("提交成失败");
                }
            });

        }
    
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <uc2:WeHead ID="WeHead1" CurrentChannelId="10" runat="server" />
    <div class="main">
        <div class="left">
            <div class="left-title">
                <%= GetChannelConfig(4).ChannelName%><span style="font-size: 10px; padding-left: 10px; color: #CCC; text-transform: uppercase;">Product
                    Center</span></div>
            <div class="clear10">
            </div>
            <div class="leftwidth">
                <uc1:LeftCommonClass ID="LeftCommonClass2" TableName="ProductClass" runat="server" />
            </div>
            <div class="clear10">
            </div>
            <div class="left-contact">
                <div class="left-title">
                    联系我们<span style="font-size: 10px; padding-left: 10px; color: #CCC; text-transform: uppercase;">contact
                        us</span></div>
                <div class="zhong">
                    <uc4:LeftLinkUs ID="LeftLinkUs2" runat="server" />
                </div>
            </div>
        </div>
        <div class="right">
            <div class="right-title">
                <div class="fansi">
                    <%=CurrentPageName%></div>
                <div class="yingwen">
                    Feedback</div>
                <div class="weizhi">
                    当前位置：<a href="/">首页</a> > <a href='/LeaveMsg/'>
                        <%=CurrentPageName%></a></div>
            </div>
            <div class="clear10">
            </div>
            <div class="m_0_10">
                <div class="zxly">
                    <h3>
                        您的参与将帮助我们改进产品和服务</h3>
                    <div>
                        <div>
                            <div>
                                非常感谢您使用！如果您有任何建议与意见，欢迎留言告诉我们。 对于您在产品过程中发生问题，您可以选择举报或投诉，将尽力来为您解决。
                            </div>
                            <div class="clear10">
                            </div>
                            <div class="zxorder">
                                <table class="zxform" width="100%" border="0" cellspacing="0" cellpadding="0">
                                    <tr>
                                        <td>
                                            <strong>我要</strong>
                                        </td>
                                        <td align="left" valign="middle">
                                            <input type="radio" checked="checked" name="radiobutton1" value="留言" />
                                            留言
                                            <input type="radio" name="radiobutton1" value="举报" />
                                            举报
                                            <input type="radio" name="radiobutton1" value="投诉" />
                                            投诉
                                        </td>
                                    </tr>
                                    <tr>
                                        <td width="80">
                                            姓名：
                                        </td>
                                        <td align="left" valign="middle">
                                            <input type="text" id="txtPerson" size="30" />
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            电话：
                                        </td>
                                        <td align="left" valign="middle">
                                            <input type="text" id="txtTel" size="30" />
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            内容：
                                        </td>
                                        <td align="left" valign="middle">
                                            <textarea class="set1" id="txtContent" style="width: 500px; height: 100px;"></textarea>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            验证码：
                                        </td>
                                        <td align="left" valign="middle">
                                            <input type="text" id="txtCode" size="5" maxlength="4" />
                                            <img name="vimg" id="vimg" onclick="javascript:document.all('vimg').src='../UserControl/VCode.aspx?Rnd='+Math.random();" />
                                            <script type="text/javascript">                                                document.getElementById("vimg").src = "../UserControl/VCode.aspx?Rnd=" + Math.random();</script>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            &nbsp;
                                        </td>
                                        <td height="50" align="left" valign="middle">
                                            <a href="javascript:void(0)" onclick="SaveData()">
                                                <img src="../images/index_61.png" /></a>
                                        </td>
                                    </tr>
                                </table>
                            </div>
                        </div>
                        <div class="clear10">
                        </div>
                        <div>
                            <span class="color3"><b>提示:</b></span><br />
                            留言的分类需正确选择，以便系统分配给相关的负责人来跟进；留言内容请尽量描述得具体一点。 我们收到留言后会在24小时内处理并反馈，出现内容不客观不规范以及联系方式无效等情况不予回复。</div>
                        <div class="clear10">
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <uc3:WebFoot ID="WebFoot1" runat="server" />
    </form>
</body>
</html>
