<%@ Page language="c#" Codebehind="Show.aspx.cs" AutoEventWireup="false" Inherits="wqeshop.Show" %>
<%@ 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="LoginForm" Src="Modules/LoginForm.ascx" %>
<%@ Register TagPrefix="uc1" TagName="SmallCart" Src="Modules/SmallCart.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><%=product.Name%>-<%=config.SiteTitle%></title>
</head>
<body id="MenuM2">
<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("Details")%></div>
  </div>
  <!--当前位置结束-->
  <div id="middle">
    <div class="middlel">
      <!--购物车开始-->
      <uc1:SmallCart id="SmallCart1" runat="server"></uc1:SmallCart>
      <!--购物车结束-->
      <!--类别导航开始-->
      <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("Details")%></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"><img src="/<%=System.Configuration.ConfigurationSettings.AppSettings["ShopFolder"]%>images/items.gif" border="0" align="absMiddle"><%=product.Name%></td>
                    </tr>
                    <tr>
                      <td class="hr" colspan="2"></td>
                    </tr>
                    <tr>
                      <td valign="top" width="160" align="left"><a href='/<%=System.Configuration.ConfigurationSettings.AppSettings["ShopFolder"]%><%=config.Path%>upload/<%=product.ProductImg%>' target=_blank><img src='/<%=System.Configuration.ConfigurationSettings.AppSettings["ShopFolder"]%><%=config.Path%>upload/<%=product.ProductImg%>' class="simg"></a> </td>
                      <td align="left" valign="top"><form name="pDetails" action='/<%=System.Configuration.ConfigurationSettings.AppSettings["ShopFolder"]%>shoppingcart.aspx?pid=<%=product.ProductID%>' method=post target="cart" onSubmit="window.open('','cart','width=700,height=650,scrollbars=yes,top=0,left=0')">
                          <table align="left" width="380" cellpadding="0" cellspacing="4" border="0">
                            <tr>
                              <td width="75"><%=GetResourceString("ProductName")%>: </td>
                              <td><%=product.Name%></td>
                              <td width="75"><%=GetResourceString("ProductBrand")%>: </td>
                              <td><%=product.Brand%></td>
                            </tr>
                            <tr>
                              <td width="75"><%=GetResourceString("ProductProductNo")%>: </td>
                              <td><%=product.ProductNo%></td>
                              <td width="75"><%=GetResourceString("ProductShortDesc")%>: </td>
                              <td><%=product.ShortDesc%></td>
                            </tr>
                            <tr>
                              <td width="75"><%=GetResourceString("ProductMin")%>: </td>
                              <td><%=product.Min%></td>
                              <td width="75"><%=GetResourceString("ProductStorage")%>: </td>
                              <td><%=product.Storage%></td>
                            </tr>
                            <tr>
                              <td width="75"><%=GetResourceString("ProductUnit")%>: </td>
                              <td><%=product.Unit%></td>
                              <td width="75"><%=GetResourceString("ProductRating")%>: </td>
                              <td><%=GetRating()%></td>
                            </tr>
                            <% if(wqeshop.WebUtils.MemberShowPrice()) {%>
                            <tr>
                              <td width="75"><%=GetResourceString("MarketPrice")%>: </td>
                              <td><%=string.Format("{0:c}",product.MarketPrice)%></td>
                              <td width="75"><%=GetResourceString("MemberPrice")%>: </td>
                              <td><%=string.Format("{0:c}",product.MemberPrice)%></td>
                            </tr>
                            <% }%>
                            
                            <% if(config.MarkUnit == 1) {%>
                            <tr>
                              <td width="75"><%=GetResourceString("Credit")%>: </td>
                              <td><%=product.Score%></td>
                            </tr>
                            <% }%>
                            <tr>
                              <td width="75"><%=GetResourceString("ProductHits")%>：</td>
                              <td><%=product.Hits%></td>
                              <td width="75"><%=GetResourceString("ProductWeight")%>：</td>
                              <td><%=product.Weight%></td>
                            </tr>
                            <tr>
                              <td width="75"><%=GetResourceString("RelatedProducts")%>: </td>
                              <td><%BindRelatedProducts();%>
                                <asp:Repeater ID="rptRelatedProducts" Runat=server>
                                  <ItemTemplate> <a href='/<%=System.Configuration.ConfigurationSettings.AppSettings["ShopFolder"]%><%if(config.html==""){%>Show.aspx?PID=<%# DataBinder.Eval(Container.DataItem,"ProductID")%><%}else{%>products/Product_<%# DataBinder.Eval(Container.DataItem,"ProductID") %>.<%=config.html%><%}%>'><%#DataBinder.Eval(Container.DataItem,"Name")%>(<%#DataBinder.Eval(Container.DataItem,"ProductNo")%>)-<%#DataBinder.Eval(Container.DataItem,"MemberPrice","{0:c}")%>元<br />
                                    </a> </ItemTemplate>
                                </asp:Repeater>
                              </td>
                            </tr>
                            <asp:Repeater ID="rptCuetomFields" Runat="server">
                              <ItemTemplate>
                                <tr>
                                  <td width="75"><%# DataBinder.Eval(Container.DataItem, "FieldName") %></td>
                                  <td valign="top"><table width="100%" cellpadding="0" cellspacing="0" border="0">
                                      <asp:Repeater ID="rptFieldItems" Runat="server" DataSource='<%# GetFieldItems(DataBinder.Eval(Container.DataItem, "ProductCustomFieldID").ToString()) %>'>
                                        <ItemTemplate>
                                          <tr>
                                            <td valign="top"><input id="cbxMultiple" type='<%# GetButtonType(DataBinder.Eval(Container.DataItem, "FieldID").ToString()) %>' value='<%# DataBinder.Eval(Container.DataItem, "CustomFieldItemID") %>' name='Field<%# DataBinder.Eval(Container.DataItem, "FieldID") %>' <%# DataBinder.Eval(Container.DataItem, "Selected").ToString() == "1" ? "checked" : "" %>>
                                              <%# DataBinder.Eval(Container.DataItem, "ItemName") %> <%# DataBinder.Eval(Container.DataItem, "Price").ToString() != "0" ? "( 加收 " + DataBinder.Eval(Container.DataItem, "Price") + " 元)" : "" %></td>
                                          </tr>
                                        </ItemTemplate>
                                      </asp:Repeater>
                                    </table></td>
                                </tr>
                              </ItemTemplate>
                            </asp:Repeater>
                            <tr>
                              <td colspan="2" align="center"><input type="submit" value="<%=GetResourceString("Buy")%>" class="shown1" />
                                <%-- onclick='addtocart(0)'>--%>
                                <input type="button" value="<%=GetResourceString("AddToFavourite")%>" onclick="<%if(config.html==""){%>gotoUrl('/<%=System.Configuration.ConfigurationSettings.AppSettings["ShopFolder"]%>Actions.aspx?action=Favorite&ProductID=<%=product.ProductID%>&ReturnUrl=<%=Request.Url%>')<%}else{%>gotoUrl('/<%=System.Configuration.ConfigurationSettings.AppSettings["ShopFolder"]%>Actions.aspx?action=Favorite&ProductID=<%=product.ProductID%>&ReturnUrl=products/Product_<%=product.ProductID%>.html')<%}%>"  class="shown2" />
                                <input type="button" value="<%=GetResourceString("recommend1")%>" onclick="javascript:window.clipboardData.setData('Text','<%=GetResourceString("recommend2")%><%=product.Name%> \n\n'+document.location.href);alert('<%=GetResourceString("recommend3")%>')"  class="shown3" />
                              </td>
                            </tr>
                          </table>
                        </form></td>
                    </tr>
                    <tr>
                      <td colspan="2"><img src="/<%=System.Configuration.ConfigurationSettings.AppSettings["ShopFolder"]%>images/items.gif" border="0" align="absMiddle"><%=GetResourceString("RelatedImages")%></td>
                    </tr>
                    <tr>
                      <td class="hr" colspan="2"></td>
                    </tr>
                    <tr>
                      <td colspan="2"><%BindRelatedImgs();%>
                        <asp:DataList ID="dlRelatedImgs" RepeatColumns="6" Runat=server>
                          <ItemTemplate> <a href="/<%=System.Configuration.ConfigurationSettings.AppSettings["ShopFolder"]%>upload/relatedImgs/<%# DataBinder.Eval(Container.DataItem, "img") %>" target=_blank><img src="/<%=System.Configuration.ConfigurationSettings.AppSettings["ShopFolder"]%>upload/relatedImgs/<%# DataBinder.Eval(Container.DataItem, "img") %>" class="chnsimg"></a> </ItemTemplate>
                        </asp:DataList>
                      </td>
                    </tr>
                    <tr>
                      <td colspan="2"><img src="/<%=System.Configuration.ConfigurationSettings.AppSettings["ShopFolder"]%>images/items.gif" border="0"
																align="absMiddle"><%=GetResourceString("Details")%> </td>
                    </tr>
                    <tr>
                      <td class="hr" colspan="2"></td>
                    </tr>
                    <tr>
                      <td colspan="2"><%=product.Description%> </td>
                    </tr>
                    <% if(product.CanReview){%>
                    <tr>
                      <td class="hr" colspan="2"></td>
                    </tr>
                    <tr>
                      <td colspan="2"><img src="/<%=System.Configuration.ConfigurationSettings.AppSettings["ShopFolder"]%>images/items.gif" border="0"
																align="absMiddle"><%=GetResourceString("ProductComment")%> </td>
                    </tr>
                    <tr>
                      <td colspan="2"><table width="95%" cellpadding="1" cellspacing="1" border="0" align="center" bgcolor="#cccccc">
                          <asp:Repeater ID="rptReviews" Runat="server">
                            <ItemTemplate>
                              <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>
                            </ItemTemplate>
                          </asp:Repeater>
                        </table>
                        <form id="reviewForm" action='/<%=System.Configuration.ConfigurationSettings.AppSettings["ShopFolder"]%>Review.aspx?ProductID=<%=product.ProductID%>' 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 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-width:0;background:transparent;"/></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" value="" maxlength="15" size="10"></td>
                            </tr>
                            <tr>
                              <td><%=GetResourceString("ProductRating")%>: </td>
                              <td><select name="ddlPublisher" id="ddlPublisher">
                                  <option value="0"><%=GetResourceString("SelectProductLevel")%></option>
                                  <option value="5">5</option>
                                  <option value="4">4</option>
                                  <option value="3">3</option>
                                  <option value="2">2</option>
                                  <option value="1">1</option>
                                </select>
                                <input type="submit" name="submit" value="<%=GetResourceString("Submit")%>"></td>
                            </tr>
                          </table>
                        </form></td>
                    </tr>
                    <% }%>
                    <tr>
                      <td class="hr" colspan="2"></td>
                    </tr>
                    <tr>
                      <td colspan=2><%=category.ProductAd%></td>
                    </tr>
                  </table>
                  <script type="text/javascript">
						function addtocart(pid)
						{
							if('<%=config.ShopStop%>' == 'True')
							{
								temp=window.open('/<%=System.Configuration.ConfigurationSettings.AppSettings["ShopFolder"]%>ShoppingCart.aspx?pid='+pid,'shopcat','width=700,height=650,scrollbars=yes,top=0,left=0');
								temp.focus();
							}
							else
							{
								alert('<%=config.ShopStopWords%>');
								return false;
							}
						}
						function gotoUrl(url)
						{
							this.location = url;
						}
						function myOpenWindow()
						{
							temp=window.open('/<%=System.Configuration.ConfigurationSettings.AppSettings["ShopFolder"]%>ShoppingCart.aspx','shopcat','width=700,height=650,scrollbars=yes,top=0,left=0');
							temp.focus();
						}
						</script>
                </td>
              </tr>
            </table>
            <table width="100%">
              <tr>
                <td class="hr"></td>
              </tr>
              <tr>
                <td align="center" height="30"><!-- 快速搜索栏 
                <%=GetResourceString("Search")%>:
                <input type="text" name="keyword" class="inputbg" size="20"/>
                <input type="submit" value="<%=GetResourceString("Search")%>" onclick="GoSearch()">
                <script type="text/javascript">
													function GoSearch() 
													{ 
														javascript:window.location.href="/<%=System.Configuration.ConfigurationSettings.AppSettings["ShopFolder"]%>Search.aspx?keyword=" + document.all.keyword.value;
													}
											</script>
                <!-- 搜索栏结束 -->
                </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>
