📄 admin_template.asp
字号:
Call Import2
Case "DoImport"
Call DoImport
Case "DoTemplateCopy"
Call DoTemplateCopy
Case "ChannelCopyTemplate"
Call ChannelCopyTemplate
Case "DoCopy"
Call DoCopy
Case "BatchReplace"
Call BatchReplace
Case "DoBatchReplace"
Call DoBatchReplace
Case "BatchDefault"
Call BatchDefault
Case "DoBatchDefault"
Call DoBatchDefault
Case Else
Call main
End Select
If FoundErr = True Then
Call WriteErrMsg(ErrMsg, ComeUrl)
End If
Response.Write "</body></html>"
Call CloseConn
'=================================================
'过程名:Main
'作 用:模板首页
'=================================================
Sub main()
Dim iTemplateType, i
Dim sql, rs, TempType
Dim TemplateSelect, TemplateSelectContent
Dim rsProjectName, SysDefault '系统默认
TempType = PE_CLng(Trim(Request.QueryString("TempType")))
TemplateSelect = PE_CLng(Trim(Request.Form("TemplateSelect")))
If TemplateSelect = 1 Then
TemplateSelectContent = Trim(Request.Form("TemplateSelectContent"))
If TemplateSelectContent = "" Then
ErrMsg = ErrMsg & "<li>模板查询不能为空!</li>"
Call WriteErrMsg(ErrMsg, ComeUrl)
Exit Sub
End If
End If
'得到系统方案默认名称
Set rsProjectName = Conn.Execute("Select TemplateProjectName From PE_TemplateProject Where IsDefault=" & PE_True & "")
If rsProjectName.BOF And rsProjectName.EOF Then
Call WriteErrMsg("<li>系统中还没有默认方案,请到方案管理指定默认方案!</li>", ComeUrl)
Exit Sub
Else
SysDefault = rsProjectName("TemplateProjectName")
End If
Set rsProjectName = Nothing
Response.Write "<SCRIPT language=javascript>" & vbCrLf
Response.Write " function CheckAll(thisform){" & vbCrLf
Response.Write " for (var i=0;i<thisform.elements.length;i++){" & vbCrLf
Response.Write " var e = thisform.elements[i];" & vbCrLf
Response.Write " if (e.Name != ""chkAll""&&e.disabled!=true&&e.zzz!=1)" & vbCrLf
Response.Write " e.checked = thisform.chkAll.checked;" & vbCrLf
Response.Write " }" & vbCrLf
Response.Write " }" & vbCrLf
Response.Write " function mysub()" & vbCrLf
Response.Write " {" & vbCrLf
Response.Write " esave.style.visibility=""visible"";" & vbCrLf
Response.Write " }" & vbCrLf
Response.Write "</script>" & vbCrLf
If TemplateSelect = 1 Then
If ProjectName = "" Then
sql = "select * from PE_Template where ProjectName='' or ProjectName is null"
ElseIf ProjectName = "所有方案" Then
sql = "select * from PE_Template"
Else
sql = "select * from PE_Template where ProjectName='" & ProjectName & "'"
End If
Else
If TemplateType = 0 Then
If TempType = 1 Then
sql = "select * from PE_Template where ChannelID=" & ChannelID & " and TemplateType in (8,9,18,19,20,21)"
Else
sql = "select * from PE_Template where ChannelID=" & ChannelID
End If
If downright = 1 Then
sql = sql & " and Deleted=" & PE_True
Else
sql = sql & " and Deleted=" & PE_False
End If
Else
sql = "select * from PE_Template where ChannelID=" & ChannelID & " and TemplateType=" & TemplateType
If downright = 1 Then
sql = sql & " and Deleted=" & PE_True
Else
sql = sql & " and Deleted=" & PE_False
End If
End If
If ProjectName = "" Then
sql = sql & " and ProjectName='' or ProjectName is null order by TemplateType,TemplateID"
ElseIf ProjectName = "所有方案" Then
sql = sql & " order by TemplateType,TemplateID"
Else
sql = sql & " and ProjectName='" & ProjectName & "' order by TemplateType,TemplateID"
End If
End If
Set rs = Conn.Execute(sql)
Response.Write "<form name='form1' method='post' action='Admin_Template.asp'>"
If ChannelName = "" Then
ChannelName = "通用模板"
End If
Response.Write "<IMG SRC='images/img_u.gif' height='12'>您现在的位置:" & ProjectName & " >> "
If downright = 1 Then
Response.Write "模板回收站 >>" & vbCrLf
End If
Response.Write ChannelName & " >> " & GetTemplateTypeName(TemplateType, ChannelID)
Response.Write "<table width='100%' border='0' align='center' cellpadding='2' cellspacing='1' class='border'>"
Response.Write " <tr class='title' height='22'>"
Response.Write " <td width='30' align='center'><strong>选择</strong></td>"
Response.Write " <td width='30' align='center'><strong>ID</strong></td>"
Response.Write " <td width='100' align='center'><strong>方案名称</strong></td>"
Response.Write " <td width='120' align='center'><strong>模板类型</strong></td>"
Response.Write " <td height='22' align='center'><strong>模板名称</strong></td>"
If ProjectName = SysDefault Then
Response.Write " <td width='60' align='center'><strong>系统默认</strong></td>"
Else
Response.Write " <td width='60' align='center'><strong>方案默认</strong></td>"
End If
Response.Write " <td width='260' align='center'><strong>操作</strong></td>"
Response.Write " </tr>"
iTemplateType = 0
i = 0
If rs.BOF And rs.EOF Then
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -