<%@ Control Language="c#" AutoEventWireup="false" Codebehind="Article.ascx.cs" Inherits="WebUI.MMS.Article" TargetSchema="http://schemas.microsoft.com/intellisense/ie5"%>
<%@ Register TagPrefix="N3softwareControl" Namespace="N3software.Control" Assembly="N3software.Control" %>
<script language="javascript" type="text/javascript">
<!--
function checkFormAll(chk)
{
	myform = document.forms[0];
	for( var i = 0; i < myform.elements.length; i++ )
	{
		if ( myform.elements[i].type=="checkbox" )
		{
			myform.elements[i].checked = chk;
		}
	}
}
function go(i)
{
	var theform;
	if (window.navigator.appName.toLowerCase().indexOf("netscape") > -1) {
		theform = document.forms["myform2"];
	}
	else {
		theform = document.myform2;
	}
	theform.PageIndex.value = i;
	theform.submit();		
}
//-->
</script>
<input type="hidden" name="PageIndex" id="PageIndex" value="<%= this.PageIndex%>">
	<TABLE cellSpacing="0" cellPadding="0" width="98%" align="center">
		<TR>
			<TD class="mframe-t-left"></TD>
			<TD class="mframe-t-mid"><SPAN class="mframe-t-text"><%=this.PageTitle%></SPAN></TD>
			<TD class="mframe-t-right"></TD>
		</TR>
	</TABLE>
<table class="awidth" align="center" cellspacing="0" cellpadding="0">
<tr>
<td class="mframe-m-left" width=1> </td>
<td class="mframe-m-mid">	

<asp:Panel id="pnlAdd" runat="server">		
  <TABLE id="Table1" cellSpacing="1" cellPadding="3" width="98%" align="center">
  <TR>
  <TD width="60%"></TD>
  <TD rowspan="6">
	<TABLE cellSpacing="1" cellPadding="1" align="center" border="0">
		<TR>
			<TD align="center">
			<IMG id="imgPhoto" height="130" width="150" runat="server">
			</TD>
		</TR>
		<TR>
			<TD align="center">
			<INPUT class="submit" onclick="window.open('?mms=MMS^UploadFile&amp;action=upload&amp;imgPhoto=_ctl0_imgPhoto&amp;hidPhoto=_ctl0_hidPhoto&amp;file='+document.myform2._ctl0_hidPhoto.value, '', 'Left=300,Top=230,Width=430px,Height=270px');"
					type="button" value="上 传" name="upload"> 
			<INPUT class="submit" onclick="window.open('?mms=MMS^UploadFile&amp;action=delete&amp;imgPhoto=_ctl0_imgPhoto&amp;hidPhoto=_ctl0_hidPhoto&amp;file='+document.myform2._ctl0_hidPhoto.value, '', 'Left=300,Top=230,Width=430px,Height=270px');"
					type="button" value="删 除" name="del"> 
			<INPUT id="hidPhoto" type="hidden" runat="server" NAME="hidPhoto">
			</TD>
		</TR>
	</TABLE>  
  </TD>
  </TR>
  
    <TR> 
      <TD width="10%">
      文章标题：
      <asp:TextBox id="txtTitle" Width="320" runat="server"></asp:TextBox>
      </TD>
      <TD></TD>
    </TR>
    
    <TR> 
      <TD>
       所属栏目：
       <asp:DropDownList id="ddlClass" Width="180" runat="server"/>
       <asp:Button id="btnTemplate" Text="套用模板" runat="server"/>
      </TD>
      <TD></TD>
    </TR>
    
    <TR> 
      <TD>
      外部连接：
      <asp:TextBox id="txtLink" Width="320" runat="server"></asp:TextBox>
      </TD>
      <TD></TD>
    </TR>
    
    <!--
    <TR>
    <TD>
    文章图片： <asp:TextBox id="txtPhoto" Width="360" runat="server"/> <input type="button" value="上 传"> <input type="button" value="查 看"> 
    </TD>
    </TR>      
    -->
    
    <TR>
    <TD>
    关 键 字： <asp:TextBox id="txtMutuality" Width="320" runat="server"/>
    </TD>
    <TD></TD>
    </TR>      
    
    <TR>
    <TD>文章简介： <asp:TextBox ID="txtIntroduction" TextMode="MultiLine" Width="320" Height="50" Runat="server"></asp:TextBox>
    </TD>
    <TD></TD>
    </TR>
    
    <TR> 
      <TD colspan="2">
      显示状态：
       <asp:DropDownList id="ddlDisplay" runat="server"> 
       <asp:ListItem Value="1">显示</asp:ListItem>
       <asp:ListItem Value="0">隐藏</asp:ListItem>
       </asp:DropDownList>
      &nbsp;
      属性：
       <asp:DropDownList id="ddlAttribute" runat="server"> 
       <asp:ListItem Value="0">一般</asp:ListItem>
       <asp:ListItem Value="1">推荐</asp:ListItem>
       <asp:ListItem Value="2">热点</asp:ListItem>
       </asp:DropDownList>
      &nbsp;      
      排序：
      <asp:TextBox id="txtOrder" runat="server" Text="0" Width="100"></asp:TextBox>
      &nbsp;
	  作者：<asp:TextBox id="txtAuthor" Width="100" runat="server"/>
	  &nbsp;
      来源：<asp:TextBox id="txtSource" Width="150" runat="server"/>      
      </TD>
    </TR>  
  
    <TR>
    <TD height="450" colspan="2">
    <N3softwareControl:EditorControl id="EditorControl1" runat="server" MenuStatus="3" Value=""></N3softwareControl:EditorControl>
    </TD></TR>
    <TR> 
      <TD align="center" colspan="2"> <asp:Button id="Submit" runat="server" Text="提  交"></asp:Button></TD>
    </TR>
  </TABLE>
