<%@ Page language="c#" Codebehind="NewShow.aspx.cs" AutoEventWireup="true" Inherits="XpShop.WebUI.NewShow" %>
<%@ 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="LeftNavPM0" Src="Modules/LeftNavPM0.ascx" %>
<%@ Register TagPrefix="uc1" TagName="LeftNavPM1" Src="Modules/LeftNavPM1.ascx" %>
<%@ Register TagPrefix="uc1" TagName="LeftNavPM2" Src="Modules/LeftNavPM2.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><%=newProduct.ProductName%>,<%=config.SiteTitle%></title>
		<!--#include file="../../inc/head.inc"-->
        <script src="<%=webSite %>Template/<%=config.TemplateFolder%>/inc/pm.js" type="text/javascript"></script>
        <script src="<%=webSite %>Template/<%=config.TemplateFolder%>/inc/ProductReview.js" type="text/javascript"></script>
		<script src="<%=webSite %>Template/<%=config.TemplateFolder%>/inc/jquery.jqzoom.min.js" type="text/javascript"></script>
		<link href="<%=webSite %>Template/<%=config.TemplateFolder%>/style/jqzoom.css" type="text/css" rel="stylesheet" />
        <script type="text/javascript">
			var memberGroup= '<%=newProduct.MemberGroup%>';
			var shopFolder="<%=webSite %>";
        </script>
        <script type="text/javascript">
		    var extend = '<%=config.html %>';
			var baseUrl="<%=webSite %>";
			var shopFolder="<%=webSite %>";
			var returnUrl='<%=Request.Url.AbsoluteUri %>';
			var preProduct="<%=GetResourceString("PreProduct")%>";
			var nextProduct="<%=GetResourceString("NextProduct")%>";
			var productID = '<%=Request.QueryString["PID"] %>';
			var hadFav = '<%=GetResourceString("HadFavourite") %>';
			var favSucc = '<%=GetResourceString("FavouriteSucc") %>';
		    var PageSize = 10;
            var CurrentPage = 1;
            var showpage = false;
			var reviewType = 2;//--回复的类型，1为普通商品，2为拍卖商品,3为团购商品，4为礼品
            var votewords = '您对我们的回复：<span class="vote_y">满意</span>(<a class="yesnum">{0}</a>)  <span class="vote_n">不满意</span>(<a class="notnum">{1}</a>)';
            var reviewvotewords = '这条评论对您：<span class="vote_y">有用</span>(<a class="yesnum">{0}</a>)  <span class="vote_n">无用</span>(<a class="notnum">{1}</a>)';
            var NotExist = '<%=GetResourceString("ProductNotExist")%>';
		    var NotForSale = '<%=GetResourceString("ProductNotForSale")%>';
		    var NotStorage = '<%=GetResourceString("ProductNotStorage")%>';
        </script>
        <script type="text/javascript">
            $(document).ready(function(){
            	$(".jqzoom").jqueryzoom({
					xzoom: 300, //zooming div default width(default width value is 200)
					yzoom: 300, //zooming div default width(default height value is 200)
					offset: 10, //zooming div default offset(default offset value is 10)
					position: "right", //zooming div position(default position value is "right")
					preload:1,
					lens:1
				});
            });
       </script>
		<link rel="stylesheet" href="<%=webSite %>Template/<%=config.TemplateFolder%>/style/tabs.css" />
	</HEAD>
	<body>
	    <uc1:Header id="Header1" runat="server"></uc1:Header>
	    <div class="xp-w clear">
	        <!--位置导航开始-->
	        <div class="path"><h5><a href="<%=webSite %><%if(config.html==""){%>default.aspx<%}else{%>Index.<%=config.html%><%}%>"><%=GetResourceString("Home")%></a>&nbsp;&gt;&nbsp;<%=GetResourceString("ProductDetails")%></h5></div>
	        <!--位置导航结束-->
		    <div id="content_left">
			    <uc1:LeftNavPM0 id="LeftNavPM01" runat="server"></uc1:LeftNavPM0>
			    <uc1:LeftNavPM1 id="LeftNavPM11" runat="server"></uc1:LeftNavPM1>
			    <uc1:LeftNavPM2 id="LeftNavPM21" runat="server"></uc1:LeftNavPM2>
			    <%=GetAD(30)%>
		    </div>
		    <div id="content_right">
			    <div id="product">
			        <div class="pdtinfo-title" style="height:50px;">
                        <div class="pdtname"><%=newProduct.ProductName%></div>
                    </div>
				    <div  class="picture">
				        <div class="clear">
				            <div id="thumbnail_bimg">
				                <div class="clear jqzoom" style=" margin:0px auto; text-align:center; overflow:hidden;">
					                <img id="thumbnail_img" src="<%=webSite %><%=config.Path%>upload/<%=newProduct.Picture%>"  jqimg="<%=webSite %><%=config.Path%>upload/<%=newProduct.Picture%>" onload="if(this.width > this.height && this.width>350)this.width=350;if(this.height > this.width && this.height>350)this.height=350;" />
					            </div>
				            </div>
						        <div class="picture_div"><%=GetTagImg(5,0,0)%></div>
					    </div>
					    <%--<a id="product_img" href='<%=webSite %><%=config.Path%>upload/<%=newProduct.Picture%>' class="highslide" onclick="return hs.expand(this, {captionId: 'caption1'})"><div class="viewimg"></div></a>--%>
				    </div>
				    <!--商品信息开始-->
				    <div class="info">
					    <form name="pDetails" action='<%=webSite %>ChuJia.aspx?PID=<%=newProduct.NewProductID%>' method="post">
                            <table align="left" cellpadding="5" cellspacing="0" border="0" class="subinfo">
                                <tr>
                                    <th><%=GetResourceString("ProductNo")%>:</th>
                                    <td><%=newProduct.ProductNo%></td>
                                </tr>
                                <tr>
                                    <th><%--<%=GetResourceString("BidUpPrice")%>--%>起拍价:</th>
                                    <td style="font-weight:bold;"><%=GetCurrencySign()%><%=newProduct.LowPrice%></td>
                                </tr>
                                <tr>
                                    <th><%--<%=GetResourceString("Range")%>--%>最低加价:</th>
                                    <td style="font-weight:bold;"><%=GetCurrencySign()%><%=newProduct.Range%></td>
                                </tr>
                                <tr>
                                    <th><%=GetResourceString("CurrentPrice")%>:</th>
                                    <td style="color:#fd0002; font-weight:bold; font-size:16px;"><%=GetCurrencySign()%><%=GetTopBidPrice()%></td>
                                </tr>
                                <%if(state == 0) {%>
				                <tr>
				                    <th>开始时间：</th>
				                    <td><%=newProduct.DateTo.ToString()%></td>
				                </tr>
				                <%}else if(state == 1) {%>
                                <tr>
                                    <th><%=GetResourceString("RemainingTime")%>:</th>
                                    <td><%=GetRemainingTime(newProduct.DateTo.ToString())%></td>
                                </tr>
				                <%}else if(state == 2) {%>
				                <tr>
					                <th><%=GetResourceString("RemainingTime")%>:</th>
					                <td><span style="color:Red;"><%=GetResourceString("ThisProductHasExpired") %></span></td>
				                </tr>
				                <%} %>
                                <tr>
                                    <th>会员级别:</th>
                                    <td style="color:#0200fb"><%=BindMemberGroup(newProduct.MemberGroup)%></td>
                                </tr>
                            </table>
                            <div class="clear" style="margin-left:100px;"><br />
                            <%if (state == 1) {%>
						    <input type="submit" value=" " class="paimai" id="join"/>
						    <%}else if(state == 0) {%>
						    <span style="color:Red;">即将开始拍卖，敬请期待...</span>
						    <%} %>
						    </div>
                        </form>
			        </div>
			        <!--商品信息结束-->
			    </div>
				
			    <div class="show_mmframe">
                    <div class="tl1">
                        详细介绍
                    </div>
			        <div class="tm"></div>
                    <div class="mm">                                    
                        <%=newProduct.Description%>
                    </div>
	            </div>	
		        <a name="record"></a>
	            <div class="show_mmframe">
                    <div class="tl">
                        竞拍记录
                    </div>
			        <div class="tm"></div>
                    <div class="mm">
                	    <%=BindRecord()%>
                        <asp:datagrid id="dgList" runat="server" AutoGenerateColumns="False" Width="100%" HorizontalAlign="Center" BorderWidth="1" BorderColor="#ebe9ed">
                            <ItemStyle BackColor="White"></ItemStyle>
                            <HeaderStyle BackColor="#e4e3df" Height="20px"></HeaderStyle>
                            <Columns>
                                <asp:TemplateColumn HeaderText="序号">
                                    <HeaderStyle HorizontalAlign="Center" Height="20px"></HeaderStyle>
                                    <ItemStyle HorizontalAlign="Center" Width="60px"></ItemStyle>
                                    <ItemTemplate>
                                        <%# Container.ItemIndex + 1%>
                                    </ItemTemplate>
                                </asp:TemplateColumn>											    
                                <asp:TemplateColumn HeaderText="竞拍会员">
                                    <HeaderStyle HorizontalAlign="Center"></HeaderStyle>
                                    <ItemStyle HorizontalAlign="Center" Height="20px"></ItemStyle>
                                    <ItemTemplate>
                                        <%# DataBinder.Eval(Container.DataItem, "MemberName") %>
                                    </ItemTemplate>
                                </asp:TemplateColumn>
                                <asp:TemplateColumn HeaderText="竞拍时间">
                                    <HeaderStyle HorizontalAlign="Center"></HeaderStyle>
                                    <ItemStyle HorizontalAlign="Center" Height="20px"></ItemStyle>
                                    <ItemTemplate>
                                        <%# DataBinder.Eval(Container.DataItem, "Times", "{0:yyyy-MM-dd HH:mm}") %>
                                    </ItemTemplate>
                                </asp:TemplateColumn>
                                <asp:TemplateColumn HeaderText="出价">
                                    <HeaderStyle HorizontalAlign="Center"></HeaderStyle>
                                    <ItemStyle HorizontalAlign="Center" Height="20px"></ItemStyle>
                                    <ItemTemplate>
                                        <%# DataBinder.Eval(Container.DataItem, "BidPrice") %>
                                    </ItemTemplate>
                                </asp:TemplateColumn>
                            </Columns>
                        </asp:datagrid>
                    </div>
	            </div>
			    
	            <div class="show_mmframe">
                    <div class="tl">
                        拍卖评论
                    </div>
			        <div class="tm"></div>
                    <div class="mm">                                    
                        <!--用户评论开始-->
                        <div id="ReviewContent" class="ReviewContent">
                            <div class="item" id="reviewtemplate">
                                <div class="rev">
                                    <div class="userinfo">
                                        <div class="icon" ><img src='#' alt=''/></div>
                                        <div class="username">admin</div>
                                        <div class="groupname">钻石会员</div>
                                        <div class="area">(广东)</div>
                                    </div>
                                    <div class="revinfo">
                                        <div class="revhead">
                                            <div class="revtitle">标题</div>
                                            <div class="revscore"></div>
                                            <div class="revtime">时间</div>
                                        </div>
                                        <div class="revbody">评论内容</div>
                                        <div class="btns">
                                            <div class="btnreply btnbg hand">我要回复</div>
                                            <div class="btnviewrep btnbg hand">查看回复</div>
                                            <div class="revvote"><div class="ques">这条评论对您有用吗?</div><div class="vote_y btnbg hand">有用(<span class="yesnum">1</span>)</div><div class="vote_n btnbg hand">没用(<span class="notnum">1</span>)</div></div>
                                        </div>
                                    </div>
                                </div>
                                <div class="reply" style="display:block;">
                                    <div id="reptemplate" class="reptemplate" style="display:none;">
                                        <div class="repname">wolanda：</div>
                                        <div class="repbody">回复内容</div>
                                        <div class="reptime">回复时间</div>
                                        <div class="separateline"></div>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <!--回复框开始-->
                        <div id="ReplySumbit" style="display:none; width:100%;">
                            <form id="frmReply" action="">
                                <textarea id="txtReply" name="txtReply" cols="50" rows="5"></textarea>
                                <input type="hidden" id="hidden_reviewID" name="hidden_reviewID" value="0" />
                                <br />
                                <input type="button" id="btnReply" name="btnSubmit" value="提交回复" /><input type="button" id="btnCancel" value="取消" />
                            </form>
                        </div>
                        <!--回复框结束-->
                        <div class="clear" style="border-top:dotted 1px #666; padding-top:2px;">
                            <div style="border:solid 1px #999; width:70px; height:20px; float:left; text-align:center; line-height:20px;"><a href='<%=webSite %>PTReview-<%=newProduct.NewProductID%>-2-1.<%=config.html %>'>发表评论</a></div>
                            <div style="border:solid 1px #999; width:100px; height:20px; float:left; text-align:center; line-height:20px; margin-left:5px;"><a href='<%=webSite %>PTReview-<%=newProduct.NewProductID%>-2.<%=config.html %>'>查看所有评论</a></div>
                    	    <div class="clear"></div>
                        </div>
                        <!--用户评论结束-->
                    </div>
	            </div>
		    </div>
	    </div>
	    <uc1:Helper id="Helper1" runat="server"></uc1:Helper>
	    <uc1:Footer id="Footer1" runat="server"></uc1:Footer>
	</body>
</HTML>
