<% Response.Write "<font face='arial'>" If Request("errormessage") <> "" Then Response.Write "<b>Error! </b>" & Request("errormessage") Else Response.Write "Please complete the form below to begin creating your own poll." End If %>
<table border=0 cellspacing=0 cellpadding=10 width=500><tr> <td colspan=2 bgcolor=#000000 align=center class="bold2"> Enter Your Name as the Poll Creator </td> </tr><tr> <td bgcolor=#ffffff width=25% class="bold">Poll Creator:</td> <td bgcolor=#ffffff> <input type="text" name="creator" value="<%=Request("creator")%>" size=20 class="input"> </td> </tr> </table>
</td></tr> <tr><td>
<table border=0 cellspacing=0 cellpadding=10 width=500><tr> <td colspan=2 bgcolor=#000000 align=center class="bold2"> Create a Password For Your Poll So That You Can Modify It At A Later Time </td> </tr><tr> <td bgcolor=#ffffff width=25% class="bold">Poll Admin Password:</td> <td bgcolor=#ffffff> <input type="password" name="password" value="<%=Request("password")%>" size=10 maxlength=10 maxsize=10 class=input> </td> </tr> </table>
</td></tr> <tr><td>
<table border=0 cellspacing=0 cellpadding=10 width=500><tr> <td colspan=2 bgcolor=#000000 align=center class="bold2"> Give Your Poll a Unique Name </td> </tr><tr> <td bgcolor=#ffffff width=25% class="bold">Poll Name:</td> <td bgcolor=#ffffff> <input type="text" name="name" value="<%=Request("name")%>" size=20 class=input> </td> </tr> </table>
<table border=0 cellspacing=0 cellpadding=10 width=500><tr> <td colspan=2 bgcolor=#000000 align=center class="bold2"> Do you want to have the user enter their name? </td> </tr><tr> <td bgcolor=#ffffff width=25% class="bold">Require user to enter their name:</td> <td bgcolor=#ffffff class="bold"> Yes<input type="radio" name="GetName" value="1"><br> No <input type="radio" name="GetName" value="0" CHECKED> </td> </tr> </table>
<% Total = 0 For I=1 To 5 responseCount = Responses(I) If responseCount <> "" Then Total = Total + Cint(responseCount) End If Next For I=1 To 5 choice = Choices(I) responseCount = Responses(I) If choice <> "" Then Response.Write "<tr><td colspan=1 align=left><font face='arial'>" Response.Write choice Response.Write "</td>" Response.Write "<td colspan=2 width=400><table border=1 cellspacing=0><tr><td bgcolor=blue align=center width=" & ConvertToPix(responseCount) & "><font face='ms sans serif' color=white><b>" & ConvertToPercent(responseCount) & "</td></tr></table></td>" Response.Write "</tr>" End If Next
Function ConvertToPix(sz) If sz = 0 Then ConvertToPix = 0 Else ConvertToPix = Cint(400/Total * sz) End If End Function
Function ConvertToPercent(sz) If sz = 0 Then ConvertToPercent = "0%" Else ConvertToPercent = FormatPercent(sz/Total, 2) End If End Function
%>
</table>
<% If num = "" Then %> <br><br> <table border=0 cellspacing=0 cellpadding=0><tr>
<td colspan=3 align=center><font face="verdana"> <a href="default.asp?ID=<%=id%>">Add Your Vote</a> </td></tr> </table>