<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="tuanmore.aspx.cs" Inherits="Maticsoft.Web.UserControls.tuanmore" %>

<%@ Register src="~/UserControls/CFooterControl.ascx" tagname="CFooterControl" tagprefix="uc1" %>
<%@ Register src="~/UserControls/CHeaderControl.ascx" tagname="CHeaderControl" tagprefix="uc2" %>
<%@ Register src="blockothers.ascx" tagname="blockothers" tagprefix="uc4" %>
<%@ Register src="blockinvite.ascx" tagname="blockinvite" tagprefix="uc5" %>
<%@ Register src="blockflv.ascx" tagname="blockflv" tagprefix="uc6" %>
<%@ Register src="blockask.ascx" tagname="blockask" tagprefix="uc7" %>
<%@ Register src="blockvote.ascx" tagname="blockvote" tagprefix="uc8" %>
<%@ Register src="blockbusiness.ascx" tagname="blockbusiness" tagprefix="uc9" %>
<%@ Register src="blocksubscribe.ascx" tagname="blocksubscribe" tagprefix="uc10" %>
<%@ Register src="blockbulletin.ascx" tagname="blockbulletin" tagprefix="uc11" %>
<%@ Register src="blockshare.ascx" tagname="blockshare" tagprefix="uc3" %>
<%@ Register src="uc_Location.ascx" tagname="uc_Location" tagprefix="uc12" %>


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title></title>

</head>  
<body>
<form id="form1" runat="server">
<div id="pagemasker"></div><div id="dialog"></div>
<div id="doc">



    



<uc2:CHeaderControl ID="CHeaderControl1" runat="server" />


<div id="bdw" class="bdw">
<div id="bd" class="cf">


<div class="midad">
 <uc12:uc_Location ID="uc_Location1" runat="server"  Location="1"/>
 </div>

<%if(over){ %>
<div id="sysmsg-tip" class="sysmsg-tip-deal-close"><div class="sysmsg-tip-top"></div><div class="sysmsg-tip-content"><div class="deal-close"><div class="focus">抱歉，您来晚了，<br />团购已经结束啦。</div><div id="tip-deal-subscribe-body" class="body"><table><tr><td>不想错过明天的团购？立刻订阅每日最新团购信息：&nbsp;</td><td><input type="text" name="sub_email" class="f-text" value="" group="a" require="true" datatype="email" /></td><td>&nbsp;<input  group="a" type="submit" class="validator commit" value="订阅" action="/subscribe.aspx" /></td></tr></table></div></div><span id="sysmsg-tip-close" class="sysmsg-tip-close">关闭</span></div><div class="sysmsg-tip-bottom"></div></div>
<%} %>

<%if (order.Count > 0)
  {
      if (CurrentTeam.Farefree == 0 || CurrentTeam.Delivery == "coupon")
      {
      %>
<div id="sysmsg-tip" >
<div class="sysmsg-tip-top"></div>
<div class="sysmsg-tip-content">您已经下过订单，但还没有付款。<a href="/order/check.aspx?orderid=<%=order["id"] %>">查看订单并付款</a>
<span id="sysmsg-tip-close" class="sysmsg-tip-close">关闭</span></div>
<div class="sysmsg-tip-bottom"></div></div>

<div id="deal-default"> 
<%}
  }%>

	<div id="deal-default">
