<!--#include file="Conn.asp"-->
<!--#include file ="Check_Manager.asp"-->
<%
Dim Sel_Array,Coun,selected
title = Trim(Request.Form("title"))
content = Replace(Request.Form("message"),chr(13)&chr(10),"|")
Sel_Array = split(content,"|")
i=0 
j=0
selected=""
Coun=""
Do until i>Ubound(Sel_Array) or j>9
selected = selected & Sel_Array(i) & "|"
Coun = Coun & "0|"
i=i+1
Loop
Set rs=Conn.Execute("Select * From [Vote] Where Vote_ID=1")
If rs("Selectd") = selected Then
Sql = "Update [Vote] Set VoteTitel='"&title&"' Where Vote_ID=1"
Conn.Execute (Sql)
Else
Sql = "Update [Vote] Set VoteTitel='"&title&"',Selectd='"&selected&"',SelCount='"&Coun&"',VoteCount=0 Where Vote_ID=1"
Conn.Execute (Sql)
End if
JaSys("管理员" & session("ManagerUser") & "<font color=red>修改投票</font>")
Response.write "<script language='javascript'>" & chr(13)
		response.write "alert('投票修改成功!');" & Chr(13)
		response.write "window.document.location.href='Vote_Manage.asp';"&Chr(13)
		response.write "</script>" & Chr(13)
Response.End
%>
