📄 post.jsp
字号:
<%@ page contentType="text/html; charset=GBK" %>
<%@ include file="../../lybbs/jsp/common/include/taglibs.jsp" %>
<html:html>
<head>
<title><lybbs:blog key="blogName"/></title>
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon">
<link rel="bookmark" href="favicon.ico" type="image/x-icon">
<%@ include file="../../lybbs/jsp/common/include/header.jsp" %>
<style type="text/css">
.titletd {
FONT-WEIGHT: bold; FONT-SIZE: 16px; COLOR: #282828
}
.titletable {
BORDER-RIGHT: #333333 1px dashed; BORDER-TOP: #333333 1px dashed; FILTER: Alpha(Opacity=65); BORDER-LEFT: #333333 1px dashed; BORDER-BOTTOM: #333333 1px dashed; BACKGROUND-COLOR: #ffffff
}
.gray {CURSOR:hand;filter:gray}
</style>
<SCRIPT language="JavaScript">
function copy(){
window.clipboardData.setData("Text", '<bean:write name="blogBean" property="url" scope="request"/>');
alert("地址已经保存到剪贴板");
}
function changeCatalogName(){
theform.catalogName.value=theform.catalogID.options[theform.catalogID.selectedIndex].text;
}
</SCRIPT>
<script language="javascript" src="lybbs/common/js/htmleditor.js" type="text/javascript"></script>
<script language="JavaScript">
var userAgent = navigator.userAgent.toLowerCase();
var is_ie = userAgent.indexOf('msie') != -1;
var text = "";
var AddTxt = "";
var theform;
helpstat = false;
stprompt = true;
basic = false;
var IframeID;
var lybbs_bIsIE5=document.all;
var word="<bean:message key="jsp.post.advpost.word"/>";
function init() {
theform=document.submitok;
}
function open_smilie_window(x_width, y_width) {
window.open("bbs_misc.do?action=showsmilies", "smilies", "statusbar=no,menubar=no,toolbar=no,scrollbars=yes,resizable=yes,width=" + x_width + ",height=" + y_width);
}
function thelp(swtch){
if (swtch == 1){ basic = false; stprompt = false; helpstat = true;} else if (swtch == 0) {helpstat = false;stprompt = false;basic = true;} else if (swtch == 2) {helpstat = false;basic = false;stprompt = true;}
}
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 smilie(smilietext) {
getActiveText();
var AddSmilie = " " + smilietext + " ";
AddText(AddSmilie);
}
function n_display(t_id) {
t_id.style.display="";
}
function h_display(t_id) {
t_id.style.display="none";
}
function setAccessary(accessary) {
if(theform==null) init();
theform.accessary.value=accessary;
//theform.updateAttachment.value=accessary;
document.getElementById("uploadcomment").style.display="inline";
}
function setAccessary2(accessary) {
//if(theform==null) init();
//theform.accessary.value=accessary;
}
function setAccessaryName(accessaryName) {
//theform.accessaryName.value=accessaryName;
}
function checkPost() {
var isCheckedPost=true;
var maxContentLength=20000;
if(theform.title!=null && theform.title.value=='') {
alert("<bean:message key="error.message.send.title"/>");
//theform.title.focus();
isCheckedPost=false;
}
else 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;
if(theform.htmlSupport!=null && theform.htmlSupport.checked==true) {
isCheckedPost=lybbs_CheckData();
}
}
if(isCheckedPost) {
theform.submit();
}
}
</script>
<script language="JavaScript">
function smilieopen() {javascript:openScript('bbs_misc.do?action=showsmilies',800,600);}
function viewlycode() {javascript:openScript('bbs_misc.do?action=lycode',800,600);}
function rm() {
if (helpstat) {
alert("<bean:message key="jsp.post.advpost.rm"/>");
}
else if (basic) {
lycode("rm","380,72","","");
}
else {
lycode("rm","380,72","<bean:message key="jsp.post.advpost.rm"/>","http://");
}
}
function mp() {
if (helpstat) {
alert("<bean:message key="jsp.post.advpost.wmphelp"/>");
}
else if (basic) {
lycode("mp","380,72","","");
}
else {
lycode("mp","380,72","<bean:message key="jsp.post.advpost.wmp"/>","http://");
}
}
function qt() {
if (helpstat) {
alert("<bean:message key="jsp.post.advpost.qthelp"/>");
}
else if (basic) {
lycode("qt","380,72","","");
}
else {
lycode("qt","380,72","<bean:message key="jsp.post.advpost.qt"/>","http://");
}
}
function email() {
if (helpstat) {
alert("<bean:message key="jsp.post.advpost.emailhelp"/>");
}
else if (basic) {
lycode("email","","","");
}
else {
lycode("email","","<bean:message key="jsp.post.advpost.email"/>","");
}
}
function showsize(size) {
if (helpstat) {alert("<bean:message key="jsp.post.advpost.sizehelp"/>");
}
else if (basic) {
lycode("size",size,"","");
}
else {
lycode("size",size,"<bean:message key="jsp.post.advpost.size"/>",word);
}
}
function bold() {
if (helpstat) {alert("<bean:message key="jsp.post.advpost.boldhelp"/>");
}
else if (basic) {
lycode("b","","","");
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -