<?php
require_once("../check.php");
$c = file_get_contents("../../core/bottom_link.tpl");
?>
<!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;
}
#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 textarea{
    margin-left:80px;
    resize:none;
    width:800px;
    height:300px;
}

#table input.form{
    margin-top:10px;
    margin-left:80px;
    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;   
}



#loading{
    z-index: 800;
    display:none;
    margin:0;
    padding:0;
    position: fixed;
    width:190px;
    height:14px;
    top:220px;
    left:410px;
}
</style>

<script>
$(function(){

    $(document).ajaxStart(function(){
    $("#loading").show();
    });
    
    $(document).ajaxStop(function(){
    setTimeout(function(){
    $("#loading").hide();
    },1000);
    
    });
    
   $("#form").click(function(){
    var content = $("#content").val();
    $.post("../core/bottom_link.php",{
        content:content
    },function(fabuok,fabuzt){
        if(fabuok=="ok"){
              setTimeout(function(){
              alert('保存成功!');
              location.href='bottom_link.php';
              return false;
                },1200);
            
        }else{
            alert('保存出错!');
            return false;
        }
    });
    
   });
  
});
</script>
<div id="table">
<label>底部导航:</label>
</div>
<div id="table">
<textarea id="content" class="c"><?php echo $c;?></textarea>
</div>

<div id="table">
<input class="form" id="form" type="button" value="保存" />
</div>
<div id="loading"><img src="../images/png/dunling_loading.gif" /></div>
</body>