<%@ Register TagPrefix="ftb" Namespace="FreeTextBoxControls" Assembly="FreeTextBox" %>
<%@ Page Language="vb" AutoEventWireup="false" Codebehind="ProManage.aspx.vb" Inherits="LuckBet.ComProManage" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
	<HEAD>
		<title>ComProManage</title>
		<META http-equiv="Content-Type" content="text/html; charset=gb2312">
		<meta content="Microsoft Visual Studio .NET 7.1" name="GENERATOR">
		<meta content="Visual Basic .NET 7.1" name="CODE_LANGUAGE">
		<meta content="JavaScript" name="vs_defaultClientScript">
		<meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema">
		<script language="JavaScript" src="../JS/GetDate.js"></script>
		<LINK href="../Styles.css" type="text/css" rel="stylesheet">
		<script language="javascript">
     <!--
      function Selecttype1()
      {
			var drpClass2=document.getElementById("ddlclass2");//分类二级
			var drpClass3=document.getElementById("ddlclass3");//分类三级
			for (var i=drpClass2.options.length;i>=0;i--)
			{
				drpClass2.remove(i);
			}
			for (var i=drpClass3.options.length;i>=0;i--)
			{
				drpClass3.remove(i);
			}
			var oHttpReq=new ActiveXObject("MSXML2.XMLHTTP");//发送请求
			var oDoc=new ActiveXObject("MSXML2.DOMDocument");//响应结果
			var Class1=document.getElementById("ddlclass1").value;
			oHttpReq.open("post","selectProKind.aspx?flag=1&Class1="+Class1,false);
			oHttpReq.setrequestheader("content-type","application/x-www-form-urlencoded");
			oHttpReq.send("");                  
			var result=oHttpReq.responseText;
			var newOption_0 = document.createElement("OPTION"); 
			newOption_0.text = "选择类型"; 
			newOption_0.value = '0'; 
			drpClass2.options.add(newOption_0);
			var newOption_1 = document.createElement("OPTION"); 
			newOption_1.text = "选择类型"; 
			newOption_1.value = '0'; 
			drpClass3.options.add(newOption_1);
			oDoc.loadXML(result);
			var items1 = oDoc.selectNodes("//NewDataSet/Class/Name");
			var items2 = oDoc.selectNodes("//NewDataSet/Class/twoid");

			var itemsLength=items1.length;
			 
			for(i=0;i<itemsLength;i++)

			
			{
			var newOption = document.createElement("OPTION");
			newOption.text=items1[i].text;
			newOption.value=items2[i].text;
			drpClass2.options.add(newOption);
			
			} 
	  }
   
   
     function Selecttype2()
      {
         var drpClass3=document.getElementById("ddlClass3");
         for (var i=drpClass3.options.length;i>=0;i--)
         {
             drpClass3.remove(i);
         }
        
         var oHttpReq=new ActiveXObject("MSXML2.XMLHTTP");
         var oDoc=new ActiveXObject("MSXML2.DOMDocument");
         var Class1=document.getElementById("ddlClass1").value;
         var Class2=document.getElementById("ddlClass2").value;
         oHttpReq.open("post","selectProKind.aspx?flag=2&&Class1="+Class1+"&Class2="+Class2,false);
         oHttpReq.setrequestheader("content-type","application/x-www-form-urlencoded");
         oHttpReq.send("");                  
         var result=oHttpReq.responseText;
         var newOption_0 = document.createElement("OPTION"); 
         newOption_0.text = "选择类型"; 
         newOption_0.value = '0'; 
         drpClass3.options.add(newOption_0);
         oDoc.loadXML(result);
         var items1 = oDoc.selectNodes("//NewDataSet/Class3/Name");
		 var items2 = oDoc.selectNodes("//NewDataSet/Class3/threeid");

			var itemsLength=items1.length;
			 
			for(i=0;i<itemsLength;i++)

			{
			var newOption = document.createElement("OPTION");
			newOption.text=items1[i].text;
			newOption.value=items2[i].text;
			drpClass3.options.add(newOption);
			
         //var items = oDoc.selectNodes("//NewDataSet/city/city");
		//for (var item = items.nextNode();item;item = items.nextNode())
		//{　
			
    　	//var areaName = item.selectSingleNode("city").nodeTypedValue;
    　	//var areaCode = item.selectSingleNode("threeid").nodeTypedValue;
		//var newOption = document.createElement("OPTION");　
    　	//newOption.text = areaName;　
    　	//newOption.value = areaCode;　
    　	//drp3.options.add(newOption);　
		}　
    }
   
-->
		</script>
	</HEAD>
	<body bgcolor="#c5d5e4">
		<form id="Form1" method="post" runat="server">
			<asp:panel id="Panel2" runat="server" HorizontalAlign="Center">
				<TABLE id="Table9" style="WIDTH: 844px; HEIGHT: 547px" cellSpacing="0" cellPadding="0"
					border="0">
					<TR>
						<TD style="HEIGHT: 38px" vAlign="top" align="center"><FONT size="2">当前有
								<asp:dropdownlist id="ddlstype1" runat="server" AutoPostBack="True"></asp:dropdownlist>
								<asp:dropdownlist id="ddlstype2" runat="server" AutoPostBack="True" DESIGNTIMEDRAGDROP="306"></asp:dropdownlist>
								<asp:dropdownlist id="ddlstype3" runat="server" AutoPostBack="True"></asp:dropdownlist>
								<asp:dropdownlist id="ddldd" runat="server" AutoPostBack="True">
									<asp:ListItem Value="0">全部奖品</asp:ListItem>
									<asp:ListItem Value="1">首页推荐</asp:ListItem>
									<asp:ListItem Value="2">特价奖品</asp:ListItem>
									<asp:ListItem Value="3">今日推荐</asp:ListItem>
								</asp:dropdownlist>&nbsp; 奖品
								<asp:label id="lblprocounts" runat="server" Font-Bold="True" Font-Size="10pt" ForeColor="Red"></asp:label>件&nbsp;&nbsp; 
								模糊查询奖品：
								<asp:textbox id="txtsearchstr" runat="server" CssClass="textbox"></asp:textbox>
								<asp:button id="btnsearch" runat="server" CssClass="button" Height="23px" Text="查询" Width="58px"></asp:button></FONT></TD>
					</TR>
					<TR>
						<TD style="HEIGHT: 389px" vAlign="top" align="center" height="389"><FONT face="宋体">
								<asp:linkbutton id="btnFirst" onclick="PageButtonClick" runat="server" Font-Name="verdana" CommandArgument="0">最前页

</asp:linkbutton>&nbsp; &nbsp;
								<asp:linkbutton id="btnPrev" onclick="PageButtonClick" runat="server" CommandArgument="prev">上一页

</asp:linkbutton>&nbsp; &nbsp;
								<asp:linkbutton id="btnNext" onclick="PageButtonClick" runat="server" CommandArgument="next">下一页

</asp:linkbutton>&nbsp; &nbsp;
								<asp:linkbutton id="btnLast" onclick="PageButtonClick" runat="server" CommandArgument="last">最后页

</asp:linkbutton>&nbsp; 总共有
								<asp:label id="lblcount" runat="server" ForeColor="Red"></asp:label>&nbsp;条 记录
								<asp:label id="lblCurrentIndex" runat="server"></asp:label>&nbsp;
								<asp:label id="lblPageCount" runat="server"></asp:label>
								<asp:datagrid id="DataGrid1" runat="server" Width="90%" PageSize="6" AutoGenerateColumns="False"
									AllowPaging="True" BorderStyle="None" BorderWidth="1px" BorderColor="#93BEE2" BackColor="White"
									DataKeyField="ID" CellPadding="3" AllowCustomPaging="True">
									<SelectedItemStyle Font-Bold="True" ForeColor="#CCFF99" BackColor="#009999"></SelectedItemStyle>
									<AlternatingItemStyle BackColor="#E8F4FF"></AlternatingItemStyle>
									<ItemStyle ForeColor="#000066"></ItemStyle>
									<HeaderStyle Font-Size="X-Small" ForeColor="White" BackColor="#337FB2"></HeaderStyle>
									<FooterStyle Font-Size="X-Small" HorizontalAlign="Right" ForeColor="#003399" BackColor="#99CCCC"></FooterStyle>
									<Columns>
										<asp:TemplateColumn HeaderText="奖品图片">
											<HeaderStyle HorizontalAlign="Center"></HeaderStyle>
											<ItemStyle HorizontalAlign="Center"></ItemStyle>
											<ItemTemplate>
												<A href='../Games/ShowPro.aspx?id=<%# databinder.eval(container.dataitem,"ID") %>' target=_blank>
													<img src ='../<%# DataBinder.Eval(Container.dataitem, "ProImage") %>' border =0 height =80 width =80 title ='<%# databinder.eval(container.dataitem,"ProName") %>'></A>
											</ItemTemplate>
										</asp:TemplateColumn>
										<asp:TemplateColumn HeaderText="奖品名称">
											<HeaderStyle HorizontalAlign="Center"></HeaderStyle>
											<ItemStyle HorizontalAlign="Center"></ItemStyle>
											<ItemTemplate>
												<A href='../Games/ShowPro.aspx?id=<%# databinder.eval(container.dataitem,"ID") %>' target=_blank>
													<%# databinder.eval(container.dataitem,"ProName") %>
												</A>
											</ItemTemplate>
										</asp:TemplateColumn>
										<asp:TemplateColumn HeaderText="兑换次数">
											<HeaderStyle HorizontalAlign="Center"></HeaderStyle>
											<ItemStyle HorizontalAlign="Center"></ItemStyle>
											<ItemTemplate>
												<%# databinder.eval(container.dataitem,"Pro_dollar") %>
												次
											</ItemTemplate>
										</asp:TemplateColumn>
										<asp:TemplateColumn HeaderText="兑换价">
											<HeaderStyle HorizontalAlign="Center"></HeaderStyle>
											<ItemStyle HorizontalAlign="Center"></ItemStyle>
											<ItemTemplate>
												<%# pubsql.Comma(databinder.eval(container.dataitem,"price")) %>
												<IMG src="../Images/images_36.gif">
											</ItemTemplate>
										</asp:TemplateColumn>
										<asp:TemplateColumn HeaderText="状态">
											<HeaderStyle HorizontalAlign="Center"></HeaderStyle>
											<ItemStyle HorizontalAlign="Center"></ItemStyle>
											<ItemTemplate>
												<%# iif(databinder.eval(container.dataitem,"Pro_show")="0","不显示","显示") %>
											</ItemTemplate>
										</asp:TemplateColumn>
										<asp:BoundColumn DataField="date" HeaderText="发布日期" DataFormatString="{0:D}">
											<HeaderStyle HorizontalAlign="Center"></HeaderStyle>
											<ItemStyle HorizontalAlign="Center"></ItemStyle>
										</asp:BoundColumn>
										<asp:EditCommandColumn ButtonType="LinkButton" UpdateText="更新" HeaderText="编辑" CancelText="取消" EditText="编辑">
											<HeaderStyle HorizontalAlign="Center"></HeaderStyle>
											<ItemStyle HorizontalAlign="Center"></ItemStyle>
										</asp:EditCommandColumn>
										<asp:ButtonColumn Text="删除" HeaderText="删  除" CommandName="Delete">
											<HeaderStyle HorizontalAlign="Center"></HeaderStyle>
											<ItemStyle HorizontalAlign="Center"></ItemStyle>
										</asp:ButtonColumn>
									</Columns>
									<PagerStyle HorizontalAlign="Left" ForeColor="#000066" Position="TopAndBottom" BackColor="White"
										Mode="NumericPages"></PagerStyle>
								</asp:datagrid></FONT></TD>
					</TR>
				</TABLE>
			</asp:panel>
			<asp:panel id="paneditPro" runat="server" ForeColor="Black" Font-Size="10pt" Height="544px"
				HorizontalAlign="Center">
				<FONT class="3DTitle" style="FONT-WEIGHT: bold; COLOR: #660033" face="宋体">修改奖品信息</FONT><BR>
				<P></P>
				<FONT face="宋体"></FONT><FONT face="宋体"></FONT>
				<TABLE id="Table8" style="FONT-SIZE: 12px; WIDTH: 704px; HEIGHT: 98px" cellSpacing="0"
					cellPadding="0" width="704" border="1">
					<TR>
						<TD style="WIDTH: 67px; HEIGHT: 27px" align="center">产品名称</TD>
						<TD style="WIDTH: 225px; HEIGHT: 27px">
							<asp:TextBox id="txtproname" runat="server" CssClass="textbox"></asp:TextBox>
							<asp:TextBox id="txtid" runat="server" Width="2px"></asp:TextBox>
							<asp:DropDownList id="ddlshow" runat="server">
								<asp:ListItem Value="0">不显示</asp:ListItem>
								<asp:ListItem Value="1">显示</asp:ListItem>
							</asp:DropDownList></TD>
						<TD style="WIDTH: 96px; HEIGHT: 27px" align="center">产品类型</TD>
						<TD style="HEIGHT: 27px">
							<asp:DropDownList id="ddlclass1" runat="server"></asp:DropDownList>
							<asp:DropDownList id="ddlclass2" runat="server"></asp:DropDownList></TD>
					</TR>
					<TR>
						<TD style="WIDTH: 67px" align="center">品&nbsp;&nbsp;&nbsp; 牌</TD>
						<TD style="WIDTH: 225px">
							<asp:DropDownList id="ddlclass3" runat="server"></asp:DropDownList></TD>
						<TD style="WIDTH: 96px" align="center"><FONT color="#0000ff"><FONT color="#0000ff">兑换价格￥</FONT></FONT></TD>
						<TD>
							<asp:TextBox id="txtprice" runat="server" CssClass="textbox"></asp:TextBox><FONT color="#0000ff">系统会自动转换成金币数</FONT></TD>
					</TR>
					<TR>
						<TD align="center" colSpan="4">首页推荐
							<asp:DropDownList id="ddltj" runat="server">
								<asp:ListItem Value="是">是</asp:ListItem>
								<asp:ListItem Value="否" Selected="True">否</asp:ListItem>
							</asp:DropDownList>&nbsp; 特价产品
							<asp:DropDownList id="ddljj" runat="server">
								<asp:ListItem Value="是">是</asp:ListItem>
								<asp:ListItem Value="否" Selected="True">否</asp:ListItem>
							</asp:DropDownList>&nbsp; 今日推荐
							<asp:DropDownList id="ddlday" runat="server">
								<asp:ListItem Value="是">是</asp:ListItem>
								<asp:ListItem Value="否" Selected="True">否</asp:ListItem>
							</asp:DropDownList></TD>
					</TR>
				</TABLE>
				<TABLE id="Table1" style="FONT-SIZE: 12px; WIDTH: 704px; HEIGHT: 604px" cellSpacing="0"
					cellPadding="0" width="704" border="1">
					<TR>
						<TD style="WIDTH: 88px; HEIGHT: 294px" vAlign="middle" align="center"><FONT face="宋体">奖品介绍</FONT></TD>
						<TD style="HEIGHT: 294px"><FONT color="#ff0000">
								<FTB:FreeTextBox id="FreeTextBox1" runat="server"></FTB:FreeTextBox></FONT></TD>
					</TR>
					<TR>
						<TD style="WIDTH: 88px; HEIGHT: 81px" align="center"><FONT face="宋体">图片</FONT></TD>
						<TD style="HEIGHT: 81px" vAlign="middle"><FONT face="宋体"><BR>
								<TABLE id="Table10" style="WIDTH: 630px; HEIGHT: 69px" borderColor="gainsboro" cellSpacing="0"
									borderColorDark="#ffffff" cellPadding="0" width="630" border="1">
									<TR>
										<TD style="WIDTH: 118px" align="center">
											<asp:image id="imgpro" runat="server" Height="65px" Width="76px" AlternateText="没上传图片"></asp:image></TD>
										<TD align="left"><INPUT class="textbox" id="File1" style="BORDER-RIGHT: gainsboro 1px solid; BORDER-TOP: gainsboro 1px solid; BORDER-LEFT: gainsboro 1px solid; WIDTH: 257px; BORDER-BOTTOM: gainsboro 1px solid; HEIGHT: 22px"
												type="file" size="23" name="File1" runat="server">&nbsp;
											<asp:button id="bntimgFtp" runat="server" ForeColor="Black" Height="19px" Text="上传" Width="48px"
												BorderStyle="None" BorderWidth="1px" BorderColor="Control" BackColor="Control"></asp:button>&nbsp;
											<asp:button id="bntDelimg" runat="server" ForeColor="Black" Height="19px" Text="删除" Width="48px"
												BorderStyle="None" BorderWidth="1px" BorderColor="Control" BackColor="Control"></asp:button><BR>
											&nbsp; (图片大小为150*150,这样您的网站更美观)</TD>
									</TR>
								</TABLE>
							</FONT>
						</TD>
					</TR>
					<TR>
						<TD style="WIDTH: 88px; HEIGHT: 255px" vAlign="top" align="center"><FONT face="宋体">相关图片</FONT></TD>
						<TD style="HEIGHT: 255px"><FONT face="宋体">
								<TABLE id="Table11" style="WIDTH: 630px; HEIGHT: 177px" cellSpacing="0" cellPadding="0"
									width="630" border="0">
									<TR>
										<TD style="WIDTH: 366px; HEIGHT: 67px" vAlign="top" align="center"><BR>
											<TABLE id="Table12" style="WIDTH: 446px; HEIGHT: 120px" borderColor="gainsboro" cellSpacing="0"
												borderColorDark="#ffffff" cellPadding="1" width="446" border="1">
												<TR>
													<TD><INPUT class="textbox" id="File2" style="BORDER-RIGHT: gainsboro 1px solid; BORDER-TOP: gainsboro 1px solid; BORDER-LEFT: gainsboro 1px solid; WIDTH: 280px; COLOR: #009900; BORDER-BOTTOM: gainsboro 1px solid; HEIGHT: 22px"
															type="file" size="27" name="File1" runat="server">&nbsp;
														<asp:button id="butimgG1" runat="server" ForeColor="Black" Height="19px" Text="上传1" Width="48px"
															BorderStyle="None" BorderWidth="1px" BorderColor="Control" BackColor="Control"></asp:button>&nbsp;
														<asp:button id="Button1" runat="server" ForeColor="Black" Height="19px" Text="删除1" Width="48px"
															BorderStyle="None" BorderWidth="1px" BorderColor="Control" BackColor="Control"></asp:button></TD>
												</TR>
												<TR>
													<TD><INPUT class="textbox" id="File3" style="BORDER-RIGHT: gainsboro 1px solid; BORDER-TOP: gainsboro 1px solid; BORDER-LEFT: gainsboro 1px solid; WIDTH: 280px; COLOR: #009900; BORDER-BOTTOM: gainsboro 1px solid; HEIGHT: 22px"
															type="file" size="27" name="File1" runat="server">&nbsp;
														<asp:button id="butimgG2" runat="server" ForeColor="Black" Height="19px" Text="上传2" Width="48px"
															BorderStyle="None" BorderWidth="1px" BorderColor="Control" BackColor="Control"></asp:button>&nbsp;
														<asp:button id="Button2" runat="server" ForeColor="Black" Height="19px" Text="删除2" Width="48px"
															BorderStyle="None" BorderWidth="1px" BorderColor="Control" BackColor="Control"></asp:button></TD>
												</TR>
												<TR>
													<TD><INPUT class="textbox" id="File4" style="BORDER-RIGHT: gainsboro 1px solid; BORDER-TOP: gainsboro 1px solid; BORDER-LEFT: gainsboro 1px solid; WIDTH: 280px; COLOR: #009900; BORDER-BOTTOM: gainsboro 1px solid; HEIGHT: 22px"
															type="file" size="27" name="File1" runat="server">&nbsp;
														<asp:button id="butimgG3" runat="server" ForeColor="Black" Height="19px" Text="上传3" Width="48px"
															BorderStyle="None" BorderWidth="1px" BorderColor="Control" BackColor="Control"></asp:button>&nbsp;
														<asp:button id="Button3" runat="server" ForeColor="Black" Height="19px" Text="删除3" Width="48px"
															BorderStyle="None" BorderWidth="1px" BorderColor="Control" BackColor="Control"></asp:button></TD>
												</TR>
												<TR>
													<TD><INPUT class="textbox" id="File5" style="BORDER-RIGHT: gainsboro 1px solid; BORDER-TOP: gainsboro 1px solid; BORDER-LEFT: gainsboro 1px solid; WIDTH: 280px; COLOR: #009900; BORDER-BOTTOM: gainsboro 1px solid; HEIGHT: 22px"
															type="file" size="27" name="File1" runat="server">&nbsp;
														<asp:button id="butimgG4" runat="server" ForeColor="Black" Height="19px" Text="上传4" Width="48px"
															BorderWidth="1px" BorderColor="Control" BackColor="Control"></asp:button>&nbsp;
														<asp:button id="Button4" runat="server" ForeColor="Black" Height="19px" Text="删除4" Width="48px"
															BorderStyle="None" BorderWidth="1px" BorderColor="Control" BackColor="Control"></asp:button></TD>
												</TR>
											</TABLE>
											&nbsp;&nbsp;</TD>
									</TR>
									<TR>
										<TD vAlign="top" align="center">
											<asp:image id="imgG1" runat="server" Height="60px" Width="72px" AlternateText="相关图片(1)"></asp:image>&nbsp;
											<asp:image id="imgG2" runat="server" Height="60px" Width="72px" AlternateText="相关图片(2)"></asp:image>&nbsp;&nbsp;
											<asp:image id="ImgG3" runat="server" Height="60px" Width="72px" AlternateText="相关图片(3)"></asp:image>&nbsp;
											<asp:image id="ImgG4" runat="server" Height="60px" Width="72px" AlternateText="相关图片(4)"></asp:image></TD>
									</TR>
								</TABLE>
							</FONT>
						</TD>
					</TR>
				</TABLE>
				<asp:panel id="Panel1" runat="server" HorizontalAlign="Center" Height="36px" Width="500px">
					<FONT face="宋体">
						<BR>
						<asp:Button id="butedit" runat="server" CssClass="button" Height="25px" Text="修 改" Width="65px"></asp:Button>&nbsp;
						<asp:Button id="butagain" runat="server" CssClass="button" Height="25px" Text="取 消" Width="65px"></asp:Button></FONT></asp:panel>
			</asp:panel>
		</form>
	</body>
</HTML>
