<?php
define('IN_SYS',TRUE);
define('IN_AdminMenu',TRUE);
require './admin_config.php';
require '../config.php';
require '../setup.php';
require("../lib/admin_chk.php");
?>
<?php
$pageTitle="查看/回复留言";

$infoTable = "feedback";
$act = $_REQUEST["act"];
$id = intval($_REQUEST["id"]);

if($act=="update" && $id>0){
	$okDisplay = $_POST["okDisplay"];
	$f_Reply = $_POST["f_Reply"];
	$sql = "UPDATE ".DB_TablePre.$infoTable." SET f_Reply='$f_Reply',reTime='".now()."',okReply='1',okDisplay='$okDisplay' where id = '$id'";
	mysql_query($sql);
	OutErrorGo("回复成功!","feedbackList.php");
}
?><!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="robots" content="noindex,nofollow" />
<title><?php echo $pageTitle?><?php echo $sysTitle?></title>
<link href="templates/admin.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="../lib/jquery/jquery.js"></script>
<script type="text/javascript" src="js/controlPanelMenu.js"></script>
<script type="text/javascript" src="js/commmonAdmin.js"></script>
</head>
<body>
<?php
include("./admin_header.php")
?>
<div id="containerAdmin" class="wrapper_m">
<div id="sidebarAdmin">
<?php
include("./admin_controlPanelDir.php")
?>
</div>
<div id="contentbarAdmin">
<div class="tips_2"><?php echo adminPageLocation($pageTitle)?></div>

<?php
$db = mysql_query("select * from ".DB_TablePre.$infoTable." where id = '$id'");
$rs = mysql_fetch_array($db);
if(!$rs){
	OutErrorBack("留言信息不存在");
}
?>
<form action="" method="post" name="formAdmin" target="_parent" id="formAdmin">
<input type="hidden" name="id" value="<?php echo $id?>" />
<input type="hidden" name="act" value="update" />
<table cellspacing="1" class="adminTableV0">
<tr>
<td class="tw_1">留言人：</td>
<td class="tw_2"><input name="f_Name" type="text" class="moduleBorderA moduleInputA iW_200" id="f_Name" value="<?php echo $rs["f_Name"]?>" readonly></td>
</tr>
<tr>
<td class="tw_1">联系手机：</td>
<td class="tw_2"><input name="f_MobTel" type="text" class="moduleBorderA moduleInputA iW_200" id="f_MobTel" value="<?php echo $rs["f_Tel"]?>" readonly></td>
</tr>
<tr>
<td class="tw_1">Email：</td>
<td class="tw_2"><input name="f_Mail" type="text" class="moduleBorderA moduleInputA iW_200" id="f_Mail" value="<?php echo $rs["f_Mail"]?>" readonly></td>
</tr>
<tr>
<td class="tw_1">留言内容：</td>
<td class="tw_2"><textarea name="content" rows="6" class="moduleBorderA iW_400" id="content" readonly><?php echo html($rs["f_Content"])?></textarea></td>
</tr>
<tr>
<td class="tw_1">回复内容：</td>
<td class="tw_2"><div class="iW_textTips"><?php echo $rs["reTime"]?><br /><?php echo $rs["f_Reply"]?></div></td>
</tr>
<tr>
<td class="tw_1">提交时间：</td>
<td class="tw_2"><input name="adate" type="text" class="moduleBorderA moduleInputA iW_200" id="adate" value="<?php echo $rs["addDate"]?>" readonly></td>
</tr>
<tr>
<td class="tw_1">是否审核：</td>
<td class="tw_2">
<?php
echo "<label><input type='radio' name='okDisplay' value='1' ".Check_s($rs["okDisplay"],1)." style='border:none;'><span class=font_green>是</span></label>&nbsp;&nbsp;&nbsp;&nbsp;<label><input type='radio' name='okDisplay' value='0' ".Check_s($rs["okDisplay"],0)." style='border:none;'><span class=font_red>否</span></label>";
?>
</td>
</tr>
<tr>
<td class="tw_1">回复内容：</td>
<td class="tw_2"><textarea name="f_Reply" rows="10" class="moduleBorderA iW_400"><?php echo html($rs["f_Reply"])?></textarea></td>
</tr>
<tr>
<td colspan="2" class="tw_3"><input name="Submit" type="submit" value="确认回复" class="btn_2"></td>
</tr>
</table>
</form>

</div>
<div class="clearfix"></div>
</div>
<?php
include("./admin_footer.php")
?>
</body>
</html>