| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 1024 人关注过本帖
标题:两个类似程序,为什么显示效果不一样
只看楼主 加入收藏
eournet
Rank: 2
等 级:论坛游民
帖 子:103
专家分:26
注 册:2010-5-22
结帖率:55.56%
收藏
已结贴  问题点数:20 回复次数:10 
两个类似程序,为什么显示效果不一样
图片附件: 游客没有浏览图片的权限,请 登录注册

图片附件: 游客没有浏览图片的权限,请 登录注册

<%
'[ZJXM_ZYGL] (C) 2009-2012 江阴电信分公司线路维护中心 Inc.
'$Id: buy.asp 2009-08-17 $

if request.Cookies("shiwei_username")="" then
%>
<script language="javascript">
top.location.href="../index.asp"
</script>
<%  
  response.end
end if
%>
<!-- #include file="../conn2.asp" -->
<!-- #include file="../const.asp" -->

<html>
<head>
<title><%=dianming%> - 项目清单查询</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="../style/style.css" rel="stylesheet" type="text/css">
<style>
body {
    background-color:#FFFFFF;
}
</style>
<script language="javascript">
function collapse(img, objName)
{
    var obj;
    obj = document.getElementById(objName);
    if (img.src.indexOf('open') != -1)
    {
        img.src = img.src.replace('open', 'close');
        obj.style.display = 'none';
    }
    else
    {
        img.src = img.src.replace('close', 'open');
        obj.style.display = '';
    }
}

function collapseall(img)
{
    var obj;
    if (img.src.indexOf('open') != -1)
    {
        img.src = img.src.replace('open', 'close');
        for (x=1;x<=<%=maxrecord%>;x++)
        {
            obj = document.getElementById("buy"+x);
            if (obj)
            {
                obj.style.display = 'none';
            }
        }
    }
    else
    {
        img.src = img.src.replace('close', 'open');
        for (x=1;x<=<%=maxrecord%>;x++)
        {
            obj = document.getElementById("buy"+x);
            if (obj)
            {
                obj.style.display = '';
            }
        }        
    }
}
</script>

<script language=javascript>
function preview() {
bdhtml=window.document.body.innerHTML;
sprnstr="<!--startprint-->";
eprnstr="<!--endprint-->";
prnhtml=bdhtml.substr(bdhtml.indexOf(sprnstr)+17);
prnhtml=prnhtml.substring(0,prnhtml.indexOf(eprnstr));
window.document.body.innerHTML=prnhtml;
window.print();
window.document.body.innerHTML=bdhtml;
         }
</script>
</HEAD>

<BODY>
<script>
function CheckAll(form)  {
  for (var i=0;i<form.elements.length;i++)    {
    var e = form.elements[i];
    if (e.name != 'chkall')       e.checked = form.chkall.checked;
   }
  }
</script>
<%
if fla2="0" and request.Cookies("shiwei_id")<>"1" then
%>
<br><center><img src="../images/note.gif" align="absmiddle">&nbsp;<font color="#FF0000">你不具备此权限,请与管理员联系!
</font></center>
<%  
  response.end
end if

if request("isok")<>"" then
  conn.execute("update buy set isok="&request("isok")&" where bianhao='"&request("bianhao")&"'")
end if

'取得当前页码
currentpage=request("page")
'response.write currentpage
'response.end
if currentpage<1 or currentpage="" then
  currentpage="1"
end if

'取得搜索关键字  
nowstartdate=request("startdate")
if nowstartdate="" then
 nowstartdate=date()-day(date()-1)
end if
nowenddate=request("enddate")
if nowenddate="" then
  nowenddate=date()
end if
nowku=request("ku")
nowkeyword=request("keyword")
%>
<table width="100%" border="0" cellpadding="0" cellspacing="2" align="center">
<form name="form2">
  <tr>
    <td width="5%" height="21">&nbsp;<img src="../images/print.jpg" align="absmiddle" style="cursor:hand;" onClick="preview
();window.close()"></td>
    <td width="95%" align="right">
      开始日期:
      <input name="startdate" value="<%=nowstartdate%>" readonly style="width:100px">
      <img src="../images/date.gif" align="absmiddle" style="cursor:pointer;" onClick="JavaScript:window.open('day.asp?
form=form2&field=startdate&oldDate='+startdate.value,'','directorys=no,toolbar=no,status=no,menubar=no,scrollbars=no,resizabl
e=no,width=250,height=170,top=150,left=590');">
      结束日期:
      <input name="enddate" value="<%=nowenddate%>" readonly style="width:100px">
      <img src="../images/date.gif" align="absmiddle" style="cursor:pointer;" onClick="JavaScript:window.open('day.asp?
form=form2&field=enddate&oldDate='+enddate.value,'','directorys=no,toolbar=no,status=no,menubar=no,scrollbars=no,resizable=no
,width=250,height=170,top=150,left=740');">
    <%
    if request.Cookies("shiwei_id")="1" or fla88="1" then
      sql="select * from ku order by id"
      set rs_ku=conn.execute(sql)
    else
      sql="select * from ku where instr(login,',"&request.Cookies("shiwei_id")&",')>0 order by id"
      set rs_ku=conn.execute(sql)
      if rs_ku.eof then
        nowku="0"
      elseif request("ku")="" then
        nowku=rs_ku("id")
      end if      
    end if  
    %>
      <select name="ku" onChange="form2.submit()">
    <%if request.Cookies("shiwei_id")="1" or fla88="1" then%>
        <option value="">所有施工单位</option>
    <%elseif rs_ku.eof then%>
        <option value="0">没有你对口的施工单位</option>   
    <%end if%>
    <%
    do while rs_ku.eof=false
    %>
        <option value="<%=rs_ku("id")%>"<%if trim(cstr(rs_ku("id")))=nowku then%> selected="selected"<%end if%>><%=rs_ku
("ku")%></option>
        <%
      rs_ku.movenext
    loop
    %>
      </select>   
      <input type="text" name="keyword" size="20" value="<%=nowkeyword%>">
      <input type="hidden" name="hid" value="ok">
      <input type="submit" value=" 查询 " class="button">&nbsp;
    </td>
  </tr>
</form>  
</table>
<table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#C4D8ED">
<tr>
<td><img src="../images/r_1.gif" alt="" /></td>
<td width="100%" background="../images/r_0.gif">
  <table cellpadding="0" cellspacing="0" width="100%">
    <tr>
      <td>&nbsp;项目清单查询</td>
      <td align="right"> </td>
    </tr>
  </table>
</td>
<td><img src="../images/r_2.gif" alt="" /></td>
</tr>
<tr>
<td></td>
<td>
<!--startprint-->
<table align="center" cellpadding="4" cellspacing="1" class="toptable grid" border="1">
<form name="form1" action="buy_del.asp">
  <input type="hidden" name="startdate" value="<%=nowstartdate%>">
  <input type="hidden" name="enddate" value="<%=nowenddate%>">
  <input type="hidden" name="ku" value="<%=nowku%>">
  <input type="hidden" name="keyword" value="<%=nowkeyword%>">
  <input type="hidden" name="order1" value="<%=request("order1")%>">
  <input type="hidden" name="order2" value="<%=request("order2")%>">
  <input type="hidden" name="order3" value="<%=request("order3")%>">
  <input type="hidden" name="order4" value="<%=request("order4")%>">
  <input type="hidden" name="order5" value="<%=request("order5")%>">
  <input type="hidden" name="order6" value="<%=request("order6")%>">
  <input type="hidden" name="order7" value="<%=request("order7")%>">
  <input type="hidden" name="order8" value="<%=request("order8")%>">
  <input type="hidden" name="order9" value="<%=request("order9")%>">
  <input type="hidden" name="order10" value="<%=request("order10")%>">
  <input type="hidden" name="order11" value="<%=request("order11")%>">
  <input type="hidden" name="order12" value="<%=request("order12")%>">
  <input type="hidden" name="order13" value="<%=request("order13")%>">
  <input type="hidden" name="order14" value="<%=request("order14")%>">
  <input type="hidden" name="order15" value="<%=request("order15")%>">  
  <tr align="center">
    <td class="category" width="10"><img src="../images/folder_close.gif" style="cursor:hand" onClick="collapseall(this)"  
/></td>
    <td class="category" height="30">
      <a href="?order1=<%if request("order1")="asc" then%>desc<%else%>asc<%end if%>&page=<%=currentpage%>&startdate=<%
=nowstartdate%>&enddate=<%=nowenddate%>&ku=<%=nowku%>&keyword=<%=nowkeyword%>" class="title">编号<%if request("order1")="asc"  
then%><img src="../images/up2.gif" border="0" hspace="2" align="absmiddle"><%else%><img src="../images/down2.gif" border="0"  
hspace="2" align="absmiddle"><%end if%></a>   
    </td>
    <td class="category">
      <a href="?order4=<%if request("order4")="asc" then%>desc<%else%>asc<%end if%>&page=<%=currentpage%>&startdate=<%
=nowstartdate%>&enddate=<%=nowenddate%>&ku=<%=nowku%>&keyword=<%=nowkeyword%>" class="title">入库时间<%if request("order4")
="asc" then%><img src="../images/up2.gif" border="0" hspace="2" align="absmiddle"><%else%><img src="../images/down2.gif"  
border="0" hspace="2" align="absmiddle"><%end if%></a>
    </td>
    <td class="category">
      <a href="?order5=<%if request("order5")="asc" then%>desc<%else%>asc<%end if%>&page=<%=currentpage%>&startdate=<%
=nowstartdate%>&enddate=<%=nowenddate%>&ku=<%=nowku%>&keyword=<%=nowkeyword%>" class="title">录入人<%if request("order5")
="asc" then%><img src="../images/up2.gif" border="0" hspace="2" align="absmiddle"><%else%><img src="../images/down2.gif"  
border="0" hspace="2" align="absmiddle"><%end if%></a>
    </td>
    <td class="category">
      <a href="?order6=<%if request("order6")="asc" then%>desc<%else%>asc<%end if%>&page=<%=currentpage%>&startdate=<%
=nowstartdate%>&enddate=<%=nowenddate%>&ku=<%=nowku%>&keyword=<%=nowkeyword%>" class="title">项目管理员<%if request
("order6")="asc" then%><img src="../images/up2.gif" border="0" hspace="2" align="absmiddle"><%else%><img  
src="../images/down2.gif" border="0" hspace="2" align="absmiddle"><%end if%></a></td>
    <td class="category">
      <a href="?order7=<%if request("order7")="asc" then%>desc<%else%>asc<%end if%>&page=<%=currentpage%>&startdate=<%
=nowstartdate%>&enddate=<%=nowenddate%>&ku=<%=nowku%>&keyword=<%=nowkeyword%>" class="title">数量<%if request("order7")="asc"  
then%><img src="../images/up2.gif" border="0" hspace="2" align="absmiddle"><%else%><img src="../images/down2.gif" border="0"  
hspace="2" align="absmiddle"><%end if%></a>
    </td>
    <%if request.Cookies("shiwei_id")="1" or fla87="1" then%>
    <td class="category">
      <a href="?order9=<%if request("order9")="asc" then%>desc<%else%>asc<%end if%>&page=<%=currentpage%>&startdate=<%
=nowstartdate%>&enddate=<%=nowenddate%>&ku=<%=nowku%>&keyword=<%=nowkeyword%>" class="title">录入工日<%if request("order9")
="asc" then%><img src="../images/up2.gif" border="0" hspace="2" align="absmiddle"><%else%><img src="../images/down2.gif"  
border="0" hspace="2" align="absmiddle"><%end if%></a>
    </td>
    <%end if%>
    <td class="category">
      <a href="?order10=<%if request("order10")="asc" then%>desc<%else%>asc<%end if%>&page=<%=currentpage%>&startdate=<%
=nowstartdate%>&enddate=<%=nowenddate%>&ku=<%=nowku%>&keyword=<%=nowkeyword%>" class="title">完成<%if request("order10")
="asc" then%><img src="../images/up2.gif" border="0" hspace="2" align="absmiddle"><%else%><img src="../images/down2.gif"  
border="0" hspace="2" align="absmiddle"><%end if%></a>
    </td>
    <%if fla1="1" or request.Cookies("shiwei_id")="1" then%>
    <td class="category">修改</td>
    <%end if%>
    <%if fla4="1" or request.Cookies("shiwei_id")="1" then%>
    <td class="category">删除</td>
    <%end if%>
  </tr>
  <%
  set rs_buy =server.createobject("ADODB.RecordSet")
  sql="select * from buy where type=0 and zu"
  if request.Cookies("shiwei_id")<>1 and lookbuysell="yes" and fla89="0" then
    sql=sql&" and id_login="&request.Cookies("shiwei_id")
  end if
  if nowstartdate<>"" then
    sql=sql&" and selldate-#"&nowstartdate&"#>=0"
  end if  
  if nowenddate<>"" then
    sql=sql&" and selldate-#"&nowenddate&"#<=0"
  end if
  if nowku<>"" then
    sql=sql&" and bianhao in (select bianhao from buy where type=0 and id_ku="&nowku&" and zu=false)"
  end if
  if nowkeyword<>"" then
    sql=sql&" and (bianhao = '"&nowkeyword&"' or id_gys in (select id from gys where company like '%"&nowkeyword&"%') or  
id_login in (select id from login where username like '%"&nowkeyword&"%') or bianhao in (select bianhao from buy where type=0  
and (title like '%"&nowkeyword&"%' or huohao like '%"&nowkeyword&"%')))"
  end if

  if request("order1")<>"" then
    sql=sql&" order by bianhao "&request("order1")
  elseif request("order2")<>"" then
    sql=sql&" order by huohao "&request("order2")
  elseif request("order3")<>"" then
    sql=sql&" order by title "&request("order3")
  elseif request("order4")<>"" then
    sql=sql&" order by selldate "&request("order4")
  elseif request("order5")<>"" then
    sql=sql&" order by id_login "&request("order5")
  elseif request("order6")<>"" then
    sql=sql&" order by id_gys "&request("order6")
  elseif request("order7")<>"" then
    sql=sql&" order by shulian "&request("order7")
  elseif request("order8")<>"" then
    sql=sql&" order by price2 "&request("order8")
  elseif request("order9")<>"" then
    sql=sql&" order by price2 "&request("order9")
  elseif request("order10")<>"" then
    sql=sql&" order by isok "&request("order10")               
  else
    sql=sql&" order by selldate desc"  
  end if
   
  rs_buy.open sql,conn,1,3
  if not rs_buy.eof then
  rs_buy.pagesize=maxrecord
  rs_buy.absolutepage=currentpage
  for currentrec=1 to rs_buy.pagesize
    if rs_buy.eof then
      exit for
    end if
  %>
  <tr onMouseOver="this.className='highlight'" onMouseOut="this.className=''" onDblClick="javascript:var win=window.open
('print_buy.asp?bianhao=<%=rs_buy("bianhao")%>','详细信
息','width=853,height=470,top=176,left=161,toolbar=no,location=no,directories=no,status=no,menubar=no,resizable=no,scrollbars
=yes'); win.focus()">
    <td align="center"><img src="../images/folder_close.gif" style="cursor:hand" onClick="collapse(this, 'buy<%=currentrec%
>')" /></td>
    <td align="center" height="25"><%=rs_buy("bianhao")%></td>
    <td align="center"><%=rs_buy("selldate")%></td>
    <td align="center">
      <%
      sql="select * from login where id="&rs_buy("id_login")
      set rs_login=conn.execute(sql)
      %>
      <%if rs_login.eof then%><%=rs_buy("login")%><%else%><%=rs_login("username")%> (<%=rs_login("bianhao")%>)<%end if%>
    </td>
    <td align="center">
    <%
      sql="select * from gys where id="&rs_buy("id_gys")
      set rs_gys=conn.execute(sql)
      %>
      <%if rs_gys.eof then%><%=rs_buy("gys")%><%else%><%=rs_gys("company")%><%end if%>   
    </td>
    <td align="center">
      <%
      sql="select sum(shulian) from buy where bianhao='"&rs_buy("bianhao")&"' and zu=false"
      if nowku<>"" then
        sql=sql&" and id_ku="&nowku
      end if
      if nowkeyword<>"" then
        sql=sql&" and (bianhao = '"&nowkeyword&"' or id_gys in (select id from gys where company like '%"&nowkeyword&"%') or  
id_login in (select id from login where username like '%"&nowkeyword&"%') or title like '%"&nowkeyword&"%' or huohao like  
'%"&nowkeyword&"%')"
        end if
      set rs_sum=conn.execute(sql)
      %>
      <%=formatnumber(rs_sum(0),2)%>
    </td>
    <%if request.Cookies("shiwei_id")="1" or fla87="1" then%>
    <td align="center">
      <%
      sql="select sum(price2*shulian) from buy where bianhao='"&rs_buy("bianhao")&"' and zu=false"
      if nowku<>"" then
        sql=sql&" and id_ku="&nowku
      end if
      if nowkeyword<>"" then
        sql=sql&" and (bianhao = '"&nowkeyword&"' or id_gys in (select id from gys where company like '%"&nowkeyword&"%') or  
id_login in (select id from login where username like '%"&nowkeyword&"%') or title like '%"&nowkeyword&"%' or huohao like  
'%"&nowkeyword&"%')"
        end if
      set rs_sum=conn.execute(sql)
      %>
      <%=formatnumber(rs_buy("price2"),2)%>
    </td>
    <%end if%>   
    <td align="center"><%if rs_buy("isok") then%><%if fla3="1" or request.Cookies("shiwei_id")="1" then%><a href="?
bianhao=<%=rs_buy("bianhao")%>&isok=false&page=<%=currentpage%>&startdate=<%=nowstartdate%>&enddate=<%=nowenddate%>&ku=<%
=nowku%>&keyword=<%=nowkeyword%>&order1=<%=request("order1")%>&order2=<%=request("order2")%>&order3=<%=request("order3")%
>&order4=<%=request("order4")%>&order5=<%=request("order5")%>&order6=<%=request("order6")%>&order7=<%=request("order7")%
>&order8=<%=request("order8")%>&order9=<%=request("order9")%>&order10=<%=request("order10")%>&order11=<%=request("order11")%
>&order12=<%=request("order12")%>&order13=<%=request("order13")%>&order14=<%=request("order14")%>&order15=<%=request
("order15")%>"><%if rs_buy("id_huiyuan")=0 then%></if><img src="../images/check.gif" border="0" alt="点击设为没完成"></a><%
else%><%end if%><%if rs_buy("id_huiyuan")=62 then%><img src="../images/checkg.gif" border="0" alt="点击设为没完
成"></a></if><%end if%><%end if%><%else%><%if fla3="1" or request.Cookies("shiwei_id")="1" then%><a href="?bianhao=<%=rs_buy
("bianhao")%>&isok=true&page=<%=currentpage%>&startdate=<%=nowstartdate%>&enddate=<%=nowenddate%>&ku=<%=nowku%>&keyword=<%
=nowkeyword%>&order1=<%=request("order1")%>&order2=<%=request("order2")%>&order3=<%=request("order3")%>&order4=<%=request
("order4")%>&order5=<%=request("order5")%>&order6=<%=request("order6")%>&order7=<%=request("order7")%>&order8=<%=request
("order8")%>&order9=<%=request("order9")%>&order10=<%=request("order10")%>&order11=<%=request("order11")%>&order12=<%
=request("order12")%>&order13=<%=request("order13")%>&order14=<%=request("order14")%>&order15=<%=request("order15")%>"><%if  
rs_buy("id_huiyuan")=0 then%><img src="../images/nomoney.gif" border="0" alt="点击设为已完成"></a><%end if%><%if rs_buy
("id_huiyuan")=55 then%><img src="../images/nomoneyg.gif" border="0" alt="点击设为已完成"></a><%end if%><%end if%><%end if%
></td>
    <%if fla1="1" or request.Cookies("shiwei_id")="1" then%>
    <td align="center"><img src="../images/res.gif" border="0" hspace="2" align="absmiddle" style="cursor:hand;"  
onClick="javascript:var win=window.open('buy_modi.asp?id=<%=rs_buy("id")%>','修
改','width=853,height=470,top=176,left=161,toolbar=no,location=no,directories=no,status=no,menubar=no,resizable=no,scrollbars
=yes'); win.focus()"></td>
    <%end if%>
    <%if fla4="1" or request.Cookies("shiwei_id")="1" then%>
    <td align="center"><input type="checkbox" name="ID" value="<%=rs_buy("bianhao")%>" style="border:0"></td>
    <%end if%>
  </tr>
  <%
    sql="select * from buy where type=0 and zu=false and bianhao='"&rs_buy("bianhao")&"'"
    if nowku<>"" then
      sql=sql&" and id_ku="&nowku
    end if
    if nowkeyword<>"" then
      sql=sql&" and (bianhao = '"&nowkeyword&"' or id_gys in (select id from gys where company like '%"&nowkeyword&"%') or  
id_login in (select id from login where username like '%"&nowkeyword&"%') or title like '%"&nowkeyword&"%' or huohao like  
'%"&nowkeyword&"%')"
      end if
    set rs_buy2=conn.execute(sql)
  %>
  <tr id="buy<%=currentrec%>" style="display:none;">
    <td colspan="16" class="category">
      <table align="center" cellpadding="4" cellspacing="1" class="grid" border="1" width="100%">
        <tr align="center">
          <%if showpic="yes" then%><td width="70">图片</td><%end if%>
          <td height="30">项目编号</td>
          <td>项目名称</td>
          <td>施工单位</td>
          <td>数量</td>
          <%if request.Cookies("shiwei_id")="1" or fla87="1" then%>
          <td>录入工日</td>
          <td>合计</td>
          <%end if%>
        </tr>      
        <%
        do while rs_buy2.eof=false
        sql="select * from produit where id="&rs_buy2("id_produit")
        set rs_produit=conn.execute(sql)        
        %>
        <tr>
          <%if showpic="yes" then%><td align="center"><%if rs_produit.eof then%><%if rs_buy2("photo")<>"" then%><a  
href="../upload/<%=rs_buy2("photo")%>" target="_blank"><img src="../upload/<%=rs_buy2("photo")%>" border="0"  
width="60"></a><%else%>无图<%end if%><%else%><%if rs_produit("photo")<>"" then%><a href="../upload/<%=rs_produit("photo")%>"  
target="_blank"><img src="../upload/<%=rs_produit("photo")%>" border="0" width="60"></a><%else%>无图<%end if%><%end if%
></td><%end if%>
          <td align="center"><%if rs_produit.eof then%><%=rs_buy2("huohao")%><%else%><%=rs_produit("huohao")%><%end  
if%></td>
          <td align="center"><%if rs_produit.eof then%><%=rs_buy2("title")%><%else%><%=rs_produit("title")%><%end  
if%></td>
          <td align="center"><%=rs_buy2("ku")%></td>
          <td align="center"><%=formatnumber(rs_buy2("shulian"),2)%></td>
          <%if request.Cookies("shiwei_id")="1" or fla87="1" then%>
          <td align="center"><%=formatnumber(rs_buy2("price2"),2)%></td>
          <td align="center"><%=formatnumber(rs_buy2("shulian")*rs_buy2("price2"),2)%></td>   
          <%end if%>  
        </tr>
        <%
        rs_buy2.movenext
        loop
        %>
      </table>
      <%=replace(rs_buy("beizhu")&"",chr(13),"<br>")%>
    </td>
  </tr>
  <%   
    rs_buy.movenext
  next
  else
  %>
  <tr align="center" onMouseOver="this.className='highlight'" onMouseOut="this.className=''">
    <td colspan="16" height="25" align="center" style="color:red"><b>没有找到记录</b></td>
  </tr>
  <%
  end if
  %>
  
  
  
  <%
  if rs_buy.recordcount>0 then
  %>
  <tr>
    <td colspan="16" height="30" class="category">
    <table cellpadding=0 cellspacing=0 width="100%">
    <tr>
    <td width="20%" align="left" style="color:#FF0000;">&nbsp;双击查看打印单</td>  
    <td width="80%" align="right">
    &nbsp;&nbsp;
      <%=rs_buy.recordcount%>&nbsp;条信息&nbsp; 共&nbsp;<%=rs_buy.pagecount%>&nbsp;页&nbsp;
  <%
  nowstart=currentpage-3
  if nowstart<1 then
    nowstart=1
  end if
  nowend=currentpage+3
  if nowend>rs_buy.pagecount then
    nowend=rs_buy.pagecount
  end if
  response.write "&nbsp;<a href='?
startdate="&nowstartdate&"&enddate="&nowenddate&"&ku="&nowku&"&keyword="&nowkeyword&"&page=1&order1="&request("order1")
&"&order2="&request("order2")&"&order3="&request("order3")&"&order4="&request("order4")&"&order5="&request("order5")
&"&order6="&request("order6")&"&order7="&request("order7")&"&order8="&request("order8")&"&order9="&request("order9")
&"&order10="&request("order10")&"&order11="&request("order11")&"&order12="&request("order12")&"&order13="&request("order13")
&"&order14="&request("order14")&"&order15="&request("order15")&"' class='page'>最前页</a>&nbsp;"
  for ipage=nowstart to nowend
    if cstr(ipage)=cstr(currentpage) then
      response.write "&nbsp;<span style='font-weight:bold;color:#5858E6'>" & ipage &"</span>&nbsp;"
    else
      response.write "&nbsp;[&nbsp;<a href='?
startdate="&nowstartdate&"&enddate="&nowenddate&"&ku="&nowku&"&keyword="&nowkeyword&"&page="&ipage&"&order1="&request
("order1")&"&order2="&request("order2")&"&order3="&request("order3")&"&order4="&request("order4")&"&order5="&request
("order5")&"&order6="&request("order6")&"&order7="&request("order7")&"&order8="&request("order8")&"&order9="&request
("order9")&"&order10="&request("order10")&"&order11="&request("order11")&"&order12="&request("order12")&"&order13="&request
("order13")&"&order14="&request("order14")&"&order15="&request("order15")&"' class='page'>" & ipage &"</a>&nbsp;]&nbsp;"
    end if
  next
  response.write "&nbsp;<a href='?
startdate="&nowstartdate&"&enddate="&nowenddate&"&ku="&nowku&"&keyword="&nowkeyword&"&page="&rs_buy.pagecount&"&order1="&requ
est("order1")&"&order2="&request("order2")&"&order3="&request("order3")&"&order4="&request("order4")&"&order5="&request
("order5")&"&order6="&request("order6")&"&order7="&request("order7")&"&order8="&request("order8")&"&order9="&request
("order9")&"&order10="&request("order10")&"&order11="&request("order11")&"&order12="&request("order12")&"&order13="&request
("order13")&"&order14="&request("order14")&"&order15="&request("order15")&"' class='page'>最后页</a>&nbsp;"
%>
    <select name="page" onChange="form1.action='?';form1.submit();">
<%
    for x=1 to rs_buy.pagecount
%>
      <option value="<%=x%>"<%if currentpage=trim(cstr(x)) then%> selected="selected"<%end if%>><%=x%></option>
<%   
    next
%>
    </select>
    <%if fla4="1" or request.Cookies("shiwei_id")="1" then%>
    <input name="chkall" type="checkbox" id="chkall" value="select" onClick="CheckAll(this.form)" style="border:0"> 全选
    <input type="submit" value="删 除" onClick="return confirm('此操作无法恢复!!!请慎重!!!\n\n确定要删除所选择的入
库记录吗?')" class="button">
    <%end if%>
  </td>
  </tr></table></td></tr>
<%end if%>
</form>   
</table>
<!--endprint-->
</td>
<td></td>
</tr>
<tr>
<td><img src="../images/r_4.gif" alt="" /></td>
<td></td>
<td><img src="../images/r_3.gif" alt="" /></td>
</tr>
</table>
</body>
</html>


搜索更多相关主题的帖子: 效果 
2010-09-14 09:45
eournet
Rank: 2
等 级:论坛游民
帖 子:103
专家分:26
注 册:2010-5-22
收藏
得分:0 
<%
if request.Cookies("shiwei_username")="" then
%>
<script language="javascript">
top.location.href="../index.asp"
</script>
<%  
  response.end
end if
%>
<!-- #include file="../conn2.asp" -->
<!-- #include file="../const.asp" -->

<html>
<head>
<title><%=dianming%> - 工单记录查询</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="../../../../../../../../../style/style.css" rel="stylesheet" type="text/css">
<style>
body {
    background-color:#FFFFFF;
}
</style>
<script language="javascript">
function collapse(img, objName)
{
    var obj;
    obj = document.getElementById(objName);
    if (img.src.indexOf('open') != -1)
    {
        img.src = img.src.replace('open', 'close');
        obj.style.display = 'none';
    }
    else
    {
        img.src = img.src.replace('close', 'open');
        obj.style.display = '';
    }
}

function collapseall(img)
{
    var obj;
    if (img.src.indexOf('open') != -1)
    {
        img.src = img.src.replace('open', 'close');
        for (x=1;x<=<%=maxrecord%>;x++)
        {
            obj = document.getElementById("whd"+x);
            if (obj)
            {
                obj.style.display = 'none';
            }
        }
    }
    else
    {
        img.src = img.src.replace('close', 'open');
        for (x=1;x<=<%=maxrecord%>;x++)
        {
            obj = document.getElementById("whd"+x);
            if (obj)
            {
                obj.style.display = '';
            }
        }        
    }
}
</script>

<script language=javascript>
function preview() {
bdhtml=window.document.body.innerHTML;
sprnstr="<!--startprint-->";
eprnstr="<!--endprint-->";
prnhtml=bdhtml.substr(bdhtml.indexOf(sprnstr)+17);
prnhtml=prnhtml.substring(0,prnhtml.indexOf(eprnstr));
window.document.body.innerHTML=prnhtml;
window.print();
window.document.body.innerHTML=bdhtml;
         }
</script>
</HEAD>

<BODY>
<script>
function CheckAll(form)  {
  for (var i=0;i<form.elements.length;i++)    {
    var e = form.elements[i];
    if (e.name != 'chkall')       e.checked = form.chkall.checked;
   }
  }
</script>
<%
if fla2="0" and request.Cookies("shiwei_id")<>"1" then
%>
<br><center>
<img src="../../../../../../../../../images/note.gif" align="middle" >&nbsp;<font color="#FF0000">你不具备此权限,请与管理员联系!</font></center>
<%  
  response.end
end if

if request("isok")<>"" then
  conn.execute("update whd set isok="&request("isok")&" where bianhao='"&request("bianhao")&"'")
end if

'取得当前页码
currentpage=request("page")
'response.write currentpage
'response.end
if currentpage<1 or currentpage="" then
  currentpage="1"
end if

'取得搜索关键字  
nowstartdate=request("startdate")
if nowstartdate="" then
  nowstartdate=date()-day(date()-1)
end if
nowenddate=request("enddate")
if nowenddate="" then
  nowenddate=date()
end if
nowku=request("ku")
nowkeyword=request("keyword")
%>
<table width="100%" border="0" cellpadding="0" cellspacing="2" align="center">
<form name="form2">
  <tr>
    <td width="5%" height="21"> </td>
    <td width="95%" align="right">
      开始日期:
      <input name="startdate" value="<%=nowstartdate%>" readonly style="width:100px">
      <img src="../../../../../../../../../images/date.gif" align="middle" style="cursor:pointer;" onClick="JavaScript:window.open('day.asp?form=form2&field=startdate&oldDate='+startdate.value,'','directorys=no,toolbar=no,status=no,menubar=no,scrollbars=no,resizable=no,width=250,height=170,top=150,left=590');" width="23" height="22">
      结束日期:
      <input name="enddate" value="<%=nowenddate%>" readonly style="width:100px">
      <img src="../../../../../../../../../images/date.gif" align="middle" style="cursor:pointer;" onClick="JavaScript:window.open('day.asp?form=form2&field=enddate&oldDate='+enddate.value,'','directorys=no,toolbar=no,status=no,menubar=no,scrollbars=no,resizable=no,width=250,height=170,top=150,left=740');" width="23" height="22">
    <%
    if request.Cookies("shiwei_id")="1" or fla88="1" then
      sql="select * from ku order by id"
      set rs_ku=conn.execute(sql)
    else
      sql="select * from ku where instr(login,',"&request.Cookies("shiwei_id")&",')>0 order by id"
      set rs_ku=conn.execute(sql)
      if rs_ku.eof then
        nowku="0"
      elseif request("ku")="" then
        nowku=rs_ku("id")
      end if      
    end if  
    %>
      <select name="ku" onChange="form2.submit()">
    <%if request.Cookies("shiwei_id")="1" or fla88="1" then%>
        <option value="">所有施工单位</option>
    <%elseif rs_ku.eof then%>
        <option value="0">没有你管理的施工单位</option>   
    <%end if%>
    <%
    do while rs_ku.eof=false
    %>
        <option value="<%=rs_ku("id")%>"<%if trim(cstr(rs_ku("id")))=nowku then%> selected="selected"<%end if%>><%=rs_ku("ku")%></option>
        <%
      rs_ku.movenext
    loop
    %>
      </select>   
      <input type="text" name="keyword" size="20" value="<%=nowkeyword%>">
      <input type="hidden" name="hid" value="ok">
      <input type="submit" value=" 查询 " class="button">&nbsp;
    </td>
  </tr>
</form>  
</table>
<table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#C4D8ED">
<tr>
<td>
<img src="../../../../../../../../../images/r_1.gif" alt="" width="6" height="27" /></td>
<td width="100%" background="../../../../../../../../../../../../../../../../../../../../../../images/r_0.gif">
  <table cellpadding="0" cellspacing="0" width="100%">
    <tr>
      <td>工单记录查询</td>
      <td align="right"> </td>
    </tr>
  </table>
</td>
<td>
<img src="../../../../../../../../../images/r_2.gif" alt="" width="6" height="27" /></td>
</tr>
<tr>
<td></td>
<td>
<!--startprint-->
<table align="center" cellpadding="4" cellspacing="1" class="toptable grid" border="1">
<form name="form1" action="whd_del.asp">
  <input type="hidden" name="startdate" value="<%=nowstartdate%>">
  <input type="hidden" name="enddate" value="<%=nowenddate%>">
  <input type="hidden" name="ku" value="<%=nowku%>">
  <input type="hidden" name="keyword" value="<%=nowkeyword%>">
  <input type="hidden" name="order1" value="<%=request("order1")%>">
  <input type="hidden" name="order2" value="<%=request("order2")%>">
  <input type="hidden" name="order3" value="<%=request("order3")%>">
  <input type="hidden" name="order4" value="<%=request("order4")%>">
  <input type="hidden" name="order5" value="<%=request("order5")%>">
  <input type="hidden" name="order6" value="<%=request("order6")%>">
  <input type="hidden" name="order7" value="<%=request("order7")%>">
  <input type="hidden" name="order8" value="<%=request("order8")%>">
  <input type="hidden" name="order9" value="<%=request("order9")%>">
  <input type="hidden" name="order10" value="<%=request("order10")%>">
  <input type="hidden" name="order11" value="<%=request("order11")%>">
  <input type="hidden" name="order12" value="<%=request("order12")%>">
  <input type="hidden" name="order13" value="<%=request("order13")%>">
  <input type="hidden" name="order14" value="<%=request("order14")%>">
  <input type="hidden" name="order15" value="<%=request("order15")%>">  
  <tr align="center">
    <td class="category" width="10" >
    <img src="../../../../../../../../../images/folder_close.gif" style="cursor:hand" onClick="collapseall(this)" width="18" height="9" /></td>
    <td class="category" height="30" ><a href="?order1=<%if request("order1")="asc" then%>desc<%else%>asc<%end if%>&page=<%=currentpage%>&startdate=<%=nowstartdate%>&enddate=<%=nowenddate%>&ku=<%=nowku%>&keyword=<%=nowkeyword%>" class="title">工单编号<%if request("order1")="asc" then%><img src="../../../../../../../../../images/up2.gif" border="0" hspace="2" align="middle" width="12" height="7"><%else%><img src="../../../../../../../../../images/down2.gif" border="0" hspace="2" align="middle" width="12" height="7"><%end if%></a>   
    </td>
    <td class="category" ><a href="?order4=<%if request("order4")="asc" then%>desc<%else%>asc<%end if%>&page=<%=currentpage%>&startdate=<%=nowstartdate%>&enddate=<%=nowenddate%>&ku=<%=nowku%>&keyword=<%=nowkeyword%>" class="title">派单时间<%if request("order4")="asc" then%><img src="../../../../../../../../../images/up2.gif" border="0" hspace="2" align="middle" width="12" height="7"><%else%><img src="../../../../../../../../../images/down2.gif" border="0" hspace="2" align="absmiddle"><%end if%></a>
    </td>
    <td class="category" >
      <a href="?order5=<%if request("order5")="asc" then%>desc<%else%>asc<%end if%>&page=<%=currentpage%>&startdate=<%=nowstartdate%>&enddate=<%=nowenddate%>&ku=<%=nowku%>&keyword=<%=nowkeyword%>" class="title">派单人<%if request("order5")="asc" then%><img src="../../../../../../../../../images/up2.gif" border="0" hspace="2" align="absmiddle"><%else%><img src="../../../../../../../../../images/down2.gif" border="0" hspace="2" align="absmiddle"><%end if%></a>
    </td>
    <td class="category" >
      <a href="?order6=<%if request("order6")="asc" then%>desc<%else%>asc<%end if%>&page=<%=currentpage%>&startdate=<%=nowstartdate%>&enddate=<%=nowenddate%>&ku=<%=nowku%>&keyword=<%=nowkeyword%>" class="title">施工负责人<%if request("order6")="asc" then%><img src="../../../../../../../../../images/up2.gif" border="0" hspace="2" align="absmiddle"><%else%><img src="../../../../../../../../../images/down2.gif" border="0" hspace="2" align="absmiddle"><%end if%></a></td>
    <td class="category" >
      <a href="?order7=<%if request("order7")="asc" then%>desc<%else%>asc<%end if%>&page=<%=currentpage%>&startdate=<%=nowstartdate%>&enddate=<%=nowenddate%>&ku=<%=nowku%>&keyword=<%=nowkeyword%>" class="title">维修类别<%if request("order7")="asc" then%><img src="../../../../../../../../../images/up2.gif" border="0" hspace="2" align="absmiddle"><%else%><img src="../../../../../../../../../images/down2.gif" border="0" hspace="2" align="absmiddle"><%end if%></a>
    </td>
    <td class="category" >
      <a href="?order9=<%if request("order9")="asc" then%>desc<%else%>asc<%end if%>&page=<%=currentpage%>&startdate=<%=nowstartdate%>&enddate=<%=nowenddate%>&ku=<%=nowku%>&keyword=<%=nowkeyword%>" class="title">工单名称<%if request("order9")="asc" then%><img src="../../../../../../../../../images/up2.gif" border="0" hspace="2" align="absmiddle"><%else%><img src="../../../../../../../../../images/down2.gif" border="0" hspace="2" align="absmiddle"><%end if%></a>
    </td>
        <td class="category" >
      <a href="?order10=<%if request("order10")="asc" then%>desc<%else%>asc<%end if%>&page=<%=currentpage%>&startdate=<%=nowstartdate%>&enddate=<%=nowenddate%>&ku=<%=nowku%>&keyword=<%=nowkeyword%>" class="title">完成<%if request("order10")="asc" then%><img src="../../../../../../../../../images/up2.gif" border="0" hspace="2" align="absmiddle"><%else%><img src="../../../../../../../../../images/down2.gif" border="0" hspace="2" align="absmiddle"><%end if%></a>
    </td>
    <%if fla1="1" or request.Cookies("shiwei_id")="1" then%>
    <td class="category" >工单</td>
    <td class="category" >修改</td>
    <%end if%>
    <%if fla4="1" or request.Cookies("shiwei_id")="1" then%>
    <td class="category" >删除</td>
    <%end if%>
  </tr>
  <%
  set rs_whd =server.createobject("ADODB.RecordSet")
  sql="select * from whd where  zu"
  if request.Cookies("shiwei_id")<>1 and lookwhdsell="yes" and fla89="0" then
    sql=sql&" and id_login="&request.Cookies("shiwei_id")
  end if
  if nowstartdate<>"" then
    sql=sql&" and selldate-#"&nowstartdate&"#>=0"
  end if  
  if nowenddate<>"" then
    sql=sql&" and selldate-#"&nowenddate&"#<=0"
  end if
  if nowku<>"" then
    sql=sql&" and bianhao in (select bianhao from whd where  id_ku="&nowku&" and zu=false)"
  end if
  if nowkeyword<>"" then
    sql=sql&" and (bianhao = '"&nowkeyword&"'  or id_login in (select id from login where username like '%"&nowkeyword&"%') or bianhao in (select bianhao from whd where   (price like '%"&nowkeyword&"%' or huohao like '%"&nowkeyword&"%')))"
  end if

  if request("order1")<>"" then
    sql=sql&" order by bianhao "&request("order1")
  elseif request("order2")<>"" then
    sql=sql&" order by title "&request("order2")
  elseif request("order3")<>"" then
    sql=sql&" order by  huohao  "&request("order3")
  elseif request("order4")<>"" then
    sql=sql&" order by selldate "&request("order4")
  elseif request("order5")<>"" then
    sql=sql&" order by id_login "&request("order5")
  elseif request("order6")<>"" then
    sql=sql&" order by guige "&request("order6")
  elseif request("order7")<>"" then
    sql=sql&" order by gys "&request("order7")
  elseif request("order8")<>"" then
    sql=sql&" order by price "&request("order8")
  elseif request("order9")<>"" then
    sql=sql&" order by price2 "&request("order9")
  elseif request("order10")<>"" then
    sql=sql&" order by isok "&request("order10")               
  else
    sql=sql&" order by selldate desc"  
  end if

  rs_whd.open sql,conn,1,3
  if not rs_whd.eof then
  rs_whd.pagesize=maxrecord
  rs_whd.absolutepage=currentpage
  for currentrec=1 to rs_whd.pagesize
    if rs_whd.eof then
      exit for
    end if
  %>
  <tr onMouseOver="this.className='highlight'" onMouseOut="this.className=''" onDblClick="javascript:var win=window.open('print_whd.asp?bianhao=<%=rs_whd("bianhao")%>','详细信息','width=853,height=470,top=176,left=161,toolbar=yes,location=yes,directories=no,status=no,menubar=yes,resizable=yes,scrollbars=yes'); win.focus()">
    <td align="center">
    <img src="../../../../../../../../../images/folder_close.gif" style="cursor:hand" onClick="collapse(this, 'whd<%=currentrec%>')" width="18" height="9" /></td>
    <td align="center" height="25" ><%=rs_whd("bianhao")%></td>
    <td align="center"><%=rs_whd("selldate")%></td>
    <td align="center">
      <%
      sql="select * from login where id="&rs_whd("id_login")
      set rs_login=conn.execute(sql)
      %>
      <%if rs_login.eof then%><%=rs_whd("login")%><%else%><%=rs_login("username")%><%end if%>
    </td>
    <td align="center" ><%=rs_whd("guige")%></td>
    <td align="center" ><%=rs_whd("gys")%></td>
    <%if request.Cookies("shiwei_id")="1" or fla87="1" then%>
    <td align="center" ><%=rs_whd("price")%></td>
    <%end if%>   
    <td align="center" ><%if rs_whd("isok") then%><%if fla3="1" or request.Cookies("shiwei_id")="1" then%><a href="?bianhao=<%=rs_whd("bianhao")%>&isok=false&page=<%=currentpage%>&startdate=<%=nowstartdate%>&enddate=<%=nowenddate%>&ku=<%=nowku%>&keyword=<%=nowkeyword%>&order1=<%=request("order1")%>&order2=<%=request("order2")%>&order3=<%=request("order3")%>&order4=<%=request("order4")%>&order5=<%=request("order5")%>&order6=<%=request("order6")%>&order7=<%=request("order7")%>&order8=<%=request("order8")%>&order9=<%=request("order9")%>&order10=<%=request("order10")%>&order11=<%=request("order11")%>&order12=<%=request("order12")%>&order13=<%=request("order13")%>&order14=<%=request("order14")%>&order15=<%=request("order15")%>"><img src="../../../../../../../../../images/check.gif" border="0" alt="点击设为没完成"></a><%else%><img src="../../../../../../../../../images/check.gif" border="0"><%end if%><%else%><%if fla3="1" or request.Cookies("shiwei_id")="1" then%><a href="?bianhao=<%=rs_whd("bianhao")%>&isok=true&page=<%=currentpage%>&startdate=<%=nowstartdate%>&enddate=<%=nowenddate%>&ku=<%=nowku%>&keyword=<%=nowkeyword%>&order1=<%=request("order1")%>&order2=<%=request("order2")%>&order3=<%=request("order3")%>&order4=<%=request("order4")%>&order5=<%=request("order5")%>&order6=<%=request("order6")%>&order7=<%=request("order7")%>&order8=<%=request("order8")%>&order9=<%=request("order9")%>&order10=<%=request("order10")%>&order11=<%=request("order11")%>&order12=<%=request("order12")%>&order13=<%=request("order13")%>&order14=<%=request("order14")%>&order15=<%=request("order15")%>"><img src="../../../../../../../../../images/nomoney.gif" border="0" alt="点击设为已完成"></a><%else%><img src="../../../../../../../../../images/nomoney.gif" border="0"><%end if%><%end if%></td>
    <%if fla1="1" or request.Cookies("shiwei_id")="1" then%>
    <td align="center" >
    <img border="0" src="../../../../../../../../../../../images/Commentz.gif" start="mouseover" alt="打印派工单"></td>
    <td align="center" >
    <img src="../../../../../../../../../../../../../images/qs.gif" border="0" hspace="2" align="middle" style="cursor:hand;" onClick="javascript:var win=window.open('whd_modi.asp?id=<%=rs_whd("id")%>','修改','width=853,height=470,top=176,left=161,toolbar=no,location=no,directories=no,status=no,menubar=no,resizable=no,scrollbars=yes'); win.focus()" alt="打印领料单" width="20" height="20"></td>
    <%end if%>
    <%if fla4="1" or request.Cookies("shiwei_id")="1" then%>
    <td align="center" ><input type="checkbox" name="ID" value="<%=rs_whd("bianhao")%>" style="border:0"></td>
    <%end if%>
  </tr>
  <%
    sql="select * from whd where zu=false and bianhao='"&rs_whd("bianhao")&"'"
    if nowku<>"" then
      sql=sql&" and id_ku="&nowku
    end if
    if nowkeyword<>"" then
      sql=sql&" and (bianhao = '"&nowkeyword&"' or id_gys in (select id from gys where company like '%"&nowkeyword&"%') or id_login in (select id from login where username like '%"&nowkeyword&"%') or title like '%"&nowkeyword&"%' or huohao like '%"&nowkeyword&"%')"
      end if
    set rs_whd2=conn.execute(sql)
  %>
  <tr id="whd<%=currentrec%>" style="display:none;">
    <td colspan="11" class="category">
      <table align="center" cellpadding="4" cellspacing="1" class="grid" border="1" width="100%">
        <tr align="center">
           <td width="159"  bgcolor="#EEF7FD">材料名称</td>
          <td height="30"  bgcolor="#EEF7FD">型号规格</td>
          <td  bgcolor="#EEF7FD">单位</td>
          <td  bgcolor="#EEF7FD">数量</td>
          <td  bgcolor="#EEF7FD">单价</td>
          <td  bgcolor="#EEF7FD">金额</td>
          <td  bgcolor="#EEF7FD">发料</td>
        </tr>      
        <%
        do while rs_whd2.eof=false
        sql="select * from whd where zu and bianhao='"&rs_whd2("bianhao")&"'"
        set rs_whd=conn.execute(sql)        
        %>
        <tr>
          <td align="center" width="159" ><%=rs_whd2("title")%></td>
          <td align="center" ><%=rs_whd2("huohao")%></td>
          <td align="center" ><%=rs_whd2("id_danwei")%></td>
          <td align="center" ><%=formatnumber(rs_whd2("shulian"),2)%></td>
          <td align="center" ><%=formatnumber(rs_whd2("price2"),2)%></td>
          <td align="center" ><%=formatnumber((rs_whd2("shulian"))*(rs_whd2("price2")),2)%></td>   
          <td align="center" ><%if rs_whd("lok") then%><%if fla3="1" or request.Cookies("shiwei_id")="1" then%><a href="?bianhao=<%=rs_whd("bianhao")%>&lok=false&page=<%=currentpage%>&startdate=<%=nowstartdate%>&enddate=<%=nowenddate%>&ku=<%=nowku%>&keyword=<%=nowkeyword%>&order1=<%=request("order1")%>&order2=<%=request("order2")%>&order3=<%=request("order3")%>&order4=<%=request("order4")%>&order5=<%=request("order5")%>&order6=<%=request("order6")%>&order7=<%=request("order7")%>&order8=<%=request("order8")%>&order9=<%=request("order9")%>&order10=<%=request("order10")%>&order11=<%=request("order11")%>&order12=<%=request("order12")%>&order13=<%=request("order13")%>&order14=<%=request("order14")%>&order15=<%=request("order15")%>"><img src="../../../../../../../../../images/check.gif" border="0" alt="点击设为没完成"></a><%else%><img src="../../../../../../../../../images/check.gif" border="0"><%end if%><%else%><%if fla3="1" or request.Cookies("shiwei_id")="1" then%><a href="?bianhao=<%=rs_whd("bianhao")%>&lok=true&page=<%=currentpage%>&startdate=<%=nowstartdate%>&enddate=<%=nowenddate%>&ku=<%=nowku%>&keyword=<%=nowkeyword%>&order1=<%=request("order1")%>&order2=<%=request("order2")%>&order3=<%=request("order3")%>&order4=<%=request("order4")%>&order5=<%=request("order5")%>&order6=<%=request("order6")%>&order7=<%=request("order7")%>&order8=<%=request("order8")%>&order9=<%=request("order9")%>&order10=<%=request("order10")%>&order11=<%=request("order11")%>&order12=<%=request("order12")%>&order13=<%=request("order13")%>&order14=<%=request("order14")%>&order15=<%=request("order15")%>"><img src="../../../../../../../../../images/nomoney.gif" border="0" alt="点击设为已完成"></a><%else%><img src="../../../../../../../../../images/nomoney.gif" border="0"><%end if%><%end if%></td>

        </tr>
        
            <%
        rs_whd2.movenext
        loop
        %>
            <tr>
          <td align="center" width="159" >主要工作量</td>
          <td align="center" colspan="6"><p align="left"><%=rs_whd("beizhu")%></td>
        </tr>
        </table>
        </td>
  </tr>
  <%   
    rs_whd.movenext
  next
  else
  %>
  <tr align="center" onMouseOver="this.className='highlight'" onMouseOut="this.className=''">
    <td colspan="11" height="25" align="center" style="color:red"><b>没有找到记录</b></td>
  </tr>
  <%
  end if
  %>
  <%
  if rs_whd.recordcount>0 then
  %>
  <tr>
    <td colspan="11" height="30" class="category">
    <table cellpadding=0 cellspacing=0 width="100%">
    <tr>
    <td width="20%" align="left" style="color:#FF0000;">&nbsp;双击查看打印单</td>  
    <td width="80%" align="right">
    &nbsp;&nbsp;
      <%=rs_whd.recordcount%>&nbsp;条信息&nbsp; 共&nbsp;<%=rs_whd.pagecount%>&nbsp;页&nbsp;
  <%
  nowstart=currentpage-3
  if nowstart<1 then
    nowstart=1
  end if
  nowend=currentpage+3
  if nowend>rs_whd.pagecount then
    nowend=rs_whd.pagecount
  end if
  response.write "&nbsp;<a href='?startdate="&nowstartdate&"&enddate="&nowenddate&"&ku="&nowku&"&keyword="&nowkeyword&"&page=1&order1="&request("order1")&"&order2="&request("order2")&"&order3="&request("order3")&"&order4="&request("order4")&"&order5="&request("order5")&"&order6="&request("order6")&"&order7="&request("order7")&"&order8="&request("order8")&"&order9="&request("order9")&"&order10="&request("order10")&"&order11="&request("order11")&"&order12="&request("order12")&"&order13="&request("order13")&"&order14="&request("order14")&"&order15="&request("order15")&"' class='page'>最前页</a>&nbsp;"
  for ipage=nowstart to nowend
    if cstr(ipage)=cstr(currentpage) then
      response.write "&nbsp;<span style='font-weight:bold;color:#5858E6'>" & ipage &"</span>&nbsp;"
    else
      response.write "&nbsp;[&nbsp;<a href='?startdate="&nowstartdate&"&enddate="&nowenddate&"&ku="&nowku&"&keyword="&nowkeyword&"&page="&ipage&"&order1="&request("order1")&"&order2="&request("order2")&"&order3="&request("order3")&"&order4="&request("order4")&"&order5="&request("order5")&"&order6="&request("order6")&"&order7="&request("order7")&"&order8="&request("order8")&"&order9="&request("order9")&"&order10="&request("order10")&"&order11="&request("order11")&"&order12="&request("order12")&"&order13="&request("order13")&"&order14="&request("order14")&"&order15="&request("order15")&"' class='page'>" & ipage &"</a>&nbsp;]&nbsp;"
    end if
  next
  response.write "&nbsp;<a href='?startdate="&nowstartdate&"&enddate="&nowenddate&"&ku="&nowku&"&keyword="&nowkeyword&"&page="&rs_whd.pagecount&"&order1="&request("order1")&"&order2="&request("order2")&"&order3="&request("order3")&"&order4="&request("order4")&"&order5="&request("order5")&"&order6="&request("order6")&"&order7="&request("order7")&"&order8="&request("order8")&"&order9="&request("order9")&"&order10="&request("order10")&"&order11="&request("order11")&"&order12="&request("order12")&"&order13="&request("order13")&"&order14="&request("order14")&"&order15="&request("order15")&"' class='page'>最后页</a>&nbsp;"
