<%@ Page Language="C#" MasterPageFile="MasterPage.Master" AutoEventWireup="true" CodeBehind="ThemeActivityAdd.aspx.cs" Inherits="SocoShop.Web.Admin.ThemeActivityAdd" %>
<%@ Register Namespace="SkyCES.EntLib" Assembly="SkyCES.EntLib" TagPrefix="SkyCES"%>
<%@ Import Namespace="SocoShop.Entity" %>
<%@ Import Namespace="SocoShop.Common" %>
<%@ Import Namespace="SocoShop.Business" %>
<asp:Content ID="MasterContent" ContentPlaceHolderID="ContentPlaceHolder" runat="server">
<script language="javascript" type="text/javascript" src="/Admin/Js/Color.js"></script>
<script language="javascript" type="text/javascript" src="/Admin/js/ProductGroupAdd.js"></script>	
<script type="text/javascript" src="/Admin/Pop/lhgdialog_ex.js"></script>	 
<div class="position"><img src="/Admin/Style/Images/PositionIcon.png"  alt=""/>专题活动<%=ShopCommon.GetAddUpdate()%></div>
<div  class="listBlock">
    <ul>
        <li class="listOn" id="TitleDefault" onclick="SwitchBlock('Default')">基本设置</li>
        <li id="TitleProduct" onclick="SwitchBlock('Product')">专题商品</li>
        <li id="TitleCss" onclick="SwitchBlock('Css')">样式设置</li>
    </ul>	
</div>
<div class="line"></div>
<div class="add" id="ContentDefault">
	<ul>
		<li class="left">活动名称：</li>
		<li class="right"><SkyCES:TextBox ID="Name" CssClass="input" runat="server" Width="400px" CanBeNull="必填" /></li>
	</ul>
	<ul>
		<li class="left">图片：</li>
		<li class="right"><SkyCES:TextBox ID="Photo" CssClass="input" runat="server" Width="400px" /></li>
	</ul>
	<ul>
		<li class="left">上传图片：</li>
		<li class="right"><iframe src="UploadAdd.aspx?Control=Photo&TableID=<%=ThemeActivityBLL.TableID %>&FilePath=ThemeActivityPhoto/Original" width="400" height="30px" frameborder="0" allowTransparency="true" scrolling="no"></iframe></li>
	</ul> 
	<ul>
		<li class="left">描述：</li>
		<li class="right"><SkyCES:TextBox ID="Description" CssClass="input" runat="server" Width="400px"  TextMode="MultiLine" Height="100px"/></li>
	</ul>
</div>
<div class="add" id="ContentProduct" style="display:none">	
    <ul>
		<li class="left"></li>
		<li class="right"><input type="button" class="button" onclick="childPop('ProductGroupAdd.aspx?ThemeActivityID=<%=strThemeActivityID %>',650,600,'增加产品组','ProductGroupAdd')" value="增加产品组"  style="width:80px" /></li>
	</ul>
	<div id="ProductGroup">
    <%int i = 0; if (photoArray.Length > 0)
      {
          for (i = 0; i < photoArray.Length; i++)
          { %>
    <span id="ProductGroup<%=i %>" class="themeActivityBlock">
    <input type="button" class="button" onclick="childPop('ProductGroupAdd.aspx?Action=Update&ID=<%=i %>&ThemeActivityID=<%=strThemeActivityID %>',650,600,'修改产品组','ProductGroupAdd')" value="修改产品组"  style="width:80px" />
    <input type="button" class="button" onclick="DeleteProductGroup(<%=i %>)" value="删除产品组"  style="width:80px" />
    <input name="ProductGroupValue<%=i %>" id="ProductGroupValue<%=i %>"  type="hidden"  value="<%=photoArray[i]%>|<%=linkArray[i] %>|<%=idArray[i]%>"/>
	<ul>
		<li class="left">图片：</li>
		<li class="right"><%if (photoArray[i] != string.Empty)
                      { %><img src="<%=photoArray[i]%>" height="60" /><%} %></li>
	</ul>	
	<ul>
		<li class="left">更多地址：</li>
		<li class="right"><%=linkArray[i]%></li>
	</ul>	
	<ul>
		<li class="left">商品：</li>
		<li class="right"><% string nameList = string.Empty; if (idArray[i] != string.Empty)
                       {
                           foreach (string id in idArray[i].Split(','))
                           {
                               nameList += ReadProduct(productList, Convert.ToInt32(id)).Name.Replace(",", "") + ",";%>
		    <div class="themeActivityPhoto"><img  src="<%=ReadProduct(productList,Convert.ToInt32(id)).Photo%>" alt=""  onload="photoLoad(this,60,60)"  title="<%=ReadProduct(productList, Convert.ToInt32(id)).Name%>"/><br /><%=ReadProduct(productList, Convert.ToInt32(id)).Name%></div>
		    <%}
                       } %>
		</li>
	</ul>
	 <input name="ProductGroupNameValue<%=i %>" id="ProductGroupNameValue<%=i %>"  type="hidden"  value="<%if (nameList != string.Empty) { ResponseHelper.Write(nameList.Substring(0, nameList.Length - 1)); }%>"/>
	</span>	
	<%}
      }%>
	</div>
	<input type="hidden" name="ProductGroupCount" id="ProductGroupCount" value="<%=i %>" />
