网站首页 关于我们 产品展示 加盟合作 销售网络 客户反馈 联系我们
 
电 话:0546-2992329
传 真:0546-2992329

<%@language=vbscript codepage=936 %>




<%
ArticleID=Trim(Request.Form("ArticleID"))
classid=Trim(Request.Form("classid"))
Title=trim(request.form("Title"))
Content=ubbcode(trim(request.form("Content")))
UpdateTime=trim(request.form("UpdateTime"))
IncludePic=trim(request.form("IncludePic"))
DefaultPicUrl=trim(request.form("DefaultPicUrl"))
UploadFiles=trim(request.form("UploadFiles"))
Passed=trim(request.form("Passed"))
Elite=trim(request.form("Elite"))
 set rs=server.createobject("adodb.recordset")
 if request("action")="add" then
  sql="select top 1 * from Product"
  rs.open sql,conn,1,3
  rs.addnew
  call SaveData()
  rs.update
  ArticleID=rs("ArticleID")
  rs.close
  set rs=nothing
 elseif request("action")="Modify" then
    if ArticleID<>"" then
   sql="select * from Product where articleid=" & ArticleID
   rs.open sql,conn,1,3
   if not (rs.bof and rs.eof) then
    call SaveData()
    rs.update
    rs.close
    set rs=nothing
    else
    founderr=true
    errmsg=errmsg+"

  • 找不到此文章,可能已经被其他人删除。
  • "
        call WriteErrMsg()
       end if
      else
       founderr=true
       errmsg=errmsg+"
  • 不能确定ArticleID的值
  • "
       call WriteErrMsg()
      end if
     else
      founderr=true
      errmsg=errmsg+"
  • 没有选定参数
  • "
      call WriteErrMsg()
     end if

     call CloseConn()
    %>

     
       
     


         

         

         

         

         
           
             
                <%if request("action")="add" then%>
                添加
                <%else%>
                修改
                <%end if%>
                产品成功

           

           
             
             
           
           
             
             
           
           
             
             
           
           
             
           
         

               

    产品序号:


             
    <%=ArticleID%>

               
    产品编号:

             
    <%=Product_Id%>

               
    产品名称:

             
    <%=Title%>

               

    修改产品】 【继续添加产品】 【产品管理】 【预览产品内容


             

       

    <%
    else
     WriteErrMsg
    end if

    sub SaveData()
     rs("Title")=Title
     rs("classid")=classid
     rs("Content")=Content
     rs("UpdateTime")=UpdateTime
     rs("DefaultPicUrl")=DefaultPicUrl

     '***************************************
     '删除无用的上传文件
     if ObjInstalled=True and UploadFiles<>"" then
      dim fso,strRubbishFile
      Set fso = Server.CreateObject("Scripting.FileSystemObject")
      if instr(UploadFiles,"|")>1 then
       dim arrUploadFiles,intTemp
       arrUploadFiles=split(UploadFiles,"|")
       UploadFiles=""
       for intTemp=0 to ubound(arrUploadFiles)
        if instr(Content,arrUploadFiles(intTemp))<=0 and arrUploadFiles(intTemp)<>DefaultPicUrl then
         strRubbishFile=server.MapPath("../" & arrUploadFiles(intTemp))
         if fso.FileExists(strRubbishFile) then
          fso.DeleteFile(strRubbishFile)
          response.write "

  • " & arrUploadFiles(intTemp) & "在文章中没有用到,也没有被设为首页图片,所以已经被删除!
  • "
         end if
        else
         if intTemp=0 then
          UploadFiles=arrUploadFiles(intTemp)
         else
          UploadFiles=UploadFiles & "|" & arrUploadFiles(intTemp)
         end if
        end if
       next
      else
       if instr(Content,UploadFiles)<=0 and UploadFiles<>DefaultPicUrl then
        strRubbishFile=server.MapPath("../" & UploadFiles)
        if fso.FileExists(strRubbishFile) then
         fso.DeleteFile(strRubbishFile)
         response.write "
  • " & UploadFiles & "在文章中没有用到,也没有被设为首页图片,所以已经被删除!
  • "
        end if
        UploadFiles=""
       end if
      end if
      set fso=nothing
     end If
     '结束
     '***************************************
     rs("DefaultPicUrl")=DefaultPicUrl
     rs("UploadFiles")=UploadFiles
    end sub
     
    %>

     
     
    Copyright ©2005-2010 版权所有 和裕祥老粗布  技术支持:东营金志网络科技有限公司