📄 admin_vote.asp
字号:
<!--#include file="../../conn/conn.asp" -->
<!--#include file="../../Inc/Commoncode.asp" -->
<!--#include file="../checkvalid.asp" -->
<%
action1=my_request("action",0)
select case action1
case "titlemodi"
call titlemodi()
case "voteadd"
call voteadd()
case "votemodi"
call votemodi()
case "del"
call del()
case else
end select
sql="select * from job_vote where job_flag=1"
set rs=conn.execute (sql)
idtitle=rs("job_id")
votetitle=rs("job_vote")
rs.close
set rs=nothing
sub titlemodi()
idtitle=my_request("idtitle",1)
votetitle=my_request("votetitle",0)
sql="update job_vote set job_vote='"&votetitle&"' where job_flag=1 and job_id="&idtitle
conn.execute (sql)
response.redirect "Admin_Vote.asp"
end sub
sub voteadd()
vote=my_request("vote",0)
sql="insert into job_vote (job_vote,job_addtime) values ('"&vote&"','"&now()&"')"
conn.execute (sql)
response.redirect "Admin_Vote.asp"
end sub
sub votemodi()
idvote=my_request("idvote",1)
vote=my_request("vote",0)
sql="update job_vote set job_vote='"&vote&"' where job_flag=0 and job_id="&idvote
conn.execute (sql)
response.redirect "Admin_Vote.asp"
end sub
sub del()
idvote=my_request("idvote",1)
sql = "delete from job_vote where job_id="&idvote
conn.execute(sql)
response.redirect "Admin_Vote.asp"
end sub
%>
<html>
<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>网站调查投票-设置</title>
<link rel="stylesheet" type="text/css" href="../css/style.css">
</head>
<body>
<table cellspacing="1" cellpadding="4" align="center" width="100%"class=tableBorder>
<tr>
<TH height="25" colspan="2" class=tableHeaderText>网站投票调查-设置</th>
</tr>
<form action="Admin_Vote.asp" method=post>
<tr>
<td width="170" class="altbg1">投票调查主题:</td>
<td width="795" class="altbg2">
<input type="text" name="votetitle" size="33" maxlength="20" value="<%=votetitle%>"><input type="hidden" name="idtitle" value="<%=idtitle%>"><input type="hidden" name="action" value="titlemodi"> <input type="submit" value="修改" name="B1"></td>
</tr>
</form>
<tr>
<td width="170" class="altbg1">投票备选项目:</td>
<td width="795" class="altbg2">
<table border="0" width="100%" id="table1" cellpadding="2" >
<form action="Admin_Vote.asp" method=post>
<tr>
<td class="huiby"><b>新投票备选项目-添加:</b></td>
</tr>
<tr>
<td class="huiby"><input type="text" name="vote" size="33" maxlength="20"> <input type="hidden" name="action" value="voteadd"><input type="submit" value="增加" name="B2"></td>
</tr>
</form>
<tr>
<td class="huiby"><b>已经产生的投票备选项目-管理:</b></td>
</tr>
<%
sql="select job_id,job_vote from job_vote where job_flag=0 order by job_addtime desc"
set rs=conn.execute (sql)
if rs.eof then
response.write "<tr><td><font color=#FF0000>暂无投票项目,请添加</font></td></tr>"
else
i=1
do while not rs.eof
idvote=rs("job_id")
vote=rs("job_vote")
%>
<form action=Admin_Vote.asp method=post>
<tr>
<td height="24" class="huiby">
<input type="text" name="<%=i%>" size="3" maxlength="20" value="<%=i%>" disabled> <input type="text" name="vote" size="35" maxlength="20" value="<%=vote%>"> <input type="hidden" name="idvote" value=<%=idvote%>><input type="hidden" name="action" value="votemodi"><input type="submit" value="修改" name="B3"> <input type="button" value="删除" onClick="window.location='Admin_Vote.asp?idvote=<%=idvote%>&action=del'" name="B4"></td>
</tr>
</form>
<%
rs.movenext
i=i+1
loop
rs.close
set rs=nothing
end if%>
</table>
</td>
</tr>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -