<%@ page language="C#" autoeventwireup="true" inherits="tuan_2_index, ZKCMS" enableviewstatemac="false" enableEventValidation="false" viewStateEncryptionMode="Never" %>
<%@ Register Src="~/tuan/2/head.ascx" TagName="head" TagPrefix="UC" %>
<%@ Register Src="~/tuan/2/side.ascx" TagName="side" TagPrefix="UC" %>
<%@ Register Src="~/tuan/2/foot.ascx" TagName="foot" TagPrefix="UC" %>
<!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>
    <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
    <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
    <title><%=ZK.config("title","tuan") %></title>
    <meta name="keywords" content=" <%=ZK.config("keywords","tuan") %>" />
    <meta name="description" content=" <%=ZK.config("description","tuan") %>" />
    <link href="/tuan/<%=ZK.config("tuantemplate", "tuan")  %>/skin/style.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="/s/skin/base.js"></script>
    <script type="text/javascript" src="/tuan/<%=ZK.config("tuantemplate", "tuan")  %>/skin/public.js"></script>
</head>
<body>
    <div class="wrap">
    <UC:head ID="head1" runat="server" />
        <div class="box">            
            <div class="mainside">
                <div class="mainbox">
                    <asp:Panel ID="Panel1" runat="server" Visible="false">
                        <div class="c1">
                            <div class="m1"></div>
                            <div class="v1"><div style="height: 471px"><div style="padding-top:150px;"><div class="tip_nodata_">还没有团购活动！</div></div></div></div>
                            <div class="n1"></div>
                        </div>
                    </asp:Panel>
                    <asp:Repeater ID="Repeater1" runat="server">
                        <ItemTemplate>
                            <div class="c1">
                                <div class="m1"></div>
                                <div class="v1">
                                    <div class="x1">
                                        <div class="con1"><span><%#Eval("slogan1")%></span><a href="<%#Eval("id")%>.htm"><%#Eval("fulltitle")%></a></div>
                                        <div class="con2">
                                            <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                                <tr valign="top">
                                                    <td>
                                                        <div class="son2">
                                                            <div class="buyhref"><a href="buy.aspx?id=<%#Eval("id")%>"><img alt="" src="/tuan/2/skin/none.gif" /></a></div>
                                                            <div class="PriceBar">
                                                                <div class="hto">
                                                                    <div class="fl">¥<%#Convert.ToDouble(Eval("tuanprice").ToString()).ToString("#.##")%></div>
                                                                    <div class="fr"></div>
                                                                    <div class="clear"></div>
                                                                </div>
                                                            </div>
                                                            <div class="PriceRatio">
                                                                <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                                                    <tr>
                                                                        <th>原价</th>
                                                                        <th>折扣</th>
                                                                        <th>节省</th>
                                                                    </tr>
                                                                    <tr>
                                                                        <td>¥<%#Convert.ToDouble(Eval("oldprice").ToString()).ToString("#.##")%></td>
                                                                        <td><%#WMcompare.IsEqual((ZK.DoubleDiscount(Eval("tuanprice").ToString(), Eval("oldprice").ToString()) * 10).ToString("#.#"),".1","-")%></td>
                                                                        <td>¥<%#ZK.DoubleSubtract(Eval("oldprice").ToString(), Eval("tuanprice").ToString()).ToString()%></td>
                                                                    </tr>
                                                                </table>
                                                            </div>
                                                            <div class="countdown">
                                                                <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                                                    <tr valign="top">
                                                                        <td>
                                                                            <strong>剩余时间：</strong><br />
                                                                            <span><strong id="d<%#Eval("id")%>">0</strong> 天 <strong id="h<%#Eval("id")%>">0</strong> 时 <strong id="m<%#Eval("id")%>">0</strong> 分 <strong id="s<%#Eval("id")%>">0</strong> 秒</span>
                                                                            <script type="text/javascript">
                                                                                tms[tms.length] = "<%#(Convert.ToInt64(WMtime.DateDiff(DateTime.Now, Convert.ToDateTime(Eval("endtime").ToString())).TotalSeconds) * 1000).ToString()%>";
                                                                                day[day.length] = "d<%#Eval("id")%>";
                                                                                hour[hour.length] = "h<%#Eval("id")%>";
                                                                                minute[minute.length] = "m<%#Eval("id")%>";
                                                                                second[second.length] = "s<%#Eval("id")%>";
                                                                            </script>
                                                                        </td>
                                                                        <td width="45"><div></div></td>
                                                                    </tr>
                                                                </table>
                                                            </div>
                                                            <div class="buytotal">
                                                                <table border="0" cellspacing="0" cellpadding="0" class="wto">
                                                                    <tr>
                                                                        <td>
                                                                            <strong id="id<%#Eval("id")%>_buy"><%#WM.DoCount("tuan_buy", "where fid=" + Eval("id").ToString() + " and (state='已付款' or state='已消费')")%></strong>
                                                                        </td>
                                                                        <td>
                                                                            <div style="padding: 2px 0 0 5px">人已购买</div>
                                                                        </td>
                                                                    </tr>
                                                                </table>
                                                            </div>
                                                            <div class="tgslogan"><%#Eval("slogan2")%></div>
                                                            <div class="tgstate">
                                                                <div class="chil1" id="id<%#Eval("id")%>_tgstate1">团购已成功</div>
                                                                <div class="chil2" id="id<%#Eval("id")%>_tgstate2">还可以继续购买…</div>
                                                                <div class="chil3"><%#WMcompare.IsEqual(Eval("lowesttime").ToString(), "", "还未",  WMtime.FormatDateTime_(Eval("lowesttime").ToString(), "MM-dd HH:mm") + "&nbsp;")%>达到最低团购人数<span id="id<%#Eval("id")%>_lowestbuy"><%#Eval("lowestbuy")%></span>人</div>
                                                                <script type="text/javascript">TgState("<%#Eval("id")%>");</script>
                                                            </div>
                                                        </div>
                                                    </td>
                                                    <td width="450">
                                                        <div class="son1"><a href="<%#Eval("id")%>.htm"><img alt="" src="<%#ZK.getProportionImage(WMcompare.IsEmpty(Eval("thumbnail").ToString(),"/skin/public/gg/tuan_temp_0.jpg"),"",446,"",396)%>" /></a></div>
                                                    </td>
                                                </tr>
                                            </table>
                                        </div>
                                        <%#WMcompare.IsEqual(Eval("tuannote").ToString().Trim(), "", "", "<div class=\"con3\"><div>" + WM.cut(Eval("tuannote").ToString().Trim(), 162, "…") + "</div></div>")%>
                                    </div>
                                </div>
                                <div class="n1"></div>
                            </div>
                        </ItemTemplate>
                    </asp:Repeater>
                </div>
                <UC:side ID="side1" runat="server" />
                <div class="clear"></div>
            </div>
        </div>
        <UC:foot ID="foot1" runat="server" />
    </div>
</body>
</html>
