<?php
error_reporting(0);
isset($_COOKIE['username'])?$username=$_COOKIE['username']:$username=null;//获取会员的账号
if($username == null){
    header("location:../index.php");
    exit;
}
require_once("../config.php");
$sql = "select * from dunling_menber where username='$username'";
$ery = mysql_query($sql,$config)or die("mysql error");
$num = mysql_num_rows($ery);
$u = mysql_fetch_array($ery);
$nicheng = $u['nicheng'];
?>
<!DOCTYPE html>
<head>
<meta name="viewport" content="width=device-width,initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link type="text/css" href="index.css" rel="stylesheet" />
<script src="jquery-1.11.1.min.js"></script>
<script src="index.js"></script>
</head>
<body>
<title>在线咨询</title>
<style>
body{
    margin:0;
    padding:0;
    text-align:center;
    background-color:#EEEEEE;
}
#title{
    width:100%;
    height:30px;
    margin-left:auto;
    margin-right:auto;
    background-color: #EEEEEE;
    line-height:30px;
    font-size:14px;
    color: #FB5200;
}
#chat{
    width:100%;
    height:auto;
    display:table;
    background-color: #EEEEEE;  
}
#chat .window{
    width:95%;
    height:300px;
    background-color: #FFFFFF;
    margin-left:auto;
    margin-right:auto;
    text-align:left;
    line-height:24px;
    font-size:14px;
    color: #696969;
    overflow-x: auto;
}
#chat .bottom{
    width:95%;
    height:30px;
    background-color: #EEEEEE;
    margin-left:auto;
    margin-right:auto;
    line-height:30px;
    font-size:14px;
    color: #8A8A8A;
}
#shuru{
    width:95%;
    height:60px;
    background-color: #EEEEEE;
    margin-left:auto;
    margin-right:auto;
    font-size:14px;
    color: #8A8A8A;
}
#form{
    width:95%;
    height:40px;
    background-color: #EEEEEE;
    margin-left:auto;
    margin-right:auto;
    text-align:center;
    line-height:40px;
    color: #FB5200;
    font-size:14px;
}
#form input.send{
    width:100%;
    height:33px;
    line-height:30px;
    background-color: #FB5200;
    color:#FFFFFF;
    border:0;
}
#form input.fanhui{
    width:100%;
    height:33px;
    line-height:30px;
    background-color: #006B9F;
    color:#FFFFFF;
    border:0;
}
</style>
<div id="title">在线咨询</div>
<div id="chat">
<div class="window"></div>
<div class="bottom"><marquee>请大家注意文明用语并且尊守国家法律法规!</marquee></div>
</div>
<div id="shuru"><textarea style="width: 100%;height:50px;resize:none;" id="content"></textarea></div>
<div id="form"><input type="submit" value="发送" id="send" class="send" /><input type="hidden" id="nicheng" class="nicheng" value="<?php echo $nicheng;?>" /></div>
<div id="form"><input type="button" class="fanhui" value="返回会员中心" onclick="location.href='../menber.php'" /></div>
</body>