<%@ page language="C#" autoeventwireup="true" inherits="Advertiser, LebiMall" %>

<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>
<!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>
    <title><%=model_t.Title %>-商家入驻</title>
    <meta name="description" content="<%=model_t.Description %>" />
    <meta name="keywords" content="<%=model_t.Keywords %>" />
    <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
    <meta name="generator" content="LBMall 3.0.0" />
    <link href="images/css/css.css" rel="stylesheet" type="text/css" />
    <link href="images/css/toplz.css" rel="stylesheet" type="text/css" />
    <link href="images/css/index.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="images/js/shopjs.js"></script>
    <script type="text/javascript">
        function Submit(){
            var hidnum = document.getElementById("hidNum").value;
            if(hidnum=="false"){
                document.getElementById("lblmsg").style.visibility="visible";
                return false;
            }
            var form =document.forms[0];
            var r_value="";//选中的r_id
            for(i=0;i<form.elements.length;i++)
            {
                if(form.elements[i].type=="radio")
                {
                    if(form.elements[i].checked==true){
                        r_value=form.elements[i].value;
                    }
                }
            }
            if(r_value!=""){
                window.location.href="UserInfoShop.aspx?id="+r_value;
            }
        }
        function search2(){
            var texts2=document.getElementById("ser2").value;
            var select_v2=document.getElementById("Select3").value;
            window.location="list.aspx?tid="+select_v2+"&titlec="+escape(texts2);
        }
    </script>
</head>
<body>
    <div id="top-menu02">
        <div id="top-menu">
            <div class="right">
                <script type="text/javascript">indexhead();</script>
            </div>
        </div>
    </div>
    <div id="top">
        <div id="logo">
            <a href="http://<%=Request.Url.Host %><%=model_t.WebPath %>/">
                <img src="Upload/WebAdminImages/<%=model_t.Logoimg %>" border="0" /></a></div>
    </div>
    <div id="sp-menu">
        <ul>
            <li><a href="http://<%=Request.Url.Host %><%=model_t.WebPath %>/">首页</a></li>
            <%for (int i = 0; i < ds_tab.Tables[0].Rows.Count; i++){ %>
            <li><%if (model_t.Tab == "1"){ %>
                <a href="<%= ds_tab.Tables[0].Rows[i]["tdirname"]%>/" target="_blank"><%= ds_tab.Tables[0].Rows[i]["tname"]%></a>
                <%}else{%>
                <a href="TopTab.aspx?type=<%= ds_tab.Tables[0].Rows[i]["tdirname"]%>" target="_blank"><%= ds_tab.Tables[0].Rows[i]["tname"]%></a>
                <%} %></li>
            <%} %>
            <li><a href="http://<%=Request.Url.Host %><%=model_t.WebPath %>/News/" target="_blank">资讯</a></li>
        </ul>
        <p>
            <span><a href="ShopCoupon.aspx">优惠券</a></span></p>
    </div>
    <div id="contenter2">
        <div id="contenter">
        <form runat=server id="form1">
            <div class="list-table">
               <table cellpadding=0 cellspacing=0 width=100%>
                    <tr>
                    <%for (int i = 0; i < ds.Tables[0].Rows.Count; i++){ %>
                        <td valign="top" width="50%">
                            <div class="advertiser_head"><span class="name"><%=i+1%>.<%=ds.Tables[0].Rows[i]["sname"] %></span></div>
                            <div class="advertiser">
                            <ul>
                            <li>产品：<%=ds.Tables[0].Rows[i]["Commoditymax"] %> 件</li>
                            <li>推荐：<%=ds.Tables[0].Rows[i]["Index_recommend_count"] %> 件</li>
                            <li>保障金：<%=ds.Tables[0].Rows[i]["SecurityMoney"]%> 元</li>
                            </ul>
                            <div class="both"></div>
                            <em><%=ds.Tables[0].Rows[i]["Description"]%></em><br />
                                <%for(int j=0;j<ds2.Tables[0].Rows.Count;j++){ %>
                                    <%if(ds.Tables[0].Rows[i]["id"].ToString().Equals(ds2.Tables[0].Rows[j]["pid"].ToString())){%>
                                        <input type="radio" name="radio" id="radio<%=i %><%=j %>" value="<%=ds2.Tables[0].Rows[j]["id"]%>" /><%=ds2.Tables[0].Rows[j]["pricename"]%>
                                        <%if(ds2.Tables[0].Rows[j]["vipprice"].ToString()=="0.00"){ %>
                                            价格：<span class="saleprice"><%=ds2.Tables[0].Rows[j]["sellingprice"]%></span>元
                                        <%}else{ %>
                                        <del><%=ds2.Tables[0].Rows[j]["sellingprice"]%></del>
                                        优惠价：<span class="saleprice"><%=ds2.Tables[0].Rows[j]["vipprice"]%></span>元
                                        <%} %>
                                        <br />
                                    <%} %>
                                <%} %></div>
                            <div class="advertiser_foot"></div>
                        </td>
                        <%if ((i+1) % 2 == 0) {%></tr><%} %>
                    <%} %>
                </table>
                <label style="color:Red;visibility:hidden" id="lblmsg"> 抱歉，商城开店最大数已超出限制，谢谢！</label>
            </div>
            <div style=" text-align:right; width:850px; margin-top:5px; "><input type=button value="开店" onclick="return Submit();" /></div>
            <div class="fy">
                <webdiyer:AspNetPager CssClass="pages" CurrentPageButtonClass="cpb" ID="AspNetPager1"
                    runat="server" RecordCount="228" FirstPageText="首页" LastPageText="尾页" NextPageText="下一页"
                    PrevPageText="上一页" PageSize="10" UrlPaging="True" NumericButtonCount="5">
                </webdiyer:AspNetPager>
            </div>
        </form>
            <div class="both">
            </div>
            <div id="footer">
                <div id="copyright">
                    <div class="search">
                        <div class="search-left">
                            <div class="search-left-title">
                                搜索：</div>
                            <div class="search-left-form">
                                <input type="text" runat="server" id="ser2" size="30" /></div>
                            <div class="search-left-list">
                                <select id="Select3" runat="server">
                                </select>
                            </div>
                            <div class="search-left-button">
                                <img src="images/search-buttom.gif" width="60" height="20" onclick="search2()" /></div>
                        </div>
                        <div class="search-right">
                            <div runat=server id="div_s2"></div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="copyright" runat="server" id="copr"></div>
            <input type="hidden" id="hidNum" runat="server" />
        </div>
    </div>
</body>
</html>
