<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="NoClassList.aspx.cs" Inherits="KstCMS.KstCMS_Manager.WebContent.products.pro.NoClassList" %>
<%@Register TagPrefix="Webdiver" Namespace="Webdiver" Assembly="AspnetPager" %>
<html>
<head   runat="server">
    <title>无标题页</title>
    <script type="text/javascript" language="javascript">
        function reload() {
            document.location.reload();
        }

        function selectall() {

            var obj = document.getElementById("chxall");
            var chxobj = document.getElementsByTagName("input");

            for (var i = 0; i < chxobj.length; i++) {
                if (chxobj[i].type == "checkbox") {
                    if (obj.checked) {
                        chxobj[i].checked = true;
                    } else {
                        chxobj[i].checked = false;
                    }
                }
            }
        }

        function isSelectPro() {
            var obj = document.getElementById("chxall");
            var chxobj = document.getElementsByTagName("input");
            var SelectNum = 0;
            for (var i = 0; i < chxobj.length; i++) {
                if (chxobj[i].type == "checkbox") {
                    if (chxobj[i].checked) {
                        if (chxobj[i] != obj) {
                            SelectNum++;
                        }
                    }
                }
            }
            return SelectNum;
        }

        function checkdel() {
            if (isSelectPro() == 0) {
                alert("请先选择要删除的产品!");
                return false;
            }
            return true
        }

        function check() {

            if (isSelectPro() == 0) {
                alert("请先选择要操作的产品!");
                return false;
            }
            var selectsite = document.getElementById("toSite_drp");
            var selectprolb = document.getElementById("toProlb_drp");

            if (selectsite.selectedIndex < 1) {
                alert("请选择要复制到的站点！");
                return false;
            }
            if (selectprolb.selectedIndex < 1) {
                alert("请选择要复制到的产品类别！");
                return false;
            }

            var msg = confirm('真的复制吗？');
            return msg;
        }

        function check1() {

            if (isSelectPro() == 0) {
                alert("请先选择要移动操作的产品!");
                return false;
            }
            var selectsite = document.getElementById("toSite_drp");
            var selectprolb = document.getElementById("toProlb_drp");

            if (selectsite.selectedIndex < 1) {
                alert("请选择要移动到的站点！");
                return false;
            }
            if (selectprolb.selectedIndex < 1) {
                alert("请选择要移动到的产品类别！");
                return false;
            }

            var msg = confirm('真的移动吗？');
            return msg;
        }

        function checkdel() {
            if (isSelectPro() == 0) {
                alert("请先选择要删除操作的产品!");
                return false;
            }
            var msg = confirm('真的复制吗？');
            return msg;
        }

        function updatesort() {
            if (isSelectPro() == 0) {
                alert("请先选择要删除操作的产品!");
                return false;
            }
            var msg = confirm('真的更新排序吗？');
            return msg;
        }

    </script>
</head>
<body>

    <form id="form1" runat="server">
    <div class="MainBox">
        <asp:ScriptManager ID="ScriptManager1" runat="server"  AllowCustomErrorsRedirect="false"></asp:ScriptManager>

    <asp:UpdatePanel ID="UpdatePanel1"  UpdateMode="Conditional"  runat="server" > 
    <ContentTemplate>
    
<table class="PageTitle TableTd_Gray" width="100%"><tr><td>
       
       <table width="100%" border="0" cellspacing="0" cellpadding="0" >
  <tr>
    <td nowrap="nowrap"><img src="<%=SysRootUrl %>/KstCMS_Manager/images/sms_type13.gif" align="absmiddle" /> <b> 产品查找</b>   
    
        <asp:DropDownList ID="drp_SiteList" runat="server" AutoPostBack="true">
        </asp:DropDownList>

     <asp:TextBox ID="txt_KeyWork" runat="server" MaxLength="50" CssClass="input_text"></asp:TextBox>
        <asp:Button ID="Button1" runat="server" Text="查找" CssClass="uPageBtn" />
        <input type="button" value="分类产品" class="uPageBtn1" onclick="location.href='ProductList.aspx';" />
        <input type="button" value="增加" class="uPageBtn1" onclick="location.href='AddProFrm.aspx';" />
        </td>
      <td align="right">
         [提示]<asp:Literal ID="litMsg" runat="server"></asp:Literal>
     </td>
  </tr>
