📄 add.jsp
字号:
<%@ page contentType="text/html;charset=GBK"%>
<%@ include file="/inc/pv/user.jsp"%>
<%@ include file="/inc/public/msg.jsp"%>
<%
String strOfficeStyle = site.bean.SitePara.strVirtualName + "/member/" + igec.util.CookieUtil.getCookieValue(request,site.bean.SitePara.strCookieUserTheme,"stand");
//获取个人的论坛帐号
String strBBSUserName = igec.site.base.business.DataUtilBusiness.getFieldValue("USERNAME","TAB_MEBBBSINFO","WHERE MEBID='" + user.getStrUserId() + "'");
if("ERROR".equals(strBBSUserName) || igec.util.Tool.IsEmpty(strBBSUserName)){
showMsg("您还没有开通论坛帐号或者获取您的论坛帐号出现异常!",request,response);
return;
}
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=GBK" />
<title> 会员办公室--<%=site.bean.SitePara.strWebTitle%> </title>
<link rel="stylesheet" rev="stylesheet" href="<%=strOfficeStyle%>/css/content.css" type="text/css" />
<link rel="stylesheet" rev="stylesheet" href="<%=strOfficeStyle%>/css/tree.css" type="text/css" />
<link rel="stylesheet" rev="stylesheet" href="<%=strOfficeStyle%>/css/mainframe.css" type="text/css" />
<script type="text/javascript" src="<%=site.bean.SitePara.strVirtualName%>/member/js/tree.jsp?baseurl=<%=strOfficeStyle%>"></script>
<script language="JavaScript" src="<%=site.bean.SitePara.strVirtualName%>/js/xmlhttp.js"></script>
<script language="JavaScript" src="<%=site.bean.SitePara.strVirtualName%>/member/js/public.js"></script>
<script language="JavaScript" src="<%=site.bean.SitePara.strBBSUrl%>/lybbs/common/js/board.js"></script>
<script language="javascript" src="<%=site.bean.SitePara.strBBSUrl%>/lybbs/common/js/htmleditor.js"></script>
<script language="javascript">
<!--
function onPublishFinished(strStatus){
if("ERROR"==strStatus){
alert("发布新文章失败,请稍后重试!");
document.submitok.submit1.disabled=false;
}else if("SUCCESS"==strStatus){
alert("发布新文章成功!");
parent.location = "<%=strOfficeStyle%>/bbs/article/?iid=<%=strMenuId%>";
}
}
//-->
</script>
<link rel="shortcut icon" href="<%=site.bean.SitePara.strVirtualName%>/favicon.ico">
</head>
<body>
<%@ include file="../../top.jsp"%>
<div id="screen">
<!--content-->
<div id="contentfloat">
<div id="content">
<!-- 开始正文内容 -->
<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 lybbs_bIsIE5=document.all;
var word="文字";
function init() {
theform=document.submitok;
}
function DoTitle(addTitle) {
var revisedTitle;
var currentTitle = document.submitok.title.value;
revisedTitle = addTitle+currentTitle;
document.submitok.title.value=revisedTitle;
document.submitok.title.focus();
return;
}
function open_smilie_window(x_width, y_width) {
window.open("<%=site.bean.SitePara.strBBSUrl%>/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 displayViewNumber() {
var viewMode=document.submitok.viewMode.options[document.submitok.viewMode.selectedIndex].value;
var t_id=document.submitok.viewNumber;
var t_id2=document.submitok.viewUserName;
if(viewMode==4 || viewMode==5 || viewMode==6) {
h_display(t_id2);
n_display(t_id);
}
else if(viewMode==7) {
h_display(t_id);
n_display(t_id2);
}
else {
h_display(t_id);
h_display(t_id2);
}
}
function setAccessary(accessary) {
if(theform==null) init();
theform.accessary.value=accessary;
theform.updateAttachment.value=accessary;
}
function setAccessary2(accessary) {
//if(theform==null) init();
theform.accessary.value=accessary;
}
function setAccessaryName(accessaryName) {
theform.accessaryName.value=accessaryName;
}
function votecondition(t_id,displayValue) {
t_id.style.display=displayValue;
}
function checkPost() {
var isCheckedPost=true;
var maxContentLength=20000;
if(theform.forumID!=null && (theform.forumID.value=='' || theform.forumID.value=='0')) {
alert("对应的论坛板块不能空");
theform.forumID.focus();
isCheckedPost=false;
}
else if(theform.title!=null && theform.title.value=='') {
alert("发送标题不能空");
theform.title.focus();
isCheckedPost=false;
}
else if(theform.content.value=='') {
alert("发送内容不能空");
theform.content.focus();
isCheckedPost=false;
}
else if(theform.content.value.length>maxContentLength) {
alert("Content 不能多于 20000 个字符。");
theform.content.focus();
isCheckedPost=false;
}
else {
if(theform.accessaryName.value.length==0) {
if(theform.content.value.indexOf("[/mp]")>0) {
setAccessaryName(".wmv");
}
else if(theform.content.value.indexOf("[/qt]")>0) {
setAccessaryName(".qt");
}
else if(theform.content.value.indexOf("[/rm]")>0) {
setAccessaryName(".rm");
}
}
theform.submit1.disabled=true;
}
if(isCheckedPost) {
theform.submit();
}
}
</script>
<table width="100%" border="0" align="center" class="TableContent">
<tr>
<td width="70" class="TableData"><strong>管理导航:</strong></td>
<td class="TableData"><a href="index.jsp?iid=<%=strMenuId%>">管理首页</a> | <a href="add.jsp?iid=<%=strMenuId%>"><font color="#FF0000">发布文章</font></a> | <a href="<%=site.bean.SitePara.strBBSUrl%>" target="_blank">进入论坛</a></td>
</tr>
</table>
<br>
<form method=post name=submitok action="<%=site.bean.SitePara.strBBSUrl%>/bbs_postSubmit.do" onkeydown="if(event.keyCode==13 && event.ctrlKey) checkPost()" target="lybbs_Composition">
<input type="hidden" name="topicID" value="0">
<input type="hidden" name="replyID" value="0">
<input type="hidden" name="accessary" value="0">
<input type="hidden" name="accessaryName" value="">
<input type="hidden" name="updateAttachment" value="0">
<input type=hidden name='action' value='new'>
<table width="100%" border="0" align="center" class="TableContent">
<tr>
<td height="22" class="TableLabel">
<b>论坛板块</b>
</td>
<td height="22" class="TableData">
<select name="forumID" id="forumID">
<option value="" selected>请选择相应的论坛板块</option>
<script language="javascript" src="<%=site.bean.SitePara.strVirtualName%>/dynamic/js/bbsType.jsp"></script>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -