%@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" %> <% 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; 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(); } //System.out.println("hs_inst="+hs_inst); StringBuffer portlet=new StringBuffer(); rs = st.executeQuery("select name,class,icon,content,sortnr_initial,tid from sx_portlet where today() between gueltig_von and gueltig_bis and type='HTML' and (visible != 'false' or visible is null) order by sortnr_initial,tid"); while (rs.next()) { if(rs.getObject(1) !=null && rs.getObject(2) !=null && rs.getObject(3) !=null && rs.getObject(4) !=null) portlet.append("