</table>

       </td></tr></table>
       
<asp:Panel ID="Panel1" runat="server">
<table width="100%" border="0" cellspacing="1" cellpadding="5" class="Table_Gray">
   <tr class="TableHeader">
    <td>选中</td>
    <td><asp:LinkButton ID="link_sort" runat="server">排序</asp:LinkButton></td>
    <td><asp:LinkButton ID="link_lbid" runat="server">所属分类</asp:LinkButton></td>
    <td><asp:LinkButton ID="link_prono" runat="server">产品编号</asp:LinkButton></td>
    <td><asp:LinkButton ID="link_proname" runat="server">产品名称</asp:LinkButton></td>
    <td>属性</td>
    <td><asp:LinkButton ID="link_utime" runat="server">日期</asp:LinkButton></td>
    <td>操作</td>
  </tr>
<asp:Repeater ID="RepMain" runat="server">
       <HeaderTemplate>    
  </HeaderTemplate>
  <ItemTemplate>
  <tr class="TableTd_Gray">
    <td align="center"><input type="checkbox" id="chxbox" name="chxbox" value="<%#DataBinder.Eval(Container.DataItem,"ProID") %>" /></td>
    <td align="center"><input type="text" size="3" class="input_text" name="SortNo_<%#DataBinder.Eval(Container.DataItem,"ProID") %>" value="<%#DataBinder.Eval(Container.DataItem,"SortNo") %>" /></td>
     <td align="center">
         <asp:Literal ID="lit_lbstr" runat="server"></asp:Literal></td>
    <td align="center"><%#DataBinder.Eval(Container.DataItem, "ProNo")%> <img src="<%=SysRootUrl %>/KstCMS_Manager/images/haveimg.gif" style="cursor:pointer" onMouseOver="ShowADPreview('<img src=<%#DataBinder.Eval(Container.DataItem, "Pic1")%> />');" onMouseOut="hideTooltip('dHTMLADPreview')"  /></td>
    <td><asp:Literal ID="lit_ProName" runat="server"></asp:Literal></td>
    <td align="center">
        <asp:ImageButton ID="ImageButton_isnew" runat="server" ToolTip="最新" CommandArgument="0" CommandName=<%#DataBinder.Eval(Container.DataItem,"ProID") %>  />
        <asp:ImageButton ID="ImageButton_istj" runat="server" ToolTip="推荐"  CommandArgument="1" CommandName=<%#DataBinder.Eval(Container.DataItem,"ProID") %> />
        <asp:ImageButton ID="ImageButton_ishot" runat="server" ToolTip="热门" CommandArgument="2" CommandName=<%#DataBinder.Eval(Container.DataItem,"ProID") %> />
    </td>
     <td align="center">
     <%#string.Format("{0:yyyy-MM-dd}", Convert.ToDateTime(DataBinder.Eval(Container.DataItem, "uTime").ToString()))%>
     </td>
    <td align="center">
    <input type="button"  value="下载" onclick="OpenDialog('MainFrame.aspx?ProID=<%#DataBinder.Eval(Container.DataItem,"ProID") %>&Action=File',600,500)" />
    <input type="button"  value="图集" onclick="OpenDialog('MainFrame.aspx?ProID=<%#DataBinder.Eval(Container.DataItem,"ProID") %>&Action=Pic',600,500)" />
    <input type="button"  value="修改" onclick="location.href='EditProduct.aspx?ProID=<%#DataBinder.Eval(Container.DataItem,"ProID") %>'" />
    </td>
  </tr>
  </ItemTemplate>
  <AlternatingItemTemplate>
    <tr class="TableTd_Gray1">
    <td align="center"><input type="checkbox" id="chxbox" name="chxbox" value="<%#DataBinder.Eval(Container.DataItem,"ProID") %>" /></td>
    <td align="center"><input type="text" size="3" class="input_text" name="SortNo_<%#DataBinder.Eval(Container.DataItem,"ProID") %>" value="<%#DataBinder.Eval(Container.DataItem,"SortNo") %>" /></td>
         <td align="center">
         <asp:Literal ID="lit_lbstr" runat="server"></asp:Literal></td>
    <td align="center"><%#DataBinder.Eval(Container.DataItem, "ProNo")%> <img src="<%=SysRootUrl %>/KstCMS_Manager/images/haveimg.gif" style="cursor:pointer" onMouseOver="ShowADPreview('<img src=<%#DataBinder.Eval(Container.DataItem, "Pic1")%> />');" onMouseOut="hideTooltip('dHTMLADPreview')"  /></td>
    <td><asp:Literal ID="lit_ProName" runat="server"></asp:Literal></td>
    <td align="center">
        <asp:ImageButton ID="ImageButton_isnew" runat="server" ToolTip="最新" CommandArgument="0" CommandName=<%#DataBinder.Eval(Container.DataItem,"ProID") %>  />
        <asp:ImageButton ID="ImageButton_istj" runat="server" ToolTip="推荐"  CommandArgument="1" CommandName=<%#DataBinder.Eval(Container.DataItem,"ProID") %> />
        <asp:ImageButton ID="ImageButton_ishot" runat="server" ToolTip="热门" CommandArgument="2" CommandName=<%#DataBinder.Eval(Container.DataItem,"ProID") %> />
    </td>
     <td align="center">
     <%#string.Format("{0:yyyy-MM-dd}", Convert.ToDateTime(DataBinder.Eval(Container.DataItem, "uTime").ToString()))%>
     </td>
    <td align="center">
    <input type="button"  value="下载" onclick="OpenDialog('MainFrame.aspx?ProID=<%#DataBinder.Eval(Container.DataItem,"ProID") %>&Action=File',600,500)" />
    <input type="button"  value="图集" onclick="OpenDialog('MainFrame.aspx?ProID=<%#DataBinder.Eval(Container.DataItem,"ProID") %>&Action=Pic',600,500)" />
    <input type="button"  value="修改" onclick="location.href='EditProduct.aspx?ProID=<%#DataBinder.Eval(Container.DataItem,"ProID") %>'" />
    </td>
  </tr>
  </AlternatingItemTemplate>
  <FooterTemplate>
</table>
</FooterTemplate>
   </asp:Repeater>   

 
 <table width="100%" border="0" cellspacing="2" cellpadding="0" align="center"  class="PageBox">
  <tr>
 <td width="10">
          <table width="100%" border="0" cellspacing="2" cellpadding="0" align="center">
             <tr>
              <td nowrap="nowrap">
              <input type="checkbox" id="chxall" name="chxall" onclick="selectall();" />
                   <asp:Button ID="btn_Del" runat="server" Text="删除" CssClass="uPageBtn" OnClientClick="return checkdel();" />
                    <asp:Button ID="btn_Sort" runat="server" Text="更新" CssClass="uPageBtn" OnClientClick="return updatesort();" />
              <asp:DropDownList ID="toSite_drp" runat="server" AutoPostBack="true">
                      </asp:DropDownList>
            <asp:DropDownList ID="drp_toMenu" runat="server" AutoPostBack="true">
            </asp:DropDownList>
             <asp:DropDownList ID="toProlb_drp" runat="server">
             </asp:DropDownList>
             <asp:Button ID="btn_Copy" runat="server" Text="复制" CssClass="uPageBtn" OnClientClick="return check();" />
             <asp:Button ID="btn_Move" runat="server" Text="移动" CssClass="uPageBtn" OnClientClick="return check1();" />
             </td>
              <td>
                 <asp:Literal ID="PageInfo" runat="server"></asp:Literal>  
             </td>
            </tr>
         </table>    
</td>
<td>
 
<Webdiver:AspNetPager ID="AspNetPager1" runat="server" AlwaysShow="True" PageSize="12" DisabledButtonImageNameExtension="g" CpiButtonImageNameExtension="r" ButtonImageNameExtension="n" ImagePath="~/images" PagingButtonSpacing="0" CustomInfoSectionWidth="35%"  UrlPaging="false" NumericButtonTextFormatString="[{0}]" SubmitButtonText="GO" ShowInputBox="Always" ShowCustomInfoSection="left" HorizontalAlign="Right" OnPageChanged="AspNetPager1_PageChanged" Font-Size="10pt" SubmitButtonClass="uPageBtn" InputBoxClass="input_text" CssClass="uPage"> 
</Webdiver:AspNetPager>
    
    </td>
  </tr>
