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

📄 style.asp

📁 这是一个企业管理的网站源码
💻 ASP
📖 第 1 页 / 共 4 页
字号:
Dim nToolbarNum
nToolbarNum = Ubound(aToolbar) + 1
Redim Preserve aToolbar(nToolbarNum)
aToolbar(nToolbarNum) = sStyleID & "||||||" & s_Name & "|||" & s_Order
Call WriteConfig()
Call WriteStyle(Clng(sStyleID))
Response.Write "<script language=javascript>alert(""工具栏(" & outHTML(s_Name) & ")增加操作成功!"");</script>"
Call GoUrl("?action=toolbar&id=" & sStyleID)
End Sub
Sub DoToolBarModi()
Dim s_Name, s_Order, i, aCurrToolbar
For i = 1 To UBound(aToolbar)
aCurrToolbar = Split(aToolbar(i), "|||")
If aCurrToolbar(0) = sStyleID Then
s_Name = Trim(Request("d_name" & i))
s_Order = Trim(Request("d_order" & i))
If s_Name = "" Or IsNumeric(s_Order) = False Then 
aCurrToolbar(0) = ""
s_Name = ""
End If
aToolbar(i) = aCurrToolbar(0) & "|||" & aCurrToolbar(1) & "|||" & s_Name & "|||" & s_Order
End If
Next
Call WriteConfig()
Call WriteStyle(Clng(sStyleID))
Response.Write "<script language=javascript>alert('工具栏修改操作成功!');</script>"
Call GoUrl("?action=toolbar&id=" & sStyleID)
End Sub
Sub DoToolBarDel()
Dim s_DelID
s_DelID = Trim(Request("delid"))
If IsNumeric(s_DelID) = True Then
aToolbar(Clng(s_DelID)) = ""
Call WriteConfig()
Call WriteStyle(Clng(sStyleID))
Response.Write "<script language=javascript>alert('工具栏(ID:" & s_DelID & ")删除操作成功!');</script>"
Call GoUrl("?action=toolbar&id=" & sStyleID)
End If
End Sub
Sub InitToolBar()
Dim b, aCurrToolbar, nToolbarID
b = False
sToolBarID = Trim(Request("toolbarid"))
If IsNumeric(sToolBarID) = True Then
If Clng(sToolBarID) <= UBound(aToolbar) And Clng(sToolBarID) > 0 Then
aCurrToolbar = Split(aToolbar(Clng(sToolbarID)), "|||")
sToolBarName = aCurrToolbar(2)
sToolBarOrder = aCurrToolbar(3)
sToolBarButton = aCurrToolbar(1)
b = True
End If
End If
If b = False Then
GoError "无效的工具栏ID号,请通过页面上的链接进行操作!"
End If
End Sub
Sub ShowButtonList()
Call ShowMessage("<b class=blue>当前样式:<span class=red>" & outHTML(sStyleName) & "</span>&nbsp;&nbsp;当前工具栏:<span class=red>" & outHTML(sToolBarName) & "</span></b>")
%>
<script language='javascript' src='../js/buttons.js'></script>
<script language='javascript' src='../js/zh-cn.js'></script>
<table border=0 cellpadding=5 cellspacing=0 align=center>
<form action='?action=buttonsave&id=<%=sStyleID%>&toolbarid=<%=sToolBarID%>' method=post name=myform>
<tr align=center><td>可选按钮</td><td></td><td>已选按钮</td><td></td></tr>
<tr>
<td><DIV id=div1 style="BORDER-RIGHT: 1.5pt inset; PADDING-RIGHT: 0px; BORDER-TOP: 1.5pt inset; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; OVERFLOW: auto; BORDER-LEFT: 1.5pt inset; WIDTH: 250px; PADDING-TOP: 0px; BORDER-BOTTOM: 1.5pt inset; HEIGHT: 350px; BACKGROUND-COLOR: white"></DIV></td>
<td><input type=button name=b1 value=' → ' onclick='Add()'><br><br><input type=button name=b1 value=' ← ' onclick='Del()'></td>
<td><DIV id=div2 style="BORDER-RIGHT: 1.5pt inset; PADDING-RIGHT: 0px; BORDER-TOP: 1.5pt inset; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; OVERFLOW: auto; BORDER-LEFT: 1.5pt inset; WIDTH: 250px; PADDING-TOP: 0px; BORDER-BOTTOM: 1.5pt inset; HEIGHT: 350px; BACKGROUND-COLOR: white"></DIV></td>
<td><input type=button name=b3 value='↑' onclick='Up()'><br><br><br><input type=button name=b4 value='↓' onclick='Down()'></td>
</tr>
<input type=hidden name='d_button' value='<%=sToolBarButton%>'>
<tr><td colspan=4 align=right><input type=submit name=b value=' 保存设置 '></td></tr>
</form>
</table>
<script language=javascript>
initButtonOptions("<%=sSkin%>");
</script>
<%
Call ShowMessage("<b class=blue>提示:</b>你可以通过按“Ctrl”“Shift”来快速多选定,可以在指定项上“双击”快速增加或删除项。可以选定多个按钮同时上移或下移操作。")
End Sub
Sub DoButtonSave()
Dim s_Button, nToolBarID, aCurrToolbar
s_Button = Trim(Request("d_button"))
nToolBarID = Clng(sToolBarID)
aCurrToolbar = Split(aToolbar(nToolBarID), "|||")
aToolbar(nToolBarID) = aCurrToolbar(0) & "|||" & s_Button & "|||" & aCurrToolbar(2) & "|||" & aCurrToolbar(3)
Call WriteConfig()
Call WriteStyle(Clng(sStyleID))
Call ShowMessage("<b><span class=red>工具栏按钮设置保存成功!</span></b><li><a href='?action=stylepreview&id=" & sStyleID & "' target='_blank'>预览此样式</a><li><a href='?action=toolbar&id=" & sStyleID & "'>返回工具栏管理</a><li><a href='?action=buttonset&id=" & sStyleID & "&toolbarid=" & sToolBarID & "'>重新设置此工具栏下的按钮</a>")
End Sub
Sub WriteStyle(n_StyleID)
Dim sConfig
Dim aTmpStyle
sConfig = ""
aTmpStyle = Split(aStyle(n_StyleID), "|||")
sConfig = sConfig & "config.FixWidth = """ & aTmpStyle(1) & """;" & Vbcrlf
If aTmpStyle(19) = "3" Then
sConfig = sConfig & "config.UploadUrl = """ & aTmpStyle(23) & """;" & Vbcrlf
Else
sConfig = sConfig & "config.UploadUrl = """ & aTmpStyle(3) & """;" & Vbcrlf
End If
sConfig = sConfig & "config.InitMode = """ & aTmpStyle(18) & """;" & Vbcrlf
sConfig = sConfig & "config.AutoDetectPasteFromWord = """ & aTmpStyle(17) & """;" & Vbcrlf
sConfig = sConfig & "config.BaseUrl = """ & aTmpStyle(19) & """;" & Vbcrlf
sConfig = sConfig & "config.BaseHref = """ & aTmpStyle(22) & """;" & Vbcrlf
sConfig = sConfig & "config.AutoRemote = """ & aTmpStyle(24) & """;" & Vbcrlf
sConfig = sConfig & "config.ShowBorder = """ & aTmpStyle(25) & """;" & Vbcrlf
sConfig = sConfig & "config.StateFlag = """ & aTmpStyle(16) & """;" & Vbcrlf
sConfig = sConfig & "config.SBCode = """ & aTmpStyle(62) & """;" & Vbcrlf
sConfig = sConfig & "config.SBEdit = """ & aTmpStyle(63) & """;" & Vbcrlf
sConfig = sConfig & "config.SBText = """ & aTmpStyle(64) & """;" & Vbcrlf
sConfig = sConfig & "config.SBView = """ & aTmpStyle(65) & """;" & Vbcrlf
sConfig = sConfig & "config.EnterMode = """ & aTmpStyle(66) & """;" & Vbcrlf
sConfig = sConfig & "config.Skin = """ & aTmpStyle(2) & """;" & Vbcrlf
sConfig = sConfig & "config.AllowBrowse = """ & aTmpStyle(43) & """;" & Vbcrlf
sConfig = sConfig & "config.AllowImageSize = """ & aTmpStyle(13) & """;" & Vbcrlf
sConfig = sConfig & "config.AllowFlashSize = """ & aTmpStyle(12) & """;" & Vbcrlf
sConfig = sConfig & "config.AllowMediaSize = """ & aTmpStyle(14) & """;" & Vbcrlf
sConfig = sConfig & "config.AllowFileSize = """ & aTmpStyle(11) & """;" & Vbcrlf
sConfig = sConfig & "config.AllowRemoteSize = """ & aTmpStyle(15) & """;" & Vbcrlf
sConfig = sConfig & "config.AllowLocalSize = """ & aTmpStyle(45) & """;" & Vbcrlf
sConfig = sConfig & "config.AllowImageExt = """ & aTmpStyle(8) & """;" & Vbcrlf
sConfig = sConfig & "config.AllowFlashExt = """ & aTmpStyle(7) & """;" & Vbcrlf
sConfig = sConfig & "config.AllowMediaExt = """ & aTmpStyle(9) & """;" & Vbcrlf
sConfig = sConfig & "config.AllowFileExt = """ & aTmpStyle(6) & """;" & Vbcrlf
sConfig = sConfig & "config.AllowRemoteExt = """ & aTmpStyle(10) & """;" & Vbcrlf
sConfig = sConfig & "config.AreaCssMode = """ & aTmpStyle(67) & """;" & Vbcrlf
sConfig = sConfig & "config.SYWZFlag = """ & aTmpStyle(32) & """;" & Vbcrlf
sConfig = sConfig & "config.SYTPFlag = """ & aTmpStyle(52) & """;" & Vbcrlf
sConfig = sConfig & "config.ServerExt = ""asp"";" & vbCrLf
sConfig = sConfig & Vbcrlf
sConfig = sConfig & "config.Toolbars = [" & Vbcrlf
Dim s_Order, s_ID, n, aTmpToolbar
s_Order = ""
s_ID = ""
For n = 1 To UBound(aToolbar)
If aToolbar(n) <> "" Then
aTmpToolbar = Split(aToolbar(n), "|||")
If aTmpToolbar(0) = CStr(n_StyleID) Then
If s_ID <> "" Then
s_ID = s_ID & "|"
s_Order = s_Order & "|"
End If
s_ID = s_ID & CStr(n)
s_Order = s_Order & aTmpToolbar(3)
End If
End If
Next
Dim a_ID, a_Order, aTmpButton, i
If s_ID <> "" Then
a_ID = Split(s_ID, "|")
a_Order = Split(s_Order, "|")
For n = 0 To UBound(a_Order)
a_Order(n) = Clng(a_Order(n))
a_ID(n) = Clng(a_ID(n))
Next
a_ID = Sort(a_ID, a_Order)
For n = 0 To UBound(a_ID)
aTmpToolbar = Split(aToolbar(a_ID(n)), "|||")
aTmpButton = Split(aTmpToolbar(1), "|")
If n >0 Then
sConfig = sConfig & "," & Vbcrlf
End If
sConfig = sConfig & Chr(9) & "["
For i = 0 To UBound(aTmpButton)
If i > 0 Then
sConfig = sConfig & ", "
End If
sConfig = sConfig & """" & aTmpButton(i) & """"
Next
sConfig = sConfig & "]"
Next
End If
sConfig = sConfig & Vbcrlf & "];" & Vbcrlf
Call WriteFile("../style/" & LCase(aTmpStyle(0)) & ".js", sConfig)
End Sub
Sub DeleteFile(s_StyleName)
On Error Resume Next
Dim oFSO, sMapFileName
Set oFSO = Server.CreateObject("Scripting.FileSystemObject")
sMapFileName = Server.MapPath("../style/" & LCase(s_StyleName) & ".js")
If oFSO.FileExists(sMapFileName) Then
oFSO.DeleteFile(sMapFileName)
End If
Set oFSO = Nothing
End Sub
Sub GoUrl(url)
Response.Write "<script language=javascript>location.href=""" & url & """;</script>"
Response.End
End Sub
%>

⌨️ 快捷键说明

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