<!--#include file="../Conn.asp"-->
<%
If Not Isobject(Conn) Then OpenConn()
If Request.QueryString("act") = "del" Then 
   Conn.Execute("DELETE FROM SQ_Orders WHERE ID="&Clng(Request("ID")))
   Response.Write("<script>alert('信息删除成功');location.href='"&Request.ServerVariables("HTTP_REFERER")&"';</script>")
   Response.End()
End If 
%>
<!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=gb2312" />
<title>预约查看</title>
<style type="text/css">
td {padding-left:5px;}
</style>
</head>

<body>
<%
On Error Resume Next
Dim Osql,ORS,page,i
page = Clng(Request("page"))
If  page < 1 Then page = 1
Set ORs = Server.CreateObject("ADODB.RecordSet")
OSql = "SELECT * FROM SQ_Orders ORDER BY ID DESC"
ORs.open Osql,Conn,1,1
If  Not (ORs.Eof And ORs.Bof) Then
	ORs.PageSize=10
	If page>ORs.PageCount Then page = ORs.PageCount
	ORs.AbsolutePage = page
	For i = 1 To ORs.PageSize
%>
<table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#333333" align="center" style="font-size:14px; margin-top:10px;">
  <tr>
    <td width="14%" height="28" bgcolor="#FFFFFF">患者姓名</td>
    <td width="16%" height="28" bgcolor="#FFFFFF"><%=ORs("truename")%></td>
    <td width="14%" height="28" bgcolor="#FFFFFF">性别</td>
    <td width="56%" height="28" bgcolor="#FFFFFF"><span style="float:right"><a href="?act=del&ID=<%=ORs("ID")%>" onclick="return confirm('您确定要删除吗?')">删除</a></span><%=ORs("sex")%></td>
  </tr>
  <tr>
    <td width="14%" height="28" bgcolor="#FFFFFF">年龄</td>
    <td width="16%" height="28" bgcolor="#FFFFFF"><%=ORs("age")%></td>
    <td width="14%" height="28" bgcolor="#FFFFFF">家庭住址</td>
    <td width="56%" height="28" bgcolor="#FFFFFF"><%=ORs("address")%></td>
  </tr>
  <tr>
    <td width="14%" height="28" bgcolor="#FFFFFF">固定电话</td>
    <td width="16%" height="28" bgcolor="#FFFFFF"><%=ORs("tel")%></td>
    <td width="14%" height="28" bgcolor="#FFFFFF">手机</td>
    <td width="56%" height="28" bgcolor="#FFFFFF"><%=ORs("mobile")%></td>
  </tr>
  <tr>
    <td width="14%" height="28" bgcolor="#FFFFFF">科室</td>
    <td width="16%" height="28" bgcolor="#FFFFFF"><%=ORs("keshi")%></td>
    <td width="14%" height="28" bgcolor="#FFFFFF">预约专家</td>
    <td width="56%" height="28" bgcolor="#FFFFFF"><%=ORs("zhuanjia")%></td>
  </tr>
  <tr>
    <td width="14%" height="28" bgcolor="#FFFFFF">预约时间</td>
    <td width="16%" height="28" bgcolor="#FFFFFF"><%=ORs("ordertime")%></td>
    <td width="14%" height="28" bgcolor="#FFFFFF">电子邮件</td>
    <td width="56%" height="28" bgcolor="#FFFFFF"><%=ORs("email")%></td>
  </tr>
  <tr>
    <td width="14%" height="28" bgcolor="#FFFFFF">是否需要安排住宿</td>
    <td width="16%" height="28" bgcolor="#FFFFFF"><%=ORs("zhusu")%></td>
    <td width="14%" height="28" bgcolor="#FFFFFF">简要说明</td>
    <td width="56%" height="28" bgcolor="#FFFFFF"><%=ORs("info")%></td>
  </tr>
</table>
<%
    ORs.MoveNext
	If ORs.Eof Then Exit For
   Next
End If
%>
<div style="padding:5px; clear:both; text-align:center;"><%=CutPage(page,ORs.PageCount,ORs.RecordCount,ORs.PageSize,"")%></div>
</body>
</html>
<%
ORs.Close
Set ORs = Nothing
Function CutPage(Page,Pcount,Rcount,Psize,Str)
	IF Str<>"" Then Str="&"&Str
	CutPage="<DIV style='width:100%; font-size:13px; text-align:center;'><p><FORM method=Post action=?"&Str&">"
	If Page<2 Then      
	   CutPage=CutPage&"首页&nbsp;上一页&nbsp;"
	Else
		CutPage=CutPage&"<a href=?page=1"&Str&">首页</a>&nbsp;"
		CutPage=CutPage&"<a href=?page="&Page-1&Str&">上一页</a>&nbsp;"
	End If
	If Pcount-page<1 Then
		CutPage=CutPage&"下一页&nbsp;尾页&nbsp;"
	Else
		CutPage=CutPage&"<a href=?page="&(page+1)&Str&">"
		CutPage=CutPage&"下一页</a>&nbsp;<a href=?page="&Pcount&Str&">尾页</a>"
	End If
	CutPage=CutPage&"&nbsp;页次：<strong><font color=red>"&Page&"</font>/"&Pcount&"</strong>页 "
	CutPage=CutPage&"&nbsp;共<b><font color='#FF0000'>"&Rcount&"</font></b>条 <b>"&Psize&"</b>条/页"
	CutPage=CutPage&" 转到：<input type='text' name='page' size=2 maxlength=10 class=input value="&page&">"
	CutPage=CutPage&" <input style='height:20px;' type='submit'  value=' Go '  name='cndok'></span></p></FORM></DIV>"     
End Function
%>