<%@ page language="C#" autoeventwireup="true" inherits="FavL, LebiMall" enableviewstate="false" %>

<%@ 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 id="Head1" runat="server">
    <title><%=model_t.Title%>-收藏</title>
    <meta name="description" content=<%=model_t.Description %> />
    <meta name="keywords" content=<%=model_t.Keywords %> />
    <meta name="generator" content="LBMall 3.0.0" />
    <link href="images/css/css.css" rel="stylesheet" type="text/css" />
    <link href="images/css/favl.css" rel="stylesheet" type="text/css" />
    <link href="images/css/css2.css" rel="stylesheet" type="text/css" />
    <link href="images/css/css3.css" rel="stylesheet" type="text/css" />
    <!--[if lte IE 6]><style type="text/css" media="screen">/* <![CDATA[ */ @import url(images/css/ie6.css); /* ]]> */</style><![endif]-->
    <!--[if gte IE 7]><STYLE type=text/css media=screen>@import url(images/css/ie7.css);</STYLE><![endif]-->
    <script type="text/javascript" src="images/js/shopjs.js"></script>
    <script type="text/javascript" src="images/js/prototype-1.4.0.js"></script>
    <link href="images/css/s-4.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="images/js/dialog-41.js"></script>
    <script type="text/javascript" src="images/js/addfavorite.js"></script>
    <script type="text/javascript">
        function killerrors() {  
            return true; 
        } 
        window.onerror = killerrors; 
        var q_div=null;
        var uh_div=null;
        var dc=null;
        //鼠标移动到左侧
        function onm(showo){
            document.getElementById(showo).style.display="block";
        }
        function onout(noshowo){
            document.getElementById(noshowo).style.display="none";
        }
        function show_updatediv(lid,div_r,id,fname){
           
           s_show();
           q_div=lid.innerHTML;
           uh_div=lid;
           if(dc!=null){
               document.getElementById(dc.id).style.display="none";
           }
           dc=div_r;
           var txtdiv=document.getElementById("undiv");
           lid.innerHTML=txtdiv.innerHTML;
           document.getElementById("txt_tagname").value=fname;
           document.getElementById("hidden_id").value=id;
        }
        //隐藏层
        function s_show(){
            if(q_div!=null&&uh_div!=null)
               uh_div.innerHTML=q_div;
        }
        function val(){
            if(document.getElementById("txt_tagname").value==""){
                return false;
            }else{
                return true;
            }
        }
        function del(tid){
            
            window.location.href="Deltag.aspx?tid="+tid+"&&is_cp="+<%=is_cp %>;
        }
        function delf(fid){
            document.getElementById("hid_ids").value=fid+",";
            document.getElementById("delf").submit();
        }
        //全选
        function SelectAllCheckBox()
        {
            var form =document.forms[0];
            for(i=0;i<form.elements.length;i++)
            {
                if(form.elements[i].type=="checkbox")
                {
                    form.elements[i].checked=true;
                }
            }
        }
        //批量的删除取id
        function del_sumid(){
            var str=document.getElementsByName("chbox");
            var list_id="";
            for(var i=0;i<str.length;i++){
                if(str[i].checked==true){
                    list_id+=str[i].value+",";
                }
            }
            document.getElementById("hid_ids").value=list_id;
            document.getElementById("delf").submit();
        }
        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>
    <form id="form1" runat="server">

        <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">
                <div class="c_left">
                    <div class="left-list-title">
                        标签</div>
                    <div class="left-list-contenter">
                        <%for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
                          {%>
                        <div id="li<%=i %>" class="divc" onmouseover="onm('div<%=i%>')" onmouseout="onout('div<%=i%>')">
                            <div style="float: left;">
                                <a href="FavL.aspx?tagname=<%=Server.UrlEncode(ds.Tables[0].Rows[i]["fname"].ToString())%>&page=1">
                                    <%=ds.Tables[0].Rows[i]["fname"] %>
                                </a>
                            </div>
                            <div style="float: right; display: none;" id="div<%=i%>">
                                <a href="javascript:void(0);" onclick="show_updatediv(document.getElementById('li<%=i %>'),document.getElementById('div<%=i %>'),'<%=ds.Tables[0].Rows[i]["id"] %>','<%=ds.Tables[0].Rows[i]["fname"] %>')">
                                    编辑</a>&nbsp;<a href="javascript:void(0);" onclick="del('<%=ds.Tables[0].Rows[i]["id"] %>')">删除</a>
                            </div>
                        </div>
                        <%} %>
                        <div class="divc">
                            <a href="FavL.aspx?tagname=o-o&page=1">未使用标签</a></div>
                        <div class="divc">
                            <a href="FavL.aspx?tagname=all&page=1">全部</a></div>
                        <div id="undiv" style="display: none;">
                            <input id="hidden_id" type="hidden" runat="server" />
                            <input class="text_tag" type="text" id="txt_tagname" runat="server" />
                            <asp:Button ID="btn" runat="server" Text="确定" CssClass="btn_c" OnClientClick="return val()"
                                OnClick="btn_Click" />
                            <input class="btn_c" id="Button4" type="button" value="取消" onclick="s_show()" />
                        </div>
                    </div>
                </div>
                <div class="c_right">
                    <%--<div class="g_div">
                    <img src="images/guang.jpg" /></div>--%>
                    <div class="nav-tabs">
                        <ul class="tabs">
                            <li id="bb" runat="server"><a href="FavL.aspx?tagname=all&page=1&is_cp=1">宝贝收藏</a></li>
                        </ul>
                        <ul class="tabs">
                            <li id="dp" runat="server"><a href="FavL.aspx?tagname=all&page=1&is_cp=2">店铺收藏</a></li>
                        </ul>
                    </div>
                    <div class="dh_d">
                        <div class="div_bt">
                            <div style="float: left">
                                <input id="Button1" type="button" value="全选" onclick="SelectAllCheckBox()" />
                                <input id="Button2" type="button" value="删除" onclick="del_sumid()" /></div>
                            <div style="float: right; margin-bottom: 5px;">
                                <webdiyer:AspNetPager CssClass="page1" CurrentPageButtonClass="cpb1" ID="AspNetPager2"
                                    runat="server" RecordCount="228" FirstPageText="首页" LastPageText="尾页" NextPageText="下一页"
                                    PrevPageText="上一页" PageSize="10" UrlPaging="True" NumericButtonCount="5">
                                </webdiyer:AspNetPager>
                            </div>
                        </div>
                        <div class="suml">
                            <ul>
                                <%for (int i = 0; i < dsv.Tables[0].Rows.Count; i++)
                                  { %>
                                <li>
                                    <div class="s_d1">
                                        <input type="checkbox" value='<%=dsv.Tables[0].Rows[i]["id"] %>' name="chbox" />
                                    </div>
                                    <div class="s_d2">
                                        <%if (dsv.Tables[0].Rows[i]["is_cp"].ToString() == "1")
                                          {%>
                                        <a href="Detail.aspx?cid=<%=dsv.Tables[0].Rows[i]["pid"] %>"><img src="Upload/commodity/<%=dsv.Tables[0].Rows[i]["img"] %>" width="80" style="border:0;" /></a>
                                        <%}
                                          else if (dsv.Tables[0].Rows[0]["is_cp"].ToString() == "2")
                                          {%>
                                        <img src="Upload/shop/<%=dsv.Tables[0].Rows[i]["img"] %>" width="80" />
                                        <%} %>
                                    </div>
                                    <div class="s_d3">
                                        <div class="s_d3_1">
                                         <%if (dsv.Tables[0].Rows[i]["is_cp"].ToString() == "1")
                                           {%>
                                            <a href="Detail.aspx?cid=<%=dsv.Tables[0].Rows[i]["pid"] %>"><%=dsv.Tables[0].Rows[i]["tname"]%></a>
                                            <%} %>
                                            <%if (dsv.Tables[0].Rows[i]["is_cp"].ToString() == "2")
                                           {%>
                                          <a href="<%=getYm(dsv.Tables[0].Rows[i]["cshop_id"].ToString(),dsv.Tables[0].Rows[i]["syuming"].ToString()) %>">
                                          <%=dsv.Tables[0].Rows[i]["tname"]%></a>
                                           <%} %>
                                        </div>
                                        <div class="s_d3_2">
                                         <%if (dsv.Tables[0].Rows[i]["is_cp"].ToString() == "1")
                                           {%>
                                            <span>店铺：</span><a href="<%=getYm(dsv.Tables[0].Rows[i]["cshop_id"].ToString(),dsv.Tables[0].Rows[i]["syuming"].ToString()) %>"><%=dsv.Tables[0].Rows[0]["sname"]%></a>&nbsp;&nbsp; <%} %>
                                             <%if (dsv.Tables[0].Rows[i]["is_cp"].ToString() == "2")
                                           {%>
                                           <span>掌柜：</span><%=dsv.Tables[0].Rows[0]["uname"] %>
                                           <%} %>
                                            <%if (dsv.Tables[0].Rows[i]["is_cp"].ToString() == "1")
                                              { %>
                                            <span>一口价：<span><%=dsv.Tables[0].Rows[i]["cprice"]%></span>元</span>
                                            <%} %>
                                        </div>
                                        <div class="s_d3_3">
                                            <span>标签：</span><span><%=dsv.Tables[0].Rows[i]["ftypename"]%></span></div>
                                    </div>
                                    <div class="s_d4">
                                        收藏人气
                                        <div class="num_s">
                                            <%=dsv.Tables[0].Rows[i]["favu"]%>
                                        </div>
                                        <div>
                                            <a href="#" onclick="editfv('<%=dsv.Tables[0].Rows[i]["id"]%>','<%=dsv.Tables[0].Rows[i]["pid"]%>','<%=dsv.Tables[0].Rows[i]["is_cp"]%>','<%=Server.UrlEncode(dsv.Tables[0].Rows[i]["ftypename"].ToString()) %>')">
                                                编辑</a><br />
                                            <a href="#" onclick="delf('<%=dsv.Tables[0].Rows[i]["id"]%>')">删除</a><br />
                                            <%if (dsv.Tables[0].Rows[i]["is_cp"].ToString() == "1")
                                              { %>
                                            <a href="ljCart.aspx?cid=<%=dsv.Tables[0].Rows[i]["pid"]%>&num=1">购买</a>
                                            <%}
                                              else
                                              {%>
                                            <a href="<%=getYm(dsv.Tables[0].Rows[i]["cshop_id"].ToString(),dsv.Tables[0].Rows[i]["syuming"].ToString()) %>">进入店铺</a>
                                            <%} %>
                                        </div>
                                    </div>
                                </li>
                                <%} %>
                            </ul>
                        </div>
                        <div class="bomf">
                            <webdiyer:AspNetPager CssClass="page1" CurrentPageButtonClass="cpb1" ID="AspNetPager1"
                                runat="server" RecordCount="228" FirstPageText="首页" LastPageText="尾页" NextPageText="下一页"
                                PrevPageText="上一页" PageSize="10" UrlPaging="True" NumericButtonCount="5">
                            </webdiyer:AspNetPager>
                        </div>
                    </div>
                </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>
            </div>
        </div>
    </form>
    <form id="delf" method="post" action="delfav.aspx">
        <input type="hidden" name="hid_ids" id="hid_ids" />
    </form>
 </body>
</html>
