<?php
include("admin.php");
$rst=mysql_query("SELECT * FROM `".$ad."sjadmin` WHERE `name` LIKE '{$_SESSION['name']}'");
$rwt=mysql_fetch_assoc($rst);
$id=$_GET['id'];
$rs=mysql_query("SELECT * FROM `".$ad."book` WHERE `id` ='{$id}'");
$rw=mysql_fetch_assoc($rs);
if($_POST['name']){
mysql_query("UPDATE `".$ad."book` SET `name` = '{$_POST['name']}',
`sxinzhi` = '{$_POST['sxinzhi']}',
`email` = '{$_POST['email']}',
`dianhua` = '{$_POST['dianhua']}',
`dizhi` = '{$_POST['dizhi']}',
`title` = '{$_POST['title']}',
`content` = '{$_POST['content']}' WHERE `".$ad."book`.`id` ='{$_POST['id']}' LIMIT 1 ;");
echo "<script language=javascript>  
alert( \"恭喜你，留言信息修改成功\"  );
location.href = \"book_view.php\"
</script>";
}
?>
<html>
<head>
<title> 欢迎光临手机靓号发布管理系统-管理面版 </title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="images/Css.css" rel="stylesheet" type="text/css" />
<script src="js/time.js"></script>
</head>
<script language="javascript">
function checklogin(){
if (document.ad3.pic.value==""){
	alert('广告图片网址不能为空！');
	document.ad3.pic.focus();
	return false;
}
if (document.ad3.cid.value==""){
	alert('广告排顺的位置不能为空！');
	document.ad3.cid.focus();
	return false;
}
if (document.ad3.mtime.value==""){
	alert('广告到期时间不能为空！');
	document.ad3.mtime.focus();
	return false;
}
if (document.ad3.url.value==""){
	alert('广告连接网址不能为空！');
	document.ad3.url.focus();
	return false;
}
	return true;
}
</script>
<body  >
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr> 
    <td height="30" background="images/Mypic_top15.gif"><table width="96%" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr> 
          <td><img src="images/Mypic_top14.gif" width="14" height="14" align="absmiddle"> 
            欢迎光临手机靓号发布管理系统</td>
        </tr>
      </table></td>
  </tr>
  <tr> 
    <td><table width="100%" border="0" cellspacing="4" cellpadding="0">
        <tr> 
          <td><table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#9FD74E">
              <tr> 
                <td height="26" background="images/Mypic_top12.gif"> <table width="96%" border="0" align="center" cellpadding="0" cellspacing="0">
                    <tr> 
                      <td><img src="images/Mypic_top13.gif" width="18" height="9" align="absmiddle"> 
                        留言信息 </td>
                    </tr>
                  </table></td>
              </tr>
              <tr> 
                <td bgcolor="#FFFFFF"><table width="100%" border="0" cellspacing="4" cellpadding="0">
                    <tr> 
                      <td><table width="100%" border="0" align="center" cellpadding="4" cellspacing="1" bgcolor="#EBEBEB" class="tableoutline">
                         
                            <tr bgcolor="#F5F5F5" id="cat"> 
                              <td colspan="2" class="tbhead"> <b>留言信息查看：</b> </td>
                            </tr>
                            <tr nowrap bgcolor="#FFFFFF" class="firstalt"> 
                              <td width="20%" align="right">姓名：</td>
                              <td width="80%"><?=$rw['name']?></td>
                            </tr>
							 <tr nowrap bgcolor="#FFFFFF" class="firstalt"> 
                              <td width="20%" align="right">性质：</td>
                              <td width="80%"><?=$rw['sxinzhi']?></td>
                            </tr>
							<tr nowrap bgcolor="#FFFFFF" class="firstalt"> 
                              <td width="20%" align="right">联系邮箱：</td>
                              <td width="80%"><?=$rw['email']?></td>
                            </tr>
							<tr nowrap bgcolor="#FFFFFF" class="firstalt"> 
                              <td width="20%" align="right">联系电话：</td>
                              <td width="80%"><?=$rw['dianhua']?></td>
                            </tr>
					     <tr nowrap bgcolor="#FFFFFF" class="firstalt"> 
                              <td width="20%" align="right">联系地址：</td>
                              <td width="80%"> <?=$rw['dizhi']?></td>
                            </tr>
								<tr nowrap bgcolor="#FFFFFF" class="firstalt"> 
                              <td width="20%" align="right">信息标题：</td>
                              <td width="80%"><?=$rw['title']?></td>
                            </tr>
							<tr nowrap bgcolor="#FFFFFF" class="firstalt"> 
                              <td width="20%" align="right">信息内容：</td>
                              <td width="80%"> <?=$rw['content']?></td>
                            </tr>
							<tr nowrap bgcolor="#FFFFFF" class="firstalt">
							  <td align="right">留言的IP</td>
							  <td><?=$rw['ip']?></td>
						  </tr>
							<tr nowrap bgcolor="#FFFFFF" class="firstalt"> 
                              <td width="20%" align="right">留言的时间</td>
                              <td width="80%"><?=$rw['time']?></td>
                            </tr>
                            <tr bgcolor="#FFFFFF" class="tbhead"> 
                              <td colspan="2" align="center"> 
                              </td>
                            </tr>
                        </table></td>
                    </tr>
                  </table></td>
              </tr>
            </table></td>
        </tr>
      </table></td>
  </tr>
</table>
<br>
<center>Powered by: <a href="http://www.126php.com" target="_blank">www.126php.com</a> 程序开发:*!!杨公子 联系QQ:61709225</center>
</body>
</html>