<%@ Page Language="C#" AutoEventWireup="false" CodeBehind="ProductList.aspx.cs" Inherits="web.admin.ProductList" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
	<HEAD>
		<title>Product</title><meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
	
		<LINK href="images/adminstyle.css" type="text/css" rel="stylesheet">
<style type="text/css">
body {margin:0px; height:768px}
</style>
			<script language="javascript" src="../inc/overlib.js"></script>
		<script language="javascript">
			function Button1_onclick() {history.go(-1);
}

</script>
<script language="JavaScript">
<!--
//By Dicky 2005-2-17 11:16:49
function Window_Load(Flag)
{

if (Flag == 0)
{

  parent.document.all['Loading'].style.display = 'block';
  parent.document.all['Loading'].style.width = '500';
   parent.document.all['Loading'].style.height = '60';
  //show the window
}
else
{
  parent.document.all['Loading'].style.display = 'none';
  
  //hide the window
}
}
//-->
</script>
 <script language="javascript" type="text/javascript" src="inc/My97DatePicker/WdatePicker.js"></script>
	</HEAD>
	<body rightmargin="0" leftmargin="0" topmargin="0" onload="Window_Load(1);">
	
		<form id="Form1" method="post" runat="server" onsubmit="Window_Load(0);">
<table width="100%" height="550" cellspacing="0" cellpadding="0">
  <tr>
    <td valign="top">
<div class="top">
          <table width="100%" height="32" align="center" cellpadding="0" cellspacing="0" background="img/labelbg.gif" bgcolor="#EDF6FF">
            <tr>
		<td class="tl"></td>
		      <td class="tm"><span class="tt">优惠信息管理 &gt;&gt; 管理<font color="FF0000">&nbsp; </font></span></td>
		<td class="tm2"><span class="tt"></span></td>
	
	</tr>
</table>
</div>
        <br />
    
        <div class="mframe">

<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
   
    <td  class="mm" align="left" valign="top" style="width:100%">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td  valign="top" style="width:100%" align="center">
    <table width="99%" align="center" cellpadding="0"  cellspacing="0" >
                        <tr height="35"> 
                          <td>&nbsp;&nbsp; 搜索：关键字: 
                            <asp:TextBox id="txtKeyword" CssClass="input" runat="server" Width="46px"></asp:TextBox>
                            分类: <asp:DropDownList id="ddlCategory" runat="server"></asp:DropDownList> 细分类:<asp:DropDownList ID="plei" runat="server" >
                              </asp:DropDownList>&nbsp; 所属店铺：
                              <asp:DropDownList ID="ddlArea" runat="server">
                              </asp:DropDownList>
                              每页显示：<asp:TextBox ID="ys" runat="server" Width="53px"></asp:TextBox>
                            <asp:Button id="btnSearch" runat="server" CssClass="btn" Text="开始搜索"></asp:Button> 
                            &nbsp;</td>
                        </tr>
                      </table>
