%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%> <% Dim Recordset1 Dim Recordset1_numRows Set Recordset1 = Server.CreateObject("ADODB.Recordset") Recordset1.ActiveConnection = MM_Loja_STRING Recordset1.Source = "SELECT * FROM respEnquete" Recordset1.CursorType = 2 Recordset1.CursorLocation = 2 Recordset1.LockType = 3 Recordset1.Open() Recordset1_numRows = 0 %> <% Dim pergunta__MMColParam pergunta__MMColParam = "12/01/2003" If (formatdatetime(now,2) <> "") Then pergunta__MMColParam = formatdatetime(now,2) End If dia = day(now) mes = month(now) ano = year(now) chave = dia & "/" & mes & "/" & ano %> <% Dim pergunta Dim pergunta_numRows Set pergunta = Server.CreateObject("ADODB.Recordset") pergunta.ActiveConnection = MM_Loja_STRING pergunta.Source = "SELECT * FROM pergEnquete WHERE pergEnquetenoAr <= #" + chave + "# ORDER BY pergEnquetenoAr DESC" pergunta.CursorType = 0 pergunta.CursorLocation = 2 pergunta.LockType = 1 pergunta.Open() pergunta_numRows = 0 %> <% Dim Repeat1__numRows Dim Repeat1__index Repeat1__numRows = -1 Repeat1__index = 0 Recordset1_numRows = Recordset1_numRows + Repeat1__numRows %> <% Dim Repeat2__numRows Dim Repeat2__index Repeat2__numRows = -1 Repeat2__index = 0 Recordset1_numRows = Recordset1_numRows + Repeat2__numRows %> <% if session("votou") <> "sim" then if request.QueryString("id") <> "" then recordset1.filter = "respEnqueteid=" & request.QueryString("id") Recordset1("respEnquetevotos")=(Recordset1.Fields.Item("respEnquetevotos").Value) + 1 recordset1.update session("votou") = "sim" end if end if recordset1.filter = "pergEnqueteid= "& pergunta("pergEnqueteID") %>
| Resultado da Enquete: |
|||
| <%=(pergunta.Fields.Item("pergEnquetePergunta").Value)%> | |||
| <%= formatnumber(((Recordset1.Fields.Item("respEnquetevotos").Value)/total)* 100) %>% |
|
<%=(Recordset1.Fields.Item("respEnqueteresp").Value)%> | |