| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 688 人关注过本帖
标题:大家来帮忙看下(Microsoft VBScript 运行时错误 (0x800A000D类型不匹配: ' ...
只看楼主 加入收藏
东南小伙
Rank: 1
等 级:新手上路
帖 子:3
专家分:0
注 册:2011-6-11
收藏
 问题点数:0 回复次数:0 
大家来帮忙看下(Microsoft VBScript 运行时错误 (0x800A000D类型不匹配: 'cint')/manage/list_pros.asp,
<%Response.Expires=0%>
<!--#include file="../include/checkuser.asp" -->
<!--#include file="../include/db_conn.asp" -->
<%
 m_ver = Trim(request("ver"))
 keyword=request.Form("keyword")
 news_sort=request.Form("news_sort")
 if news_sort ="" then
     news_sort =0
 else
     news_sort =cint(news_sort)
 end if
 ctype =request.Form("ctype")
 if ctype ="" then
     ctype =0
 else
     ctype =cint(ctype)
 end if
 If m_ver ="" or isnull(m_ver) Then
    m_ver="cn"'默认中文
 end if
 sqlstr="select * from pros where me_version = '" & m_ver & "' "
 if keyword<>"" then
     sqlstr = sqlstr & " and title like '%" & keyword & "%' "
 End If
 if news_sort <>"" then
     sqlstr = sqlstr & " and newsort = " & cint(news_sort)
 end if
 if ctype = 1 then
     sqlstr =sqlstr & " and  indexsign = 1"
 elseif ctype =2 then
     sqlstr =sqlstr & " and newsign = 1"
 end if
 sqlstr =sqlstr & " order by newsort,paixu "
 set myrs=server.CreateObject("adodb.recordset")
 myrs.Open sqlstr,conn,1,1
function getclass(id)
    sql="select *  from t_news_sort where id =" & cint(id)
    'response.Write(sql)
    'response.end
    set rsclass =server.CreateObject("adodb.recordset")
    rsclass.open sql,conn,1,1
    if not rsclass.eof then
        getclass=rsclass("Newsort")
    end if
    set rsclass=nothing
end function

function CheckUp(news_id,news_sort,paixu,ver,me_page)

    me_version = ver
    wherestr = " me_version = '" & ver & "'"
    if news_sort <> "" then
        wherestr = wherestr & " and newsort = " & cint(news_sort)
    end if
   
    set rsclass =server.CreateObject("adodb.recordset")
    sql="select top 1 id from pros where " & wherestr & " and paixu<" & paixu
    rsclass.open sql,conn,1,1
    if not rsclass.eof then
        Response.Write "<a href=""javascript:move_up('moveup','"&news_id&"','"&news_sort&"','"&paixu&"','"&m_ver&"','"&me_page&"');"" style=""text-decoration:none;""><img src=""images/paixu_up.gif"" width=""10"" height=""10"" border=""0"">上移</a>"
        else
        Response.Write "<img src=""images/paixu_up_no.gif"" width=""10"" height=""10"" border=""0""><font color='#999999'>上移</font>"
    end if
    set rsclass=nothing
end function

function CheckDown(news_id,news_sort,paixu,ver,me_page)

    me_version = ver
    wherestr = " me_version = '" & ver & "'"
    if news_sort <> "" then
        wherestr = wherestr & " and newsort = " & cint(news_sort)
    end if
   
    set rsclass =server.CreateObject("adodb.recordset")
    sql="select top 1 id from pros where " & wherestr & " and paixu>" & paixu
    rsclass.open sql,conn,1,1
    if not rsclass.eof then
        Response.Write "<a href=""javascript:move_down('movedown','"&news_id&"','"&news_sort&"','"&paixu&"','"&m_ver&"','"&me_page&"');"" style=""text-decoration:none;""><img src=""images/paixu_up.gif"" width=""10"" height=""10"" border=""0"">下移</a>"
        else
        Response.Write "<img src=""images/paixu_down_no.gif"" width=""10"" height=""10"" border=""0""><font color='#999999'>下移</font>"
    end if
    set rsclass=nothing
end function
%>
<!--#include file="../include/header.asp" -->
<script language="javascript">
  function count_checked_items() {
  var number_checked=0;
  var box_count=document.frm_list.news_id.length;
  if ( box_count==null ) {
  if ( document.frm_list.news_id.checked==true ) {
  number_checked=1;}else {
  number_checked=0;}}
  else {
  for ( var i=0; i < (box_count); i++ ) {
  if ( document.frm_list.news_id[i].checked==true ) {
  number_checked++;}}}return number_checked;}
  function move_up(action,news_id,news_sort,paixu,ver,me_page)
    {
          document.frm_list.action="paixu.asp?action="+action+"&news_id="+news_id+"&news_sort="+news_sort+"&paixu="+paixu+"&ver="+ver+"&me_page="+me_page;
          document.frm_list.submit();
     }
  function move_down(action,news_id,news_sort,paixu,ver,me_page)
    {
          document.frm_list.action="paixu.asp?action="+action+"&news_id="+news_id+"&news_sort="+news_sort+"&paixu="+paixu+"&ver="+ver+"&me_page="+me_page;
          document.frm_list.submit();
     }
  function add_to_edit() {
      if (count_checked_items()>0){
          document.frm_list.action="edit_pros.asp";
          document.frm_list.submit();         
      }
      else
          alert('请您先选择要修改的产品!');
          return false;      
      }
  function del_to() {
      if (count_checked_items()>0){
          if(confirm("您真的要删除这些产品吗?")){
          document.frm_list.action="del_pros.asp?action=del";
          document.frm_list.submit();
          }
      }
      else
          alert('请您先选择要删除的产品!');
          return false;      
      }
  function showyes() {
      if (count_checked_items()>0){
          if(confirm("您真的要将这些产品恢复为前台显示状态吗?")){
          document.frm_list.action="del_pros.asp?action=showyes";
          document.frm_list.submit();
          }
      }
      else
          alert('请您先选择要操作的产品!');
          return false;      
      }
  function showno() {
      if (count_checked_items()>0){
          if(confirm("您真的要将这些产品移入回收站吗?")){
          document.frm_list.action="del_pros.asp?action=showno";
          document.frm_list.submit();
          }
      }
      else
          alert('请您先选择要操作的产品!');
          return false;      
      }
  function select_All(checked){
      for (var i=0;i<document.frm_list.elements.length;i++){
      var e = document.frm_list.elements[i];
      if (e.name != 'allbox')
          e.checked = checked;        
      }
      document.all.check_all.checked=checked;
  }      
  function select_ok(){
      if(document.all.check_all.checked){
          document.frm_list.button_select.value="取 消";
          select_All(true)}
      else{
          document.frm_list.button_select.value="全 选";
          select_All(false)
          }
  }
  function select_change(){
      if(document.frm_list.button_select.value=="全 选"){            
          document.frm_list.button_select.value="取 消";
          select_All(true);           
          }
      else{
          document.frm_list.button_select.value="全 选";
          select_All(false);         
          }      
  }
</script>
<div id="enlarge_img"><img src=""/></div>
<script src="../Scripts/enlarge.js" type="text/javascript"></script>
<style>
#enlarge_img {
    font-size: 9pt;BORDER-RIGHT: gray 1px solid; PADDING-RIGHT: 4px; BORDER-TOP: gray 1px solid; PADDING-LEFT: 4px; Z-INDEX: 100; FILTER: progid:DXImageTransform.Microsoft.Shadow(color=gray,direction=120); VISIBILITY: hidden; PADDING-BOTTOM: 4px; BORDER-LEFT: gray 1px solid; PADDING-TOP: 4px; BORDER-BOTTOM: gray 1px solid; POSITION: absolute; BACKGROUND-COLOR: #cccccc
}
</style>
<table width="800" border="0" cellspacing="0" cellpadding="0" align="center" height="37" class="p9">
  <form name="frm_search" action="list_pros.asp" method="post">
  <tr>
    <td align="center"><p>
          <input type="text" name="keyword" class=p9>
          <script language="javascript">
              function chang_news_type(){
                  if(document.frm_search.news_type.value=="root_tag"){
                      alert("请选择相关的子栏目!");
                      document.frm_search.news_type.value="<%=news_sort%>";
                  }
              }
      </script>
          <select name="news_sort" style="WIDTH: 200px; COLOR: navy; font-size:9pt" onChange="javascript:chang_news_type();">
            <%
             function object_selected(current_value,value)
                 if cint(current_value)=cint(value) then
                    sel_str="selected"
                else
                    sel_str=""
                end if
                object_selected=sel_str
              end function
            set myrs_root=server.CreateObject("adodb.recordset")
                sql="select id,parentid,Newsort from t_news_sort where parentid=id and me_version='"& m_ver &"' order by paixu,adddate desc"
                myrs_root.Open sql,conn,1,1
                do until myrs_root.EOF                        
                      Response.Write "<option " & object_selected(newsort,cstr(myrs_root("id"))) & " style='color:black;background:#f0f0f0'>⊙" & myrs_root("Newsort") & "</option>"
                        set rss_root=server.CreateObject("adodb.recordset")
                        sql="select id,parentid,Newsort from t_news_sort where parentid<>id and parentid="&myrs_root("id")&" and me_version='"& m_ver &"' order by paixu,adddate desc"
                          rss_root.Open sql,conn,1,1
                        do until rss_root.EOF
                              Response.Write "<option value='" & rss_root("id") & "' " & object_selected(newsort,cstr(rss_root("id"))) & ">┠—" & rss_root("Newsort") & "</option>"
                            rss_root.MoveNext
                        loop
                        rss_root.Close
                    myrs_root.MoveNext
                  loop
                  myrs_root.Close
                  set myrs_root=nothing%>
          </select>
        <select name="ctype">
        <option value="" selected>所有产品</option>
        <!--<option value="1" <%if ctype = 1 then%>selected<%end if%>>首页推荐</option>-->
        <option value="2" <%if ctype = 2 then%>selected<%end if%>>最新产品</option>
        </select>
          <input type="submit" value="搜索" name=button_223 class="p9" style="WIDTH: 60px; HEIGHT: 22px;">
          <input type="hidden" name="ver" value="<%=m_ver%>" >
        </p></td>
  </tr></form>
</table>
<table width="800" border="0" cellspacing="0" cellpadding="0" align="center">
  <tr>
    <td height="10"></td>
  </tr>
  <tr>
    <td height=100>
    <%if myrs.RecordCount=0 then%>
      <div align="center" class=p14>对不起!没有找到<b><%=keyword%></b>相关产品!<A href="list_pros_all.asp?ver=<%=m_ver%>"><span class=p14>返回产品搜索</span></A></div>
  <%else
          myrs.PageSize=40'每页显示的记录数
          total_page=myrs.PageCount
          total_red=myrs.RecordCount
          current_page=Request.Form("me_page")
          if current_page="" then
              current_page=1
          elseif not isnumeric(current_page) then
              current_page=1
          else
              current_page=cint(current_page)
          end if
          if current_page>total_page then
              current_page=total_page
          elseif current_page<1 then
              current_page=1
          end if
          myrs.AbsolutePage=current_page
          '加入的返回代码!
          session("back_page")=current_page
          session("back_keyword")=keyword
          session("back_sort")=news_sort
          session("back_range")=range
  %>
      <table border="1" cellpadding="2" cellspacing="0" class="p9" bordercolor="#000000" bordercolordark="#FFFFFF" bordercolorlight="#000000" width="800">
        <tr>
          <td colspan="9" bgcolor="#0066CC" >&nbsp;&nbsp;<font face=webdings color="#ffffff">8</font><A href="list_pros_all.asp?ver=<%=m_ver%>"><font color="#ffffff">返回产品管理</font></A>
            <img src="/pixel.gif" width="230" height="1"><span style="FONT-SIZE: 14px"><b><font color="#ffffff">维
            护 产 品 列 表</font></b></span></td>
        </tr>
        <%if keyword<>"" then%>
        <tr align="left">
          <td colspan="9" height="26" >&nbsp;以下是与关键字<font color=red><%=keyword%></font>有关的产品</td>
        </tr>
        <%end if%>
        <tr>
          <td width="26" > <input type="checkbox" name="check_all" value="1" onClick="select_ok();">          </td>
          <td width="34" align="center" ><b>排序</b></td>
          <td width="113" > <div align="center"><b>产品型号</b></div></td>
          <td width="139" align="center" ><b> 所属栏目</b></td>
          <td width="94" align="center" ><b>发布日期</b></td>
          <!--<td width="76" align="center" ><span style="font-weight: bold">显示状态</span></td>-->
          <td width="82" align="center" ><b>F新品推荐</b></td>
        <td align="center" width="62" ><b>E新品推荐</b></td>
        <td align="center" width="89" ><b>Doors新品推荐</b></td>
          <td align="center" width="105" ><span style="font-weight: bold">排序调整</span></td>
        </tr>
        <form name="frm_list" method="post" action="add_ok.asp">
          <%For j = 1 to myrs.PageSize%>
          <tr height="26" onMouseOver="this.style.backgroundColor='#EFEFEF'" onMouseOut="this.style.backgroundColor=''">
            <td width="26" align="center" > <input type="checkbox" name="news_id" value="<%=myrs("id")%>">            </td>
            <td width="34"  > <div align="center"><%= myrs("paixu") %></div></td>
            <td width="113"><div align="center">&nbsp;<a href="javascript:" style="text-decoration:none;" onMouseOver="javascript:drivetip('<img src=../<%=myrs("img1")%>>','#ffffff',this.scr)" onMouseOut="hidedrivetip()"><%=myrs("title")%></a></div></td>
            <td width="139"> <div align="center">&nbsp;<%=getclass(myrs("newsort"))%></div></td>
            <td width="94" align="center">&nbsp;<%=myrs("dateinput")%></td>
           <!-- <td width="76" align="center"  ><%if myrs("show")=True then%>
  <font color="green">前台显示</font>
  <%else%>
<font color="red">回收站</font>
  <%end if%></td>-->
            <td width="82" align="center" ><%if myrs("newsign")=1 then%>
             <b><font color="#CC0033"> √ </font></b>
  <%else%>
×
  <%end if%></td>
             <td align="center" width="62"  ><%if myrs("indexsign")=1 then%>
             <b><font color="#CC0033"> √ </font></b>
              <%else%>
              ×
            <%end if%></td>
             <td align="center" width="89"  ><%if myrs("newpx1")=1 then%>
             <b><font color="#CC0033"> √ </font></b>
              <%else%>
              ×
            <%end if%></td>
            <td align="center" width="105"><table border="0" cellspacing="5" cellpadding="0">
  <tr>
    <td><%=CheckUp(""&myrs("id")&"",""&myrs("newsort")&"",""&myrs("paixu")&"",""&m_ver&"",""&current_page&"")%></td>
    <td><%=CheckDown(""&myrs("id")&"",""&myrs("newsort")&"",""&myrs("paixu")&"",""&m_ver&"",""&current_page&"")%></td>
  </tr>
</table>
</td>
          </tr>
          <%myrs.MoveNext
          If myrs.EOF Then Exit For
        next
        %>
          <tr align="center">
            <td colspan="9" height="50"> <input type="hidden" value="<%=keyword%>" name="keyword2">
              <input type="hidden" value="<%=news_sort%>" name="news_sort">
              <input type="hidden" value="<%=current_page%>" name="me_page">
              <input type="hidden" value="<%=m_ver%>" name="ver">
              <input type="hidden" value="<%=ctype%>" name="ctype">
              <INPUT type="button" value="全 选" name=button_select class="p9" style="WIDTH: 100px; HEIGHT: 24px;" size=134 OnClick="javascript:select_change();">
              &nbsp;&nbsp;&nbsp; <INPUT type="button" value="修 改" name=button_22 class="p9" style="WIDTH: 100px; HEIGHT: 24px;"size=134 OnClick="javascript:add_to_edit();">
              &nbsp;&nbsp;&nbsp; <INPUT type="button" value="前台显示" name=button_21 class="p9" style="WIDTH: 100px; HEIGHT: 24px;" size=134 OnClick="javascript:showyes();">
              &nbsp;&nbsp;&nbsp; <INPUT type="button" value="放入回收站" name=button_21 class="p9" style="WIDTH: 100px; HEIGHT: 24px;" size=134 OnClick="javascript:showno();">
              &nbsp;&nbsp;&nbsp; <INPUT type="button" value="删除产品" name=button_21 class="p9" style="WIDTH: 100px; HEIGHT: 24px;" size=134 OnClick="javascript:del_to();"> </td>
          </tr>
        </form>
        <tr height="32">
          <td colspan=9 bgcolor="#f0f0f0"> <div align="center"><strong>分页显示:</strong>
              <FONT color=red>第<%=current_page%>页/总<%=total_page%>页 | 总<%=total_red%>条</FONT>
              <%call showpage%>
                转到第
              <input type="text" name="goto_page1" value=<%=current_page%> class=box1 size=3 maxlength=3>
              
              <input style="height:19;WIDTH: 42px;" class="s02" hideFocus type="button" value="GoTo" name="cmd_goto" onClick="javascript:viewPage(document.all.goto_page1.value);">
            </div></td>
        </tr>
      </table>
    <%end if%>
    </td>
  </tr>
  <tr>
    <td height="10">
    <script language="javascript">
     function viewPage(ipage){
        document.frm_page.me_page.value=ipage;
        document.frm_page.submit();        
     }
</script>
<form action="list_pros.asp" method=post name="frm_page">
        <input type="hidden" name="me_page" value="<%=current_page%>">
        <input type="hidden" name="news_sort" value=<%=news_sort%>>
        <input type="hidden" name="keyword" value=<%=keyword%>>
        <input type="hidden" name="ver" value="<%=m_ver%>" >
</form>
<%
myrs.Close
set myrs=nothing
conn.close
set conn=nothing%>
</td>
  </tr>
</table>
<!--#include file="../include/bottom.asp" -->
<!--#include file="../include/showpage.asp" -->
搜索更多相关主题的帖子: Microsoft 中文 
2011-06-13 09:28
快速回复:大家来帮忙看下(Microsoft VBScript 运行时错误 (0x800A000D类型不匹 ...
数据加载中...
 
   



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

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