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

📄 article_modify.jsp

📁 jsp CMS全站 无可奈何花落去 士大夫
💻 JSP
📖 第 1 页 / 共 3 页
字号:
<%@ page contentType="text/html; charset=GBK"%>
<%@ taglib uri="/cms4j" prefix="cms4j" %>
<%
	String OK_RETURN_URL = "";
	String url = request.getParameter("url");
	if(null != url && !url.equals("")){
		OK_RETURN_URL = url;
	}
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>CMS4J</title>
<link href="../skin/blue/css/oper_area.css" rel="stylesheet" type="text/css">

</head>
<script src="../../js/common.js"></script>
<script src="../../js/page_init.js"></script>
<script src="../../js/validator.js"></script>
<script src="../../js/pic.js"></script>
<script src="../mywork/js/mywork.js"></script>
<script src="../../js/date/WdatePicker.js"></script>
<script>


//当前的PPTImage总数
var pptImageCount = 1;

// 上传错误
function UploadError(sErrDesc){
	alert(sErrDesc);
}

function UploadLoaded(){
	//alert("upload");
}

function uploadHomepageImage(){
	homepage_file.myform.submit();
}

function uploadArticleImage(){
	article_file.myform.submit();
}
function uploadClassImage1(){
	ifClassImage1.myform.submit();
}
function uploadClassImage2(){
	ifClassImage2.myform.submit();
}
function uploadClassImage3(){
	ifClassImage3.myform.submit();
}

// 文件上传完成时执行,带入上传文件名
function UploadSaved(sPathFileName,type){
	if(type=="" || type == null || type == "homepageImage"){
		displayCtrl('showHomepageImage','uploadHomepageImage');
		document.all.homepageImage.src = sPathFileName;
		this.cms4jForm.HOMEPAGE_IMAGE.value = sPathFileName;
	}else if(type == "articleImage"){
		displayCtrl('showArticleImage','uploadArticleImage');
		document.all.articleImage.src = sPathFileName;
		this.cms4jForm.ARTICLE_IMAGE.value = sPathFileName;
	}else if(type == "ClassImage1"){
		displayCtrl('showClassImage1','uploadClassImage1');
		document.all.imgClassImage1.src = sPathFileName;
		this.cms4jForm.inClassImage1.value = sPathFileName;
	}else if(type == "ClassImage2"){
		displayCtrl('showClassImage2','uploadClassImage2');
		document.all.imgClassImage2.src = sPathFileName;
		this.cms4jForm.inClassImage2.value = sPathFileName;
	}else if(type == "ClassImage3"){
		displayCtrl('showClassImage3','uploadClassImage3');
		document.all.imgClassImage3.src = sPathFileName;
		this.cms4jForm.inClassImage3.value = sPathFileName;
	}else if(type == "linkTo"){
		displayCtrl('removeLinkToTD','uploadLinkToTable');
		this.cms4jForm.LINK_TO_EXTERIOR.value = sPathFileName;
	}else{
		//否则则为PPTImage
		displayCtrl('showPPTImage_'+type,'uploadPPTImage_'+type);
		var showObj = eval("document.all.ppt_img_" + type);
		showObj.src = sPathFileName;
		var valueObj = eval("document.all.ppt_img_value_" + type);
		valueObj.value = sPathFileName;
		
		
		pptImageCount = pptImageCount+1;
		document.all.pptImageCountInput.value = pptImageCount-1;
		addPPTImage(pptImageCount);
 
	}
}


function reloadHomepageImage(){
	this.cms4jForm.HOMEPAGE_IMAGE.value = "";
	displayCtrl('uploadHomepageImage','showHomepageImage');
	homepage_file.location.href = "../editor/uploadIframe.jsp?type=homepageImage&isUploadWarter=no";
}

function delClassImage1(){
	this.cms4jForm.inClassImage1.value = "";
	displayCtrl('uploadClassImage1','showClassImage1');
	ifClassImage1.location.href = "../editor/uploadIframe.jsp?type=ClassImage1&isUploadWarter=no";
}

function delClassImage2(){
	this.cms4jForm.inClassImage2.value = "";
	displayCtrl('uploadClassImage2','showClassImage2');
	ifClassImage2.location.href = "../editor/uploadIframe.jsp?type=ClassImage2&isUploadWarter=no";
}

function delClassImage3(){
	this.cms4jForm.inClassImage3.value = "";
	displayCtrl('uploadClassImage3','showClassImage3');
	ifClassImage3.location.href = "../editor/uploadIframe.jsp?type=ClassImage3&isUploadWarter=no";
}


function reloadArticleImage(){
	this.cms4jForm.ARTICLE_IMAGE.value = "";
	displayCtrl('uploadArticleImage','showArticleImage');
	article_file.location.href = "../editor/uploadIframe.jsp?type=articleImage&isUploadWarter=no";
}

function submitForm(){
	var content = editor.getHTML();
	//if(content == null || content == ""){
		//alert("请输入 [内容]");
		//return false;
	//}
	
	return Validator.Validate(document.cms4jForm,1);
}



//除去 副标相关内容
function unCheckBoxTitle2(){	 
	 document.cms4jForm.TITLE2.value="";
	 document.cms4jForm.TITLE2_COLOR2.value="";
	 document.cms4jForm.TITLE2_FONT2.value="default";
	
}
//除去 短标相关内容
function unCheckBoxhomeTitle(){	 
	 document.cms4jForm.HOME_TITLE.value="";
	 document.cms4jForm.TITLE_COLOR2.value="";
	 document.cms4jForm.TITLE_FONT2.value="default";
	
}


</script>
<body onLoad="pageInit()">

<form action="../../do?action=modifyArticle&ID=${param.id}" method="post" name="cms4jForm" id="cms4jForm" onSubmit="return submitForm();">
<input name="oldArticleListUrl" type="hidden" value="<%=request.getHeader("Referer")%>">
<input type="hidden" value="1" name="SPECIAL_NAME">
<input name="OK_RETURN_URL" type="hidden" id="OK_RETURN_URL" value="<%=OK_RETURN_URL%>">
<cms4j:article article_id="${param.id}" audit_state="all" audit_level="all" date="all">
<cms4j:article_list>
<script>
//页面初始化
function pageInit(){
	selectInit("ARTICLE_CLASS_ID","<%=article_info.getARTICLE_CLASS_ID()%>");	//所属栏目
	//selectInit("SPECIAL_ID","<%=article_info.getSPECIAL_ID()%>");	//专题
	selectInit("TITLE_COLOR","<%=article_info.getTITLE_COLOR()%>");	//标题色彩
	selectInit("TITLE_FONT","<%=article_info.getTITLE_FONT()%>");	//标题字体
	
	selectInit("TITLE2_COLOR2","<%=article_info.getTITLE2_COLOR2()%>");	//副标题色彩
	selectInit("TITLE2_FONT2","<%=article_info.getTITLE2_FONT2()%>");	//副标题字体
	
	selectInit("TITLE_COLOR2","<%=article_info.getHOME_TITLE_COLOR()%>");	//标题色彩
	selectInit("TITLE_FONT2","<%=article_info.getHOME_TITLE_FONT()%>");	//标题字体
	
	selectInit("HOMEPAGE_IMAGE","<%=article_info.getHOMEPAGE_IMAGE()%>");	//首页图片
	selectInit("PAGINATION_ID","<%=article_info.getPAGINATION_ID()%>");	//翻页方式
	selectInit("FRAME_TEMPLET_ID","<%=article_info.getFRAME_TEMPLET_ID()%>");	//排版模板
	selectInit("COLOR_TEMPLET_ID","<%=article_info.getCOLOR_TEMPLET_ID()%>");	//配色模板
	selectInit("RESTRICT_ID","<%=article_info.getRESTRICT_ID()%>");	//约束
	selectInit("ACTION_ID","<%=article_info.getACTION_ID()%>");	//行为
	
	radioGuoupInit("IS_COMMENT","<%=article_info.getIS_COMMENT()%>");	//是否可评论
	radioGuoupInit("RELEASE_STATE","<%=article_info.getRELEASE_STATE()%>");		//发布状态
	
	checkBoxInit("IS_ONTOP","<%=article_info.getIS_ONTOP()%>");	//固顶
	checkBoxInit("IS_COMMEND","<%=article_info.getIS_COMMEND()%>");	//推荐
	
	<%
		if(null != article_info.getHOME_TITLE() && !article_info.getHOME_TITLE().equals("")){
		
	%>
	checkBoxInit("isShowHomeTitle","true");	//显示首页标题
	displayCtrl('homeTitleTR','');
	<%
		}
	%>
	
		<%
		if(null != article_info.getTITLE2() && !article_info.getTITLE2().equals("")){
		
	%>
	checkBoxInit("isShowTitle2","true");	//显示副标题
	displayCtrl('TITLE2TR','');
	<%
		}
	%>
	
	
	
	<%
		if(null != article_info.getHOMEPAGE_IMAGE() && !article_info.getHOMEPAGE_IMAGE().equals("")){
	%>
	UploadSaved("<%=article_info.getHOMEPAGE_IMAGE()%>","homepageImage");
	<%
		}
		
		if(null != article_info.getARTICLE_IMAGE() && !article_info.getARTICLE_IMAGE().equals("")){
	%>
	UploadSaved("<%=article_info.getARTICLE_IMAGE()%>","articleImage");
	<%
		}
	%>
	
	
	if(document.cms4jForm.LINK_TO_EXTERIOR.value != ""){
		displayCtrl('removeLinkToTD','uploadLinkToTable');
	}
	

	
	
	//selectInit("EXT_1","<%=article_info.getEXT_1()%>");	//行为
	
	displayCtrlInit("modifyTable","${param.operType}","")
	displayCtrlInit("auditTable","${param.operType}","audit");
	returnArticle("<%=article_info.getInitBindKeyArticle()%>"); //强制相关文章
}

//aschen add 20060807 多专题文章
function OpenChildWindow() {
	 var idSelected=document.cms4jForm.SPECIAL_ID.value;
	 url = 'special_list.jsp?idSelected='+idSelected;
	 sWidth = '500';
	 sHeight = '400';
     gOpenedWindow = null;
     gOpened = false;
     var  str = "height=" +  sHeight +  ",innerHeight=" + sHeight;
     str += ",width=" + sWidth + ",innerWidth=" + sWidth;
    if (window.screen) {
       var ah = window.screen.availHeight - 30;
       var  aw = window.screen.availWidth - 10;
       var xc = (aw - sWidth)/2;
       var yc = (ah - sHeight) / 2;
       str += ",left=" + xc + ",screenX=" + xc;
       str += ",top=" + yc + ",screenY=" + yc;
      }      
      str +=",scrollbars=yes";
     gOpenedWindow =  window.open(url, "window" , str);
}

//设置专题列表
function resetSel(){
	var sel = document.getElementById("SPECIAL_SHOW");
	sel.options.length=0;
	var id=document.cms4jForm.SPECIAL_ID.value;
	var name=document.cms4jForm.SPECIAL_NAME.value;
	if(id=="1"||id==null||id==""){
		return;
	}else{
		var arrId=new Array();
		var arrName=new Array();
		arrId=id.split("|");
		arrName=name.split("|");
		var idValue;
		var nameValue;
		for(var i=0;i<arrId.length-1;i++){
			idValue=arrId[i];
			nameValue=arrName[i];
			sel.options[sel.options.length] = new Option(nameValue,idValue);	
		}
	}
}



/*判断是否已经存在某文章id
 *articleIDs:已有的文章id字符串 格式:100|200|300
 *articleID :要比较的文章id 
 */
function isHasArticleID(articleIDs,articleID){
	if(articleIDs=="")
		return false;
	var articleIDArray = articleIDs.split("|");
	for(var m=0;m<articleIDArray.length;m++)
		if(articleIDArray[m]==articleID)
			return true;
	return false;
}

⌨️ 快捷键说明

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