📄 manage.asp
字号:
<!--#include file="../common/conn.asp"-->
<%
if request("classid")<>"" and request("action")="modifysubmit" then
sql="update diaocha set caption='"&request("caption")&"',content1='"&request("content1")&"',content2='"&request("content2")&"',"
sql=sql&"content3='"&request("content3")&"',content4='"&request("content4")&"',content5='"&request("content5")&"' where id="&request("classid")
conn.execute(sql)
end if
%>
<%
if request("action")="del" then
sql="delete from diaocha where id="&request("newsclassid")
conn.execute(sql)
end if
%>
<%
key=trim(request("key"))
if key<>"" then
sql="select * from diaocha where caption like '%"&key&"%' order by id desc"
else
sql="select * from diaocha order by id desc"
end if
PageSize = 30
If Request("page") ="" Then
page=1
Else
page=Int(Abs(Request("page")))
End if
rs.open sql,conn,1,3
if not rs.eof then
rs.PageSize = PageSize
TotalPage = rs.PageCount
rs.absolutepage = page
total = rs.RecordCount
end if
%>
<html>
<head>
<title>管理网上调查</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<META NAME="Description" CONTENT="">
<link rel="stylesheet" href="../images/font.css" type="text/css">
<script language="javascript">
function isok(theform)
{
if (theform.caption.value=="")
{
alert("分类名称不能为空!")
theform.caption.focus();
return false;
}
}
</script>
<link href="../users/.css" rel="stylesheet" type="text/css">
<link href="../users/.css" rel="stylesheet" type="text/css">
</head>
<body bgcolor="#FED17E" text="#ffffff" background="../images/bgpic.gif">
<br>
<table width="90%" border="0" cellspacing="2" cellpadding="0" align="center">
<tr>
<td bgcolor="">
<table width="90%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="bottom">
<div align="center">
<p align="left"> <span class="unnamed1"><font color="#FFFFFF">管理网上调查:</font></span></p>
</div>
</td>
</tr>
</table>
<br>
</td>
</tr>
<tr>
<td bgcolor="">
<table width="100%" border="0" cellspacing="1" cellpadding="0" align="center" bgcolor="">
<tr bgcolor="#E7E7E7">
<td width="9%" height="20" class="unnamed1"> <div align="center"><font color="#666666">编号</font></div></td>
<td width="31%" height="20" class="unnamed1" align="center"><font color="#666666">标题</font></td>
<td height="20" width="12%" class="unnamed1"> <div align="center"><font color="#666666">管理</font></div></td>
</tr>
<%
for i=1 to rs.pagesize
while not rs.eof
%>
<tr bgcolor="">
<td width="9%" height="20" align="center" class="unnamed1"> <%=rs("id")%>
</td>
<td width="31%" height="20" align="center" class="unnamed1"> <%=rs("caption")%>
</td>
<td width="12%" align="center" height="20" class="unnamed1"><a href="manage.asp?action=modify&page=<%=page%>&newsclassid=<%=rs("id")%>">修改
</a>/ <a href="manage.asp?action=del&newsclassid=<%=rs("id")%>&page=<%=page%>" onClick="var a=confirm('确实要删除吗?');if(a==0) return(false);">删除</a></td>
</tr>
<%
rs.movenext
wend
next
%>
<tr bgcolor="">
<td height="20" colspan="5" class="unnamed1">
<%
If totalpage=1 Then
Response.write "·共有1页·"
End If
If Not Page=1 Then
Response.write "<a href=manage.asp?page=1>首页</a> "
Response.write "<a href=manage.asp?page="&Cstr(Page-1)&">前页</a> "
Else
Response.write "首页 "
Response.write "前页 "
End If
If Not Page=totalpage Then
Response.Write "<a href=manage.asp?page="&Cstr(Page+1)&">后页</a> "
Response.Write "<a href=manage.asp?page="&PageCount&">尾页</a>"
Else
Response.Write "后页 "
Response.Write "尾页"
End If
%>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td bgcolor="">
<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
<form method="post" action="manage.asp">
<tr bgcolor="#E7E7E7">
<td width="20%" bordercolor="#FFFFFF" class="unnamed1">
<div align="center"><font color="#666666">搜索:</font></div>
</td>
<td class="unnamed1">
<input type="text" name="key" class="button">
<input type="submit" name="Submit2" value="搜索" class="button">
</td>
</tr>
</form>
</table>
</td>
</tr>
</table>
<table width="90%" border="0" align="center" cellpadding="0" cellspacing="1">
<tr>
<td> </td>
</tr>
</table>
<%
if request("action")="modify" then
set rs1=server.CreateObject("ADODB.recordset")
sql="select*from diaocha where id="&request("newsclassid")
rs1.open sql,conn,3,2
%>
<table width="90%" border="0" align="center" cellpadding="0" cellspacing="1">
<tr>
<form action="manage.asp?action=modifysubmit&page=<%=page%>" method="post" onsubmit="return isok(this)">
<td>输入该分类的新名称
<table width="460" border="0" align="center" cellpadding="0" cellspacing="1">
<tr class="unnamed1">
<td width="105" align="right">调查标题:</td>
<td width="352">
<input name="caption" type="text" value="<%=rs1("caption")%>" size="40"></td>
</tr>
<tr class="unnamed1">
<td align="right">调查内容:</td>
<td valign="top">
<p> A:
<input name="content1" type="text" id="content1" value="<%=rs1("content1")%>">
<br>
<br>
B:
<input name="content2" type="text" id="content2" value="<%=rs1("content2")%>">
</p>
<p> C:
<input name="content3" type="text" id="content3" value="<%=rs1("content3")%>">
</p>
<p> D:
<input name="content4" type="text" id="content4" value="<%=rs1("content4")%>">
</p>
<p>E:
<input name="content5" type="text" id="content5" value="<%=rs1("content5")%>">
</p>
</td>
</tr>
<tr>
<td align="right"> </td>
<td> </td>
</tr>
<tr align="center">
<td colspan="2"><input name="submit" type="submit" value="提 交">
</td>
</tr>
</table>
<input type="hidden" value="<%=request("newsclassid")%>" name=classid>
</td>
</form>
</tr>
</table>
<%end if%>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -