<%@ Page Title="" Language="VB" MasterPageFile="~/App_MasterPage/mpManager.master" AutoEventWireup="false" CodeFile="ArticleList.aspx.vb" Inherits="Manager_Article_ArticleList" %>
<%@ Register assembly="ControlPageing" namespace="ControlPageing" tagprefix="cc1" %>
<%@ Register assembly="iCalendar" namespace="iCalendar" tagprefix="cc2" %>
<%@ Register assembly="HTMLEditor" namespace="HTMLEditor" tagprefix="cc3" %>
<asp:Content ID="Content1" ContentPlaceHolderID="chpPageTitle" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="chpHead" Runat="Server">
<style type="text/css">td{ height:27px;}</style>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="chpScript" Runat="Server">

</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="chpTitle" Runat="Server">
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="chpContent" Runat="Server">
    <asp:MultiView ID="MultiView1" runat="server">
        <asp:View ID="View_Edit" runat="server">
        <script type="text/javascript" src="/App_Themes/ManagerTheme/js/lhgdialog.min.js"></script>
        <script language="javascript" type="text/jscript">
            var txttitle = '<%=txtTitle.ClientID %>';
            var txtID = '';
            function showmore() {
                var more = document.getElementById("More");
                var pic = document.getElementById("Showit");
                if (more.style.display == "none") {
                    more.style.display = "";
                    pic.src = "/App_Themes/ManagerTheme/Images/Little.gif";
                }
                else {
                    more.style.display = "none";
                    pic.src = "/App_Themes/ManagerTheme/Images/More.gif";
                }
            }
            function changecolor(scolor) {
                document.getElementById(txttitle).style.color = scolor;
            }
            function changefont(sfont) {
                document.getElementById(txttitle).style.fontFamily = sfont;
            }
            function changesize(ssize) {
                document.getElementById(txttitle).style.fontSize = ssize;
            }
            function changebold(mcheck) {
                if (mcheck == true) {
                    document.getElementById(txttitle).style.fontWeight = "bold";
                } else {
                    document.getElementById(txttitle).style.fontWeight = "";
                }
            }
            function changeitalic(mcheck) {
                if (mcheck == true) {
                    document.getElementById(txttitle).style.fontStyle = "italic";
                } else {
                    document.getElementById(txttitle).style.fontStyle = "";
                }

            }
            function changeunderline(mcheck) {
                if (mcheck == true) {
                    document.getElementById(txttitle).style.textDecoration = "underline";
                } else {
                    document.getElementById(txttitle).style.textDecoration = "";
                }
            }
            function ShowFileDilag(ShowTxt) {
                if (ShowTxt != null && ShowTxt != '') {
                    $.dialog({
                        lock: true,
                        title: '选择文件',
                        content: 'url:/Manager/FileExplorer.aspx?Path=/Sites/Site<%=BaseFunction.PublicMethod.GetApplication("SiteID") %>/Template<%=BaseFunction.PublicMethod.GetApplication("DefaultGroup") %>/',
                        width: '800px',
                        height: '500px',
                        max: false,
                        min: false
                    });
                    txtID = ShowTxt;
                }
            }
            function callBack(FilePath) {
                if (txtID != null && txtID != '') {
                    document.getElementById(txtID).value = FilePath;
                }
            }
