📄 entryview.jsp
字号:
<%@ include file="Common.jsp" %><%!
//
// Filename: EntryView.jsp
// Generated with CodeCharge v.1.2.0
// JSP.ccp build 05/21/01
//
static final String sFileName = "EntryView.jsp";
static final String PageBODY = "bgcolor=\"#FFFFFF\" text=\"#000000\" link=\"#0000FF\" vlink=\"#800080\" alink=\"#FF0000\"";
static final String FormTABLE = "border=\"0\" cellspacing=\"0\" cellpadding=\"2\"";
static final String FormHeaderTD = "align=\"center\" bgcolor=\"#99CCFF\"";
static final String FormHeaderFONT = "style=\"font-size: 12pt; color: #000000; font-family: Arial, Tahoma, Verdana, Helvetica; font-weight: bold\"";
static final String FieldCaptionTD = "bgcolor=\"#FFFF99\"";
static final String FieldCaptionFONT = "style=\"font-size: 10pt; color: #000000; font-family: Arial, Tahoma, Verdana, Helvetica\"";
static final String DataTD = "bgcolor=\"#F5F5F5\"";
static final String DataFONT = "style=\"font-size: 10pt; color: #000000; font-family: Arial, Tahoma, Verdana, Helvetica\"";
static final String ColumnFONT = "style=\"font-size: 10pt; color: #000000; font-family: Arial, Tahoma, Verdana, Helvetica; font-weight: bold\"";
static final String ColumnTD = "bgcolor=\"#FFD9E5\"";
%><%
boolean bDebug = false;
String sAction = getParam( request, "FormAction");
String sForm = getParam( request, "FormName");
String sEntryViewErr = "";
java.sql.Connection conn = null;
java.sql.Statement stat = null;
String sErr = loadDriver();
conn = cn();
stat = conn.createStatement();
if ( ! sErr.equals("") ) {
try {
out.println(sErr);
}
catch (Exception e) {}
}
if ( sForm.equals("EntryView") ) {
sEntryViewErr = EntryViewAction(request, response, session, out, sAction, sForm, conn, stat);
if ( "sendRedirect".equals(sEntryViewErr)) return;
}
%>
<html>
<head>
<title>YellowPages</title>
<meta name="GENERATOR" content="YesSoftware CodeCharge v.1.2.0 / JSP.ccp build 05/21/01"/>
<meta http-equiv="pragma" content="no-cache"/>
<meta http-equiv="expires" content="0"/>
<meta http-equiv="cache-control" content="no-cache"/>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">
<jsp:include page="Header.jsp" flush="true"/>
<table>
<tr>
<td valign="top">
<% EntryView_Show(request, response, session, out, sEntryViewErr, sForm, sAction, conn, stat); %>
</td>
</tr>
</table>
<center><font face="Arial"><small>This dynamic site was generated with <a href="http://www.codecharge.com">CodeCharge</a></small></font></center>
</body>
</html>
<%%>
<%
if ( stat != null ) stat.close();
if ( conn != null ) conn.close();
%>
<%!
String EntryViewAction(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, javax.servlet.http.HttpSession session, javax.servlet.jsp.JspWriter out, String sAction, String sForm, java.sql.Connection conn, java.sql.Statement stat) throws java.io.IOException {
String sEntryViewErr ="";
try {
if (sAction.equals("")) return "";
String sSQL="";
String transitParams = "";
String primaryKeyParams = "";
String sQueryString = "";
String sPage = "";
String sParams = "";
String sActionFileName = "Entries.jsp";
String sWhere = " ";
boolean bErr = false;
long iCount = 0;
sParams = "?";
sParams += "address=" + toURL(getParam( request, "Trn_address")) + "&";
sParams += "name=" + toURL(getParam( request, "Trn_name")) + "&";
sParams += "city=" + toURL(getParam( request, "Trn_city")) + "&";
sParams += "zip=" + toURL(getParam( request, "Trn_zip")) + "&";
sParams += "state=" + toURL(getParam( request, "Trn_state")) + "&";
sParams += "category_id=" + toURL(getParam( request, "Trn_category_id"));
String pPKitem_id = "";
if (sAction.equalsIgnoreCase("cancel") ) {
try {
if ( stat != null ) stat.close();
if ( conn != null ) conn.close();
}
catch ( java.sql.SQLException ignore ) {}
response.sendRedirect (sActionFileName + sParams);
return "sendRedirect";
}
final int iinsertAction = 1;
final int iupdateAction = 2;
final int ideleteAction = 3;
int iAction = 0;
if ( sAction.equalsIgnoreCase("insert") ) { iAction = iinsertAction; }
if ( sAction.equalsIgnoreCase("update") ) { iAction = iupdateAction; }
if ( sAction.equalsIgnoreCase("delete") ) { iAction = ideleteAction; }
// Create WHERE statement
String flditem_id="";
String fldcategory_id="";
// Load all form fields into variables
sSQL = "";
// Create SQL statement
if ( sEntryViewErr.length() > 0 ) return sEntryViewErr;
try {
// Execute SQL statement
stat.executeUpdate(sSQL);
}
catch(java.sql.SQLException e) {
sEntryViewErr = e.toString(); return (sEntryViewErr);
}
try {
if ( stat != null ) stat.close();
if ( conn != null ) conn.close();
}
catch ( java.sql.SQLException ignore ) {}
response.sendRedirect (sActionFileName + sParams);
return "sendRedirect";
}
catch (Exception e) {out.println(e.toString()); }
return (sEntryViewErr);
}
void EntryView_Show(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, javax.servlet.http.HttpSession session, javax.servlet.jsp.JspWriter out, String sEntryViewErr, String sForm, String sAction, java.sql.Connection conn, java.sql.Statement stat) throws java.io.IOException {
try {
String sSQL="";
String sQueryString = "";
String sPage = "";
String sWhere = "";
String transitParams = "";
String transitParamsHidden = "";
String requiredParams = "";
String primaryKeyParams ="";
java.util.Hashtable rsHash = new java.util.Hashtable();
String pitem_id = "";
String fldcategory_id="";
String fldname="";
String fldaddress="";
String fldcity="";
String fldzip="";
String fldstate="";
String flditem_id="";
String fldphone="";
String fldemail="";
String fldurl="";
String fldnotes="";
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -