⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 template.asp

📁 公司企业网站管理系统全站源码,用于企业内部对网站的管理
💻 ASP
📖 第 1 页 / 共 5 页
字号:
<!--#include file="../conn.asp"-->
<!--#include file="inc/const.asp"-->
<%
Head()
Dim admin_flag
admin_flag=",22,"
CheckAdmin(admin_flag)

Dim action,SkinID,StyleID
StyleID=request("StyleID")
action=Request("action")
If Application(Dvbbs.CacheName &"_style").documentElement.selectSingleNode("style[@id='"& StyleID &"']") Is Nothing Then
	If Not Application(Dvbbs.CacheName &"_style").documentElement.selectSingleNode("style/@id") Is Nothing Then
		StyleID=Application(Dvbbs.CacheName &"_style").documentElement.selectSingleNode("style/@id").text 
	Else
		Response.Write "模板数据无法提取,请检查或重新导入"
		Response.End
	End If
End If
Response.Write "<table border=""0"" cellspacing=""1"" cellpadding=""3"" align=""center"" width=""100%"">"
Response.Write "<tr>"
Response.Write "<th width=""100%"" style=""text-align:center;"" colspan=""2"">论坛模板管理"
Response.Write "</th>"
Response.Write "</tr>"
Response.Write "<tr>"
Response.Write "<td class=""td2"" colspan=""2"">"
Response.Write "<p><b>注意</b>:<br />①在这里,您可以新建和修改模板,可以编辑论坛语言包和风格,可以新建模板页面,操作时请按照相关页面提示完整填写表单信息。<br />②论坛当前正在使用的默认模板不能删除<br />③如果修改分模板页面名称或删除分模板页面请在关闭论坛之后操作,否则可能会影响论坛访问。"
Response.Write "</td>"
Response.Write "</tr>"
Response.Write "<tr>"
Response.Write "<td class=""td2"" width=""20%"" height=""25"" align=""left"">"
Response.Write "<b>论坛模板操作选项</b></td>"
Response.Write "<td class=""td2"" width=""80%""><a href=""template.asp"">模板管理首页</a>"
Response.Write " | <a href=""http://bbs.dvbbs.net/loadtemplates.asp"" target = ""_blank"">获取官方模板数据</a></td>"
Response.Write "</tr>"
Response.Write "</table>"
Select Case action
	Case "edit"
		Call Edit() 
	Case "manage"
		If Request("mostyle")="编 辑" Then
			Main()
		ElseIf Request("mostyle") = "删 除" Then
			DelStyle()
		End If
	Case "saveedit"
		Call Saveedit()
	Case "addpage"
		addpage()
	Case "addstyle"
		addstyle()
	Case "Edit_Main"
		Edit_Main()
	Case "Save_Main"
		Save_Main()
	Case "rename"
		rename()
	Case "editcss"
		editcss()
	Case "savecss"
		savecss()
	Case "editmain"
		editmain()
	Case "savemain"
		Savemain() 
	Case "ghost"
		ghost()
	Case "delpage"
		delpage()
	Case "pagerename"
		pagerename()
	Case Else
		Main()
End Select

