%@ include file="setconn.jsp" %>
<%@ page import="java.sql.*, javax.sql.*, oracle.jdbc.pool.*, javax.servlet.*, javax.servlet.http.* ,java.io.* , java.util.*, oracle.sql.* " %>
<%@ page import="java.text.*" %>
<%
String t_filename ="";
String t_pathname ="";
String t_request_data = request.getPathInfo();
int t_end = t_request_data.length();
int t_f_end = t_end;
if ( t_f_end > 4 ) {
t_f_end -= 4;
}
boolean get_filename = false;
boolean get_pathname = false;
for ( int i = t_request_data.length() - 2; i > -1 ; i-- ) {
if ( t_request_data.substring(i, i+1).equals("/") ) {
if ( !get_filename ) {
t_filename = t_request_data.substring( i+1,t_f_end);
get_filename = true;
t_end = i;
} else if ( !get_pathname ) {
t_pathname = t_request_data.substring( i+1,t_end);
get_pathname = true;
break;
}
}
}
int id = 0;
int listno = 0;
String saleusername = "";
String typeprop = "";
String contphone = "";
String cextphone = "";
String showcont = "";
String email = "";
String contname = "";
String address = "";
String city = "";
String state = "";
String zip = "";
String maddress = "";
String mcity = "";
String mstate = "";
String mzip = "";
String desc = "";
String url = "";
String toururl = "";
String showemail = "";
String contlast = "";
String welagent ="";
String noagent = "";
int numfloor = 0;
String tfloor ="";
int numbed = 0;
String tbed ="";
float numbath = 0;
String tbath ="";
int numfire = 0;
String tfire ="";
int numgar = 0;
String tgar ="";
String price = "";
String tprice ="";
int totsqu = 0;
String ttotsqu ="";
int yrbuilt = 0;
String tyrbuilt ="";
String schdist = "";
String neighbo ="";
String hpool ="";
String hjacuzzi ="";
String hbasement ="";
String htennisco ="";
String hpatio ="";
String hbalcony ="";
String halarm ="";
String hwoodflr ="";
String haircond ="";
String hdwasher ="";
String hdisposal ="";
String tgarage ="";
String theat ="";
String tcool ="";
String tsewer ="";
String mainpict ="";
String maindesc ="";
String pict1 ="";
String nampict1 ="";
String desc1 ="";
String pict2 ="";
String nampict2 ="";
String desc2 ="";
String pict3 ="";
String nampict3 ="";
String desc3 ="";
String pict4 ="";
String nampict4 ="";
String desc4 ="";
String sql = "";
/*
try {
saleusername = request.getParameter("saleusername");
}
catch (Exception e1 )
{
System.err.println (" Saleusername Error : " + e1.getMessage());
}
try {
id = Integer.valueOf(request.getParameter("id")).intValue();
}
catch (Exception e)
{
e.printStackTrace();
}
*/
try
{
// out.println("bbbbbbbb ");
Connection conn = cods.getConnection();
// out.println("aaaaaa " + username);
sql = " select nvl(typeprop,'null'),nvl(email,'null'),nvl(contname,'null'),"
+ " nvl(address,'null'),trim(trailing ' ' from initcap(city)),nvl(state,'null'),nvl(zip,'null'),"
+ " nvl(descdata,'null'),nvl(url,'null'),nvl(toururl,'null'),"
+ " nvl(numfloor,0),nvl(numbed,0),nvl(numbath,0),nvl(numfire,0),nvl(numgar,0),"
+ " to_char(nvl(price,0),'9999G999G999G999'),nvl(totsqu,0),nvl(yrbuilt,0),"
+ " nvl(schdist,'null'),nvl(neighbo,'null'),"
+ " nvl(hpool,'N'),nvl(hjacuzzi,'N'),nvl(hbasement,'N'),nvl(htennisco,'N'),nvl(hpatio,'N'),"
+ " nvl(hbalcony,'N'),nvl(halarm,'N'),nvl(hwoodflr,'N'),nvl(haircond,'N'),nvl(hdwasher,'N'),nvl(hdisposal,'N'), "
+ " nvl(contphone,'null'),nvl(cextphone,'null'), nvl(showcont,'n'),"
+ " nvl(contlast,'null'), nvl(showemail,'n'), "
+ " nvl(tgarage,'0'),nvl(theat,'0'),nvl(tcool,'0'),nvl(tsewer,'0'), "
+ " nvl(mainpict,'null'),nvl(maindesc,'null'),"
+ " nvl(pict1,'null'),nvl(nampict1,'null'),nvl(desc1,'null'),"
+ " nvl(pict2,'null'),nvl(nampict2,'null'),nvl(desc2,'null'),"
+ " nvl(pict3,'null'),nvl(nampict3,'null'),nvl(desc3,'null'),"
+ " nvl(pict4,'null'),nvl(nampict4,'null'),nvl(desc4,'null'),"
+ " nvl(welagent,'null'),nvl(noagent,'null'), nvl(listno,'0') "
+ " from V_ALL_HOME where LISTNO = "
+ t_filename;
// out.println(sql);
Statement stmt = conn.createStatement ();
ResultSet rset = stmt.executeQuery (sql);
if (rset.next()) {
try {
if (!rset.getString(1).equals("null"))
typeprop=rset.getString(1) ;
else
typeprop = "";
} catch(Exception e) {
System.out.println("Exception(select,qry):"+e);
}
try {
if (!rset.getString(2).equals("null"))
email=rset.getString(2) ;
else
email = "";
} catch(Exception e) {
System.out.println("Exception(select,qry):"+e);
}
try {
if (!rset.getString(3).equals("null"))
contname=rset.getString(3) ;
else
contname = "";
} catch(Exception e) {
System.out.println("Exception(select,qry):"+e);
}
try {
if (!rset.getString(4).equals("null"))
maddress=rset.getString(4) ;
else
maddress = "";
} catch(Exception e) {
System.out.println("Exception(select,qry):"+e);
}
try {
if (!rset.getString(5).equals("null"))
mcity=rset.getString(5) ;
else
mcity = "";
} catch(Exception e) {
System.out.println("Exception(select,qry):"+e);
}
try {
if (!rset.getString(6).equals("null"))
mstate=rset.getString(6) ;
else
mstate = "";
} catch(Exception e) {
System.out.println("Exception(select,qry):"+e);
}
try {
if (!rset.getString(7).equals("null"))
mzip=rset.getString(7) ;
else
mzip = "";
} catch(Exception e) {
System.out.println("Exception(select,qry):"+e);
}
try {
if (!rset.getString(8).equals("null"))
desc=rset.getString(8) ;
else
desc = "";
} catch(Exception e) {
System.out.println("Exception(select,qry):"+e);
}
try {
if (!rset.getString(9).equals("null"))
url=rset.getString(9) ;
else
url = "";
} catch(Exception e) {
System.out.println("Exception(select,qry):"+e);
}
try {
if (!rset.getString(10).equals("null"))
toururl=rset.getString(10) ;
else
toururl = "";
} catch(Exception e) {
System.out.println("Exception(select,qry):"+e);
}
try {
if (rset.getInt(11) != 0)
numfloor=rset.getInt(11) ;
else
numfloor = 0;
} catch(Exception e) {
System.out.println("Exception(select,qry):"+e);
}
if ( numfloor == 0 ) {
tfloor = "";
} else if ( numfloor == 1 ) {
tfloor = "1";
} else if ( numfloor == 2 ) {
tfloor = "2";
} else if ( numfloor == 3 ) {
tfloor = "3";
} else {
tfloor = "More than 3";
}
try {
if (rset.getInt(12) != 0)
numbed=rset.getInt(12) ;
else
numbed = 0;
} catch(Exception e) {
System.out.println("Exception(select,qry):"+e);
}
if ( numbed == 0 ) {
tbed = "";
} else if ( numbed == 1 ) {
tbed = "1";
} else if ( numbed == 2 ) {
tbed = "2";
} else if ( numbed == 3 ) {
tbed = "3";
} else if ( numbed == 4 ) {
tbed = "4";
} else if ( numbed == 5 ) {
tbed = "5";
} else if ( numbed == 6 ) {
tbed = "6";
} else {
tbed = "More than 6";
}
try {
if (rset.getInt(13) != 0) {
numbath=rset.getInt(13) ;
} else
numbath = (float) 0;
} catch(Exception e) {
System.out.println("Exception(select,qry):"+e);
}
if ( numbath == 0 ) {
tbath = "";
} else if ( numbath == 100 ) {
tbath = "1";
} else if ( numbath == 150 ) {
tbath = "1.5";
} else if ( numbath == 175 ) {
tbath = "1.75";
} else if ( numbath == 200 ) {
tbath = "2";
} else if ( numbath == 250 ) {
tbath = "2.5";
} else if ( numbath == 275 ) {
tbath = "2.75";
} else if ( numbath == 300 ) {
tbath = "3";
} else if ( numbath == 350 ) {
tbath = "3.5";
} else if ( numbath == 375 ) {
tbath = "3.75";
} else if ( numbath == 400 ) {
tbath = "4";
} else {
tbath = "More than 4";
}
try {
if (rset.getInt(14) != 0)
numfire=rset.getInt(14) ;
else
numfire = 0;
} catch(Exception e) {
System.out.println("Exception(select,qry):"+e);
}
if ( numfire == 0 ) {
tfire = "";
} else if ( numfire == 1 ) {
tfire = "1";
} else if ( numfire == 2 ) {
tfire = "2";
} else if ( numfire == 3 ) {
tfire = "3";
} else if ( numfire == 4 ) {
tfire = "4";
} else {
tfire = "More than 4";
}
try {
if (rset.getInt(15) != 0)
numgar=rset.getInt(15) ;
else
numgar = 0;
} catch(Exception e) {
System.out.println("Exception(select,qry):"+e);
}
if ( numgar == 0 ) {
tgar = "";
} else if ( numgar == 1 ) {
tgar = "1";
} else if ( numgar == 2 ) {
tgar = "2";
} else if ( numgar == 3 ) {
tgar = "3";
} else if ( numgar == 4 ) {
tgar = "4";
} else {
tgar = "More than 4";
}
try {
if (!rset.getString(16).equals(" 0"))
price=rset.getString(16) ;
else
price = "0";
} catch(Exception e) {
System.out.println("Exception(select,qry):"+e);
}
if ( price.equals("0") ) {
price = "";
} else {
tprice = "$" + price ;
}
try {
if (rset.getInt(17) != 0)
totsqu=rset.getInt(17) ;
else
totsqu = 0;
} catch(Exception e) {
System.out.println("Exception(select,qry):"+e);
}
if ( totsqu == 0 ) {
ttotsqu = "";
} else {
ttotsqu = Integer.toString(totsqu);
}
try {
if (rset.getInt(18) != 0)
yrbuilt=rset.getInt(18) ;
else
yrbuilt = 0;
} catch(Exception e) {
System.out.println("Exception(select,qry):"+e);
}
if ( yrbuilt == 0 ) {
tyrbuilt = "";
} else {
tyrbuilt = Integer.toString(yrbuilt);
}
try {
if (!rset.getString(19).equals("null"))
schdist=rset.getString(19) ;
else
schdist = "";
} catch(Exception e) {
System.out.println("Exception(select,qry):"+e);
}
try {
if (!rset.getString(20).equals("null"))
neighbo=rset.getString(20) ;
else
neighbo = "";
} catch(Exception e) {
System.out.println("Exception(select,qry):"+e);
}
try {
if (!rset.getString(21).equals("N"))
hpool=rset.getString(21) ;
else
hpool = "N";
} catch(Exception e) {
System.out.println("Exception(select,qry):"+e);
}
try {
if (!rset.getString(22).equals("N"))
hjacuzzi=rset.getString(22) ;
else
hjacuzzi = "N";
} catch(Exception e) {
System.out.println("Exception(select,qry):"+e);
}
try {
if (!rset.getString(23).equals("N"))
hbasement=rset.getString(23) ;
else
hbasement = "N";
} catch(Exception e) {
System.out.println("Exception(select,qry):"+e);
}
try {
if (!rset.getString(24).equals("N"))
htennisco=rset.getString(24) ;
else
htennisco = "N";
} catch(Exception e) {
System.out.println("Exception(select,qry):"+e);
}
try {
if (!rset.getString(25).equals("N"))
hpatio=rset.getString(25) ;
else
hpatio = "N";
} catch(Exception e) {
System.out.println("Exception(select,qry):"+e);
}
try {
if (!rset.getString(26).equals("N"))
hbalcony=rset.getString(26) ;
else
hbalcony = "N";
} catch(Exception e) {
System.out.println("Exception(select,qry):"+e);
}
try {
if (!rset.getString(27).equals("N"))
halarm=rset.getString(27) ;
else
halarm = "N";
} catch(Exception e) {
System.out.println("Exception(select,qry):"+e);
}
try {
if (!rset.getString(28).equals("N"))
hwoodflr=rset.getString(28) ;
else
hwoodflr = "N";
} catch(Exception e) {
System.out.println("Exception(select,qry):"+e);
}
try {
if (!rset.getString(29).equals("N"))
haircond=rset.getString(29) ;
else
haircond = "N";
} catch(Exception e) {
System.out.println("Exception(select,qry):"+e);
}
try {
if (!rset.getString(30).equals("N"))
hdwasher=rset.getString(30) ;
else
hdwasher = "N";
} catch(Exception e) {
System.out.println("Exception(select,qry):"+e);
}
try {
if (!rset.getString(31).equals("N"))
hdisposal=rset.getString(31) ;
else
hdisposal = "N";
} catch(Exception e) {
System.out.println("Exception(select,qry):"+e);
}
try {
if (!rset.getString(32).equals("null"))
contphone=rset.getString(32) ;
else
contphone = "";
} catch(Exception e) {
System.out.println("Exception(select,qry):"+e);
}
try {
if (!rset.getString(33).equals("null"))
cextphone=rset.getString(33) ;
else
cextphone = "";
} catch(Exception e) {
System.out.println("Exception(select,qry):"+e);
}
try {
if (!rset.getString(34).equals("N"))
showcont=rset.getString(34) ;
else
showcont = "N";
} catch(Exception e) {
System.out.println("Exception(select,qry):"+e);
}
try {
if (!rset.getString(35).equals("null"))
contlast=rset.getString(35) ;
else
contlast = "";
} catch(Exception e) {
System.out.println("Exception(select,qry):"+e);
}
try {
if (!rset.getString(36).equals("N"))
showemail=rset.getString(36) ;
else
showemail = "N";
} catch(Exception e) {
System.out.println("Exception(select,qry):"+e);
}
if ( showcont.equals("N") ) {
contphone = "";
cextphone = "";
}
if ( showemail.equals("N") ) {
email = "";
}
try {
if (rset.getString(37) != "0")
tgarage=rset.getString(37) ;
else
tgarage = "0";
} catch(Exception e) {
System.out.println("Exception(select,qry):"+e);
}
try {
if (rset.getString(38) != "0")
theat=rset.getString(38) ;
else
theat = "0";
} catch(Exception e) {
System.out.println("Exception(select,qry):"+e);
}
try {
if (rset.getString(39) != "0")
tcool=rset.getString(39) ;
else
tcool = "0";
} catch(Exception e){
System.out.println("Exception(select,qry):"+e);
}
try {
if (rset.getString(40) != "0")
tsewer=rset.getString(40) ;
else
tsewer = "0";
} catch(Exception e) {
System.out.println("Exception(select,qry):"+e);
}
try {
if (!rset.getString(41).equals("null"))
mainpict=rset.getString(41) ;
else
mainpict = "";
} catch(Exception e) {
System.out.println("Exception(select,qry):"+e);
}
try {
if (!rset.getString(42).equals("null"))
maindesc=rset.getString(42) ;
else
maindesc = "";
} catch(Exception e) {
System.out.println("Exception(select,qry):"+e);
}
try {
if (!rset.getString(43).equals("null"))
pict1=rset.getString(43) ;
else
pict1 = "";
} catch(Exception e) {
System.out.println("Exception(select,qry):"+e);
}
try {
if (!rset.getString(44).equals("null"))
nampict1=rset.getString(44) ;
else
nampict1 = "";
} catch(Exception e) {
System.out.println("Exception(select,qry):"+e);
}
try {
if (!rset.getString(45).equals("null"))
desc1=rset.getString(45) ;
else
desc1 = "";
} catch(Exception e) {
System.out.println("Exception(select,qry):"+e);
}
try {
if (!rset.getString(46).equals("null"))
pict2=rset.getString(46) ;
else
pict2 = "";
} catch(Exception e) {
System.out.println("Exception(select,qry):"+e);
}
try {
if (!rset.getString(47).equals("null"))
nampict2=rset.getString(47) ;
else
nampict2 = "";
} catch(Exception e) {
System.out.println("Exception(select,qry):"+e);
}
try {
if (!rset.getString(48).equals("null"))
desc2=rset.getString(48) ;
else
desc2 = "";
} catch(Exception e) {
System.out.println("Exception(select,qry):"+e);
}
try {
if (!rset.getString(49).equals("null"))
pict3=rset.getString(49) ;
else
pict3 = "";
} catch(Exception e) {
System.out.println("Exception(select,qry):"+e);
}
try {
if (!rset.getString(50).equals("null"))
nampict3=rset.getString(50) ;
else
nampict3 = "";
} catch(Exception e) {
System.out.println("Exception(select,qry):"+e);
}
try {
if (!rset.getString(51).equals("null"))
desc3=rset.getString(51) ;
else
desc3 = "";
} catch(Exception e) {
System.out.println("Exception(select,qry):"+e);
}
try {
if (!rset.getString(52).equals("null"))
pict4=rset.getString(52) ;
else
pict4 = "";
} catch(Exception e) {
System.out.println("Exception(select,qry):"+e);
}
try {
if (!rset.getString(53).equals("null"))
nampict4=rset.getString(53) ;
else
nampict4 = "";
} catch(Exception e) {
System.out.println("Exception(select,qry):"+e);
}
try {
if (!rset.getString(54).equals("null"))
desc4=rset.getString(54) ;
else
desc4 = "";
} catch(Exception e) {
System.out.println("Exception(select,qry):"+e);
}
try {
if (!rset.getString(55).equals("null"))
welagent=rset.getString(55) ;
else
welagent = "";
} catch(Exception e) {
System.out.println("Exception(select,qry):"+e);
}
try {
if (!rset.getString(56).equals("null"))
noagent=rset.getString(56) ;
else
noagent = "";
} catch(Exception e) {
System.out.println("Exception(select,qry):"+e);
}
try {
if (rset.getInt(57) != 0)
listno=rset.getInt(57) ;
else
listno = 0;
} catch(Exception e) {
System.out.println("Exception(select,qry):"+e);
}
%>
Home Sale DIY - View House in <%= mcity %> , <%= mstate %> <%= mzip %>, Listing No. <%= listno %>
<%@ include file="upper.jsp" %>
<%@ include file="left.jsp" %>
|
|
<%
if ( mstate.equals("CA") ) {
%>
|
Monthly Payment Calculator
Provided by Loan MAX
|
|
(949) 733-0570 Email
|
|
|
|
<%@ include file="/others/calculators/MonthlyPayment_include.jsp" %>
|
|
|
|
|
<%
}
%>
<% if (welagent.equals("Y")) { %>
| Welcome agents. |
<% } else if (welagent.equals("N")) { %>
No agents, Please. |
<% } %>
|
|
| Listing No : <%= listno %> |
|
Print this page |
<% if (showemail.equals("Y")) { %>
| <%= contname %> <%= contlast %> |
<% } else { %>
<%= contname %> <%= contlast %> |
<% } %>
|
<%
if (!mainpict.equals("null") ) {
%>
|
<%
} else {
%>
|
<%
}
%>
| <%= maddress %> |
|
| <%= mcity %> , <%= mstate %> <%= mzip %> |
|
|
<% if (showcont.equals("Y")) { %>
| <%= contphone %> ext.<%= cextphone %> |
<% } %>
| Map |
|
|
| Selling Price : <%= tprice %>
|
|
| Community : <%= neighbo %>
|
|
| School District : <%= schdist %>
|
|
| Property Type :
<% if ( typeprop.equals("1") ) {
%>
Townhouse
<%
} else if ( typeprop.equals("2") ) {
%>
Condo
<%
} else if ( typeprop.equals("3") ) {
%>
Single
<%
} else if ( typeprop.equals("4") ) {
%>
2 Unit
<%
} else if ( typeprop.equals("5") ) {
%>
3 Unit
<%
} else if ( typeprop.equals("6") ) {
%>
4 Unit
<%
} else if ( typeprop.equals("7") ) {
%>
Apartment
<%
} else if ( typeprop.equals("8") ) {
%>
Land
<%
}
%>
|
|
|
| Number of Floor : <%= tfloor %>
|
|
Number of Garage : <%= tgar %>
|
|
| Number of Bedroom : <%= tbed %>
|
|
Square Footage : <%= ttotsqu %>
|
|
| Number of Bathroom : <%= tbath %>
|
|
Year Built : <%= tyrbuilt %>
|
|
| Number of Fireplace : <%= tfire %>
|
|
| |
|
<%
String temp_garage = "";
if ( tgarage.equals("1") ) {
temp_garage = "Built in";
} else if ( tgarage.equals("2") ) {
temp_garage = "Free Standing";
} else {
temp_garage = "";
}
String temp_heat = "";
if ( theat.equals("1") )
temp_heat = "Standard Electric";
else if ( theat.equals("2") )
temp_heat = "Electric Heat Lamp";
else if ( theat.equals("3") )
temp_heat = "Standard Gas";
else if ( theat.equals("4") )
temp_heat = "Gas Heat Lamp";
else if ( theat.equals("5") )
temp_heat = "Forced Air Heating";
else if ( theat.equals("6") )
temp_heat = "Fireplace";
else if ( theat.equals("7") )
temp_heat = "Oil";
else if ( theat.equals("8") )
temp_heat = "Wood Burning Stove";
else if ( theat.equals("9") )
temp_heat = "Solar";
else if ( theat.equals("10") )
temp_heat = "Water Boiler";
else
temp_heat = "";
String temp_sewer = "";
if ( tsewer.equals("1") ) {
temp_sewer = "City Provided";
} else if ( tsewer.equals("2") ) {
temp_sewer = "Septic Tank";
} else {
temp_sewer = "";
}
String temp_cool = "";
if ( tcool.equals("1") )
temp_cool = " Central A/C";
else if ( tcool.equals("2") )
temp_cool = "Gas";
else if ( tcool.equals("3") )
temp_cool = "Electric Heat Pump";
else if ( tcool.equals("4") )
temp_cool = "Gas Heat Pump";
else if ( tcool.equals("5") )
temp_cool = "Evaporator";
else if ( tcool.equals("6") )
temp_cool = "Wall Unit";
else
temp_cool = "";
%>
| Type of Garage : |
<%= temp_garage %> |
| Type of Heating System : |
<%= temp_heat %> |
| Type of Sewer System : |
<%= temp_sewer %> |
| Type of Cooling System : |
<%= temp_cool %> |
| |
|
| Other Features : |
<%
if ( hpool.equals("Y") ) {
%>
Pool,
<%
}
if ( hjacuzzi.equals("Y") ) {
%>
Jacuzzi,
<%
}
if ( hbasement.equals("Y") ) {
%>
Basement,
<%
}
if ( htennisco.equals("Y") ) {
%>
Tennis Court
<%
}
%>
<%
if ( hpatio.equals("Y") ) {
%>
Patio,
<%
}
if ( hbalcony.equals("Y") ) {
%>
Balcony,
<%
}
if ( halarm.equals("Y") ) {
%>
Alarm/Security,
<%
}
if ( hwoodflr.equals("Y") ) {
%>
Hardwood Floor
<%
}
%>
<%
if ( haircond.equals("Y") ) {
%>
Air Conditioning,
<%
}
if ( hdwasher.equals("Y") ) {
%>
Dishwasher,
<%
}
if ( hwoodflr.equals("Y") ) {
%>
Disposal
<%
}
%>
|
| |
|
<%
if (!pict1.equals("") || !desc1.equals("") ) {
%>
| <%= nampict1 %> |
| Description : |
| <%= desc1 %> |
|
|
<%
if ( pict1.length() > 0 ) {
%>
<%
}
%>
|
<% } %>
<%
if (!pict2.equals("") || !desc2.equals("") ) {
%>
| <%= nampict2 %> |
| Description : |
| <%= desc2 %> |
|
|
<%
if ( pict2.length() > 0 ) {
%>
<%
}
%>
|
<% } %>
<%
if (!pict3.equals("") || !desc3.equals("") ) {
%>
| <%= nampict3 %> |
| Description : |
| <%= desc3 %> |
|
|
<%
if ( pict3.length() > 0 ) {
%>
<%
}
%>
|
<% } %>
<%
if (!pict4.equals("") || !desc4.equals("") ) {
%>
| <%= nampict4 %> |
| Description : |
| <%= desc4 %> |
|
|
<%
if ( pict4.length() > 0 ) {
%>
<%
}
%>
|
<%
}
} else {
%>
The listing no. does not exist.
Please try again.
<%
}
rset.close();
stmt.close();
/* ------------------- record the page counter ---------------------------------------------- */
/*
PreparedStatement pstmtcn = conn.prepareStatement (
" Update countfreelist " +
" set totfreelist = totfreelist + 1 " );
pstmtcn.executeUpdate();
conn.commit();
pstmtcn.close();
int isvalid = 0;
sql = " select count(id) "
+ " from countselect where id = "
+ id;
// out.println(sql);
Statement stmtval = conn.createStatement ();
ResultSet rsetval = stmtval.executeQuery (sql);
if (rsetval.next()) {
try {
isvalid=rsetval.getInt(1) ;
} catch(Exception e) {
System.out.println("Exception(select,qry):"+e);
}
}
rsetval.close();
stmtval.close();
if ( isvalid > 0 ) {
PreparedStatement pstmtval = conn.prepareStatement (
" Update countselect " +
" set totalcount = totalcount + 1, " +
" selectype = '2' " +
" where id = ? " );
pstmtval.setInt(1,id);
pstmtval.executeUpdate();
conn.commit();
pstmtval.close();
} else {
PreparedStatement pstmtval = conn.prepareStatement (
" Insert into countselect(id,listnum,selectype,totalcount) " +
" values( ?, ?, '2', 1)" ) ;
pstmtval.setInt(1,id);
pstmtval.setInt(2,listno);
pstmtval.executeUpdate();
conn.commit();
pstmtval.close();
}
*/
/* ----------------------------------------------------------------------------------------- */
conn.close();
}
catch (SQLException esql )
{
out.println (" Select Sql Error :" + esql.getMessage());
}
catch (Exception e )
{
out.println ("Exception: " + e.getMessage());
}
%>
|
|
|
|
*This page is best viewed at 1024 x 768
|
|
Tech Support at HomeSaleDIY.com
|