📄 mmdtemplate.jsp
字号:
<%@ page contentType="text/html;charset=gb2312"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="/aqu" prefix="aqu"%>
<c:set value="${aqu:getUrl()}/admin/login.jsp" var="url"/>
<c:if test="${sessionScope.admin==null||sessionScope.admin!='yes'}">
<c:redirect url="${url}"/>
</c:if>
<jsp:useBean id="type" scope="page" class="com.v246.GetTemplateType"/>
<html>
<head>
<title>文章中心管理----模板管理</title>
<meta http-equiv="content-Type" content="text/html; charset=gb2312">
<link href="images/Admin_Style.css" rel="stylesheet" type="text/css">
<style type="text/css" title="">
/* 文本框的CSS定义:对应CSS中的“INPUT”,这里为文本框的风格设置,可定义内容为背景、字体、颜色、边框等 */
Input
{
BACKGROUND-COLOR: #ffffff;
BORDER-BOTTOM: #666666 1px solid;
BORDER-LEFT: #666666 1px solid;
BORDER-RIGHT: #666666 1px solid;
BORDER-TOP: #666666 1px solid;
COLOR: #666666;
HEIGHT: 18px;
border-color: #666666 #666666 #666666 #666666; font-size: 9pt
}
/* 下拉列表框的CSS定义:对应CSS中的“SELECT”,这里为下拉列表框的风格设置,可定义内容为背景、字体、颜色、边框等 */
Select
{
FONT-SIZE: 9pt;HEIGHT: 20px;
}
</style>
</head>
<body leftmargin="2" topmargin="0" marginheight="0" marginwidth="0">
<c:set value="/admin/templateManage.jsp?id=${param.pid}" var="nextUrl"/>
<c:url value="${aqu:getUrl()}${nextUrl}" var="aqu"/>
<c:choose>
<c:when test="${param.action=='set'}">
${aqu:setDefault(param.id)}
<c:redirect url="${aqu}"/>
</c:when>
<c:when test="${param.action=='del'}">
<c:set value="template where TemplateId=${param.id}" var="dele"/>
${aqu:deleteData(dele)}
<c:redirect url="${aqu}"/>
</c:when>
<c:when test="${param.action=='modify'}">
<c:set value="${aqu:modifyTemplate(param.id)}" var="modify"/>
<table class="border" align="center" border="0" cellpadding="2" cellspacing="1" width="100%">
<tbody>
<tr class="topbg">
<td colspan="3" align="center" height="22"><strong>文章中心管理----模板管理</strong></td>
</tr>
<tr class="tdbg">
<td height="30" width="70"><!--DWLayoutEmptyCell--> </td>
<td><!--DWLayoutEmptyCell--> </td>
</tr>
</tbody>
</table>
<br>
<script language="JavaScript">
addeditorcss=false;
addeditorcss2=false;
function sizecontent(num,objname){
var obj = document.getElementById(objname);
if (parseInt(obj.rows)+num>=1) {
obj.rows = parseInt(obj.rows) + num;
}
if (num>0){
obj.width="90%";
}
}
function copy(num) {
if (num==1) {
var content= document.form1.content.value;
while(content.indexOf("[/textarea]")>0)
{
content = content.replace("[/textarea]", "</textarea>");
}
document.form1.content.value=content;
document.form1.content.focus();
document.form1.content.select();
textRange = document.form1.content.createTextRange();
textRange.execCommand("Copy");
}
else {
document.form1.content2.focus();
document.form1.content2.select();
textRange = document.form1.content2.createTextRange();
textRange.execCommand("Copy");
}
}
function LoadEditorAlgebra(num){
if (num==1){
document.form1.content.rows=30;
showAlgebra.style.display="";
showeditor.style.display="none";
document.form1.Editorfullscreen.disabled=true;
document.form1.Copy.disabled=false;
if (addeditorcss==false){
addeditorcss=true;
setcontent('get',1)
editor.yToolbarsCss();
editor.showBorders();
}else{
setcontent('get',1)
editor.yToolbarsCss()
}
}else{
document.form1.content2.rows=30;
showAlgebra2.style.display="";
showeditor2.style.display="none";
document.form1.Editorfullscreen2.disabled=true;
document.form1.Copy2.disabled=false;
if (addeditorcss2==false){
addeditorcss2=true;
setcontent('get',2);
editor2.yToolbarsCss();
editor2.showBorders();
}else{
setcontent('get',2)
editor.yToolbarsCss()
}
}
}
function LoadEditorEdit(num){
if (num==1){
showAlgebra.style.display="none";
showeditor.style.display="";
document.form1.Editorfullscreen.disabled=false;
document.form1.Copy.disabled=true;
if (addeditorcss==false){
addeditorcss=true;
setcontent('set',1);
editor.yToolbarsCss();
editor.showBorders();
}else{
setcontent('set',1)
editor.yToolbarsCss()
}
}else{
showAlgebra2.style.display="none";
showeditor2.style.display="";
document.form1.Editorfullscreen2.disabled=false;
document.form1.Copy2.disabled=true;
if (addeditorcss2==false){
addeditorcss2=true;
setcontent('set',2);
editor2.yToolbarsCss();
editor2.showBorders();
}else{
setcontent('set',2)
editor.yToolbarsCss()
}
}
}
function LoadEditorMix(num){
if (num==1){
document.form1.content.rows=10;
showeditor.style.display="";
showAlgebra.style.display="";
document.form1.Editorfullscreen.disabled=false;
document.form1.Copy.disabled=false;
if (addeditorcss==false){
addeditorcss=true;
editor.yToolbarsCss()
editor.showBorders()
}else{
editor.yToolbarsCss()
}
}else{
document.form1.content2.rows=8;
showeditor2.style.display="";
showAlgebra2.style.display="";
document.form1.Editorfullscreen2.disabled=false;
document.form1.Copy2.disabled=false;
if (addeditorcss2==false){
addeditorcss2=true;
editor2.yToolbarsCss();
editor2.showBorders();
}else{
editor.yToolbarsCss()
}
}
}
function fullscreen(num) {
window.open ("../Editor/editor_fullscreen.asp?ChannelID=1&num="+num+"", "", "toolbar=no, menubar=no, top=0,left=0,width=1024,height=768, scrollbars=no, resizable=no,location=no, status=no");
}
function Templateskin(){
if(confirm('您确定要转入风格设计,如果您没有保存当前操作的模板请保存模板。')){
window.location.href='Admin_Skin.asp?Action=Modify&SkinID=1&IsDefault=-1';
};
}
</script>
<script language="VBScript">
Dim Strsave,Strsave2
Dim regEx, Match, Matches, StrBody,strTemp,strTemp2,strMatch,arrMatch,i
Dim content1,content2,content3,content4,Templatecontent,Templatecontent2,Templatecontent3,arrcontent
Set regEx = New RegExp
regEx.IgnoreCase = True
regEx.Global = True
Strsave="A"
Strsave2="A"
Sub CheckForm(Num)
if document.form1.templateName.value="" then
alert "模板名称不能为空!"
document.form1.templateName.focus()
exit sub
End if
if Num=2 then
if document.form1.content2.value="" then
alert "小类模版主内容不能为空!"
exit sub
End if
End if
form1.submit
End Sub
Function Resumeblank(byval content)
Dim strHtml,strHtml2,Num,Numtemp,Strtemp
strHtml=Replace(content, "<DIV", "<div")
strHtml=Replace(strHtml, "</DIV>", "</div>")
strHtml=Replace(strHtml, "<TABLE", "<table")
strHtml=Replace(strHtml, "</TABLE>", vbCrLf & "</table>"& vbCrLf)
strHtml=Replace(strHtml, "<TBODY>", "")
strHtml=Replace(strHtml, "</TBODY>","" & vbCrLf)
strHtml=Replace(strHtml, "<TR", "<tr")
strHtml=Replace(strHtml, "</TR>", vbCrLf & "</tr>"& vbCrLf)
strHtml=Replace(strHtml, "<TD", "<td")
strHtml=Replace(strHtml, "</TD>", "</td>")
strHtml=Replace(strHtml, "<!--", vbCrLf & "<!--")
strHtml=Replace(strHtml, "<SELECT",vbCrLf & "<Select")
strHtml=Replace(strHtml, "</SELECT>",vbCrLf & "</Select>")
strHtml=Replace(strHtml, "<OPTION",vbCrLf & " <Option")
strHtml=Replace(strHtml, "</OPTION>","</Option>")
strHtml=Replace(strHtml, "<INPUT",vbCrLf & " <Input")
strHtml=Replace(strHtml, "<script",vbCrLf & "<script")
strHtml=Replace(strHtml, "&","&")
strHtml=Replace(strHtml, "{$--",vbCrLf & "<!--$")
strHtml=Replace(strHtml, "--}","$-->")
arrcontent = Split(strHtml,vbCrLf)
For i = 0 To UBound(arrcontent)
Numtemp=false
if Instr(arrcontent(i),"<table")>0 then
Numtemp=True
if Strtemp<>"<table" and Strtemp <>"</table>" then
Num=Num+2
End if
Strtemp="<table"
elseif Instr(arrcontent(i),"<tr")>0 then
Numtemp=True
if Strtemp<>"<tr" and Strtemp<>"</tr>" then
Num=Num+2
End if
Strtemp="<tr"
elseif Instr(arrcontent(i),"<td")>0 then
Numtemp=True
if Strtemp<>"<td" and Strtemp<>"</td>" then
Num=Num+2
End if
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -