<!--#include file="../../ACT.Function.asp"-->
<!--#include file="../../../ACT_inc/cls_pageview.asp"-->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>自定义表单管理 By ACTCMS.COM</title>
<link href="../../Images/css1/css.css" rel="stylesheet" type="text/css">
</head>
<body>
<%
	Dim ModeID,TableName,ModeName,Action,Rs
	 ModeID = ACTCMS.ChkNumeric(Request("ModeID"))
	 if ModeID=0 or ModeID="" Then ModeID=1
	 If Not ACTCMS.ACTCMS_QXYZ(0,"form_ACT","") Then   Call Actcms.Alert("error","") 
	 TableName=ACTCMS.actexe("select ModeTable from ModeForm_ACT")(0)
	 ModeName=ACTCMS.actexe("select ModeName from ModeForm_ACT")(0)
	Action = Request("A")
	Select Case Action
			Case "D"
				Call Del()
			Case Else
				Call Main()
	End Select

	Sub del()
		ACTCMS.ACTEXE("Delete From FormSub_ACT Where ID=" & ACTCMS.ChkNumeric(Request("ID")))		
		Call Actcms.ActErr("删除表单成功&nbsp;&nbsp;<a href=Sys_Act/Form/list.asp?ModeID="&ModeID&">点击这里返回管理首页</a>","")
	End Sub 

	Sub Main()

	Dim strLocalUrl
	strLocalUrl = request.ServerVariables("SCRIPT_NAME")
	Dim intPageNow
	intPageNow = request.QueryString("page")
	Dim intPageSize, strPageInfo
	intPageSize = 30
	Dim arrRecordInfo, i
	Dim sql, sqlCount
	sql = "SELECT [ModeID], [UserName], [FormContent], [UpdateTime], [UserIP],[ID]" & _
		" FROM [FormSub_ACT] where ModeID="&ModeID&" " & _
		"ORDER BY [ModeID] ASC"
	sqlCount = "SELECT Count([ModeID])" & _
			" FROM [FormSub_ACT]  where ModeID="&ModeID&" "

		Dim clsRecordInfo
		Set clsRecordInfo = New Cls_PageView
			clsRecordInfo.intRecordCount = 2816
			clsRecordInfo.strSqlCount = sqlCount
			clsRecordInfo.strSql = sql
			clsRecordInfo.intPageSize = intPageSize
			clsRecordInfo.intPageNow = intPageNow
			clsRecordInfo.strPageUrl = strLocalUrl
			clsRecordInfo.strPageVar = "page"
		clsRecordInfo.objConn = Conn		
		arrRecordInfo = clsRecordInfo.arrRecordInfo
		strPageInfo = clsRecordInfo.strPageInfo
		Set clsRecordInfo = nothing
			
	
  %>
<table width="98%" border="0" align="center" cellpadding="2" cellspacing="1" class="table">
  <tr>
    <td width="5%" align="center" class="bg_tr" nowrap>ID号</td>
    <td width="8%" align="center" class="bg_tr">提交者</td>
    <td align="center" class="bg_tr">内容</td>
    <td width="10%" align="center" class="bg_tr" nowrap>管理操作</td>
  </tr>
  <%  	Dim bgColor
		If IsArray(arrRecordInfo) Then
			For i = 0 to UBound(arrRecordInfo, 2)
  %>
  <tr  onMouseOver=overColor(this) onMouseOut=outColor(this)>
    <td align="center" ><%= arrRecordInfo(0,i) %></td>
    <td align="center"><%= arrRecordInfo(1,i) %></td>
    <td><%= arrRecordInfo(2,i) %></td>
    <td align="center" ><a href="?A=D&ID=<%= arrRecordInfo(5,i) %>"  onClick="{if(confirm('确定删除吗?')){return true;}return false;}">删除</a></td>
  </tr><% 
		Next
	End If %>
	    <tr >
      <td height="25" colspan="5" align="center" class="td_bg"><%= strPageInfo%></td>
    </tr>
</table>
<%
		 

	End Sub 
%>

<script language="JavaScript" type="text/javascript">

function overColor(Obj)
{
	var elements=Obj.childNodes;
	for(var i=0;i<elements.length;i++)
	{
		elements[i].className="tdbg1"
		Obj.bgColor="";
	}
	
}
function outColor(Obj)
{
	var elements=Obj.childNodes;
	for(var i=0;i<elements.length;i++)
	{
		elements[i].className="tdbg";
		Obj.bgColor="";
	}
}

</script>


</body>
</html>