<%@ Page language="c#" Codebehind="Guest.aspx.cs" AutoEventWireup="false" Inherits="XpShop.WebUI.Guest" %>
<%@ Register TagPrefix="uc1" TagName="MemberMenu" Src="Modules/MemberMenu.ascx" %>
<%@ Register TagPrefix="uc1" TagName="NavBar" Src="Modules/NavBar.ascx" %>
<%@ Register TagPrefix="uc1" TagName="Header" Src="Modules/Header.ascx" %>
<%@ Register TagPrefix="uc1" TagName="Link" Src="Modules/Link.ascx" %>
<%@ Register TagPrefix="uc1" TagName="Helper" Src="Modules/Helper.ascx" %>
<%@ Register TagPrefix="uc1" TagName="Footer" Src="Modules/Footer.ascx" %>
<%@ Register TagPrefix="uc1" TagName="Bulletin" Src="Modules/Bulletin.ascx" %>
<%@ Register TagPrefix="uc1" TagName="LeftNavTop2Level" Src="Modules/LeftNavTop2Level.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/encoding.inc"-->
		<title><%=GetResourceString("GuestBook")%>|<%=config.SiteTitle%></title>
		<!--#include file="../../inc/head.inc"-->		
	</HEAD>
	<body>
			<div id="container">
			<uc1:Header id="Header1" runat="server"></uc1:Header>
		    <!--位置导航开始-->
			<div class="path"><a href="/<%=System.Configuration.ConfigurationSettings.AppSettings["ShopFolder"]%><%if(config.html==""){%>default.aspx<%}else{%>Index.<%=config.html%><%}%>"><%=GetResourceString("Home")%></a> > <%=GetResourceString("GuestBook")%></div>
			<!--位置导航结束-->
			<div id="content">
				<div id="content_left_side">
					<!--类别导航开始-->
					<uc1:LeftNavTop2Level id="LeftNavTop2Level1" runat="server"></uc1:LeftNavTop2Level>
					<!--类别导航结束-->
				</div>
				<div id="content_middle_side">
					<!--留言列表开始-->
					<div class="mframe">
						<div class="tl"></div>
						<div class="tr"></div>
						<div class="tm"><div class="on"><%=GetResourceString("GuestBook")%></div></div>
						<div class="ml"></div>
						<div class="mr"></div>
						<div class="mm">
							<div id="productlist">
						        <div class="product">
						            <%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>
						        </div>
						        <div class="page">
					             <!-- 翻页开始-->
                                <span>
                                    <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>
                                </span>
                                <span style="padding-left:20px;">
                                   <asp:label id="lblPagerInfo" runat="server"></asp:label>&nbsp;&nbsp;&nbsp;&nbsp;<input type="text" id="gopage" name="gopage" class="inputbg" size="1">
									&nbsp;<input type="submit" value="Go" class="go" onclick="GoPage()">
									<script language="JavaScript" type="text/JavaScript">
											function GoPage() 
											{ 
												javascript:window.location.href="/<%=System.Configuration.ConfigurationSettings.AppSettings["ShopFolder"]%>Guest.aspx?Page=" + document.getElementById("gopage").value;
											}
									</script>
                                </span>
				               <!-- 翻页结束-->
					         </div>
						    </div>
						    <form id="reviewForm" action='/<%=System.Configuration.ConfigurationSettings.AppSettings["ShopFolder"]%>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("<%=GetResourceString("BulletinCommentRequest")%>");
								form.body.focus();
								return false;
							}
							if (form.username.value=="")
							{	alert("<%=GetResourceString("BulletinNameRequest")%>");
								form.username.focus();
								return false;
							}
							form.submit.disabled=true;
							return true;
							}
							function showLen(obj)
							{
								document.getElementById("bodyLen").value=obj.value.length;
							}
							-->
							</script>
						    <table cellpadding="0" cellspacing="0" border="0" class="linkinfo">
								<tr>
									<th><%=GetResourceString("Content")%>： </th>
									<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>
									<th>Email： </th>
									<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>
									<th><%=GetResourceString("Name")%>： </th>
									<td><input type="text" id="i_username" name="username" maxlength="15" size="10"><input type="submit" name="submit" value=" Submit "></td>
								</tr>
							</table>
							</form>
							<div style="clear:both;"></div>
						</div>
					    <div class="bl"></div>
					    <div class="br"></div>
					    <div class="bm"></div>
					</div>
					<!--内容结束-->
				</div>
				<div style="clear:both;"></div>
			</div>
			<uc1:Helper id="Helper1" runat="server"></uc1:Helper>
			<uc1:Footer id="Footer1" runat="server"></uc1:Footer>
		</div>
	</body>
</HTML>
