downedit.asp

来自「生成html的ASP企业站点,可以进行二次开发的」· ASP 代码 · 共 312 行 · 第 1/2 页

ASP
312
字号
        rs("ViewFlagEn")=Request.Form("ViewFlagEn")
	  else
        rs("ViewFlagEn")=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
	  if Request.Form("CommendFlag")=1 then
        rs("CommendFlag")=Request.Form("CommendFlag")
	  else
        rs("CommendFlag")=0
	  end if
      GroupIdName=split(Request.Form("GroupID"),"┎╂┚")
	  rs("GroupID")=GroupIdName(0)
	  rs("Exclusive")=trim(Request.Form("Exclusive"))
	  rs("FileSize")=trim(Request.Form("FileSize"))
	  rs("FileUrl")=trim(Request.Form("FileUrl"))
	  rs("ContentCh")=Request.Form("ContentCh")
	  rs("ContentEn")=Request.Form("ContentEn")
	  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("AddTime")=now()
	  rs("UpdateTime")=now()
	  rs.update
	  rs.close
	  set rs=Nothing
	  set rs=server.createobject("adodb.recordset")
	  sql="select top 1 ID from LiangJingCMS_Download 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/",""&DownNameDiy&""&Separated&""&ID&"."&HTMLName&"","DownView.asp","ID=",ID,"","")
	  call htmll("/EN/","/EN/",""&DownNameDiy&""&Separated&""&ID&"."&HTMLName&"","DownView.asp","ID=",ID,"","")
	  End If
	end if
	if Result="Modify" then
      sql="select * from LiangJingCMS_Download where ID="&ID
      rs.open sql,conn,1,3
      rs("DownNameCh")=trim(Request.Form("DownNameCh"))
      rs("DownNameEn")=trim(Request.Form("DownNameEn"))
	  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
	  if Request.Form("SortID")<>"" and Request.Form("SortPath")<>"" then
	    rs("SortID")=Request.Form("SortID")
		rs("SortPath")=Request.Form("SortPath")
	  else
        response.write ("<script language=javascript> alert('请选择所属分类!');history.back(-1);</script>")
        response.end
	  end if
	  if Request.Form("CommendFlag")=1 then
        rs("CommendFlag")=Request.Form("CommendFlag")
	  else
        rs("CommendFlag")=0
	  end if
      GroupIdName=split(Request.Form("GroupID"),"┎╂┚")
	  rs("GroupID")=GroupIdName(0)
	  rs("Exclusive")=trim(Request.Form("Exclusive"))
	  rs("FileSize")=trim(Request.Form("FileSize"))
	  rs("FileUrl")=trim(Request.Form("FileUrl"))
	  rs("ContentCh")=Request.Form("ContentCh")
	  rs("ContentEn")=Request.Form("ContentEn")
	  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("UpdateTime")=now()
	  rs.update
	  rs.close
	  set rs=Nothing
	  if ISHTML = 1 then
	  call htmll("/CH/","/CH/",""&DownNameDiy&""&Separated&""&ID&"."&HTMLName&"","DownView.asp","ID=",ID,"","")
	  call htmll("/EN/","/EN/",""&DownNameDiy&""&Separated&""&ID&"."&HTMLName&"","DownView.asp","ID=",ID,"","")
	  End If
	end if
    if ISHTML = 1 then
    response.write "<script language='javascript'>alert('设置成功,相关静态页面已更新!');location.replace('DownList.asp');</script>"
	Else
	response.write "<script language='javascript'>alert('设置成功!');location.replace('DownList.asp');</script>"
	End If
  else
	if Result="Modify" then
      set rs = server.createobject("adodb.recordset")
      sql="select * from LiangJingCMS_Download where ID="& ID
      rs.open sql,conn,1,1
      if rs.bof and rs.eof then
        response.write ("<center>数据库记录读取错误!</center>")
        response.end
      end if
	  DownNameCh=rs("DownNameCh")
	  DownNameEn=rs("DownNameEn")
	  ViewFlagCh=rs("ViewFlagCh")
	  ViewFlagEn=rs("ViewFlagEn")
      SortNameCH=SortText(rs("SortID"))
	  SortID=rs("SortID")
	  SortPath=rs("SortPath")
	  CommendFlag=rs("CommendFlag")
	  GroupID=rs("GroupID")
	  Exclusive=rs("Exclusive")
	  FileSize=rs("FileSize")
	  FileUrl=rs("FileUrl")
      ContentCh=rs("ContentCh")
      ContentEn=rs("ContentEn")
	  SeoKeywordsCH=rs("SeoKeywordsCH")
	  SeoDescriptionCH=rs("SeoDescriptionCH")
	  SeoKeywordsEN=rs("SeoKeywordsEN")
	  SeoDescriptionEN=rs("SeoDescriptionEN")
	  rs.close
      set rs=nothing
    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_DownSort where ID="&ID
  rs.open sql,conn,1,1
  SortText=rs("SortNameCH")
  rs.close
  set rs=nothing
End Function
%>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?