<uc3:blockshare ID="blockshare1" runat="server" />
       


		<div id="content">
		  <div id="deal-intro" class="cf">
                                <h1>
                                   
                                   <a class="deal-today-link" href="../team.aspx?id=<%=team["id"] %>"><%=strtitle %>：</a><a class="deal-today-link-xx" href="../team.aspx?id=<%=team["id"] %>"><%=team["title"]%></a>
                                        
                                        
                                        </h1>
                                <div class="main">
                                    <div class="deal-buy">
                                        <div class="deal-price-tag">
                                        </div>
                                        <%if (state == Maticsoft.Web.TeamState.successnobuy)
                                          { %>
                                        <p class="deal-price">
                                            <strong>
                                                <%=ASSystemArr["currency"] %><%=GetMoney(team["team_price"]) %></strong><span class="deal-price-over"></span></p>
                                        <%}
                                          else if (over)
                                          { %>
                                        <p class="deal-price">
                                            <strong>
                                                <%=ASSystemArr["Currency"] %><%=GetMoney(team["team_price"]) %></strong><span class="deal-price-end"></span></p>
                                        <%}
                                          else
                                          {%>
                                        <p class="deal-price">
                                            <strong>
                                                <%=ASSystemArr["Currency"]%><%=GetMoney(team["team_price"])%></strong>
                                            <%--  <span class="deal-price-expire">--%>
                                            <%if (CurrentTeam.Begin_time <= DateTime.Now)
                                              {
                      
                                            %>
                                            <%--     <a href="<%=buyurl %>"> <img src="<%=ImagePath() %>button-deal-buy.gif" /></a></span></p>--%>
                                            <a href="../ajax/car.aspx?id=<%=team["id"] %>"><span class="deal-price-buy"></span></a>
                                            <% }
                                              else
                                              {%>
                                            <a href="#"></a>
                                            <% }%>
                                            <%--         </span>--%>
                                        </p>
                                        <% } %>
                                    </div>
                                    <table class="deal-discount">
                                        <tr>
                                            <th>
                                                原价
                                            </th>
                                            <th>
                                                折扣
                                            </th>
                                            <th>
                                                节省
                                            </th>
                                        </tr>
                                        <tr>
                                            <td>
                                                <%=ASSystemArr["Currency"] %><%=GetMoney(team["Market_price"])%>
                                            </td>
                                            <td>
                                                <%=Utils.WebSiteHelper.GetDiscount(Utils.Helper.GetDecimal(team["Market_price"],0),Utils.Helper.GetDecimal(team["Team_price"],0)) %>
                                            </td>
                                            <td>
                                                <%=ASSystemArr["Currency"] %><%=GetMoney((Utils.Helper.GetDecimal(team["Market_price"], 0) - Utils.Helper.GetDecimal(team["Team_price"], 0)).ToString())%>
                                            </td>
                                        </tr>
                                    </table>
                                    <%if (over)
                                      { %>
                                    <div class="deal-box deal-timeleft deal-off" id="deal-timeleft" curtime="<%=curtimefix %>"
                                        diff="<%=difftimefix %>">
                                        <h3>
                                            本团购结束于</h3>
                                        <div class="limitdate">
                                            <p class="deal-buy-ended">
                                                <%=overtime.ToString("yyyy-MM-dd HH:mm:ss")%><br />
                                            </p>
                                        </div>
                                    </div>
                                    <%}
                                      else
                                      { %>
                                    <div class="deal-box deal-timeleft deal-on" id="deal-timeleft" curtime="<%=curtimefix %>"
                                        diff="<%=difftimefix %>">
                                        <h3>
                                            剩余时间</h3>
                                        <div class="limitdate">
                                            <ul id="counter">
                                                <%if ((CurrentTeam.End_time - DateTime.Now).Days > 0)
                                                  { %>
                                                <li><span>
                                                    <%=(CurrentTeam.End_time-DateTime.Now).Days %></span>天</li><li><span>
                                                        <%=(CurrentTeam.End_time-DateTime.Now).Hours %></span>小时</li><li><span>
                                                            <%=(CurrentTeam.End_time-DateTime.Now).Minutes %></span>分钟</li>
                                                <%}
                                                  else
                                                  { %>
                                                <li><span>
                                                    <%=(CurrentTeam.End_time-DateTime.Now).Hours %></span>小时</li><li><span>
                                                        <%=(CurrentTeam.End_time-DateTime.Now).Minutes %></span>分钟</li><li><span>
                                                            <%=(CurrentTeam.End_time-DateTime.Now).Seconds %></span>秒</li>
                                                <%} %>
                                            </ul>
                                        </div>
                                    </div>
                                    <%} %>
                                    <%if (!over)
                                      { %>
                                    <%if (state == Maticsoft.Web.TeamState.begin)
                                      { %>
                                    <div class="deal-box deal-status" id="deal-status">
                                        <p class="deal-buy-tip-top">
                                            <strong>
                                                <%=team["Now_number"]%></strong> 人已购买</p>
                                        <div class="progress-pointer" style="padding-left: <%=(size-offset)%>px;">
                                            <span></span>
                                        </div>
                                        <div class="progress-bar">
                                            <div class="progress-left" style="width: <%=(size-offset)%>px;">
                                            </div>
                                            <div class="progress-right ">
                                            </div>
                                        </div>
                                        <div class="cf">
                                            <div class="min">
                                                0</div>
                                            <div class="max">
                                                <%=team["Min_number"] %></div>
                                        </div>
                                        <%if (CurrentTeam.Max_number > 0)
                                          { %>
                                        <p class="deal-buy-tip-btm">
                                            还差 <strong>
                                                <%= (CurrentTeam.Min_number-CurrentTeam.Now_number) %></strong> 人到达最低团购人数</p>
                                        <%} %>
                                    </div>
                                    <%}
                                      else if (state == Maticsoft.Web.TeamState.successbuy)
                                      { %>
                                    <div class="deal-box deal-status deal-status-open" id="deal-status">
                                        <p class="deal-buy-tip-top">
                                            <strong>
                                                <%=CurrentTeam.Now_number %></strong> 人已购买</p>
                                        <%if (CurrentTeam.Max_number > 0 && CurrentTeam.Max_number > CurrentTeam.Now_number)
                                          { %>
                                        <p class="deal-buy-tip-btm">
                                            本单仅剩：<strong><%=CurrentTeam.Max_number-CurrentTeam.Now_number %></strong>份，欲购从速</p>
                                        <%} %>
                                        <%if (CurrentTeam.Now_number >= CurrentTeam.Min_number)
                                          { %>
                                        <p class="deal-buy-on" style="line-height: 200%;">
                                            <img src="<%=ImagePath() %>deal-buy-succ.gif" />
                                            团购成功！
                                            <% }%>
                                            <%if ((CurrentTeam.Max_number == 0) || (CurrentTeam.Max_number - CurrentTeam.Now_number) > 0)
                                              { %><br />
                                            还可以继续购买<%} %></p>
                                        <%if (CurrentTeam.Reach_time.HasValue)
                                          { %>
                                        <p class="deal-buy-tip-btm">
                                            <%=CurrentTeam.Reach_time.Value.ToString("MM-dd HH:mm") %><br />达到最低团购人数：<strong><%=CurrentTeam.Min_number %></strong>人</p>
                                        <%} %>
                                    </div>
                                    <%} %>
                                    <%}
                                      else
                                      { %>
                                    <div class="deal-box deal-status deal-status-<%=teamstatestring %>" id="deal-status">
                                        <div class="deal-buy-<%=teamstatestring %>">
                                        </div>
                                        <p class="deal-buy-tip-total">
                                            共有 <strong>
                                                <%=team["Now_number"] %></strong> 人购买</p>
                                    </div>
                                    <%} %>
                                </div>
                                <div class="side">
                                    <div class="deal-buy-cover-img" id="team_images">
                                                           <div id="zk">
                           <p><span class="zk"><%=Utils.WebSiteHelper.GetDiscount(Utils.Helper.GetDecimal(team["Market_price"], 0), Utils.Helper.GetDecimal(team["Team_price"], 0)).Replace("折", "")%></span></p>
                       </div>
                                        <%if (team["image1"] != String.Empty || team["image2"] != String.Empty)
                                          { %>
                                        <div class="mid">
                                            <ul>
                                                <li class="first">
                                                    <a href="/team.aspx?id=<%=team["id"] %>" target=_blank><img src="<%=team["image"] %>" /></a></li>
                                                <%if (team["image1"] != String.Empty)
                                                  { %>
                                                <li>
                                                    <a href="/team.aspx?id=<%=team["id"] %>" target=_blank><img src="<%=team["image1"] %>" /></a></li>
                                                <%} %>
                                                <%if (team["image2"] != String.Empty)
                                                  { %>
                                                <li>
                                                    <a href="/team.aspx?id=<%=team["id"] %>" target=_blank><img src="<%=team["image2"] %>" /></a></li>
                                                <%} %>
                                            </ul>
                                            <div id="img_list">
                                                <a ref="1" class="active">1</a>
                                                <%if (team["image1"] != String.Empty)
                                                  { %>
                                                <a ref="<%=imageindex %>">
                                                    <%=imageindex %></a>
                                                <%imageindex = imageindex + 1;
                                                  } %>
                                                <%if (team["image2"] != String.Empty)
                                                  { %>
                                                <a ref="<%=imageindex %>">
                                                    <%=imageindex%></a>
                                                <%} %>
                                            </div>
                                        </div>
                                        <%}
                                          else
                                          { 
                                        %>
                                        <img src="<%=team["image"] %>" width="440" height="280" />
                                        <%} %>
                                    </div>
                                    <div class="digest">
                                        <br />
                                        <%=team["Summary"] %></div>
                                </div>
                            </div>
            <!--开始代码-->
            <div class="cf" id="deal-stuff">
               <div class="clear box">
                  <div class="box-content cf"> 
                   <div id="qttg_bt"></div>
           <%--  <img src="../upfile/css/i/qttg_bt.png" />--%>
                   <!--循环开始-->
                     <div id="left_kj">
                  
                   <%foreach (Maticsoft.Model.Team model in otherteams)
                     { %>
                  
<div class="cp_content">
  <div class="cp_img"><a href="../team.aspx?id=<%=model.Id %>" target=_blank><img src="<%=model.Image %>" width="267" height="166" border="0"/></a></div>
  <div class="cp_xq">   
    <div class="duotuan_bt"><a href="../team.aspx?id=<%=model.Id %>" target=_blank><%=type(model) %>:<font style=" font-weight:bold; color:Black;"><%=model.Title %></font></a></div>
    
    <div class="duotuan_hb"><%=ASSystemArr["Currency"] %></div><div class="duotuan_jg"><%=model.Team_price %></div>
    <div class="price">
      原价：<%=ASSystemArr["Currency"] %><%=GetMoney(model.Market_price)%> <br/>折扣：<%=ASSystemArr["Currency"] %><%=Utils.WebSiteHelper.GetDiscount(Utils.Helper.GetDecimal(model.Market_price,0),Utils.Helper.GetDecimal(model.Team_price,0))%>  <br/>节省：<%=ASSystemArr["Currency"] %><%=GetMoney((Utils.Helper.GetDecimal(model.Market_price, 0) - Utils.Helper.GetDecimal(model.Team_price, 0)).ToString())%>
      </div>
    <div class="goumai">
  <%-- <div  style="height: 60px;width: 350px;float: left;">--%>
      <div class="goumai_order">
      

      <a href="../team.aspx?id=<%=model.Id %>" target=_blank><img  src="<%=ImagePath() %>order_bt.png" width="145" height="39" border="0px;" /></a>
 
      </div>
      <div class="goumai_rs">已有<span style= "font-size:15px; color:#ff0000;"><%=model.Now_number%> </span> 人购买</div>

  



      </div>
    </div>
</div>

<% }%>





<!--循环结束-->
</div>
                   
                </div>
                <!--结束代码-->

            </div>
    </div>
    </div>
    <div id="sidebar">

<%--<uc12:uc_Location ID="uc_Location2"  Location="2" runat="server" />--%>
<%--<div class="sbox side-business">
	
	<div class="sbox-content">--%>
	<%--	    <div class="tip">--%>
<%=Maticsoft.BLL.Location.Getimg() %>
<%--</div>--%>

<%--</div></div>--%>
<uc5:blockinvite ID="blockinvite1" runat="server" />
<uc11:blockbulletin ID="blockbulletin1" runat="server" />


<uc6:blockflv ID="blockflv1" runat="server" />

<uc7:blockask ID="blockask1" runat="server" />



<uc8:blockvote ID="blockvote1" runat="server" />


<uc9:blockbusiness ID="blockbusiness1" runat="server" />
    

<uc10:blocksubscribe ID="blocksubscribe1" runat="server" />
 
</div>
</div>
</div> <!-- bd end -->
</div> 




<!-- bdw end -->
</div>


<uc1:CFooterControl ID="CFooterControl1" runat="server" />


</div>
</form>

</body>
</html>