<!--#include file="Config.asp" -->
<% 
eims = "Bless"

if not TypeID>0 then 
response.write "Err:参数错误"
response.End()
end if
%>
<!DOCTYPE html><html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
<link rel="stylesheet" href="jmobile/jquery.mobile-1.3.0.min.css" />
<script src="jmobile/jquery.min.js"></script>
<script src="jmobile/jquery.mobile-1.3.0.min.js"></script>
<link rel="stylesheet" href="img/eims.css">
<script src="img/eims.js"></script>

<title><% =Title %></title>
</head><body>

<div data-role="page">
	<div data-role="header" data-fullscreen="true">
		<a href="#" data-icon="back" data-rel="back">返回</a>
		<h2><% =Title %></h2>
		<a href="index.asp?TypeID=<%=TypeID%>" data-icon="home" data-direction="reverse">主页</a>
	</div>

	<div data-role="content" class="ItemNote">

<%
If Action = "Save" Then
UserName = CheckSql(Trim(Request.Form("UserName")))
ItemNote = Trim(Request.Form("ItemNote"))
Set Rs=Server.CreateObject("Adodb.RecordSet")
Rs.Open "Select * From [eims_Bless]",Conn,1,3
Rs.AddNew
Rs("UserName") = UserName
Rs("ItemNote") = ItemNote
Rs("AddDate") = Now()
Rs("eType") = "Wed"
Rs("TypeID") = TypeID
Rs("ItemRec") = 1
Rs.Update
Rs.Close:Set Rs=Nothing	
response.Redirect("?TypeID="&TypeID)
End If

'----------------------

pagenum=10
Condition="ItemRec=1 and TypeID="&int(request("TypeID"))
Sql="Select ItemID,UserName,ItemNote,AddDate From ["&Prefix&eims&"] Where "&Condition&" Order By ItemID desc"
Set Rs=Server.CreateObject("Adodb.RecordSet")
Rs.Open Sql,Conn,1,1
totalnumber=rs.recordcount'总记录数
if not (rs.eof and rs.bof) then'有记录
rs.PageSize=pagenum
maxpage=rs.pageCount'总页数
page=cint(request("page"))'接收页面传来的参数
if page<1 then page=1
If page>maxpage then page=maxpage
rs.Absolutepage=Page
for i=1 to rs.PageSize
if rs.eof then exit for
response.write "<li>"&Trim(Rs("UserName"))&" &gt; "&Trim(Rs("ItemNote"))&"</li>"
Rs.MoveNext
next
end if
Rs.Close
Set Rs=nothing
%>
</ul>
<div class="page"><%showpage Page,totalnumber,pagenum,ReUrl() %></div>
<form name='eform' method='post' onSubmit='return CKBook();' action="?Action=Save&TypeID=<%=TypeID%>" data-ajax="false">
<table border="0" cellspacing="0" cellpadding="3" width="99%">
  <tr>
    <td width="38" align="right">姓名</td>
    <td align="left"><input type='text' name='UserName'></td>
  </tr>
  <tr>
    <td align="right">内容</td>
    <td align="left"><textarea name="ItemNote" style="height:80px; width:100%;"></textarea></td>
  </tr>
  <tr valign="top">
    <td></td>
    <td align="left"><input type='submit' value=' 提 交 ' style="background:#555555; color:#FFFFFF; border:#333333"></td>
  </tr>
</table>
</form>
</div>


	<div data-role="footer" data-position="fixed" data-fullscreen="true">
		<div data-role="navbar">
			<ul>
			<li><a href="Photo.asp?TypeID=<%=TypeID%>">相册</a></li>
			<li><a href="Bless.asp?TypeID=<%=TypeID%>">祝福</a></li>
			<li><a href="Share.asp?TypeID=<%=TypeID%>">分享</a></li>
			</ul>
		</div>
	</div>
	
</div>

</body></html>
<% Call CloseConn() %>