</table> 
       
 </asp:Panel>        
       
       
       
    </ContentTemplate>
   </asp:UpdatePanel> 


    <asp:UpdateProgress ID="UpdateProgress1" AssociatedUpdatePanelID="UpdatePanel1" runat="server">
    <ProgressTemplate>请稍候...</ProgressTemplate>
    </asp:UpdateProgress>     
    </div>

 
    </form>

    <div id=dHTMLADPreview style='Z-INDEX: 1000; LEFT: 0px; VISIBILITY: hidden; WIDTH: 10px; POSITION: absolute; TOP: 0px; HEIGHT: 10px'></DIV>
<SCRIPT language = 'JavaScript'>
<!--
    var tipTimer;
    function locateObject(n, d) {
        var p, i, x;
        if (!d) d = document;
        if ((p = n.indexOf('?')) > 0 && parent.frames.length)
        { d = parent.frames[n.substring(p + 1)].document; n = n.substring(0, p); }
        if (!(x = d[n]) && d.all) x = d.all[n];
        for (i = 0; !x && i < d.forms.length; i++) x = d.forms[i][n];
        for (i = 0; !x && d.layers && i < d.layers.length; i++) x = locateObject(n, d.layers[i].document); return x;
    }
    function ShowADPreview(ADContent) {
        showTooltip('dHTMLADPreview', event, ADContent, '#ffffff', '#000000', '#000000', '6000')
    }
    function showTooltip(object, e, tipContent, backcolor, bordercolor, textcolor, displaytime) {
        window.clearTimeout(tipTimer)
        if (document.all) {
            locateObject(object).style.top = document.body.scrollTop + event.clientY + 20
            locateObject(object).innerHTML = '<table style="font-family:宋体; font-size: 9pt; border: ' + bordercolor + '; border-style: solid; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; background-color: ' + backcolor + '" width="10" border="0" cellspacing="0" cellpadding="0"><tr><td nowrap><font style="font-family:宋体; font-size: 9pt; color: ' + textcolor + '">' + unescape(tipContent) + '</font></td></tr></table> '
            if ((e.x + locateObject(object).clientWidth) > (document.body.clientWidth + document.body.scrollLeft)) {
                locateObject(object).style.left = (document.body.clientWidth + document.body.scrollLeft) - locateObject(object).clientWidth - 10;
            } else {
                locateObject(object).style.left = document.body.scrollLeft + event.clientX
            }
            locateObject(object).style.visibility = 'visible';
            tipTimer = window.setTimeout("hideTooltip('" + object + "')", displaytime);
            return true;
        } else if (document.layers) {
            locateObject(object).document.write('<table width="10" border="0" cellspacing="1" cellpadding="1"><tr bgcolor="' + bordercolor + '"><td><table width="10" border="0" cellspacing="0" cellpadding="0"><tr bgcolor="' + backcolor + '"><td nowrap><font style="font-family:宋体; font-size: 9pt; color: ' + textcolor + '">' + unescape(tipContent) + '</font></td></tr></table></td></tr></table>')
            locateObject(object).document.close()
            locateObject(object).top = e.y + 20
            if ((e.x + locateObject(object).clip.width) > (window.pageXOffset + window.innerWidth)) {
                locateObject(object).left = window.innerWidth - locateObject(object).clip.width - 10;
            } else {
                locateObject(object).left = e.x;
            }
            locateObject(object).visibility = 'show';
            tipTimer = window.setTimeout("hideTooltip('" + object + "')", displaytime);
            return true;
        } else {
            return true;
        }
    }
    function hideTooltip(object) {
        if (document.all) {
            locateObject(object).style.visibility = 'hidden';
            locateObject(object).style.left = 1;
            locateObject(object).style.top = 1;
            return false;
        } else {
            if (document.layers) {
                locateObject(object).visibility = 'hide';
                locateObject(object).left = 1;
                locateObject(object).top = 1;
                return false;
            } else {
                return true;
            }
        }
    }
//-->
</SCRIPT>
    </body>
    </html>
