<%@ Page language="c#" Codebehind="Guest.aspx.cs" AutoEventWireup="false" Inherits="wqeshop.Guest" %>
<%@ Register TagPrefix="uc1" TagName="Footer" Src="../../Modules/Footer.ascx" %>
<%@ Register TagPrefix="uc1" TagName="Helper" Src="Modules/Helper.ascx" %>
<%@ Register TagPrefix="uc1" TagName="Header" Src="Modules/Header.ascx" %>
<%@ Register TagPrefix="uc1" TagName="LeftNav" Src="Modules/LeftNav.ascx" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<!--#include file="../../inc/head.inc"-->
<title><%=GetResourceString("GuestBook")%> - <%=config.SiteTitle%></title>
</head>
<body id="MenuM10">
<uc1:Header id="Header1" runat="server"></uc1:Header>
<div class="twidth">
  <!--当前位置开始-->
  <div id="cnav">
    <div class="l"></div>
    <div class="r"></div>
    <div class="m"><%=GetResourceString("WhereYouAre")%><a href='/<%=System.Configuration.ConfigurationSettings.AppSettings["ShopFolder"]%><%if(config.html==""){%>Default.aspx<%}else{%>index.<%=config.html%><%}%>'><%=GetResourceString("Home")%></a> <font face="Times New Roman, Times, serif">>></font> <%=GetResourceString("GuestBook")%></div>
  </div>
  <!--当前位置结束-->
  <div id="middle">
    <div class="middlel">
      <!--类别导航开始-->
      <uc1:LeftNav id="LeftNav1" runat="server"></uc1:LeftNav>
      <!--类别导航结束-->
    </div>
    <div class="middler">
      <div class="mframe">
        <div class="tl"></div>
        <div class="tr"></div>
        <div class="tm"><span class="tt"><%=GetResourceString("GuestBook")%></span></div>
        <div class="wrapper"><div class="ml"></div>
        <div class="mr"></div>
        <div class="mm">
          <table width="100%" cellpadding="0" cellspacing="0" border="0">
            <tr>
              <td valign="top"><table align="center" width="100%" cellpadding="5" cellspacing="0" border="0">
                  <tr>
                    <td colspan="2"><%BindReviews(5);%>
                      <asp:DataList ID="dlGuest" Runat="server" RepeatColumns="1" Width="100%">
                        <ItemStyle BackColor="#ffffff"></ItemStyle>
                        <ItemTemplate>
                          <table width="95%" cellpadding="1" cellspacing="1" border="0" align="center" bgcolor="#cccccc">
                            <tr>
                              <td width="25%" bgcolor="#F6F6F6" align="center"><%=GetResourceString("Poster")%>:<a href='mailto:<%# (DataBinder.Eval(Container.DataItem, "HideEmail").ToString() == "0") ? DataBinder.Eval(Container.DataItem, "Email") : "#" %>'><%# DataBinder.Eval(Container.DataItem, "UserName") %></a></td>
                              <td width="75%" bgcolor="#ffffff"><table width="100%">
                                  <tr>
                                    <td><%# DataBinder.Eval(Container.DataItem, "Body") %><br />
                                      <font color="#C1C1C1"> <%# DataBinder.Eval(Container.DataItem, "AddTime") %> </font> </td>
                                  </tr>
                                  <tr>
                                    <td><hr noshade color="#333333" size="1" style="border-style: dotted; border-width: 1" width="100%">
                                    </td>
                                  </tr>
                                  <tr>
                                    <td><b><%=GetResourceString("Reply")%>:</b><br />
                                      <%# DataBinder.Eval(Container.DataItem, "Reply") %> </td>
                                  </tr>
                                </table></td>
                            </tr>
                          </table>
                        </ItemTemplate>
                      </asp:DataList>
                      <!-- 翻页开始-->
                      <table width="100%">
                        <tr>
                          <td><asp:hyperlink id="hplPrev" runat="server"><%=GetResourceString("PreviousPage")%></asp:hyperlink>
                            [&nbsp;
                            <asp:Label ID="lbPage" Runat="server"></asp:Label>
                            &nbsp;]
                            <asp:hyperlink id="hplNext" runat="server"><%=GetResourceString("NextPage")%></asp:hyperlink>
                          </td>
                          <td align="right"><asp:label id="lblPagerInfo" runat="server"></asp:label>
                            &nbsp;&nbsp;&nbsp;&nbsp;
                            <input type="text" name="gopage" class="inputbg" size="1">
                            <input type="submit" value="Go" onclick="GoPage()">
                            <script type="text/javascript">
																				function GoPage() 
																				{ 
																					javascript:window.location.href="Guest.aspx?Page=" + document.all.gopage.value;
																				}
																		</script>
                          </td>
                        </tr>
                      </table>
                      <!-- 翻页结束-->
                      <form id="reviewForm" action='Review.aspx?ProductID=0' method="post" onSubmit="return checkRemark();">
                        <script type="text/javascript" language="javascript">
																<!--
																function checkRemark()
																{
																var form=document.getElementById("reviewForm");
																if (form.body.value=="")
																{	alert("请填写评论内容");
																	form.body.focus();
																	return false;
																}
																if (form.username.value=="")
																{	alert("请填写姓名");
																	form.username.focus();
																	return false;
																}
																if (form.body.value.length>200)
																{	alert("评论内容不可以超过200字");
																	form.body.focus();
																	return false;
																}
																if (form.username.value.length>10)
																{	alert("姓名不可以超过10个字");
																	form.username.focus();
																	return false;
																}
																form.submit.disabled=true;
																return true;
																}
																function showLen(obj)
																{
																	document.getElementById("bodyLen").value=obj.value.length;
																}
																-->
																</script>
                        <table width="95%" cellpadding="0" cellspacing="0" border="0" align="center">
                          <tr>
                            <td width="40"><%=GetResourceString("Content")%>:</td>
                            <td><textarea name="body" cols="40" rows="4" onKeyDown="showLen(this)" onKeyUp="showLen(this)"></textarea>
                              <input type="text" id="bodyLen" size="4" style="BORDER-TOP-WIDTH:0px;BORDER-LEFT-WIDTH:0px;BACKGROUND:none transparent scroll repeat 0% 0%;BORDER-BOTTOM-WIDTH:0px;BORDER-RIGHT-WIDTH:0px"></td>
                          </tr>
                          <tr>
                            <td>Email:</td>
                            <td><input type="text" id="i_email" name="email" size="15">
                              <input type="checkbox" id="i_hideEmail" name="hideemail" checked>
                              <%=GetResourceString("HideEmailAddress")%></td>
                          </tr>
                          <tr>
                            <td><%=GetResourceString("Name")%>:</td>
                            <td><input type="text" id="i_username" name="username" maxlength="15" size="10">
                              <input type="submit" name="submit" value="<%=GetResourceString("Submit")%>"></td>
                          </tr>
                        </table>
                      </form></td>
                  </tr>
                  <tr>
                    <td class="hr" colspan="2"></td>
                  </tr>
                </table></td>
            </tr>
          </table>
        </div>
        </div><div class="bl"></div>
        <div class="br"></div>
        <div class="bm"></div>
      </div>
    </div>
  </div>
</div>
<uc1:Helper id="Helper1" runat="server"></uc1:Helper>
<uc1:Footer id="Footer1" runat="server"></uc1:Footer>
</div>
</body>
</html>
