⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 image_submit.asp

📁 windowsCE 串口
💻 ASP
字号:
<HTML>
<HEAD>
<title>图形显示提交投票结果</title>
</HEAD>
<body bgcolor="#FEF7DE">
<p align="center">
<font face="隶书" size="+3"> ☆ 感谢您参加本次网上投票调查!☆</font></p>
<hr>
 <%
Dim selected, nowcnt,nowtime
ReDim percent(4)
ReDim name(5)
ReDim count(5)
On Error Resume Next
selected = CInt(Request.Form("os")) '0~4
set fso = CreateObject("Scripting.FileSystemObject")
filepath=server.MapPath("result.txt") 
set getcnt = fso.OpenTextFile(filepath,1,0,0)
i = 0
While Not getcnt.AtEndOfStream
  temp = getcnt.ReadLine
  name(i) = Left(RTrim(temp), 7)
  count(i) = Right(RTrim(temp), 7)
  If i = selected Then
     j = CDbl(count(i)) + 1
     count(i) = Right(Space(8) & Trim(CStr(j)), 8)
  End If
  i = i + 1
 WEnd
getcnt.Close
set writecnt = fso.CreateTextFile(filepath,-1,0)
nowcnt = 0
For j = 0 to 4
  nowcnt = nowcnt + CDbl(count(j))
  writecnt.WriteLine name(j) & count(j)
Next
nowtime=now()
count(5)=nowtime
writecnt.WriteLine name(5) & count(5)
writecnt.Close
%>
  <font color="#AD5A5A" size=+2> 
<%
      Response.Write( "目前的投票结果是:共有")
      Response.Write FormatNumber(nowcnt, 0)&"张选票。其中…"
%>
</font> 
<%
  For j = 0 To 4
   percent(j) = CDbl(count(j)) /CDbl(nowcnt)
%> 
 <p>
<font color='#007f00'size=+2>
 <%Response.Write Trim(name(j))%></font>
 <% Response.Write "("&FormatNumber(count(j), 0)&")"
 %>
   <%width=550*percent(j)%>
   <br>
<img src="image/bar.bmp" width=<%=width%> height="13">
  <%Response.Write FormatPercent(percent(j))%> 
</p>
<%Next%> 
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -