<%@ Page language="c#" Codebehind="Union.aspx.cs" AutoEventWireup="true" Inherits="XpShop.Manage.Union"%>
<%@ Register TagPrefix="ftb" Namespace="FreeTextBoxControls" Assembly="FreeTextBox" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<HTML>
	<HEAD>
	    <!--#include file="inc/head.inc"-->
		<title>Union</title>
		<script language="javascript" src="../inc/overlib.js"></script>
	</HEAD>
	<body MS_POSITIONING="GridLayout">
	    <div class="container">
		<div class="sub_container">
		<div class="sub_container_title"><a href="<%=AdminDefault%>" target="_top">桌面</a><img src="images/admin_title.jpg" height=9px width=8px align="absmiddle" />
		    <%if (this.Request.QueryString["action"] != "Manage"){%>推广方式添加<%}else{%>推广方式列表<%}%>
	    </div>
		<div class="sub_container_content">
		<form id="Form1" method="post" runat="server">
		    <div class="frame">
		        <div class="frame_title"><asp:label id="lbTitle" Runat="server">推广方式添加</asp:label></div>
		        <div class="frame_content">
		            <table class="tableBorder" cellSpacing="1" cellPadding="1" width="25%" align="center" border="0">
				        <tr>
					        <td class="forumRowHighlight">
					            <%if (this.Request.QueryString["action"] == "Manage"){%>
						             <asp:datagrid id="dgList" runat="server" PageSize="15" PagerStyle-Mode="NumericPages" AutoGenerateColumns="False"
							        DataKeyField="UnionID" Width="100%" HorizontalAlign="Center" HeaderStyle-CssClass="summary-title">
							        <HeaderStyle Font-Bold="True" CssClass="summary-title"></HeaderStyle>
							        <Columns>
								        <asp:TemplateColumn HeaderText="描述">
									        <HeaderStyle HorizontalAlign="Left"></HeaderStyle>
									        <ItemStyle HorizontalAlign="Left" Width="200px"></ItemStyle>
									        <ItemTemplate>
										        <%# DataBinder.Eval(Container.DataItem, "UnionName") %>
									        </ItemTemplate>
								        </asp:TemplateColumn>
								        <asp:TemplateColumn HeaderText="图片">
									        <HeaderStyle HorizontalAlign="Center"></HeaderStyle>
									        <ItemStyle HorizontalAlign="Center" Width="50px"></ItemStyle>
									        <ItemTemplate>
										        <a href="#" onmouseover="return overlib(&quot;<IMG SRC=../Upload/Union/<%# DataBinder.Eval(Container.DataItem, "Image") %>>&quot;, CAPTION, &quot;<%# DataBinder.Eval(Container.DataItem, "UnionName") %>&quot;,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>
									        <HeaderStyle HorizontalAlign="Center"></HeaderStyle>
									        <ItemStyle HorizontalAlign="Center" Width="30px"></ItemStyle>
									        <ItemTemplate>
										        <a href='Union.aspx?action=Modify&UnionID=<%# DataBinder.Eval(Container.DataItem, "UnionID") %>'>
											        修改</a>
									        </ItemTemplate>
								        </asp:TemplateColumn>
								        <asp:ButtonColumn Text="&lt;div id=&quot;de&quot; onclick=&quot;javascript:return confirm('确认删除吗？')&quot;&gt;删除&lt;/div&gt;" CommandName="Delete">
									        <ItemStyle HorizontalAlign="Center" Width="30px"></ItemStyle>
								        </asp:ButtonColumn>
							        </Columns>
							        <PagerStyle Mode="NumericPages"></PagerStyle>
						        </asp:datagrid>
						         <%}else{%>
						         <table class="ptable" cellspacing="0" cellpadding="0">
							        <tr>
								        <th class="tl">描述：</th>
								        <td class="tr"><asp:textbox id="txtName" runat="server"></asp:textbox></td>
							        </tr>
							        <tr>
								        <th class="tl">图片：</th>
								        <td class="tr"><INPUT id="fileImage" type="file" name="File1" class="file" runat="server"><br /><font color="red">*上传图片的宽度请不要超过700像素</font></td>
							        </tr>
							        <tr>
								        <th class="tl"></th>
									     <td class="tr">   <asp:button id="btnSave" OnClick="btnSave_Click" runat="server" Text="保存" CssClass="inputbtn"></asp:button>
									     <asp:button id="btnCancel" OnClick="btnCancel_Click" runat="server" Text="取消" CausesValidation="False" CssClass="inputbtn"></asp:button></td>
							        </tr>
						        </table>						       
						        <%}%>
					        </td>
				        </tr>
			        </table>
		        </div>
	        </div>
			<div id="overDiv" style="Z-INDEX: 1000; VISIBILITY: hidden; POSITION: absolute"></div>
		</form>
		</div>
		</div>
		</div>
	</body>
</HTML>