<table width="99%"  cellspacing="0" cellpadding="0" align="center">
                        <tr> 
                          <td class="mm1" style="width:98%"> <table  cellSpacing="0" cellPadding="0" width="99%" align="center" border="0">
                            
                              <tr height="35"> 
                                <td colspan="4"><br /> &nbsp;<asp:button ID="btnSavePrice" CssClass="btn1" runat=server Text="修改下载次数"></asp:button>&nbsp;
                                    <asp:Button ID="Button2" runat="server" CssClass="btn1" OnClick="Button2_Click" Text="修改截止日期" />&nbsp;
                                    <asp:Button ID="Button9" runat="server" OnClick="Button9_Click" Text="删除优惠信息" />
                                    <asp:Button ID="btncreate" runat="server" CssClass="btn1" Text="批量生成HTML" />
                                  <input name="button" type="button" id="Button1" onClick="return Button1_onclick()" value="返回" language="javascript" /><br />
                                    <br />
                                    日期：<asp:TextBox ID="sjz" runat="server" onClick="WdatePicker()"></asp:TextBox>&nbsp;<asp:Button ID="Button3"
                                        runat="server" OnClick="Button3_Click" Text="全部修改过期的优惠日期" />
                                    &nbsp;<br />
                                    &nbsp;<br />
                             
                                       说明  
                                    1、<span style="color: #ff0033">首页推荐意思是在总站首页显示； 2、置顶设置是指在优惠列表页永远在顶部显示；3、发布是指是否允许在前台显示；4、<span
                                        style="color: #009900">请勾选后进行批量删除、修改下载次数、生成HTML、设置等操作！！5、商品相关类（商圈）生成HTML操作说明：比如你修改了优惠信息，前台的相关该优惠信息的页面内容都应该改变，点相关类（商圈）生成HTML即可。添加优惠信息原理一样，点相关类（商圈）的生成HTML，新添加优惠信息的在前台相关页面的
                                        &nbsp; 显示即可更新<br />
                                    </span></span><table width="100%" border="0" cellpadding="0" cellspacing="0">
                                    <tr> 
                                      <td style="height: 5px"> </td>
                                    </tr>
                                  </table>
                                    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
                                  <table width="100%" border="0" cellpadding="0" cellspacing="0">
                                    <tr> 
                                      <td style="height: 5px"> </td>
                                    </tr>
                                  </table></td>
                              </tr>
                              <tr> 
                                <td height="23" class="forumRowHighlight" colspan=4> 
                                  <asp:datagrid id="dgProductList" runat="server" AllowPaging="True" PagerStyle-Mode="NumericPages"
							AutoGenerateColumns="False" DataKeyField="ProductID" Width="100%" HorizontalAlign="Center"
							HeaderStyle-CssClass="summary-title" BorderColor="#CCCCCC" BorderWidth="1px"> 
                                    <HeaderStyle Font-Bold="False" BackColor="#EDF6FF" CssClass="head" Height="35px"></HeaderStyle>
                                    <Columns>
                                    <asp:TemplateColumn>
                                      <HeaderTemplate> 
                                        <asp:CheckBox id="chkAll" runat="server" AutoPostBack="True" OnCheckedChanged="chkAll_CheckedChanged"></asp:CheckBox>
                                      </HeaderTemplate>
                                      <ItemTemplate> 
                                        <asp:CheckBox id="chkItem" runat="server"></asp:CheckBox>
                                      </ItemTemplate>
                                      <HeaderStyle Width="20px" /> 
                                      <ItemStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"
                                            Font-Underline="False" HorizontalAlign="Center" /> 
                                    </asp:TemplateColumn>
                                    <asp:TemplateColumn HeaderText="优惠信息名称">
                                      <HeaderStyle HorizontalAlign="Left" Width="300px"></HeaderStyle>
                                      <ItemStyle HorizontalAlign="Left" Width="300px"></ItemStyle>
                                      <ItemTemplate> 
                                     <a href="/info/showinfo_<%# DataBinder.Eval(Container.DataItem, "ProductID") %>.html" target="_blank">  <%# DataBinder.Eval(Container.DataItem, "Name") %></a>
                                   </ItemTemplate>
                                    </asp:TemplateColumn>
                                           <asp:TemplateColumn HeaderText="所属店铺">
                                      <HeaderStyle HorizontalAlign="Center" Width="100px"></HeaderStyle>
                                      <ItemStyle HorizontalAlign="Center" Width="100px"></ItemStyle>
                                      <ItemTemplate> 
                                      <a href='?slei=<%# DataBinder.Eval(Container.DataItem, "sjid") %>&stat=1'> <%# getn(DataBinder.Eval(Container.DataItem, "sjid").ToString())%></a>
                                      </ItemTemplate>
                                    </asp:TemplateColumn>
                             
                                    
                                         <asp:TemplateColumn HeaderText="截止日期">
                                      <HeaderStyle HorizontalAlign="Center" Width="100px"></HeaderStyle>
                                      <ItemStyle HorizontalAlign="Center" Width="100px"></ItemStyle>
                                      <ItemTemplate> 
                                        
                                           <asp:TextBox ID="txtrq" Runat=server Text=<%# DataBinder.Eval(Container.DataItem, "ShortDesc")%> Width="90" onClick="WdatePicker()"></asp:TextBox>
                                      </ItemTemplate>
                                    </asp:TemplateColumn>
                             
                                    <asp:TemplateColumn HeaderText="下载次数">
                                      <HeaderStyle HorizontalAlign="Center" Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False" Font-Underline="False"></HeaderStyle>
                                      <ItemStyle HorizontalAlign="Center" Width="30px" Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False" Font-Underline="False"></ItemStyle>
                                      <ItemTemplate> 
                                        <asp:TextBox ID="txtMemberPrice" Runat=server Text=<%# DataBinder.Eval(Container.DataItem, "sellnum") %> Width="30"></asp:TextBox>
                                      </ItemTemplate>
                                    </asp:TemplateColumn>
                               
                                   
                                    <asp:TemplateColumn HeaderText="缩图">
                                      <HeaderStyle HorizontalAlign="Center"></HeaderStyle>
                                      <ItemStyle HorizontalAlign="Center" Width="40px"></ItemStyle>
                                      <ItemTemplate> <a href="#" onMouseOver="return overlib('<IMG SRC=../Upload/<%# DataBinder.Eval(Container.DataItem, "ThumbnailImg") %> >', CAPTION, '<%# DataBinder.Eval(Container.DataItem, "Name") %>',FGCOLOR, '#fcfcfc', BGCOLOR, '#0080C0', CAPCOLOR, '#ffffff', BORDER, 2, CLOSETEXT, 'Close');" onMouseOut="nd();"><IMG SRC="images/icon-viewpic.gif" border="0"></a> 
                                      </ItemTemplate>
                                    </asp:TemplateColumn>
                                    <asp:TemplateColumn HeaderText="排序" Visible="false">
                                      <HeaderStyle HorizontalAlign="Center"></HeaderStyle>
                                      <ItemStyle HorizontalAlign="Center" Width="50px"></ItemStyle>
                                      <ItemTemplate> 
                                        <table>
                                          <tr> 
                                            <td width="50%"> <asp:ImageButton ID="imgD" Runat="server" ImageUrl="images/a_down.gif" CommandName="Down"></asp:ImageButton></td>
                                            <td width="50%"> <asp:ImageButton ID="imgU" Runat="server" ImageUrl="images/a_up.gif" CommandName="Up"></asp:ImageButton></td>
                                          </tr>
                                        </table>
                                      </ItemTemplate>
                                    </asp:TemplateColumn>
                                    <asp:TemplateColumn HeaderText="发布">
                                      <HeaderStyle HorizontalAlign="Center"></HeaderStyle>
                                      <ItemStyle HorizontalAlign="Center" Width="30px"></ItemStyle>
                                      <ItemTemplate> <a href='Cz.aspx?Action=ChangeProductIsForSale&pid=<%# DataBinder.Eval(Container.DataItem, "ProductID") %>&sid=<%# DataBinder.Eval(Container.DataItem, "sjid") %>&IsForSale=<%# DataBinder.Eval(Container.DataItem, "IsForSale") %>&<%=Request.QueryString.ToString()%>'> 
                                        <img src='images/publish_<%# DataBinder.Eval(Container.DataItem, "IsForSale") %>.png' border="0"></a> 
                                      </ItemTemplate>
                                    </asp:TemplateColumn>
                                          <asp:TemplateColumn HeaderText="置顶">
                                      <HeaderStyle HorizontalAlign="Center"></HeaderStyle>
                                      <ItemStyle HorizontalAlign="Center" Width="50px"></ItemStyle>
                                      <ItemTemplate> <a href='Cz.aspx?Action=ChangePCommend&PID=<%# DataBinder.Eval(Container.DataItem, "ProductID") %>&sid=<%# DataBinder.Eval(Container.DataItem, "sjid") %>&IsCommend=<%# DataBinder.Eval(Container.DataItem, "IsCommend").ToString() == "1" ? "false" : "true" %>&<%=Request.QueryString.ToString()%>'> 
                                        <img src='images/publish_<%# DataBinder.Eval(Container.DataItem, "IsCommend") %>.png' border="0"></a> 
                                      </ItemTemplate>
                                    </asp:TemplateColumn>
                                        <asp:TemplateColumn HeaderText="首页推荐">
                                      <HeaderStyle HorizontalAlign="Center"></HeaderStyle>
                                      <ItemStyle HorizontalAlign="Center" Width="60px"></ItemStyle>
                                      <ItemTemplate> <a href='Cz.aspx?Action=ChangePCommendS&PID=<%# DataBinder.Eval(Container.DataItem, "ProductID") %>&sid=<%# DataBinder.Eval(Container.DataItem, "sjid") %>&stj=<%# DataBinder.Eval(Container.DataItem, "stj").ToString() == "1" ? "false" : "true" %>&<%=Request.QueryString.ToString()%>'> 
                                        <img src='images/publish_<%# DataBinder.Eval(Container.DataItem, "stj") %>.png' border="0"></a> 
                                      </ItemTemplate>
                                    </asp:TemplateColumn>
                                        <asp:TemplateColumn HeaderText="特价">
                                      <HeaderStyle HorizontalAlign="Center"></HeaderStyle>
                                      <ItemStyle HorizontalAlign="Center" Width="30px"></ItemStyle>
                                      <ItemTemplate> <a href='Cz.aspx?Action=ChangePSpecial&PID=<%# DataBinder.Eval(Container.DataItem, "ProductID") %>&sid=<%# DataBinder.Eval(Container.DataItem, "sjid") %>&IsSpecial=<%# DataBinder.Eval(Container.DataItem, "IsSpecialOffer").ToString() == "1" ? "false" : "true" %>&<%=Request.QueryString.ToString()%>'> 
                                        <img src='images/publish_<%# DataBinder.Eval(Container.DataItem, "IsSpecialOffer") %>.png' border="0"></a> 
                                      </ItemTemplate>
                                    </asp:TemplateColumn>
                                            <asp:TemplateColumn HeaderText="热下">
                                      <HeaderStyle HorizontalAlign="Center"></HeaderStyle>
                                      <ItemStyle HorizontalAlign="Center" Width="30px"></ItemStyle>
                                      <ItemTemplate> <a href='Cz.aspx?Action=ChangePHot&PID=<%# DataBinder.Eval(Container.DataItem, "ProductID") %>&IsHot=<%# DataBinder.Eval(Container.DataItem, "IsHot").ToString() == "1" ? "false" : "true" %>&<%=Request.QueryString.ToString()%>'> 
                                        <img src='images/publish_<%# DataBinder.Eval(Container.DataItem, "IsHot") %>.png' border="0"></a> 
                                      </ItemTemplate>
                                    </asp:TemplateColumn>
                                    <asp:TemplateColumn  HeaderText="修改">
                                      <HeaderStyle HorizontalAlign="Center"></HeaderStyle>
                                      <ItemStyle HorizontalAlign="Center" Width="30px"></ItemStyle>
                                      <ItemTemplate> <a href='ProductAdd.aspx?ProductID=<%# DataBinder.Eval(Container.DataItem, "ProductID") %>&<%=Request.QueryString.ToString()%>'> 
                                        修改</a> </ItemTemplate>
                                    </asp:TemplateColumn>
                              
                                      <asp:ButtonColumn HeaderText="删除"  Text="&lt;div id=&quot;de&quot; onclick=&quot;javascript:return confirm('确认删除吗？')&quot;&gt;删除&lt;/div&gt;"
									CommandName="del"> 
                                      <ItemStyle HorizontalAlign="Center" Width="30px" Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False" Font-Underline="False" VerticalAlign="Middle"></ItemStyle>
                                    </asp:ButtonColumn>
                                   
                                      <asp:TemplateColumn HeaderText="Html">
                                      <ItemTemplate> <a href='CreateProInfo.aspx?ProductID=<%# DataBinder.Eval(Container.DataItem, "ProductID") %>&<%=Request.QueryString.ToString()%>'> 
                                        商品页生成HTML</a> </ItemTemplate>
                                      <HeaderStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"
                                                Font-Underline="False" HorizontalAlign="Center" Width="50px" /> 
                                      <ItemStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"
                                                Font-Underline="False" HorizontalAlign="Center" Width="120px" /> 
                                    </asp:TemplateColumn>
                                    <asp:TemplateColumn HeaderText="Html">
                                      <ItemTemplate> <a href='?ProductID=<%# DataBinder.Eval(Container.DataItem, "ProductID") %>&<%=Request.QueryString.ToString()%>'> 
                                        商品相关类(商圈)生成HTML</a> </ItemTemplate>
                                      <HeaderStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"
                                                Font-Underline="False" HorizontalAlign="Center" Width="50px" /> 
                                      <ItemStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"
                                                Font-Underline="False" HorizontalAlign="Center" Width="170px" /> 
                                    </asp:TemplateColumn>
                             
                                    </Columns>
                                    <PagerStyle Mode="NumericPages" BackColor="White" Height="26px"></PagerStyle>
                                    <ItemStyle BackColor="White" Height="30px" HorizontalAlign="Center" /> 
                                  </asp:datagrid> <TABLE cellSpacing="0" cellPadding="0" width="100%" align="center" id="tablePage">
                                    <TR height="35"> 
                                      <TD vAlign="middle" style="height: 35px"> 
                                        <asp:label id="lblPager" Runat="server"></asp:label></TD>
                                      <TD vAlign="middle" align="right" style="height: 35px"><INPUT id="controlID" type="hidden" name="controlID" runat="server">
                                          &nbsp; &nbsp;
                                      </TD>
                                    </TR>
                                  </TABLE></td>
                              </tr>
                            </table>
                            <div id="overDiv" style="Z-INDEX: 1000; VISIBILITY: hidden; POSITION: absolute"></div>
                            </td>
                        </tr>
                      </table>
</td>
  </tr>
</table>


              </td>

  </tr>
</table>
        </div>
    </td>
  </tr>
</table>
		</form>
	</body>
</HTML>
