📄 forumdisplay.jsp
字号:
<c:if test="${requestScope.visitedforums!=null}"><select onchange="if(this.options[this.selectedIndex].value != '') window.location=('forumdisplay.jsp?fid='+this.options[this.selectedIndex].value+'&sid=${sid}')"><option value="">最近访问的版块 ...</option><c:forEach items="${requestScope.visitedforums}" var="visitedforum"><c:if test="${visitedforum.key!=fid}"><option value="${visitedforum.key}">${visitedforum.value}</option></c:if></c:forEach></select></c:if>
</div>
<div class="legend"><label><img src="${styles.IMGDIR}/folder_new.gif" alt="有新回复" />有新回复</label><label><img src="${styles.IMGDIR}/folder_common.gif" alt="无新回复" />无新回复</label><label><img src="${styles.IMGDIR}/folder_hot.gif" alt="热门主题" />热门主题</label><label><img src="${styles.IMGDIR}/folder_lock.gif" alt="关闭主题" />关闭主题</label></div>
<c:if test="${settings.forumjump==1&&settings.jsmenu_1>0}"><div class="popupmenu_popup" id="forumlist_menu" style="display: none">${forummenu}</div></c:if>
<script type="text/javascript">
var maxpage = ${multi.maxpage>0 ? multi.maxpage : 1};
if(maxpage > 1) {
document.onkeyup = function(e){
e = e ? e : window.event;
var tagname = is_ie ? e.srcElement.tagName : e.target.tagName;
if(tagname == 'INPUT' || tagname == 'TEXTAREA') return;
actualCode = e.keyCode ? e.keyCode : e.charCode;
if(${page<multi.maxpage}){
if(actualCode == 39) {window.location = 'forumdisplay.jsp?fid=${fid}${forumdisplayadd}&page=${page+1}';}
}
if(${page>1}){
if(actualCode == 37) {window.location = 'forumdisplay.jsp?fid=${fid}${forumdisplayadd}&page=${page-1}';}
}
}
}
</script>
<c:if test="${settings.fastpost>0&&allowpost && usergroups.allowpostattach>0 }">
<script type="text/javascript">
lang['post_attachment_ext_notallowed'] = '对不起,不支持上传此类扩展名的附件。';
lang['post_attachment_img_invalid'] = '无效的图片文件。';
lang['post_attachment_deletelink'] = '删除';
lang['post_attachment_insert'] = '点击这里将本附件插入帖子内容中当前光标的位置';
lang['post_attachment_insertlink'] = '插入';
var aid = 1;
var attachexts = new Array();
var attachwh = new Array();
var extensions = '${usergroups.attachextensions}';
function delAttach(id) {
$('attachbody').removeChild($('attach_' + id).parentNode.parentNode);
$('attachbody').innerHTML == '' && addAttach();
$('localimgpreview_' + id + '_menu') ? document.body.removeChild($('localimgpreview_' + id + '_menu')) : null;
}
function addAttach() {
newnode = $('attachbodyhidden').firstChild.cloneNode(true);
var id = aid;
var tags;
tags = newnode.getElementsByTagName('input');
for(i in tags) {
if(tags[i].name == 'attach') {
tags[i].id = 'attach_' + id;
tags[i].onchange = function() {insertAttach(id)};
tags[i].unselectable = 'on';
tags[i].name= 'attachfile'+id;
}
if(tags[i].name == 'localid[]') {
tags[i].value = id;
}
}
tags = newnode.getElementsByTagName('span');
for(i in tags) {
if(tags[i].id == 'localfile[]') {
tags[i].id = 'localfile_' + id;
}
}
$('attachbody').appendChild(newnode);
aid++;
}
addAttach();
function insertAttach(id) {
var localimgpreview = '';
var path = $('attach_' + id).value;
var ext = path.lastIndexOf('.') == -1 ? '' : path.substr(path.lastIndexOf('.') + 1, path.length).toLowerCase();
var re = new RegExp("(^|\\s|,)" + ext + "($|\\s|,)", "ig");
var localfile = $('attach_' + id).value.substr($('attach_' + id).value.replace(/\\/g, '/').lastIndexOf('/') + 1);
if(path == '') {
return;
}
if(extensions != '' && (re.exec(extensions) == null || ext == '')) {
alert(lang['post_attachment_ext_notallowed']);
return;
}
attachexts[id] = is_ie && in_array(ext, ['gif', 'jpg', 'png', 'bmp']) && typeof supe == 'undefined' ? 2 : 1;
$('localfile_' + id).innerHTML = '<a href="###delAttach" onclick="delAttach(' + id + ')">[' + lang['post_attachment_deletelink'] + ']</a> <a href="###insertAttach" title="' + lang['post_attachment_insert'] + '" onclick="insertAttachtext(' + id + ');return false;">[' + lang['post_attachment_insertlink'] + ']</a> ' +
(attachexts[id] == 2 ? '<span id="localimgpreview_' + id + '" onmouseover="showMenu(this.id, 0, 0, 1, 0)"> <span class="smalltxt">[' +id + ']</span> <a href="###attachment" onclick="insertAttachtext(' + id + ');return false;">' + localfile + '</a></span>' : '<span class="smalltxt">[' + id + ']</span> ' + localfile);
$('attach_' + id).style.display = 'none';
addAttach();
}
function insertAttachtext(id) {
if(!attachexts[id]) {
return;
}
if(attachexts[id] == 2) {
AddText('[local]' + id + '[/local]');
} else {
AddText('[local]' + id + '[/local]');
}
}
function AddText(txt) {
obj = $('postform').message;
selection = document.selection;
checkFocus();
if(!isUndefined(obj.selectionStart)) {
var opn = obj.selectionStart + 0;
obj.value = obj.value.substr(0, obj.selectionStart) + txt + obj.value.substr(obj.selectionEnd);
} else if(selection && selection.createRange) {
var sel = selection.createRange();
sel.text = txt;
sel.moveStart('character', -strlen(txt));
} else {
obj.value += txt;
}
}</script>
</c:if>
<jsp:include flush="true" page="footer.jsp" />
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -