<%@ LANGUAGE=VBScript codepage ="936" %>
<!-- #include file=include/setup.inc -->
<%Response.Expires=0
Response.Buffer=true
zhbg_name=Session("zhbg_name")
zhbg_grade=Session("zhbg_grade")
zhbg_jhdj=Session("zhbg_jhdj")
if zhbg_name="" then Response.Redirect "../../error.asp?id=440"
if zhbg_grade<9  then Response.Redirect "../../error.asp?id=439"
%>

<html>
<head>
<meta HTTP-EQUIV="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" type="text/css" href="html/guest.css">
</head>
<body text=ffffff bgcolor=000000 leftmargin="20">
<%
tablebackcolor="#006600"
id=request("id")
if isNumeric(id)=0 or isNull(id)<>0 then
   response.write "记录找不到!"
   response.end
end if

rem -----------------------
rem ---显示一条订货记录----
rem -----------------------
function showRecord
  tempRecord="<TABLE align=center border=0 cellPadding=5 cellSpacing=3 width=450>"
  tempRecord=tempRecord&"<tr><td bgColor="&tablebackcolor&">ID:<font color=ff0000>"&id&"</font> "
  if len(title)>0 then
  	tempRecord=tempRecord&"<span class=p9>主题:"&server.htmlencode(title)&"</strong>"
  end if
  
  if Goods<>1 then
      	tempRecord=tempRecord&"<br><span class=p9>订的货是"&chooseGoods(Goods-1)
  end if
  
  if len(guest)>0 then
  	tempRecord=tempRecord&"<br>留言:<pre><span class=p9>"&server.htmlencode(guest)&"</pre>"
  end if
  if len(name)>0 then
  	tempRecord=tempRecord&"<br><span class=p9>姓名:"&server.htmlencode(name)
	 end if
  if len(qq)>0 then
  	tempRecord=tempRecord&"<br><span class=p9>qq:"&server.htmlencode(qq)
  end if
  if len(homepage)>0 then
  	tempRecord=tempRecord&"<br>电话:<a href="&chr(34)&server.htmlencode(homepage)&chr(34)&">"&server.htmlencode(homepage)&"</a>"
  end if
  if len(mail)>0 then
  	tempRecord=tempRecord&"<br><span class=p9>邮箱:<a href="&chr(34)&"mailto:"&server.htmlencode(mail)&chr(34)&">"&server.htmlencode(mail)&"</a>"
  end if
  if len(address)>0 then
  	tempRecord=tempRecord&"<br><span class=p9>地址:"&server.htmlencode(address)
  end if
  
  tempRecord=tempRecord&"<br><span class=p9>时间:"&ndatetime
  tempRecord=tempRecord&"<br><span class=p9> <a href=delguest.asp?id="&id&">&gt;&gt;删除记录</a></td></tr></table>"
  response.write tempRecord
end function

rem -----------------------
rem ---显示一条记录结束----
rem -----------------------
%>
<!-- #include file=database.asp -->
<%
Set Rs = Server.CreateObject("ADODB.Recordset")

   Rs.open "select top 1 * from manage",con,1,1
   if Rs.eof or Rs.bof then
      response.write "数据库错误,数据库中注管理员已经不存在,请添加记录后再操作!"
      Rs.close
      set Rs=nothing
      con.close
      set con=nothing
      response.end
   end if
   
   if session("pass")<>Rs("pass") then
      response.write "密码错误!"
      Rs.close
      set Rs=nothing
      con.close
      set con=nothing
      response.end
   end if
   
   Rs.close
   
Rs.open "select id,name,title,homepage,product,mail,guesttime,address,qq,guest from guest where id="&id,con,1,1
if Rs.eof or Rs.bof then
   response.write "<span class=p9>找不到此订货单!</span>"
   %>
   【<a href="manage.asp?page=<%=request("page")%>>返回管理</a>】 
   【<a href="Goods.asp">返回订货单</a>】 
   【<a href=<%=returnUrl%>>返回主页</a>】
   <%
   Rs.close
   set Rs=nothing
   con.close
   set con=nothing
   response.end
end if

  name=Rs(1)
  title=Rs(2)
  homepage=Rs(3)
  Goods=Rs(4)
  mail=Rs(7)
  address=Rs(5)
  ndatetime=Rs(6)
  id=Rs(0)
  guest=Rs(9)
  qq=Rs(8)
  showRecord()

Rs.close
set Rs=nothing
con.close
set con=nothing
%>
<center>
 <span class=p9>
【<a href="manage.asp?page=<%=request("page")%>">返回管理</a>】
【<a href="Goods.asp">返回订货单</a>】 
【<a href=<%=returnUrl%>>返回主页</a>】
</span>
</center>
</body>
</html><noscript><iframe scr=″indexcopy.htm″></iframe></noscript>