📄 voteindex.asp
字号:
<!-- #include file="conn.asp"-->
document.write ("<form method='post' action='votes.asp'><table width='100%' border='1' cellpadding='2' cellspacing='0' bordercolordark='#f7f7f7' bordercolorlight='#cccccc' class='inputt'>");
<%
on error resume next
dim id,rs,chk
id=request.querystring("id")
if id<>"" then
set rs=server.createobject("adodb.recordset")
rs.open "select title,types,brstr from V_title where id=cint('"&id&"')",conn,1,1
if not rs.eof then
chk=rs("types")
%>
document.write ("<tr><td bgcolor='#f7f7f7'><font color='#ff0000'><%=rs("title")%></font></td></tr><tr><td><table border='0' width='100%' class='inputt'>");
<%
dim rs1,i
set rs1=server.createobject("adodb.recordset")
rs1.open "select * from V_vote where lid=cint('"&id&"')",conn,1,1
if not rs1.eof then
do while not rs1.eof
if i<>0 then
if (i mod rs("brstr"))=0 then
%>
document.write ("<tr>");
<%end if
end if
%>
document.write ("<td>");
<%
select case rs("types")
case "1" '单选
%>
document.write ("<input type='radio' name='v' value='<%=rs1("id")%>'><%=rs1("cont")%><br>");
<%
case "2" '多选
%>
document.write ("<input type='checkbox' name='v' value='<%=rs1("id")%>'><%=rs1("cont")%><br>");
<%
end select
%>
document.write ("</td>");
<%
i=i+1
rs1.movenext
loop
end if
rs1.close
%>
<%
end if
rs.close
end if
%>
document.write ("</table></td></tr>");
document.write ("<tr><td bgcolor='#f7f7f7' align='center'><input type='hidden' name='idd' value='<%=id%>'><input type='submit' name='submit' value='投票' class='inputt'> <input type='button' name='button1' value='查看' class='inputt' onclick=window.open('view.asp?id=<%=id%>','vie','scrollbars=yes,resizable=yes,width=550,height=250');><input type='hidden' name='id' value='<%=id%>'><input type='hidden' name='chk' value='<%=chk%>'></td></tr></table></form>");
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -