| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 1623 人关注过本帖
标题:【求助】Microsoft VBScript 编译器错误 '800a03f8' 缺少 'Sub' 问题!求高 ...
只看楼主 加入收藏
yeyuge
Rank: 1
等 级:新手上路
帖 子:3
专家分:0
注 册:2012-4-11
结帖率:0
收藏
已结贴  问题点数:3 回复次数:4 
【求助】Microsoft VBScript 编译器错误 '800a03f8' 缺少 'Sub' 问题!求高手解决!
Microsoft VBScript 编译器错误 '800a03f8'

缺少 'Sub'

\yuanliao_in_store.asp, line 507

end if
-----~
---------------------------------以上为调试错误---------------------------------------
代码如下:

<%@LANGUAGE="VBSCRIPT"%>
<!--#include file="Connections/conn.asp" -->
<%
Dim conn
Dim conn_numRows

Set conn = Server.CreateObject("ADODB.Recordset")
conn.ActiveConnection = MM_conn_STRING
conn.Source = "SELECT * FROM yuanliao_In_Store ORDER BY ID DESC"
conn.CursorType = 0
conn.CursorLocation = 2
conn.LockType = 1
conn.Open()

conn_numRows = 0
%>
<!--#include file="conn.asp"-->
<!--#include file="checkuser.asp"-->
<html>
<head>
<title>∷企业生产管理信息系统∷</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="css/main.css" rel="stylesheet" type="text/css">

<SCRIPT language=JavaScript src="css/User_Info_Modify.js"></SCRIPT>

<SCRIPT language=javascript  src="js/selectcity.js"></script>
<script language="JavaScript" src="js/validate.js" type="text/JavaScript"></script>

<SCRIPT language=javascript src="css/init.js"></SCRIPT>







