?? votepoll.asp
字號:
<!--插入html頭部分以及數據庫接口-->
<!--#include file="in_conn.asp"-->
<body>
<!--插入網站置頂-->
<% if u_name="" then
Response.Redirect "log_err.asp"
else
%>
<!--#include file="in_topmb.asp"-->
<% end if %>
<%
'判斷用戶權限
IF u_power=0 THEN
Response.Redirect "resp.asp?cmd=id_wait"
ELSEIF u_power<0 THEN
Response.Redirect "resp.asp?cmd=id_forbid&time="&u_fobdate
END IF
vkind=Request.Form("hid_kind2")
'版面是否存在
dim kind_name
IF isNumeric(Request.Form("hid_kind2")) THEN
vkind=CLng(vkind)
'找出該版面的相關信息
sqlstr="SELECT kd_name FROM tblkind WHERE kd_ID="&vkind
rs.open sqlstr,conn,1,1
if rs.eof AND rs.bof then
Response.Redirect "resp.asp?cmd=kindmiss"
else
kind_name=rs("kd_name")
end if
rs.close
ELSE
Response.Redirect "resp.asp"
END IF
'獲取傳值
dim visradio
visradio=CBool(Request.Form("isradio"))
dim opval
dim vtid
vtid=Request.Form("topicID")
'檢查是否重復投票
sqlstr="SELECT count(v_ID) FROM tblvote WHERE v_enable=true AND v_voter='"&u_name&"' AND v_topicID="&vtid
if conn.Execute(sqlstr,0,1)(0)>=1 then
Response.Redirect "resp.asp?cmd=revote"
end if
'投票登記
IF visradio=false THEN
for i=1 to Request.Form("vop()").count
opval=CStr(Request.Form("vop()")(i))
sqlstr="INSERT INTO tblvote(v_topicID,v_option,v_voter,v_enable,v_only1) VALUES("&vtid&",'"&stryin(opval)&"','"&u_name&"',true,false)"
conn.Execute sqlstr
next
'檢查是否為空票
if Request.Form("vop()").count<1 then
Response.Redirect "resp.asp?cmd=votemiss"
end if
ELSE
opval=CStr(Request.Form("vop"))
sqlstr="INSERT INTO tblvote(v_topicID,v_option,v_voter,v_enable,v_only1) VALUES("&vtid&",'"&stryin(opval)&"','"&u_name&"',true,true)"
conn.Execute sqlstr
END IF
%>
<table align="center" width="700" height="50" border="0" cellspacing="0" cellpadding="11" class="rdkuang"><tr>
<th width="100%" height="100%" align="left">
<img src="img/jjgo.gif" border=0>恭喜,您的投票已被成功登記!謝謝參與!
<br>請選擇接下來的操作:<font color="red">(系統在3秒后將自動轉向您剛發表的投票主題)</font>
<br><a href="voteview.asp?id=<% =vtid %>"><img src="img/icn_go.gif" border="0">返回相關投票主題</a>
<br><a href='talklist.asp?kind=<% =vkind %>'><img src="img/icn_go.gif" border="0">返回到 <% =unhtml(kind_name) %></a>
<br><a href="talkbook.asp"><img src="img/icn_go.gif" border="0">返回[班級討論區]</a>
<br><a href="index.asp"><img src="img/icn_go.gif" border="0">返回首頁</a>
</th>
</tr></table>
<script defer language="javascript">
setTimeout('location.href="voteview.asp?id=<% =vtid %>"',3000);
</script>
<br>
<!--插入在線統計-->
<!--#include file="in_online.asp"-->
<!--插入網站置底-->
<!--#include file="in_bottom.asp"-->
</body>
</html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -