<%@ Page language="c#" Codebehind="Guest.aspx.cs" AutoEventWireup="true" Inherits="XpShop.WebUI.Guest" %>
<%@ Register TagPrefix="uc1" TagName="Header" Src="Modules/Header.ascx" %>
<%@ Register TagPrefix="uc1" TagName="Helper" Src="Modules/Helper.ascx" %>
<%@ Register TagPrefix="uc1" TagName="Footer" Src="Modules/Footer.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>
		<uc1:Header id="Header1" runat="server"></uc1:Header>
		<div class="xp-w clear">
		    <!--位置导航开始-->
			<div class="path"><a href="<%=webSite %><%if(config.html==""){%>default.aspx<%}else{%>Index.<%=config.html%><%}%>"><%=GetResourceString("Home")%></a>&nbsp;&gt;&nbsp;<%=GetResourceString("GuestBook")%></div>
			<!--位置导航结束-->
			<div id="content_left">
				<!--类别导航开始-->
				<uc1:LeftNavTop2Level id="LeftNavTop2Level1" runat="server"></uc1:LeftNavTop2Level>
				<!--类别导航结束-->
			</div>
			<div id="content_right">
				<!--留言列表开始-->
				<div class="mframe">
					<div class="tl"></div>
					<div class="tr"></div>
					<div class="tm">
					    <div class="mframetitle"><%=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" style="color:#000;" align="center"><%=GetResourceString("Poster")%>：<a href='mailto:<%# (DataBinder.Eval(Container.DataItem, "HideEmail").ToString() == "0") ? DataBinder.Eval(Container.DataItem, "Email") : "#" %>' style="color:#000;"><%# DataBinder.Eval(Container.DataItem, "UserName") %></a></td>
												<td width="75%" bgcolor="#ffffff">
													<table width="100%" cellpadding="0" cellspacing="5">
														<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><div style=" color:#ff0000; font-weight:bold;"><%=GetResourceString("Reply")%>：</div>
																<div style="text-indent:16px; color:#ff0000;"><%# DataBinder.Eval(Container.DataItem, "Reply") %></div>
															</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="<%=webSite %>Guest.aspx?Page=" + document.getElementById("gopage").value;
										}
								</script>
                            </span>
			               <!-- 翻页结束-->
				         </div>
					    </div>
					    <form id="reviewForm" action='<%=webSite %>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="5" border="0" class="linkinfo">
							<tr>
								<th><%=GetResourceString("Content")%>： </th>
								<td><textarea name="body" cols="80" rows="8" 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" style="margin-left:6px;" 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" style=" margin-left:6px; line-height:15px;" name="submit" value=" 提交 "></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>
		<uc1:Helper id="Helper1" runat="server"></uc1:Helper>
		<uc1:Footer id="Footer1" runat="server"></uc1:Footer>
	</body>
</HTML>
