<%@	Page language="c#" Codebehind="NewsAdd.aspx.cs"	AutoEventWireup="true"	Inherits="XpShop.Manage.NewsAdd" validateRequest="false"%>
<%@	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>NewsAdd</title>
	    <script src="inc/calendar.js" type="text/javascript"></script>
		<script type="text/javascript" src='inc/NewsAdd.js'></script>
	    <script type="text/javascript" src="inc/jquery.easydrag.handler.beta2.js"></script>
	    <script type="text/javascript" src="inc/multi_popup.js"></script>
	    <link type="text/css" rel="stylesheet" href="style/multi_popup.css" />
		<script type="text/javascript" src="inc/PageBar.js"></script>
		<script type="text/javascript">
		    var NewsID = '<%=Request.QueryString["NewsID"] %>';
		</script>
		<script type="text/javascript">
		    $(document).ready(function(){
				//--默认时间
				$('#txtDate').click(function(){
					 setDayHM(this);
				});
		    });
		</script>
		<style type="text/css">
		    .c1 {width:20%}
		    .c2 {width:20%}
		    .c3 {width:20%}
		    .c4 {width:20%}
		    .c5 {width:20%}
		</style>
	</HEAD>
	<body>
	    <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" />新闻添加</div>
		<div class="sub_container_content">
		<form id="Form1" method="post" runat="server">
		    <div class="frame">
		        <div class="frame_title"><asp:Label id="lblAction" runat="server" >添加</asp:Label>新闻</div>
		        <div class="frame_content">
		            <table class="ptable" cellspacing="0" cellpadding="0">
						<tr>
							<th class="tl">新闻标题：</th>
							<td class="tr"><font color="red"><asp:textbox id="txtTitle" runat="server" Width="123px"></asp:textbox>*<asp:CheckBox id="ckIsFormatRed" runat="server" Text="加红加粗"></asp:CheckBox></font></td>
							<th class="tl">关键字：</th>
							<td class="tr"><asp:textbox id="txtKeys" runat="server" Width="180px"></asp:textbox></td>
						</tr>
						<tr>
							<th class="tl">所属分类：</th>
							<td class="tr"><asp:dropdownlist id="ddlNewsCategories" runat="server"></asp:dropdownlist><FONT color="red">*</FONT></td>
							<th class="tl">属性：</th>
							<td class="tr">
								<asp:CheckBox id="cbxIsTop"	runat="server" Text="置顶"></asp:CheckBox>
								<asp:CheckBox id="cbxIsBest" runat="server"	Text="推荐"></asp:CheckBox>
							</td>
						</tr>
						<tr>
							<th class="tl">作者：</th>
							<td class="tr"><asp:textbox id="txtAuthor"	runat="server" Width="150px"></asp:textbox></td>
							<th class="tl">出处：</th>
							<td class="tr"><asp:textbox id="txtFrom" runat="server" Width="150px"></asp:textbox></td>
						</tr>
						<tr>
							<th class="tl">文章图片：</th>
							<td class="tr"><INPUT id="File1" type="file" name="file1" runat="server"><FONT	face="宋体">(文章首页缩略图)</FONT></td>
							<th class="tl">审核状态：</th>
							<td class="tr">
							    <asp:RadioButtonList ID="rblPass" runat="server" RepeatDirection="horizontal">
							        <asp:ListItem Value="1">审核通过</asp:ListItem>
							        <asp:ListItem Value="-1">审核不通过</asp:ListItem>
							    </asp:RadioButtonList>
							</td>
						</tr>
						<tr>
						    <th class="tl">时间：</th>
						    <td class="tr"><asp:TextBox Runat="server" ID="txtDate" ReadOnly="true" style="line-height:18px;background-image:url(images/calendar.gif);background-repeat:no-repeat;padding-left:20px;"></asp:TextBox></td>
						    <th class="tl"></th>
						    <td class="tr"></td>
						</tr>
						<tr>
							<th class="tl">新闻内容：</th>
							<td class="tr" colspan="3"><FTB:FREETEXTBOX id="ftbContent" runat="Server"	Width="900"	ImageGalleryPath="Upload/" ToolbarType="OfficeXP"
									ButtonPath="images/ftb/officeXP/" ButtonDownImage="True" ButtonOverImage="True"></FTB:FREETEXTBOX></td>
						</tr>
						<tr>
						    <th class="tl">相关商品：</th>
						    <td class="tr" colspan="3">
						        <table cellspacing="0" cellpadding="0" class="ptable">
									<tr>
										<td colspan="2" class="mm">	
											选择商品：
											<input type="button" id="btnAddRelate" value="添加" class="inputbtn" />
											<input type="hidden" id="RltPID_old" name="RltPID_old" /><%--记录数据库中已经存在的相关商品ID--%>
											<input type="hidden" id="RltPID_curr" name="RltPID_curr" /><%--记录当前页面中存在的相关商品ID--%>
											<input type="hidden" id="RltPID_new" name="RltPID_new" /><%--记录要添加到数据库中的新ID--%>
											<input type="hidden" id="RltPID_deleted" name="RltPID_deleted" /><%--记录要从数据库中删除的ID--%>
										</td>
									</tr>
									<tr>
										<td colspan="2" class="mm">
											<table id="listresult" border="1" cellspacing="0" bordercolor="#000000" bordercolordark="#FFFFFF" bgcolor="#FFFFFF" class="listresult">
												<tr>
													<th>操作</th>
													<th>商品代码</th>
													<th>商品名称</th>
												</tr>
												<asp:Repeater ID="rptRltPdts" runat="server">
													<ItemTemplate>
														<tr>
															<td class="delete"><img src="images/x-gray.gif" alt="删除" /><input type="hidden" name="rltpid" value='<%#DataBinder.Eval(Container.DataItem,"ProductID") %>'/></td>
															<td><%#DataBinder.Eval(Container.DataItem,"ProductNo") %></td>
															<td><%#DataBinder.Eval(Container.DataItem,"ProductName") %></td>
														</tr>
													</ItemTemplate>
												</asp:Repeater>
											</table>
										</td>
									</tr>								
								</table>		
						    </td>
						</tr>
						<tr>
						    <th class="tl"></th>
							<td class="tr" colSpan="3"><asp:button id="btnSave" OnClick="btnSave_Click"	runat="server" Text="保存" CssClass="inputbtn"></asp:button><FONT face="宋体">&nbsp;</FONT>
								<asp:Button	id="btnBack" OnClick="btnBack_Click" runat="server"	Text="返回" CssClass="inputbtn"></asp:Button></td>
						</tr>
					</table>
		        </div>
	        </div>
		</form>
		</div>
		</div>
		</div>
		
		<div id="popupContact" class="popupContact" style="z-index:2;">
            <div id="popupHead" class="popupHead">
                <div class="popupTitle">高级搜索</div>
                <div class="popupClose" id="popupContactClose" title="关闭">关闭</div>
                <div style="clear:both;"></div>
            </div>
            <div style="position:relative; padding:0px; text-align:center;">
                <div id="content" style="width:98%; position:relative;">
                    <div>
                        <select id="sel_searchType" name="sel_searchType">
                            <option value="1">商品编号</option>
                            <option value="2">商品名称</option>
                            <option value="3">商品关键词</option>
                        </select>
                        <input type="text" id="txtKeyword" name="txtKeyword" />
                        <input type="button" id="btnSearch" name="btnSearch" value="搜索" class="inputbtn" />
                        <a id="showadvsearch" class="hand">高级搜索</a>
                    </div>
                    <div id="advsearch" style="display:none; position:absolute; top:30px; background:#fff;">
                        <select id="sel_category" name="sel_category" size="10" multiple="multiple">
                            <%=BindCategories() %>
                        </select>
                        <select id="sel_brand" name="sel_brand" size="10" multiple="multiple">
                            <%=BindBrand("0")%>
                        </select>
                    </div>
                    <div class="sub_container_listhead" style="padding:0px;">
                        <table cellSpacing="0" cellPadding="0" class="llist">
                            <tr id="listhead"><%--id="listhead"不能少--%>
                                <th class="c1"><input type="checkbox" id="chkAll" name="chkAll" /></th>
                                <th class="c2">商品名称</th>
                                <th class="c3">商品代码</th>
                                <th class="c4">商品类别</th>
                                <th class="c5">商品品牌</th>
                            </tr>
                        </table>
                    </div>
                    <div id="datacontainer" style="padding:0px;overflow-x:hidden;overflow-y:scroll;">
	                    <table id="datas" cellSpacing="0" cellPadding="0" class="llist">
		                    <tr id="template" style="display:none;"><%--id="template"不能少--%>
			                    <td class="c1 ccenter" id="checkbox"></td>
			                    <td class="c2" id="Name"></td>
			                    <td class="c3" id="ProductNo"></td>
			                    <td class="c4 ccenter" id="Category"></td>
			                    <td class="c5 ccenter" id="Brand"></td>
		                    </tr>
	                    </table>
                    </div>
                    <div class="sub_container_page" id="pageDataList1_Pager" style="position:relative;">
                        <!-- 翻页-->
                        <!-- 翻页结束-->
                    </div>
                    <div id="divsave" style=" text-align:center; position:relative;"><input type="button" id="btnSubmit" value="确认" class="inputbtn" /><input type="hidden" id="PIDs" name="PIDs" value="" /></div>
	            </div>
                <div style="clear:both;"></div>
            </div>
        </div>
        <div id="backgroundPopup" class="backgroundPopup"></div>
	</body>
</HTML>