</script>
    	    <table border="0" width="100%" id="table1" cellspacing="0" cellpadding="0" class="line_table">
    	        <tr>
                    <td align="right" width="15%">标题：</td><td width="45%" style="vertical-align:bottom;height:40px;line-height:40px;layout-flow:horizontal;"><asp:TextBox ID="txtTitle" runat="server"  Width="100%" Height="40px" MaxLength="100" style="" TabIndex="3" ></asp:TextBox></td><td width="40%"><font color="red">*</font></td>
                </tr>
                <tr>
                    <td style="width: 15%; text-align: right">标题样式：</td>
				    <td style="text-align: left;width: 45%;">
                        <asp:DropDownList ID="dplColor" runat="server"  onchange="javascript:changecolor(this.value);"><asp:ListItem Selected="True" Value="">默认颜色</asp:ListItem><asp:ListItem style=" background-color:Black" Value="Black"></asp:ListItem><asp:ListItem style=" background-color:Blue" Value="Blue"></asp:ListItem><asp:ListItem style=" background-color:Fuchsia" Value="Fuchsia"></asp:ListItem><asp:ListItem style=" background-color:Gray" Value="Gray"></asp:ListItem><asp:ListItem style=" background-color:Green" Value="Green"></asp:ListItem><asp:ListItem style=" background-color:aqua" Value="aqua"></asp:ListItem><asp:ListItem style=" background-color:Lime" Value="Lime"></asp:ListItem><asp:ListItem style=" background-color:Maroon" Value="Maroon"></asp:ListItem><asp:ListItem style=" background-color:Olive" Value="Olive"></asp:ListItem><asp:ListItem style=" background-color:Purple" Value="Purple"></asp:ListItem><asp:ListItem style=" background-color:Red" Value="Red"></asp:ListItem><asp:ListItem style=" background-color:Silver" Value="Silver"></asp:ListItem><asp:ListItem style=" background-color:Teal" Value="Teal"></asp:ListItem><asp:ListItem style=" background-color:White" Value="White"></asp:ListItem><asp:ListItem style=" background-color:Yellow" Value="Yellow"></asp:ListItem></asp:DropDownList>&nbsp;&nbsp;
                        <asp:DropDownList ID="dplFont" runat="server" onchange="changefont(this.value);"><asp:ListItem Selected="True" Value="">默认字体</asp:ListItem><asp:ListItem>黑体</asp:ListItem><asp:ListItem>楷体</asp:ListItem><asp:ListItem>隶书</asp:ListItem><asp:ListItem>幼圆</asp:ListItem><asp:ListItem>仿宋</asp:ListItem><asp:ListItem>微软雅黑</asp:ListItem></asp:DropDownList>&nbsp;&nbsp;
                        <asp:DropDownList ID="dplSize" runat="server" onchange="changesize(this.value);"><asp:ListItem Selected="True" Value="">默认大小</asp:ListItem><asp:ListItem Value="xx-large">标题1</asp:ListItem><asp:ListItem Value="x-large">标题2</asp:ListItem><asp:ListItem Value="large">标题3</asp:ListItem><asp:ListItem Value="medium">标题4</asp:ListItem><asp:ListItem Value="small">标题5</asp:ListItem><asp:ListItem Value="x-small">标题6</asp:ListItem></asp:DropDownList>&nbsp;&nbsp;
                        <asp:CheckBox ID="chkBold" runat="server" onclick="changebold(this.checked);" Text="字体加粗" />&nbsp;
                        <asp:CheckBox ID="chkItalic" runat="server" onclick="changeitalic(this.checked);" Text="字体倾斜" />&nbsp;
                        <asp:CheckBox ID="chkUnderline" runat="server" onclick="changeunderline(this.checked);" Text="下划线" /></td><td style="width: 40%">&nbsp;
                    </td>
                </tr>
                <tr>
                    <td align="right" width="15%">副标题：</td><td width="45%"><asp:TextBox ID="txtscTitle" runat="server"  Width="96%" ></asp:TextBox></td><td width="40%"><font color="red"></font></td>
                </tr>
                <tr>
                    <td align="right" width="15%">分类序号：</td><td width="45%"><asp:DropDownList ID="dplEditClass" runat="server"></asp:DropDownList></td><td width="40%"><font color="red">*</font></td>
                </tr>
                <tr>
                    <td align="right" width="15%">附件：</td><td width="45%"><asp:TextBox ID="txtAppendix" runat="server"  Width="50%" ></asp:TextBox><a style="line-height:30px; margin-left:20px;" href="javascript:ShowFileDilag('<%=txtAppendix.ClientID %>');">浏览</a></td><td width="40%"><font color="red"></font></td>
                </tr>
                 <tr>
                    <td align="right" width="15%">图片：</td><td width="45%"><asp:TextBox ID="txtPicName" runat="server"  Width="50%" ></asp:TextBox><a style="line-height:30px; margin-left:20px;" href="javascript:ShowFileDilag('<%=txtPicName.ClientID %>');">浏览</a></td><td width="40%"><font color="red"></font></td>
                </tr>
                <tr>
                    <td align="right" width="15%"><img id="Showit" alt="点这里" src= "/App_Themes/ManagerTheme/Images/More.gif" style="cursor: hand;" onclick="showmore();" /></td><td width="40%"></td>
                </tr>
                <tr id="More" style="display:none">
                    <td colspan="3">
                        <table border="0" width="100%" id="table2" cellspacing="0" cellpadding="0">
                            <tr>
                                <td align="right" width="15%">简短标题：</td><td width="45%"><asp:TextBox ID="txtShortTitle" runat="server"  Width="50%" ></asp:TextBox></td><td width="40%"><font color="red"></font></td>
                            </tr>
                            <tr>
                                <td align="right" width="15%">关键字：</td><td width="45%"><asp:TextBox ID="txtKeyWord" runat="server"  Width="96%" ></asp:TextBox></td><td width="40%"><font color="red"></font></td>
                            </tr>
                            <tr>
                                <td align="right" width="15%">文字标签：</td><td width="45%"><asp:TextBox ID="txtArticleTag" runat="server"  Width="96%" ></asp:TextBox></td><td width="40%"><font color="red"></font></td>
                            </tr>
                            <tr>
                                <td align="right" width="15%">跳转链接：</td><td width="45%">
                                <asp:TextBox ID="txtSkipURL" runat="server" Width="96%"></asp:TextBox>
                                </td><td width="40%">&nbsp;</td>
                            </tr>
                            <tr>
                                <td align="right" width="15%">
                                    作者：</td>
                                <td width="45%">
                                    <asp:TextBox ID="txtAuthor" runat="server" Width="50%"></asp:TextBox>
                                </td>
                                <td width="40%">
                                    <font color="red">*</font></td>
                            </tr>
                            <tr>
                                <td align="right" width="15%">摘自：</td><td width="45%"><asp:TextBox ID="txtCopyFrom" runat="server"  Width="50%" >原创</asp:TextBox></td><td width="40%"><font color="red"></font></td>
                            </tr>
                            <tr>
                                <td align="right" width="15%">点数：</td><td width="45%"><asp:TextBox ID="txtPoint" runat="server"  Width="30%" >0</asp:TextBox></td><td width="40%"><font color="red"></font></td>
                            </tr>
                            <tr>
                                <td align="right" width="15%">浏览权限：</td><td width="45%"><asp:DropDownList ID="dplGroup" runat="server"></asp:DropDownList></td><td width="40%"><font color="red">*</font></td>
                            </tr>
                            <tr>
                                <td align="right" width="15%">点击量：</td><td width="45%"><asp:TextBox ID="txtHits" runat="server"  Width="30%" >0</asp:TextBox></td><td width="40%"><font color="red">*</font></td>
                            </tr>
                            <tr>
                                <td align="right" width="15%">评分：</td><td width="45%"><asp:TextBox ID="txtGrade" runat="server"  Width="30%" >0</asp:TextBox></td><td width="40%"><font color="red">*</font></td>
                            </tr>
                            <tr>
                                <td align="right" width="15%">添加时间：</td><td width="45%"><cc2:ICalendar ID="icAddTiem" runat="server" /></td><td width="40%"><font color="red">*</font></td>
                            </tr>
                            <tr>
                                <td align="right" width="15%">是否审核：</td><td width="45%"><asp:CheckBox ID="cbChecked" runat="server" Text="是" Checked="True" /></td><td width="40%"><font color="red"></font></td>
                            </tr>
                            <tr>
                                <td align="right" width="15%">允许评论：</td><td width="45%"><asp:CheckBox ID="cbComment" runat="server" Text="是" Checked="True" /></td><td width="40%"><font color="red">*</font></td>
                            </tr>
                            </table>
                    </td>
                </tr>
                <tr>
                    <td align="right" width="15%" style="vertical-align:top; line-height:30px">文章简介：</td><td width="45%"><asp:TextBox ID="txtArticleAbstract" runat="server"  Width="96%" Height="50px" TextMode="MultiLine" ></asp:TextBox></td><td width="40%"><font color="red"></font></td>
                </tr>
                <tr>
                    <td align="right" width="15%" style="vertical-align:top; line-height:30px">文章内容：</td><td colspan="2">
                    <cc3:Editor ID="ArticleContent" runat="server" Height="350" Width="100%" 
                        FlashEx=".swf" PicEx=".jpg,.gif,.png,.bmp" PlugPath="/App_Themes/ManagerTheme/Images/Explorer/" 
                        Simple="True" VideoEx=".mp4,.wmv" 
                        PlugUploadPath="/App_Themes/ManagerTheme/Images/Explorer/" />
                    </td>
                </tr>
	    </table>
	    <div style="text-align:center"><asp:ImageButton ID="imgSave" runat="server" ImageUrl="~/App_Themes/ManagerTheme/Images/tj.jpg" style="height: 22px" ToolTip="添加" /></div>     
        </asp:View>
        <asp:View ID="View_List" runat="server">
    	    <div style="text-align: right;" class="edittd">
    	        <asp:DropDownList ID="dplClass" runat="server" AutoPostBack="True">
                </asp:DropDownList>
    	    <asp:CheckBox ID="cbCheck" runat="server" AutoPostBack="True" Text="已审核" />&nbsp;
        	<asp:CheckBox ID="cbSelectAll" runat="server" AutoPostBack="True" Text="全部" />&nbsp;
        	<asp:LinkButton ID="lnkBtnDel" runat="server"><img src="/App_Themes/ManagerTheme/Images/Delete.gif" style=" border:0px"/>&nbsp;删除选中</asp:LinkButton>&nbsp;&nbsp;
        	<a href="ArticleList.aspx?Action=Add"><img src="/App_Themes/ManagerTheme/Images/add.gif" style=" border:0px" />&nbsp;添加</a>
    	    </div>       
            <asp:Repeater ID="rptList" runat="server">
                <HeaderTemplate>
                    <table border="0" width="100%" id="table1" cellspacing="0" cellpadding="0" class="line_table">
			<tr>
			    <td width="5%" align="center" class="left_bt2">选择</td>
			     <td width="35%" align="left" class="left_bt2">标题</td>
			    <td width="10%" align="center" class="left_bt2">作者</td>
			    <td width="15%" align="center" class="left_bt2">添加时间</td>
			    <td width="10%" align="center" class="left_bt2">是否审核</td>
			    <td width="10%" align="center" class="left_bt2">允许评论</td>
			    <td align="center" width="15%" class="left_bt2">操作</td>
			</tr>
	        </HeaderTemplate>
                <ItemTemplate>
                    <tr class="menuout"   onMouseOver="this.className='menuin'" onMouseOut="this.className='menuout'">
			<td width="5%" align="center"><asp:CheckBox ID="CheckOn" runat="server" ToolTip='<%#Eval("ID")%>' /></td>
			<td width="35%" align="left"><%#BaseFunction.PublicMethod.CutString(Eval("Title"), 60)%></td>
			<td width="10%" align="center"><%#Eval("Author")%></td>
			<td width="15%" align="center"><%#Eval("AddTime")%></td>
			<td width="10%" align="center"><a href="ArticleList.aspx?Action=Check&ID=<%#Eval("ID") %>"><%#If(Eval("IsChecked"), "<font color='green'>是</font>", "<font color='red'>否</font>")%></a></td>
			<td width="10%" align="center"><a href="ArticleList.aspx?Action=Comment&ID=<%#Eval("ID") %>"><%#If(Eval("OpenComment"), "<font color='green'>是</font>", "<font color='red'>否</font>")%></a></td>
			<td width="15%" align="center">
			    <a href="ArticleList.aspx?Action=Edit&ID=<%#Eval("ID") %>"><img src="/App_Themes/ManagerTheme/Images/Edit.gif" style=" border:0px" />&nbsp;编辑</a>&nbsp;&nbsp;&nbsp;
			    <a href="ArticleList.aspx?Action=Del&ID=<%#Eval("ID") %>"><img src="/App_Themes/ManagerTheme/Images/Delete.gif" style=" border:0px" />&nbsp;删除</a></td>
			 </tr>
                </ItemTemplate>
                <FooterTemplate></table></FooterTemplate>
            </asp:Repeater>
            <div style="text-align:center"> <cc1:iPaging ID="ListPaging" runat="server" /></div>        
        </asp:View>        
    </asp:MultiView>
</asp:Content>