<% 'update by quzhonghua 2010.3.10 if Instr(session("AdminPurview"),"|8,")=0 then response.write ("

您没有管理该模块的权限!
") response.end end if dim Result Result=request.QueryString("Result") dim ID,NewsNameCh,NewsNameEn,ViewFlagCh,ViewFlagEn,SortNameCh,SortID,SortPath,ParentID dim GroupID,GroupIdName,Exclusive,NoticeFlag,SourceCh,SourceEn,ContentCh,ContentEn,SeoKeywordsCH,SeoKeywordsEN,SeoDescriptionCH,SeoDescriptionEN ID=request.QueryString("ID") call NewsEdit() call AdminSiteInfo %>
日程检索及分类查看:添加,修改,删除日程信息
添加日程信息 | 查看所有日程信息 | 添加日程类别

【<%If Result = "Add" then%>添加<%ElseIf Result = "Modify" then%>修改<%End If%>日程】
标    题: *
日程类别: 选择类别 *
内   容: <% Dim oFCKeditor Set oFCKeditor = New FCKeditor oFCKeditor.BasePath = "fckeditor/" oFCKeditor.ToolbarSet = "Default" oFCKeditor.Width = "100%" oFCKeditor.Height = "400" oFCKeditor.Value = ContentCH oFCKeditor.Create "ContentCH" %>
<% sub NewsEdit() dim Action,rsRepeat,rs,sql Action=request.QueryString("Action") if Action="SaveEdit" then set rs = server.createobject("adodb.recordset") if len(trim(request.Form("NewsNameCH")))<1 then response.write ("") response.end end if if Result="Add" then sql="select * from News" rs.open sql,conn,1,3 parentid=trim(request.Form("parentid")) set rst=server.CreateObject("adodb.recordset") sqlt="select SortID,ParentID,ContentCH from News where sortID="&parentid&"" rst.open sqlt,conn,1,1 if rst.eof and parentid<>0 then response.Write("") response.End() end if rs.addnew rs("NewsNameCh")=trim(Request.Form("NewsNameCh")) rs("NewsNameEn")=trim(Request.Form("NewsNameEn")) 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")="" and request.Form("ParentID")="" then response.write ("") response.end else rs("SortID")=Request.Form("SortID") rs("SortPath")=Request.Form("SortPath") rs("ParentID")=request.Form("ParentID") end if rs("SourceCh")=trim(Request.Form("SourceCh")) rs("SourceEn")=trim(Request.Form("SourceEn")) rs("ContentCh")=trim(Request.Form("ContentCh")) rs("ContentEn")=trim(Request.Form("ContentEn")) if Request.Form("NoticeFlag")=1 then rs("NoticeFlag")=Request.Form("NoticeFlag") else rs("NoticeFlag")=0 end if GroupIdName=split(Request.Form("GroupID"),"┎╂┚") rs("Exclusive")=trim(Request.Form("Exclusive")) rs("ContentCH")=trim(Request.Form("ContentCH")) 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 News 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/",""&NewName&""&Separated&""&ID&"."&HTMLName&"","NewsView.asp","ID=",ID,"","") call htmll("/EN/","/EN/",""&NewName&""&Separated&""&ID&"."&HTMLName&"","NewsView.asp","ID=",ID,"","") End If end if if Result="Modify" then sql="select * from News where ID="&ID rs.open sql,conn,1,3 rs("NewsNameCh")=trim(Request.Form("NewsNameCh")) rs("NewsNameEn")=trim(Request.Form("NewsNameEn")) 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")<>"" and request.Form("ParentID")<>"" then rs("SortID")=Request.Form("SortID") rs("SortPath")=Request.Form("SortPath") rs("ParentID")=request.Form("ParentID") else response.write ("") response.end end if rs("SourceCh")=trim(Request.Form("SourceCh")) rs("SourceEn")=trim(Request.Form("SourceEn")) if Request.Form("NoticeFlag")=1 then rs("NoticeFlag")=Request.Form("NoticeFlag") else rs("NoticeFlag")=0 end if GroupIdName=split(Request.Form("GroupID"),"┎╂┚") rs("Exclusive")=trim(Request.Form("Exclusive")) rs("ContentCh")=trim(Request.Form("ContentCh")) rs("ContentEn")=trim(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/",""&NewName&""&Separated&""&ID&"."&HTMLName&"","NewsView.asp","ID=",ID,"","") call htmll("/EN/","/EN/",""&NewName&""&Separated&""&ID&"."&HTMLName&"","NewsView.asp","ID=",ID,"","") End If end if if ISHTML = 1 then response.write "" Else response.write "" End If else if Result="Modify" then set rs = server.createobject("adodb.recordset") sql="select * from News where ID="& ID rs.open sql,conn,1,1 if rs.bof and rs.eof then response.write ("
数据库记录读取错误!
") response.end end if NewsNameCh=rs("NewsNameCh") NewsNameEn=rs("NewsNameEn") ViewFlagCh=rs("ViewFlagCh") ViewFlagEn=rs("ViewFlagEn") SortNameCh=SortText(rs("SortID")) SortID=rs("SortID") SortPath=rs("SortPath") ParentID=rs("ParentID") SourceCh=rs("SourceCh") SourceEn=rs("SourceEn") NoticeFlag=rs("NoticeFlag") GroupID=rs("GroupID") Exclusive=rs("Exclusive") 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 MemGroup" rs.open sql,conn,1,1 if rs.bof and rs.eof then response.write("未设组别") end if while not rs.eof response.write("") 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 NewsSort where ID="&ID rs.open sql,conn,1,1 SortText=rs("SortNameCH") rs.close set rs=nothing End Function %>