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

📄 diaocha2.asp

📁 大家好
💻 ASP
字号:
<%@ LANGUAGE="VBSCRIPT"%>
<!-- #include file="../ADOVBS.INc" -->
<%
id=request("id")
if (len(request("yj"))<>0 and len(request("yj"))>150) then
	response.write "对不起,您输入的内容太长!"
end if
set conn=server.createobject("adodb.connection")
conn.open Application("DBCon_ConnectionString") 
set rs1=server.createobject("adodb.recordset")
rs1.LockType=adLockOptimistic
sqlstr="select * from diaoc1 where id='"& id &"'order by tm desc "
rs1.open sqlstr,conn,adOpenkeyset,adlockoptimistic,adcmdtext
if (not rs1.eof) then
select case request("slt")
	case "db1"
		rs1("db01")=rs1("db01")+1
	case "db2"
		rs1("db02")=rs1("db02")+1
	case "db3"
		rs1("db03")=rs1("db03")+1
	case "db4"
		rs1("db04")=rs1("db04")+1
end select
rs1.update
total=rs1("db01")+rs1("db02")+rs1("db03")+rs1("db04")
yj=request("yj")
if yj<>"" then

sqlstr2="insert into diaoc2 (id,yj,riqi) values ('"&id&"','"&yj&"',getdate())"

conn.execute sqlstr2

set conn=nothing
end if

end if
%>	


 

<HTML><HEAD><TITLE>Zhao1Zhao网上调查</TITLE>
<META content="text/html; charset=gb2312" http-equiv=Content-Type></HEAD>
<BODY bgColor=#ffffff leftMargin=0 topMargin=0 marginheight="0" marginwidth="0">
  <table align=center  border=0 cellpadding=0 
cellspacing=0 height=51 width=740>
    <tbody> 
    <tr> 
      <td width="217" height="51" align="center" valign="bottom"><img src="../images/smallmark.gif" width="120" height="25"></td>
      <td colspan="2" valign="bottom" height="51"><a href="../default.asp">本站首页</a> 
        &gt;&gt; 调查生活 </td>
      <td class=blue9 height=51 width="18%"> </td>
    </tr>
    </tbody> 
  </table>
  <table width="740" border="0" height="10" align="center">
    <tr bgcolor="#CCCCFF"> 
      <td>&nbsp;</td>
    </tr>
  </table>
<FORM name=form1>
  <TABLE align=center border=0 cellPadding=0 cellSpacing=0 width=740>
    <TBODY> 
    <TR> 
      <TD bgColor=#CCCCFF class=normal rowSpan=4 vAlign=top width=180><b><!--begin function--><!--end function--><!--begin contents--> 
        </b></TD>
      <TD rowSpan=4 vAlign=top width=18> 
        <P><b></b></P>
      </TD>
      <TD class=normal rowSpan=4 vAlign=top width=567> 
        <TABLE border=0 cellPadding=0 cellSpacing=0 class=normal width="90%">
          <TBODY> 
          <TR> 
            <TD>&nbsp;</TD>
          </TR>
          <TR> 
            <TD> 
              <P><B><B><FONT color=#ff6600 
size=3>商务电视网上调查结果</FONT></B></B><BR>
              </P>
              <TABLE bgColor=#0099cc border=0 cellPadding=1 cellSpacing=0 
            width="100%">
                <TBODY> 
                <TR> 
                  <TD> 
                    <TABLE border=0 cellPadding=1 cellSpacing=1 width="100%">
                      <TBODY> 
                      <TR bgColor=#0099cc> 
                        <TD class=title colSpan=3> <%=rs1("sb")%>?</TD>
                      </TR>
                      <TR bgColor=#ffffff> 
                        <TD class=normal height=30> 
                          <P align=center><B><FONT color=#ff3300><%=rs1("db1")%></FONT> 
                            </B></P>
                        </TD>
                        <TD class=normal height=30> 
                          <DIV align=center><%=rs1("db01")%></DIV>
                        </TD>
                        <TD class=normal height=30> 
                          <DIV align=center><%=FormatPercent(rs1("db01")/total)%></DIV>
                        </TD>
                      </TR>
                      <TR bgColor=#ffffff> 
                        <TD class=normal height=30> 
                          <P align=center><B><FONT 
                      color=#339933><%=rs1("db2")%></FONT></B></P>
                        </TD>
                        <TD class=normal height=30> 
                          <DIV align=center><%=rs1("db02")%></DIV>
                        </TD>
                        <TD class=normal height=30> 
                          <DIV align=center><%=FormatPercent(rs1("db02")/total)%></DIV>
                        </TD>
                      </TR>
                      <TR bgColor=#ffffff> 
                        <TD class=normal height=30> 
                          <DIV align=center><B><font 
                        color=#0000ff><%=rs1("db3")%></font></B></DIV>
                        </TD>
                        <TD class=normal height=30> 
                          <DIV align=center><%=rs1("db03")%></DIV>
                        </TD>
                        <TD class=normal height=30> 
                          <DIV align=center><%=FormatPercent(rs1("db03")/total)%></DIV>
                        </TD>
                      </TR>
                      <TR bgColor=#ffffff> 
                        <TD class=normal height=30> 
                          <DIV align=center><b><font 
                        color=#ff00ff><%=rs1("db4")%></font></b></DIV>
                        </TD>
                        <TD class=normal height=30 align="center"> 
                          <div align=center><%=rs1("db04")%></div>
                        </TD>
                        <TD class=normal height=30 align="center"><%=FormatPercent(rs1("db04")/total)%></TD>
                      </TR>
                      <TR bgColor=#ffffff align="center"> 
                        <TD class=normal colSpan=3 height=30>投票总人数:<%=total%>人</TD>
                      </TR>
                      </TBODY> 
                    </TABLE>
                  </TD>
                </TR>
                </TBODY> 
              </TABLE>
              <P>&nbsp; </P>
              <P align=right><A class=blue9 
            href="diaocha1.asp">更多调查&gt;&gt;</A></P>
<%
set conn=server.createobject("adodb.connection")
conn.open Application("DBCon_ConnectionString") 
set rs=server.createobject("adodb.recordset")
'rs.LockType=adLockOptimistic
sqlstr="select top 10 yj from diaoc2 where id='"&id&"'"
rs.open sqlstr,conn,1,1
num=rs.recordCount

if not rs.eof then
	

	
%>
              <table width="100%" border="0" cellpadding="0" cellspacing="0">
                <%
	for i=1 to num
%> 
                <tr> 
                  <td width="5%" valign="top">◆</td>
                  <td width="95%"><font color=000fff><%=rs("yj")%></font></td>
                </tr>
<%
	rs.movenext
	if rs.eof then exit for
	next
%>
              </table>
<%
end if
set conn=nothing
%>
              <P>&nbsp;</P>
            </TD>
          </TR>
          </TBODY> 
        </TABLE>
      </TD>
    </TR>
    </TBODY>
  </TABLE>
</FORM>
<TABLE align=center border=0 cellPadding=0 cellSpacing=0 width=778>
  <TBODY>
  <TR align=middle>
    <TD height=78>
      <HR noShade SIZE=0>

      <P align=center class=small>&nbsp;</P>
      </TD></TR></TBODY></TABLE></BODY></HTML>

⌨️ 快捷键说明

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