<!--#include file="Config.asp" -->
<div class='menu'>&nbsp;查看 &gt; 单页</div>
<%
eims = "Abaut"
eTable = Prefix&eims
ListUrl = eims&"List.asp?eims="&eims
EditUrl = eims&"Edit.asp?eims="&eims
Mgt("p01") 'Cookies : Permission
%>
<div class="title">
<form method='post' name='sForm' action="<%=ListUrl%>">
  <table width="100%" border="0" cellspacing="1" cellpAdding="1">
    <tr>
      <td><a href="<%=EditUrl%>" target="mainFrame">【添加信息】</a></td>
      <td align="right"><!-- Search Begin -->
        标题<input type='text' name='Title'>
        <input type='submit' value='搜索' name='submit'>
		<input type='submit' value='显示' name='submit'>
		<input type='submit' value='隐藏' name='submit'>		
		<input type='submit' value='删除' name='submit' onClick="return confirm('确定要删除吗？')">
		<input type="hidden" name="del" value="yes">
        <!-- Search end -->
      </td>
    </tr>
  </table>
</div>
<div class="content" align="center">
<table width="100%" border="0" cellspacing="1" cellpAdding="1">
  <tr bgcolor="#FFFFFF" align="center">    
	<td width='60'><div class='title'>ID</div></td>
	<td width='60'><div class='title'>排序</div></td>
    <td><div class='title'>标题</div></td>
    <td width="60"><div class='title'>抽奖名单</div></td>
	<td width='60'><div class='title'>抽奖界面</div></td>
	<td width="150"><div class='title'>更新日期</div></td>    
	<td width='35'><div class='title'>操作</div></td>
    <td width='35'><div class='title'>状态</div></td>
	<td width='35'><div class='title'><input type='checkbox' name='chkall' onClick='CheckAll(this.form)' value='ON'> </div></td>
  </tr>
<%
fField="ItemID,Seq,Title,ItemHit,EditDate,ItemRec"
OrderBy="ItemID desc"

Condition="ItemID>0"
If Trim(Request("Title"))<>"" Then Condition=Condition&" and Title like '%"&Trim(Request("Title"))&"%'"

Sql="Select "&fField&" From ["&eTable&"] Where "&Condition&" Order By "&OrderBy&" "
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

ItemRec="显示"
if Int(Rs("ItemRec"))=0 then ItemRec="<span class=red>隐藏</span>"
%>
  <tr onMouseOver='trOver(this)' onMouseOut='trOut(this)' align="center">
	<td><%=Int(Rs(0))%></td>
    <td><%=Trim(Rs(1))%></td>
	<td><%=Trim(Rs(2))%></td>
	<td><a href="Lottery.asp?TypeID=<%=Int(Rs(0))%>">点击查看</a></td>
	<td><a href="../Lottery.asp?TypeID=<%=Int(Rs(0))%>" target="_blank">点击查看</a></td>
	<td><%=Trim(Rs(4))%></td>    
	<td><a href='<%=EditUrl%>&action=Edit&ItemID=<%=Int(Rs(0))%>'>修改</a></td>
    <td><%=ItemRec%></td>
	<td><input name='BoxID' type='checkbox' value='<%=Int(Rs(0))%>'></td>
  </tr>
<% 
Rs.MoveNext
next
end if
Rs.Close
Set Rs=nothing
%>
</table>
</form>
<div class="page"><%showpage Page,totalnumber,pagenum,ReUrl() %></div>
</div>
</body></html>
<%Call CloseConn()%>