%@ page contentType="text/html; charset=iso-8859-1" language="java" import="java.sql.*" errorPage=""
%><%
if(session.getAttribute("owner_id")==null) {
try {
response.sendRedirect("login.jsp");
}catch(Exception e1){}
}
int owner_id = new Integer((String)session.getAttribute("owner_id")).intValue();
String name = "";
String address = "";
int city_id = -1;
String phone = "";
String email = "";
String password = "";
boolean enabled = false;
String city_name = "";
String region_name = "";
int country_id= -1;
int world_id = 0;
try {
PreparedStatement Ps2;
Class.forName("org.gjt.mm.mysql.Driver");
//Class.forName("com.mysql.jdbc.Driver");
Connection con = DriverManager.getConnection("jdbc:mysql://localhost/sstrehli1?user=sstrehli1&password=frboadmin2007");
String query = "(SELECT o.owner_id, o.name, o.address, o.city_id, o.phone, o.email, o.password, o.enabled, o.city, o.region_name, o.country_id, c.world_id FROM owner o, countries c WHERE owner_id = ? AND o.country_id = c.country_id)UNION(SELECT o.owner_id, o.name, o.address, o.city_id, o.phone, o.email, o.password, o.enabled, o.city, o.region_name, o.country_id, 0 as world_id FROM owner o, countries c WHERE owner_id = ? AND o.country_id = 0)";
Ps2 = con.prepareStatement(query);
Ps2.setInt(1, owner_id);
Ps2.setInt(2, owner_id);
ResultSet Rs = Ps2.executeQuery();
if(Rs.next()) {
name = Rs.getString("name");
address = Rs.getString("address");
city_id = Rs.getInt("city_id");
phone = Rs.getString("phone");
email = Rs.getString("email");
password = Rs.getString("password");
enabled = Rs.getBoolean("enabled");
city_name = Rs.getString("city");
region_name = Rs.getString("region_name");
country_id = Rs.getInt("country_id");
world_id = Rs.getInt("world_id");
}
Rs.close();
Ps2.close();
con.close();
}catch(Exception e2){out.print(e2.toString());}
%>
Owner register
 |
Menu
|
|
|
|
|
|
Owner information
|
Create Listing
|
View Listings
|
|
|
|
|
FRBO.com - A ForLeaseByOwner.com, LLC website
|
|