<%@ page language="C#" autoeventwireup="true" inherits="WebAdmin_AddNotice, LebiMall" %>
<%@ Register Assembly="FredCK.FCKeditorV2" Namespace="FredCK.FCKeditorV2" TagPrefix="FCKeditorV2" %>
<!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>
    <link href="css/css.css" rel="stylesheet" type="text/css" />
    <link href="css/tipswindown.css" type="text/css" rel="stylesheet" />
    <script type="text/javascript" language="javascript" src="js/topHead.js"></script>
    <script type="text/javascript" src="js/checked.js"></script>
    <script src="js/jquery.js" type="text/javascript"></script>
    <script src="js/tipswindown.js" type="text/javascript"></script>
    <script language="javascript" type="text/javascript">
    //验证标题是否为空
        function validate(){
            if(document.getElementById("txt_title").value==""){
                 document.getElementById("msg_n").innerHTML="<span class='msg_submit'>标题不能为空！</span>";
                 return false;
            }else
            {
                   document.getElementById("msg_n").innerHTML="";
                   return true;
            }  
        }
        //展开与合并
        function resizeEditor(name,size) {   
	    var newheight = parseInt(document.getElementById(name +"___Frame").style.height, 10) + size;   
	    if(newheight >= 150) {   
		    document.getElementById(name +"___Frame").style.height = newheight + 'px';   
	    }   
    } 
    </script>
</head>
<body>
    <form id="form1" runat="server" onsubmit="return validate()">
        <script>header(5,4,"images/");</script>
        <div class="blank clearfix">
        </div>
        <script type="text/javascript">
            var $=jQuery;
            var f="<%=returnValue %>";
            var i=2;
            if(f=="true"){
                tipsWindown('操作结果','text:操作成功！','250','100','true','2000','true','text');
                setInterval("fun()", 1000);
            }
            if(f=="false"){
                tipsWindown('操作结果','text:操作失败！','250','100','true','2000','true','text');
            }
            function fun() {
                if (i == 1) {
                    window.location.href="NoticeList.aspx";
                }
                i--;
            }
        </script>
        <div class="tabmenus mainwidth">
            <ul>
                <li><a href="NoticeList.aspx"><span>信息管理</span></a></li>
                <li class="current"><a href="AddNotice.aspx"><span>信息添加</span></a></li>
                <li><a href="NoticeTypeList.aspx"><span>类别管理</span></a></li>
            </ul>
        </div>
        <div class="tab-mainbody">
            <div class="tab-mainbody2">
                <div class="functionHandleArea clearfix">
                    <input id="btnSubmitTop" type="button" runat="server" class="btn-app" onserverclick="btnSubmit_ServerClick"  align="absmiddle"/>
                    <input type="button" id="Submit" class="btn-res"  onclick="reset();return false;" align="absmiddle" />
                    <input type="button" id="btnBack"  onclick="history.back();return false;" class="btn-bak" align="absmiddle" />
                </div>
                <div id="datalist">
                <table cellspacing="0" width="100%" cellpadding="0" id="list">
                    <tr>
                        <th colspan="2">添加公告</th> 
                    </tr>
                    <tr>
                        <td class="f_td1">
                            标题：
                        </td>
                        <td class="f_td2">
                            <input type="text" runat="server" id="txt_title" class="input" size="60"/>&nbsp;<span id="msg_n"></span>
                        </td>
                    </tr>
                    <tr>
                        <td class="f_td1">
                            内容：
                        </td>
                        <td class="f_td2">
                            <FCKeditorV2:FCKeditor ID="fck" runat="server" ToolbarSet="Mall2" BasePath="js/fckeditor/"
                                Height="200px" Width="600px">
                            </FCKeditorV2:FCKeditor>
                            <a href="javascript:resizeEditor('fck',-100)">
                                    <img src="images/bt_close.gif" border='0'></a>&nbsp;<a href="javascript:resizeEditor('fck',150)"><img
                                        src="images/bt_open.gif" border='0'></a>
                        </td>
                    </tr>
                    <tr>
                        <td class="f_td1">
                            类型：
                        </td>
                        <td class="f_td2">
                            <%
                                for (j = 0; j < dstype.Tables[0].Rows.Count; j++)
                                {
                            %>
                            <%=dstype.Tables[0].Rows[j]["Tname"]%>
                            <%
                                }
                            %>
                        </td>
                    </tr>
                    <tr>
                        <td class="f_td1">
                            是否显示：
                        </td>
                        <td class="f_td2">
                            <input type="radio" runat="server" id="show" name="isshow" checked />是
                            <input type="radio" runat="server" id="noshow" name="isshow" />否
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2"  class="list-foot">
                            <input id="btnSubmit" type="button" class="btn-app" runat="server" onserverclick="btnSubmit_ServerClick" />
                        </td>
                    </tr>
                </table>
                <script type="text/javascript">tdshowm("list");</script>
            </div>
        </div>
        </div>
    </form>
</body>
</html>