footer()
Sub Main()
	Response.Write "<p></p>"
	Response.Write "<table border=""0"" cellspacing=""1"" cellpadding=""3"" align=""center"" width=""100%"">"
	Response.Write "<tr>"
	Response.Write "<th width=""100%"" style=""text-align:center;"" colspan=""2"">当前论坛模板管理"
	Response.Write "</th>"
	Response.Write "</tr>"
	Response.Write "<tr>"
	Response.Write "<form method=post action=""?action=manage"">"
	Response.Write "<td class=""td2"" height=40 align=left>"
	Response.Write "请选择相关模板: "
	'利用系统缓存数据取得所有模板名称和ID
	Dim Templateslist,rs,i
	Response.Write "<select name=""StyleID"" size=""1"">"
	For Each Templateslist in Application(Dvbbs.CacheName &"_style").documentElement.selectNodes("style")
		Response.Write "<option value="""& Templateslist.selectSingleNode("@id").text &""""
		If CLng(Templateslist.selectSingleNode("@id").text) = CLng(StyleID) Then 
			Response.Write " selected"
		End If 
		Response.Write ">"&Templateslist.selectSingleNode("@stylename").text &"</option>"
	Next 
	Response.Write "</select>"
	Response.Write "&nbsp;&nbsp;"
	Response.Write "<input type=submit class=""button"" value=""编 辑"" name=""mostyle"">&nbsp;&nbsp;&nbsp;"
	Response.Write "<input type=submit class=""button"" value=""删 除"" name=""mostyle"">"
	Response.Write "<br /><br /><b>说明:</b>删除操作将删除该模板所有数据,慎用。"
	Response.Write "</td>"
	Response.Write "</FORM>"
	Response.Write "<FORM METHOD=POST ACTION=""?action=addpage"">"
	Response.Write "<td class=""td2"" height=25 align=left>"
	Response.Write "新建分模板页面:&nbsp;"
	Response.Write "<input type=text size=25 name=""StylePageName"">&nbsp;&nbsp;"
	Response.Write "<input type=submit class=""button"" name=submit value=""添 加""> "
	Response.Write "</td>"
	Response.Write "</FORM>"
	Response.Write "</tr>"
	Response.Write "<tr>"
	Response.Write "<td class=""td2"" height=25 align=right colspan=2>"
	Response.Write "↑请输入ASP页面名(不要包含后缀),新建立的页面模板既是该页面的模板资源(包括图片、语言、风格)↑"
	Response.Write "</td></tr>"
	Response.Write "<tr>"
	Response.Write "<th style=""text-align:center;"" colspan=2>"
	Response.Write Application(Dvbbs.CacheName &"_style").documentElement.selectSingleNode("style[@id='"& StyleID &"']/@stylename").text &"--模板资源管理</th></tr><tr><td height=25 class=""bodytitle"" colspan=2>"
	Response.Write "通常来说,分页面模板就是论坛中每个页面的风格模板,括号中是字段名,字段的命名规则为:Page_页面名(不要后缀)"
	Response.Write "</td>"
	Response.Write "</tr>"
	Set Rs=Dvbbs.Execute("Select top 1 * From Dv_Style ")
	For i= 1 to Rs.Fields.Count-1
		If i = 12 Then
			Response.Write "<tr onmouseover=""this.style.backgroundColor='#B3CFEE';this.style.color='red'"" onmouseout=""this.style.backgroundColor='';this.style.color=''"">"
			Response.Write "<td height=""25"">"
			Response.Write "<li>"
			Response.Write "分页面模板<a href=#>(page_admin)</a>&nbsp;&nbsp;</td><td height=""25"" align=""left"">"
			Response.Write "编辑该模块:"
			Response.Write "<a href=""?action=Edit_Main&stype=1&page="
			Response.Write "page_admin"
			Response.Write "&StyleID="
			Response.Write StyleID
			Response.Write """>语言包</a> <a href=""?action=Edit_Main&stype=1&page="
			Response.Write "page_admin"
			Response.Write "&StyleID="
			Response.Write StyleID
			Response.Write "#new""><font color=blue>新</font></a> | <a href=""?action=Edit_Main&stype=2&page="
			Response.Write "page_admin"
			Response.Write "&StyleID="
			Response.Write StyleID
			Response.Write """>图片</a> <a href=""?action=Edit_Main&stype=2&page="
			Response.Write "page_admin"
			Response.Write "&StyleID="
			Response.Write StyleID
			Response.Write "#new"""
			Response.Write "><font color=blue>新</font></a> | <a href=""?action=Edit_Main&stype=3&page="
			Response.Write "page_admin"
			Response.Write "&StyleID="
			Response.Write StyleID
			Response.Write """>界面风格</a> <a href=""?action=Edit_Main&stype=3&page="
			Response.Write "page_admin"
			Response.Write "&StyleID="
			Response.Write StyleID
			Response.Write "#new""><font color=blue>新</font></a>"
			Response.Write "</td>"
			Response.Write "</tr>"
		End If
		If i> 20 Then
			Response.Write "<form method=post action=""?action=pagerename"">"
		End If
		Response.Write "<tr onmouseover=""this.style.backgroundColor='#B3CFEE';this.style.color='red'"" onmouseout=""this.style.backgroundColor='';this.style.color=''"">"
		Response.Write "<td height=25 align=left>"
		Response.Write "<li>"
		Select Case i
			Case 1
				Response.Write "当前模板CSS设置<a href=#>"
			Case 2
				Response.Write "当前模板主模块<a href=#>"
			Case Else 
				Response.Write "分页面模板<a href=#>"
		End Select
		
		If i> 20 Then
			
			Response.Write "</a>&nbsp;&nbsp;page_"
			Response.Write "<input type=text size=15 name=newpagename value="&Replace(Rs(i).Name,"page_","")&">&nbsp;&nbsp;"
			Response.Write "<input type=hidden size=15 name=oldpagename value="&Replace(Rs(i).Name,"page_","")&">"		
			Response.Write "<input type=submit class=""button"" value=""分模板页面改名"" name=""mo"" title=""修改名称后提交"">"
		Else
			Response.Write "("&Rs(i).Name&")</a>&nbsp;&nbsp;"		
		End If		
		Response.Write "</td>"
		Response.Write "<td height=""25"" align=""left"">"
		If i=3 Then
			Response.Write "编辑该模块:"
			Response.Write "<a href=""bbsface.asp?Stype=1&page="
			Response.Write Rs(i).Name
			Response.Write "&StyleID="
			Response.Write StyleID
			Response.Write """>发贴表情</a> <a href=""?action=edit&stype=1&page="					
			Response.Write Rs(i).Name
			Response.Write "&StyleID="
			Response.Write StyleID
			Response.Write "#new""></a> | <a href=""bbsface.asp?Stype=2&page="
			Response.Write Rs(i).Name
			Response.Write "&StyleID="
			Response.Write StyleID
			Response.Write """>发贴心情</a> <a href=""?action=edit&stype=2&page="
			Response.Write Rs(i).Name
			Response.Write "&StyleID="
			Response.Write StyleID
			Response.Write "#new"""
			Response.Write "></a> | <a href=""bbsface.asp?Stype=3&page="
			Response.Write Rs(i).Name
			Response.Write "&StyleID="
			Response.Write StyleID
			Response.Write """>用户头像</a> <a href=""?action=edit&stype=3&page="
			Response.Write Rs(i).Name
			Response.Write "&StyleID="
			Response.Write StyleID
			Response.Write "#new""></a>"		
		ElseIf i>1 Then 
			Response.Write "编辑该模块:"
			Response.Write "<a href=""?action=edit&stype=1&page="
			Response.Write Rs(i).Name
			Response.Write "&StyleID="
			Response.Write StyleID
			Response.Write """>语言包</a> <a href=""?action=edit&stype=1&page="					
			Response.Write Rs(i).Name
			Response.Write "&StyleID="
			Response.Write StyleID
			Response.Write "#new""><font color=blue>新</font></a> | <a href=""?action=edit&stype=2&page="
			Response.Write Rs(i).Name
			Response.Write "&StyleID="
			Response.Write StyleID
			Response.Write """>图片</a> <a href=""?action=edit&stype=2&page="
			Response.Write Rs(i).Name
			Response.Write "&StyleID="
			Response.Write StyleID
			Response.Write "#new"""
			Response.Write "><font color=blue>新</font></a> | <a href=""?action=edit&stype=3&page="
			Response.Write Rs(i).Name
			Response.Write "&StyleID="
			Response.Write StyleID
			Response.Write """>界面风格</a> <a href=""?action=edit&stype=3&page="
			Response.Write Rs(i).Name
			Response.Write "&StyleID="
			Response.Write StyleID
			Response.Write "#new""><font color=blue>新</font></a>"
			If i=2 Then 
				Response.Write " | <a href=""?action=editmain&stype=2&StyleID="&StyleID&""">基本设置</a>"		
			End If
		ElseIf i=1 Then
			Response.Write "编辑该模块:"
			Response.Write "<a href=""?action=editcss&StyleID="&StyleID&""">修改CSS样式</a>"	 
		End If
		If i >20 Then 
			Response.Write "&nbsp;&nbsp;<a href=""?action=delpage&StylePageName="&Rs(i).Name&""" title=""注意,删除后不可恢复""> 删除分模板页面 </a>"		
		End If
		Response.Write "</td>"
		Response.Write "</tr>"
		If i>20 Then
			Response.Write "</form>" 
		End If
	Next
	Response.Write "</table><p></p>"
	Response.Write "<table border=""0"" cellspacing=""1"" cellpadding=""3"" align=""center"" width=""100%"">"
	Response.Write "<tr>"
	Response.Write "<th width=""100%"" style=""text-align:center;"" colspan=2>论坛模板管理"
	Response.Write "</th>"
	Response.Write "</tr>"
	Response.Write "<tr>"
	Response.Write "<FORM METHOD=POST ACTION=""?action=addstyle"">"
	Response.Write "<td class=""td2"" height=40 align=left width=45% >"
	Response.Write "新建模板:&nbsp;"
	Response.Write "<input type=text size=25 name=""StyleName"">&nbsp;&nbsp;"
	Response.Write "<input type=submit class=""button"" value=""添 加"" name=""mostyle"">&nbsp;&nbsp;填写模板名"
	Response.Write "<br /><br /><b>说明:</b>新建模板将把当前论坛默认模版数据复制到新的模板中"
	Response.Write "</td>"
	Response.Write "</FORM>"
	Response.Write "<FORM METHOD=POST ACTION=""?action=ghost"">"
	Response.Write "<td class=""td2"" height=25 align=left>源模板:"
	Response.Write "<select name=""OlDStyleID"" size=1>"
	For Each Templateslist in Application(Dvbbs.CacheName &"_style").documentElement.selectNodes("style")
		Response.Write "<option value="""& Templateslist.selectSingleNode("@id").text &""""
		If CLng(Templateslist.selectSingleNode("@id").text) = CLng(StyleID) Then 
			Response.Write " selected"
		End If 
		Response.Write ">"&Templateslist.selectSingleNode("@stylename").text &"</option>"
	Next 
	Response.Write "</select>"
	Response.Write "&nbsp;目标模板:"
	Response.Write "<select name=""newStyleID"" size=1>"
	For Each Templateslist in Application(Dvbbs.CacheName &"_style").documentElement.selectNodes("style")
		Response.Write "<option value="""& Templateslist.selectSingleNode("@id").text &""""
		If CLng(Templateslist.selectSingleNode("@id").text) = CLng(StyleID) Then 
			Response.Write " selected"
		End If 
		Response.Write ">"&Templateslist.selectSingleNode("@stylename").text &"</option>"
	Next 
	Response.Write "</select>"
	Response.Write "&nbsp;&nbsp;<input type=submit class=""button"" name=submit value=""模板克隆"">"
	Response.Write "<br /><br /><b>说明:</b>模板克隆将用源模版数据覆盖目标模板中的所有数据"
	Response.Write "</td>"
	Response.Write "</FORM>"
	Response.Write "</tr>"
	Response.Write "<tr>"
	Response.Write "<FORM METHOD=POST ACTION=""?action=rename"">"
	Response.Write "<td class=""td2"" height=25 align=left>"
	Response.Write "<select name=""StyleID"" size=1>"
	For Each Templateslist in Application(Dvbbs.CacheName &"_style").documentElement.selectNodes("style")
		Response.Write "<option value="""& Templateslist.selectSingleNode("@id").text &""""
		If CLng(Templateslist.selectSingleNode("@id").text) = CLng(StyleID) Then 
			Response.Write " selected"
		End If 
		Response.Write ">"&Templateslist.selectSingleNode("@stylename").text &"</option>"
	Next 
	Response.Write "</select>"
	Response.Write "&nbsp;&nbsp;"
	Response.Write "改名为:<input type=text size=20 name=""StyleName"" value="""
	Response.Write """>&nbsp;&nbsp;"
	Response.Write "<input type=submit class=""button"" name=submit value=""修改"">"
	Response.Write "</td>"
	Response.Write "</FORM>"
	Response.Write "<td class=""td2"" height=25 align=left>"
	Response.Write "&nbsp;"
	Response.Write "</td>"
	Response.Write "</tr>"
	Response.Write "</table><br />"
	Rs.Close
	Set Rs=Nothing
End Sub
Sub Edit()

⌨️ 快捷键说明

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