<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Articles.aspx.cs" Inherits="KZS.Web.Manage.Articles" %> 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <script src="/Common/ajax.js" type="text/javascript"></script>
    <link href="Template/Images/global.css" rel="stylesheet" type="text/css" />
    <script language="JavaScript" type="text/javascript">
        function del() {
            if (confirm("真的要删除这条记录吗？删除后将无法恢复！")) {
                return true;
            }
            else {
                return false;
            }
        }
    </script>
    <style type="text/css">
        .black_overlay
        {
            display: none;
            position: absolute;
            top: 0%;
            left: 0%;
            width: 100%;
            height: 100%;
            background-color: #FFFFFF;
            z-index: 1001;
            -moz-opacity: 0.8;
            opacity: .80;
            filter: alpha(opacity=80);
        }
        .white_content
        {
            display: none;
            position: absolute;
            top: 25%;
            left: 25%;
            width: 30%;
            height: 50%;
            padding: 16px;
            border: 16px solid orange;
            margin: -32px;
            background-color: white;
            z-index: 1002;
            overflow: auto;
        }
    </style>
    <script language="javascript" type="text/javascript">
        function moveselect(obj, target, all) {
            if (!all) all = 0
            if (obj != "[object]") obj = eval("document.all." + obj)
            target = eval("document.all." + target)
            if (all == 0) {
                while (obj.selectedIndex > -1) {
                    //alert(obj.selectedIndex)
                    mot = obj.options[obj.selectedIndex].text
                    mov = obj.options[obj.selectedIndex].value
                    obj.remove(obj.selectedIndex)
                    var newoption = document.createElement("OPTION");
                    newoption.text = mot
                    newoption.value = mov
                    target.add(newoption)
                }
            }
            else {
                //alert(obj.options.length)
                for (i = 0; i < obj.length; i++) {
                    mot = obj.options[i].text
                    mov = obj.options[i].value
                    var newoption = document.createElement("OPTION");
                    newoption.text = mot
                    newoption.value = mov
                    target.add(newoption)
                }
                obj.options.length = 0
            }
        }
        function dakai() {
            document.getElementById('light').style.display = 'block';
            document.getElementById('fade').style.display = 'block'
        }
        function guanbi() {
            //把右边select的值传到文本框内
            var readusers = document.getElementById("LinkShowIds")
            readusers.value = ""//如果不加这句，则每次选择的结果追加
            var huoQu = document.getElementById("D2")
            for (var k = 0; k < huoQu.length; k++)
                readusers.value = readusers.value + huoQu.options[k].value + ","//" "中间逗号隔开
            document.getElementById('light').style.display = 'none';
            document.getElementById('fade').style.display = 'none'
        }
        function backs() {
            document.getElementById('light').style.display = 'none';
            document.getElementById('fade').style.display = 'none'
        }
    </script>
      <script src="/Common/UEditor/editor_config.js" type="text/javascript"></script>
    <script src="/Common/UEditor/editor_all_min.js" type="text/javascript"></script>
    <link rel="stylesheet" type="text/css" href="/Common/UEditor/themes/default/ueditor.css" />
</head>
<body>
    <div id="topitem">
    </div>
    <form id="form1" runat="server">
    <div id="div_show" runat="server">
        <table border="1" width="100%" class="lsttab" style="border-collapse: collapse" bordercolor="#C0C0C0">
            <tr>
                <td colspan="5" class="Pager">
                    <a href="?Action=Add">添加文章</a> 文章搜索：<input type="text" name="sKey" value="<%=Request["sKey"] %>" />
                    <%=articleClass %><input type="submit" name="s" value="查找" />
                </td>
            </tr>
            <tr class="tit talc">
                <td align="center">
                    ID
                </td>
                <td align="center">
                    标题
                </td>
                <td align="center">
                    所属类型
                </td>
                <td align="center">
                    添加时间
                </td>
                <td align="center">
                    操作
                </td>
            </tr>
            <%=GetArticleList() %>
            <tr>
                <td colspan="5" id="Pager" class="Pager" runat="server">
                </td>
            </tr>
        </table>
    </div>
    <div id="div_edit" runat="server">
        <table border="1" width="80%" class="lsttab" style="border-collapse: collapse" bordercolor="#C0C0C0">
            <tr>
                <td class="tit talc" style="width: 70px;">
                    标题：
                </td>
                <td>
                    <input type="text" name="title" value="<%=title %>" style="width: 50%;" />
                </td>
            </tr>
            <tr>
                <td class="tit talc" style="width: 70px;">
                    分类：
                </td>
                <td>
                    <%=articleClass %>
                </td>
            </tr>
            <tr>
                <td class="tit talc" style="width: 70px;">
                    内容：
                </td>
                <td>
                   <script id="ArtContent" type="text/plain"><%=articlecontent %></script>
                <script type="text/javascript" language="javascript">
                    var editor = new baidu.editor.ui.Editor({
                        textarea: 'ArtContent'
                    });
                    editor.render("ArtContent");
                </script>
                   
                   <%-- <FTB:FreeTextBox ID="FTB_Content" runat="Server" ToolbarStyleConfiguration="OfficeXP"
                        Language="zh-CN" ImageGalleryPath="/uploads/images" ImageGalleryUrl="/common/ftb.imagegallery.aspx?rif={0}&cif={0}"
                        ToolbarLayout="ParagraphMenu,FontFacesMenu,FontSizesMenu,FontForeColorsMenu,FontForeColorPicker,FontBackColorsMenu,FontBackColorPicker|Bold,Italic,Underline,Strikethrough,Superscript,Subscript,RemoveFormat|JustifyLeft,JustifyRight,JustifyCenter,JustifyFull;BulletedList,NumberedList,Indent,Outdent;CreateLink,Unlink,InsertImage|Cut,Copy,Paste,Delete;Undo,Redo,Print,Save|SymbolsMenu,StylesMenu,InsertHtmlMenu|InsertRule,InsertDate,InsertTime|InsertTable,EditTable;InsertTableRowAfter,InsertTableRowBefore,DeleteTableRow;InsertTableColumnAfter,InsertTableColumnBefore,DeleteTableColumn|InsertForm,InsertTextBox,InsertTextArea,InsertRadioButton,InsertCheckBox,InsertDropDownList,InsertButton|InsertDiv,EditStyle,InsertImageFromGallery,Preview,SelectAll,WordClean,NetSpell" />
                --%>
                </td>
            </tr>
         <%--   <tr>
                <td class="tit talc" style="width: 70px;">
                    标签：
                </td>
                <td>
                    <input type="text" name="labels" value="<%=labelstr %>" style="width: 50%;" /><span
                        style="color: Red">&nbsp;注意：标签与标签之间用逗号（中英文皆可）或空格隔开 </span>
                </td>
            </tr>--%>
            <tr>
                <td class="tit talc" style="width: 70px;">
                    操作
                </td>
                <td>
                    <input type="submit" value="<%=Request.QueryString["Action"]=="Add"?"确定":"保存" %>" />
                    <input type="button" name="back" value="返回" onclick="location.href='Articles.aspx'" />
                </td>
            </tr>
        </table>
    </div>
    </form>
</body>
</html>
