| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 373 人关注过本帖
标题:请各位帮我看一下这个代码,一直出错。很急!!!!!!!!
只看楼主 加入收藏
Lilongjuan
Rank: 1
等 级:新手上路
帖 子:13
专家分:0
注 册:2011-5-3
结帖率:50%
收藏
 问题点数:0 回复次数:0 
请各位帮我看一下这个代码,一直出错。很急!!!!!!!!
提示'80020009'
\report.asp, line 48  (红字的那一行错误!!!)
代码如下:
<!--#include file="conn.asp"-->
<!--#include file="check.asp"-->


<script Language="vbscript">
sub check()
    c=document.form1.page.value
            if c<>"" then
                if not IsNumeric(c) then
                msgbox " 页数只能输入数字"
                document.form1.page.select()
                exit sub
                else
               
                end if
            else
                msgbox"请输入想要转到页数"
                document.form1.page.select()
                exit sub
            end if
            
                document.form1.submit()
end sub
</script>

 <%flag1=0
 flag2=0
 reportid=trim(request("reportid"))

        set rs=Server.CreateObject("ADODB.Recordset")
        sqls="select top 1 * from report order by id desc "
        set rss=conn.execute(sqls)
    if rss.eof then
        titles="暂无成绩信息"
        flag1=1
    else
        
        if reportid="" then
        reportid=rss("id")
        flag2=1
        else
        reportid=reportid
        end if
        set rs1=conn.execute("select * from report where id="&reportid&"")
        title="第 "&rs1("id")&" 期考试统计"
        if flag2=1 then title=title&"<font color=red>(最新一期)</font>"
        set rs2=conn.execute("select * from test where id="&rs1("试卷id")&"")
    titles=title&"<p>(判断题数"&rs2("判断题数")&"题/"&rs2("判断题每题分数")&"分,选择题数"&rs2("选择题数")&"题/"&rs2("选择题每题分数")&"分,填空题数"&rs2("填空题数")&"题/"&rs2("填空题每题分数")&"分)<a href=test_tj.asp?id="&rs1("id")&">[本期统计]</a></p>"
        
        zf=rs2("判断题数")*rs2("判断题每题分数")+rs2("选择题数")*rs2("选择题每题分数")+rs2("填空题数")*rs2("填空题每题分数")

        
   
end if
        %>

<html>
<head>
<title>考试系统</title>

</head>

<body topmargin="0" leftmargin="0">
<p>
<p align="center"><font class=test1>成绩统计管理</font></p>
<div align="center">
  <center>
  <table border="1" cellpadding="5" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="500">
    <tr>
      <td align="center" colspan="4"> 往期统计:
      <select name="cate" size="1" style="background-color: rgb(224,252,255)" onchange="javascript:self.location=this.options[this.selectedIndex].value">
     <%set rs3=conn.execute("select distinct id from report order by id desc")
     while not rs3.eof %>
      <option  value="report.asp?reportid=<%=rs3("id")%>" <%if cint(request("reportid"))=cint(rs3("id")) then response.write "selected"%>>第<%=rs3("id")%>期</option>
<%rs3.movenext
wend%>           
 </select>&nbsp;&nbsp;&nbsp;<%=titles%>
       <form method="get" name=form2 action="">
  
    <%keyword=trim(request("keyword"))
    if keyword="" then
    keywords="所有考生"
    else
    keywords=keyword
    end if
    %>
      <p>以下为姓名为 <font color=red><%=keywords%></font> 的考生列表&nbsp; 输入考生姓名<input type="text" name="T1" size="20"  class="line">&nbsp; <input type="submit" value="查找" name="B1"></form></td>
    </tr>
      
    <tr>
      <td align="center" bgcolor="#AFE2F1">考生姓名</td>
      <td align="center" bgcolor="#AFE2F1">分数</td>
      <td align="center" bgcolor="#AFE2F1">补考设置</td>
      <td align="center" bgcolor="#AFE2F1">补考成绩</td>
    </tr>
  <%
  if flag1=1 then
  else
          sql="select student.*,report.* from student,report where  student.姓名 like '%"&keyword&"%' and report.学生id=student.id and report.id="&rs1("id")&" order by student.id desc"
        
        rs.open sql,conn,3,1,1
            rs.pagesize=30

  
  
  if not (rs.eof and rs.bof) then
        Page = cint(Request.querystring("Page"))
           If Page < 1 Then Page = 1
           If Page > rs.PageCount Then Page = rs.PageCount
            showpages rs,Page
    %>
    <%else%>
