?? tf_005finfo_005fupdate_jsp.java
字號(hào):
package org.apache.jsp.web_005fpage.ban_005fmian.banmian1;
import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import java.util.*;
import jinLing.info.*;
import jinLing.pub.*;
public final class tf_005finfo_005fupdate_jsp extends org.apache.jasper.runtime.HttpJspBase
implements org.apache.jasper.runtime.JspSourceDependent {
private static java.util.Vector _jspx_dependants;
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,
"../../pub_include/ErrPage.jsp", 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(" ");
request.setCharacterEncoding("gb2312");
out.write(" \r\n");
out.write(" ");
org.apache.jasper.runtime.JspRuntimeLibrary.include(request, response, "../../pub_include/pub_function_javascript.html", out, true);
out.write(" \r\n");
out.write(" \r\n");
out.write("<html>\r\n");
out.write("<head>\r\n");
out.write("<style>\r\n");
out.write("<!--\r\n");
out.write(".style2 {color: #FFFFFF}\r\n");
out.write("-->\r\n");
out.write("</style>\r\n");
out.write("<link rel=\"stylesheet\" type=\"text/css\" href=\"../../pub_include/hosc.css\">\r\n");
out.write("<link href=\"../../pub_include/body_css.css\" rel=\"stylesheet\" type=\"text/css\">\r\n");
out.write("<meta http-equiv=\"Content-Type\" content=\"text/html; charset=gb2312\"> \r\n");
out.write("<style type=\"text/css\">\r\n");
out.write("<!--\r\n");
out.write("body {\r\n");
out.write("\tbackground-color: #ffebbd;\r\n");
out.write("}\r\n");
out.write("-->\r\n");
out.write("</style></head> \r\n");
String INFO_TYPE = request.getParameter("INFO_TYPE").toString();
Collection col = null;
Hashtable list = new Hashtable();
list.put("INFO_TYPE",INFO_TYPE);
Info info=new Info();
//判斷增加修改
String optype = "1";
if(null != request.getParameter("optype") && !request.getParameter("optype").toString().equals(""))
optype=request.getParameter("optype").toString();
out.write(" \r\n");
out.write("<body leftmargin='0' topmargin='0' marginwidth='0' marginheight='0' background='../../images/bg.gif' >\r\n");
out.write(" <div align='center'>\r\n");
out.write(" <center>\r\n");
out.write(" <table border='0' cellpadding='0' cellspacing='0' style='border-collapse: collapse' bordercolor='#111111' width=98% >\r\n");
out.write(" <tr>\r\n");
out.write(" <td width='100%' height='10' align='center'></td>\r\n");
out.write(" </tr>\r\n");
out.write(" <tr>\r\n");
out.write(" <td width='100%' height='0' valign='top' align='center'>\r\n");
out.write(" <table width='100%' border='1' style='border-collapse: collapse; padding-left:5' bordercolor='#6595D6' cellpadding='0' cellspacing='0'> \r\n");
out.write("\t\t<tr class=\"table_biaoti\">\r\n");
out.write(" <td > 圖片 </td>\r\n");
out.write("\t\t\t<td > 鏈接 </td>\r\n");
out.write("\t\t\t<td width=\"5%\" > 刪除 </td>\r\n");
out.write("\t\t\t<td width=\"5%\"> 修改 </td>\r\n");
String pPageNo = "1";
if (null != request.getParameter("PAGENO") &&!request.getParameter("PAGENO").toString().trim().equals(""))
if (Integer.parseInt(request.getParameter("PAGENO"))<1)
pPageNo="1";
else
pPageNo=request.getParameter("PAGENO");
col = info.execSel(list,pPageNo,"5");
String pPageCount = String.valueOf(info.getRecordcount());
String allCount = pPageCount;
pPageCount = (Integer.parseInt(pPageCount)%5==0)?String.valueOf(Integer.parseInt(pPageCount)/5):String.valueOf(Integer.parseInt(pPageCount)/5+1);
if (Integer.parseInt(pPageCount)<Integer.parseInt(pPageNo))
pPageNo=pPageCount;
Iterator it = col.iterator();
while (it.hasNext())
{
Hashtable rs = (Hashtable) it.next();
out.write("\r\n");
out.write(" <tr class='table_list_lr'> \r\n");
out.write(" <td align=\"left\" > <img border=\"0\" src=../../../source/1/");
out.print(rs.get("INFO_CONTENT"));
out.write(" > </td>\r\n");
out.write("\t\t\t<td align=\"left\" > ");
out.print(rs.get("INFO_REMARK"));
out.write(" </td>\r\n");
out.write(" <!--刪除和修改還要傳一些條件參數(shù)-->\r\n");
out.write(" <td align='center' height='20' width='5%' valign='middle'> <img src='../../images/del.gif' width='18' height='18' border='0' style='cursor:hand' onClick=\"Del_ID('");
out.print(rs.get("INFO_ID"));
out.write("')\">\r\n");
out.write(" </td>\r\n");
out.write(" <td align='center' height='20' width='5%' valign='middle'>\r\n");
out.write(" <a href='tf_info_update.jsp?optype=2&INFO_TYPE=");
out.print(INFO_TYPE);
out.write("&INFO_ID=");
out.print(rs.get("INFO_ID"));
out.write("'> <img src='../../images/edit.gif' width='18' height='18' border='0' style='cursor:hand'>\r\n");
out.write(" </a>\r\n");
out.write(" </td>\r\n");
out.write(" </tr>\r\n");
out.write(" ");
}
out.write(" \r\n");
out.write(" </table> \r\n");
out.write(" <p></td> \r\n");
out.write(" </tr> \r\n");
out.write(" </table> \r\n");
out.write(" <table border='0' cellpadding='0' cellspacing='0' style='border-collapse: collapse' bordercolor='#111111' width=90% > \r\n");
out.write(" ");
String strpageno = "tf_info_update.jsp";
out.write(" \r\n");
out.write(" <form action='");
out.print(strpageno);
out.write("' method='POST' name='form_list'> \r\n");
out.write(" <tr> \r\n");
out.write(" <td height='17' valign='top' align='center'> </td> \r\n");
out.write(" <td height='17' valign='top' align='center'> \r\n");
String vFirstURL = strpageno;
String vPrevURL = strpageno+"?INFO_TYPE="+INFO_TYPE+"&PAGENO="+(Integer.parseInt(pPageNo)-1);
String vNextURL = strpageno+"?INFO_TYPE="+INFO_TYPE+"&PAGENO="+((Integer.parseInt(pPageCount)<(Integer.parseInt(pPageNo)+1))?(Integer.parseInt(pPageCount)):(Integer.parseInt(pPageNo)+1));
String vLastURL = strpageno+"?INFO_TYPE="+INFO_TYPE+"&PAGENO="+pPageCount;
out.write(" \r\n");
out.write(" <A onClick=\"PrevURLFun();\" style=\"cursor:hand \"> 上一頁 </A> \r\n");
out.write("\t\t<A onClick=\"NextURLFun();\" style=\"cursor:hand \"> 下一頁 </A> \r\n");
out.write("<script language=javascript>\r\n");
out.write(" function PrevURLFun()\r\n");
out.write(" {\r\n");
out.write(" self.location = \"");
out.print(vPrevURL);
out.write("\";\r\n");
out.write("\t return true;\r\n");
out.write(" }\r\n");
out.write(" function NextURLFun()\r\n");
out.write(" {\r\n");
out.write(" self.location = \"");
out.print(vNextURL);
out.write("\";\r\n");
out.write("\t return true;\r\n");
out.write(" }\r\n");
out.write("\r\n");
out.write("</script> \r\n");
out.write(" </td> \r\n");
out.write(" </tr> \r\n");
out.write(" </form> \r\n");
out.write(" </table> \r\n");
out.write("</center> \r\n");
out.write("</div> \r\n");
out.write("<script language=\"javascript\"> \r\n");
out.write(" function onCommit() //回車鍵后觸發(fā) \r\n");
out.write(" { \r\n");
out.write(" var p = document.form_list.PAGENO.value; \r\n");
out.write(" //輸入頁數(shù)若大于總頁數(shù),則跳到最后一頁 \r\n");
out.write(" if(parseInt(p)>");
out.print(Integer.parseInt(pPageCount));
out.write(") \r\n");
out.write(" document.form_list.PAGENO.value = ");
out.print(Integer.parseInt(pPageCount));
out.write(" \r\n");
out.write(" if (window.event.keyCode==13) \r\n");
out.write(" { \r\n");
out.write(" document.form_list.submit(); \r\n");
out.write(" } \r\n");
out.write(" } \r\n");
out.write(" //接收上面?zhèn)鱽淼奈ㄒ籄_ID值付給pval \r\n");
out.write(" function Del_ID(pval) \r\n");
out.write(" { \r\n");
out.write(" if (window.confirm(\"您確認(rèn)刪除嗎?\")) \r\n");
out.write(" { \r\n");
out.write(" self.location = \"tf_info_del.jsp?INFO_ID=\"+pval+\"&INFO_TYPE=");
out.print(INFO_TYPE);
out.write("\"; \r\n");
out.write(" return true; \r\n");
out.write(" } \r\n");
out.write(" return false; \r\n");
out.write(" } \r\n");
out.write("</script> \r\n");
out.write(" </td> \r\n");
out.write(" </tr> \r\n");
out.write("</table> \r\n");
out.write("</center> \r\n");
out.write("</div> \r\n");
out.write("</center> \r\n");
out.write("</div> \r\n");
String INFO_ID= "" ; //INFO_ID
String INFO_CONTENT= "" ; //INFO_CONTENT
String INFO_REMARK= "" ;
int type=Integer.parseInt(optype);
if(type==2)
{
if(null != request.getParameter("INFO_ID") && !request.getParameter("INFO_ID").toString().equals(""))
{
INFO_ID = request.getParameter("INFO_ID").toString();
list.put("INFO_ID",INFO_ID);
col = info.execSel(list);
Iterator ir = col.iterator();
Hashtable tt = new Hashtable();
if (ir.hasNext())
{
tt=(Hashtable)ir.next();
INFO_TYPE = Util.getNulltoStr(tt.get("INFO_TYPE")); // INFO_TYPE
INFO_CONTENT = Util.getNulltoStr(tt.get("INFO_CONTENT")); // INFO_CONTENT
INFO_REMARK= Util.getNulltoStr(tt.get("INFO_REMARK"));
}
}
}
out.write("\r\n");
out.write("<br>\r\n");
out.write("\r\n");
out.write(" <div align=\"center\">\r\n");
out.write(" <center>\r\n");
out.write(" <table width='95%' border='1' cellpadding='0' cellspacing='0' style='border-collapse: collapse' bordercolor='#111111'>\r\n");
out.write(" <tr>\r\n");
out.write(" <td class='table_list' width=\"25%\">圖片:\r\n");
out.write(" <!--input type='TEXT' onkeydown = 'nextInput()' name='INFO_CONTENT' size='25' value='");
out.print(INFO_CONTENT);
out.write("' -->\t\t\t</td>\r\n");
out.write(" <td class='table_list'><div align=\"left\">\r\n");
out.write("<IFRAME id=\"up\" style=' VISIBILITY: inherit; WIDTH: 100%; HEIGHT:50' \r\n");
out.write(" src=\"fileform.jsp\" frameBorder=0 height=\"130\"></IFRAME > \r\n");
out.write(" </div></td>\r\n");
out.write("\r\n");
out.write("<form action=\"tf_info_java.jsp\" name=\"form_query\" method=\"post\" onSubmit=\"document.dealfile.submit()\" >\r\n");
out.write(" <input name=\"optype\" type=\"hidden\" value=\"");
out.print(optype);
out.write("\" >\r\n");
out.write(" <input name=\"INFO_ID\" type=\"hidden\" value=\"");
out.print(INFO_ID);
out.write("\">\r\n");
out.write(" <input type='hidden' onKeyDown = 'nextInput()' name='INFO_TYPE' size='25' value='");
out.print(INFO_TYPE);
out.write("' >\r\n");
out.write(" <input name=\"filename\" type=\"hidden\" >\r\n");
out.write(" \r\n");
out.write(" <tr>\r\n");
out.write(" <td class='table_list'>鏈接: </td>\r\n");
out.write(" <td class='table_list'><div align=\"left\">\r\n");
out.write(" <textarea onKeyDown = 'nextInput()' cols='30' name='INFO_REMARK' >");
out.print(INFO_REMARK);
out.write("</textarea>\r\n");
out.write(" </div></td>\r\n");
out.write("</form>\r\n");
out.write(" </table> \r\n");
out.write("</center> \r\n");
out.write("</div> \r\n");
out.write("<br> \r\n");
out.write(" \r\n");
out.write("<script language=javascript>\r\n");
out.write("function ActionStatus()\r\n");
out.write("{\r\n");
out.write(" return check_input();\r\n");
out.write(" }\r\n");
out.write("function check_input(){\r\n");
out.write(" var type=true;\r\n");
out.write(" type=check_null(document.form_query.INFO_REMARK,'請(qǐng)輸入鏈接!!')\r\n");
out.write(" if (!type)\r\n");
out.write(" {\r\n");
out.write(" return false;\r\n");
out.write(" }\r\n");
out.write(" return true;\r\n");
out.write(" }\r\n");
out.write(" </script>\r\n");
out.write(" \r\n");
out.write(" </body>\r\n");
out.write(" </html>\r\n");
} catch (Throwable t) {
if (!(t instanceof SkipPageException)){
out = _jspx_out;
if (out != null && out.getBufferSize() != 0)
out.clearBuffer();
if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);
}
} finally {
if (_jspxFactory != null) _jspxFactory.releasePageContext(_jspx_page_context);
}
}
}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -