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

📄 pm_viewajax.jsp

📁 论坛软件系统亦称电子公告板(BBS)系统
💻 JSP
字号:
<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib uri="/WEB-INF/c.tld" prefix="c"%>
<br />
${message}
<c:if test="${dis!='ok'}">
<div class="postactions" style="margin-top: 12px;">
	<c:choose>
		<c:when test="${param.folder!='announce'}">
		<c:if test="${param.folder=='inbox'}">
				 <a href="pm.jsp?action=send&pmid=${pmsd.pmid}&do=reply" target="_blank">回复</a> -
		</c:if>
	 <a href="pm.jsp?action=send&pmid=${pmsd.pmid}&do=forward" target="_blank">转发</a>
	 <c:if test="${param.folder=='inbox'}">
	  - <a href="pm.jsp?action=markunread&pmid=${pmsd.pmid}" id="ajax_markunread_${pmsd.pmid}" onclick="ajaxmenu(event, this.id, 1000, 'markunread', 0)">标记未读</a>
	</c:if>
	 - <a href="pm.jsp?action=archive&pmid=${pmsd.pmid}">下载</a>
	- <a href="pm.jsp?action=delete&pmid=${pmsd.pmid}" id="ajax_delete_${pmsd.pmid}" onclick="ajaxmenu(event, this.id, 1000, 'deletepm', 0)">删除</a> -
	<a href="###" onclick="closepm(${pmsd.pmid})">关闭</a>
		</c:when>
		<c:otherwise>
		<a href="pm.jsp?action=announcearchive&pmid=${announ.id}">下载</a>-
		<a href="###" onclick="closepm(${announ.id})">关闭</a>
		</c:otherwise>
	</c:choose>
</div>
</c:if>
<script type="text/javascript">
<!--
function deletepm(obj) {
	var pmid = obj.substr(obj.lastIndexOf('_') + 1);
	$('pmrow_' + pmid).style.display = 'none';
	$('pm_view_' + pmid + '_div').style.display = 'none';
}

function markunread(obj) {
	var pmid = obj.substr(obj.lastIndexOf('_') + 1);
	$('pm_view_' + pmid).parentNode.style.fontWeight = 800;//'<b>' + $('pm_view' + pmid).innerHTML + '</b>';
	$('pm_view_' + pmid + '_div').style.display = 'none';
	prepmdiv = '';
	window.location.reload();
}

function changestatus(obj) {
	if(obj.parentNode.style.fontWeight == 800) {
		obj.parentNode.style.fontWeight = 200;
	}
}

function closepm(pmid) {
	changedisplay($('pm_view_' + pmid + '_div'), 'none');
	prepmdiv = '';
}
function ajaxmenu(e, ctrlid, timeout, func, cache, duration, ismenu, divclass, optionclass) {
	showloading();
	if(jsmenu['active'][0] && jsmenu['active'][0].ctrlkey == ctrlid) {
		doane(e);
		return;
	} else if(is_ie && is_ie < 7 && document.readyState.toLowerCase() != 'complete') {
		return;
	}
	if(isUndefined(timeout)) timeout = 3000;
	if(isUndefined(func)) func = '';
	if(isUndefined(cache)) cache = 1;
	if(isUndefined(divclass)) divclass = 'popupmenu_popup';
	if(isUndefined(optionclass)) optionclass = 'popupmenu_option';
	if(isUndefined(ismenu)) ismenu = 1;
	if(isUndefined(duration)) duration = timeout > 0 ? 0 : 3;
	var div = $(ctrlid + '_menu');
	if(cache && div) {
		showMenu(ctrlid, e.type == 'click', 0, duration, timeout);
		if(func) setTimeout(func + '(' + ctrlid + ')', timeout);
		doane(e);
	} else {
		if(!div) {
			div = document.createElement('div');
			div.ctrlid = ctrlid;
			div.id = ctrlid + '_menu';
			div.style.display = 'none';
			div.className = divclass;
			$('append_parent').appendChild(div);
		}

		var x = new Ajax();
		var href = !isUndefined($(ctrlid).href) ? $(ctrlid).href : $(ctrlid).attributes['href'].value;
		x.div = div;
		x.etype = e.type;
		x.get(href + '&inajax=1&ajaxmenuid='+ctrlid+'_menu', function(s) {
			evaled = false;
			if(s.indexOf('ajaxerror') != -1) {
				evalscript(s);
				evaled = true;
				if(!cache && duration != 3 && x.div.id) setTimeout('document.body.removeChild($(\'' + x.div.id + '\'))', timeout);
			}
			if(!evaled && (typeof ajaxerror == 'undefined' || !ajaxerror)) {
				if(x.div) x.div.innerHTML = '<div class="' + optionclass + '">操作成功</div>';
				showMenu(ctrlid, x.etype == 'click', 0, duration, timeout);
				if(func) setTimeout(func + '("' + ctrlid + '")', timeout);
				//if(!cache && duration != 3 && x.div.id) setTimeout('document.body.removeChild($(\'' + x.div.id + '\'))', timeout);
			}
			if(!evaled) evalscript(s);
			ajaxerror = null;
			showloading('none');
		});
		doane(e);
	}
}
//-->
</script>

⌨️ 快捷键说明

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