<!--#include file="pathcheck.asp"-->
<!--#include file="conn.asp"-->
<!--#include file="md5.asp"-->
<%
cman=md5(Replace(Trim(Request.Form("username")),"'",""))
vpwd=md5(Replace(Trim(Request.Form("password")),"'",""))
set rs=server.createobject("adodb.recordset")
sql="select * from cvote where cman='"&cman&"'and vpwd='"&vpwd&"'"
rs.open sql,conn,1,3
if rs.eof then 
	closers
	closedb
	response.Redirect("info.asp?operate=loginf")
else
	session("controlvote")="you have this right!"
	rs("lastip")=request.ServerVariables("REMOTE_ADDR")
	rs("lastlogin")=now()
	rs.update
	closers
	closedb	
	response.Redirect("listvote.asp")
end if
%>