📄 admin_index.asp
字号:
<!--#include file="Conn.asp" -->
<!--#include file="seeion.asp" -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>投票管理</title>
<LINK href="images/style.css" type=text/css rel=stylesheet>
</head>
<body>
<%
set rs=server.createobject("adodb.recordset")
exec="select * from fl order by id desc"
rs.open exec,conn,1,1
%>
<table width="800" border="0" align="center" cellpadding="6" cellspacing="1">
<tr>
<td><a href="admin_index.asp">后台首页</a> <a href="LoginOut.asp">安全退出系统</a></td>
</tr>
</table>
<table width="800" border="0" align="center" cellpadding="5" cellspacing="1">
<tr>
<td bgcolor="#990000"><span style=" width:760px; background-color:#990000; font-size:14px; font-weight:bold; color:#FFFFFF; padding:6px;">※ 投票管理 ※</span></td>
</tr>
<tr>
<td bgcolor="#FFFFFF"><%do while not rs.eof%>
<table width="100%" border="0" cellpadding="5" cellspacing="0">
<tr>
<td width="64%">·<a href="vote.asp?id=<%=rs("id")%>" target="_blank" style="font-size:14px; color:#990000; line-height:25px;"><%=rs("fl")%></a></td>
<td width="23%"><div align="center">
<input type="button" name="Submit3" value="管理投票项目" onClick="window.location.href='xiugai_vote.asp?id=<%=rs("id")%>' " class="btn"/>
</div></td>
<td width="13%"><div align="center">
<input type="button" name="Submit" value="删除此投票项目" onclick="javascript:if(confirm('确定删除此投票项目?删除后不可恢复!')){window.location.href='admin_index.asp?del=ok&id=<%=rs("id")%>';}else{history.go(0);}" class="btn"/>
</div></td>
</tr>
</table>
<%rs.movenext
loop
%> </td>
</tr>
<form id="form1" name="form1" method="post" action="admin_index.asp?add=ok">
<tr>
<td bgcolor="#F7F7F7">
增加投票项目:
<label>
<input name="fl" type="text" class="input" size="50"/>
</label>
<label>
<input type="submit" name="button" id="button" value="确认提交" class="btn" />
</label>
</td>
</tr></form>
</table>
</body>
</html>
<%
if Request.QueryString("add")="ok" then
set rs=server.createobject("adodb.recordset")
sql="select fl from fl"
rs.open sql,conn,1,3
fl=request.form("fl")
if fl="" then
response.Write("<script language=javascript>alert('投票项目名称不能为空!');history.go(-1)</script>")
response.end
end if
rs.addnew
rs("fl")=fl
rs.update
rs.close
set rs=nothing
conn.close
set rs=nothing
Response.Write "<script>alert('投票项目增加成功!');window.location.href='admin_index.asp';</script>"
end if
%>
<%
if request("del")="ok" then
set rs=server.createobject("adodb.recordset")
id=Request.QueryString("id")
sql="select * from fl where id="&id
rs.open sql,conn,2,3
rs.delete
rs.update
Response.Write "<script>alert('投票刪除成功!');window.location.href='admin_index.asp';</script>"
end if
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -