| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 4089 人关注过本帖
标题:Microsoft VBScript 运行时错误 '800a000d' 类型不匹配: 'CheckStr'
只看楼主 加入收藏
故事人生
Rank: 2
等 级:论坛游民
帖 子:58
专家分:36
注 册:2010-3-30
结帖率:92.31%
收藏
已结贴  问题点数:10 回复次数:3 
Microsoft VBScript 运行时错误 '800a000d' 类型不匹配: 'CheckStr'
下面为数据库列表

ID    ProductNameCH    ViewFlagCH    SortID    SortPath    ProductNo    ProductModel    N_Price    P_Price    Stock    UnitCH    CommendFlag    NewFlag    MakerCH    GroupID    Exclusive    SmallPic    BigPic    ContentCH    ClickNumber    AddTime    UpdateTime    attribute1CH    attribute1CH_value    SeoKeywordsCH    SeoDescriptionCH

下面为代码,在第243形为何出提示出现,红色地方为出错行数!
Microsoft VBScript 运行时错误 '800a000d'

类型不匹配: 'CheckStr'

\admin\ProductEdit.asp, line 243


<%@ LANGUAGE = VBScript.Encode %>
<HTML xmlns="http://www.
<HEAD>
<META HTTP-EQUIV="ContentCH-Type" ContentCH="text/html; charset=gb2312" />
<TITLE>新闻编辑</TITLE>
<link rel="stylesheet" href="Images/Admin.css">
<script language="javascript" src="../Script/Admin.js"></script>
</HEAD>
<!--#include file="../Include/Const.asp" -->
<!--#include file="../Include/ConnSiteData.asp" -->
<!--#include file="Admin_htmlconfig.asp"-->
<BODY>
<script language="javascript">
<!--
function setpic(){
    var arr = showModalDialog("../Editor/customDialog/img.htm", "", "dialogWidth:30em; dialogHeight:26em; status:0;help=no");
    if (arr ==null){
        alert("系统提示:当前没有上传图片,界面预览图为空,用户可以重新上传图片!");
    }
    if (arr !=null){
        editForm.SmallPic.value=arr;
    }
}
function setbpic(){
    var arr = showModalDialog("../Editor/customDialog/img.htm", "", "dialogWidth:30em; dialogHeight:26em; status:0;help=no");
    if (arr ==null){
        alert("系统提示:当前没有上传图片,界面预览图为空,用户可以重新上传图片!");
    }
    if (arr !=null){
        editForm.BigPic.value=arr;
    }
}
//-->
</script>
<%
if Instr(session("AdminPurview"),"|13,")=0 then
  response.write ("<br><br><div align=""center""><font style=""color:red; font-size:9pt; "")>您没有管理该模块的权限!</font></div>")
  response.end
end if
dim Result
Result=request.QueryString("Result")
dim ID,ProductNameCh,ViewFlagCh,SortNameCH,SortID,SortPath
dim ProductNo,ProductModel,N_Price,P_Price,Stock,UnitCh,MakerCh,CommendFlag,NewFlag,GroupID,GroupIdName,Exclusive,SeoKeywordsCH,SeoDescriptionCH
dim BigPic,SmallPic,ContentCH
ID=request.QueryString("ID")
call ProductEdit()
call AdminSiteInfo
%>

<br>
<table class="tableborder" width="95%" border="0" align="center" cellpadding="3" cellspacing="1">
  <tr>
    <th>产品检索及分类查看:添加,修改,删除产品信息</th>
  </tr>
  <tr>
    <td height="24" align="center" nowrap="nowrap"  class="forumrow"><a href="ProductEdit.asp?Result=Add" onclick='changeAdminFlag(&quot;添加产品信息&quot;)'>添加产品信息</a><font color="#0000FF">&nbsp;|&nbsp;</font><a href="ProductList.asp" onclick='changeAdminFlag(&quot;产品列表&quot;)'>查看所有产品信息</a>&nbsp;|&nbsp;</font><a href="ProductSort.asp?Action=Add&amp;ParentID=0" onclick='changeAdminFlag(&quot;产品列表&quot;)'>添加产品类别</a>&nbsp;|&nbsp;</font><a href="OrderList.asp" onclick='changeAdminFlag(&quot;产品列表&quot;)'>查看订单信息</a><font color="#0000FF">&nbsp;|&nbsp;</font><a href="Admin_htmlsort.asp" onclick='changeAdminFlag(&quot;生成其他信息分类页面&quot;)'>生成产品分类页面</a><font color="#0000FF">&nbsp;|&nbsp;</font><a href="Admin_htmlpro.asp" onclick='changeAdminFlag(&quot;生成其他信息详细页面&quot;)'>生成产品详细页面</a></td>
  </tr>
</table>
<br>
<table class="tableborder" width="95%" border="0" align="center" cellpadding="3" cellspacing="1">
  <form name="editForm" method="post" action="ProductEdit.asp?Action=SaveEdit&Result=<%=Result%>&ID=<%=ID%>">
    <tr>
      <th height="22" colspan="2">【<%If Result = "Add" then%>添加<%ElseIf Result = "Modify" then%>修改<%End If%>产品】</th>
    </tr>
    <tr>
      <td width="20%" align="right" class="forumRow">中文标题:</td>
      <td width="80%" class="forumRowHighlight"><input name="ProductNameCH" type="text" id="ProductNameCH" style="width: 280" value="<%=ProductNameCH%>" maxlength="250">
        是否显示:
        <input name="ViewFlagCH" type="checkbox" value="1" checked="checked" <%if ViewFlagCH then response.write ("checked")%>>
        <font color="red">*</font> <input type="button" name="btn" value="复制标题" title="复制标题到中文:MetaDescription、MetaKeywords" onClick="CopyWebTitleCH(document.editForm.ProductNameCH.value);"></td>
    </tr>
    <tr>
      <td align="right" class="forumRow">中文MetaKeywords:</td>
      <td class="forumRowHighlight"><input name="SeoKeywordsCH" type="text" id="SeoKeywordsCH" style="width: 500" value="<%=SeoKeywordsCH%>" maxlength="250"></td>
    </tr>
    <tr>
      <td align="right" class="forumRow">中文MetaDescription:</td>
      <td class="forumRowHighlight"><input name="SeoDescriptionCH" type="text" id="SeoDescriptionCH" style="width: 500" value="<%=SeoDescriptionCH%>" maxlength="250"></td>
    </tr>
    <tr>
      <td align="right" class="forumRow">产品类别:</td>
      <td class="forumRowHighlight"><input name="SortID" type="text" id="SortID" style="width: 18; background-color:#fffff0" value="<%=SortID%>" readonly>
        <input name="SortPath" type="text" id="SortPath" style="width: 70; background-color:#fffff0" value="<%=SortPath%>" readonly>
        <input name="SortNameCH" type="text" id="SortNameCH" value="<%=SortNameCH%>" style="width: 180; background-color:#fffff0" readonly>
        <a href="javaScript:OpenScript('SelectSort.asp?Result=Products',500,500,'')">选择类别</a> <font color="red">*</font></td>
    </tr>
    <tr>
      <td align="right" class="forumRow">产品编号:</td>
      <td class="forumRowHighlight"><input name="ProductNo" type="text" style="width: 180;" value="<%=ProductNo%>" maxlength="180">
        <font color="red">*</font></td>
    </tr>
    <tr>
      <td align="right" class="forumRow">产品型号:</td>
      <td class="forumRowHighlight"><input name="ProductModel" type="text" style="width: 180;" value="<%=ProductModel%>" maxlength="180">
        <font color="red">*</font></td>
    </tr>
    <tr>
      <td align="right" class="forumRow">市场价格:</td>
      <td class="forumRowHighlight"><input name="N_Price" type="text" style="width: 80;" value="<%=N_Price%>" maxlength="80">
        <font color="red">*</font></td>
    </tr>
    <tr>
      <td align="right" class="forumRow">批发价格:</td>
      <td class="forumRowHighlight"><input name="P_Price" type="text" style="width: 80;" value="<%=P_Price%>" maxlength="80">
        <font color="red">*</font></td>
    </tr>
    <tr>
      <td align="right" class="forumRow">库存数量:</td>
      <td class="forumRowHighlight"><input name="Stock" type="text" style="width: 80;" value="<%=Stock%>" maxlength="80">
        <font color="red">*</font></td>
    </tr>
    <tr>
      <td align="right" class="forumRow">计价单位[中文]:</td>
      <td class="forumRowHighlight"><input name="UnitCH" type="text" style="width: 80;" value="<%=UnitCH%>" maxlength="80">
        <a href="javascript:" onClick="document.editForm.UnitCH.value='件'">件</a> <a href="javascript:" onClick="document.editForm.UnitCH.value='套'">套</a> <a href="javascript:" onClick="document.editForm.UnitCH.value='个'">个</a> <a href="javascript:" onClick="document.editForm.UnitCH.value='只'">只</a> <a href="javascript:" onClick="document.editForm.UnitCH.value='台'">台</a> <font color="red">*</font></td>
    </tr>
   
    <tr>
      <td align="right" class="forumRow">出品公司[中文]:</td>
      <td class="forumRowHighlight"><input name="MakerCH" type="text" style="width: 250;" value="<%=MakerCH%>" maxlength="250">
        <a href="javascript:" onClick="document.editForm.MakerCH.value='<%=AdminSiteTitleCH%>'"><%=AdminSiteTitleCH%></a> <font color="red">*</font></td>
    </tr>
<%
if Result="Modify" then
set rs = server.createobject("adodb.recordset")
sql="select * from LiangJingCMS_Products where ID="& ID
rs.open sql,conn,1,1
if rs.bof and rs.eof then
    response.write ("<center>数据库记录读取错误!</center>")
    response.end
end If
if rs("attribute1CH")<>"" and rs("attribute1CH_value")<>"" then
    attribute1CH_1=Split(rs("attribute1CH"),"§§§")
    attribute1CH_value_1=Split(rs("attribute1CH_value"),"§§§")
    Num_1=ubound(attribute1CH_1)+1
Else
    Num_1=0
End If
rs.close
set rs=Nothing
Else
    Num_1=0
End If
%>
    <tr>
      <td align="right" class="forumRow">中文自定义产品属性:</td>
      <td class="forumRowHighlight"><input name="Num_1" type="text" id="Num_1" value="<%=Num_1%>" size="5" />个 <input name="button2" type="button" id="button2" value="设置" onClick="num_1()" /> <input type="button" name="button7" id="button7" value="增加一个" onClick="num_1_1()" />
        <br>
        <span id="num_1_str">
        <%For i=0 to (Num_1-1)%>
        <table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td height="28">属性名称:
              <input name="attributeCH<%=i+1%>" type="text" id="attributeCH<%=i+1%>" value="<%=attribute1CH_1(i)%>" size="18" />
              属性值:
              <input name="attributeCH<%=i+1%>_value" type="text" id="attributeCH<%=i+1%>_value" value="<%=attribute1CH_value_1(i)%>" size="50" /></td>
          </tr>
        </table>
        <%Next%>
        </span> </td>
    </tr>
      <tr>
        <td align="right" class="forumRow">状  态:</td>
        <td class="forumRowHighlight"><input name="CommendFlag" type="checkbox" style="HEIGHT: 13px;WIDTH: 13px;" value="1" <%if CommendFlag then response.write ("checked")%>>&nbsp;推荐&nbsp;<input name="NewFlag" type="checkbox" value="1" style="HEIGHT: 13px;WIDTH: 13px;" <%if NewFlag then response.write ("checked")%>>&nbsp;最新</td>
      </tr>
      <tr>
      <td align="right" class="forumRow">阅读权限:</td>
      <td class="forumRowHighlight"><select name="GroupID">
          <% call SelectGroup() %>
        </select>
        <input name="Exclusive" type="radio" value="&gt;=" <%if Exclusive="" or Exclusive=">=" then response.write ("checked")%>>
        隶属
        <input type="radio" <%if Exclusive="=" then response.write ("checked")%> name="Exclusive" value="=">
        专属(隶属:权限值≥可查看,专属:权限值=可查看)</td>
    </tr>
    <tr>
      <td align="right" class="forumRow">产品小图:</td>
      <td class="forumRowHighlight"><input name="SmallPic" type="text" style="width: 250;" value="<%=SmallPic%>" maxlength="250">
        <input type="button" value="上传图片" onClick="setpic();">
        <font color="red">*</font></td>
    </tr>
    <tr>
      <td align="right" class="forumRow">产品大图:</td>
      <td class="forumRowHighlight"><input name="BigPic" type="text" style="width: 250;" value="<%=BigPic%>" maxlength="250">
        <input type="button" value="上传图片" onClick="setbpic();">
        <font color="red">*</font></td>
    </tr>
    <tr>
      <td align="right" class="forumRow">产品内容:</td>
      <td class="forumRowHighlight"><textarea name="ContentCH" id="ContentCH" style="display:none"><%=Server.HTMLEncode((ContentCH))%></textarea>
        <iframe ID="eWebEditor1" src="../Editor/ewebeditor.htm?id=ContentCH&style=coolblue" frameborder="0" scrolling="no" width="550" height="350"></iframe></td>
    </tr>    <tr>
      <td align="right" class="forumRow"></td>
      <td class="forumRowHighlight"><input name="submitSaveEdit" type="submit" id="submitSaveEdit" value="保存">
        <input type="button" value="返回上一页" onClick="history.back(-1)"></td>
    </tr>
  </form>
</table>
</BODY>
</HTML>
<%
sub ProductEdit()
  dim Action,rsRepeat,rs,sql
  Action=request.QueryString("Action")
  if Action="SaveEdit" then
    set rs = server.createobject("adodb.recordset")
    if len(trim(request.Form("ProductNameCh")))<1 then
      response.write ("<script language=javascript> alert('名称为必填项目!');history.back(-1);</script>")
    end if
    if Result="Add" Then
      set rsRepeat = conn.execute("select ProductNo from LiangJingCMS_Products where ProductNo='" & trim(Request.Form("ProductNo")) & "'")
      if not (rsRepeat.bof and rsRepeat.eof) then
        response.write "<script language='javascript'>alert('" & trim(Request.Form("ProductNo")) & "产品编号已存在!');history.back(-1);</script>"
        response.End
      End If
      rsRepeat.close
      set rsRepeat=Nothing
      sql="select * from LiangJingCMS_Products"
      rs.open sql,conn,1,3
      rs.addnew
      rs("ProductNameCh")=trim(Request.Form("ProductNameCh"))
      if Request.Form("ViewFlagCh")=1 then
        rs("ViewFlagCh")=Request.Form("ViewFlagCh")
      else
        rs("ViewFlagCh")=0
      end if
      if Request.Form("SortID")="" and Request.Form("SortPath")="" then
        response.write ("<script language='javascript'>alert('请选择所属分类!');history.back(-1);</script>")
        response.end
      else
        rs("SortID")=Request.Form("SortID")
        rs("SortPath")=Request.Form("SortPath")
      end if
      rs("ContentCh")=trim(Request.Form("ContentCh"))
      GroupIdName=split(Request.Form("GroupID"),"┎╂┚")
      rs("GroupID")=GroupIdName(0)
      rs("Exclusive")=trim(Request.Form("Exclusive"))
      rs("BigPic")=trim(Request.Form("BigPic"))
      rs("SmallPic")=trim(Request.Form("SmallPic"))
      rs("ContentCh")=Request.Form("ContentCh")
      rs("AddTime")=now()
      rs("UpdateTime")=now()
      Num_1=CheckStr(Request.Form("Num_1"),1)
      if Num_1="" then Num_1=0
      if Num_1>0 then
        For i=1 to Num_1
            If CheckStr(Request.Form("attributeCH"&i),0)<>"" and  CheckStr(Request.Form("attributeCH"&i&"_value"),0)<>"" Then
                If attribute1CH="" then
                    attribute1CH=CheckStr(Request.Form("attributeCH"&i),0)
                    attribute1CH_value=CheckStr(Request.Form("attributeCH"&i&"_value"),0)
                Else
                    attribute1CH=attribute1CH&"§§§"&CheckStr(Request.Form("attributeCH"&i),0)
                    attribute1CH_value=attribute1CH_value&"§§§"&CheckStr(Request.Form("attributeCH"&i&"_value"),0)
                End if
            End If
        Next
      end if
      rs("attribute1CH")=attribute1CH
      rs("attribute1CH_value")=attribute1CH_value
      rs("SeoKeywordsCH")=trim(Request.Form("SeoKeywordsCH"))
      rs("SeoDescriptionCH")=trim(Request.Form("SeoDescriptionCH"))
      rs.update
      rs.close
      set rs=Nothing
      set rs=server.createobject("adodb.recordset")
      sql="select top 1 ID from LiangJingCMS_Products order by ID desc"
      rs.open sql,conn,1,1
      ID=rs("ID")
      rs.close
      set rs=Nothing
      if ISHTML = 1 then
      call htmll("/CH/","/CH/",""&ProName&""&Separated&""&ID&"."&HTMLName&"","ProductView.asp","ID=",ID,"","")
      End If
      End If
      if Result="Modify" then
      sql="select * from LiangJingCMS_Products where ID="&ID
      rs.open sql,conn,1,3
      rs("ProductNameCh")=trim(Request.Form("ProductNameCh"))
      if Request.Form("ViewFlagCh")=1 then
        rs("ViewFlagCh")=Request.Form("ViewFlagCh")
      else
        rs("ViewFlagCh")=0
      end if
      rs("SortID")=Request.Form("SortID")
      rs("SortPath")=Request.Form("SortPath")
      rs("ProductNo")=trim(Request.Form("ProductNo"))
      rs("ProductModel")=trim(Request.Form("ProductModel"))
      rs("N_Price")=Round(trim(Request.Form("N_Price")),2)
      rs("P_Price")=Round(trim(Request.Form("P_Price")),2)
      rs("Stock")=Round(trim(Request.Form("Stock")),2)
      rs("UnitCh")=trim(Request.Form("UnitCh"))
      rs("MakerCh")=trim(Request.Form("MakerCh"))
      if Request.Form("CommendFlag")=1 then
        rs("CommendFlag")=Request.Form("CommendFlag")
      else
        rs("CommendFlag")=0
      end if
      if Request.Form("NewFlag")=1 then
        rs("NewFlag")=Request.Form("NewFlag")
      else
        rs("NewFlag")=0
      end if
      GroupIdName=split(Request.Form("GroupID"),"┎╂┚")
      rs("GroupID")=GroupIdName(0)
      rs("Exclusive")=trim(Request.Form("Exclusive"))
      rs("BigPic")=trim(Request.Form("BigPic"))
      rs("SmallPic")=trim(Request.Form("SmallPic"))
      rs("ContentCh")=Request.Form("ContentCh")
      rs("UpdateTime")=now()
      Num_1=CheckStr(Request.Form("Num_1"),1)
      if Num_1="" then Num_1=0
      if Num_1>0 then
        For i=1 to Num_1
            If CheckStr(Request.Form("attributeCH"&i),0)<>"" and  CheckStr(Request.Form("attributeCH"&i&"_value"),0)<>"" Then
                If attribute1CH="" then
                    attribute1CH=CheckStr(Request.Form("attributeCH"&i),0)
                    attribute1CH_value=CheckStr(Request.Form("attributeCH"&i&"_value"),0)
                Else
                    attribute1CH=attribute1CH&"§§§"&CheckStr(Request.Form("attributeCH"&i),0)
                    attribute1CH_value=attribute1CH_value&"§§§"&CheckStr(Request.Form("attributeCH"&i&"_value"),0)
                End if
            End If
        Next
      end if
      rs("attribute1CH")=attribute1CH
      rs("attribute1CH_value")=attribute1CH_value
      rs("SeoKeywordsCH")=trim(Request.Form("SeoKeywordsCH"))
      rs("SeoDescriptionCH")=trim(Request.Form("SeoDescriptionCH"))
      rs.update
      rs.close
      set rs=Nothing
      if ISHTML = 1 then
      call htmll("/CH/","/CH/",""&ProName&""&Separated&""&ID&"."&HTMLName&"","ProductView.asp","ID=",ID,"","")
      End If
      End If
      if ISHTML = 1 then
      response.write "<script language='javascript'>alert('设置成功,相关静态页面已更新!');location.replace('ProductList.asp');</script>"
      Else
      response.write "<script language='javascript'>alert('设置成功!');location.replace('ProductList.asp');</script>"
      End If
  else
      if Result="Modify" then
      set rs = server.createobject("adodb.recordset")
      sql="select * from LiangJingCMS_Products where ID="& ID
      rs.open sql,conn,1,1
      if rs.bof and rs.eof then
      response.write ("<center>数据库记录读取错误!</center>")
      response.end
      end if
      ProductNameCh=rs("ProductNameCh")
      ViewFlagCh=rs("ViewFlagCh")
      SortNameCH=SortText(rs("SortID"))
      SortID=rs("SortID")
      SortPath=rs("SortPath")
      ProductNo=rs("ProductNo")
      ProductModel=rs("ProductModel")
      N_Price=rs("N_Price")
      P_Price=rs("P_Price")
      Stock=rs("Stock")
      UnitCh=rs("UnitCh")
      MakerCh=rs("MakerCh")
      CommendFlag=rs("CommendFlag")
      NewFlag=rs("NewFlag")
      GroupID=rs("GroupID")
      Exclusive=rs("Exclusive")
      BigPic=rs("BigPic")
      SmallPic=rs("SmallPic")
      ContentCh=rs("ContentCh")
      SeoKeywordsCH=rs("SeoKeywordsCH")
      SeoDescriptionCH=rs("SeoDescriptionCH")
      rs.close
      set rs=nothing
      else
      randomize timer
      ProductNo=Hour(now)&Minute(now)&Second(now)&"-"&int(900*rnd)+100
      Stock=10000
    end if
  end if
