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

📄 bbsedit.jsp

📁 GJM-OA网络自动化办公系统 Ver 0.02 (JSP Version)
💻 JSP
📖 第 1 页 / 共 3 页
字号:
<%@ page contentType="text/html;charset=gb2312" %>
<%@ include file="check.jsp" %>
<script language=javascript src="mouse.js"></script>

<%
String op = "4";
if(request.getParameter("op")!=null){
	op = request.getParameter("op");
}
String sid = request.getParameter("id");
int click =0;
String rurl = "bbsedit.jsp?id="+sid+"&op="+op;
//out.println(rurl);
if(op.compareTo("4")==0){	//录入//察看	

	String sql ="select * from bbs where ID="+sid+" order by time desc";
	sqlbean.executeQuery(sql);
	
	if(sqlbean.next()){
		
%>
<html>
<head>
<meta http-equiv="refresh" content="60;url=<%=rurl %>">
<script language=JavaScript>
function subchk(){
	if(document.form1.title.value==""){
		alert("请输入你的文章标题!\n");
		return  false;
	}
	if(document.form1.content.value==""){
		alert("请输入你的文章内容!\n");
		return  false;
	}
}
</script>
<title><%=sqlbean.getString("Subject")%></title>

<meta http-equiv="refresh" content="60;url=<%=rurl%>">
<link rel="stylesheet" href="oa.css">
<script language="JavaScript" src="MM_script.js"></script>
</head>
<body bgcolor="#efefef" topmargin="0" leftmargin="0" onLoad="MM_preloadImages('images/iwantanswer_on.gif','images/rarticle_on.gif','images/newarticle_on.gif','images/newarticle1_on.gif','images/close_on.gif','images/sendarticle_on.gif','images/rewrite_on.gif')">
  <table width="100%" border="0" cellspacing="0" cellpadding="0">
    <tr bgcolor="#4e5960"> 
      <td  class="heading"><b> <font color="#FFFFFF">讨论中心</font></b></td>
    </tr>
  </table>
  <table width="100%" border="0" cellspacing="1" cellpadding="2">
    <tr> 
      <td  class="heading" width="100%" colspan=3 bgcolor="#bfbfbf">
      <img src="images/<%=sqlbean.getString("pic")%>"><%=sqlbean.getString("Subject")%></td>
	  </tr>
	  
	  <tr>
      <td  class="heading" width="100%" colspan=3 bgcolor="#DFDFDF"> 
        <div align="center"><font  color=red><%=sqlbean.getString("Name")%></font>  发表于
        <font size="2"><i><font style='font-size:9pt;color:gray'>【<%=sqlbean.getString("time")%>】</font></i></font></div> 
      </td>
    </tr>
	<tr><td align=center  bgcolor="#ffffff">
	<table border=0 width=95%>
    <tr> 
      <td class="show"><%=sqlbean.getString("Content")%><br>
</td>
    </tr>
	</table>
	</td></tr>
    <tr> 
      <td colspan=3 class="show" align=right>    
      <a href="bbsedit.jsp?op=4&id=<%=sid %>" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image11','','images/refresh_off.gif',1)"><img name="Image11" border="0" src="images/refresh_on.gif" width="69" height="19" hspace="5"></a>
      <a href="bbsedit.jsp?op=1&id=<%=sid %>" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image12','','images/newarticle1_on.gif',1)"><img name="Image12" border="0" src="images/newarticle1_off.gif" width="69" height="19" hspace="5"></a>
      <a href="bbsedit.jsp?op=2&id=<%=sid %>" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image14','','images/rarticle_on.gif',1)"><img name="Image14" border="0" src="images/rarticle_off.gif" height="19" hspace="5"></a>
      <a href="Javascript:window.close();" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image13','','images/close1_on.gif',1)"><img name="Image13" border="0" src="images/close1_off.gif" width="69" height="19" hspace="5"></a></td>
    </tr>
     <tr bgcolor="#4e5960"> 
      <td  class="heading" colspan=3 height="21"><b> <font color="#FFFFFF">相关回帖</font></b></td>
    </tr>
 <%
 	click = sqlbean.getInt("click")+1;
	sql = "update bbs set click="+click+" where ID="+sid;
	sqlbean.executeUpdate(sql);
	
	//out.println(sql+" click="+click);		
 }
	sql="select * from bbs where SubjectId="+sid+" order by time desc";
    sqlbean.executeQuery(sql);

    while(sqlbean.next()){
	%>
    <tr> 
      <td bgcolor="#bfbfbf" class="heading" width="100%"  colspan="3"><img src="images/note1.gif"><%=sqlbean.getString("Subject")%></td>
	  </tr>
	  <tr>
      <td bgcolor="#dfdfdf" class="heading" width="100%"  colspan="3">
        <div align="center"><font size="2"><%=sqlbean.getString("Name")%></font>
		 <font size="2"><i><font style='font-size:9pt;color:gray'><%=sqlbean.getString("time")%></font></i></font></div>
      </td>
    </tr>
	
	
<tr><td align=center  bgcolor="#ffffff">
	<table border=0 width=95%>
    <tr> 
      <td width=95% colspan=3 class="show" bgcolor="#ffffff"><%=sqlbean.getString("Content")%></td>
    </tr>
	</table>
      </td>
    </tr>
	<%	} %>

          </table>   
      </td>   
    </tr>   
  </table> 
  <script language=javascript>
opener.location=opener.location;
</script>
<a  href="javaScript:window.close()"><img   border="0" src="images/close_1.gif"></a>   
</body>   
</html> 
<% }else if(op.compareTo("1")==0 || op.compareTo("2")==0){// 新加/回复 
	String title = "发表新帖";
	String kind = op;
	if(op.compareTo("2")==0){
		title = "发表回复";
	}
%>

<SCRIPT LANGUAGE="JavaScript">

helpstat = false;
stprompt = true;
basic = false;
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 AddText(NewCode) {
document.form1.content.value+=NewCode
}

function email() {
	if (helpstat) {
		alert("Email 标记\n插入 Email 超级链接\n用法1: [email]webmaster@aspsky.net[/email]\n用法2: [email=webmaster@aspsky.net]沙滩小子[/email]");
	} else if (basic) {
		AddTxt="[email][/email]";
		AddText(AddTxt);
	} else { 
		txt2=prompt("链接显示的文字.\n如果为空,那么将只显示你的 Email 地址",""); 
		if (txt2!=null) {
			txt=prompt("Email 地址.","name@domain.com");      
			if (txt!=null) {
				if (txt2=="") {
					AddTxt="[email]"+txt+"[/email]";
				} else {
					AddTxt="[email="+txt+"]"+txt2;
					AddText(AddTxt);
					AddTxt="[/email]";
				} 
				AddText(AddTxt);	        
			}
		}
	}
}
function flash() {
 	if (helpstat){
		alert("Flash 动画\n插入 Flash 动画.\n用法: [flash]Flash 文件的地址[/flash]");
	} else if (basic) {
		AddTxt="[flash][/flash]";
		AddText(AddTxt);
	} else {                  
		txt=prompt("Flash 文件的地址","http://");
		if (txt!=null) {             
			AddTxt="[flash]"+txt;
			AddText(AddTxt);
			AddTxt="[/flash]";
			AddText(AddTxt);
		}        
	}  
}

function showsize(size) {
	if (helpstat) {
		alert("文字大小标记\n设置文字大小.\n可变范围 1 - 6.\n 1 为最小 6 为最大.\n用法: [size="+size+"]这是 "+size+" 文字[/size]");
	} else if (basic) {
		AddTxt="[size="+size+"][/size]";
		AddText(AddTxt);
	} else {                       
		txt=prompt("大小 "+size,"文字"); 
		if (txt!=null) {             
			AddTxt="[size="+size+"]"+txt;
			AddText(AddTxt);
			AddTxt="[/size]";
			AddText(AddTxt);
		}        
	}
}

function bold() {
	if (helpstat) {
		alert("加粗标记\n使文本加粗.\n用法: [b]这是加粗的文字[/b]");
	} else if (basic) {
		AddTxt="[b][/b]";
		AddText(AddTxt);
	} else {  
		txt=prompt("文字将被变粗.","文字");     
		if (txt!=null) {           
			AddTxt="[b]"+txt;
			AddText(AddTxt);
			AddTxt="[/b]";
			AddText(AddTxt);
		}       
	}
}

function italicize() {
	if (helpstat) {
		alert("斜体标记\n使文本字体变为斜体.\n用法: [i]这是斜体字[/i]");
	} else if (basic) {
		AddTxt="[i][/i]";
		AddText(AddTxt);
	} else {   
		txt=prompt("文字将变斜体","文字");     
		if (txt!=null) {           
			AddTxt="[i]"+txt;
			AddText(AddTxt);
			AddTxt="[/i]";
			AddText(AddTxt);
		}	        
	}
}

function quote() {
	if (helpstat){
		alert("引用标记\n引用一些文字.\n用法: [quote]引用内容[/quote]");
	} else if (basic) {
		AddTxt="[quote][/quote]";
		AddText(AddTxt);
	} else {   
		txt=prompt("被引用的文字","文字");     
		if(txt!=null) {          
			AddTxt="[quote]"+txt;
			AddText(AddTxt);
			AddTxt="[/quote]";
			AddText(AddTxt);
		}	        
	}
}

function showcolor(color) {
	if (helpstat) {
		alert("颜色标记\n设置文本颜色.  任何颜色名都可以被使用.\n用法: [color="+color+"]颜色要改变为"+color+"的文字[/color]");
	} else if (basic) {
		AddTxt="[color="+color+"][/color]";
		AddText(AddTxt);
	} else {  
     	txt=prompt("选择的颜色是: "+color,"文字");
		if(txt!=null) {
			AddTxt="[color="+color+"]"+txt;
			AddText(AddTxt);        
			AddTxt="[/color]";
			AddText(AddTxt);
		} 
	}
}

function center() {
 	if (helpstat) {
		alert("对齐标记\n使用这个标记, 可以使文本左对齐、居中、右对齐.\n用法: [align=center|left|right]要对齐的文本[/align]");
	} else if (basic) {
		AddTxt="[align=center|left|right][/align]";
		AddText(AddTxt);
	} else {  
		txt2=prompt("对齐样式\n输入 'center' 表示居中, 'left' 表示左对齐, 'right' 表示右对齐.","center");               
		while ((txt2!="") && (txt2!="center") && (txt2!="left") && (txt2!="right") && (txt2!=null)) {
			txt2=prompt("错误!\n类型只能输入 'center' 、 'left' 或者 'right'.","");               
		}
		txt=prompt("要对齐的文本","文本");     
		if (txt!=null) {          
			AddTxt="\r[align="+txt2+"]"+txt;

⌨️ 快捷键说明

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