📄 topic.jsp
字号:
for(int i=0,m=uploadAllowedExtArray.length;i<m;i++) {
out.println("<option>"+uploadAllowedExtArray[i]+"</option>");
}
%>
</select>
<script language="JavaScript">
function getActiveText() {
setfocus();
if (!is_ie || (is_ie && !document.selection)) {
return false;
}
var sel = document.selection;
var rng = sel.createRange();
rng.colapse;
if (rng != null && (sel.type == "Text" || sel.type == "None")) {
text = rng.text;
}
if (theform.content.createTextRange) {
theform.content.caretPos = rng.duplicate();
}
return true;
}
function setfocus() {
theform.content.focus();
}
//function AddText(NewCode) {theform.content.value+=NewCode}
function AddText(NewCode) {
if (typeof(theform.content.createTextRange) != "undefined" && theform.content.caretPos) {
var caretPos = theform.content.caretPos;
caretPos.text = caretPos.text.charAt(caretPos.text.length - 1) == ' ' ? NewCode + ' ' : NewCode;
} else {
theform.content.value += NewCode;
}
setfocus();
getActiveText();
AddTxt = "";
}
function lycode(lycode, optioncompiled, prompttip, prompttext) {
if(optioncompiled!='') {
optioncompiled="="+optioncompiled;
}
// lets call this when they try and use lycode rather than on change
getActiveText();
if (text) {
// its IE to the rescue
if (text.substring(0, lycode.length + 2 ) == "[" + lycode + "]" && text.substring(text.length - lycode.length - 3, text.length) == "[/" + lycode + "]") {
AddTxt = text.substring(lycode.length + 2, text.length - lycode.length - 3);
} else {
AddTxt = "[" + lycode + optioncompiled + "]" + text + "[/" + lycode + "]";
}
AddText(AddTxt);
} else if (theform.content.selectionEnd && (theform.content.selectionEnd - theform.content.selectionStart > 0)) {
// its mozilla and we'll need to re-write entire text
var start_selection = theform.content.selectionStart;
var end_selection = theform.content.selectionEnd;
if (end_selection <= 2) {
end_selection = theform.content.textLength;
}
// fetch everything from start of text area to selection start
var start = (theform.content.value).substring(0, start_selection);
// fetch everything from start of selection to end of selection
var middle = (theform.content.value).substring(start_selection, end_selection);
// fetch everything from end of selection to end of text area
var end = (theform.content.value).substring(end_selection, theform.content.textLength);
if (middle.substring(0, lycode.length + 2 ) == "[" + lycode + "]" && middle.substring(middle.length - lycode.length - 3, middle.length) == "[/" + lycode + "]") {
middle = middle.substring(lycode.length + 2, middle.length - lycode.length - 3);
} else {
middle = "[" + lycode + optioncompiled + "]" + middle + "[/" + lycode + "]";
}
theform.content.value = start + middle + end;
}
else {
if(prompttip=='') {
AddTxt = "[" + lycode + optioncompiled + "]"+prompttext+"[/" + lycode + "] ";
} else {
var inserttext = prompt(prompttip, prompttext);
if (inserttext != null) {
AddTxt = "[" + lycode + optioncompiled + "]" + inserttext + "[/" + lycode + "] ";
}
}
AddText(AddTxt);
}
setfocus();
return false;
}
function manageAttachments(url, width, height) {
window.open(url, "attachment", "statusbar=no,menubar=no,toolbar=no,scrollbars=yes,resizable=yes,width=" + width + ",height=" + height);
}
function insertAttachment(fileName,fileRealName,fileExt) {
if(fileExt=="gif" || fileExt=="jpg" || fileExt=="jpeg" || fileExt=="bmp" || fileExt=="png") {
getActiveText();
AddText("\n<bean:message key="tag.typetopiclisttag.post.image"/>:\n");
lycode("img", "", "", "bbs_downloadAttachment.do?fileName="+fileName);
}
else if(fileExt=="swf") {
getActiveText();
AddText("\n");
lycode("swf", "", "", "bbs_downloadAttachment.do?fileName="+fileName);
}
else {
getActiveText();
AddText("\n");
lycode("img", "", "", "lybbs/icons/"+fileExt+".gif");
AddText("<bean:message key="tag.typetopiclisttag.post.accessary"/>: ");
lycode("url", "bbs_downloadAttachment.do?fileName="+fileName, "", fileRealName);
}
setAccessary2('0');
}
function setAccessary(accessary) {
theform.accessary.value=accessary;
theform.updateAttachment.value=accessary;
}
function setAccessary2(accessary) {
theform.accessary.value=accessary;
}
function setAccessaryName(accessaryName) {
theform.accessaryName.value=accessaryName;
//alert(theform.accessaryName.value);
}
function insertAllAttachment(insertText) {
eval(insertText);
}
</script>
</td>
</tr>
</logic:equal>
<tr>
<td class=forumColorOne valign=top>
<li><bean:message key="jsp.post.tag.html"/>: <b><logic:equal name="forumBean" property="htmlStat" value="1"><bean:message key="common.lybbs.useable"/></logic:equal><logic:equal name="forumBean" property="htmlStat" value="0"><bean:message key="common.lybbs.unuseable"/></logic:equal></b>
<li><a href="javascript:openScript('bbs_misc.do?action=lycode',800,600)"><bean:message key="jsp.post.tag.lybbs"/></a>: <b><logic:equal name="forumBean" property="lyCodeStat" value="1"><bean:message key="common.lybbs.useable"/></logic:equal><logic:equal name="forumBean" property="lyCodeStat" value="0"><bean:message key="common.lybbs.unuseable"/></logic:equal></b>
<li><bean:message key="jsp.post.tag.image"/> : <b><logic:equal name="publicStyleBean" property="arrawPostPic" value="1"><bean:message key="common.lybbs.allow"/></logic:equal><logic:equal name="publicStyleBean" property="arrawPostPic" value="0"><bean:message key="common.lybbs.forbid"/></logic:equal></b>
<li><bean:message key="jsp.post.tag.font"/> : <b><logic:equal name="publicStyleBean" property="arrawPostFontSize" value="1"><bean:message key="common.lybbs.allow"/></logic:equal><logic:equal name="publicStyleBean" property="arrawPostFontSize" value="0"><bean:message key="common.lybbs.forbid"/></logic:equal></b>
<li><bean:message key="jsp.post.tag.flash"/> : <b><logic:equal name="publicStyleBean" property="arrawPostFlash" value="1"><bean:message key="common.lybbs.allow"/></logic:equal><logic:equal name="publicStyleBean" property="arrawPostFlash" value="0"><bean:message key="common.lybbs.forbid"/></logic:equal></b>
<li><bean:message key="jsp.post.tag.media"/> : <b><logic:equal name="publicStyleBean" property="arrawPostMedia" value="1"><bean:message key="common.lybbs.allow"/></logic:equal><logic:equal name="publicStyleBean" property="arrawPostMedia" value="0"><bean:message key="common.lybbs.forbid"/></logic:equal></b>
<li><bean:message key="jsp.post.tag.bgsound"/> : <b><logic:equal name="publicStyleBean" property="arrawPostSound" value="1"><bean:message key="common.lybbs.allow"/></logic:equal><logic:equal name="publicStyleBean" property="arrawPostSound" value="0"><bean:message key="common.lybbs.forbid"/></logic:equal></b>
<li><a href="javascript:open_smilie_window(240,500)"><bean:message key="jsp.post.tag.emot"/></a>: <b><logic:equal name="statusBean" property="emotIconEnabled" value="true"><bean:message key="common.lybbs.allow"/></logic:equal><logic:equal name="statusBean" property="emotIconEnabled" value="false"><bean:message key="common.lybbs.forbid"/></logic:equal></b><br>
<logic:equal name="forumBean" property="htmlStat" value="1">
<input type=checkbox name='htmlSupport' value='1'><bean:message key="jsp.post.html.support"/><br>
</logic:equal>
<input type=checkbox name="showSignature" value="1" <logic:present name="topicBean" scope="request"><logic:equal name="topicBean" property="showSignature" value="1">checked</logic:equal></logic:present> <logic:notPresent name="topicBean">checked</logic:notPresent>><bean:message key="jsp.post.signature.show"/><br>
<input type=checkbox name="autoFilter" value="1" checked><bean:message key="jsp.post.autofilter"/><br>
</td>
<td class=forumColorTwo>
<TEXTAREA cols=80 name=content rows=10 title="<bean:message key="jsp.post.content.prompt"/>"></TEXTAREA><br>
<input type=button name=submit1 value="<bean:message key="common.lybbs.post"/>" onclick="checkPost()"> <input type="reset" name="Clear" value="<bean:message key="common.lybbs.clear"/>"> <logic:equal name="forumBean" property="htmlStat" value="1">[<a href="javascript:openHtmlEditor();"><bean:message key="jsp.post.htmleditor"/></a>] </logic:equal>[<a href="javascript:checklength(document.submitok);"><bean:message key="jsp.post.content.checklength"/></a>]
</td>
</tr>
</form>
</table>
</logic:equal>
</logic:equal>
</logic:greaterThan>
<br>
<lybbs:web key="foot"/>
<div style="display:none">
<form method=post name="addplayerlist" action="bbs_addPlayerList.do">
<input type="hidden" name="forumID" value="<%=forumID%>">
<input type="hidden" name="musicName" value="">
<input type="hidden" name="musicLink" value="">
</form>
</div>
<iframe id="lybbs_Composition" width=0 height=0></iframe>
<script language="JavaScript">
function checkPost() {
var isCheckedPost=true;
var maxContentLength=20000;
if(theform.content.value=='') {
alert("<bean:message key="error.message.send.content"/>");
theform.content.focus();
isCheckedPost=false;
}
else if(theform.content.value.length>maxContentLength) {
alert("<bean:message key="errors.maxlength" arg0="Content" arg1="20000"/>");
theform.content.focus();
isCheckedPost=false;
}
else {
theform.submit1.disabled=true;
<logic:equal name="forumBean" property="htmlStat" value="1">
if(theform.htmlSupport!=null && theform.htmlSupport.checked==true) {
isCheckedPost=lybbs_CheckData();
}
</logic:equal>
}
if(isCheckedPost) {
theform.submit();
}
}
function checklength(){alert("<bean:message key="jsp.post.content.length"/> "+theform.content.value.length+" <bean:message key="common.lybbs.byte"/>");}
function openHtmlEditor(){
newwin=window.open('bbs_commonForward.do?forward=postHtml','htmlEditor','width=696,height=420,left=150,top=100');
newwin.focus();
}
if(theform==null) init();
IframeID=lybbs_bIsIE5?frames["lybbs_Composition"]:document.getElementById("lybbs_Composition").contentWindow;
</script>
</body>
</html:html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -