<?php
require_once("../check.php");
?>
<!DOCTYPE HTML>
<html>
<head>
<title>内容发布</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<link rel="stylesheet" href="/editor/themes/default/default.css" />
<script src="../js/jquery-1.11.1.min.js"></script>

<body>
<style>
body{
    margin:0;
    padding:0;
    text-align:left;
}

#button{
    margin-top:5px;
    width:700px;
    height:80px;
    line-height:80px;
    display: table;
    text-align:left;

}

#button input{
    margin-top:10px;
    margin-left:155px;
    height:35px;
    line-height:35px;
    width:150px;
    float:left;
    color: #FFFFFF;
    font-size:16px; 
    background-color:#08246B;
    border:1px solid #08246B;
    border-radius:5px;
    box-shadow:0px 0px 5px 5px #C2C2C2;   
}



#table{
    margin-top:5px;
    width:auto;
    max-width:1000px;
    min-height:30px;
    height:auto;
    display: table;
    line-height:30px;
    text-align:left;

}
#table label{
    clear:none;
    height:30px;
    line-height:30px;
    float:left;
    width:150px;
    text-align:right;
    color: #5F5F5F;
    font-size:16px;
    margin-right:5px;
}
#table input{
    border:1px solid #D8D8D8;
    border-radius:3px;
    line-height:30px;
    height:30px;
    float:left;
    font-size:14px; 
}
#table input.text{
    color: #5F5F5F;
    width:740px;  
}
#table input.xtext{
    color: #5F5F5F;
    width:100px; 
}
#table textarea.c{
    float:left;
    width:735px;
    height:350px;
    resize:none;
    border:1px solid #D8D8D8;
    border-radius:3px;
    color: #5F5F5F;
    font-size:16px;
    line-height:25px;
    letter-spacing: 1px;
}

#table input.form{
    margin-top:10px;
    margin-left:155px;
    height:35px;
    line-height:35px;
    width:150px;
    float:left;
    color: #FFFFFF;
    font-size:16px; 
    background-color:#08246B;
    border:1px solid #08246B;
    border-radius:5px;
    box-shadow:0px 0px 5px 5px #C2C2C2;   
}

input.title{
    width:735px;
}
</style>

<script>
$(function(){

   $("#form").click(function(){
   
   var title = $("#title").val();
    var content = $("#content").val();
    if((title==false) || (content==false)){
        alert('请输入必填项!\n\n必填项包含:标题、内容!');
        return false;
    }
    
    $.post("../core/article_form.php",{
        title:title,
        content:content
    },function(aa,bb){
        
     if(aa=="ok"){
        alert('公告已发布');
        $("#title").val('');
        $("#content").val('');
     }
        
    });
   
   });
   });
</script>

<div id="table">
<label>公告标题:</label><input type="text" id="title" class="title"  />
</div>


<div id="table">
<label>详细内容:</label><textarea id="content" class="c"></textarea>
</div>

<div id="button">
<input class="form" id="form" type="button" value="保存" />
</div>
</body>