<?php include("session.php"); ?>
<!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>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>管理员后台管理 - 辰颐物语小袁团队留言板官方网站 Powered by xiaoyuanMessage</title>
<meta name="keywords" content="辰颐,辰颐物语,辰颐果园官网,辰颐物语微商,辰颐果园小袁,辰颐果园小袁团队,辰颐物语小袁团队,水果微商,加盟辰颐物语,PHP留言板,小袁留言板,模板,留言板模板,Powered by xiaoyuanMessage" />
<meta name="description" content="辰颐物语小袁团队留言板官方网站 - Powered by xiaoyuanMessage" />
</head>
<link href="css/common.css" rel="stylesheet" type="text/css" />
<link href="css/hf_ly.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" href="kindeditor/themes/default/default.css" />
<script charset="utf-8" src="kindeditor/kindeditor-min.js"></script>
<script charset="utf-8" src="kindeditor/lang/zh_CN.js"></script>
<script charset="utf-8" src="js/input.js"></script>
<script type="text/javascript" src="js/jquery-1.8.3.min.js"></script>
<script type="text/javascript">
$(function(){ 
	content.focus();
	$("#btn_ly").click(function(){
	    if (content.value.replace(/\s/g,"")==""){alert("回复留言不能为空!");content.focus();return false }
		var f_content = $("#content").val();
		var f_hf_id = $("#hf_id").val();
            $.post("check_huifu.php",{	
                check_content : f_content,	
                check_hf_id : f_hf_id
            },function(data){
			var json = $.parseJSON(data);
			if(json.success){
			alert(json.msg);
			window.location.href='ly_manage.php';
			} else{
			alert(json.msg);
			}
				 

        }); 
    });
})
</script>


<body>
<?php 

include("head_common.php");

?>

<div class="contfram_canvas">
	<div class="cont_canvas">
		<a class="notice_title" >欢迎您 admin 管理员</a>  <a class="notice_title1" href="main.php" >系统设置</a> <a class="notice_title1" href="ly_manage.php" >留言管理</a>  <a class="notice_title1" href="changewd.php" >密码修改</a> <a class="notice_title1" href="loginout.php" >退出后台</a>
		<div class="noticeframe_canvas">
			<h3>回复留言</h3>
			<div class="about_canvas">
				<ul class="admin_canvas">
					<li>
						
						
					</li>

				</ul>
			</div>
		</div>
		
	<div class="ly_canvas">
			<!-- 留言板内容框架 -->
	<!--留言列表-->
<?php
require ("link.php"); //连接数据库
$id=$_GET['ly_id'] or die("参数有误");
$sql = "SELECT * FROM ly where ly_id='$id' ";
$result = mysql_db_query($db_name, $sql); 
$ly_data = mysql_fetch_array($result);

?>
			<div class="ly_frame">
				<div class="ly_leftframe">
					<h3><?php echo $ly_data['name'];?></h3>
					<img src="<?php echo $ly_data['head'];?>" />
					<p>QQ号码 <?php echo $ly_data['qq'];?></p>
					<p>微信号 <?php echo $ly_data['weixin'];?></p>
				</div>
				<div class="ly_rightframe">
					<div class="ly_rightframe01">
						<p class="fbtime">发表于 <?php echo $ly_data['modi_date'];?></p>
						<p class="email">邮箱： <?php echo $ly_data['email'];?></p> 
						
						<div class="content">
							 <?php echo $ly_data['content'];?>
						</div>

					<?php if(!empty($ly_data['hf_content'])){?>
						<div class="reply">
							<h3>管理员回复:</h3> <?php echo $ly_data['hf_content'];?>
                     
						</div>
					<?php }?>
					</div>
				</div>
			</div>
		

			<!--回复留言框 -->
			<div class="hf_textcanvas">
				<label>回复留言内容:</label>
				<textarea name="content" id="content" style="width:800px;height:200px;visibility:hidden;"></textarea>
				<input type="hidden" name="hf_id" id="hf_id" value="<?php echo $ly_data['ly_id'];?>" />
				<input class="ly_btn" name="btn_ly" id="btn_ly" type="submit" value="提交留言" />
			</div>
		</div>
		
		
		
	</div>

</div>

<?php include("bottom_common.php");?>



</body>
</html>