end sub

sub SelectGroup()
  dim rs,sql
  set rs = server.createobject("adodb.recordset")
  sql="select GroupID,GroupNameCH from LiangJingCMS_MemGroup"
  rs.open sql,conn,1,1
  if rs.bof and rs.eof then
    response.write("未设组别")
  end if
  while not rs.eof
    response.write("<option value='"&rs("GroupID")&"┎╂┚"&rs("GroupNameCH")&"'")
    if GroupID=rs("GroupID") then response.write ("selected")
    response.write(">"&rs("GroupNameCH")&"</option>")
    rs.movenext
  wend
  rs.close
  set rs=nothing
end sub

Function SortText(ID)
  Dim rs,sql
  Set rs=server.CreateObject("adodb.recordset")
  sql="Select * From LiangJingCMS_ProductSort where ID="&ID
  rs.open sql,conn,1,1
  SortText=rs("SortNameCH")
  rs.close
  set rs=nothing
End Function
%>
搜索更多相关主题的帖子: 运行 类型 CheckStr VBScript Microsoft 
2010-04-01 13:16
Alar30
Rank: 10Rank: 10Rank: 10
等 级:贵宾
威 望:10
帖 子:988
专家分:1627
注 册:2009-9-8
收藏
得分:7 
好长的代码
可惜不懂啊
等高人来解答
2010-04-01 13:24
故事人生
Rank: 2
等 级:论坛游民
帖 子:58
专家分:36
注 册:2010-3-30
收藏
得分:0 
这个才是真正的原文件,是中英文版的.但是我不需要只要中文的,第一帖的代码是我修改后的文件
但是下面这个文件也运行不起来.

<%@ LANGUAGE = VBScript.Encode %>
<HTML xmlns="http://www.
<HEAD>
<META HTTP-EQUIV="Content-Type" Content="text/html; charset=gb2312" />
<TITLE>新闻编辑</TITLE>
<link rel="stylesheet" href="Images/Admin.css">
<script language="javascript" src="../Script/Admin.js"></script>
</HEAD>
<!--#include file="../Include/Const.asp" -->
<!--#include file="../Include/ConnSiteData.asp" -->
<!--#include file="Admin_htmlconfig.asp"-->
<BODY>
<script language="javascript">
<!--
function setpic(){
    var arr = showModalDialog("../Editor/customDialog/img.htm", "", "dialogWidth:30em; dialogHeight:26em; status:0;help=no");
    if (arr ==null){
        alert("系统提示:当前没有上传图片,界面预览图为空,用户可以重新上传图片!");
    }
    if (arr !=null){
        editForm.SmallPic.value=arr;
    }
}
function setbpic(){
    var arr = showModalDialog("../Editor/customDialog/img.htm", "", "dialogWidth:30em; dialogHeight:26em; status:0;help=no");
    if (arr ==null){
        alert("系统提示:当前没有上传图片,界面预览图为空,用户可以重新上传图片!");
    }
    if (arr !=null){
        editForm.BigPic.value=arr;
    }
}
//-->
</script>
<%
if Instr(session("AdminPurview"),"|13,")=0 then
  response.write ("<br><br><div align=""center""><font style=""color:red; font-size:9pt; "")>您没有管理该模块的权限!</font></div>")
  response.end
end if
dim Result
Result=request.QueryString("Result")
dim ID,ProductNameCh,ProductNameEn,ViewFlagCh,ViewFlagEn,SortNameCH,SortID,SortPath
dim ProductNo,ProductModel,N_Price,P_Price,Stock,UnitCh,UnitEn,MakerCh,MakerEn,CommendFlag,NewFlag,GroupID,GroupIdName,Exclusive,SeoKeywordsCH,SeoKeywordsEN,SeoDescriptionCH,SeoDescriptionEN
dim BigPic,SmallPic,ContentCH,ContentEn
ID=request.QueryString("ID")
call ProductEdit()
call AdminSiteInfo
%>

<br>
<table class="tableborder" width="95%" border="0" align="center" cellpadding="3" cellspacing="1">
  <tr>
    <th>产品检索及分类查看:添加,修改,删除产品信息</th>
  </tr>
  <tr>
    <td height="24" align="center" nowrap="nowrap"  class="forumrow"><a href="ProductEdit.asp?Result=Add" onclick='changeAdminFlag(&quot;添加产品信息&quot;)'>添加产品信息</a><font color="#0000FF">&nbsp;|&nbsp;</font><a href="ProductList.asp" onclick='changeAdminFlag(&quot;产品列表&quot;)'>查看所有产品信息</a>&nbsp;|&nbsp;</font><a href="ProductSort.asp?Action=Add&amp;ParentID=0" onclick='changeAdminFlag(&quot;产品列表&quot;)'>添加产品类别</a>&nbsp;|&nbsp;</font><a href="OrderList.asp" onclick='changeAdminFlag(&quot;产品列表&quot;)'>查看订单信息</a><font color="#0000FF">&nbsp;|&nbsp;</font><a href="Admin_htmlsort.asp" onclick='changeAdminFlag(&quot;生成其他信息分类页面&quot;)'>生成产品分类页面</a><font color="#0000FF">&nbsp;|&nbsp;</font><a href="Admin_htmlpro.asp" onclick='changeAdminFlag(&quot;生成其他信息详细页面&quot;)'>生成产品详细页面</a></td>
  </tr>
</table>
<br>
<table class="tableborder" width="95%" border="0" align="center" cellpadding="3" cellspacing="1">
  <form name="editForm" method="post" action="ProductEdit.asp?Action=SaveEdit&Result=<%=Result%>&ID=<%=ID%>">
    <tr>
      <th height="22" colspan="2">【<%If Result = "Add" then%>添加<%ElseIf Result = "Modify" then%>修改<%End If%>产品】</th>
    </tr>
    <tr>
      <td width="20%" align="right" class="forumRow">中文标题:</td>
      <td width="80%" class="forumRowHighlight"><input name="ProductNameCH" type="text" id="ProductNameCH" style="width: 280" value="<%=ProductNameCH%>" maxlength="250">
        是否显示:
        <input name="ViewFlagCH" type="checkbox" value="1" checked="checked" <%if ViewFlagCH then response.write ("checked")%>>
        <font color="red">*</font> <input type="button" name="btn" value="复制标题" title="复制标题到中文:MetaDescription、MetaKeywords" onClick="CopyWebTitleCH(document.editForm.ProductNameCH.value);"></td>
    </tr>
    <tr>
      <td width="20%" align="right" class="forumRow">英文标题:</td>
      <td width="80%" class="forumRowHighlight"><input name="ProductNameEN" type="text" id="ProductNameEN" style="width: 280" value="<%=ProductNameEN%>" maxlength="250">
        是否显示:
        <input name="ViewFlagEN" type="checkbox" id="ViewFlagEN" value="1" <%if ViewFlagEN then response.write ("checked")%>>
        <input type="button" name="btn2" value="复制标题" title="复制标题到英文:MetaDescription、MetaKeywords" onClick="CopyWebTitleEN(document.editForm.ProductNameEN.value);"></td>
    </tr>
    <tr>
      <td align="right" class="forumRow">中文MetaKeywords:</td>
      <td class="forumRowHighlight"><input name="SeoKeywordsCH" type="text" id="SeoKeywordsCH" style="width: 500" value="<%=SeoKeywordsCH%>" maxlength="250"></td>
    </tr>
    <tr>
      <td align="right" class="forumRow">中文MetaDescription:</td>
      <td class="forumRowHighlight"><input name="SeoDescriptionCH" type="text" id="SeoDescriptionCH" style="width: 500" value="<%=SeoDescriptionCH%>" maxlength="250"></td>
    </tr>
    <tr>
      <td align="right" class="forumRow">英文MetaKeywords:</td>
      <td class="forumRowHighlight"><input name="SeoKeywordsEN" type="text" id="SeoKeywordsEN" style="width: 500" value="<%=SeoKeywordsEN%>" maxlength="250"></td>
    </tr>
    <tr>
      <td align="right" class="forumRow">英文MetaDescription:</td>
      <td class="forumRowHighlight"><input name="SeoDescriptionEN" type="text" id="SeoDescriptionEN" style="width: 500" value="<%=SeoDescriptionEN%>" maxlength="250"></td>
    </tr>
    <tr>
      <td align="right" class="forumRow">产品类别:</td>
      <td class="forumRowHighlight"><input name="SortID" type="text" id="SortID" style="width: 18; background-color:#fffff0" value="<%=SortID%>" readonly>
        <input name="SortPath" type="text" id="SortPath" style="width: 70; background-color:#fffff0" value="<%=SortPath%>" readonly>
        <input name="SortNameCH" type="text" id="SortNameCH" value="<%=SortNameCH%>" style="width: 180; background-color:#fffff0" readonly>
        <a href="javaScript:OpenScript('SelectSort.asp?Result=Products',500,500,'')">选择类别</a> <font color="red">*</font></td>
    </tr>
    <tr>
      <td align="right" class="forumRow">产品编号:</td>
      <td class="forumRowHighlight"><input name="ProductNo" type="text" style="width: 180;" value="<%=ProductNo%>" maxlength="180">
        <font color="red">*</font></td>
    </tr>
    <tr>
      <td align="right" class="forumRow">产品型号:</td>
      <td class="forumRowHighlight"><input name="ProductModel" type="text" style="width: 180;" value="<%=ProductModel%>" maxlength="180">
        <font color="red">*</font></td>
    </tr>
    <tr>
      <td align="right" class="forumRow">市场价格:</td>
      <td class="forumRowHighlight"><input name="N_Price" type="text" style="width: 80;" value="<%=N_Price%>" maxlength="80">
        <font color="red">*</font></td>
    </tr>
    <tr>
      <td align="right" class="forumRow">批发价格:</td>
      <td class="forumRowHighlight"><input name="P_Price" type="text" style="width: 80;" value="<%=P_Price%>" maxlength="80">
        <font color="red">*</font></td>
    </tr>
    <tr>
      <td align="right" class="forumRow">库存数量:</td>
      <td class="forumRowHighlight"><input name="Stock" type="text" style="width: 80;" value="<%=Stock%>" maxlength="80">
        <font color="red">*</font></td>
    </tr>
    <tr>
      <td align="right" class="forumRow">计价单位[中文]:</td>
      <td class="forumRowHighlight"><input name="UnitCH" type="text" style="width: 80;" value="<%=UnitCH%>" maxlength="80">
        <a href="javascript:" onClick="document.editForm.UnitCH.value='件'">件</a> <a href="javascript:" onClick="document.editForm.UnitCH.value='套'">套</a> <a href="javascript:" onClick="document.editForm.UnitCH.value='个'">个</a> <a href="javascript:" onClick="document.editForm.UnitCH.value='只'">只</a> <a href="javascript:" onClick="document.editForm.UnitCH.value='台'">台</a> <font color="red">*</font></td>
    </tr>
    <tr>
      <td align="right" class="forumRow">计价单位[英文]:</td>
      <td class="forumRowHighlight"><input name="UnitEN" type="text" style="width: 80;" value="<%=UnitEN%>" maxlength="80">
        <a href="javascript:" onClick="document.editForm.UnitEN.value='Dozen'">Dozen</a> </td>
    </tr>
   
    <tr>
      <td align="right" class="forumRow">出品公司[中文]:</td>
      <td class="forumRowHighlight"><input name="MakerCH" type="text" style="width: 250;" value="<%=MakerCH%>" maxlength="250">
        <a href="javascript:" onClick="document.editForm.MakerCH.value='<%=AdminSiteTitleCH%>'"><%=AdminSiteTitleCH%></a> <font color="red">*</font></td>
    </tr>
    <tr>
      <td align="right" class="forumRow">出品公司[英文]:</td>
      <td class="forumRowHighlight"><input name="MakerEN" type="text" id="MakerEN" style="width: 250;" value="<%=MakerEN%>" maxlength="250">
        <a href="javascript:" onClick="document.editForm.MakerEN.value='<%=AdminSiteTitleEN%>'"><%=AdminSiteTitleEN%></a> <font color="red">*</font></td>
    </tr>
<%
if Result="Modify" then
set rs = server.createobject("adodb.recordset")
sql="select * from LiangJingCMS_Products where ID="& ID
rs.open sql,conn,1,1
if rs.bof and rs.eof then
    response.write ("<center>数据库记录读取错误!</center>")
    response.end
end If
if rs("attribute1CH")<>"" and rs("attribute1CH_value")<>"" then
    attribute1CH_1=Split(rs("attribute1CH"),"§§§")
    attribute1CH_value_1=Split(rs("attribute1CH_value"),"§§§")
    Num_1=ubound(attribute1CH_1)+1
Else
    Num_1=0
End If
rs.close
set rs=Nothing
Else
    Num_1=0
End If
%>
    <tr>
      <td align="right" class="forumRow">中文自定义产品属性:</td>
      <td class="forumRowHighlight"><input name="Num_1" type="text" id="Num_1" value="<%=Num_1%>" size="5" />个 <input name="button2" type="button" id="button2" value="设置" onClick="num_1()" /> <input type="button" name="button7" id="button7" value="增加一个" onClick="num_1_1()" />
        <br>
        <span id="num_1_str">
        <%For i=0 to (Num_1-1)%>
        <table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td height="28">属性名称:
              <input name="attributeCH<%=i+1%>" type="text" id="attributeCH<%=i+1%>" value="<%=attribute1CH_1(i)%>" size="18" />
              属性值:
              <input name="attributeCH<%=i+1%>_value" type="text" id="attributeCH<%=i+1%>_value" value="<%=attribute1CH_value_1(i)%>" size="50" /></td>
          </tr>
        </table>
        <%Next%>
        </span> </td>
    </tr>
<%
if Result="Modify" then
set rs = server.createobject("adodb.recordset")
sql="select * from LiangJingCMS_Products where ID="& ID
rs.open sql,conn,1,1
if rs.bof and rs.eof then
    response.write ("<center>数据库记录读取错误!</center>")
    response.end
end If
if rs("attribute1EN")<>"" and rs("attribute1EN_value")<>"" then
    attribute1EN_1=Split(rs("attribute1EN"),"§§§")
    attribute1EN_value_1=Split(rs("attribute1EN_value"),"§§§")
    Num_2=ubound(attribute1EN_1)+1
Else
    Num_2=0
End If
rs.close
set rs=Nothing
Else
    Num_2=0
End If
%>
    <tr>
      <td align="right" class="forumRow">英文自定义产品属性:</td>
      <td class="forumRowHighlight"><input name="Num_2" type="text" id="Num_1" value="<%=Num_2%>" size="5" />个 <input name="button2" type="button" id="button2" value="设置" onClick="num_2()" /> <input type="button" name="button7" id="button7" value="增加一个" onClick="num_2_1()" />
        <br>
        <span id="num_2_str">
        <%For i=0 to (Num_2-1)%>
        <table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td height="28">属性名称:
              <input name="attributeEN<%=i+1%>" type="text" id="attributeEN<%=i+1%>" value="<%=attribute1EN_1(i)%>" size="18" />
              属性值:
              <input name="attributeEN<%=i+1%>_value" type="text" id="attributeEN<%=i+1%>_value" value="<%=attribute1EN_value_1(i)%>" size="50" /></td>
          </tr>
        </table>
        <%Next%>
        </span> </td>
    </tr>
      <tr>
        <td align="right" class="forumRow">状  态:</td>
        <td class="forumRowHighlight"><input name="CommendFlag" type="checkbox" style="HEIGHT: 13px;WIDTH: 13px;" value="1" <%if CommendFlag then response.write ("checked")%>>&nbsp;推荐&nbsp;<input name="NewFlag" type="checkbox" value="1" style="HEIGHT: 13px;WIDTH: 13px;" <%if NewFlag then response.write ("checked")%>>&nbsp;最新</td>
      </tr>
      <tr>
      <td align="right" class="forumRow">阅读权限:</td>
      <td class="forumRowHighlight"><select name="GroupID">
          <% call SelectGroup() %>
        </select>
        <input name="Exclusive" type="radio" value="&gt;=" <%if Exclusive="" or Exclusive=">=" then response.write ("checked")%>>
        隶属
        <input type="radio" <%if Exclusive="=" then response.write ("checked")%> name="Exclusive" value="=">
        专属(隶属:权限值≥可查看,专属:权限值=可查看)</td>
    </tr>
    <tr>
      <td align="right" class="forumRow">产品小图:</td>
      <td class="forumRowHighlight"><input name="SmallPic" type="text" style="width: 250;" value="<%=SmallPic%>" maxlength="250">
        <input type="button" value="上传图片" onClick="setpic();">
        <font color="red">*</font></td>
    </tr>
    <tr>
      <td align="right" class="forumRow">产品大图:</td>
      <td class="forumRowHighlight"><input name="BigPic" type="text" style="width: 250;" value="<%=BigPic%>" maxlength="250">
        <input type="button" value="上传图片" onClick="setbpic();">
        <font color="red">*</font></td>
    </tr>
    <tr>
      <td align="right" class="forumRow">产品内容:</td>
      <td class="forumRowHighlight"><textarea name="ContentCH" id="ContentCH" style="display:none"><%=Server.HTMLEncode((ContentCH))%></textarea>
        <iframe ID="eWebEditor1" src="../Editor/ewebeditor.htm?id=ContentCH&style=coolblue" frameborder="0" scrolling="no" width="550" height="350"></iframe></td>
    </tr>
    <tr>
      <td align="right" class="forumRow">产品内容:</td>
      <td class="forumRowHighlight"><textarea name="ContentEN" id="ContentEN" style="display:none"><%=Server.HTMLEncode((ContentEN))%></textarea>
        <iframe ID="eWebEditor1" src="../Editor/ewebeditor.htm?id=ContentEN&style=coolblue" frameborder="0" scrolling="no" width="550" height="350"></iframe></td>
    </tr>    <tr>
      <td align="right" class="forumRow"></td>
      <td class="forumRowHighlight"><input name="submitSaveEdit" type="submit" id="submitSaveEdit" value="保存">
        <input type="button" value="返回上一页" onClick="history.back(-1)"></td>
    </tr>
  </form>
</table>
</BODY>
</HTML>
<%
sub ProductEdit()
  dim Action,rsRepeat,rs,sql
  Action=request.QueryString("Action")
  if Action="SaveEdit" then
    set rs = server.createobject("adodb.recordset")
    if len(trim(request.Form("ProductNameCh")))<1 then
      response.write ("<script language=javascript> alert('""中文""名称为必填项目!');history.back(-1);</script>")
      response.end
    end if
    if request.Form("ViewFlagEn")=1 then
      if len(trim(request.Form("ProductNameEn")))<1 then
      response.write ("<script language=javascript> alert('您已经选择了""英文""显示,因此英文名称必填!');history.back(-1);</script>")
      response.end
      end if
    end if
    if Result="Add" Then
      set rsRepeat = conn.execute("select ProductNo from LiangJingCMS_Products where ProductNo='" & trim(Request.Form("ProductNo")) & "'")
      if not (rsRepeat.bof and rsRepeat.eof) then
        response.write "<script language='javascript'>alert('" & trim(Request.Form("ProductNo")) & "产品编号已存在!');history.back(-1);</script>"
        response.End
      End If
      rsRepeat.close
      set rsRepeat=Nothing
      sql="select * from LiangJingCMS_Products"
      rs.open sql,conn,1,3
      rs.addnew
      rs("ProductNameCh")=trim(Request.Form("ProductNameCh"))
      rs("ProductNameEn")=trim(Request.Form("ProductNameEn"))
      if Request.Form("ViewFlagCh")=1 then
        rs("ViewFlagCh")=Request.Form("ViewFlagCh")
      else
        rs("ViewFlagCh")=0
      end if
      if Request.Form("ViewFlagEn")=1 then
        rs("ViewFlagEn")=Request.Form("ViewFlagEn")
      else
        rs("ViewFlagEn")=0
      end if
      rs("SortID")=Request.Form("SortID")
      rs("SortPath")=Request.Form("SortPath")
      rs("ProductNo")=trim(Request.Form("ProductNo"))
      rs("ProductModel")=trim(Request.Form("ProductModel"))
      rs("N_Price")=Round(trim(Request.Form("N_Price")),2)
      rs("P_Price")=Round(trim(Request.Form("P_Price")),2)
      rs("Stock")=Round(trim(Request.Form("Stock")),2)
      rs("UnitCh")=trim(Request.Form("UnitCh"))
      rs("UnitEn")=trim(Request.Form("UnitEn"))
      rs("MakerCh")=trim(Request.Form("MakerCh"))
      rs("MakerEn")=trim(Request.Form("MakerEn"))      
      if Request.Form("CommendFlag")=1 then
        rs("CommendFlag")=Request.Form("CommendFlag")
      else
        rs("CommendFlag")=0
      end if
      if Request.Form("NewFlag")=1 then
        rs("NewFlag")=Request.Form("NewFlag")
      else
        rs("NewFlag")=0
      end if
      GroupIdName=split(Request.Form("GroupID"),"┎╂┚")
      rs("GroupID")=GroupIdName(0)
      rs("Exclusive")=trim(Request.Form("Exclusive"))
      rs("BigPic")=trim(Request.Form("BigPic"))
      rs("SmallPic")=trim(Request.Form("SmallPic"))
      rs("ContentCh")=Request.Form("ContentCh")
      rs("ContentEn")=Request.Form("ContentEn")
      rs("AddTime")=now()
      rs("UpdateTime")=now()
      Num_1=CheckStr(Request.Form("Num_1"),1)
      if Num_1="" then Num_1=0
      if Num_1>0 then
        For i=1 to Num_1
            If CheckStr(Request.Form("attributeCH"&i),0)<>"" and  CheckStr(Request.Form("attributeCH"&i&"_value"),0)<>"" Then
                If attribute1CH="" then
                    attribute1CH=CheckStr(Request.Form("attributeCH"&i),0)
                    attribute1CH_value=CheckStr(Request.Form("attributeCH"&i&"_value"),0)
                Else
                    attribute1CH=attribute1CH&"§§§"&CheckStr(Request.Form("attributeCH"&i),0)
                    attribute1CH_value=attribute1CH_value&"§§§"&CheckStr(Request.Form("attributeCH"&i&"_value"),0)
                End if
            End If
        Next
      end if
      Num_2=CheckStr(Request.Form("Num_2"),1)
      if Num_2="" then Num_2=0
      if Num_2>0 then
        For i=1 to Num_2
            If CheckStr(Request.Form("attributeEN"&i),0)<>"" and  CheckStr(Request.Form("attributeEN"&i&"_value"),0)<>"" Then
                If attribute1EN="" then
                    attribute1EN=CheckStr(Request.Form("attributeEN"&i),0)
                    attribute1EN_value=CheckStr(Request.Form("attributeEN"&i&"_value"),0)
                Else
                    attribute1EN=attribute1EN&"§§§"&CheckStr(Request.Form("attributeEN"&i),0)
                    attribute1EN_value=attribute1EN_value&"§§§"&CheckStr(Request.Form("attributeEN"&i&"_value"),0)
                End if
            End If
        Next
      end if
      rs("attribute1CH")=attribute1CH
      rs("attribute1CH_value")=attribute1CH_value
      rs("attribute1EN")=attribute1EN
      rs("attribute1EN_value")=attribute1EN_value
      rs("SeoKeywordsCH")=trim(Request.Form("SeoKeywordsCH"))
      rs("SeoDescriptionCH")=trim(Request.Form("SeoDescriptionCH"))
      rs("SeoKeywordsEN")=trim(Request.Form("SeoKeywordsEN"))
      rs("SeoDescriptionEN")=trim(Request.Form("SeoDescriptionEN"))
      rs.update
      rs.close
      set rs=Nothing
      set rs=server.createobject("adodb.recordset")
      sql="select top 1 ID from LiangJingCMS_Products order by ID desc"
      rs.open sql,conn,1,1
      ID=rs("ID")
      rs.close
      set rs=Nothing
      if ISHTML = 1 then
      call htmll("/CH/","/CH/",""&ProName&""&Separated&""&ID&"."&HTMLName&"","ProductView.asp","ID=",ID,"","")
      call htmll("/EN/","/EN/",""&ProName&""&Separated&""&ID&"."&HTMLName&"","ProductView.asp","ID=",ID,"","")
      End If
      End If
      if Result="Modify" then
      sql="select * from LiangJingCMS_Products where ID="&ID
      rs.open sql,conn,1,3
      rs("ProductNameCh")=trim(Request.Form("ProductNameCh"))
      rs("ProductNameEn")=trim(Request.Form("ProductNameEn"))
      if Request.Form("ViewFlagCh")=1 then
        rs("ViewFlagCh")=Request.Form("ViewFlagCh")
      else
        rs("ViewFlagCh")=0
      end if
      if Request.Form("ViewFlagEn")=1 then
        rs("ViewFlagEn")=Request.Form("ViewFlagEn")
      else
        rs("ViewFlagEn")=0
      end if
      rs("SortID")=Request.Form("SortID")
      rs("SortPath")=Request.Form("SortPath")
      rs("ProductNo")=trim(Request.Form("ProductNo"))
      rs("ProductModel")=trim(Request.Form("ProductModel"))
      rs("N_Price")=Round(trim(Request.Form("N_Price")),2)
      rs("P_Price")=Round(trim(Request.Form("P_Price")),2)
      rs("Stock")=Round(trim(Request.Form("Stock")),2)
      rs("UnitCh")=trim(Request.Form("UnitCh"))
      rs("UnitEn")=trim(Request.Form("UnitEn"))
      rs("MakerCh")=trim(Request.Form("MakerCh"))
      rs("MakerEn")=trim(Request.Form("MakerEn"))      
      if Request.Form("CommendFlag")=1 then
        rs("CommendFlag")=Request.Form("CommendFlag")
      else
        rs("CommendFlag")=0
      end if
      if Request.Form("NewFlag")=1 then
        rs("NewFlag")=Request.Form("NewFlag")
      else
        rs("NewFlag")=0
      end if
      GroupIdName=split(Request.Form("GroupID"),"┎╂┚")
      rs("GroupID")=GroupIdName(0)
      rs("Exclusive")=trim(Request.Form("Exclusive"))
      rs("BigPic")=trim(Request.Form("BigPic"))
      rs("SmallPic")=trim(Request.Form("SmallPic"))
      rs("ContentCh")=Request.Form("ContentCh")
      rs("ContentEn")=Request.Form("ContentEn")
      rs("UpdateTime")=now()
      Num_1=CheckStr(Request.Form("Num_1"),1)
      if Num_1="" then Num_1=0
      if Num_1>0 then
        For i=1 to Num_1
            If CheckStr(Request.Form("attributeCH"&i),0)<>"" and  CheckStr(Request.Form("attributeCH"&i&"_value"),0)<>"" Then
                If attribute1CH="" then
                    attribute1CH=CheckStr(Request.Form("attributeCH"&i),0)
                    attribute1CH_value=CheckStr(Request.Form("attributeCH"&i&"_value"),0)
                Else
                    attribute1CH=attribute1CH&"§§§"&CheckStr(Request.Form("attributeCH"&i),0)
                    attribute1CH_value=attribute1CH_value&"§§§"&CheckStr(Request.Form("attributeCH"&i&"_value"),0)
                End if
            End If
        Next
      end if
      Num_2=CheckStr(Request.Form("Num_2"),1)
      if Num_2="" then Num_2=0
      if Num_2>0 then
        For i=1 to Num_2
            If CheckStr(Request.Form("attributeEN"&i),0)<>"" and  CheckStr(Request.Form("attributeEN"&i&"_value"),0)<>"" Then
                If attribute1EN="" then
                    attribute1EN=CheckStr(Request.Form("attributeEN"&i),0)
                    attribute1EN_value=CheckStr(Request.Form("attributeEN"&i&"_value"),0)
                Else
                    attribute1EN=attribute1EN&"§§§"&CheckStr(Request.Form("attributeEN"&i),0)
                    attribute1EN_value=attribute1EN_value&"§§§"&CheckStr(Request.Form("attributeEN"&i&"_value"),0)
                End if
            End If
        Next
      end if
      rs("attribute1CH")=attribute1CH
      rs("attribute1CH_value")=attribute1CH_value
      rs("attribute1EN")=attribute1EN
      rs("attribute1EN_value")=attribute1EN_value
      rs("SeoKeywordsCH")=trim(Request.Form("SeoKeywordsCH"))
      rs("SeoDescriptionCH")=trim(Request.Form("SeoDescriptionCH"))
      rs("SeoKeywordsEN")=trim(Request.Form("SeoKeywordsEN"))
      rs("SeoDescriptionEN")=trim(Request.Form("SeoDescriptionEN"))
      rs.update
      rs.close
      set rs=Nothing
      if ISHTML = 1 then
      call htmll("/CH/","/CH/",""&ProName&""&Separated&""&ID&"."&HTMLName&"","ProductView.asp","ID=",ID,"","")
      call htmll("/EN/","/EN/",""&ProName&""&Separated&""&ID&"."&HTMLName&"","ProductView.asp","ID=",ID,"","")
      End If
      End If
      if ISHTML = 1 then
      response.write "<script language='javascript'>alert('设置成功,相关静态页面已更新!');location.replace('ProductList.asp');</script>"
      Else
      response.write "<script language='javascript'>alert('设置成功!');location.replace('ProductList.asp');</script>"
      End If
  else
      if Result="Modify" then
      set rs = server.createobject("adodb.recordset")
      sql="select * from LiangJingCMS_Products where ID="& ID
      rs.open sql,conn,1,1
      if rs.bof and rs.eof then
      response.write ("<center>数据库记录读取错误!</center>")
      response.end
      end if
      ProductNameCh=rs("ProductNameCh")
      ProductNameEn=rs("ProductNameEn")
      ViewFlagCh=rs("ViewFlagCh")
      ViewFlagEn=rs("ViewFlagEn")
      SortNameCH=SortText(rs("SortID"))
      SortID=rs("SortID")
      SortPath=rs("SortPath")
      ProductNo=rs("ProductNo")
      ProductModel=rs("ProductModel")
      N_Price=rs("N_Price")
      P_Price=rs("P_Price")
      Stock=rs("Stock")
      UnitCh=rs("UnitCh")
      UnitEn=rs("UnitEn")
      MakerCh=rs("MakerCh")
      MakerEn=rs("MakerEn")
      CommendFlag=rs("CommendFlag")
      NewFlag=rs("NewFlag")
      GroupID=rs("GroupID")
      Exclusive=rs("Exclusive")
      BigPic=rs("BigPic")
      SmallPic=rs("SmallPic")
      ContentCh=rs("ContentCh")
      ContentEn=rs("ContentEn")
      SeoKeywordsCH=rs("SeoKeywordsCH")
      SeoDescriptionCH=rs("SeoDescriptionCH")
      SeoKeywordsEN=rs("SeoKeywordsEN")
      SeoDescriptionEN=rs("SeoDescriptionEN")
      rs.close
      set rs=nothing
      else
      randomize timer
      ProductNo=Hour(now)&Minute(now)&Second(now)&"-"&int(900*rnd)+100
      Stock=10000
    end if
  end if
end sub

sub SelectGroup()
  dim rs,sql
  set rs = server.createobject("adodb.recordset")
  sql="select GroupID,GroupNameCH from LiangJingCMS_MemGroup"
  rs.open sql,conn,1,1
  if rs.bof and rs.eof then
    response.write("未设组别")
  end if
  while not rs.eof
    response.write("<option value='"&rs("GroupID")&"┎╂┚"&rs("GroupNameCH")&"'")
    if GroupID=rs("GroupID") then response.write ("selected")
    response.write(">"&rs("GroupNameCH")&"</option>")
    rs.movenext
  wend
  rs.close
  set rs=nothing
end sub

Function SortText(ID)
  Dim rs,sql
  Set rs=server.CreateObject("adodb.recordset")
  sql="Select * From LiangJingCMS_ProductSort where ID="&ID
  rs.open sql,conn,1,1
  SortText=rs("SortNameCH")
  rs.close
  set rs=nothing
End Function
%>
2010-04-01 14:00
故事人生
Rank: 2
等 级:论坛游民
帖 子:58
专家分:36
注 册:2010-3-30
收藏
得分:0 
有哪位高手帮下忙吗?
2010-04-02 18:45
快速回复:Microsoft VBScript 运行时错误 '800a000d' 类型不匹配: 'CheckStr'
数据加载中...
 
   



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

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