<style type="text/css">
<!--
td {  font-family: "宋体"; font-size: 9pt}
body {  font-family: "宋体"; font-size: 9pt}
select {  font-family: "宋体"; font-size: 9pt}
A {text-decoration: none; color: #336699; font-family: "宋体"; font-size: 9pt}
A:hover {text-decoration: underline; color: #FF0000; font-family: "宋体"; font-size: 9pt}
.STYLE1 {color: #FFFFFF}
-->
</style>
<SCRIPT LANGUAGE=javascript>
<!--
function Juge(powersearch)
{

    if (powersearch.use_num.value == "")
    {
        alert("数量不能为空!");
        powersearch.use_num.focus();
        return (false);
    }

}


function SelectAll() {
    for (var i=0;i<document.selform.selBigClass.length;i++) {
        var e=document.selform.selBigClass[i];
        e.checked=!e.checked;
    }
}
//-->
</script>


<script>
  var po_ca_show = new Array();
  var po_ca_value = new Array();
  var po_detail_show = new Array();
  var po_detail_value = new Array();
  var funtype1;
//Modified by Ryan Gao 2006-03-30 16:01:09
<%
i=0
        
set rs1=server.createobject("adodb.recordset")
rs1.open "select * from class",conn,1,1
if not rs1.eof then   
do while not rs1.eof
j=0   
%>
po_ca_show[<%=i%>] = '<%=rs1("classname")%>';
po_ca_value[<%=i%>] = '<%=rs1("classname")%>';
po_detail_show[<%=i%>] = new Array();
po_detail_value[<%=i%>] = new Array();

<%
classname=rs1("classname")
set rs2=server.createobject("adodb.recordset")
rs2.open "select * from Material where class='"&classname&"' order by pinming",conn,1,1
if not rs2.eof then
do while not rs2.eof
%>
po_detail_show[<%=i%>][<%=j%>] = '<%=rs2("pinming")%> | <%=rs2("guige")%> | <%=rs2("unit")%>';
po_detail_value[<%=i%>][<%=j%>] = '<%=rs2("pinming")%>|<%=rs2("guige")%>|<%=rs2("unit")%>';
<%
rs2.movenext
j=j+1
loop
else
%>
po_detail_show[<%=i%>][<%=j%>] = '此类暂无材料';
po_detail_value[<%=i%>][<%=j%>] = '';
<%
end if
rs2.close
set rs2=nothing
%>

<%
rs1.movenext
i=i+1
loop
end if
rs1.close
set rs1=nothing
%>

</script>
<script Language="JavaScript">



var psid="";

function DoLoad(form,funtypev){
        var n;
        var i,j,k;
        var num;
        num= GetObjID('funtype[]');
        num1= GetObjID('pinming');

        if (!funtypev)
           return;
        k=0;
        for (i=0;i<po_ca_show.length;i++) {
         for(j = 0; j < po_detail_value[i].length; j++){
                if(funtypev.indexOf(po_detail_value[i][j])!=-1) {
                    NewOptionName = new Option(po_detail_show[i][j], po_detail_value[i][j]);
                    form.elements[num].options[k] = NewOptionName;
                    k++;
                    }
         }
        }
}

function Do_po_Change(form){
        var num,n, i, m;
        num= GetObjID('d_position1');
        m = document.powersearch.elements[num].selectedIndex-1;
        n = document.powersearch.elements[num + 1].length;
        for(i = n - 1; i >= 0; i--)
                document.powersearch.elements[num + 1].options[i] = null;

        if (m>=0) {
        for(i = 0; i < po_detail_show[m].length; i++){
                NewOptionName = new Option(po_detail_show[m][i], po_detail_value[m][i]);
                document.powersearch.elements[num + 1].options[i] = NewOptionName;
        }
        document.powersearch.elements[num + 1].options[0].selected = true;
        }
}

function InsertItem(ObjID, Location)
{
    len=document.powersearch.elements[ObjID].length;
    for (counter=len; counter>Location; counter--)
    {
        Value = document.powersearch.elements[ObjID].options[counter-1].value;
        Text2Insert  = document.powersearch.elements[ObjID].options[counter-1].text;
        document.powersearch.elements[ObjID].options[counter] = new Option(trimPrefixIndent(Text2Insert), Value);
    }
}
function GetLocation(ObjID, Value)
{
  total=document.powersearch.elements[ObjID].length;
  for (pp=0; pp<total; pp++)
     if (document.powersearch.elements[ObjID].options[pp].text == "---"+Value+"---")
     { return (pp);
       break;
     }
  return (-1);
}

function GetObjID(ObjName)
{
  for (var ObjID=0; ObjID < window.powersearch.elements.length; ObjID++)
    if ( window.powersearch.elements[ObjID].name == ObjName )
    {  return(ObjID);
       break;
    }
  return(-1);
}




</script>
</HEAD>
<BODY topMargin=0 rightMargin=0 leftMargin=0>      
<!--#include file="top.asp"-->
<%
  select case request("action")
  case "add"
       call SaveAdd()
  case "modify"
       call SaveModify()
  case "del"
       call delCate()
  case "edit"
       isEdit=True
       call myform(isEdit)
  case else
       isEdit=False
       call myform(isEdit)
  end select

由于帖子限制发帖字数,所以后面的代码接下楼!
搜索更多相关主题的帖子: Microsoft include 编译器 file 
2012-04-11 10:06
yeyuge
Rank: 1
等 级:新手上路
帖 子:3
专家分:0
注 册:2012-4-11
收藏
得分:0 
  
sub SaveAdd
class1=request.Form("d_position1")  
pinming=request.Form("pinming")
names=Split(pinming,"|")
pinming=names(0)
guige=names(1)
unit=names(2)

set rs1=server.createobject("adodb.recordset")
if guige="" then
sql1="select * from yuanliao_store where pinming='"&pinming&"'"
else
sql1="select * from yuanliao_store where pinming='"&pinming&"' and guige='"&guige&"'"
end if
rs1.open sql1,conn,1,3
if not rs1.eof and not rs1.bof then
rs1("number")=rs1("number")+request.Form("use_num")
else
rs1.addnew
rs1("class") = trim(request.Form("d_position1"))
rs1("Unit") = unit
rs1("guige") = guige
rs1("pinming") = pinming
rs1("number")=request.Form("use_num")
end if
rs1.update
rs1.close
set rs1=nothing

set rs=server.createobject("adodb.recordset")
sql="select * from yuanliao_in_store"
rs.open sql,conn,1,3
rs.addnew
rs("class") = trim(request.Form("d_position1"))
rs("guige") = guige
rs("pinming") = pinming
rs("uptime") = request.Form("uptime")

rs("Unit") = unit
rs("Supplier") = trim(request.Form("Supplier"))

rs("use_num") = request.Form("use_num")
rs("ghfph") = request.Form("ghfph")
rs("caigou") = request.Form("caigou")
rs("cgjcsqdh") = request.Form("cgjcsqdh")
rs("cgddh") = request.Form("cgddh")
rs("sltzdh") = request.Form("sltzdh")
rs("jincbh") = request.Form("jincbh")
rs("shencs") = request.Form("shencs")
rs("wuliaobm") = request.Form("wuliaobm")
rs("pihao") = request.Form("pihao")
rs("beizhu") = trim(request.Form("beizhu"))
rs("content") = trim(request.Form("content"))
rs.update
response.Write "<script language=javascript>alert('入库成功!');</script>"
response.write "<meta http-equiv=""refresh"" content=""0;url=yuanliao_in_store.asp"">"
response.end
rs.close
set rs=nothing
end sub

 
sub SaveModify
class1=request.Form("d_position1")  
pinming=request.Form("pinming")
names=Split(pinming,"|")
pinming=names(0)
guige=names(1)
unit=names(2)
num=names(3)
num0=request.Form("use_num")
num1=num-num0
set rs1=server.createobject("adodb.recordset")
if guige="" then
sql1="select * from yuanliao_store where pinming='"&pinming&"'"
else
sql1="select * from yuanliao_store where pinming='"&pinming&"' and guige='"&guige&"'"
end if
rs1.open sql1,conn,1,3
if not rs1.eof and not rs1.bof then
rs1("number")=rs1("number")-num1

end if
rs1.update
rs1.close
set rs1=nothing
 
set rs=server.createobject("adodb.recordset")
sql="select * from yuanliao_in_store where id="&request.Form("id")
rs.open sql,conn,1,3
rs("class") = trim(request.Form("d_position1"))
rs("guige") = guige
rs("pinming") = pinming
rs("Unit") = unit
rs("uptime") = request.Form("uptime")
rs("Supplier") = trim(request.Form("Supplier"))

rs("use_num") = request.Form("use_num")

rs("ghfph") = request.Form("ghfph")
rs("caigou") = request.Form("caigou")
rs("cgjcsqdh") = request.Form("cgjcsqdh")
rs("cgddh") = request.Form("cgddh")
rs("sltzdh") = request.Form("sltzdh")
rs("jincbh") = request.Form("jincbh")
rs("shencs") = request.Form("shencs")
rs("wuliaobm") = request.Form("wuliaobm")
rs("pihao") = request.Form("pihao")
rs("beizhu") = trim(request.Form("beizhu"))
rs("content") = trim(request.Form("content"))
rs.update
response.Write "<script language=javascript>alert('修改成功!');</script>"
response.write "<meta http-equiv=""refresh"" content=""0;url=yuanliao_in_store.asp"">"
response.end
rs.close
set rs=nothing
end sub   
 
  sub delCate()
        conn.execute("delete from yuanliao_in_store where id in ("&Request.Form("selBigClass")&")")
        response.Write "<script language=javascript>alert('删除成功!');</script>"
response.write "<meta http-equiv=""refresh"" content=""0;url=yuanliao_in_store.asp"">"
response.end
  end sub
  %>
  <% sub myform(isEdit) %>      
<TABLE width=800 align=center border="1" cellspacing="0" cellpadding="0" bordercolor="#0055E6">
  <TBODY>
  <TR>
    <td align="center" valign="top"> <%if oskey="supper" or oskey="yuanliao" then%>
      <%  
       if isedit then
       set rs=server.createobject("adodb.recordset")
           rs.open "select * from yuanliao_in_store where id=" & request("id"),conn,1,1
%>
      <table width="800" border="0" cellpadding="0" cellspacing="0" >
          <tr >  
<td height=26 background="images/background.gif">
<b><font color="#ffffff">编 辑 原 料 入 库</font></b></td>
</tr>
</table>
<% else %>
    <table width="800" border="0" cellpadding="0" cellspacing="0" >
          <tr >  
<td height=26 background="images/background.gif">
<b><font color="#ffffff">添 加 原 料 入 库</font></b>

</td>
</tr>
</table>
<%end if %>
        <table width="800" border="0" cellpadding="0" cellspacing="0" bordercolor="#0055E6">
          <tr class="but">
            <td width="12%" height="29" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'">入库日期</td>
            <td width="10%" height="29" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'">类 别</td>
            <td width="28%" height="29" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'">品 名 | 规 格 | 计量单位</td>
            <td width="25%" height="29" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'">供货单位</td>

            <td width="25%" height="29" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'">入库数量</td>
          </tr>
          <form name="powersearch" method="post" action="yuanliao_in_store.asp" onSubmit="return Juge(this)" >
          <tr> <input type="Hidden" name="action" value='<% If isedit then%>modify<% Else %>add<% End If %>'>
          <% If isedit then%><input type="Hidden" name="id" value="<%=rs("id")%>"> <% End If %>
<td height="33" align="center" class="but11" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but11'">
            <input name="uptime" onFocus="show_cele_date(uptime,'','',uptime)" type="text"  size="10"  value='<% if isedit then
                                                                 response.write rs("uptime")
                                                                 else
                                                                 response.write date()
                                                                  end if %>'></td>
<td height="33" align="center" class="but11" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but11'">
            <select name='d_position1' onchange='Do_po_Change(this);' valign=top style='width:90'>
            <% if isedit then%>
            <option selected="selected"><%=rs("class")%></option>
            <%else%>
            <option selected value='0000'>请选择类别</option>
            <%end if%>
            
            <%            
            set rs1=server.createobject("adodb.recordset")
           rs1.open "select * from class",conn,1,1
           if not rs1.eof then
           do while not rs1.eof
            %>
            <option value="<%=rs1("classname")%>"><%=rs1("classname")%></option>
            <%
            rs1.movenext
            loop
            end if
            rs1.close
            set rs1=nothing
            %></select></td>


<td height="33" align="center" class="but11" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but11'">
            <select name='pinming' size=1 style='width:200'>
            <% if isedit then%>
            <option selected="selected" value="<%=rs("pinming")%>|<%=rs("guige")%>|<%=rs("unit")%>|<%=rs("use_num")%>"><%=rs("pinming")%> | <%=rs("guige")%> | <%=rs("unit")%></option>
            <%else%>
            <option>--请选择--</option>
            <%end if%>
            </select>            </td>

<td height="33" align="center" class="but11" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but11'"><select name="Supplier"  size="1" style='width:200'>
            <% if isedit then%><option ><%=rs("Supplier")%></option><%end if%>
            <%
            
            set rs3=server.createobject("adodb.recordset")
           rs3.open "select * from Supplier",conn,1,1
           if not rs3.eof then
           do while not rs3.eof
            %>
            <option <% if isedit then
            if trim(rs3("Supplier_name"))=trim(rs("Supplier")) then
            %> selected="selected"<%end if%><%end if%>><%=rs3("Supplier_name")%></option>
            <%
            rs3.movenext
            loop
            end if
            rs3.close
            set rs3=nothing
            %>
            </select>            </td>

<td height="33" align="center" class="but11" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but11'"><input name="use_num" type="text"  size="10" value='<% if isedit then response.write rs("use_num") end if %>'></td>
          </tr>
          <tr class="but">
            <td height="16" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'">&nbsp;</td>            
            <td height="16" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'">&nbsp;</td>
            <td height="16" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'">&nbsp;</td>
            <td height="16" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'">&nbsp;</td>
            <td height="16"  colspan="2" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'">&nbsp;</td>
            </tr>
          <tr class="but">
            <td height="36" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'">购货发票号</td>
            <td height="36" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'">采购方式</td>
            <td height="36" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'">采购检测申请单号</td>
            <td height="36" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'">采购订单号</td>
            <td height="36"  colspan="2" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'">收料通知单号</td>
            </tr>
          <tr class="but">
            <td height="18" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'"><input name="ghfph" type="text" size="10" value='<% if isedit then response.write rs("ghfph")
end if %>'></td>
            <td height="18" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'"><input name="caigou" type="text" id="caigou" size="10" value='<% if isedit then response.Write rs("caigou") end if %>'></td>
            <td height="18" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'"><input name="cgjcsqdh" type="text" id="cgjcsqdh" size="10" value='<% if isedit then response.Write rs("cgjcsqdh") end if %>'></td>
            <td height="18" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'"><input name="cgddh" type="text" id="cgddh" size="10" value='<% if isedit then response.Write rs("cgddh") end if %>'></td>
            <td height="18"  colspan="2" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'"><input name="sltzdh" type="text" id="sltzdh" size="10" value='<% if isedit then response.Write rs("sltzddh") end if %>'></td>
            </tr>
          <tr class="but">
            <td height="36" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'">进厂编号</td>
            <td height="36" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'">生产商</td>
            <td height="36" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'">物料编码</td>
            <td height="36" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'">批号</td>
            <td height="36"  colspan="2" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'">保质期</td>
            </tr>
          <tr class="but">
            <td height="18" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'"><input name="jincbh" type="text" id="jincbh" size="10" value='<% if isedit then response.write rs("jincbh") end if %>'></td>
            <td height="18" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'"><input name="shencs" type="text" id="shencs" size="10" value='<% if isedit then response.Write rs("shencs") end if %>'></td>
            <td height="18" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'"><input name="wuliaobm" type="text" id="wuliaobm" size="20" value='<% if isedit then response.Write rs("wuliaobm") end if %>'></td>
2012-04-11 10:07
yeyuge
Rank: 1
等 级:新手上路
帖 子:3
专家分:0
注 册:2012-4-11
收藏
得分:0 
            <td height="18" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'"><input name="pihao" type="text" id="pihao" size="20" value='<% if isedit then response.Write rs("pihao") end if %>'></td>
            <td height="18"  colspan="2" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'"><input name="baozhiqi" type="text" id="baozhiqi" size="20" value='<% if isedit then response.Write rs("baozhiqi") end if %>'></td>
            </tr>
          <tr class="but">
            <td height="36" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'">质量情况</td>
            <td height="36"  colspan="5" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'"><div align="left">
              <textarea name="beizhu" cols="50" rows="3"><% if isedit then response.write rs("beizhu") end if %></textarea>
              </div></td>
            </tr>
          <tr class="but">
            <td  colspan="6" height="18" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'">&nbsp;</td>
            </tr>
          <tr>
<td height="18"  align="center" class="but11 STYLE1" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but11'">备注</td>
<td height="18" colspan="5"  align="center" class="but11 STYLE1" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but11'"><div align="left">
  <textarea name="content" cols="50" rows="3"><% if isedit then response.write rs("content") end if %> </textarea>
</div></td>
</tr>
            <tr>
<td height="18" colspan="6" align="center" class="but11" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but11'">
            <input type="submit"  value="<% if isedit then response.write "编辑" else response.write "添加" end if %>"> </td>
          </tr></form>
        </table>
<% end if %>

</td>
</tr>
</table>
<br><br>
<TABLE width=800 align=center border="1" cellspacing="0" cellpadding="0" bordercolor="#0055E6">
<tr>
<td >


            <form action="yuanliao_in_store.asp" method="post" name="selform" >
     <table width="800"  border="1" cellpadding="0" cellspacing="0" bordercolor="#0055E6" align="center">
          <tr >  
<td height=26 background="images/background.gif">
<b><font color="#ffffff">原 料 入 库 列 表</font></b>

</td>
</tr>
</table>
   
        <table width="100%" border="1" cellpadding="0" cellspacing="1" bordercolor="#EFEADD">
          <tr class="but">
            <td width="10%" height="18" align="center" class="but01" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but01'">入库日期</td>
            <td width="10%" height="18" align="center" class="but01" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but01'">类 别</td>
            <td width="12%" height="18" align="center" class="but01" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but01'">品 名</td>
            <td width="7%" height="18" align="center" class="but01" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but01'">规 格</td>
            <td width="5%" height="18" align="center" class="but01" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but01'">单 位</td>
            <td width="15%" height="18" align="center" class="but01" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but01'">供货单位</td>
            <td width="6%" height="18" align="center" class="but01" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but01'">数量</td>

            <td width="5%" height="18" align="center" class="but01" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but01'">操 作</td>
          </tr>
         <%
PageShowSize = 10            '每页显示多少个页
MyPageSize   = 20          '每页显示多少条
If Not IsNumeric(Request("page")) Or IsEmpty(Request("page")) Or Request("page") <=0 Then
MyPage=1
Else
MyPage=Int(Abs(Request("page")))
End if
set rs=server.CreateObject("ADODB.RecordSet")
search=request("search")
if search<>"" then
class1=request("class")
keyword=request("keyword")
rs.Source="select* from yuanliao_In_Store where class like '%"&class1&"%' and pinming like '%"&keyword&"%' and  Month(uptime)=Month(date()) order by -id"
else
rs.Source="select* from yuanliao_In_Store where Month(uptime)=Month(date()) order by -id"
end if
rs.Open rs.Source,conn,1,1
if not rs.EOF then
rs.PageSize     = MyPageSize
MaxPages         = rs.PageCount
rs.absolutepage = MyPage
total            = rs.RecordCount
for i=1 to rs.PageSize
if not rs.EOF then
%>

<tr onMouseOver="this.bgColor='#73A475';" onMouseOut="this.bgColor=''"">
<td height="18" align="center">
<%if oskey="yuanliao" or oskey="supper" then%>
<a href="yuanliao_In_Store.Asp?id=<%=rs("ID")%>&action=edit"><%=rs("uptime")%></a>
<%else%>
<%=rs("uptime")%>
<%end if%>
</td>
<td height="18" align="center"><%=rs("class")%><%if rs("class")="" then%>&nbsp;<%end if%></td>
<td height="18" align="center">&nbsp;<a href="yuanliao_In_Store.Asp?id=<%=rs("ID")%>&action=edit"><%=rs("pinming")%></a></td>
<td height="18" align="center">&nbsp;<%=rs("guige")%></td>
<td height="18" align="center"><%=rs("Unit")%><%if rs("Unit")="" then%>&nbsp;<%end if%></td>
<td height="18" align="center"><a href="Supplier.asp"><%=rs("Supplier")%><%if rs("Supplier")="" then%>&nbsp;<%end if%></a></td>
<td height="18" align="center"><%=Formatnumber(rs("use_num"),2,-1,0,0)%><%if rs("use_num")="" then%>&nbsp;<%end if%></td>
<td height="18" align="center"><input name="selBigClass" type="checkbox" id="selBigClass" value="<%=rs("ID")%>"></td>
</tr>

<%
rs.MoveNext
end if
next
end if
%>
<tr><td align="right" colspan="10" height="22">
共 <%=total%> 条,当前第 <%=Mypage%>/<%=Maxpages%>
            页,每页 <%=MyPageSize%> 条
            <%
            if search<>"" then
            url="yuanliao_In_Store.asp?class="&class1&"&keyword="&keyword&"&search=search&"
            else
            url="yuanliao_In_Store.asp?"
            end if               
PageNextSize=int((MyPage-1)/PageShowSize)+1
Pagetpage=int((total-1)/rs.PageSize)+1

if PageNextSize >1 then
PagePrev=PageShowSize*(PageNextSize-1)
Response.write "<a class=black href='" & Url & "page=" & PagePrev & "' title='上" & PageShowSize & "页'>上一翻页</a> "
Response.write "<a class=black href='" & Url & "page=1' title='第1页'>页首</a> "
end if
if MyPage-1 > 0 then
Prev_Page = MyPage - 1
Response.write "<a class=black href='" & Url & "page=" & Prev_Page & "' title='第" & Prev_Page & "页'>上一页</a> "
end if

if Maxpages>=PageNextSize*PageShowSize then
PageSizeShow = PageShowSize
Else
PageSizeShow = Maxpages-PageShowSize*(PageNextSize-1)
End if
If PageSizeShow < 1 Then PageSizeShow = 1
for PageCounterSize=1 to PageSizeShow
PageLink = (PageCounterSize+PageNextSize*PageShowSize)-PageShowSize
if PageLink <> MyPage Then
Response.write "<a class=black href='" & Url & "page=" & PageLink & "'>[" & PageLink & "]</a> "
else
Response.Write "<B>["& PageLink &"]</B> "
end if
If PageLink = MaxPages Then Exit for
Next

if Mypage+1 <=Pagetpage  then
Next_Page = MyPage + 1
Response.write "<a class=black href='" & Url & "page=" & Next_Page & "' title='第" & Next_Page & "页'>下一页</A>"
end if

if MaxPages > PageShowSize*PageNextSize then
PageNext = PageShowSize * PageNextSize + 1
Response.write " <A class=black href='" & Url & "page=" & Pagetpage & "' title='第"& Pagetpage &"页'>页尾</A>"
Response.write " <a class=black href='" & Url & "page=" & PageNext & "' title='下" & PageShowSize & "页'>下一翻页</a>"
End if
rs.Close
set rs=nothing
%>&nbsp;&nbsp;&nbsp;&nbsp;<%if oskey="supper" then%>

        <input type="checkbox" name="checkbox" value="checkbox" onClick="javascript:SelectAll()"> 选择/反选
              <input onClick="{if(confirm('此操作将删除该信息!\n\n确定要执行此项操作吗?')){this.document.selform.submit();return true;}return false;}" type=submit value=删除 name=action2>
              <input type="Hidden" name="action" value='del'><%end if%></td></tr>





        </table>

      

</form>

</td>
</tr>
</table>
<br><br>
<TABLE width=800 align=center border="1" cellspacing="0" cellpadding="0" bordercolor="#0055E6">
<tr>
<td>

            <table width="800" border="0" cellpadding="0" cellspacing="0" >
          <tr >  
<td height=26 background="images/background.gif">
<b><font color="#ffffff">入 库 原 料 搜 索</font></b>

</td>
</tr>
</table>



        <table width="800" border="0" cellpadding="0" cellspacing="0" bordercolor="#D4D0C8">
         
          <form name="search" method="post" action="yuanliao_in_store.asp">
          <tr><input name="search" type="hidden" value="search">
            <td height="40" valign="middle" align="center" width="20%">
            <select name="class" size="1">
            <option value="">所有分类</option>
            <%
           set rs2=server.createobject("adodb.recordset")
           rs2.open "select * from class",conn,1,1
           if not rs2.eof then
           do while not rs2.eof
           classname=rs2("classname")
           %>
           <option value="<%=rs2("classname")%>"><%=rs2("classname")%></option>
            <%
            rs2.movenext
            loop
            end if
            rs2.close
            set rs2=nothing
            %></select></td>
            <td align="center" width="65%">品名关键字: <input name="keyword" type="text"  size="25"> 关键字为空则搜索所有</td>
                     
            <td align="center" width="15%" ><input type="submit"  value="查 找"> </td>
          </tr></form>
            </TD>
              </TR>
  </table>  
            
            </TD>
              </TR>
</table>
               

  </TBODY>
</TABLE>
<%end sub%>
<P>
<TABLE cellSpacing=0 cellPadding=0 width="100%" align=center border=0>
  <TBODY>
  <TR vAlign=center>
    <TD align=middle width="100%"><!--#include file="footer.htm"--></TD>
  </TR></TBODY></TABLE></P></BODY></HTML>
<%
conn.Close()
Set conn = Nothing
%>
2012-04-11 10:08
aspic
Rank: 17Rank: 17Rank: 17Rank: 17Rank: 17
等 级:贵宾
威 望:51
帖 子:2258
专家分:8050
注 册:2008-2-18
收藏
得分:3 
没有缩进的代码连自己都不知道哪行跟哪行是对应的吧
2012-04-12 16:43
wsw6450779
Rank: 1
等 级:新手上路
帖 子:1
专家分:0
注 册:2012-9-4
收藏
得分:0 
<%if oskey="supper" or oskey="yuanliao" then%>
请问这个是什么意思 那里定义的?
2012-09-04 09:09
快速回复:【求助】Microsoft VBScript 编译器错误 '800a03f8' 缺少 'Sub' 问题! ...
数据加载中...
 
   



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

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