📄 invest_admin.asp
字号:
<%@ Language=VBScript%>
<%
Response.Buffer=false
Response.Expires=0
if Session("userqx")="1" or Session("userqx")="9" then
else
Response.Redirect "../warn.asp"
end if
%>
<!-- #include file="../dsn.asp" -->
<%
pageno=Request.QueryString("pageno")
flag=Request.QueryString("flag")
keyno=Request.QueryString("keyno")
if pageno="" then pageno=1
if flag="" then flag="1"
htmltitle="网上调查表管理"
htmlname="invest_admin.asp?flag="+flag
addhtml="invest_edit.asp?flag="+flag
set cn=server.CreateObject("ADODB.Connection")
cn.Open mycnstr
set rs=server.CreateObject("ADODB.Recordset")
if keyno<>"" then
sqltext="select top 1 * from investigate where parentno="&keyno
rs.Open sqltext,cn,1,1
if rs.EOF then
sqltext="delete from investigate where keyno="&keyno
cn.Execute sqltext
else
Response.Write "<font color=red>警告:该主题下已有题目,不能删除!</font>"
end if
rs.Close
end if
%>
<html>
<head>
<title><%=htmltitle%></title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style type="text/css">
<!--
body {font-size: 12px; color: #000000; font-family: 宋体}
td {font-size: 12px; color: #000000; font-family: 宋体;line-height:130%}
.t1 {font:12px 宋体;color=000000}
.t2 {font:12px 宋体;color:ffffff}
.t3 {font:12px 宋体;color:336699}
.t4 {font:12px 宋体;color:ff0000}
.bt1 {font:14px 宋体;color=000000}
.bt2 {font:12px 宋体;color:ffffff}
.bt3 {font:14px 宋体;color:336699}
.bt4 {font:14px 宋体;color:ff0000}
.bt5 {font:14px 宋体;color:0000ff}
.bt10 {font:14px 宋体;color:0000ff}
.td1 {font-size:12px;background-color:#3388bb;color:#ffffff}
.td2 {font-size:12px;background-color:#ffffff;color:#000000;}
A:link {color: #000077}
A:visited {color: #000077}
A:hover {color: #ff0000}
A.title1:link {text-decoration:none;color:#336699;}
A.title1:visited {text-decoration:none;color:#336699;}
A.title1:active {text-decoration:none;color:#336699;}
A.title1:hover {text-decoration:none;color:#336699;}
-->
</style>
</head>
<body topmargin=5>
<table width="100%" align=center>
<tr>
<td valign="top" align="left" width="100%">
<form name="form1">
<table width="100%" height="20" border="0">
<tr>
<td style="font-size:12px;"></td>
<td><font color="navy" style="font-size:14px"><b><%=htmltitle%></b></font></td>
<td align="right">
</td>
</tr>
</table>
<table width="100%" height="20" border="0">
<tr>
<%
sqltext="select * from investigate where parentno=0 order by sortnum desc"
'Response.Write sqltext
rs.Open sqltext,cn,1,1
listcs=20
rs.PageSize=listcs
if pageno="" then
pageno=1
else
pageno=cint(pageno)
end if
if rs.PageCount>0 then rs.AbsolutePage=pageno
%>
<td class=t1 align="left" width=200>
<a href="Javascript:window.location.reload()">[刷新列表]</a>
<a href="<%=addhtml%>">[增加]</a></td>
<td align="right">
<%if rs.PageCount>1 then%>
[第<b><%=pageno%></b>页, 共<b><%=rs.PageCount%></b>页<b><%=rs.RecordCount%></b>条记录]
<%if pageno>1 then%>
<a class=r href="<%=htmlname%>&pageno=1">首页</a>
<a class=r href="<%=htmlname%>&pageno=<%=pageno-1%>">上页</a>
<%end if
if pageno<rs.PageCount then%>
<a class=r href="<%=htmlname%>&pageno=<%=pageno+1%>">下页</a>
<a class=r href="<%=htmlname%>&pageno=<%=rs.PageCount%>">末页</a>
<%end if%>
<%end if
%>
</td>
</tr>
</table>
<table width="100%" border="0" cellspacing="1" cellpadding="1" style="font-size:14.5px;line-height:100%">
<tr bgcolor="336699" style="color:#ffffff" align="center">
<td class=bt2>删除</td><td class=bt2>序号</td>
<td class=bt2>标题</td><td class=bt2></td><td class=bt2></td></tr>
<%
i=0
do while not rs.EOF and i<listcs
if (i mod 2)=1 then
Response.Write("<tr bgcolor=fefefe>")
else
Response.Write("<tr bgcolor=efefef>")
end if
%>
<td width="35" align="center">
<img onclick="Javascript:delrec('<%=rs("keyno")%>','<%=trim(rs("title"))%>')" src="../admin/delete.gif">
</td>
<td width="35" align="center"><%=rs("sortnum")%></td>
<td align=left><a href="<%=addhtml%>&keyno=<%=rs("keyno")%>">
<%=left(trim(rs("title")),30)%>...</td>
<td width="62" align="center"><a href="Javascript:invest_view('<%=rs("keyno")%>')">查看结果</td>
<td width="62" align="center"><a href="invest_title_admin.asp?parentno=<%=rs("keyno")%>">题目维护</td>
</tr>
<%
i=i+1
rs.MoveNext
loop
%>
</table>
</td></tr>
</form>
</td></tr><table>
</body>
</html>
<script language="Javascript">
function delrec(code,topic)
{
if (confirm('您确认要删除“'+topic+'”吗?')==true)
{
window.location.href="<%=htmlname%>&keyno="+code
return false;
}
}
function invest_view(keyno)
{
window.open('invest_view.asp?parentno='+keyno,'','toolbar=no,location=no,directories=no,status=no,resizable=no,menubar=no,scrollbars=no,width=450,height=320,left=130,top=80')
}
</script>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -