%@page pageEncoding="utf-8" contentType="text/html; charset=UTF-8" %> <%@ page import ="org.dbforms.config.DbFormsConfigRegistry,java.sql.Connection,java.sql.Statement,java.sql.ResultSet,de.superx.common.SxUser" %> <% String mandantenid="default"; //Ermittlung der Mandantenid zuerst aus Session, //wenn leer (d.h. User ist noch nicht angemeldet) //dann über request-Parameter Object mandantobject=request.getSession().getAttribute("MandantenID"); if(mandantobject != null) mandantenid=mandantobject.toString(); String mandantparam=request.getParameter("MandantenID"); if(mandantparam !=null && !mandantenid.equals("")) mandantenid=mandantparam; String username=""; String loginPortlet=""; StringBuffer defaultReport=new StringBuffer(); String defaultReportParam=request.getParameter("report_id"); String defaultMandantenIDParam=request.getParameter("MandantID"); StringBuffer LinkMandantenID=new StringBuffer(""); String MandantenID_Login=mandantenid; LinkMandantenID.append(""); defaultReport.append("?a=b"); if(defaultReportParam != null && !defaultReportParam.toString().equals("")) defaultReport.append("&report_id="+defaultReportParam.toString()); if((defaultMandantenIDParam == null || defaultMandantenIDParam.toString().equals("")) && !mandantenid.equals("default")) { defaultMandantenIDParam=mandantenid; } if(defaultMandantenIDParam != null && !defaultMandantenIDParam.toString().equals("")) { defaultReport.append("&MandantID="+defaultMandantenIDParam.toString()); LinkMandantenID.append("");//"/"+defaultMandantenIDParam.toString()); MandantenID_Login=defaultMandantenIDParam.toString(); } //Daten aus Datenbank werden in Variablen gespeichert Connection conmm=null; //out.println("Getting Connection for mandantenid="+mandantenid); try { conmm = DbFormsConfigRegistry.instance().lookup().getConnection(mandantenid); //System.out.println("Got Connection"); Statement st; st=conmm.createStatement(); ResultSet rs; String hs_logo=""; rs = st.executeQuery("select trim(contents_short) from sx_captions where id='REPORT_LOGO_FILE' and contents_short is not null and trim(contents_short) != '' "); while (rs.next()) { if(rs.getObject(1) !=null) hs_logo=rs.getObject(1).toString(); } //System.out.println("hs_logo="+hs_logo); String hs_link=""; rs = st.executeQuery("select contents_short from sx_captions where id='REPORT_HEADING_URL'"); while (rs.next()) { if(rs.getObject(1) !=null) hs_link=rs.getObject(1).toString(); } //System.out.println("hs_link="+hs_link); String hs_inst=""; rs = st.executeQuery("select contents_short from sx_captions where id='REPORT_HEADING_INSTITUTION'"); while (rs.next()) { if(rs.getObject(1) !=null) hs_inst=rs.getObject(1).toString(); } String custom_css=""; rs = st.executeQuery("select content from sx_repository where id='CUSTOM_CSS' and today() between gueltig_seit and gueltig_bis and aktiv=1"); while (rs.next()) { if(rs.getObject(1) !=null) custom_css=rs.getString(1); } //Login-Portlet? int loginPortletCount=0; rs = st.executeQuery("select count(*) from sx_portlet where today() between gueltig_von and gueltig_bis and type='HTML' and visible in ('login')"); while (rs.next()) { if(rs.getObject(1) !=null ) loginPortletCount=rs.getInt(1); } %>
<%= hs_inst %>