<tr><td colspan=4><center><font color=red>暂无此学员信息</font></center></td></tr>
    <%end if%>
<%
Sub showpages( rs,Page )
   rs.AbsolutePage = Page        
        for i=0 to rs.pagesize-1
            j=j+1
            if j mod 2 =0 then
                bg="#E9F8F0"
            else
                bg="#ffffff"
            end if
            
            if rs("分数")>=cint(zf*6/10) then
            fen="<font colot=#008000>"&rs("分数")&"分</font>"
            bk="不需要"
            bfen="不需要"
            else
            fen="<font colot=red>"&rs("分数")&"分</font>"
            bk="<a href=test_again.asp?id="&rs("学生id")&"&reportid="&reportid&">批准补考</a>"
            bfen="需要补考"
                if rs("是否补考")=True then
                bk="已批准补考"
                     if rs("补考成绩")=0 then
                    bfen="还未补考"
                    else
                        if rs("补考成绩")>=cint(zf*6/10) then
                        bfen="<font colot=#008000>"&rs("补考成绩")&"分</font>"
                        else
                        bfen="<font colot=red>"&rs("补考成绩")&"分</font>"
                        end if
                    end if
                end if
            end if            
            %>

    <tr bgcolor=<%=bg%>>
      <td align="center"><a href="student.asp?id=<%=rs("学生id")%>"><%=rs("姓名")%></a></td>
      <td align="center"> <%=fen%></td>
      <td align="center">
          <%=bk%></td>
      <td align="center">
          <%=bfen%></td>
    </tr>
    <%
        rs.movenext
          If rs.EOF Then Exit For
         Next%>
  <%End Sub
  
  end if %>  

    <tr>
      <td colspan="4" align="center">
     
     <form action=report.asp?keyword=<%=keyword%>&reportid=<%=reportid%> method="get" name=form1  >
          <%
        
        response.write rs.pagesize&"条一页&nbsp;&nbsp;"
        if Page=1 then
               response.write"第一页  "
           end if
           If Page <> 1 Then
              Response.Write "<A HREF=report.asp?keyword="&keyword&"&reportid="&reportid&"&Page=1>第一页</A>?"
               Response.Write "<A HREF=report.asp?keyword="&keyword&"&reportid="&reportid&"&Page=" & (Page-1) & ">上一页</A>?"
           End If
           If Page <> rs.PageCount Then
             Response.Write "<A HREF=report.asp?keyword="&keyword&"&reportid="&reportid&"&Page=" & (Page+1) & ">下一页</A>?"
               Response.Write "<A HREF=report.asp?keyword="&keyword&"&reportid="&reportid&"&Page=" & rs.PageCount & ">最后一页</A>?"
          End If
           if page= rs.PageCount then
              response.write"最后一页  "
          end if
        response.write "总共有"&rs.pagecount&"页,&nbsp;目前是第"&page&"页"
          'response.write page&"/"&rs.pagecount&"页</center>"      
 %>
      转到<font class="a">
      <input maxLength="8" size="4" name="page" value=<%=page%>>
      <input type="hidden" value=<%=keyword%> name="keyword">
      <input type="hidden" value=<%=reportid%> name="reportid">

      页<span lang="en-us"> </span>
      <input class="buttonface" type="button" value=" Goto " onclick=check()></font><br>
      </a>
      </form>   
     </td>
    </tr>
    </table>
  </center>
</div>

</body>

</html>



搜索更多相关主题的帖子: include file 
2011-05-26 17:28
快速回复:请各位帮我看一下这个代码,一直出错。很急!!!!!!!!
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.020668 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved