<!-- #include file="conn.asp" -->
<!-- #include file="cls_main.asp" -->
<!-- #include file="cls_ishion_showPage.asp" -->
<!-- #include file="cls_md5.asp" -->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>会员中心</title>
<link href="User_Style.css" rel="stylesheet" type="text/css">
</head>
<body>
<table width="800"  border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
  <tr>
    <td colspan="3"><img src="images/user_top.gif" width="800" height="13"></td>
  </tr>
  <tr>
    <td width="10">&nbsp;</td>
    <td width="190"><img src="images/User_Logo.gif" width="150" height="72"></td>
    <td width="600" align="right"><table  border="0" cellpadding="0" cellspacing="1">
        <tr>
          <td>·<a href="default.html">站点首页</a> ·<a href="downnew/0_1.html">最近更新</a> ·<a href="downtop/1_1.html">下载排行</a> </td>
          <td>·<a href="UserLogin.asp?action=logout">退出登录</a></td>
          <td width="10">&nbsp;</td>
        </tr>
      </table>
        <table  border="0" cellpadding="0" cellspacing="0">
          <tr>
            <td height="52" align="center" background="images/user_bg.gif"><img src="images/user_bg1.gif" width="8" height="52" align="absmiddle">&nbsp;<a href="User_Index.asp">会员中心</a> <img src="images/bg_dot1.gif" width="3" height="25" align="absmiddle"> <a href="User_Down_Upload.asp">上传软件</a> <img src="images/bg_dot1.gif" width="3" height="25" align="absmiddle"> <a href="User_Down_Resource.asp">添加软件</a> <img src="images/bg_dot1.gif" width="3" height="25" align="absmiddle"> <a href="User_Down_Reslist.asp">软件管理</a> <img src="images/bg_dot1.gif" width="3" height="25" align="absmiddle"> <a href="User_Cms_Resource.asp">添加文章</a> <img src="images/bg_dot1.gif" width="3" height="25" align="absmiddle"> <a href="User_Cms_Reslist.asp">文章管理</a> <img src="images/bg_dot1.gif" width="3" height="25" align="absmiddle"> <a href="User_Modfiy.asp">资料修改</a> <img src="images/bg_dot1.gif" width="3" height="25" align="absmiddle"> <a href="User_BuyPoints.asp">帐号充值</a> <img src="images/bg_dot1.gif" width="3" height="25" align="absmiddle"> <a href="User_List.asp">会员列表</a>&nbsp;<img src="images/user_bg2.gif" width="10" height="52" align="absmiddle"></td>
          </tr>
      </table></td>
  </tr>
</table>
<table width="800" border="0" align="center" cellpadding="5" cellspacing="0" bgcolor="#FFFFFF">
  <tr>
    <td height="400" valign="top">
<% dim obj
set obj = New User_Cms_Resource
	obj.AspInit()
set obj = nothing %>
	</td>
  </tr>
</table>
<table width="800" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td><img src="images/user_ti.gif" width="800"></td>
  </tr>
</table>
</body>
</html>
<%
Class User_Cms_Resource

	Private isEdit, ishion
	Private Sub Class_Initialize()
		Set ishion = New Cls_Main
	End Sub
	Private Sub Class_Terminate()
		Set ishion = Nothing
	End Sub
	Public Sub AspInit()
		
		isEdit = False
			Call ishion.LoadSetting
			If ishion.MemberUserName = "" Then
				ishion.strMsg = "<li>非法操作，您没有登录系统，<a href=""UserLogin.asp"">点击此处进入登录界面</a>。"
				Call ishion.SystemMsg
			Else
				Call Main
			End If
	
	End Sub

	Private Sub Main()
		Call ishion.LoadSetting
		Select Case Request("action")
		Case "add"
			Call SaveAdd
		Case "modify"
			Call SaveModify
		Case "edit"
			isEdit = True
			Call myform
		Case Else
			Call myform
		End Select
	End Sub
	
	Private Function myPermission()
		myPermission = False
		If ishion.checkPermission(ishion.adminName, "21") Then myPermission = True: Exit Function
		If ishion.checkPermission(ishion.adminName, "22") Then myPermission = True: Exit Function
		'If ishion.checkPermission(ishion.adminName,"10") Then myPermission = False
	End Function
	
	Private Sub SaveModify()
		If ishion.ChkPost = False Then
			ishion.strMsg = "非法操作，不要从外部提交数据。"
			Call ishion.SystemMsg
			Exit Sub
		End If
		
		If Not IsObject(Conn) Then ConnectionDatabase
		Dim Rs, sql, splCatalog, y_splCatalog, sID, sContent, i, sKeys
		
		Set Rs = Server.CreateObject("adodb.recordset")
		sql = "Select * from ishion_Cms_Resource where UserName='" & ishion.MemberUserName & "' and ID=" & CLng(Request.Form("ID"))
		Rs.open sql, Conn, 1, 3
		If Rs.EOF And Rs.BOF Then
			ishion.strMsg = "<li>您没有权限更新其他会员添加的资源。"
			Call ishion.SystemMsg
			Rs.Close
			Set Rs = Nothing
			Exit Sub
		End If
		If Request.Form("dTitle") = "" Then
			Rs("dTitle") = ishion.cutStr(Request.Form("Title"), 50)
		Else
			Rs("dTitle") = Trim(Request.Form("dTitle"))
		End If
		Rs("Title") = Trim(Request.Form("Title"))
		Rs("sTitle") = Trim(Request.Form("sTitle"))
		If Request.Form("isComment") = "1" Then
			Rs("isComment") = 1
		Else
			Rs("isComment") = 0
		End If
		Rs("Keys") = Trim(Request.Form("Keys"))
		'0=RootID;1=CatalogID;2=Depth;3=CatalogName
		splCatalog = Split(Trim(Request.Form("strCatalog")), ",")
		Rs("RootID") = splCatalog(0)
		Rs("CatalogID") = splCatalog(1)
		Rs("CatalogName") = splCatalog(3)
		Rs("Depth") = splCatalog(2)
		Rs("SpecialID") = Trim(Request.Form("SpecialID"))
		Rs("Writer") = Trim(Request.Form("Writer"))
		Rs("nFrom") = Trim(Request.Form("nFrom")) & "|" & Trim(Request.Form("nFromUrl"))
		If Trim(Request.Form("UseUrl")) = "Yes" Then Rs("RedirectUrl") = Trim(Request.Form("RedirectUrl"))
		For i = 1 To Request("content1").Count
			sContent = sContent & Request("content1")(i)
		Next
		'sContent = Request.Form("content")
		'Response.Write(sContent)
		Rs("Content") = sContent
		Rs("Excerpt") = ishion.cutStr(ishion.GetTextFromHtml(sContent), 250)
		
		Rs("IndexKeys") = ishion.GetSpellChar(Trim(Request.Form("Title")))
		Rs("md5") = MD5(Trim(Request.Form("Title")), 32)
		Rs("FontColor") = Trim(Request.Form("FontColor"))
		Rs("FontType") = Trim(Request.Form("FontType"))
		Rs("SmallImg") = Trim(Request.Form("SmallImg"))
		Rs("accessoryURL") = Trim(Request.Form("accessoryURL"))
		If Request.Form("isHot") = 1 Then
			Rs("isHot") = 1
		Else
			Rs("isHot") = 0
		End If
		If Request.Form("isTop") = 1 Then
			Rs("isTop") = 1
		Else
			Rs("isTop") = 0
		End If
		If Request.Form("isBest") = 1 Then
			Rs("isBest") = 1
		Else
			Rs("isBest") = 0
		End If
		If Request.Form("isPic") = 1 Then
			Rs("isPic") = 1
		Else
			Rs("isPic") = 0
		End If
		Rs("Hits") = 0
		If Trim(Request.Form("updateTime")) = "yes" Then Rs("DateAndTime") = Trim(Request.Form("DateAndTime"))
		sKeys = Trim(Request.Form("Keys"))
		Rs("MutualityDown") = ishion.MutualityDownRes(sKeys, 10, 0)
		Rs("MutualityCms") = ishion.MutualityCmsRes(sKeys, 10, CLng(Request.Form("ID")))
		Rs("PaginationType") = Request.Form("PaginationType")
		If CInt(Request.Form("PaginationType")) = 1 Then
			Rs("MaxCharPerPage") = Trim(Request.Form("MaxCharPerPage"))
		Else
			Rs("MaxCharPerPage") = 0
		End If
		Rs("isAuditing") = 1
		Rs.Update
		Rs.Close
		sID = Trim(Request.Form("ID"))
	
		Set Rs = Nothing
		
		'0=RootID;1=CatalogID;2=Depth;3=CatalogName
		y_splCatalog = Split(Trim(Request.Form("y_catalog")), ",")
		
		If splCatalog(1) <> y_splCatalog(1) Then
		
		'更新原分类的资源统计
		ishion.Execute ("update ishion_Cms_Catalog set isUpdate=1,ResNum=ResNum-1 where CatalogId=" & y_splCatalog(1))
		'更新原同根分类的父级资源数统计 '0=RootID;1=CatalogID;2=Depth;3=CatalogName
		ishion.Execute ("update ishion_Cms_Catalog set isUpdate=1,ResNum=ResNum-1 where RootId=" & y_splCatalog(0) & " and Depth>" & y_splCatalog(2) & " and isShowAllRes=1")
		
		
		'更新本分类的资源统计
		ishion.Execute ("update ishion_Cms_Catalog set isUpdate=1,ResNum=ResNum+1 where CatalogId=" & splCatalog(1))
		'更新同根分类的父级资源数统计 '0=RootID;1=CatalogID;2=Depth;3=CatalogName
		ishion.Execute ("update ishion_Cms_Catalog set isUpdate=1,ResNum=ResNum+1 where RootId=" & splCatalog(0) & " and Depth>" & splCatalog(2) & " and isShowAllRes=1")
		
		End If
		
		ishion.strMsg = "<li>修改文章操作成功，可以继续以下操作。" & _
		"<li>操作一：<a href=""?s="">继续添加新文章</a>" & _
		"<li>操作二：<a href=""?catalogID=" & splCatalog(1) & """>继续在分类[" & splCatalog(3) & "]中添加新文章</a>" & _
		"<li>操作三：<a href=""?action=edit&id=" & sID & """>再次修改编辑软件[" & Trim(Request.Form("Title")) & "]的信息。</li>"
		Call ishion.SystemMsg
	End Sub
	Private Sub SaveAdd()
		If ishion.ChkPost = False Then
			ishion.strMsg = "非法操作，不要从外部提交数据。"
			Call ishion.SystemMsg
			Exit Sub
		End If
		Dim Rs, sql, splCatalog, sID, sContent, i, sKeys, ResNum
		Set Rs = ishion.Execute("select top 1 ID from ishion_Cms_Resource")
		If Rs.EOF And Rs.BOF Then
			ResNum = 0
		Else
			ResNum = CLng(ishion.Execute("select max(id) from ishion_Cms_Resource")(0))
		End If
		Set Rs = Nothing
		If ishion.F469e80d32(1) <> "1" Then
			If ResNum > 2000 Then
				ishion.strMsg = "未注册版本最多资源数为2000个。"
				Call ishion.SystemMsg
				Exit Sub
			End If
		End If
		
		If Not IsObject(Conn) Then Call ConnectionDatabase
	
		Set Rs = Server.CreateObject("adodb.recordset")
		sql = "select * from ishion_Cms_Resource where (ID is null)"
		Rs.open sql, Conn, 1, 3
		Rs.AddNew
		If Request.Form("dTitle") = "" Then
			Rs("dTitle") = ishion.cutStr(Request.Form("Title"), 50)
		Else
			Rs("dTitle") = Trim(Request.Form("dTitle"))
		End If
		Rs("Title") = Trim(Request.Form("Title"))
		Rs("sTitle") = Trim(Request.Form("sTitle"))
		If Request.Form("isComment") = "1" Then
			Rs("isComment") = 1
		Else
			Rs("isComment") = 0
		End If
		Rs("Keys") = Trim(Request.Form("Keys"))
		'0=RootID;1=CatalogID;2=Depth;3=CatalogName
		splCatalog = Split(Trim(Request.Form("strCatalog")), ",")
		Rs("RootID") = splCatalog(0)
		Rs("CatalogID") = splCatalog(1)
		Rs("CatalogName") = splCatalog(3)
		Rs("Depth") = splCatalog(2)
		Rs("SpecialID") = Trim(Request.Form("SpecialID"))
		Rs("Writer") = Trim(Request.Form("Writer"))
		Rs("nFrom") = Trim(Request.Form("nFrom")) & "|" & Trim(Request.Form("nFromUrl"))
		If Trim(Request.Form("UseUrl")) = "Yes" Then Rs("RedirectUrl") = Trim(Request.Form("RedirectUrl"))
		For i = 1 To Request("content1").Count
			sContent = sContent & Request("content1")(i)
		Next
		'sContent = Request.Form("content")
		'Response.Write(sContent)
		Rs("Content") = sContent
		Rs("Excerpt") = ishion.cutStr(ishion.GetTextFromHtml(sContent), 250)
		
		Rs("IndexKeys") = ishion.GetSpellChar(Trim(Request.Form("Title")))
		Rs("md5") = MD5(Trim(Request.Form("Title")), 32)
		Rs("FontColor") = Trim(Request.Form("FontColor"))
		Rs("FontType") = Trim(Request.Form("FontType"))
		Rs("SmallImg") = Trim(Request.Form("SmallImg"))
		Rs("accessoryURL") = Trim(Request.Form("accessoryURL"))
		If Request.Form("isHot") = 1 Then
			Rs("isHot") = 1
		Else
			Rs("isHot") = 0
		End If
		If Request.Form("isTop") = 1 Then
			Rs("isTop") = 1
		Else
			Rs("isTop") = 0
		End If
		If Request.Form("isBest") = 1 Then
			Rs("isBest") = 1
		Else
			Rs("isBest") = 0
		End If
		If Request.Form("isPic") = 1 Then
			Rs("isPic") = 1
		Else
			Rs("isPic") = 0
		End If
		Rs("Hits") = 0
		Rs("DateAndTime") = Trim(Request.Form("DateAndTime"))
		sKeys = Trim(Request.Form("Keys"))
		Rs("MutualityDown") = ishion.MutualityDownRes(sKeys, 10, 0)
		Rs("MutualityCms") = ishion.MutualityCmsRes(sKeys, 10,ResNum)
		Rs("PaginationType") = Request.Form("PaginationType")
		If CInt(Request.Form("PaginationType")) = 1 Then
			Rs("MaxCharPerPage") = Trim(Request.Form("MaxCharPerPage"))
		Else
			Rs("MaxCharPerPage") = 0
		End If
		Rs("isAuditing") = 1
		Rs("UserName") = ishion.adminName
		Rs.Update
		sID = ishion.Execute("select max(id) from ishion_Cms_Resource")(0)
		Rs.Close
		
		Set Rs = Nothing
		
		'更新本分类的资源统计
		ishion.Execute ("update ishion_Cms_Catalog set isUpdate=1,ResNum=ResNum+1 where CatalogId=" & splCatalog(1))
		'更新同根分类的父级资源数统计 '0=RootID;1=CatalogID;2=Depth;3=CatalogName
		ishion.Execute ("update ishion_Cms_Catalog set isUpdate=1,ResNum=ResNum+1 where RootId=" & splCatalog(0) & " and Depth>" & splCatalog(2) & " and isShowAllRes=1")
		
		ishion.strMsg = "<li>添加文章操作成功，可以继续以下操作。" & _
		"<li>操作一：<a href=""?s="">继续添加新文章</a>" & _
		"<li>操作二：<a href=""?catalogID=" & splCatalog(1) & """>继续在分类[" & splCatalog(3) & "]中添加新文章</a>" & _
		"<li>操作三：<a href=""?action=edit&id=" & sID & """>修改编辑文章[" & Trim(Request.Form("Title")) & "]的信息。</li>"
		Call ishion.SystemMsg
	End Sub
	Private Sub myform()
		Dim eRs, sTitle, i, sql
		If isEdit Then
			Set eRs = ishion.Execute("select * from ishion_Cms_Resource where UserName='" & ishion.MemberUserName & "' and ID=" & CLng(Request("ID")))
			sTitle = "修改文章"
			If eRs.EOF And eRs.BOF Then
				ishion.strMsg = "<li>您没有权限更新其他会员添加的资源。"
				Call ishion.SystemMsg
				Set eRs = Nothing
				Exit Sub
			End If
		
		Else
			sTitle = "添加文章"
		End If
		'ishion.LoadSetting()
		
		Response.Write "<table width=""100%"" border=""0"" align=""center"" cellpadding=""3"" cellspacing=""1"">" & vbCrLf
		Response.Write "<tr><td align=""center"" background=""images/menubg.gif"" colspan=""2"">" & sTitle & "</td></tr>"
		Response.Write "     <COLGROUP>" & vbCrLf
		Response.Write "    <COL width=""65"">" & vbCrLf
		Response.Write "    <COL width=""*"">" & vbCrLf
		Response.Write "<SCRIPT LANGUAGE=javascript>" & vbCrLf
		Response.Write "function SelectColor(){" & vbCrLf
		Response.Write "    var arr = showModalDialog(""eWebEditor/Dialog/selcolor.htm"", """", ""dialogWidth:20em; dialogHeight:16em; status:0;help=no"");" & vbCrLf
		Response.Write "    if (arr ==null){" & vbCrLf
		Response.Write "        myform.FontColor.value="""";" & vbCrLf
		Response.Write "        alert(""系统提示：当前没有选择颜色，系统将启用页面默认颜色，或重新选择！"");" & vbCrLf
		Response.Write "        myform.FontColor.focus();" & vbCrLf
		Response.Write "    }" & vbCrLf
		Response.Write "    if (arr !=null){" & vbCrLf
		Response.Write "        myform.FontColor.value=arr;" & vbCrLf
		Response.Write "        myform.FontColor.style.backgroundColor=arr;" & vbCrLf
		Response.Write "    }" & vbCrLf
		Response.Write "}" & vbCrLf
		Response.Write vbCrLf
		Response.Write "function SetSmallImg(){" & vbCrLf
		Response.Write "    var arr = showModalDialog(""eWebEditor/Upload_Images_Dialog.asp?style=s_ishioncn"", """", ""dialogWidth:26em; dialogHeight:10em; status:0;help=no"");" & vbCrLf
		Response.Write "    if (arr ==null){" & vbCrLf
		Response.Write "        myform.SmallImg.value="""";" & vbCrLf
		Response.Write "        alert(""系统提示：当前没有上传图片，资源缩略图为空，用户可以重新上传图片！"");" & vbCrLf
		Response.Write "        //myform.SmallImg.focus();" & vbCrLf
		Response.Write "    }" & vbCrLf
		Response.Write "    if (arr !=null){" & vbCrLf
		Response.Write "        myform.SmallImg.value=arr;" & vbCrLf
		Response.Write "    }" & vbCrLf
		Response.Write "}" & vbCrLf
		Response.Write vbCrLf
		Response.Write "function SetAccessory(){" & vbCrLf
		Response.Write "    var arr = showModalDialog(""eWebEditor/Upload_File_Dialog.asp?style=s_ishioncn"", """", ""dialogWidth:26em; dialogHeight:10em; status:0;help=no"");" & vbCrLf
		Response.Write "    if (arr ==null){" & vbCrLf
		Response.Write "        myform.accessoryURL.value="""";" & vbCrLf
		Response.Write "        alert(""系统提示：当前没有上传图片，界面预览图为空，用户可以重新上传图片！"");" & vbCrLf
		Response.Write "        //myform.PreviewImg.focus();" & vbCrLf
		Response.Write "    }" & vbCrLf
		Response.Write "    if (arr !=null){" & vbCrLf
		Response.Write "        myform.accessoryURL.value=arr;" & vbCrLf
		Response.Write "    }" & vbCrLf
		Response.Write "}" & vbCrLf
		Response.Write vbCrLf
		Response.Write "function sWriter(sName) { document.myform.Writer.value = sName }" & vbCrLf
		Response.Write "function nFrom(sName,sUrl) { document.myform.nFrom.value = sName;document.myform.nFromUrl.value = sUrl}" & vbCrLf
		Response.Write vbCrLf
		Response.Write "function rUseUrl(){" & vbCrLf
		Response.Write "  if(document.myform.UseUrl.checked==true){" & vbCrLf
		Response.Write "    document.myform.RedirectUrl.disabled=false;" & vbCrLf
		Response.Write "     ArticleContent.style.display='none';" & vbCrLf
		Response.Write "     editor.style.display='';" & vbCrLf
		Response.Write "  }" & vbCrLf
		Response.Write "  else{" & vbCrLf
		Response.Write "    document.myform.RedirectUrl.disabled=true;" & vbCrLf
		Response.Write "    ArticleContent.style.display='';" & vbCrLf
		Response.Write "    editor.style.display='none';" & vbCrLf
		Response.Write "  }" & vbCrLf
		Response.Write "}" & vbCrLf
		Response.Write vbCrLf
		Response.Write "function VF_myform(){" & vbCrLf
		Response.Write "    var theForm = document.myform;" & vbCrLf
		Response.Write "    var sFlg_strCatalog = false;" & vbCrLf
		Response.Write "    var errMsg = """";" & vbCrLf
		Response.Write "    var setfocus = """";" & vbCrLf
		Response.Write vbCrLf
		Response.Write "    for(var s0=0;s0<theForm['strCatalog'].length;s0++){if(theForm['strCatalog'].options[s0].selected){if(theForm['strCatalog'].options[s0].text==theForm['strCatalog'].options[0].text)sFlg_strCatalog=true;}}" & vbCrLf
		Response.Write "    " & vbCrLf
		Response.Write "    if (theForm['nFromUrl'].value == """"){" & vbCrLf
		Response.Write "        errMsg = ""请填写文章出处的网址！"";" & vbCrLf
		Response.Write "        setfocus = ""['nFromUrl']"";" & vbCrLf
		Response.Write "    }" & vbCrLf
		Response.Write "    if (theForm['nFrom'].value == """"){" & vbCrLf
		Response.Write "        errMsg = ""请填写文章的出处！"";" & vbCrLf
		Response.Write "        setfocus = ""['nFrom']"";" & vbCrLf
		Response.Write "    }" & vbCrLf
		Response.Write "    if (theForm['Writer'].value == """"){" & vbCrLf
		Response.Write "        errMsg = ""请填写文章的作者！"";" & vbCrLf
		Response.Write "        setfocus = ""['Writer']"";" & vbCrLf
		Response.Write "    }" & vbCrLf
		Response.Write "    if (theForm['Keys'].value == """"){" & vbCrLf
		Response.Write "        errMsg = ""请填写文章的关键字！"";" & vbCrLf
		Response.Write "        setfocus = ""['Keys']"";" & vbCrLf
		Response.Write "    }" & vbCrLf
		Response.Write "    if (theForm['Title'].value == """"){" & vbCrLf
		Response.Write "        errMsg = ""请填写文章的完整标题！"";" & vbCrLf
		Response.Write "        setfocus = ""['Title']"";" & vbCrLf
		Response.Write "    }" & vbCrLf
		Response.Write "    if (sFlg_strCatalog){" & vbCrLf
		Response.Write "        errMsg = ""请选择文章所属分类！"";" & vbCrLf
		Response.Write "        setfocus = ""['strCatalog']"";" & vbCrLf
		Response.Write "    }" & vbCrLf
		Response.Write "    if (errMsg != """"){" & vbCrLf
		Response.Write "        alert(errMsg);" & vbCrLf
		Response.Write "        eval(""theForm"" + setfocus + "".focus()"");" & vbCrLf
		Response.Write "        return (false);" & vbCrLf
		Response.Write "    }" & vbCrLf
		Response.Write "    if (document.myform.UseUrl.checked != true){" & vbCrLf
		Response.Write "        if (eWebEditor1.getHTML() == """") {" & vbCrLf
		Response.Write "                alert(""文章内容不能为空！"");" & vbCrLf
		Response.Write "                return (false);" & vbCrLf
		Response.Write "        }" & vbCrLf
		Response.Write "    }" & vbCrLf
		Response.Write "    if (document.myform.UseUrl.checked == true){" & vbCrLf
		Response.Write "        if (theForm['RedirectUrl'].value == """") {" & vbCrLf
		Response.Write "            alert(""转向链接不能为空！"");" & vbCrLf
		Response.Write "            theForm['RedirectUrl'].focus();" & vbCrLf
		Response.Write "            return (false);" & vbCrLf
		Response.Write "        }" & vbCrLf
		Response.Write "        else" & vbCrLf
		Response.Write "        theForm.submit();" & vbCrLf
		Response.Write "    }" & vbCrLf
		Response.Write vbCrLf
		Response.Write "    else" & vbCrLf
		Response.Write "    //theForm.content.value=eWebEditor1.getHTML();" & vbCrLf
		Response.Write "    theForm.submit();" & vbCrLf
		Response.Write "}" & vbCrLf
		Response.Write vbCrLf
		Response.Write "function submit_preview() {" & vbCrLf
		Response.Write "    document.myform.action.value=""Preview"";" & vbCrLf
		Response.Write "    document.myform.target=""_blank"";" & vbCrLf
		Response.Write "    VF_myform();" & vbCrLf
		Response.Write "}" & vbCrLf
		Response.Write "</script>" & vbCrLf
		Response.Write "<style type=""text/css"">" & vbCrLf
		Response.Write "label{cursor:hand;}" & vbCrLf
		Response.Write "</style>" & vbCrLf
		Response.Write "   <form action=""user_cms_resource.asp"" method=""post"" name=""myform"">" & vbCrLf
		Response.Write "        <input type=""Hidden"" name=""action"" value="""
		If isEdit Then
		Response.Write "modify"
		Else
		Response.Write "add"
		End If
		Response.Write """>"
		If isEdit Then
		Response.Write "<input type=""Hidden"" name=""ID"" value=""" & CLng(Request("ID")) & """>" & vbCrLf
		Response.Write "<input type=""Hidden"" name=""y_catalog"" value=""" & eRs("RootID") & "," & eRs("catalogID") & "," & eRs("Depth") & "," & eRs("catalogName") & ">" & vbCrLf
		End If
		Response.Write "          <tr class=""tdbg2"">" & vbCrLf
		Response.Write "            <td align=""right""><font color=red>所属分类：</font></td>" & vbCrLf
		Response.Write "            <td><select name=""strCatalog"" tabindex=""2"">" & vbCrLf
		Response.Write "                <option value="""">↓请选择栏目↓</option>" & vbCrLf
		If isEdit Then
			Response.Write ishion.GetCatalogSelect(eRs("catalogID"), "ishion_Cms_Catalog")
		Else
			If Request.QueryString("catalogID") <> "" Then
				Response.Write ishion.GetCatalogSelect(CLng(Request.QueryString("catalogID")), "ishion_Cms_Catalog")
			Else
				Response.Write ishion.GetCatalogSelect(0, "ishion_Cms_Catalog")
			End If
		End If
		Response.Write " </select> " & vbCrLf
		Response.Write "                所属专题：<select name=""SpecialID"">" & vbCrLf
		Response.Write "            <option value=""0"">不属于任何专题</option>" & vbCrLf
		Dim Rs
		Set Rs = ishion.Execute("select SpecialID,SpecialName from ishion_Cms_Special order by SpecialID desc")
		Do While Not Rs.EOF
			Response.Write ("<option value=""" & Rs(0) & """")
			If isEdit Then If Int(eRs("SpecialID")) = Int(Rs(0)) Then Response.Write (" selected")
			Response.Write (">" & Rs(1) & "</option>")
		Rs.MoveNext
		Loop
		Set Rs = Nothing
		Response.Write "</select>" & vbCrLf
		Response.Write "            </td>" & vbCrLf
		Response.Write "          </tr>" & vbCrLf
		Response.Write "          <tr class=""tdbg3"">" & vbCrLf
		Response.Write "            <td align=""right"">文章标题：</td>" & vbCrLf
		Response.Write "            <td>简短标题：<input type=""text"" name=""dTitle"" size=""45"" value="""
		If isEdit Then Response.Write Trim(eRs("dTitle"))
		Response.Write """ maxlength=""100"">" & vbCrLf
		Response.Write "              颜色：<input type=""text"" name=""FontColor"" id=""titlecolor"" size=""6"" onclick=""SelectColor();"" readonly "
		If isEdit Then Response.Write "value=""" & eRs("FontColor") & """ style=""background-color:" & eRs("FontColor") & """ "
		Response.Write "> <select name=""FontType"" id=""FontType"">" & vbCrLf
		Response.Write "                <option value=""0"">字形</option> " & vbCrLf
		If isEdit Then
		Response.Write "                <option value=""1"" "
		If eRs("FontType") = 1 Then Response.Write ("selected")
		Response.Write ">粗体</option>" & vbCrLf
		Response.Write "                <option value=""2"" "
		If eRs("FontType") = 2 Then Response.Write ("selected")
		Response.Write ">斜体</option>" & vbCrLf
		Response.Write "                <option value=""3"" "
		If eRs("FontType") = 3 Then Response.Write ("selected")
		Response.Write ">粗+斜</option> " & vbCrLf
		Else
		Response.Write "                <option value=""1"">粗体</option>" & vbCrLf
		Response.Write "                <option value=""2"">斜体</option>" & vbCrLf
		Response.Write "                <option value=""3"">粗+斜</option> " & vbCrLf
		End If
		Response.Write "                <option value=""0"">规则</option>" & vbCrLf
		Response.Write "              </select><br>" & vbCrLf
		Response.Write "              <font color=red>完整标题：</font><input type=""text"" name=""Title"" maxlength=""200"" size=""65"" value="""
		If isEdit Then Response.Write Trim(eRs("Title"))
		Response.Write """ tabindex=""1"">" & vbCrLf
		Response.Write "              <input type=""checkbox"" name=""isComment"" value=""1"" id=""isComment""><label for=""isComment"">标题右侧显示[评论]链接</label>" & vbCrLf
		Response.Write "              <br>" & vbCrLf
		Response.Write "              副 标 题：<input type=""text"" name=""sTitle"" maxlength=""100"" size=""65"" value="""
		If isEdit Then Response.Write Trim(eRs("sTitle"))
		Response.Write """></td>" & vbCrLf
		Response.Write "          </tr>" & vbCrLf
		Response.Write "          <tr class=""tdbg2""> " & vbCrLf
		Response.Write "            <td align=""right""><font color=red>关 键 字：</font></td>" & vbCrLf
		Response.Write "            <td><input type=""text"" name=""Keys"" size=""75"" maxlength=""100"" value="""
		If isEdit Then Response.Write Trim(eRs("Keys"))
		Response.Write """><br>" & vbCrLf
		Response.Write "            用来查找相关资源，可输入多个关键字，中间用<font color=red>“|”</font>分开。不能出现""""'*?,.()等字符。</td>" & vbCrLf
		Response.Write "          </tr>" & vbCrLf
		Response.Write "          <tr class=""tdbg3"">" & vbCrLf
		Response.Write "            <td align=""right""><font color=red>文章作者：</font></td>" & vbCrLf
		Response.Write "            <td><input type=""text"" name=""Writer"" size=""15"" maxlength=""50"" value="""
		If isEdit Then Response.Write Trim(eRs("Writer"))
		Response.Write """><=" & vbCrLf
		For i = 0 To UBound(Split(ishion.Setting(111), "|"))
			Response.Write ("[<a href=""javascript:sWriter('" & Split(ishion.Setting(111), "|")(i) & "')"">" & Split(ishion.Setting(111), "|")(i) & "</a>] ")
		Next
		Response.Write "</td>" & vbCrLf
		Response.Write "          </tr>" & vbCrLf
		Response.Write "          <tr class=""tdbg2""> " & vbCrLf
		Response.Write "            <td align=""right""><font color=red>文章出处：</font></td>" & vbCrLf
		Response.Write "            <td ><input type=""text"" name=""nFrom"" size=""15"" maxlength=""50"" value="""
		If isEdit Then Response.Write Split(eRs("nFrom"), "|")(0)
		Response.Write """><=" & vbCrLf
		For i = 0 To UBound(Split(ishion.Setting(112), "|"))
			Response.Write ("[<a href=""javascript:nFrom('" & Split(ishion.Setting(112), "|")(i) & "','" & Split(ishion.Setting(113), "|")(i) & "')"">" & Split(ishion.Setting(112), "|")(i) & "</a>] ")
		Next
		Response.Write " =><font color=red>网址：</font><input type=""text"" name=""nFromUrl"" size=""25"" maxlength=""50"" value="""
		If isEdit Then Response.Write Split(eRs("nFrom"), "|")(1)
		Response.Write """>" & vbCrLf
		Response.Write "            </td>" & vbCrLf
		Response.Write "          </tr>" & vbCrLf
		Response.Write "          <tr class=""tdbg3""> " & vbCrLf
		Response.Write "            <td align=""right""><font color=green>转向链接：</font></td>" & vbCrLf
		Response.Write "            <td><input type=""text"" name=""RedirectUrl"" size=""75"" maxlength=""150"" value="""
		If isEdit Then
		Response.Write Trim(eRs("RedirectUrl"))
		Else
		Response.Write ("http://")
		End If
		Response.Write """ disabled>" & vbCrLf
		Response.Write "            <input name=""UseUrl"" type=""checkbox"" id=""UseUrl"" value=""Yes"" onClick=""rUseUrl();""><label for=""UseUrl""><font color='#FF0000'>使用转向链接</font></label></td>" & vbCrLf
		Response.Write "          </tr>" & vbCrLf
		Response.Write "          <tr class=""tdbg2"" id=""ArticleContent"" style=""display:''""> " & vbCrLf
		Response.Write "            <td align=""right""><font color=red>文章内容：</font></td>" & vbCrLf
		Response.Write "            <td>" & vbCrLf
		Response.Write "            <TEXTAREA name=content id=content style=""display:none""></TEXTAREA>" & vbCrLf
		If isEdit Then
		Response.Write "<textarea name=""content1"" id=""content1"" style=""display:none"">" & eRs("Content") & "</textarea>"
		Else
		Response.Write "<INPUT type=""hidden"" name=""content1"" value=""""> " & vbCrLf
		End If
		Response.Write "<IFRAME ID=""eWebEditor1"" src=""ewebeditor/ewebeditor.asp?id=content1&style=s_ishioncn"" frameborder=""0"" scrolling=""no"" width=""650"" height=""450""></IFRAME>" & vbCrLf
		Response.Write "            </td>" & vbCrLf
		Response.Write "          </tr>" & vbCrLf
		Response.Write "          <tr class=""tdbg2"" id=""editor"" style=""display:'none'""> " & vbCrLf
		Response.Write "            <td align=""right"">&nbsp;</td>" & vbCrLf
		Response.Write "            <td height=""30"">&nbsp;</td>" & vbCrLf
		Response.Write "          </tr>" & vbCrLf
		Response.Write "          <tr class=""tdbg3""> " & vbCrLf
		Response.Write "            <td align=""right"">文章属性：</td>" & vbCrLf
		Response.Write "            <td >" & vbCrLf
		Response.Write "            <input name=""isHot"" type=""checkbox"" id=""isHot"" value=""1"" "
		If isEdit Then
			If eRs("isHot") = 1 Then Response.Write "checked"
		End If
		Response.Write "><label for=""isHot"">热点文章</label> " & vbCrLf
		Response.Write "              <input name=""isTop"" type=""checkbox"" id=""isTop"" value=""1"" "
		If isEdit Then
			If eRs("isTop") = 1 Then Response.Write "checked"
		End If
		Response.Write "><label for=""isTop"">固顶文章</label>" & vbCrLf
		Response.Write "            <input name=""isBest"" type=""checkbox"" id=""isBest"" value=""1"" "
		If isEdit Then
			If eRs("isBest") = 1 Then Response.Write "checked"
		End If
		Response.Write "><label for=""isBest"">推荐文章</label>" & vbCrLf
		Response.Write "            <input name=""isPic"" type=""checkbox"" id=""isPic"" value=""1"" "
		If isEdit Then
			If eRs("isPic") = 1 Then Response.Write "checked"
		End If
		Response.Write "><label for=""isPic"">图文内容</label>" & vbCrLf
		Response.Write "            </td>" & vbCrLf
		Response.Write "          </tr>" & vbCrLf
		Response.Write "          <tr class=""tdbg2""> " & vbCrLf
		Response.Write "            <td align=""right"">首页图片：</td>" & vbCrLf
		Response.Write "            <td> <input type=""text"" name=""SmallImg"" size=""45""  value="""
		If isEdit Then Response.Write Trim(eRs("SmallImg"))
		Response.Write """>" & vbCrLf
		Response.Write "            <input type=""button"" value=""设置"" onclick=""SetSmallImg();""> 用于在首页的图片文章处显示，建议大小为：135×120 px</td>" & vbCrLf
		Response.Write "          </tr>" & vbCrLf
		Response.Write "          <tr class=""tdbg3""> " & vbCrLf
		Response.Write "            <td align=""right"">内容分页：</td>" & vbCrLf
		Response.Write "            <td>" & vbCrLf
		If isEdit Then
			If eRs("PaginationType") = 0 Then
				Response.Write ("<input type=""radio"" name=""PaginationType"" value=""0"" checked>不分页" & vbCrLf)
			Else
				Response.Write ("<input type=""radio"" name=""PaginationType"" value=""0"">不分页" & vbCrLf)
			End If
			If eRs("PaginationType") = 1 Then
				Response.Write ("<input type=""radio"" name=""PaginationType"" value=""1"" checked>自动分页" & vbCrLf)
			Else
				Response.Write ("<input type=""radio"" name=""PaginationType"" value=""1"">自动分页" & vbCrLf)
			End If
			If eRs("PaginationType") = 2 Then
				Response.Write ("<input type=""radio"" name=""PaginationType"" value=""2"" checked>手动分页" & vbCrLf)
			Else
				Response.Write ("<input type=""radio"" name=""PaginationType"" value=""2"">手动分页" & vbCrLf)
			End If
		Else
			Response.Write ("<input type=""radio"" name=""PaginationType"" value=""0"" checked>不分页" & vbCrLf)
			Response.Write ("<input type=""radio"" name=""PaginationType"" value=""1"">自动分页" & vbCrLf)
			Response.Write ("<input type=""radio"" name=""PaginationType"" value=""2"">手动分页" & vbCrLf)
		End If
		Response.Write " &nbsp;&nbsp;<strong><font color=""#0000FF"">注：</font></strong><font color=""#0000FF"">手动分页符标记为<input name=""textfield"" type=""text"" value=""[NextPage]"" size=""10"" maxlength=""10"">，注意大小写</font></td>" & vbCrLf
		Response.Write "          </tr>" & vbCrLf
		Response.Write "          <tr class=""tdbg2""> " & vbCrLf
		Response.Write "            <td align=""right""></td>" & vbCrLf
		Response.Write "            <td>自动分页时的每页大约字符数（包含HTML标记）：<input name=""MaxCharPerPage"" type=""text"" id=""MaxCharPerPage"" value=""" & vbCrLf
		If isEdit Then
			Response.Write (eRs("MaxCharPerPage"))
		Else
			Response.Write ("3000")
		End If
		Response.Write """ size=""8"" maxlength=""8"">字</td>" & vbCrLf
		Response.Write "          </tr>" & vbCrLf
		Response.Write "          <tr class=""tdbg3""> " & vbCrLf
		Response.Write "            <td align=""right"">文章附件：</td>" & vbCrLf
		Response.Write "            <td><input type=""text"" name=""accessoryURL"" size=""45""  value="""
		If isEdit Then Response.Write Trim(eRs("accessoryURL"))
		Response.Write """>" & vbCrLf
		Response.Write "            <input type=""button"" value=""设置"" onclick=""SetAccessory();""></td>" & vbCrLf
		Response.Write "          </tr>" & vbCrLf
		Response.Write "          <tr class=""tdbg2""> " & vbCrLf
		Response.Write "            <td align=""right"">&nbsp;</td>" & vbCrLf
		Response.Write "            <td> <input type=""button"" name=""btnSubmit"" value="" 提 交 "" onclick=""VF_myform()"">" & vbCrLf
		Response.Write "                <input name=""Preview"" type=""button""  value="" 预 览 "" onClick=""submit_preview()"">" & vbCrLf
		If isEdit Then
			Response.Write ("<input name=""DateAndTime"" type=""text"" value=""" & eRs("DateAndTime") & """ size=""18"">")
			Response.Write "<input name=""updateTime"" type=""checkbox"" id=""updateTime"" value=""yes""><label for=""updateTime"">更新文章时间</label>"
			Set eRs = Nothing
		Else
			Response.Write ("<input name=""DateAndTime"" type=""text"" value=""" & Now() & """ size=""18"">")
		End If
		Response.Write "</td>" & vbCrLf
		Response.Write "          </tr>" & vbCrLf
		Response.Write "  </form>" & vbCrLf
		Response.Write "        </table>" & vbCrLf
	End Sub

End Class %>

