?? bbsadd_jsp.java
字號:
package org.apache.jsp.web.jsp;
import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import java.io.*;
import java.util.*;
import java.sql.*;
import javax.servlet.*;
import javax.servlet.http.*;
public final class bbsadd_jsp extends org.apache.jasper.runtime.HttpJspBase
implements org.apache.jasper.runtime.JspSourceDependent {
public String getServletInfo() {
return "database handler";
}
private static java.util.Vector _jspx_dependants;
static {
_jspx_dependants = new java.util.Vector(1);
_jspx_dependants.add("/web/jsp/incdb.jsp");
}
public java.util.List getDependants() {
return _jspx_dependants;
}
public void _jspService(HttpServletRequest request, HttpServletResponse response)
throws java.io.IOException, ServletException {
JspFactory _jspxFactory = null;
PageContext pageContext = null;
HttpSession session = null;
ServletContext application = null;
ServletConfig config = null;
JspWriter out = null;
Object page = this;
JspWriter _jspx_out = null;
PageContext _jspx_page_context = null;
try {
_jspxFactory = JspFactory.getDefaultFactory();
response.setContentType("text/html; charset=gb2312");
pageContext = _jspxFactory.getPageContext(this, request, response,
null, true, 8192, true);
_jspx_page_context = pageContext;
application = pageContext.getServletContext();
config = pageContext.getServletConfig();
session = pageContext.getSession();
out = pageContext.getOut();
_jspx_out = out;
out.write("\r\n");
out.write("\r\n");
request.setCharacterEncoding("GB2312");
out.write('\r');
out.write('\n');
out.write("<!--?aê?μ?è?packages-->\r\n");
out.write("\r\n");
out.write("\r\n");
out.write("\r\n");
out.write("\r\n");
out.write("\r\n");
out.write("\r\n");
out.write("<!--μ?è??áê?-->");
out.write('\r');
out.write('\n');
twm.bbsuser user = null;
synchronized (_jspx_page_context) {
user = (twm.bbsuser) _jspx_page_context.getAttribute("user", PageContext.PAGE_SCOPE);
if (user == null){
user = new twm.bbsuser();
_jspx_page_context.setAttribute("user", user, PageContext.PAGE_SCOPE);
}
}
out.write('\r');
out.write('\n');
twm.bbs bbs = null;
synchronized (_jspx_page_context) {
bbs = (twm.bbs) _jspx_page_context.getAttribute("bbs", PageContext.PAGE_SCOPE);
if (bbs == null){
bbs = new twm.bbs();
_jspx_page_context.setAttribute("bbs", bbs, PageContext.PAGE_SCOPE);
}
}
out.write('\r');
out.write('\n');
twm.bbsboard board = null;
synchronized (_jspx_page_context) {
board = (twm.bbsboard) _jspx_page_context.getAttribute("board", PageContext.PAGE_SCOPE);
if (board == null){
board = new twm.bbsboard();
_jspx_page_context.setAttribute("board", board, PageContext.PAGE_SCOPE);
}
}
out.write('\r');
out.write('\n');
String strSQL;// '執行的SQL語句
java.sql.ResultSet sqlRst; //'ADODB RECORDSE 對象
int boardid;
String tempSTR,whereTo;
byte[] tmpbyte;
String tt; // '錯誤變量
boardid=0;
tempSTR=request.getParameter("boardid");
boardid=java.lang.Integer.parseInt(tempSTR);
tt=request.getParameter("tt");
if (tt==null){
tt="";
}
out.write("\r\n");
out.write("<html>\r\n");
out.write("\r\n");
out.write("<head>\r\n");
out.write("<meta http-equiv=\"Content-Language\" content=\"zh-cn\">\r\n");
out.write("<meta http-equiv=\"Content-Type\" content=\"text/html; charset=gb2312\">\r\n");
out.write("<title>加貼</title>\r\n");
out.write("<link rel=\"stylesheet\" type=\"text/css\" href=\"bbs03.css\">\r\n");
out.write("</head>\r\n");
out.write("<body>\r\n");
out.write("<script Language=\"JavaScript\">\r\n");
out.write("<!--\r\n");
out.write("function isspacestring(mystring)\r\n");
out.write("//是否為空格字符串;true為空,FALSE為非空\r\n");
out.write("{\r\n");
out.write(" var istring=mystring;\r\n");
out.write(" var temp,i,strlen;\r\n");
out.write(" temp=true;\r\n");
out.write(" strlen=istring.length;\r\n");
out.write(" for (i=0;i<strlen;i++)\r\n");
out.write(" {\r\n");
out.write(" if ((istring.substring(i,i+1)!=\" \")&(temp))\r\n");
out.write(" { temp=false; }\r\n");
out.write(" }\r\n");
out.write(" return temp;\r\n");
out.write("}\r\n");
out.write("\r\n");
out.write("function firstisspace(mystring)\r\n");
out.write("//檢查首字母是否是空格,TRUE首字母為空格;FALSE首字母不為空格\r\n");
out.write("{ \r\n");
out.write(" var istring=mystring;\r\n");
out.write(" var temp,i;\r\n");
out.write(" temp=true;\r\n");
out.write(" if (istring.substring(0,1)!=\" \")\r\n");
out.write(" { temp=false; }\r\n");
out.write(" return temp;\r\n");
out.write("}\r\n");
out.write("\r\n");
out.write("function isemail(mystring)\r\n");
out.write("{\r\n");
out.write(" var istring=mystring;\r\n");
out.write(" var atpos=mystring.indexOf(\"@\");\r\n");
out.write(" var temp=true;\r\n");
out.write(" if (atpos==-1) //email中沒有@符號;不正確的EMAIL\r\n");
out.write(" {\r\n");
out.write(" temp=false;\r\n");
out.write(" }\r\n");
out.write(" return temp;\r\n");
out.write("}\r\n");
out.write("\r\n");
out.write("\r\n");
out.write("function check_input(theForm)\r\n");
out.write("{\r\n");
out.write("\r\n");
out.write(" if ((theForm.username.value == \"\")|(isspacestring(theForm.username.value)))\r\n");
out.write(" {\r\n");
out.write(" alert(\"請輸入正確的用戶名.\");\r\n");
out.write(" theForm.username.focus();\r\n");
out.write(" return (false);\r\n");
out.write(" }\r\n");
out.write("\r\n");
out.write(" if ((theForm.userpassword.value == \"\")|(isspacestring(theForm.userpassword.value)))\r\n");
out.write(" {\r\n");
out.write(" alert(\"請輸入密碼.\");\r\n");
out.write(" theForm.userpassword.focus();\r\n");
out.write(" return (false);\r\n");
out.write(" }\r\n");
out.write("\r\n");
out.write(" if ((theForm.bbstopic.value == \"\")|(isspacestring(theForm.bbstopic.value)))\r\n");
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -