47 lines
1.4 KiB
Plaintext
47 lines
1.4 KiB
Plaintext
<%@ page contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
|
|
<%@include file="/include/db/db_connect.jsp"%>
|
|
<%@include file="/include/function/function.jsp"%>
|
|
<%
|
|
|
|
String h_no = r_call(request.getParameter("h"));
|
|
int login_tag = 0;
|
|
int home_fact = 0;
|
|
String t_home = request.getServerName().replaceAll(".c-innovacion.org","");
|
|
int c_home = 0;
|
|
String home_name = "";
|
|
String home_eng_name = "";
|
|
String home_site_name = "";
|
|
|
|
if(h_no.equals("")){
|
|
if(session.getAttribute("home") == null || session.getAttribute("home").equals("")){
|
|
String home_sql = "select c_no from tbl_field where c_eng_name = '" + t_home + "' ";
|
|
ResultSet rs_home = stmt.executeQuery(home_sql);
|
|
if(rs_home.next()){
|
|
c_home = rs_home.getInt("c_no");
|
|
}else{
|
|
c_home = 33;
|
|
}
|
|
rs_home.close();
|
|
session.setAttribute("home",c_home);
|
|
}else{
|
|
String s_h = session.getAttribute("home") + "";
|
|
c_home = Integer.parseInt(s_h);
|
|
}
|
|
}else{
|
|
c_home = Integer.parseInt(h_no);
|
|
session.setAttribute("home",c_home);
|
|
}
|
|
|
|
String home_sql2 = "select c_name,c_eng_name, c_site_name from tbl_field where c_no = " + c_home + " ";
|
|
ResultSet rs_home2 = stmt.executeQuery(home_sql2);
|
|
if(rs_home2.next()){
|
|
home_name = rs_home2.getString("c_name");
|
|
home_eng_name = rs_home2.getString("c_eng_name");
|
|
home_site_name = rs_home2.getString("c_site_name");
|
|
}else{
|
|
session.setAttribute("home","");
|
|
response.sendRedirect("/");
|
|
}
|
|
rs_home2.close();
|
|
%>
|