</asp:Panel>
	
	
<asp:Panel id="pnlList" runat="server">
				<ASP:DataGrid id="DataGrid1" runat="server" Width="100%" OnItemCreated="DataGrid1_ItemCreated"
					CellPadding="0" CellSpacing="0" ItemStyle-CssClass="tdbg"
					AutoGenerateColumns="false" ShowFooter="false"
					ShowHeader="True" Align="center" AllowPaging="True">
					<PagerStyle Visible="False"/>
					<HeaderStyle HorizontalAlign="center" CssClass="summary-title" Height="25" />
					<ItemStyle Height="22" />
					<EditItemStyle CssClass="tdbg-dark" />
					<Columns>
						<asp:TemplateColumn ItemStyle-Width="5%" ItemStyle-HorizontalAlign="center">
							<ItemTemplate>
								<a href="?mms=<%#Request["mms"].ToString()%>&action=edit&id=<%# DataBinder.Eval(Container.DataItem, "ID")%>">修改</a>
							</ItemTemplate>
						</asp:TemplateColumn>
						<asp:TemplateColumn ItemStyle-Width="35%" HeaderText="文章标题">
							<ItemTemplate>
								&nbsp;<a href="?mms=<%#Request["mms"].ToString()%>&action=edit&id=<%# DataBinder.Eval(Container.DataItem, "ID")%>"><%# DataBinder.Eval(Container.DataItem, "Title")%></a>
							</ItemTemplate>
						</asp:TemplateColumn>						
						<asp:BoundColumn HeaderText="所属栏目" DataField="ClassName" ReadOnly="true">
							<ItemStyle HorizontalAlign="Center" Width="15%" />
						</asp:BoundColumn>
						<asp:BoundColumn HeaderText="操作员" DataField="Operater" ReadOnly="true">
							<ItemStyle HorizontalAlign="Center" Width="10%" />
						</asp:BoundColumn>	
						<asp:BoundColumn HeaderText="日期" DataField="ActDatetime" ReadOnly="true">
							<ItemStyle HorizontalAlign="Center" Width="12%" />
						</asp:BoundColumn>							
						<asp:TemplateColumn ItemStyle-Width="5%" ItemStyle-HorizontalAlign="center" HeaderText="<input type='checkbox' onclick='checkFormAll(this.checked)'>">
							<ItemTemplate>
								<input type="checkbox" name="chk" value='<%# DataBinder.Eval(Container.DataItem, "ID")%>' />
							</ItemTemplate>
						</asp:TemplateColumn>
					</Columns>
				</ASP:DataGrid>
				<table width="100%"><tr><td height="25" align="center"><%= this.PageNavigation%></td></tr></table>				
	<table align="center" width="100%" height="30">
	<tr>
	<td>
	<asp:DropDownList id="ddlClass2" runat="server"> 
       <asp:ListItem Value="0">所有栏目</asp:ListItem>
    </asp:DropDownList> <asp:Button ID="btnSearch" Text="查 询" Runat="server"/>
	</td>
	<td align="right"><input type="button" value="添 加" onclick="location.href='?mms=<%=Request["mms"]%>&action=add'"> &nbsp;&nbsp; <asp:Button ID="btnDelete" Runat="server" OnClick="Delete_OnClick" Text="删 除" /></td></tr></table>
</asp:Panel>


</td>
<td class="mframe-m-right" width=1> </td>
</tr>
</table>
<TABLE cellSpacing="0" cellPadding="0" width="98%" align="center">
	<TR>
		<TD class="mframe-b-left"></TD>
		<TD class="mframe-b-mid">&nbsp;</TD>
		<TD class="mframe-b-right"></TD>
	</TR>
</TABLE>