<%@ page language="C#" autoeventwireup="true" inherits="tuan_2_all, ZKCMS" enableviewstatemac="false" enableEventValidation="false" viewStateEncryptionMode="Never" %>
<%@ Register Src="~/tuan/2/head.ascx" TagName="head" 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><asp:Literal ID="PageTitle" runat="server" Text="全部团购"></asp:Literal>_<%=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">            
            <script type="text/javascript">document.getElementById("homemenu").className="";document.getElementById("allmenu").className="on";</script>
            <div class="mainside">
                <div class="c1">
                    <div class="m1" style="background-image: url(/tuan/2/skin/mainbox_top_.gif)"></div>
                    <div class="v1" style="background-image: url(/tuan/2/skin/mainbox_bg_.gif)">
                        <%@ register assembly="Pager" namespace="Wuqi.Webdiyer" tagprefix="DataPager" %>
                        <asp:Panel ID="Panel_Nodata" runat="server" Visible="false"><div class="tip_nodata" id="tip_nodata"><asp:Literal ID="Literal1" runat="server"></asp:Literal>暂无团购！</div></asp:Panel>
                        <asp:Panel ID="Panel_TurnCopy" runat="server" style="padding-right:15px">
                            <table border="0" cellspacing="0" cellpadding="0" width="100%">
                                <tr>
                                    <td>&nbsp;</td>
                                    <td class="ar">
                                        <table border="0" cellspacing="0" cellpadding="0" align="right">
                                            <tr>
                                                <td>
                                                    <DataPager:AspNetPager ID="Pager2" runat="server" CloneFrom="Pager1" OnPageChanged="Pager1_PageChanged"
                                                        UrlPagingTarget="_self" PageSize="2" UrlPaging="true" FirstPageText="最前页" PrevPageText="上一页"
                                                        NextPageText="下一页" LastPageText="最后页" PagingButtonSpacing="0" CssClass="turn"
                                                        CurrentPageButtonClass="turn_on" SubmitButtonClass="pager_but" PageIndexBoxClass="pager_inp"
                                                        SubmitButtonText="转到" ShowPageIndexBox="Auto" ShowBoxThreshold="0" ShowDisabledButtons="false"
                                                        NumericButtonCount="6" FirstLastButtonsClass="turn_flpn" PrevNextButtonsClass="turn_flpn">
                                                    </DataPager:AspNetPager>
                                                </td>
                                            </tr>
                                        </table>
                                        <div class="clear" style="height: 7px"></div>
                                    </td>
                                </tr>
                            </table>
                        </asp:Panel>
                        <asp:Panel ID="Panel_List" runat="server" CssClass="list1">
                            <asp:Repeater ID="Repeater1" runat="server">
                                <HeaderTemplate><ul></HeaderTemplate>
                                <ItemTemplate>
                                    <li>
                                        <div class="con1"><a href="/tuan/<%#Eval("id") %>.htm" target="_blank"><%#Eval("shorttitle") %></a></div>
                                        <div class="con2"><a href="<%#Eval("id")%>.htm"><img alt="" src="<%#ZK.getProportionImage(WMcompare.IsEmpty(Eval("thumbnail").ToString(),"/skin/public/gg/tuan_temp_0.jpg"),"",279,"",248)%>" /></a></div>
                                        <div class="con3">
                                            <table border="0" cellpadding="0" cellspacing="0" width="100%">
                                                <tr>
                                                    <td><strong>￥</strong><span><%#Convert.ToDouble(Eval("tuanprice").ToString()).ToString("#.##")%></span></td>
                                                    <td width="110"><div class="ar son1"><%#get1(Eval("oldprice").ToString())%><%#WMcompare.IsEqual((ZK.DoubleDiscount(Eval("tuanprice").ToString(), Eval("oldprice").ToString()) * 10).ToString("#.#"),".1","- ")%>折</div></td>
                                                    <td width="105"><div class="ar"><%#get2(Eval("endtime").ToString(), Eval("id").ToString())%></div></td>
                                                </tr>
                                            </table>
                                        </div>
                                        <div class="con4">
                                            <table border="0" cellpadding="0" cellspacing="0" width="100%">
                                                <tr>
                                                    <td>
                                                       <div id="TuanCountdown<%#Eval("id")%>">剩余：<span id="d<%#Eval("id")%>">0</span> 天 <span id="h<%#Eval("id")%>">0</span> 时 <span id="m<%#Eval("id")%>">0</span> 分 <span id="s<%#Eval("id")%>">0</span> 秒</div>
                                                        <script type="text/javascript">
                                                            if(document.getElementById("BuyImgBtn<%#Eval("id")%>").src.indexOf("buy_small_btn_over.gif")!=-1)
                                                            {
                                                                document.getElementById("TuanCountdown<%#Eval("id")%>").innerHTML="本次团购活动已经结束！";
                                                            }
                                                            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><div class="ar"><%#WM.DoCount("tuan_buy", "where fid=" + Eval("id").ToString() + " and (state='已付款' or state='已消费')")%>人已购买</div></td>
                                                </tr>
                                            </table>
                                        </div>
                                    </li>
                                </ItemTemplate>
                                <FooterTemplate></ul><div class="clear"></div></FooterTemplate>
                            </asp:Repeater>
                        </asp:Panel>
                        <asp:Panel ID="Panel_Turn" runat="server" style="padding-right:15px">
                            <table border="0" cellspacing="0" cellpadding="0" width="100%">
                                <tr>
                                    <td>&nbsp;</td>
                                    <td class="ar">
                                        <table border="0" cellspacing="0" cellpadding="0" align="right">
                                            <tr>
                                                <td>
                                                    <DataPager:AspNetPager ID="Pager1" runat="server" OnPageChanged="Pager1_PageChanged"
                                                        UrlPagingTarget="_self" PageSize="15" UrlPaging="true" FirstPageText="最前页" PrevPageText="上一页"
                                                        NextPageText="下一页" LastPageText="最后页" PagingButtonSpacing="0" CssClass="turn"
                                                        CurrentPageButtonClass="turn_on" SubmitButtonClass="pager_but" PageIndexBoxClass="pager_inp"
                                                        SubmitButtonText="转到" ShowPageIndexBox="Auto" ShowBoxThreshold="0" ShowDisabledButtons="false"
                                                        NumericButtonCount="6" FirstLastButtonsClass="turn_flpn" PrevNextButtonsClass="turn_flpn">
                                                    </DataPager:AspNetPager>
                                                </td>
                                            </tr>
                                        </table>
                                        <div class="clear" style="height: 7px"></div>
                                    </td>
                                </tr>
                            </table>
                        </asp:Panel>
                        <asp:Literal ID="Literal_Turn_Space" runat="server"><div class="flow" style="height:7px"></div></asp:Literal>
                    </div>
                    <div class="n1" style="background-image: url(/tuan/2/skin/mainbox_bottom_.gif)">
                    </div>
                </div>
            </div>
        </div>
        <UC:foot ID="foot1" runat="server" />
    </div>
</body>
</html>