</div>
<div class="add" id="ContentCss" style="display:none">	
	<ul>
		<li class="left">Css样式：</li>
		<li class="right"><SkyCES:TextBox ID="Css" CssClass="input" runat="server" Width="400px"  TextMode="MultiLine" Height="100px" /></li>
	</ul>
	<ul>
		<li class="left">顶部图片：</li>
		<li class="right"><SkyCES:TextBox ID="TopImage" CssClass="input" runat="server" Width="400px" /></li>
	</ul>
	<ul>
		<li class="left">上传图片：</li>
		<li class="right"><iframe src="UploadAdd.aspx?Control=TopImage&TableID=<%=ThemeActivityBLL.TableID %>&FilePath=ThemeActivityCss/Original" width="400" height="30px" frameborder="0" allowTransparency="true" scrolling="no"></iframe></li>
	</ul> 
	<ul>
		<li class="left">背景图片：</li>
		<li class="right"><SkyCES:TextBox ID="BackgroundImage" CssClass="input" runat="server" Width="400px" /></li>
	</ul>
	<ul>
		<li class="left">上传图片：</li>
		<li class="right"><iframe src="UploadAdd.aspx?Control=BackgroundImage&TableID=<%=ThemeActivityBLL.TableID %>&FilePath=ThemeActivityCss/Original" width="400" height="30px" frameborder="0" allowTransparency="true" scrolling="no"></iframe></li>
	</ul> 
	<ul>
		<li class="left">底部图片：</li>
		<li class="right"><SkyCES:TextBox ID="BottomImage" CssClass="input" runat="server" Width="400px" /></li>
	</ul>
	<ul>
		<li class="left">上传图片：</li>
		<li class="right"><iframe src="UploadAdd.aspx?Control=BottomImage&TableID=<%=ThemeActivityBLL.TableID %>&FilePath=ThemeActivityCss/Original" width="400" height="30px" frameborder="0" allowTransparency="true" scrolling="no"></iframe></li>
	</ul> 
	<ul>
		<li class="left">商品名称颜色：</li>
		<li class="right"><SkyCES:TextBox ID="ProductColor" CssClass="input" runat="server" Width="100px"  Text="#000000" CanBeNull="必填" /> <input id="name" type="button" value=" 拾色器 " class="button" onclick="doDialog('ctl00_ContentPlaceHolder_ProductColor','ctl00_ContentPlaceHolder_ProductColor')"/></li>
		<li class="left">商品名称大小：</li>
		<li class="right"><SkyCES:TextBox ID="ProductSize" CssClass="input" runat="server" Width="100px" Text="12" CanBeNull="必填" RequiredFieldType="数据校验" /></li>
	</ul>
	<ul>
		<li class="left">商品价格颜色：</li>
		<li class="right"><SkyCES:TextBox ID="PriceColor" CssClass="input" runat="server" Width="100px"  Text="#000000" CanBeNull="必填" /> <input id="price" type="button" value=" 拾色器 " class="button" onclick="doDialog('ctl00_ContentPlaceHolder_PriceColor','ctl00_ContentPlaceHolder_PriceColor')"/></li>
		<li class="left">商品价格大小：</li>
		<li class="right"><SkyCES:TextBox ID="PriceSize" CssClass="input" runat="server" Width="100px" Text="12" CanBeNull="必填" RequiredFieldType="数据校验" /></li>
	</ul>
	<ul>
		<li class="left">其他文字颜色：</li>
		<li class="right"><SkyCES:TextBox ID="OtherColor" CssClass="input" runat="server" Width="100px"  Text="#000000" CanBeNull="必填" /> <input id="other" type="button" value=" 拾色器 " class="button" onclick="doDialog('ctl00_ContentPlaceHolder_OtherColor','ctl00_ContentPlaceHolder_OtherColor')"/></li>
		<li class="left">其他文字大小：</li>
		<li class="right"><SkyCES:TextBox ID="OtherSize" CssClass="input" runat="server" Width="100px" Text="12" CanBeNull="必填" RequiredFieldType="数据校验" /></li>
	</ul>
</div>
<div class="action">
    <asp:Button CssClass="button" ID="SubmitButton" Text=" 确 定 " runat="server"  OnClick="SubmitButton_Click" />
</div>
</asp:Content>