%>
    <select name="page" onChange="form1.action='?';form1.submit();">
<%
    for x=1 to rs_whd.pagecount
%>
      <option value="<%=x%>"<%if currentpage=trim(cstr(x)) then%> selected="selected"<%end if%>><%=x%></option>
<%   
    next
%>
    </select>
    <%if fla4="1" or request.Cookies("shiwei_id")="1" then%>
    <input name="chkall" type="checkbox" id="chkall" value="select" onClick="CheckAll(this.form)" style="border:0"> 全选
    <input type="submit" value="删 除" onClick="return confirm('此操作无法恢复!!!请慎重!!!\n\n确定要删除所选择的工单记录吗?')" class="button">
    <%end if%>
  </td>
  </tr></table></td></tr>
<%end if%>
</form>   
</table>
<!--endprint-->
</td>
<td></td>
</tr>
<tr>
<td>
<img src="../../../../../../../../../../../../../../../../../../../../../../../../../../../../images/r_4.gif" alt="" /></td>
<td></td>
<td>
<img src="../../../../../../../../../../../../../../../../../../../../../../../../../../../../images/r_3.gif" alt="" /></td>
</tr>
</table>
</body>
</html>
2010-09-14 09:46
eournet
Rank: 2
等 级:论坛游民
帖 子:103
专家分:26
注 册:2010-5-22
收藏
得分:0 
为何无人问津,是问题太难还是问的比较古怪
2010-09-14 19:05
makebest
Rank: 8Rank: 8
等 级:蝙蝠侠
威 望:3
帖 子:658
专家分:962
注 册:2005-3-17
收藏
得分:3 
贴这么多代码有何用? 还得靠你仔细查找, 既然是类似, 就说明是不一样的.
2010-09-14 19:59
eournet
Rank: 2
等 级:论坛游民
帖 子:103
专家分:26
注 册:2010-5-22
收藏
得分:0 
我要是找的出来就不用来麻烦大家了,还请帮下吧,两个程序其实差不多,就是数据表更换了一下,其他都没有变
2010-09-14 20:44
cnfarer
Rank: 16Rank: 16Rank: 16Rank: 16
等 级:版主
威 望:179
帖 子:3330
专家分:21157
注 册:2010-1-19
收藏
得分:3 
是不是在数据表中有什么设置,自己查下吧。你的代码虽多,但不一定能别人的机器在上测试啊!如果单纯看代码,可能没几个人有这个耐心吧?!

★★★★★为人民服务★★★★★
2010-09-14 21:52
hams
Rank: 12Rank: 12Rank: 12
等 级:贵宾
威 望:18
帖 子:912
专家分:3670
注 册:2008-7-30
收藏
得分:3 
有时差一个字符就完全不同的效果,这有什么奇怪的。

俺不高手,俺也是来学习的。
俺的意见不一定就对,当你不认同时请点忽视按钮。
当走到十字路口不知该如何走时,可在论坛问下路,但你若希望别人能一路把你送到目的地,显然是不现实的,因为别人也有自己要走的路。
2010-09-15 08:49
eournet
Rank: 2
等 级:论坛游民
帖 子:103
专家分:26
注 册:2010-5-22
收藏
得分:0 
原来这个论坛都是看戏的多
2010-09-15 09:31
eournet
Rank: 2
等 级:论坛游民
帖 子:103
专家分:26
注 册:2010-5-22
收藏
得分:0 
没有能力解决就别出来跟帖
2010-09-15 09:31
sunny22
Rank: 1
等 级:新手上路
帖 子:3
专家分:3
注 册:2007-8-11
收藏
得分:3 
rs_whd.open sql,conn,1,3
改成
rs_whd.open sql,conn,3,3

试试

你来这里是解决问题的,不是来吵架的。大家都不跟帖,你的帖子就沉下去了,你的问题什么时候也解决不了。
2010-09-15 13:17
快速回复:两个类似程序,为什么显示效果不一样
数据加载中...
 
   



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

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